diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Custom/ArmStandbyPoolModelFactory.cs b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Custom/ArmStandbyPoolModelFactory.cs
deleted file mode 100644
index 2f219f8c8459..000000000000
--- a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Custom/ArmStandbyPoolModelFactory.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;
-using System.Linq;
-using Azure.Core;
-using Azure.ResourceManager.Models;
-
-namespace Azure.ResourceManager.StandbyPool.Models
-{
- /// Model factory for models.
- public static partial class ArmStandbyPoolModelFactory
- {
- /// Initializes a new instance of .
- /// The count of pooled resources in each state.
- /// A new instance for mocking.
- public static ContainerGroupInstanceCountSummary ContainerGroupInstanceCountSummary(IEnumerable instanceCountsByState = null)
- {
- instanceCountsByState ??= new List();
-
- return new ContainerGroupInstanceCountSummary(instanceCountsByState?.ToList(), serializedAdditionalRawData: null);
- }
-
- /// Initializes a new instance of .
- /// The state that the pooled resources count is for.
- /// The count of pooled resources in the given state.
- /// A new instance for mocking.
- public static PoolResourceStateCount PoolResourceStateCount(string state = null, long count = default)
- {
- return new PoolResourceStateCount(state, count, serializedAdditionalRawData: null);
- }
- /// Initializes a new instance of .
- /// The zone that the provided counts are in. This is null if zones are not enabled on the attached VMSS.
- /// The count of pooled resources in each state for the given zone.
- /// A new instance for mocking.
- public static StandbyVirtualMachineInstanceCountSummary StandbyVirtualMachineInstanceCountSummary(long? zone = null, IEnumerable instanceCountsByState = null)
- {
- instanceCountsByState ??= new List();
- return new StandbyVirtualMachineInstanceCountSummary(zone, instanceCountsByState?.ToList(), serializedAdditionalRawData: null);
- }
- }
-}
diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Custom/Models/ContainerGroupInstanceCountSummary.Serialization.cs b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Custom/Models/ContainerGroupInstanceCountSummary.Serialization.cs
deleted file mode 100644
index 2cc6238601c8..000000000000
--- a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Custom/Models/ContainerGroupInstanceCountSummary.Serialization.cs
+++ /dev/null
@@ -1,41 +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.Runtime.CompilerServices;
-using System.Text.Json;
-using Azure.Core;
-
-namespace Azure.ResourceManager.StandbyPool.Models
-{
- [CodeGenSerialization(nameof(StandbyContainerGroupInstanceCountsByState), SerializationValueHook = nameof(InstanceCountsByStateSerial))]
- public partial class ContainerGroupInstanceCountSummary
- {
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- internal void InstanceCountsByStateSerial(Utf8JsonWriter writer, ModelReaderWriterOptions options)
- {
- if (StandbyContainerGroupInstanceCountsByState == null)
- {
- writer.WriteStartArray();
- foreach (var item in InstanceCountsByState)
- {
- writer.WriteObjectValue(item, options);
- }
- writer.WriteEndArray();
- }
- else
- {
- writer.WriteStartArray();
- foreach (var item in StandbyContainerGroupInstanceCountsByState)
- {
- writer.WriteObjectValue(item, options);
- }
- writer.WriteEndArray();
- }
- }
- }
-}
diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Custom/Models/ContainerGroupInstanceCountSummary.cs b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Custom/Models/ContainerGroupInstanceCountSummary.cs
deleted file mode 100644
index 363bbda24a2a..000000000000
--- a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Custom/Models/ContainerGroupInstanceCountSummary.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-// 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.Linq;
-
-namespace Azure.ResourceManager.StandbyPool.Models
-{
- /// Displays the counts of container groups in each state, as known by the StandbyPool resource provider.
- public partial class ContainerGroupInstanceCountSummary
- {
- /// Initializes a new instance of .
- /// The count of pooled resources in each state.
- /// Keeps track of any properties unknown to the library.
- [EditorBrowsable(EditorBrowsableState.Never)]
- internal ContainerGroupInstanceCountSummary(IReadOnlyList instanceCountsByState, IDictionary serializedAdditionalRawData)
- {
- InstanceCountsByState = instanceCountsByState;
- _serializedAdditionalRawData = serializedAdditionalRawData;
- }
- /// The count of pooled resources in each state.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public IReadOnlyList InstanceCountsByState { get; }
- }
-}
diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Custom/Models/PoolResourceStateCount.Serialization.cs b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Custom/Models/PoolResourceStateCount.Serialization.cs
deleted file mode 100644
index 3904535cdf7b..000000000000
--- a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Custom/Models/PoolResourceStateCount.Serialization.cs
+++ /dev/null
@@ -1,132 +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.StandbyPool.Models
-{
- public partial class PoolResourceStateCount : IUtf8JsonSerializable, IJsonModel
- {
- void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
-
- void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
- {
- writer.WriteStartObject();
- JsonModelWriteCore(writer, options);
- writer.WriteEndObject();
- }
-
- /// The JSON writer.
- /// The client options for reading and writing models.
- protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
- {
- var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
- if (format != "J")
- {
- throw new FormatException($"The model {nameof(PoolResourceStateCount)} does not support writing '{format}' format.");
- }
-
- writer.WritePropertyName("state"u8);
- writer.WriteStringValue(State);
- writer.WritePropertyName("count"u8);
- writer.WriteNumberValue(Count);
- if (options.Format != "W" && _serializedAdditionalRawData != null)
- {
- foreach (var item in _serializedAdditionalRawData)
- {
- writer.WritePropertyName(item.Key);
-#if NET6_0_OR_GREATER
- writer.WriteRawValue(item.Value);
-#else
- using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions))
- {
- JsonSerializer.Serialize(writer, document.RootElement);
- }
-#endif
- }
- }
- }
-
- PoolResourceStateCount IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
- {
- var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
- if (format != "J")
- {
- throw new FormatException($"The model {nameof(PoolResourceStateCount)} does not support reading '{format}' format.");
- }
-
- using JsonDocument document = JsonDocument.ParseValue(ref reader);
- return DeserializePoolResourceStateCount(document.RootElement, options);
- }
-
- internal static PoolResourceStateCount DeserializePoolResourceStateCount(JsonElement element, ModelReaderWriterOptions options = null)
- {
- options ??= ModelSerializationExtensions.WireOptions;
-
- if (element.ValueKind == JsonValueKind.Null)
- {
- return null;
- }
- string state = default;
- long count = default;
- IDictionary serializedAdditionalRawData = default;
- Dictionary rawDataDictionary = new Dictionary();
- foreach (var property in element.EnumerateObject())
- {
- if (property.NameEquals("state"u8))
- {
- state = property.Value.GetString();
- continue;
- }
- if (property.NameEquals("count"u8))
- {
- count = property.Value.GetInt64();
- continue;
- }
- if (options.Format != "W")
- {
- rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
- }
- }
- serializedAdditionalRawData = rawDataDictionary;
- return new PoolResourceStateCount(state, count, 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, AzureResourceManagerStandbyPoolContext.Default);
- default:
- throw new FormatException($"The model {nameof(PoolResourceStateCount)} does not support writing '{options.Format}' format.");
- }
- }
-
- PoolResourceStateCount IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
- {
- var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
-
- switch (format)
- {
- case "J":
- {
- using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions);
- return DeserializePoolResourceStateCount(document.RootElement, options);
- }
- default:
- throw new FormatException($"The model {nameof(PoolResourceStateCount)} does not support reading '{options.Format}' format.");
- }
- }
-
- string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
- }
-}
diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Custom/Models/PoolResourceStateCount.cs b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Custom/Models/PoolResourceStateCount.cs
deleted file mode 100644
index 2c3ad0896748..000000000000
--- a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Custom/Models/PoolResourceStateCount.cs
+++ /dev/null
@@ -1,81 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-#nullable disable
-
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-
-namespace Azure.ResourceManager.StandbyPool.Models
-{
- /// Displays the counts of pooled resources in each state, as known by the StandbyPool resource provider.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public partial class PoolResourceStateCount
- {
- ///
- /// Keeps track of any properties unknown to the library.
- ///
- /// To assign an object to the value of this property use .
- ///
- ///
- /// To assign an already formatted json string to this property use .
- ///
- ///
- /// Examples:
- ///
- ///
- /// BinaryData.FromObjectAsJson("foo")
- /// Creates a payload of "foo".
- ///
- ///
- /// BinaryData.FromString("\"foo\"")
- /// Creates a payload of "foo".
- ///
- ///
- /// BinaryData.FromObjectAsJson(new { key = "value" })
- /// 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 that the pooled resources count is for.
- /// The count of pooled resources in the given state.
- /// is null.
- internal PoolResourceStateCount(string state, long count)
- {
- Argument.AssertNotNull(state, nameof(state));
-
- State = state;
- Count = count;
- }
-
- /// Initializes a new instance of .
- /// The state that the pooled resources count is for.
- /// The count of pooled resources in the given state.
- /// Keeps track of any properties unknown to the library.
- internal PoolResourceStateCount(string state, long count, IDictionary serializedAdditionalRawData)
- {
- State = state;
- Count = count;
- _serializedAdditionalRawData = serializedAdditionalRawData;
- }
-
- /// Initializes a new instance of for deserialization.
- internal PoolResourceStateCount()
- {
- }
-
- /// The state that the pooled resources count is for.
- public string State { get; }
- /// The count of pooled resources in the given state.
- public long Count { get; }
- }
-}
diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Custom/Models/StandbyContainerGroupPoolUpdateProperties.cs b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Custom/Models/StandbyContainerGroupPoolUpdateProperties.cs
deleted file mode 100644
index 9b7d6c943133..000000000000
--- a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Custom/Models/StandbyContainerGroupPoolUpdateProperties.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-// 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.StandbyPool.Models
-{
- [CodeGenModel("StandbyContainerGroupPoolResourceUpdateProperties")]
- public partial class StandbyContainerGroupPoolUpdateProperties
- {
- }
-}
diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Custom/Models/StandbyVirtualMachineInstanceCountSummary.Serialization.cs b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Custom/Models/StandbyVirtualMachineInstanceCountSummary.Serialization.cs
deleted file mode 100644
index c5fa95371fe4..000000000000
--- a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Custom/Models/StandbyVirtualMachineInstanceCountSummary.Serialization.cs
+++ /dev/null
@@ -1,41 +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.Runtime.CompilerServices;
-using System.Text.Json;
-using Azure.Core;
-
-namespace Azure.ResourceManager.StandbyPool.Models
-{
- [CodeGenSerialization(nameof(StandbyVirtualMachineInstanceCountsByState), SerializationValueHook = nameof(InstanceCountsByStateSerial))]
- public partial class StandbyVirtualMachineInstanceCountSummary
- {
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- internal void InstanceCountsByStateSerial(Utf8JsonWriter writer, ModelReaderWriterOptions options)
- {
- if (StandbyVirtualMachineInstanceCountsByState == null)
- {
- writer.WriteStartArray();
- foreach (var item in InstanceCountsByState)
- {
- writer.WriteObjectValue(item, options);
- }
- writer.WriteEndArray();
- }
- else
- {
- writer.WriteStartArray();
- foreach (var item in StandbyVirtualMachineInstanceCountsByState)
- {
- writer.WriteObjectValue(item, options);
- }
- writer.WriteEndArray();
- }
- }
- }
-}
diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Custom/Models/StandbyVirtualMachineInstanceCountSummary.cs b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Custom/Models/StandbyVirtualMachineInstanceCountSummary.cs
deleted file mode 100644
index 4229d3b6c0a6..000000000000
--- a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Custom/Models/StandbyVirtualMachineInstanceCountSummary.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-// 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.Linq;
-
-namespace Azure.ResourceManager.StandbyPool.Models
-{
- ///
- /// Contains the counts of VMs in each power state in a given zone, fault domain, as known by the StandbyPool resource provider.
- /// Note: any updates to pool resources outside of StandbyPoolRP (i.e deleting a VM through portal) are not reflected here.
- /// Note: any resources in the Running state may still be installing extensions / not fully provisioned.
- ///
- public partial class StandbyVirtualMachineInstanceCountSummary
- {
- /// Initializes a new instance of .
- /// The zone that the provided counts are in. This is null if zones are not enabled on the attached VMSS.
- /// The count of pooled resources in each state for the given zone.
- /// Keeps track of any properties unknown to the library.
- [EditorBrowsable(EditorBrowsableState.Never)]
- internal StandbyVirtualMachineInstanceCountSummary(long? zone, IReadOnlyList instanceCountsByState, IDictionary serializedAdditionalRawData)
- {
- Zone = zone;
- InstanceCountsByState = instanceCountsByState;
- _serializedAdditionalRawData = serializedAdditionalRawData;
- }
- /// The count of pooled virtual machines in each state for the given zone.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public IReadOnlyList InstanceCountsByState { get; }
- }
-}
diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Custom/Models/StandbyVirtualMachinePoolUpdateProperties.cs b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Custom/Models/StandbyVirtualMachinePoolUpdateProperties.cs
deleted file mode 100644
index c5492194b7be..000000000000
--- a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Custom/Models/StandbyVirtualMachinePoolUpdateProperties.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-// 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.StandbyPool.Models
-{
- [CodeGenModel("StandbyVirtualMachinePoolResourceUpdateProperties")]
- public partial class StandbyVirtualMachinePoolUpdateProperties
- {
- }
-}
diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/ArmStandbyPoolModelFactory.cs b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/ArmStandbyPoolModelFactory.cs
index 3575cd0b2ffa..5e9d462b8a37 100644
--- a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/ArmStandbyPoolModelFactory.cs
+++ b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/ArmStandbyPoolModelFactory.cs
@@ -7,284 +7,290 @@
using System;
using System.Collections.Generic;
-using System.ComponentModel;
using System.Linq;
+using Azure;
using Azure.Core;
using Azure.ResourceManager.Models;
+using Azure.ResourceManager.Resources.Models;
+using Azure.ResourceManager.StandbyPool;
namespace Azure.ResourceManager.StandbyPool.Models
{
- /// Model factory for models.
+ /// A factory class for creating instances of the models for mocking.
public static partial class ArmStandbyPoolModelFactory
{
- /// Initializes a new instance of .
- /// The id.
- /// The name.
- /// The resourceType.
- /// The systemData.
- /// The tags.
- /// The location.
+
+ /// A StandbyVirtualMachinePoolResource.
+ /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
+ /// The name of the resource.
+ /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
+ /// Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ /// Resource tags.
+ /// The geo-location where the resource lives.
/// The resource-specific properties for this resource.
/// A new instance for mocking.
- public static StandbyVirtualMachinePoolData StandbyVirtualMachinePoolData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, StandbyVirtualMachinePoolProperties properties = null)
+ public static StandbyVirtualMachinePoolData StandbyVirtualMachinePoolData(ResourceIdentifier id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, IDictionary tags = default, AzureLocation location = default, StandbyVirtualMachinePoolProperties properties = default)
{
- tags ??= new Dictionary();
+ tags ??= new ChangeTrackingDictionary();
return new StandbyVirtualMachinePoolData(
id,
name,
resourceType,
systemData,
+ additionalBinaryDataProperties: null,
tags,
location,
- properties,
- serializedAdditionalRawData: null);
+ properties);
}
- /// Initializes a new instance of .
+ /// Details of the StandbyVirtualMachinePool.
/// Specifies the elasticity profile of the standby virtual machine pools.
/// Specifies the desired state of virtual machines in the pool.
/// Specifies the fully qualified resource ID of a virtual machine scale set the pool is attached to.
/// The status of the last operation.
/// A new instance for mocking.
- public static StandbyVirtualMachinePoolProperties StandbyVirtualMachinePoolProperties(StandbyVirtualMachinePoolElasticityProfile elasticityProfile = null, StandbyVirtualMachineState virtualMachineState = default, ResourceIdentifier attachedVirtualMachineScaleSetId = null, StandbyProvisioningState? provisioningState = null)
+ public static StandbyVirtualMachinePoolProperties StandbyVirtualMachinePoolProperties(StandbyVirtualMachinePoolElasticityProfile elasticityProfile = default, StandbyVirtualMachineState virtualMachineState = default, ResourceIdentifier attachedVirtualMachineScaleSetId = default, StandbyProvisioningState? provisioningState = default)
+ {
+ return new StandbyVirtualMachinePoolProperties(elasticityProfile, virtualMachineState, attachedVirtualMachineScaleSetId, provisioningState, additionalBinaryDataProperties: null);
+ }
+
+ /// The type used for update operations of the StandbyVirtualMachinePoolResource.
+ /// Resource tags.
+ /// The resource-specific properties for this resource.
+ /// A new instance for mocking.
+ public static StandbyVirtualMachinePoolPatch StandbyVirtualMachinePoolPatch(IDictionary tags = default, StandbyVirtualMachinePoolResourceUpdateProperties properties = default)
{
- return new StandbyVirtualMachinePoolProperties(elasticityProfile, virtualMachineState, attachedVirtualMachineScaleSetId, provisioningState, serializedAdditionalRawData: null);
+ tags ??= new ChangeTrackingDictionary();
+
+ return new StandbyVirtualMachinePoolPatch(tags, properties, additionalBinaryDataProperties: null);
}
- /// Initializes a new instance of .
- /// The id.
- /// The name.
- /// The resourceType.
- /// The systemData.
+ /// Concrete proxy resource types can be created by aliasing this type using a specific property type.
+ /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
+ /// The name of the resource.
+ /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
+ /// Azure Resource Manager metadata containing createdBy and modifiedBy information.
/// The resource-specific properties for this resource.
/// A new instance for mocking.
- public static StandbyVirtualMachineData StandbyVirtualMachineData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, StandbyVirtualMachineProperties properties = null)
+ public static StandbyVirtualMachineData StandbyVirtualMachineData(ResourceIdentifier id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, StandbyVirtualMachineProperties properties = default)
{
return new StandbyVirtualMachineData(
id,
name,
resourceType,
systemData,
- properties,
- serializedAdditionalRawData: null);
+ additionalBinaryDataProperties: null,
+ properties);
}
- /// Initializes a new instance of .
+ /// Details of the StandbyVirtualMachine.
/// Resource id of the virtual machine.
/// The status of the last operation.
/// A new instance for mocking.
- public static StandbyVirtualMachineProperties StandbyVirtualMachineProperties(ResourceIdentifier virtualMachineResourceId = null, StandbyProvisioningState? provisioningState = null)
+ public static StandbyVirtualMachineProperties StandbyVirtualMachineProperties(ResourceIdentifier virtualMachineResourceId = default, StandbyProvisioningState? provisioningState = default)
{
- return new StandbyVirtualMachineProperties(virtualMachineResourceId, provisioningState, serializedAdditionalRawData: null);
+ return new StandbyVirtualMachineProperties(virtualMachineResourceId, provisioningState, additionalBinaryDataProperties: null);
}
- /// Initializes a new instance of .
- /// The id.
- /// The name.
- /// The resourceType.
- /// The systemData.
+ /// Contains information about a standby virtual machine pool as last known by the StandbyPool resource provider.
+ /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
+ /// The name of the resource.
+ /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
+ /// Azure Resource Manager metadata containing createdBy and modifiedBy information.
/// The resource-specific properties for this resource.
/// A new instance for mocking.
- public static StandbyVirtualMachinePoolRuntimeViewData StandbyVirtualMachinePoolRuntimeViewData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, StandbyVirtualMachinePoolRuntimeViewProperties properties = null)
+ public static StandbyVirtualMachinePoolRuntimeViewData StandbyVirtualMachinePoolRuntimeViewData(ResourceIdentifier id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, StandbyVirtualMachinePoolRuntimeViewProperties properties = default)
{
return new StandbyVirtualMachinePoolRuntimeViewData(
id,
name,
resourceType,
systemData,
- properties,
- serializedAdditionalRawData: null);
+ additionalBinaryDataProperties: null,
+ properties);
}
- /// Initializes a new instance of .
+ /// Contains information about a standby pool as last known by the StandbyPool resource provider.
/// A list containing the counts of virtual machines in each possible power state for each zone if enabled, as known by the StandbyPool resource provider. If zones are not enabled on the attached VMSS, the list will contain a single entry without zone values. Note: any resources in the Running state may still be installing extensions / not fully provisioned.
/// Display status of the standby pool.
/// Displays the provisioning state of the standby pool.
/// Displays prediction information of the standby pool.
/// A new instance for mocking.
- public static StandbyVirtualMachinePoolRuntimeViewProperties StandbyVirtualMachinePoolRuntimeViewProperties(IEnumerable instanceCountSummary = null, StandbyPoolStatus status = null, StandbyProvisioningState? provisioningState = null, StandbyVirtualMachinePoolPrediction prediction = null)
+ public static StandbyVirtualMachinePoolRuntimeViewProperties StandbyVirtualMachinePoolRuntimeViewProperties(IEnumerable instanceCountSummary = default, StandbyPoolStatus status = default, StandbyProvisioningState? provisioningState = default, StandbyVirtualMachinePoolPrediction prediction = default)
{
- instanceCountSummary ??= new List();
+ instanceCountSummary ??= new ChangeTrackingList();
- return new StandbyVirtualMachinePoolRuntimeViewProperties(instanceCountSummary?.ToList(), status, provisioningState, prediction, serializedAdditionalRawData: null);
+ return new StandbyVirtualMachinePoolRuntimeViewProperties(instanceCountSummary.ToList(), status, provisioningState, prediction, additionalBinaryDataProperties: null);
}
- /// Initializes a new instance of .
+ /// Contains the counts of VMs in each power state in a given zone, fault domain, as known by the StandbyPool resource provider. Note: any resources in the Running state may still be installing extensions / not fully provisioned.
/// The zone that the provided counts are in. It will not have a value if zones are not enabled on the attached VMSS.
/// The count of pooled virtual machines in each state for the given zone.
/// A new instance for mocking.
- public static StandbyVirtualMachineInstanceCountSummary StandbyVirtualMachineInstanceCountSummary(long? zone = null, IEnumerable standbyVirtualMachineInstanceCountsByState = null)
+ public static StandbyVirtualMachineInstanceCountSummary StandbyVirtualMachineInstanceCountSummary(long? zone = default, IEnumerable standbyVirtualMachineInstanceCountsByState = default)
{
- standbyVirtualMachineInstanceCountsByState ??= new List();
+ standbyVirtualMachineInstanceCountsByState ??= new ChangeTrackingList();
- return new StandbyVirtualMachineInstanceCountSummary(zone, standbyVirtualMachineInstanceCountsByState?.ToList(), serializedAdditionalRawData: null);
+ return new StandbyVirtualMachineInstanceCountSummary(zone, standbyVirtualMachineInstanceCountsByState.ToList(), additionalBinaryDataProperties: null);
}
- /// Initializes a new instance of .
+ /// Displays the counts of pooled virtual machines in each state, as known by the StandbyPool resource provider.
/// The state that the pooled virtual machines count is for.
/// The count of pooled virtual machines in the given state.
/// A new instance for mocking.
public static PoolVirtualMachineStateCount PoolVirtualMachineStateCount(PoolVirtualMachineState state = default, long count = default)
{
- return new PoolVirtualMachineStateCount(state, count, serializedAdditionalRawData: null);
+ return new PoolVirtualMachineStateCount(state, count, additionalBinaryDataProperties: null);
}
- /// Initializes a new instance of .
+ /// Displays StandbyPool status.
/// Displays the healthy state of the StandbyPool.
/// Displays the StandbyPool health state details.
/// A new instance for mocking.
- public static StandbyPoolStatus StandbyPoolStatus(StandbyPoolHealthStateCode code = default, string message = null)
+ public static StandbyPoolStatus StandbyPoolStatus(StandbyPoolHealthStateCode code = default, string message = default)
{
- return new StandbyPoolStatus(code, message, serializedAdditionalRawData: null);
+ return new StandbyPoolStatus(code, message, additionalBinaryDataProperties: null);
}
- /// Initializes a new instance of .
- /// Displays the forecast information of the standby pool.
+ /// Displays the predicted count of instances to be requested from the standby pool.
/// Displays the UTC timestamp of when the prediction was retrieved for the standby pool.
/// Displays additional information for the prediction of the standby pool.
/// A new instance for mocking.
- public static StandbyVirtualMachinePoolPrediction StandbyVirtualMachinePoolPrediction(IEnumerable forecastValuesInstancesRequestedCount = null, DateTimeOffset forecastStartOn = default, string forecastInfo = null)
+ public static StandbyVirtualMachinePoolPrediction StandbyVirtualMachinePoolPrediction(IEnumerable forecastValuesInstancesRequestedCount = default, DateTimeOffset forecastStartOn = default, string forecastInfo = default)
{
- forecastValuesInstancesRequestedCount ??= new List();
-
- return new StandbyVirtualMachinePoolPrediction(forecastValuesInstancesRequestedCount != null ? new StandbyVirtualMachinePoolForecastValues(forecastValuesInstancesRequestedCount?.ToList(), serializedAdditionalRawData: null) : null, forecastStartOn, forecastInfo, serializedAdditionalRawData: null);
+ return new StandbyVirtualMachinePoolPrediction(forecastValuesInstancesRequestedCount is null ? default : new StandbyVirtualMachinePoolForecastValues((forecastValuesInstancesRequestedCount ?? new ChangeTrackingList()).ToList(), null), forecastStartOn, forecastInfo, additionalBinaryDataProperties: null);
}
- /// Initializes a new instance of .
- /// The id.
- /// The name.
- /// The resourceType.
- /// The systemData.
- /// The tags.
- /// The location.
+ /// A StandbyContainerGroupPoolResource.
+ /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
+ /// The name of the resource.
+ /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
+ /// Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ /// Resource tags.
+ /// The geo-location where the resource lives.
/// The resource-specific properties for this resource.
/// A new instance for mocking.
- public static StandbyContainerGroupPoolData StandbyContainerGroupPoolData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, StandbyContainerGroupPoolProperties properties = null)
+ public static StandbyContainerGroupPoolData StandbyContainerGroupPoolData(ResourceIdentifier id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, IDictionary tags = default, AzureLocation location = default, StandbyContainerGroupPoolProperties properties = default)
{
- tags ??= new Dictionary();
+ tags ??= new ChangeTrackingDictionary();
return new StandbyContainerGroupPoolData(
id,
name,
resourceType,
systemData,
+ additionalBinaryDataProperties: null,
tags,
location,
- properties,
- serializedAdditionalRawData: null);
+ properties);
}
- /// Initializes a new instance of .
+ /// Details of the StandbyContainerGroupPool.
/// Specifies elasticity profile of standby container group pools.
/// Specifies container group properties of standby container group pools.
/// Specifies zones of standby container group pools.
/// The status of the last operation.
/// A new instance for mocking.
- public static StandbyContainerGroupPoolProperties StandbyContainerGroupPoolProperties(StandbyContainerGroupPoolElasticityProfile elasticityProfile = null, StandbyContainerGroupProperties containerGroupProperties = null, IEnumerable zones = null, StandbyProvisioningState? provisioningState = null)
+ public static StandbyContainerGroupPoolProperties StandbyContainerGroupPoolProperties(StandbyContainerGroupPoolElasticityProfile elasticityProfile = default, StandbyContainerGroupProperties containerGroupProperties = default, IEnumerable zones = default, StandbyProvisioningState? provisioningState = default)
+ {
+ zones ??= new ChangeTrackingList();
+
+ return new StandbyContainerGroupPoolProperties(elasticityProfile, containerGroupProperties, zones.ToList(), provisioningState, additionalBinaryDataProperties: null);
+ }
+
+ /// Details of the ContainerGroupProperties.
+ /// Specifies container group profile of standby container groups.
+ /// Specifies subnet Ids for container group.
+ /// A new instance for mocking.
+ public static StandbyContainerGroupProperties StandbyContainerGroupProperties(StandbyContainerGroupProfile containerGroupProfile = default, IEnumerable subnetIds = default)
{
- zones ??= new List();
+ subnetIds ??= new ChangeTrackingList();
- return new StandbyContainerGroupPoolProperties(elasticityProfile, containerGroupProperties, zones?.ToList(), provisioningState, serializedAdditionalRawData: null);
+ return new StandbyContainerGroupProperties(containerGroupProfile, subnetIds.ToList(), additionalBinaryDataProperties: null);
}
- /// Initializes a new instance of .
- /// The id.
- /// The name.
- /// The resourceType.
- /// The systemData.
+ /// The type used for update operations of the StandbyContainerGroupPoolResource.
+ /// Resource tags.
+ /// The resource-specific properties for this resource.
+ /// A new instance for mocking.
+ public static StandbyContainerGroupPoolPatch StandbyContainerGroupPoolPatch(IDictionary tags = default, StandbyContainerGroupPoolResourceUpdateProperties properties = default)
+ {
+ tags ??= new ChangeTrackingDictionary();
+
+ return new StandbyContainerGroupPoolPatch(tags, properties, additionalBinaryDataProperties: null);
+ }
+
+ /// The updatable properties of the StandbyContainerGroupPoolResource.
+ /// Specifies elasticity profile of standby container group pools.
+ /// Specifies container group properties of standby container group pools.
+ /// Specifies zones of standby container group pools.
+ /// A new instance for mocking.
+ public static StandbyContainerGroupPoolResourceUpdateProperties StandbyContainerGroupPoolResourceUpdateProperties(StandbyContainerGroupPoolElasticityProfile elasticityProfile = default, StandbyContainerGroupProperties containerGroupProperties = default, IEnumerable zones = default)
+ {
+ zones ??= new ChangeTrackingList();
+
+ return new StandbyContainerGroupPoolResourceUpdateProperties(elasticityProfile, containerGroupProperties, zones.ToList(), additionalBinaryDataProperties: null);
+ }
+
+ /// Contains information about a standby container group pool as last known by the StandbyPool resource provider.
+ /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
+ /// The name of the resource.
+ /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
+ /// Azure Resource Manager metadata containing createdBy and modifiedBy information.
/// The resource-specific properties for this resource.
/// A new instance for mocking.
- public static StandbyContainerGroupPoolRuntimeViewData StandbyContainerGroupPoolRuntimeViewData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, StandbyContainerGroupPoolRuntimeViewProperties properties = null)
+ public static StandbyContainerGroupPoolRuntimeViewData StandbyContainerGroupPoolRuntimeViewData(ResourceIdentifier id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, StandbyContainerGroupPoolRuntimeViewProperties properties = default)
{
return new StandbyContainerGroupPoolRuntimeViewData(
id,
name,
resourceType,
systemData,
- properties,
- serializedAdditionalRawData: null);
+ additionalBinaryDataProperties: null,
+ properties);
}
- /// Initializes a new instance of .
+ /// Contains information about a standby pool as last known by the StandbyPool resource provider.
/// A list containing the counts of container groups in each possible state, as known by the StandbyPool resource provider.
/// Display status of the standby pool.
/// Displays the provisioning state of the standby pool.
/// Displays prediction information of the standby pool.
/// A new instance for mocking.
- public static StandbyContainerGroupPoolRuntimeViewProperties StandbyContainerGroupPoolRuntimeViewProperties(IEnumerable instanceCountSummary = null, StandbyPoolStatus status = null, StandbyProvisioningState? provisioningState = null, StandbyContainerGroupPoolPrediction prediction = null)
+ public static StandbyContainerGroupPoolRuntimeViewProperties StandbyContainerGroupPoolRuntimeViewProperties(IEnumerable instanceCountSummary = default, StandbyPoolStatus status = default, StandbyProvisioningState? provisioningState = default, StandbyContainerGroupPoolPrediction prediction = default)
{
- instanceCountSummary ??= new List();
+ instanceCountSummary ??= new ChangeTrackingList();
- return new StandbyContainerGroupPoolRuntimeViewProperties(instanceCountSummary?.ToList(), status, provisioningState, prediction, serializedAdditionalRawData: null);
+ return new StandbyContainerGroupPoolRuntimeViewProperties(instanceCountSummary.ToList(), status, provisioningState, prediction, additionalBinaryDataProperties: null);
}
- /// Initializes a new instance of .
+ /// Displays the counts of container groups in each state, as known by the StandbyPool resource provider.
/// The zone that the provided counts are in. It will not have a value if zones are not enabled.
/// The count of pooled container groups in each state for the given zone.
/// A new instance for mocking.
- public static ContainerGroupInstanceCountSummary ContainerGroupInstanceCountSummary(long? zone = null, IEnumerable standbyContainerGroupInstanceCountsByState = null)
+ public static ContainerGroupInstanceCountSummary ContainerGroupInstanceCountSummary(long? zone = default, IEnumerable standbyContainerGroupInstanceCountsByState = default)
{
- standbyContainerGroupInstanceCountsByState ??= new List();
+ standbyContainerGroupInstanceCountsByState ??= new ChangeTrackingList();
- return new ContainerGroupInstanceCountSummary(zone, standbyContainerGroupInstanceCountsByState?.ToList(), serializedAdditionalRawData: null);
+ return new ContainerGroupInstanceCountSummary(zone, standbyContainerGroupInstanceCountsByState.ToList(), additionalBinaryDataProperties: null);
}
- /// Initializes a new instance of .
+ /// Displays the counts of pooled container groups in each state, as known by the StandbyPool resource provider.
/// The state that the pooled container groups count is for.
/// The count of pooled container groups in the given state.
/// A new instance for mocking.
public static PoolContainerGroupStateCount PoolContainerGroupStateCount(PoolContainerGroupState state = default, long count = default)
{
- return new PoolContainerGroupStateCount(state, count, serializedAdditionalRawData: null);
+ return new PoolContainerGroupStateCount(state, count, additionalBinaryDataProperties: null);
}
- /// Initializes a new instance of .
- /// Displays the forecast information of the standby pool.
+ /// Displays the predicted count of instances to be requested from the standby pool.
/// Displays the UTC timestamp of when the prediction was retrieved for the standby pool.
/// Displays additional information for the prediction of the standby pool.
/// A new instance for mocking.
- public static StandbyContainerGroupPoolPrediction StandbyContainerGroupPoolPrediction(IEnumerable forecastValuesInstancesRequestedCount = null, DateTimeOffset forecastStartOn = default, string forecastInfo = null)
- {
- forecastValuesInstancesRequestedCount ??= new List();
-
- return new StandbyContainerGroupPoolPrediction(forecastValuesInstancesRequestedCount != null ? new StandbyContainerGroupPoolForecastValues(forecastValuesInstancesRequestedCount?.ToList(), serializedAdditionalRawData: null) : null, forecastStartOn, forecastInfo, serializedAdditionalRawData: null);
- }
-
- /// Initializes a new instance of .
- /// A list containing the counts of container groups in each possible state, as known by the StandbyPool resource provider.
- /// Displays the provisioning state of the standby pool.
- /// A new instance for mocking.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static StandbyContainerGroupPoolRuntimeViewProperties StandbyContainerGroupPoolRuntimeViewProperties(IEnumerable instanceCountSummary, StandbyProvisioningState? provisioningState)
- {
- return StandbyContainerGroupPoolRuntimeViewProperties(instanceCountSummary: instanceCountSummary, status: default, provisioningState: provisioningState, prediction: default);
- }
-
- /// Initializes a new instance of .
- /// Specifies elasticity profile of standby container group pools.
- /// Specifies container group properties of standby container group pools.
- /// The status of the last operation.
- /// A new instance for mocking.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static StandbyContainerGroupPoolProperties StandbyContainerGroupPoolProperties(StandbyContainerGroupPoolElasticityProfile elasticityProfile, StandbyContainerGroupProperties containerGroupProperties, StandbyProvisioningState? provisioningState)
- {
- return StandbyContainerGroupPoolProperties(elasticityProfile: elasticityProfile, containerGroupProperties: containerGroupProperties, zones: default, provisioningState: provisioningState);
- }
-
- /// Initializes a new instance of .
- ///
- /// A list containing the counts of virtual machines in each possible power state for each zone if enabled, as known by the StandbyPool resource provider.
- /// If zones are not enabled on the attached VMSS, the list will contain a single entry with null zone values.
- /// Note: any updates to pool resources outside of StandbyPoolRP (i.e deleting a VM through portal) are not reflected here.
- /// Note: any resources in the Running state may still be installing extensions / not fully provisioned.
- ///
- /// Displays the provisioning state of the standby pool.
- /// A new instance for mocking.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static StandbyVirtualMachinePoolRuntimeViewProperties StandbyVirtualMachinePoolRuntimeViewProperties(IEnumerable instanceCountSummary, StandbyProvisioningState? provisioningState)
+ public static StandbyContainerGroupPoolPrediction StandbyContainerGroupPoolPrediction(IEnumerable forecastValuesInstancesRequestedCount = default, DateTimeOffset forecastStartOn = default, string forecastInfo = default)
{
- return StandbyVirtualMachinePoolRuntimeViewProperties(instanceCountSummary: instanceCountSummary, status: default, provisioningState: provisioningState, prediction: default);
+ return new StandbyContainerGroupPoolPrediction(forecastValuesInstancesRequestedCount is null ? default : new StandbyContainerGroupPoolForecastValues((forecastValuesInstancesRequestedCount ?? new ChangeTrackingList()).ToList(), null), forecastStartOn, forecastInfo, additionalBinaryDataProperties: null);
}
}
}
diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/CollectionResults/StandbyContainerGroupPoolRuntimeViewsGetByStandbyPoolAsyncCollectionResultOfT.cs b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/CollectionResults/StandbyContainerGroupPoolRuntimeViewsGetByStandbyPoolAsyncCollectionResultOfT.cs
new file mode 100644
index 000000000000..12b77e251c67
--- /dev/null
+++ b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/CollectionResults/StandbyContainerGroupPoolRuntimeViewsGetByStandbyPoolAsyncCollectionResultOfT.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.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager.StandbyPool.Models;
+
+namespace Azure.ResourceManager.StandbyPool
+{
+ internal partial class StandbyContainerGroupPoolRuntimeViewsGetByStandbyPoolAsyncCollectionResultOfT : AsyncPageable
+ {
+ private readonly StandbyContainerGroupPoolRuntimeViews _client;
+ private readonly Guid _subscriptionId;
+ private readonly string _resourceGroupName;
+ private readonly string _standbyContainerGroupPoolName;
+ private readonly RequestContext _context;
+
+ /// Initializes a new instance of StandbyContainerGroupPoolRuntimeViewsGetByStandbyPoolAsyncCollectionResultOfT, which is used to iterate over the pages of a collection.
+ /// The StandbyContainerGroupPoolRuntimeViews client used to send requests.
+ /// The ID of the target subscription. The value must be an UUID.
+ /// The name of the resource group. The name is case insensitive.
+ /// Name of the standby container group pool.
+ /// The request options, which can override default behaviors of the client pipeline on a per-call basis.
+ public StandbyContainerGroupPoolRuntimeViewsGetByStandbyPoolAsyncCollectionResultOfT(StandbyContainerGroupPoolRuntimeViews client, Guid subscriptionId, string resourceGroupName, string standbyContainerGroupPoolName, RequestContext context) : base(context?.CancellationToken ?? default)
+ {
+ _client = client;
+ _subscriptionId = subscriptionId;
+ _resourceGroupName = resourceGroupName;
+ _standbyContainerGroupPoolName = standbyContainerGroupPoolName;
+ _context = context;
+ }
+
+ /// Gets the pages of StandbyContainerGroupPoolRuntimeViewsGetByStandbyPoolAsyncCollectionResultOfT as an enumerable collection.
+ /// A continuation token indicating where to resume paging.
+ /// The number of items per page.
+ /// The pages of StandbyContainerGroupPoolRuntimeViewsGetByStandbyPoolAsyncCollectionResultOfT as an enumerable collection.
+ public override async IAsyncEnumerable> AsPages(string continuationToken, int? pageSizeHint)
+ {
+ Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null;
+ while (true)
+ {
+ Response response = await GetNextResponseAsync(pageSizeHint, nextPage).ConfigureAwait(false);
+ if (response is null)
+ {
+ yield break;
+ }
+ StandbyContainerGroupPoolRuntimeViewResourceListResult result = StandbyContainerGroupPoolRuntimeViewResourceListResult.FromResponse(response);
+ yield return Page.FromValues((IReadOnlyList)result.Value, nextPage?.AbsoluteUri, response);
+ nextPage = result.NextLink;
+ if (nextPage == null)
+ {
+ yield break;
+ }
+ }
+ }
+
+ /// Get next page.
+ /// The number of items per page.
+ /// The next link to use for the next page of results.
+ private async ValueTask GetNextResponseAsync(int? pageSizeHint, Uri nextLink)
+ {
+ HttpMessage message = nextLink != null ? _client.CreateNextGetByStandbyPoolRequest(nextLink, _subscriptionId, _resourceGroupName, _standbyContainerGroupPoolName, _context) : _client.CreateGetByStandbyPoolRequest(_subscriptionId, _resourceGroupName, _standbyContainerGroupPoolName, _context);
+ using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("StandbyContainerGroupPoolRuntimeViewCollection.GetAll");
+ scope.Start();
+ try
+ {
+ return await _client.Pipeline.ProcessMessageAsync(message, _context).ConfigureAwait(false);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/CollectionResults/StandbyContainerGroupPoolRuntimeViewsGetByStandbyPoolCollectionResultOfT.cs b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/CollectionResults/StandbyContainerGroupPoolRuntimeViewsGetByStandbyPoolCollectionResultOfT.cs
new file mode 100644
index 000000000000..f448abf27c28
--- /dev/null
+++ b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/CollectionResults/StandbyContainerGroupPoolRuntimeViewsGetByStandbyPoolCollectionResultOfT.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;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager.StandbyPool.Models;
+
+namespace Azure.ResourceManager.StandbyPool
+{
+ internal partial class StandbyContainerGroupPoolRuntimeViewsGetByStandbyPoolCollectionResultOfT : Pageable
+ {
+ private readonly StandbyContainerGroupPoolRuntimeViews _client;
+ private readonly Guid _subscriptionId;
+ private readonly string _resourceGroupName;
+ private readonly string _standbyContainerGroupPoolName;
+ private readonly RequestContext _context;
+
+ /// Initializes a new instance of StandbyContainerGroupPoolRuntimeViewsGetByStandbyPoolCollectionResultOfT, which is used to iterate over the pages of a collection.
+ /// The StandbyContainerGroupPoolRuntimeViews client used to send requests.
+ /// The ID of the target subscription. The value must be an UUID.
+ /// The name of the resource group. The name is case insensitive.
+ /// Name of the standby container group pool.
+ /// The request options, which can override default behaviors of the client pipeline on a per-call basis.
+ public StandbyContainerGroupPoolRuntimeViewsGetByStandbyPoolCollectionResultOfT(StandbyContainerGroupPoolRuntimeViews client, Guid subscriptionId, string resourceGroupName, string standbyContainerGroupPoolName, RequestContext context) : base(context?.CancellationToken ?? default)
+ {
+ _client = client;
+ _subscriptionId = subscriptionId;
+ _resourceGroupName = resourceGroupName;
+ _standbyContainerGroupPoolName = standbyContainerGroupPoolName;
+ _context = context;
+ }
+
+ /// Gets the pages of StandbyContainerGroupPoolRuntimeViewsGetByStandbyPoolCollectionResultOfT as an enumerable collection.
+ /// A continuation token indicating where to resume paging.
+ /// The number of items per page.
+ /// The pages of StandbyContainerGroupPoolRuntimeViewsGetByStandbyPoolCollectionResultOfT as an enumerable collection.
+ public override IEnumerable> AsPages(string continuationToken, int? pageSizeHint)
+ {
+ Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null;
+ while (true)
+ {
+ Response response = GetNextResponse(pageSizeHint, nextPage);
+ if (response is null)
+ {
+ yield break;
+ }
+ StandbyContainerGroupPoolRuntimeViewResourceListResult result = StandbyContainerGroupPoolRuntimeViewResourceListResult.FromResponse(response);
+ yield return Page.FromValues((IReadOnlyList)result.Value, nextPage?.AbsoluteUri, response);
+ nextPage = result.NextLink;
+ if (nextPage == null)
+ {
+ yield break;
+ }
+ }
+ }
+
+ /// Get next page.
+ /// The number of items per page.
+ /// The next link to use for the next page of results.
+ private Response GetNextResponse(int? pageSizeHint, Uri nextLink)
+ {
+ HttpMessage message = nextLink != null ? _client.CreateNextGetByStandbyPoolRequest(nextLink, _subscriptionId, _resourceGroupName, _standbyContainerGroupPoolName, _context) : _client.CreateGetByStandbyPoolRequest(_subscriptionId, _resourceGroupName, _standbyContainerGroupPoolName, _context);
+ using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("StandbyContainerGroupPoolRuntimeViewCollection.GetAll");
+ scope.Start();
+ try
+ {
+ return _client.Pipeline.ProcessMessage(message, _context);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/CollectionResults/StandbyContainerGroupPoolsGetByResourceGroupAsyncCollectionResultOfT.cs b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/CollectionResults/StandbyContainerGroupPoolsGetByResourceGroupAsyncCollectionResultOfT.cs
new file mode 100644
index 000000000000..88c558f78365
--- /dev/null
+++ b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/CollectionResults/StandbyContainerGroupPoolsGetByResourceGroupAsyncCollectionResultOfT.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.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager.StandbyPool.Models;
+
+namespace Azure.ResourceManager.StandbyPool
+{
+ internal partial class StandbyContainerGroupPoolsGetByResourceGroupAsyncCollectionResultOfT : AsyncPageable
+ {
+ private readonly StandbyContainerGroupPools _client;
+ private readonly Guid _subscriptionId;
+ private readonly string _resourceGroupName;
+ private readonly RequestContext _context;
+
+ /// Initializes a new instance of StandbyContainerGroupPoolsGetByResourceGroupAsyncCollectionResultOfT, which is used to iterate over the pages of a collection.
+ /// The StandbyContainerGroupPools client used to send requests.
+ /// The ID of the target subscription. The value must be an UUID.
+ /// The name of the resource group. The name is case insensitive.
+ /// The request options, which can override default behaviors of the client pipeline on a per-call basis.
+ public StandbyContainerGroupPoolsGetByResourceGroupAsyncCollectionResultOfT(StandbyContainerGroupPools client, Guid subscriptionId, string resourceGroupName, RequestContext context) : base(context?.CancellationToken ?? default)
+ {
+ _client = client;
+ _subscriptionId = subscriptionId;
+ _resourceGroupName = resourceGroupName;
+ _context = context;
+ }
+
+ /// Gets the pages of StandbyContainerGroupPoolsGetByResourceGroupAsyncCollectionResultOfT as an enumerable collection.
+ /// A continuation token indicating where to resume paging.
+ /// The number of items per page.
+ /// The pages of StandbyContainerGroupPoolsGetByResourceGroupAsyncCollectionResultOfT as an enumerable collection.
+ public override async IAsyncEnumerable> AsPages(string continuationToken, int? pageSizeHint)
+ {
+ Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null;
+ while (true)
+ {
+ Response response = await GetNextResponseAsync(pageSizeHint, nextPage).ConfigureAwait(false);
+ if (response is null)
+ {
+ yield break;
+ }
+ StandbyContainerGroupPoolResourceListResult result = StandbyContainerGroupPoolResourceListResult.FromResponse(response);
+ yield return Page.FromValues((IReadOnlyList)result.Value, nextPage?.AbsoluteUri, response);
+ nextPage = result.NextLink;
+ if (nextPage == null)
+ {
+ yield break;
+ }
+ }
+ }
+
+ /// Get next page.
+ /// The number of items per page.
+ /// The next link to use for the next page of results.
+ private async ValueTask GetNextResponseAsync(int? pageSizeHint, Uri nextLink)
+ {
+ HttpMessage message = nextLink != null ? _client.CreateNextGetByResourceGroupRequest(nextLink, _subscriptionId, _resourceGroupName, _context) : _client.CreateGetByResourceGroupRequest(_subscriptionId, _resourceGroupName, _context);
+ using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("StandbyContainerGroupPoolCollection.GetAll");
+ scope.Start();
+ try
+ {
+ return await _client.Pipeline.ProcessMessageAsync(message, _context).ConfigureAwait(false);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/CollectionResults/StandbyContainerGroupPoolsGetByResourceGroupCollectionResultOfT.cs b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/CollectionResults/StandbyContainerGroupPoolsGetByResourceGroupCollectionResultOfT.cs
new file mode 100644
index 000000000000..a5885ed92825
--- /dev/null
+++ b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/CollectionResults/StandbyContainerGroupPoolsGetByResourceGroupCollectionResultOfT.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;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager.StandbyPool.Models;
+
+namespace Azure.ResourceManager.StandbyPool
+{
+ internal partial class StandbyContainerGroupPoolsGetByResourceGroupCollectionResultOfT : Pageable
+ {
+ private readonly StandbyContainerGroupPools _client;
+ private readonly Guid _subscriptionId;
+ private readonly string _resourceGroupName;
+ private readonly RequestContext _context;
+
+ /// Initializes a new instance of StandbyContainerGroupPoolsGetByResourceGroupCollectionResultOfT, which is used to iterate over the pages of a collection.
+ /// The StandbyContainerGroupPools client used to send requests.
+ /// The ID of the target subscription. The value must be an UUID.
+ /// The name of the resource group. The name is case insensitive.
+ /// The request options, which can override default behaviors of the client pipeline on a per-call basis.
+ public StandbyContainerGroupPoolsGetByResourceGroupCollectionResultOfT(StandbyContainerGroupPools client, Guid subscriptionId, string resourceGroupName, RequestContext context) : base(context?.CancellationToken ?? default)
+ {
+ _client = client;
+ _subscriptionId = subscriptionId;
+ _resourceGroupName = resourceGroupName;
+ _context = context;
+ }
+
+ /// Gets the pages of StandbyContainerGroupPoolsGetByResourceGroupCollectionResultOfT as an enumerable collection.
+ /// A continuation token indicating where to resume paging.
+ /// The number of items per page.
+ /// The pages of StandbyContainerGroupPoolsGetByResourceGroupCollectionResultOfT as an enumerable collection.
+ public override IEnumerable> AsPages(string continuationToken, int? pageSizeHint)
+ {
+ Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null;
+ while (true)
+ {
+ Response response = GetNextResponse(pageSizeHint, nextPage);
+ if (response is null)
+ {
+ yield break;
+ }
+ StandbyContainerGroupPoolResourceListResult result = StandbyContainerGroupPoolResourceListResult.FromResponse(response);
+ yield return Page.FromValues((IReadOnlyList)result.Value, nextPage?.AbsoluteUri, response);
+ nextPage = result.NextLink;
+ if (nextPage == null)
+ {
+ yield break;
+ }
+ }
+ }
+
+ /// Get next page.
+ /// The number of items per page.
+ /// The next link to use for the next page of results.
+ private Response GetNextResponse(int? pageSizeHint, Uri nextLink)
+ {
+ HttpMessage message = nextLink != null ? _client.CreateNextGetByResourceGroupRequest(nextLink, _subscriptionId, _resourceGroupName, _context) : _client.CreateGetByResourceGroupRequest(_subscriptionId, _resourceGroupName, _context);
+ using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("StandbyContainerGroupPoolCollection.GetAll");
+ scope.Start();
+ try
+ {
+ return _client.Pipeline.ProcessMessage(message, _context);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/CollectionResults/StandbyContainerGroupPoolsGetBySubscriptionAsyncCollectionResultOfT.cs b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/CollectionResults/StandbyContainerGroupPoolsGetBySubscriptionAsyncCollectionResultOfT.cs
new file mode 100644
index 000000000000..0eb2fd933aab
--- /dev/null
+++ b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/CollectionResults/StandbyContainerGroupPoolsGetBySubscriptionAsyncCollectionResultOfT.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;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager.StandbyPool.Models;
+
+namespace Azure.ResourceManager.StandbyPool
+{
+ internal partial class StandbyContainerGroupPoolsGetBySubscriptionAsyncCollectionResultOfT : AsyncPageable
+ {
+ private readonly StandbyContainerGroupPools _client;
+ private readonly Guid _subscriptionId;
+ private readonly RequestContext _context;
+
+ /// Initializes a new instance of StandbyContainerGroupPoolsGetBySubscriptionAsyncCollectionResultOfT, which is used to iterate over the pages of a collection.
+ /// The StandbyContainerGroupPools client used to send requests.
+ /// The ID of the target subscription. The value must be an UUID.
+ /// The request options, which can override default behaviors of the client pipeline on a per-call basis.
+ public StandbyContainerGroupPoolsGetBySubscriptionAsyncCollectionResultOfT(StandbyContainerGroupPools client, Guid subscriptionId, RequestContext context) : base(context?.CancellationToken ?? default)
+ {
+ _client = client;
+ _subscriptionId = subscriptionId;
+ _context = context;
+ }
+
+ /// Gets the pages of StandbyContainerGroupPoolsGetBySubscriptionAsyncCollectionResultOfT as an enumerable collection.
+ /// A continuation token indicating where to resume paging.
+ /// The number of items per page.
+ /// The pages of StandbyContainerGroupPoolsGetBySubscriptionAsyncCollectionResultOfT as an enumerable collection.
+ public override async IAsyncEnumerable> AsPages(string continuationToken, int? pageSizeHint)
+ {
+ Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null;
+ while (true)
+ {
+ Response response = await GetNextResponseAsync(pageSizeHint, nextPage).ConfigureAwait(false);
+ if (response is null)
+ {
+ yield break;
+ }
+ StandbyContainerGroupPoolResourceListResult result = StandbyContainerGroupPoolResourceListResult.FromResponse(response);
+ yield return Page.FromValues((IReadOnlyList)result.Value, nextPage?.AbsoluteUri, response);
+ nextPage = result.NextLink;
+ if (nextPage == null)
+ {
+ yield break;
+ }
+ }
+ }
+
+ /// Get next page.
+ /// The number of items per page.
+ /// The next link to use for the next page of results.
+ private async ValueTask GetNextResponseAsync(int? pageSizeHint, Uri nextLink)
+ {
+ HttpMessage message = nextLink != null ? _client.CreateNextGetBySubscriptionRequest(nextLink, _subscriptionId, _context) : _client.CreateGetBySubscriptionRequest(_subscriptionId, _context);
+ using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("MockableStandbyPoolSubscriptionResource.GetStandbyContainerGroupPools");
+ scope.Start();
+ try
+ {
+ return await _client.Pipeline.ProcessMessageAsync(message, _context).ConfigureAwait(false);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/CollectionResults/StandbyContainerGroupPoolsGetBySubscriptionCollectionResultOfT.cs b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/CollectionResults/StandbyContainerGroupPoolsGetBySubscriptionCollectionResultOfT.cs
new file mode 100644
index 000000000000..5dddcd98735c
--- /dev/null
+++ b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/CollectionResults/StandbyContainerGroupPoolsGetBySubscriptionCollectionResultOfT.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;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager.StandbyPool.Models;
+
+namespace Azure.ResourceManager.StandbyPool
+{
+ internal partial class StandbyContainerGroupPoolsGetBySubscriptionCollectionResultOfT : Pageable
+ {
+ private readonly StandbyContainerGroupPools _client;
+ private readonly Guid _subscriptionId;
+ private readonly RequestContext _context;
+
+ /// Initializes a new instance of StandbyContainerGroupPoolsGetBySubscriptionCollectionResultOfT, which is used to iterate over the pages of a collection.
+ /// The StandbyContainerGroupPools client used to send requests.
+ /// The ID of the target subscription. The value must be an UUID.
+ /// The request options, which can override default behaviors of the client pipeline on a per-call basis.
+ public StandbyContainerGroupPoolsGetBySubscriptionCollectionResultOfT(StandbyContainerGroupPools client, Guid subscriptionId, RequestContext context) : base(context?.CancellationToken ?? default)
+ {
+ _client = client;
+ _subscriptionId = subscriptionId;
+ _context = context;
+ }
+
+ /// Gets the pages of StandbyContainerGroupPoolsGetBySubscriptionCollectionResultOfT as an enumerable collection.
+ /// A continuation token indicating where to resume paging.
+ /// The number of items per page.
+ /// The pages of StandbyContainerGroupPoolsGetBySubscriptionCollectionResultOfT as an enumerable collection.
+ public override IEnumerable> AsPages(string continuationToken, int? pageSizeHint)
+ {
+ Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null;
+ while (true)
+ {
+ Response response = GetNextResponse(pageSizeHint, nextPage);
+ if (response is null)
+ {
+ yield break;
+ }
+ StandbyContainerGroupPoolResourceListResult result = StandbyContainerGroupPoolResourceListResult.FromResponse(response);
+ yield return Page.FromValues((IReadOnlyList)result.Value, nextPage?.AbsoluteUri, response);
+ nextPage = result.NextLink;
+ if (nextPage == null)
+ {
+ yield break;
+ }
+ }
+ }
+
+ /// Get next page.
+ /// The number of items per page.
+ /// The next link to use for the next page of results.
+ private Response GetNextResponse(int? pageSizeHint, Uri nextLink)
+ {
+ HttpMessage message = nextLink != null ? _client.CreateNextGetBySubscriptionRequest(nextLink, _subscriptionId, _context) : _client.CreateGetBySubscriptionRequest(_subscriptionId, _context);
+ using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("MockableStandbyPoolSubscriptionResource.GetStandbyContainerGroupPools");
+ scope.Start();
+ try
+ {
+ return _client.Pipeline.ProcessMessage(message, _context);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/CollectionResults/StandbyVirtualMachinePoolRuntimeViewsGetByStandbyPoolAsyncCollectionResultOfT.cs b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/CollectionResults/StandbyVirtualMachinePoolRuntimeViewsGetByStandbyPoolAsyncCollectionResultOfT.cs
new file mode 100644
index 000000000000..7f327b7149d3
--- /dev/null
+++ b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/CollectionResults/StandbyVirtualMachinePoolRuntimeViewsGetByStandbyPoolAsyncCollectionResultOfT.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.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager.StandbyPool.Models;
+
+namespace Azure.ResourceManager.StandbyPool
+{
+ internal partial class StandbyVirtualMachinePoolRuntimeViewsGetByStandbyPoolAsyncCollectionResultOfT : AsyncPageable
+ {
+ private readonly StandbyVirtualMachinePoolRuntimeViews _client;
+ private readonly Guid _subscriptionId;
+ private readonly string _resourceGroupName;
+ private readonly string _standbyVirtualMachinePoolName;
+ private readonly RequestContext _context;
+
+ /// Initializes a new instance of StandbyVirtualMachinePoolRuntimeViewsGetByStandbyPoolAsyncCollectionResultOfT, which is used to iterate over the pages of a collection.
+ /// The StandbyVirtualMachinePoolRuntimeViews client used to send requests.
+ /// The ID of the target subscription. The value must be an UUID.
+ /// The name of the resource group. The name is case insensitive.
+ /// Name of the standby virtual machine pool.
+ /// The request options, which can override default behaviors of the client pipeline on a per-call basis.
+ public StandbyVirtualMachinePoolRuntimeViewsGetByStandbyPoolAsyncCollectionResultOfT(StandbyVirtualMachinePoolRuntimeViews client, Guid subscriptionId, string resourceGroupName, string standbyVirtualMachinePoolName, RequestContext context) : base(context?.CancellationToken ?? default)
+ {
+ _client = client;
+ _subscriptionId = subscriptionId;
+ _resourceGroupName = resourceGroupName;
+ _standbyVirtualMachinePoolName = standbyVirtualMachinePoolName;
+ _context = context;
+ }
+
+ /// Gets the pages of StandbyVirtualMachinePoolRuntimeViewsGetByStandbyPoolAsyncCollectionResultOfT as an enumerable collection.
+ /// A continuation token indicating where to resume paging.
+ /// The number of items per page.
+ /// The pages of StandbyVirtualMachinePoolRuntimeViewsGetByStandbyPoolAsyncCollectionResultOfT as an enumerable collection.
+ public override async IAsyncEnumerable> AsPages(string continuationToken, int? pageSizeHint)
+ {
+ Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null;
+ while (true)
+ {
+ Response response = await GetNextResponseAsync(pageSizeHint, nextPage).ConfigureAwait(false);
+ if (response is null)
+ {
+ yield break;
+ }
+ StandbyVirtualMachinePoolRuntimeViewResourceListResult result = StandbyVirtualMachinePoolRuntimeViewResourceListResult.FromResponse(response);
+ yield return Page.FromValues((IReadOnlyList)result.Value, nextPage?.AbsoluteUri, response);
+ nextPage = result.NextLink;
+ if (nextPage == null)
+ {
+ yield break;
+ }
+ }
+ }
+
+ /// Get next page.
+ /// The number of items per page.
+ /// The next link to use for the next page of results.
+ private async ValueTask GetNextResponseAsync(int? pageSizeHint, Uri nextLink)
+ {
+ HttpMessage message = nextLink != null ? _client.CreateNextGetByStandbyPoolRequest(nextLink, _subscriptionId, _resourceGroupName, _standbyVirtualMachinePoolName, _context) : _client.CreateGetByStandbyPoolRequest(_subscriptionId, _resourceGroupName, _standbyVirtualMachinePoolName, _context);
+ using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("StandbyVirtualMachinePoolRuntimeViewCollection.GetAll");
+ scope.Start();
+ try
+ {
+ return await _client.Pipeline.ProcessMessageAsync(message, _context).ConfigureAwait(false);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/CollectionResults/StandbyVirtualMachinePoolRuntimeViewsGetByStandbyPoolCollectionResultOfT.cs b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/CollectionResults/StandbyVirtualMachinePoolRuntimeViewsGetByStandbyPoolCollectionResultOfT.cs
new file mode 100644
index 000000000000..17fb7021c548
--- /dev/null
+++ b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/CollectionResults/StandbyVirtualMachinePoolRuntimeViewsGetByStandbyPoolCollectionResultOfT.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;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager.StandbyPool.Models;
+
+namespace Azure.ResourceManager.StandbyPool
+{
+ internal partial class StandbyVirtualMachinePoolRuntimeViewsGetByStandbyPoolCollectionResultOfT : Pageable
+ {
+ private readonly StandbyVirtualMachinePoolRuntimeViews _client;
+ private readonly Guid _subscriptionId;
+ private readonly string _resourceGroupName;
+ private readonly string _standbyVirtualMachinePoolName;
+ private readonly RequestContext _context;
+
+ /// Initializes a new instance of StandbyVirtualMachinePoolRuntimeViewsGetByStandbyPoolCollectionResultOfT, which is used to iterate over the pages of a collection.
+ /// The StandbyVirtualMachinePoolRuntimeViews client used to send requests.
+ /// The ID of the target subscription. The value must be an UUID.
+ /// The name of the resource group. The name is case insensitive.
+ /// Name of the standby virtual machine pool.
+ /// The request options, which can override default behaviors of the client pipeline on a per-call basis.
+ public StandbyVirtualMachinePoolRuntimeViewsGetByStandbyPoolCollectionResultOfT(StandbyVirtualMachinePoolRuntimeViews client, Guid subscriptionId, string resourceGroupName, string standbyVirtualMachinePoolName, RequestContext context) : base(context?.CancellationToken ?? default)
+ {
+ _client = client;
+ _subscriptionId = subscriptionId;
+ _resourceGroupName = resourceGroupName;
+ _standbyVirtualMachinePoolName = standbyVirtualMachinePoolName;
+ _context = context;
+ }
+
+ /// Gets the pages of StandbyVirtualMachinePoolRuntimeViewsGetByStandbyPoolCollectionResultOfT as an enumerable collection.
+ /// A continuation token indicating where to resume paging.
+ /// The number of items per page.
+ /// The pages of StandbyVirtualMachinePoolRuntimeViewsGetByStandbyPoolCollectionResultOfT as an enumerable collection.
+ public override IEnumerable> AsPages(string continuationToken, int? pageSizeHint)
+ {
+ Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null;
+ while (true)
+ {
+ Response response = GetNextResponse(pageSizeHint, nextPage);
+ if (response is null)
+ {
+ yield break;
+ }
+ StandbyVirtualMachinePoolRuntimeViewResourceListResult result = StandbyVirtualMachinePoolRuntimeViewResourceListResult.FromResponse(response);
+ yield return Page.FromValues((IReadOnlyList)result.Value, nextPage?.AbsoluteUri, response);
+ nextPage = result.NextLink;
+ if (nextPage == null)
+ {
+ yield break;
+ }
+ }
+ }
+
+ /// Get next page.
+ /// The number of items per page.
+ /// The next link to use for the next page of results.
+ private Response GetNextResponse(int? pageSizeHint, Uri nextLink)
+ {
+ HttpMessage message = nextLink != null ? _client.CreateNextGetByStandbyPoolRequest(nextLink, _subscriptionId, _resourceGroupName, _standbyVirtualMachinePoolName, _context) : _client.CreateGetByStandbyPoolRequest(_subscriptionId, _resourceGroupName, _standbyVirtualMachinePoolName, _context);
+ using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("StandbyVirtualMachinePoolRuntimeViewCollection.GetAll");
+ scope.Start();
+ try
+ {
+ return _client.Pipeline.ProcessMessage(message, _context);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/CollectionResults/StandbyVirtualMachinePoolsGetByResourceGroupAsyncCollectionResultOfT.cs b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/CollectionResults/StandbyVirtualMachinePoolsGetByResourceGroupAsyncCollectionResultOfT.cs
new file mode 100644
index 000000000000..3bf95c0da11c
--- /dev/null
+++ b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/CollectionResults/StandbyVirtualMachinePoolsGetByResourceGroupAsyncCollectionResultOfT.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.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager.StandbyPool.Models;
+
+namespace Azure.ResourceManager.StandbyPool
+{
+ internal partial class StandbyVirtualMachinePoolsGetByResourceGroupAsyncCollectionResultOfT : AsyncPageable
+ {
+ private readonly StandbyVirtualMachinePools _client;
+ private readonly Guid _subscriptionId;
+ private readonly string _resourceGroupName;
+ private readonly RequestContext _context;
+
+ /// Initializes a new instance of StandbyVirtualMachinePoolsGetByResourceGroupAsyncCollectionResultOfT, which is used to iterate over the pages of a collection.
+ /// The StandbyVirtualMachinePools client used to send requests.
+ /// The ID of the target subscription. The value must be an UUID.
+ /// The name of the resource group. The name is case insensitive.
+ /// The request options, which can override default behaviors of the client pipeline on a per-call basis.
+ public StandbyVirtualMachinePoolsGetByResourceGroupAsyncCollectionResultOfT(StandbyVirtualMachinePools client, Guid subscriptionId, string resourceGroupName, RequestContext context) : base(context?.CancellationToken ?? default)
+ {
+ _client = client;
+ _subscriptionId = subscriptionId;
+ _resourceGroupName = resourceGroupName;
+ _context = context;
+ }
+
+ /// Gets the pages of StandbyVirtualMachinePoolsGetByResourceGroupAsyncCollectionResultOfT as an enumerable collection.
+ /// A continuation token indicating where to resume paging.
+ /// The number of items per page.
+ /// The pages of StandbyVirtualMachinePoolsGetByResourceGroupAsyncCollectionResultOfT as an enumerable collection.
+ public override async IAsyncEnumerable> AsPages(string continuationToken, int? pageSizeHint)
+ {
+ Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null;
+ while (true)
+ {
+ Response response = await GetNextResponseAsync(pageSizeHint, nextPage).ConfigureAwait(false);
+ if (response is null)
+ {
+ yield break;
+ }
+ StandbyVirtualMachinePoolResourceListResult result = StandbyVirtualMachinePoolResourceListResult.FromResponse(response);
+ yield return Page.FromValues((IReadOnlyList)result.Value, nextPage?.AbsoluteUri, response);
+ nextPage = result.NextLink;
+ if (nextPage == null)
+ {
+ yield break;
+ }
+ }
+ }
+
+ /// Get next page.
+ /// The number of items per page.
+ /// The next link to use for the next page of results.
+ private async ValueTask GetNextResponseAsync(int? pageSizeHint, Uri nextLink)
+ {
+ HttpMessage message = nextLink != null ? _client.CreateNextGetByResourceGroupRequest(nextLink, _subscriptionId, _resourceGroupName, _context) : _client.CreateGetByResourceGroupRequest(_subscriptionId, _resourceGroupName, _context);
+ using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("StandbyVirtualMachinePoolCollection.GetAll");
+ scope.Start();
+ try
+ {
+ return await _client.Pipeline.ProcessMessageAsync(message, _context).ConfigureAwait(false);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/CollectionResults/StandbyVirtualMachinePoolsGetByResourceGroupCollectionResultOfT.cs b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/CollectionResults/StandbyVirtualMachinePoolsGetByResourceGroupCollectionResultOfT.cs
new file mode 100644
index 000000000000..b8be71c8f725
--- /dev/null
+++ b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/CollectionResults/StandbyVirtualMachinePoolsGetByResourceGroupCollectionResultOfT.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;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager.StandbyPool.Models;
+
+namespace Azure.ResourceManager.StandbyPool
+{
+ internal partial class StandbyVirtualMachinePoolsGetByResourceGroupCollectionResultOfT : Pageable
+ {
+ private readonly StandbyVirtualMachinePools _client;
+ private readonly Guid _subscriptionId;
+ private readonly string _resourceGroupName;
+ private readonly RequestContext _context;
+
+ /// Initializes a new instance of StandbyVirtualMachinePoolsGetByResourceGroupCollectionResultOfT, which is used to iterate over the pages of a collection.
+ /// The StandbyVirtualMachinePools client used to send requests.
+ /// The ID of the target subscription. The value must be an UUID.
+ /// The name of the resource group. The name is case insensitive.
+ /// The request options, which can override default behaviors of the client pipeline on a per-call basis.
+ public StandbyVirtualMachinePoolsGetByResourceGroupCollectionResultOfT(StandbyVirtualMachinePools client, Guid subscriptionId, string resourceGroupName, RequestContext context) : base(context?.CancellationToken ?? default)
+ {
+ _client = client;
+ _subscriptionId = subscriptionId;
+ _resourceGroupName = resourceGroupName;
+ _context = context;
+ }
+
+ /// Gets the pages of StandbyVirtualMachinePoolsGetByResourceGroupCollectionResultOfT as an enumerable collection.
+ /// A continuation token indicating where to resume paging.
+ /// The number of items per page.
+ /// The pages of StandbyVirtualMachinePoolsGetByResourceGroupCollectionResultOfT as an enumerable collection.
+ public override IEnumerable> AsPages(string continuationToken, int? pageSizeHint)
+ {
+ Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null;
+ while (true)
+ {
+ Response response = GetNextResponse(pageSizeHint, nextPage);
+ if (response is null)
+ {
+ yield break;
+ }
+ StandbyVirtualMachinePoolResourceListResult result = StandbyVirtualMachinePoolResourceListResult.FromResponse(response);
+ yield return Page.FromValues((IReadOnlyList)result.Value, nextPage?.AbsoluteUri, response);
+ nextPage = result.NextLink;
+ if (nextPage == null)
+ {
+ yield break;
+ }
+ }
+ }
+
+ /// Get next page.
+ /// The number of items per page.
+ /// The next link to use for the next page of results.
+ private Response GetNextResponse(int? pageSizeHint, Uri nextLink)
+ {
+ HttpMessage message = nextLink != null ? _client.CreateNextGetByResourceGroupRequest(nextLink, _subscriptionId, _resourceGroupName, _context) : _client.CreateGetByResourceGroupRequest(_subscriptionId, _resourceGroupName, _context);
+ using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("StandbyVirtualMachinePoolCollection.GetAll");
+ scope.Start();
+ try
+ {
+ return _client.Pipeline.ProcessMessage(message, _context);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/CollectionResults/StandbyVirtualMachinePoolsGetBySubscriptionAsyncCollectionResultOfT.cs b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/CollectionResults/StandbyVirtualMachinePoolsGetBySubscriptionAsyncCollectionResultOfT.cs
new file mode 100644
index 000000000000..d6980e7f479f
--- /dev/null
+++ b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/CollectionResults/StandbyVirtualMachinePoolsGetBySubscriptionAsyncCollectionResultOfT.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;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager.StandbyPool.Models;
+
+namespace Azure.ResourceManager.StandbyPool
+{
+ internal partial class StandbyVirtualMachinePoolsGetBySubscriptionAsyncCollectionResultOfT : AsyncPageable
+ {
+ private readonly StandbyVirtualMachinePools _client;
+ private readonly Guid _subscriptionId;
+ private readonly RequestContext _context;
+
+ /// Initializes a new instance of StandbyVirtualMachinePoolsGetBySubscriptionAsyncCollectionResultOfT, which is used to iterate over the pages of a collection.
+ /// The StandbyVirtualMachinePools client used to send requests.
+ /// The ID of the target subscription. The value must be an UUID.
+ /// The request options, which can override default behaviors of the client pipeline on a per-call basis.
+ public StandbyVirtualMachinePoolsGetBySubscriptionAsyncCollectionResultOfT(StandbyVirtualMachinePools client, Guid subscriptionId, RequestContext context) : base(context?.CancellationToken ?? default)
+ {
+ _client = client;
+ _subscriptionId = subscriptionId;
+ _context = context;
+ }
+
+ /// Gets the pages of StandbyVirtualMachinePoolsGetBySubscriptionAsyncCollectionResultOfT as an enumerable collection.
+ /// A continuation token indicating where to resume paging.
+ /// The number of items per page.
+ /// The pages of StandbyVirtualMachinePoolsGetBySubscriptionAsyncCollectionResultOfT as an enumerable collection.
+ public override async IAsyncEnumerable> AsPages(string continuationToken, int? pageSizeHint)
+ {
+ Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null;
+ while (true)
+ {
+ Response response = await GetNextResponseAsync(pageSizeHint, nextPage).ConfigureAwait(false);
+ if (response is null)
+ {
+ yield break;
+ }
+ StandbyVirtualMachinePoolResourceListResult result = StandbyVirtualMachinePoolResourceListResult.FromResponse(response);
+ yield return Page.FromValues((IReadOnlyList)result.Value, nextPage?.AbsoluteUri, response);
+ nextPage = result.NextLink;
+ if (nextPage == null)
+ {
+ yield break;
+ }
+ }
+ }
+
+ /// Get next page.
+ /// The number of items per page.
+ /// The next link to use for the next page of results.
+ private async ValueTask GetNextResponseAsync(int? pageSizeHint, Uri nextLink)
+ {
+ HttpMessage message = nextLink != null ? _client.CreateNextGetBySubscriptionRequest(nextLink, _subscriptionId, _context) : _client.CreateGetBySubscriptionRequest(_subscriptionId, _context);
+ using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("MockableStandbyPoolSubscriptionResource.GetStandbyVirtualMachinePools");
+ scope.Start();
+ try
+ {
+ return await _client.Pipeline.ProcessMessageAsync(message, _context).ConfigureAwait(false);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/CollectionResults/StandbyVirtualMachinePoolsGetBySubscriptionCollectionResultOfT.cs b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/CollectionResults/StandbyVirtualMachinePoolsGetBySubscriptionCollectionResultOfT.cs
new file mode 100644
index 000000000000..ed62098acb95
--- /dev/null
+++ b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/CollectionResults/StandbyVirtualMachinePoolsGetBySubscriptionCollectionResultOfT.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;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager.StandbyPool.Models;
+
+namespace Azure.ResourceManager.StandbyPool
+{
+ internal partial class StandbyVirtualMachinePoolsGetBySubscriptionCollectionResultOfT : Pageable
+ {
+ private readonly StandbyVirtualMachinePools _client;
+ private readonly Guid _subscriptionId;
+ private readonly RequestContext _context;
+
+ /// Initializes a new instance of StandbyVirtualMachinePoolsGetBySubscriptionCollectionResultOfT, which is used to iterate over the pages of a collection.
+ /// The StandbyVirtualMachinePools client used to send requests.
+ /// The ID of the target subscription. The value must be an UUID.
+ /// The request options, which can override default behaviors of the client pipeline on a per-call basis.
+ public StandbyVirtualMachinePoolsGetBySubscriptionCollectionResultOfT(StandbyVirtualMachinePools client, Guid subscriptionId, RequestContext context) : base(context?.CancellationToken ?? default)
+ {
+ _client = client;
+ _subscriptionId = subscriptionId;
+ _context = context;
+ }
+
+ /// Gets the pages of StandbyVirtualMachinePoolsGetBySubscriptionCollectionResultOfT as an enumerable collection.
+ /// A continuation token indicating where to resume paging.
+ /// The number of items per page.
+ /// The pages of StandbyVirtualMachinePoolsGetBySubscriptionCollectionResultOfT as an enumerable collection.
+ public override IEnumerable> AsPages(string continuationToken, int? pageSizeHint)
+ {
+ Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null;
+ while (true)
+ {
+ Response response = GetNextResponse(pageSizeHint, nextPage);
+ if (response is null)
+ {
+ yield break;
+ }
+ StandbyVirtualMachinePoolResourceListResult result = StandbyVirtualMachinePoolResourceListResult.FromResponse(response);
+ yield return Page.FromValues((IReadOnlyList)result.Value, nextPage?.AbsoluteUri, response);
+ nextPage = result.NextLink;
+ if (nextPage == null)
+ {
+ yield break;
+ }
+ }
+ }
+
+ /// Get next page.
+ /// The number of items per page.
+ /// The next link to use for the next page of results.
+ private Response GetNextResponse(int? pageSizeHint, Uri nextLink)
+ {
+ HttpMessage message = nextLink != null ? _client.CreateNextGetBySubscriptionRequest(nextLink, _subscriptionId, _context) : _client.CreateGetBySubscriptionRequest(_subscriptionId, _context);
+ using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("MockableStandbyPoolSubscriptionResource.GetStandbyVirtualMachinePools");
+ scope.Start();
+ try
+ {
+ return _client.Pipeline.ProcessMessage(message, _context);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/CollectionResults/StandbyVirtualMachinesGetByStandbyVirtualMachinePoolResourceAsyncCollectionResultOfT.cs b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/CollectionResults/StandbyVirtualMachinesGetByStandbyVirtualMachinePoolResourceAsyncCollectionResultOfT.cs
new file mode 100644
index 000000000000..2d114b9d72b4
--- /dev/null
+++ b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/CollectionResults/StandbyVirtualMachinesGetByStandbyVirtualMachinePoolResourceAsyncCollectionResultOfT.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.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager.StandbyPool.Models;
+
+namespace Azure.ResourceManager.StandbyPool
+{
+ internal partial class StandbyVirtualMachinesGetByStandbyVirtualMachinePoolResourceAsyncCollectionResultOfT : AsyncPageable
+ {
+ private readonly StandbyVirtualMachines _client;
+ private readonly Guid _subscriptionId;
+ private readonly string _resourceGroupName;
+ private readonly string _standbyVirtualMachinePoolName;
+ private readonly RequestContext _context;
+
+ /// Initializes a new instance of StandbyVirtualMachinesGetByStandbyVirtualMachinePoolResourceAsyncCollectionResultOfT, which is used to iterate over the pages of a collection.
+ /// The StandbyVirtualMachines client used to send requests.
+ /// The ID of the target subscription. The value must be an UUID.
+ /// The name of the resource group. The name is case insensitive.
+ /// Name of the standby virtual machine pool.
+ /// The request options, which can override default behaviors of the client pipeline on a per-call basis.
+ public StandbyVirtualMachinesGetByStandbyVirtualMachinePoolResourceAsyncCollectionResultOfT(StandbyVirtualMachines client, Guid subscriptionId, string resourceGroupName, string standbyVirtualMachinePoolName, RequestContext context) : base(context?.CancellationToken ?? default)
+ {
+ _client = client;
+ _subscriptionId = subscriptionId;
+ _resourceGroupName = resourceGroupName;
+ _standbyVirtualMachinePoolName = standbyVirtualMachinePoolName;
+ _context = context;
+ }
+
+ /// Gets the pages of StandbyVirtualMachinesGetByStandbyVirtualMachinePoolResourceAsyncCollectionResultOfT as an enumerable collection.
+ /// A continuation token indicating where to resume paging.
+ /// The number of items per page.
+ /// The pages of StandbyVirtualMachinesGetByStandbyVirtualMachinePoolResourceAsyncCollectionResultOfT as an enumerable collection.
+ public override async IAsyncEnumerable> AsPages(string continuationToken, int? pageSizeHint)
+ {
+ Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null;
+ while (true)
+ {
+ Response response = await GetNextResponseAsync(pageSizeHint, nextPage).ConfigureAwait(false);
+ if (response is null)
+ {
+ yield break;
+ }
+ StandbyVirtualMachineResourceListResult result = StandbyVirtualMachineResourceListResult.FromResponse(response);
+ yield return Page.FromValues((IReadOnlyList)result.Value, nextPage?.AbsoluteUri, response);
+ nextPage = result.NextLink;
+ if (nextPage == null)
+ {
+ yield break;
+ }
+ }
+ }
+
+ /// Get next page.
+ /// The number of items per page.
+ /// The next link to use for the next page of results.
+ private async ValueTask GetNextResponseAsync(int? pageSizeHint, Uri nextLink)
+ {
+ HttpMessage message = nextLink != null ? _client.CreateNextGetByStandbyVirtualMachinePoolResourceRequest(nextLink, _subscriptionId, _resourceGroupName, _standbyVirtualMachinePoolName, _context) : _client.CreateGetByStandbyVirtualMachinePoolResourceRequest(_subscriptionId, _resourceGroupName, _standbyVirtualMachinePoolName, _context);
+ using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("StandbyVirtualMachineCollection.GetAll");
+ scope.Start();
+ try
+ {
+ return await _client.Pipeline.ProcessMessageAsync(message, _context).ConfigureAwait(false);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/CollectionResults/StandbyVirtualMachinesGetByStandbyVirtualMachinePoolResourceCollectionResultOfT.cs b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/CollectionResults/StandbyVirtualMachinesGetByStandbyVirtualMachinePoolResourceCollectionResultOfT.cs
new file mode 100644
index 000000000000..d0bc50b525f5
--- /dev/null
+++ b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/CollectionResults/StandbyVirtualMachinesGetByStandbyVirtualMachinePoolResourceCollectionResultOfT.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;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager.StandbyPool.Models;
+
+namespace Azure.ResourceManager.StandbyPool
+{
+ internal partial class StandbyVirtualMachinesGetByStandbyVirtualMachinePoolResourceCollectionResultOfT : Pageable
+ {
+ private readonly StandbyVirtualMachines _client;
+ private readonly Guid _subscriptionId;
+ private readonly string _resourceGroupName;
+ private readonly string _standbyVirtualMachinePoolName;
+ private readonly RequestContext _context;
+
+ /// Initializes a new instance of StandbyVirtualMachinesGetByStandbyVirtualMachinePoolResourceCollectionResultOfT, which is used to iterate over the pages of a collection.
+ /// The StandbyVirtualMachines client used to send requests.
+ /// The ID of the target subscription. The value must be an UUID.
+ /// The name of the resource group. The name is case insensitive.
+ /// Name of the standby virtual machine pool.
+ /// The request options, which can override default behaviors of the client pipeline on a per-call basis.
+ public StandbyVirtualMachinesGetByStandbyVirtualMachinePoolResourceCollectionResultOfT(StandbyVirtualMachines client, Guid subscriptionId, string resourceGroupName, string standbyVirtualMachinePoolName, RequestContext context) : base(context?.CancellationToken ?? default)
+ {
+ _client = client;
+ _subscriptionId = subscriptionId;
+ _resourceGroupName = resourceGroupName;
+ _standbyVirtualMachinePoolName = standbyVirtualMachinePoolName;
+ _context = context;
+ }
+
+ /// Gets the pages of StandbyVirtualMachinesGetByStandbyVirtualMachinePoolResourceCollectionResultOfT as an enumerable collection.
+ /// A continuation token indicating where to resume paging.
+ /// The number of items per page.
+ /// The pages of StandbyVirtualMachinesGetByStandbyVirtualMachinePoolResourceCollectionResultOfT as an enumerable collection.
+ public override IEnumerable> AsPages(string continuationToken, int? pageSizeHint)
+ {
+ Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null;
+ while (true)
+ {
+ Response response = GetNextResponse(pageSizeHint, nextPage);
+ if (response is null)
+ {
+ yield break;
+ }
+ StandbyVirtualMachineResourceListResult result = StandbyVirtualMachineResourceListResult.FromResponse(response);
+ yield return Page.FromValues((IReadOnlyList)result.Value, nextPage?.AbsoluteUri, response);
+ nextPage = result.NextLink;
+ if (nextPage == null)
+ {
+ yield break;
+ }
+ }
+ }
+
+ /// Get next page.
+ /// The number of items per page.
+ /// The next link to use for the next page of results.
+ private Response GetNextResponse(int? pageSizeHint, Uri nextLink)
+ {
+ HttpMessage message = nextLink != null ? _client.CreateNextGetByStandbyVirtualMachinePoolResourceRequest(nextLink, _subscriptionId, _resourceGroupName, _standbyVirtualMachinePoolName, _context) : _client.CreateGetByStandbyVirtualMachinePoolResourceRequest(_subscriptionId, _resourceGroupName, _standbyVirtualMachinePoolName, _context);
+ using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("StandbyVirtualMachineCollection.GetAll");
+ scope.Start();
+ try
+ {
+ return _client.Pipeline.ProcessMessage(message, _context);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/Extensions/MockableStandbyPoolArmClient.cs b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/Extensions/MockableStandbyPoolArmClient.cs
index cc854e4de6b5..7a040e950059 100644
--- a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/Extensions/MockableStandbyPoolArmClient.cs
+++ b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/Extensions/MockableStandbyPoolArmClient.cs
@@ -6,38 +6,27 @@
#nullable disable
using Azure.Core;
+using Azure.ResourceManager;
+using Azure.ResourceManager.StandbyPool;
namespace Azure.ResourceManager.StandbyPool.Mocking
{
- /// A class to add extension methods to ArmClient.
+ /// A class to add extension methods to .
public partial class MockableStandbyPoolArmClient : ArmResource
{
- /// Initializes a new instance of the class for mocking.
+ /// Initializes a new instance of MockableStandbyPoolArmClient for mocking.
protected MockableStandbyPoolArmClient()
{
}
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of class.
/// The client parameters to use in these operations.
/// The identifier of the resource that is the target of operations.
internal MockableStandbyPoolArmClient(ArmClient client, ResourceIdentifier id) : base(client, id)
{
}
- internal MockableStandbyPoolArmClient(ArmClient client) : this(client, ResourceIdentifier.Root)
- {
- }
-
- private string GetApiVersionOrNull(ResourceType resourceType)
- {
- TryGetApiVersion(resourceType, out string apiVersion);
- return apiVersion;
- }
-
- ///
- /// 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.
- ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
/// The resource ID of the resource to get.
/// Returns a object.
public virtual StandbyVirtualMachinePoolResource GetStandbyVirtualMachinePoolResource(ResourceIdentifier id)
@@ -46,10 +35,7 @@ public virtual StandbyVirtualMachinePoolResource GetStandbyVirtualMachinePoolRes
return new StandbyVirtualMachinePoolResource(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.
- ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
/// The resource ID of the resource to get.
/// Returns a object.
public virtual StandbyVirtualMachineResource GetStandbyVirtualMachineResource(ResourceIdentifier id)
@@ -58,10 +44,7 @@ public virtual StandbyVirtualMachineResource GetStandbyVirtualMachineResource(Re
return new StandbyVirtualMachineResource(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.
- ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
/// The resource ID of the resource to get.
/// Returns a object.
public virtual StandbyVirtualMachinePoolRuntimeViewResource GetStandbyVirtualMachinePoolRuntimeViewResource(ResourceIdentifier id)
@@ -70,10 +53,7 @@ public virtual StandbyVirtualMachinePoolRuntimeViewResource GetStandbyVirtualMac
return new StandbyVirtualMachinePoolRuntimeViewResource(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.
- ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
/// The resource ID of the resource to get.
/// Returns a object.
public virtual StandbyContainerGroupPoolResource GetStandbyContainerGroupPoolResource(ResourceIdentifier id)
@@ -82,10 +62,7 @@ public virtual StandbyContainerGroupPoolResource GetStandbyContainerGroupPoolRes
return new StandbyContainerGroupPoolResource(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.
- ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
/// The resource ID of the resource to get.
/// Returns a object.
public virtual StandbyContainerGroupPoolRuntimeViewResource GetStandbyContainerGroupPoolRuntimeViewResource(ResourceIdentifier id)
diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/Extensions/MockableStandbyPoolResourceGroupResource.cs b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/Extensions/MockableStandbyPoolResourceGroupResource.cs
index 3ab3c3783f88..d653e79a7888 100644
--- a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/Extensions/MockableStandbyPoolResourceGroupResource.cs
+++ b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/Extensions/MockableStandbyPoolResourceGroupResource.cs
@@ -8,33 +8,31 @@
using System;
using System.Threading;
using System.Threading.Tasks;
+using Azure;
using Azure.Core;
+using Azure.ResourceManager;
+using Azure.ResourceManager.Resources;
+using Azure.ResourceManager.StandbyPool;
namespace Azure.ResourceManager.StandbyPool.Mocking
{
- /// A class to add extension methods to ResourceGroupResource.
+ /// A class to add extension methods to .
public partial class MockableStandbyPoolResourceGroupResource : ArmResource
{
- /// Initializes a new instance of the class for mocking.
+ /// Initializes a new instance of MockableStandbyPoolResourceGroupResource for mocking.
protected MockableStandbyPoolResourceGroupResource()
{
}
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of class.
/// The client parameters to use in these operations.
/// The identifier of the resource that is the target of operations.
internal MockableStandbyPoolResourceGroupResource(ArmClient client, ResourceIdentifier id) : base(client, id)
{
}
- private string GetApiVersionOrNull(ResourceType resourceType)
- {
- TryGetApiVersion(resourceType, out string apiVersion);
- return apiVersion;
- }
-
- /// Gets a collection of StandbyVirtualMachinePoolResources in the ResourceGroupResource.
- /// An object representing collection of StandbyVirtualMachinePoolResources and their operations over a StandbyVirtualMachinePoolResource.
+ /// Gets a collection of StandbyVirtualMachinePools in the .
+ /// An object representing collection of StandbyVirtualMachinePools and their operations over a StandbyVirtualMachinePoolResource.
public virtual StandbyVirtualMachinePoolCollection GetStandbyVirtualMachinePools()
{
return GetCachedClient(client => new StandbyVirtualMachinePoolCollection(client, Id));
@@ -44,20 +42,16 @@ public virtual StandbyVirtualMachinePoolCollection GetStandbyVirtualMachinePools
/// Get a StandbyVirtualMachinePoolResource
///
///
- /// Request Path
- /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}
- ///
- ///
- /// Operation Id
- /// StandbyVirtualMachinePoolResource_Get
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}.
///
///
- /// Default Api Version
- /// 2025-03-01
+ /// Operation Id.
+ /// StandbyVirtualMachinePools_Get.
///
///
- /// Resource
- ///
+ /// Default Api Version.
+ /// 2025-10-01.
///
///
///
@@ -68,6 +62,8 @@ public virtual StandbyVirtualMachinePoolCollection GetStandbyVirtualMachinePools
[ForwardsClientCalls]
public virtual async Task> GetStandbyVirtualMachinePoolAsync(string standbyVirtualMachinePoolName, CancellationToken cancellationToken = default)
{
+ Argument.AssertNotNullOrEmpty(standbyVirtualMachinePoolName, nameof(standbyVirtualMachinePoolName));
+
return await GetStandbyVirtualMachinePools().GetAsync(standbyVirtualMachinePoolName, cancellationToken).ConfigureAwait(false);
}
@@ -75,20 +71,16 @@ public virtual async Task> GetStandb
/// Get a StandbyVirtualMachinePoolResource
///
///
- /// Request Path
- /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}
- ///
- ///
- /// Operation Id
- /// StandbyVirtualMachinePoolResource_Get
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}.
///
///
- /// Default Api Version
- /// 2025-03-01
+ /// Operation Id.
+ /// StandbyVirtualMachinePools_Get.
///
///
- /// Resource
- ///
+ /// Default Api Version.
+ /// 2025-10-01.
///
///
///
@@ -99,11 +91,13 @@ public virtual async Task> GetStandb
[ForwardsClientCalls]
public virtual Response GetStandbyVirtualMachinePool(string standbyVirtualMachinePoolName, CancellationToken cancellationToken = default)
{
+ Argument.AssertNotNullOrEmpty(standbyVirtualMachinePoolName, nameof(standbyVirtualMachinePoolName));
+
return GetStandbyVirtualMachinePools().Get(standbyVirtualMachinePoolName, cancellationToken);
}
- /// Gets a collection of StandbyContainerGroupPoolResources in the ResourceGroupResource.
- /// An object representing collection of StandbyContainerGroupPoolResources and their operations over a StandbyContainerGroupPoolResource.
+ /// Gets a collection of StandbyContainerGroupPools in the .
+ /// An object representing collection of StandbyContainerGroupPools and their operations over a StandbyContainerGroupPoolResource.
public virtual StandbyContainerGroupPoolCollection GetStandbyContainerGroupPools()
{
return GetCachedClient(client => new StandbyContainerGroupPoolCollection(client, Id));
@@ -113,20 +107,16 @@ public virtual StandbyContainerGroupPoolCollection GetStandbyContainerGroupPools
/// Get a StandbyContainerGroupPoolResource
///
///
- /// Request Path
- /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}
- ///
- ///
- /// Operation Id
- /// StandbyContainerGroupPoolResource_Get
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}.
///
///
- /// Default Api Version
- /// 2025-03-01
+ /// Operation Id.
+ /// StandbyContainerGroupPools_Get.
///
///
- /// Resource
- ///
+ /// Default Api Version.
+ /// 2025-10-01.
///
///
///
@@ -137,6 +127,8 @@ public virtual StandbyContainerGroupPoolCollection GetStandbyContainerGroupPools
[ForwardsClientCalls]
public virtual async Task> GetStandbyContainerGroupPoolAsync(string standbyContainerGroupPoolName, CancellationToken cancellationToken = default)
{
+ Argument.AssertNotNullOrEmpty(standbyContainerGroupPoolName, nameof(standbyContainerGroupPoolName));
+
return await GetStandbyContainerGroupPools().GetAsync(standbyContainerGroupPoolName, cancellationToken).ConfigureAwait(false);
}
@@ -144,20 +136,16 @@ public virtual async Task> GetStandb
/// Get a StandbyContainerGroupPoolResource
///
///
- /// Request Path
- /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}.
///
///
- /// Operation Id
- /// StandbyContainerGroupPoolResource_Get
+ /// Operation Id.
+ /// StandbyContainerGroupPools_Get.
///
///
- /// Default Api Version
- /// 2025-03-01
- ///
- ///
- /// Resource
- ///
+ /// Default Api Version.
+ /// 2025-10-01.
///
///
///
@@ -168,6 +156,8 @@ public virtual async Task> GetStandb
[ForwardsClientCalls]
public virtual Response GetStandbyContainerGroupPool(string standbyContainerGroupPoolName, CancellationToken cancellationToken = default)
{
+ Argument.AssertNotNullOrEmpty(standbyContainerGroupPoolName, nameof(standbyContainerGroupPoolName));
+
return GetStandbyContainerGroupPools().Get(standbyContainerGroupPoolName, cancellationToken);
}
}
diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/Extensions/MockableStandbyPoolSubscriptionResource.cs b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/Extensions/MockableStandbyPoolSubscriptionResource.cs
index fa791bfdf53f..46e5bd371f2e 100644
--- a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/Extensions/MockableStandbyPoolSubscriptionResource.cs
+++ b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/Extensions/MockableStandbyPoolSubscriptionResource.cs
@@ -5,92 +5,87 @@
#nullable disable
+using System;
using System.Threading;
-using Autorest.CSharp.Core;
+using Azure;
using Azure.Core;
using Azure.Core.Pipeline;
+using Azure.ResourceManager;
+using Azure.ResourceManager.Resources;
+using Azure.ResourceManager.StandbyPool;
namespace Azure.ResourceManager.StandbyPool.Mocking
{
- /// A class to add extension methods to SubscriptionResource.
+ /// A class to add extension methods to .
public partial class MockableStandbyPoolSubscriptionResource : ArmResource
{
- private ClientDiagnostics _standbyVirtualMachinePoolClientDiagnostics;
- private StandbyVirtualMachinePoolsRestOperations _standbyVirtualMachinePoolRestClient;
- private ClientDiagnostics _standbyContainerGroupPoolClientDiagnostics;
- private StandbyContainerGroupPoolsRestOperations _standbyContainerGroupPoolRestClient;
+ private ClientDiagnostics _standbyVirtualMachinePoolsClientDiagnostics;
+ private StandbyVirtualMachinePools _standbyVirtualMachinePoolsRestClient;
+ private ClientDiagnostics _standbyContainerGroupPoolsClientDiagnostics;
+ private StandbyContainerGroupPools _standbyContainerGroupPoolsRestClient;
- /// Initializes a new instance of the class for mocking.
+ /// Initializes a new instance of MockableStandbyPoolSubscriptionResource for mocking.
protected MockableStandbyPoolSubscriptionResource()
{
}
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of class.
/// The client parameters to use in these operations.
/// The identifier of the resource that is the target of operations.
internal MockableStandbyPoolSubscriptionResource(ArmClient client, ResourceIdentifier id) : base(client, id)
{
}
- private ClientDiagnostics StandbyVirtualMachinePoolClientDiagnostics => _standbyVirtualMachinePoolClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.StandbyPool", StandbyVirtualMachinePoolResource.ResourceType.Namespace, Diagnostics);
- private StandbyVirtualMachinePoolsRestOperations StandbyVirtualMachinePoolRestClient => _standbyVirtualMachinePoolRestClient ??= new StandbyVirtualMachinePoolsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(StandbyVirtualMachinePoolResource.ResourceType));
- private ClientDiagnostics StandbyContainerGroupPoolClientDiagnostics => _standbyContainerGroupPoolClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.StandbyPool", StandbyContainerGroupPoolResource.ResourceType.Namespace, Diagnostics);
- private StandbyContainerGroupPoolsRestOperations StandbyContainerGroupPoolRestClient => _standbyContainerGroupPoolRestClient ??= new StandbyContainerGroupPoolsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(StandbyContainerGroupPoolResource.ResourceType));
+ private ClientDiagnostics StandbyVirtualMachinePoolsClientDiagnostics => _standbyVirtualMachinePoolsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.StandbyPool.Mocking", ProviderConstants.DefaultProviderNamespace, Diagnostics);
- private string GetApiVersionOrNull(ResourceType resourceType)
- {
- TryGetApiVersion(resourceType, out string apiVersion);
- return apiVersion;
- }
+ private StandbyVirtualMachinePools StandbyVirtualMachinePoolsRestClient => _standbyVirtualMachinePoolsRestClient ??= new StandbyVirtualMachinePools(StandbyVirtualMachinePoolsClientDiagnostics, Pipeline, Endpoint, "2025-10-01");
+
+ private ClientDiagnostics StandbyContainerGroupPoolsClientDiagnostics => _standbyContainerGroupPoolsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.StandbyPool.Mocking", ProviderConstants.DefaultProviderNamespace, Diagnostics);
+
+ private StandbyContainerGroupPools StandbyContainerGroupPoolsRestClient => _standbyContainerGroupPoolsRestClient ??= new StandbyContainerGroupPools(StandbyContainerGroupPoolsClientDiagnostics, Pipeline, Endpoint, "2025-10-01");
///
/// List StandbyVirtualMachinePoolResource resources by subscription ID
///
///
- /// Request Path
- /// /subscriptions/{subscriptionId}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools.
///
///
- /// Operation Id
- /// StandbyVirtualMachinePoolResource_ListBySubscription
+ /// Operation Id.
+ /// StandbyVirtualMachinePools_ListBySubscription.
///
///
- /// Default Api Version
- /// 2025-03-01
- ///
- ///
- /// Resource
- ///
+ /// Default Api Version.
+ /// 2025-10-01.
///
///
///
/// The cancellation token to use.
- /// An async collection of that may take multiple service requests to iterate over.
+ /// A collection of that may take multiple service requests to iterate over.
public virtual AsyncPageable GetStandbyVirtualMachinePoolsAsync(CancellationToken cancellationToken = default)
{
- HttpMessage FirstPageRequest(int? pageSizeHint) => StandbyVirtualMachinePoolRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId);
- HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => StandbyVirtualMachinePoolRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId);
- return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new StandbyVirtualMachinePoolResource(Client, StandbyVirtualMachinePoolData.DeserializeStandbyVirtualMachinePoolData(e)), StandbyVirtualMachinePoolClientDiagnostics, Pipeline, "MockableStandbyPoolSubscriptionResource.GetStandbyVirtualMachinePools", "value", "nextLink", cancellationToken);
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ return new AsyncPageableWrapper(new StandbyVirtualMachinePoolsGetBySubscriptionAsyncCollectionResultOfT(StandbyVirtualMachinePoolsRestClient, Guid.Parse(Id.SubscriptionId), context), data => new StandbyVirtualMachinePoolResource(Client, data));
}
///
/// List StandbyVirtualMachinePoolResource resources by subscription ID
///
///
- /// Request Path
- /// /subscriptions/{subscriptionId}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools.
///
///
- /// Operation Id
- /// StandbyVirtualMachinePoolResource_ListBySubscription
+ /// Operation Id.
+ /// StandbyVirtualMachinePools_ListBySubscription.
///
///
- /// Default Api Version
- /// 2025-03-01
- ///
- ///
- /// Resource
- ///
+ /// Default Api Version.
+ /// 2025-10-01.
///
///
///
@@ -98,59 +93,55 @@ public virtual AsyncPageable GetStandbyVirtua
/// A collection of that may take multiple service requests to iterate over.
public virtual Pageable GetStandbyVirtualMachinePools(CancellationToken cancellationToken = default)
{
- HttpMessage FirstPageRequest(int? pageSizeHint) => StandbyVirtualMachinePoolRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId);
- HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => StandbyVirtualMachinePoolRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId);
- return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new StandbyVirtualMachinePoolResource(Client, StandbyVirtualMachinePoolData.DeserializeStandbyVirtualMachinePoolData(e)), StandbyVirtualMachinePoolClientDiagnostics, Pipeline, "MockableStandbyPoolSubscriptionResource.GetStandbyVirtualMachinePools", "value", "nextLink", cancellationToken);
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ return new PageableWrapper(new StandbyVirtualMachinePoolsGetBySubscriptionCollectionResultOfT(StandbyVirtualMachinePoolsRestClient, Guid.Parse(Id.SubscriptionId), context), data => new StandbyVirtualMachinePoolResource(Client, data));
}
///
/// List StandbyContainerGroupPoolResource resources by subscription ID
///
///
- /// Request Path
- /// /subscriptions/{subscriptionId}/providers/Microsoft.StandbyPool/standbyContainerGroupPools
- ///
- ///
- /// Operation Id
- /// StandbyContainerGroupPoolResource_ListBySubscription
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.StandbyPool/standbyContainerGroupPools.
///
///
- /// Default Api Version
- /// 2025-03-01
+ /// Operation Id.
+ /// StandbyContainerGroupPools_ListBySubscription.
///
///
- /// Resource
- ///
+ /// Default Api Version.
+ /// 2025-10-01.
///
///
///
/// The cancellation token to use.
- /// An async collection of that may take multiple service requests to iterate over.
+ /// A collection of that may take multiple service requests to iterate over.
public virtual AsyncPageable GetStandbyContainerGroupPoolsAsync(CancellationToken cancellationToken = default)
{
- HttpMessage FirstPageRequest(int? pageSizeHint) => StandbyContainerGroupPoolRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId);
- HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => StandbyContainerGroupPoolRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId);
- return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new StandbyContainerGroupPoolResource(Client, StandbyContainerGroupPoolData.DeserializeStandbyContainerGroupPoolData(e)), StandbyContainerGroupPoolClientDiagnostics, Pipeline, "MockableStandbyPoolSubscriptionResource.GetStandbyContainerGroupPools", "value", "nextLink", cancellationToken);
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ return new AsyncPageableWrapper(new StandbyContainerGroupPoolsGetBySubscriptionAsyncCollectionResultOfT(StandbyContainerGroupPoolsRestClient, Guid.Parse(Id.SubscriptionId), context), data => new StandbyContainerGroupPoolResource(Client, data));
}
///
/// List StandbyContainerGroupPoolResource resources by subscription ID
///
///
- /// Request Path
- /// /subscriptions/{subscriptionId}/providers/Microsoft.StandbyPool/standbyContainerGroupPools
- ///
- ///
- /// Operation Id
- /// StandbyContainerGroupPoolResource_ListBySubscription
+ /// Request Path.
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.StandbyPool/standbyContainerGroupPools.
///
///
- /// Default Api Version
- /// 2025-03-01
+ /// Operation Id.
+ /// StandbyContainerGroupPools_ListBySubscription.
///
///
- /// Resource
- ///
+ /// Default Api Version.
+ /// 2025-10-01.
///
///
///
@@ -158,9 +149,11 @@ public virtual AsyncPageable GetStandbyContai
/// A collection of that may take multiple service requests to iterate over.
public virtual Pageable GetStandbyContainerGroupPools(CancellationToken cancellationToken = default)
{
- HttpMessage FirstPageRequest(int? pageSizeHint) => StandbyContainerGroupPoolRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId);
- HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => StandbyContainerGroupPoolRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId);
- return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new StandbyContainerGroupPoolResource(Client, StandbyContainerGroupPoolData.DeserializeStandbyContainerGroupPoolData(e)), StandbyContainerGroupPoolClientDiagnostics, Pipeline, "MockableStandbyPoolSubscriptionResource.GetStandbyContainerGroupPools", "value", "nextLink", cancellationToken);
+ RequestContext context = new RequestContext
+ {
+ CancellationToken = cancellationToken
+ };
+ return new PageableWrapper(new StandbyContainerGroupPoolsGetBySubscriptionCollectionResultOfT(StandbyContainerGroupPoolsRestClient, Guid.Parse(Id.SubscriptionId), context), data => new StandbyContainerGroupPoolResource(Client, data));
}
}
}
diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/Extensions/StandbyPoolExtensions.cs b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/Extensions/StandbyPoolExtensions.cs
index 008b35543a53..f0dfa77d44fd 100644
--- a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/Extensions/StandbyPoolExtensions.cs
+++ b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/Extensions/StandbyPoolExtensions.cs
@@ -8,7 +8,9 @@
using System;
using System.Threading;
using System.Threading.Tasks;
+using Azure;
using Azure.Core;
+using Azure.ResourceManager;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.StandbyPool.Mocking;
@@ -17,30 +19,32 @@ namespace Azure.ResourceManager.StandbyPool
/// A class to add extension methods to Azure.ResourceManager.StandbyPool.
public static partial class StandbyPoolExtensions
{
+ ///
private static MockableStandbyPoolArmClient GetMockableStandbyPoolArmClient(ArmClient client)
{
- return client.GetCachedClient(client0 => new MockableStandbyPoolArmClient(client0));
+ return client.GetCachedClient(client0 => new MockableStandbyPoolArmClient(client0, ResourceIdentifier.Root));
}
- private static MockableStandbyPoolResourceGroupResource GetMockableStandbyPoolResourceGroupResource(ArmResource resource)
+ ///
+ private static MockableStandbyPoolResourceGroupResource GetMockableStandbyPoolResourceGroupResource(ResourceGroupResource resourceGroupResource)
{
- return resource.GetCachedClient(client => new MockableStandbyPoolResourceGroupResource(client, resource.Id));
+ return resourceGroupResource.GetCachedClient(client => new MockableStandbyPoolResourceGroupResource(client, resourceGroupResource.Id));
}
- private static MockableStandbyPoolSubscriptionResource GetMockableStandbyPoolSubscriptionResource(ArmResource resource)
+ ///
+ private static MockableStandbyPoolSubscriptionResource GetMockableStandbyPoolSubscriptionResource(SubscriptionResource subscriptionResource)
{
- return resource.GetCachedClient(client => new MockableStandbyPoolSubscriptionResource(client, resource.Id));
+ return subscriptionResource.GetCachedClient(client => new MockableStandbyPoolSubscriptionResource(client, subscriptionResource.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.
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
///
- /// Mocking
- /// To mock this method, please mock instead.
+ /// Mocking.
+ /// To mock this method, please mock instead.
///
///
- /// The instance the method will execute against.
+ /// The the method will execute against.
/// The resource ID of the resource to get.
/// is null.
/// Returns a object.
@@ -52,14 +56,13 @@ public static StandbyVirtualMachinePoolResource GetStandbyVirtualMachinePoolReso
}
///
- /// 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.
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
///
- /// Mocking
- /// To mock this method, please mock instead.
+ /// Mocking.
+ /// To mock this method, please mock instead.
///
///
- /// The instance the method will execute against.
+ /// The the method will execute against.
/// The resource ID of the resource to get.
/// is null.
/// Returns a object.
@@ -71,14 +74,13 @@ public static StandbyVirtualMachineResource GetStandbyVirtualMachineResource(thi
}
///
- /// 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.
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
///
- /// Mocking
- /// To mock this method, please mock instead.
+ /// Mocking.
+ /// To mock this method, please mock instead.
///
///
- /// The instance the method will execute against.
+ /// The the method will execute against.
/// The resource ID of the resource to get.
/// is null.
/// Returns a object.
@@ -90,14 +92,13 @@ public static StandbyVirtualMachinePoolRuntimeViewResource GetStandbyVirtualMach
}
///
- /// 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.
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
///
- /// Mocking
- /// To mock this method, please mock instead.
+ /// Mocking.
+ /// To mock this method, please mock instead.
///
///
- /// The instance the method will execute against.
+ /// The the method will execute against.
/// The resource ID of the resource to get.
/// is null.
/// Returns a object.
@@ -109,14 +110,13 @@ public static StandbyContainerGroupPoolResource GetStandbyContainerGroupPoolReso
}
///
- /// 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.
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
///
- /// Mocking
- /// To mock this method, please mock instead.
+ /// Mocking.
+ /// To mock this method, please mock instead.
///
///
- /// The instance the method will execute against.
+ /// The the method will execute against.
/// The resource ID of the resource to get.
/// is null.
/// Returns a object.
@@ -128,15 +128,15 @@ public static StandbyContainerGroupPoolRuntimeViewResource GetStandbyContainerGr
}
///
- /// Gets a collection of StandbyVirtualMachinePoolResources in the ResourceGroupResource.
+ /// Gets a collection of StandbyVirtualMachinePools in the
///
- /// Mocking
- /// To mock this method, please mock instead.
+ /// Mocking.
+ /// To mock this method, please mock instead.
///
///
- /// The instance the method will execute against.
+ /// The the method will execute against.
/// is null.
- /// An object representing collection of StandbyVirtualMachinePoolResources and their operations over a StandbyVirtualMachinePoolResource.
+ /// An object representing collection of StandbyVirtualMachinePools and their operations over a StandbyVirtualMachinePoolResource.
public static StandbyVirtualMachinePoolCollection GetStandbyVirtualMachinePools(this ResourceGroupResource resourceGroupResource)
{
Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource));
@@ -146,34 +146,15 @@ public static StandbyVirtualMachinePoolCollection GetStandbyVirtualMachinePools(
///
/// Get a StandbyVirtualMachinePoolResource
- ///
///
- /// Request Path
- /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}
- ///
- ///
- /// Operation Id
- /// StandbyVirtualMachinePoolResource_Get
- ///
- ///
- /// Default Api Version
- /// 2025-03-01
- ///
- ///
- /// Resource
- ///
- ///
- ///
- ///
- /// Mocking
- /// To mock this method, please mock instead.
+ /// Mocking.
+ /// To mock this method, please mock instead.
///
///
- /// The instance the method will execute against.
+ /// The the method will execute against.
/// Name of the standby virtual machine pool.
/// The cancellation token to use.
- /// or is null.
- /// is an empty string, and was expected to be non-empty.
+ /// is null.
[ForwardsClientCalls]
public static async Task> GetStandbyVirtualMachinePoolAsync(this ResourceGroupResource resourceGroupResource, string standbyVirtualMachinePoolName, CancellationToken cancellationToken = default)
{
@@ -184,34 +165,15 @@ public static async Task> GetStandby
///
/// Get a StandbyVirtualMachinePoolResource
- ///
///
- /// Request Path
- /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}
- ///
- ///
- /// Operation Id
- /// StandbyVirtualMachinePoolResource_Get
- ///
- ///
- /// Default Api Version
- /// 2025-03-01
- ///
- ///
- /// Resource
- ///
- ///
- ///
- ///
- /// Mocking
- /// To mock this method, please mock instead.
+ /// Mocking.
+ /// To mock this method, please mock instead.
///
///
- /// The instance the method will execute against.
+ /// The the method will execute against.
/// Name of the standby virtual machine pool.
/// The cancellation token to use.
- /// or is null.
- /// is an empty string, and was expected to be non-empty.
+ /// is null.
[ForwardsClientCalls]
public static Response GetStandbyVirtualMachinePool(this ResourceGroupResource resourceGroupResource, string standbyVirtualMachinePoolName, CancellationToken cancellationToken = default)
{
@@ -221,15 +183,15 @@ public static Response GetStandbyVirtualMachi
}
///
- /// Gets a collection of StandbyContainerGroupPoolResources in the ResourceGroupResource.
+ /// Gets a collection of StandbyContainerGroupPools in the
///
- /// Mocking
- /// To mock this method, please mock instead.
+ /// Mocking.
+ /// To mock this method, please mock instead.
///
///
- /// The instance the method will execute against.
+ /// The the method will execute against.
/// is null.
- /// An object representing collection of StandbyContainerGroupPoolResources and their operations over a StandbyContainerGroupPoolResource.
+ /// An object representing collection of StandbyContainerGroupPools and their operations over a StandbyContainerGroupPoolResource.
public static StandbyContainerGroupPoolCollection GetStandbyContainerGroupPools(this ResourceGroupResource resourceGroupResource)
{
Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource));
@@ -239,34 +201,15 @@ public static StandbyContainerGroupPoolCollection GetStandbyContainerGroupPools(
///
/// Get a StandbyContainerGroupPoolResource
- ///
///
- /// Request Path
- /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}
- ///
- ///
- /// Operation Id
- /// StandbyContainerGroupPoolResource_Get
- ///
- ///
- /// Default Api Version
- /// 2025-03-01
- ///
- ///
- /// Resource
- ///
- ///
- ///
- ///
- /// Mocking
- /// To mock this method, please mock instead.
+ /// Mocking.
+ /// To mock this method, please mock instead.
///
///
- /// The instance the method will execute against.
+ /// The the method will execute against.
/// Name of the standby container group pool.
/// The cancellation token to use.
- /// or is null.
- /// is an empty string, and was expected to be non-empty.
+ /// is null.
[ForwardsClientCalls]
public static async Task> GetStandbyContainerGroupPoolAsync(this ResourceGroupResource resourceGroupResource, string standbyContainerGroupPoolName, CancellationToken cancellationToken = default)
{
@@ -277,34 +220,15 @@ public static async Task> GetStandby
///
/// Get a StandbyContainerGroupPoolResource
- ///
- ///
- /// Request Path
- /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}
- ///
- ///
- /// Operation Id
- /// StandbyContainerGroupPoolResource_Get
- ///
- ///
- /// Default Api Version
- /// 2025-03-01
- ///
- ///
- /// Resource
- ///
- ///
- ///
///
- /// Mocking
- /// To mock this method, please mock instead.
+ /// Mocking.
+ /// To mock this method, please mock instead.
///
///
- /// The instance the method will execute against.
+ /// The the method will execute against.
/// Name of the standby container group pool.
/// The cancellation token to use.
- /// or is null.
- /// is an empty string, and was expected to be non-empty.
+ /// is null.
[ForwardsClientCalls]
public static Response GetStandbyContainerGroupPool(this ResourceGroupResource resourceGroupResource, string standbyContainerGroupPoolName, CancellationToken cancellationToken = default)
{
@@ -315,33 +239,15 @@ public static Response GetStandbyContainerGro
///
/// List StandbyVirtualMachinePoolResource resources by subscription ID
- ///
- ///
- /// Request Path
- /// /subscriptions/{subscriptionId}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools
- ///
- ///
- /// Operation Id
- /// StandbyVirtualMachinePoolResource_ListBySubscription
- ///
- ///
- /// Default Api Version
- /// 2025-03-01
- ///
- ///
- /// Resource
- ///
- ///
- ///
///
- /// Mocking
- /// To mock this method, please mock instead.
+ /// Mocking.
+ /// To mock this method, please mock instead.
///
///
- /// The instance the method will execute against.
+ /// The 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.
+ /// A collection of that may take multiple service requests to iterate over.
public static AsyncPageable GetStandbyVirtualMachinePoolsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource));
@@ -351,30 +257,12 @@ public static AsyncPageable GetStandbyVirtual
///
/// List StandbyVirtualMachinePoolResource resources by subscription ID
- ///
- ///
- /// Request Path
- /// /subscriptions/{subscriptionId}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools
- ///
- ///
- /// Operation Id
- /// StandbyVirtualMachinePoolResource_ListBySubscription
- ///
- ///
- /// Default Api Version
- /// 2025-03-01
- ///
- ///
- /// Resource
- ///
- ///
- ///
///
- /// Mocking
- /// To mock this method, please mock instead.
+ /// Mocking.
+ /// To mock this method, please mock instead.
///
///
- /// The instance the method will execute against.
+ /// The the method will execute against.
/// The cancellation token to use.
/// is null.
/// A collection of that may take multiple service requests to iterate over.
@@ -387,33 +275,15 @@ public static Pageable GetStandbyVirtualMachi
///
/// List StandbyContainerGroupPoolResource resources by subscription ID
- ///
///
- /// Request Path
- /// /subscriptions/{subscriptionId}/providers/Microsoft.StandbyPool/standbyContainerGroupPools
- ///
- ///
- /// Operation Id
- /// StandbyContainerGroupPoolResource_ListBySubscription
- ///
- ///
- /// Default Api Version
- /// 2025-03-01
- ///
- ///
- /// Resource
- ///
- ///
- ///
- ///
- /// Mocking
- /// To mock this method, please mock instead.
+ /// Mocking.
+ /// To mock this method, please mock instead.
///
///
- /// The instance the method will execute against.
+ /// The 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.
+ /// A collection of that may take multiple service requests to iterate over.
public static AsyncPageable GetStandbyContainerGroupPoolsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource));
@@ -423,30 +293,12 @@ public static AsyncPageable GetStandbyContain
///
/// List StandbyContainerGroupPoolResource resources by subscription ID
- ///
- ///
- /// Request Path
- /// /subscriptions/{subscriptionId}/providers/Microsoft.StandbyPool/standbyContainerGroupPools
- ///
- ///
- /// Operation Id
- /// StandbyContainerGroupPoolResource_ListBySubscription
- ///
- ///
- /// Default Api Version
- /// 2025-03-01
- ///
- ///
- /// Resource
- ///
- ///
- ///
///
- /// Mocking
- /// To mock this method, please mock instead.
+ /// Mocking.
+ /// To mock this method, please mock instead.
///
///
- /// The instance the method will execute against.
+ /// The the method will execute against.
/// The cancellation token to use.
/// is null.
/// A collection of that may take multiple service requests to iterate over.
diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/Internal/Argument.cs b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/Internal/Argument.cs
index efb254a4c6ec..5bcc83e94ecd 100644
--- a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/Internal/Argument.cs
+++ b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/Internal/Argument.cs
@@ -11,8 +11,10 @@
namespace Azure.ResourceManager.StandbyPool
{
- internal static class Argument
+ internal static partial class Argument
{
+ /// The value.
+ /// The name.
public static void AssertNotNull(T value, string name)
{
if (value is null)
@@ -21,8 +23,10 @@ public static void AssertNotNull(T value, string name)
}
}
+ /// The value.
+ /// The name.
public static void AssertNotNull(T? value, string name)
- where T : struct
+ where T : struct
{
if (!value.HasValue)
{
@@ -30,6 +34,8 @@ public static void AssertNotNull(T? value, string name)
}
}
+ /// The value.
+ /// The name.
public static void AssertNotNullOrEmpty(IEnumerable value, string name)
{
if (value is null)
@@ -51,6 +57,8 @@ public static void AssertNotNullOrEmpty(IEnumerable value, string name)
}
}
+ /// The value.
+ /// The name.
public static void AssertNotNullOrEmpty(string value, string name)
{
if (value is null)
@@ -62,68 +70,5 @@ public static void AssertNotNullOrEmpty(string value, string name)
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/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/Internal/AsyncPageableWrapper.cs b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/Internal/AsyncPageableWrapper.cs
new file mode 100644
index 000000000000..a76ca9860e49
--- /dev/null
+++ b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/Internal/AsyncPageableWrapper.cs
@@ -0,0 +1,48 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using Azure;
+
+namespace Azure.ResourceManager.StandbyPool
+{
+ internal partial class AsyncPageableWrapper : AsyncPageable
+ {
+ /// The source async pageable value of type AsyncPageable<T>.
+ private AsyncPageable _source;
+ /// The converter function from T to U.
+ private Func _converter;
+
+ /// Initializes a new instance of the AsyncPageableWrapper class.
+ /// The source async pageable value of type AsyncPageable<T>.
+ /// The converter function from T to U.
+ public AsyncPageableWrapper(AsyncPageable source, Func converter)
+ {
+ _source = source;
+ _converter = converter;
+ }
+
+ /// Converts the pages from AsyncPageable to Page.
+ /// A continuation token from a previous response.
+ /// An optional hint to specify the desired size of each page.
+ /// An enumerable of pages containing converted items of type U.
+ public override async IAsyncEnumerable> AsPages(string continuationToken, int? pageSizeHint)
+ {
+ await foreach (Page page in _source.AsPages(continuationToken, pageSizeHint).ConfigureAwait(false))
+ {
+ List convertedItems = new List();
+ foreach (T item in page.Values)
+ {
+ convertedItems.Add(_converter.Invoke(item));
+ }
+ yield return Page.FromValues(convertedItems, page.ContinuationToken, page.GetRawResponse());
+ }
+ }
+ }
+}
diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/Internal/ChangeTrackingDictionary.cs b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/Internal/ChangeTrackingDictionary.cs
index 418045a3497b..6d7e940c391d 100644
--- a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/Internal/ChangeTrackingDictionary.cs
+++ b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/Internal/ChangeTrackingDictionary.cs
@@ -11,7 +11,8 @@
namespace Azure.ResourceManager.StandbyPool
{
- internal class ChangeTrackingDictionary : IDictionary, IReadOnlyDictionary where TKey : notnull
+ internal partial class ChangeTrackingDictionary : IDictionary, IReadOnlyDictionary
+ where TKey : notnull
{
private IDictionary _innerDictionary;
@@ -19,6 +20,7 @@ public ChangeTrackingDictionary()
{
}
+ /// The inner dictionary.
public ChangeTrackingDictionary(IDictionary dictionary)
{
if (dictionary == null)
@@ -28,6 +30,7 @@ public ChangeTrackingDictionary(IDictionary dictionary)
_innerDictionary = new Dictionary(dictionary);
}
+ /// The inner dictionary.
public ChangeTrackingDictionary(IReadOnlyDictionary dictionary)
{
if (dictionary == null)
@@ -41,16 +44,22 @@ public ChangeTrackingDictionary(IReadOnlyDictionary dictionary)
}
}
+ /// Gets the IsUndefined.
public bool IsUndefined => _innerDictionary == null;
+ /// Gets the Count.
public int Count => IsUndefined ? 0 : EnsureDictionary().Count;
+ /// Gets the IsReadOnly.
public bool IsReadOnly => IsUndefined ? false : EnsureDictionary().IsReadOnly;
+ /// Gets the Keys.
public ICollection Keys => IsUndefined ? Array.Empty() : EnsureDictionary().Keys;
+ /// Gets the Values.
public ICollection Values => IsUndefined ? Array.Empty() : EnsureDictionary().Values;
+ /// Gets or sets the value associated with the specified key.
public TValue this[TKey key]
{
get
@@ -67,8 +76,10 @@ public TValue this[TKey key]
}
}
+ /// Gets the Keys.
IEnumerable IReadOnlyDictionary.Keys => Keys;
+ /// Gets the Values.
IEnumerable IReadOnlyDictionary.Values => Values;
public IEnumerator> GetEnumerator()
@@ -89,6 +100,7 @@ IEnumerator IEnumerable.GetEnumerator()
return GetEnumerator();
}
+ /// The item to add.
public void Add(KeyValuePair item)
{
EnsureDictionary().Add(item);
@@ -99,6 +111,7 @@ public void Clear()
EnsureDictionary().Clear();
}
+ /// The item to search for.
public bool Contains(KeyValuePair item)
{
if (IsUndefined)
@@ -108,6 +121,8 @@ public bool Contains(KeyValuePair item)
return EnsureDictionary().Contains(item);
}
+ /// The array to copy.
+ /// The index.
public void CopyTo(KeyValuePair[] array, int index)
{
if (IsUndefined)
@@ -117,6 +132,7 @@ public void CopyTo(KeyValuePair[] array, int index)
EnsureDictionary().CopyTo(array, index);
}
+ /// The item to remove.
public bool Remove(KeyValuePair item)
{
if (IsUndefined)
@@ -126,11 +142,14 @@ public bool Remove(KeyValuePair item)
return EnsureDictionary().Remove(item);
}
+ /// The key.
+ /// The value to add.
public void Add(TKey key, TValue value)
{
EnsureDictionary().Add(key, value);
}
+ /// The key to search for.
public bool ContainsKey(TKey key)
{
if (IsUndefined)
@@ -140,6 +159,7 @@ public bool ContainsKey(TKey key)
return EnsureDictionary().ContainsKey(key);
}
+ /// The key.
public bool Remove(TKey key)
{
if (IsUndefined)
@@ -149,6 +169,8 @@ public bool Remove(TKey key)
return EnsureDictionary().Remove(key);
}
+ /// The key to search for.
+ /// The value.
public bool TryGetValue(TKey key, out TValue value)
{
if (IsUndefined)
diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/Internal/ChangeTrackingList.cs b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/Internal/ChangeTrackingList.cs
index 87f5512f61e5..eb59f8dc2ecb 100644
--- a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/Internal/ChangeTrackingList.cs
+++ b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/Internal/ChangeTrackingList.cs
@@ -12,7 +12,7 @@
namespace Azure.ResourceManager.StandbyPool
{
- internal class ChangeTrackingList : IList, IReadOnlyList
+ internal partial class ChangeTrackingList : IList, IReadOnlyList
{
private IList _innerList;
@@ -20,6 +20,7 @@ public ChangeTrackingList()
{
}
+ /// The inner list.
public ChangeTrackingList(IList innerList)
{
if (innerList != null)
@@ -28,6 +29,7 @@ public ChangeTrackingList(IList innerList)
}
}
+ /// The inner list.
public ChangeTrackingList(IReadOnlyList innerList)
{
if (innerList != null)
@@ -36,12 +38,16 @@ public ChangeTrackingList(IReadOnlyList innerList)
}
}
+ /// Gets the IsUndefined.
public bool IsUndefined => _innerList == null;
+ /// Gets the Count.
public int Count => IsUndefined ? 0 : EnsureList().Count;
+ /// Gets the IsReadOnly.
public bool IsReadOnly => IsUndefined ? false : EnsureList().IsReadOnly;
+ /// Gets or sets the value associated with the specified key.
public T this[int index]
{
get
@@ -85,6 +91,7 @@ IEnumerator IEnumerable.GetEnumerator()
return GetEnumerator();
}
+ /// The item to add.
public void Add(T item)
{
EnsureList().Add(item);
@@ -95,6 +102,7 @@ public void Clear()
EnsureList().Clear();
}
+ /// The item.
public bool Contains(T item)
{
if (IsUndefined)
@@ -104,6 +112,8 @@ public bool Contains(T item)
return EnsureList().Contains(item);
}
+ /// The array to copy to.
+ /// The array index.
public void CopyTo(T[] array, int arrayIndex)
{
if (IsUndefined)
@@ -113,6 +123,7 @@ public void CopyTo(T[] array, int arrayIndex)
EnsureList().CopyTo(array, arrayIndex);
}
+ /// The item.
public bool Remove(T item)
{
if (IsUndefined)
@@ -122,6 +133,7 @@ public bool Remove(T item)
return EnsureList().Remove(item);
}
+ /// The item.
public int IndexOf(T item)
{
if (IsUndefined)
@@ -131,11 +143,14 @@ public int IndexOf(T item)
return EnsureList().IndexOf(item);
}
+ /// The inner list.
+ /// The item.
public void Insert(int index, T item)
{
EnsureList().Insert(index, item);
}
+ /// The inner list.
public void RemoveAt(int index)
{
if (IsUndefined)
diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/Internal/ClientPipelineExtensions.cs b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/Internal/ClientPipelineExtensions.cs
new file mode 100644
index 000000000000..bec81786dff5
--- /dev/null
+++ b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/Internal/ClientPipelineExtensions.cs
@@ -0,0 +1,72 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Threading;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+
+namespace Azure.ResourceManager.StandbyPool
+{
+ internal static partial class ClientPipelineExtensions
+ {
+ public static async ValueTask ProcessMessageAsync(this HttpPipeline pipeline, HttpMessage message, RequestContext context)
+ {
+ (CancellationToken userCancellationToken, ErrorOptions statusOption) = context.Parse();
+ await pipeline.SendAsync(message, userCancellationToken).ConfigureAwait(false);
+
+ if (message.Response.IsError && (context?.ErrorOptions & ErrorOptions.NoThrow) != ErrorOptions.NoThrow)
+ {
+ throw new RequestFailedException(message.Response);
+ }
+
+ return message.Response;
+ }
+
+ public static Response ProcessMessage(this HttpPipeline pipeline, HttpMessage message, RequestContext context)
+ {
+ (CancellationToken userCancellationToken, ErrorOptions statusOption) = context.Parse();
+ pipeline.Send(message, userCancellationToken);
+
+ if (message.Response.IsError && (context?.ErrorOptions & ErrorOptions.NoThrow) != ErrorOptions.NoThrow)
+ {
+ throw new RequestFailedException(message.Response);
+ }
+
+ return message.Response;
+ }
+
+ public static async ValueTask> ProcessHeadAsBoolMessageAsync(this HttpPipeline pipeline, HttpMessage message, RequestContext context)
+ {
+ Response response = await pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false);
+ switch (response.Status)
+ {
+ case >= 200 and < 300:
+ return Response.FromValue(true, response);
+ case >= 400 and < 500:
+ return Response.FromValue(false, response);
+ default:
+ return new ErrorResult(response, new RequestFailedException(response));
+ }
+ }
+
+ public static Response ProcessHeadAsBoolMessage(this HttpPipeline pipeline, HttpMessage message, RequestContext context)
+ {
+ Response response = pipeline.ProcessMessage(message, context);
+ switch (response.Status)
+ {
+ case >= 200 and < 300:
+ return Response.FromValue(true, response);
+ case >= 400 and < 500:
+ return Response.FromValue(false, response);
+ default:
+ return new ErrorResult(response, new RequestFailedException(response));
+ }
+ }
+ }
+}
diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/Internal/CodeGenMemberAttribute.cs b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/Internal/CodeGenMemberAttribute.cs
new file mode 100644
index 000000000000..a5a29191cd05
--- /dev/null
+++ b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/Internal/CodeGenMemberAttribute.cs
@@ -0,0 +1,20 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+
+namespace Azure.ResourceManager.StandbyPool
+{
+ [AttributeUsage((AttributeTargets.Property | AttributeTargets.Field))]
+ internal partial class CodeGenMemberAttribute : CodeGenTypeAttribute
+ {
+ /// The original name of the member.
+ public CodeGenMemberAttribute(string originalName) : base(originalName)
+ {
+ }
+ }
+}
diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/Internal/CodeGenSerializationAttribute.cs b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/Internal/CodeGenSerializationAttribute.cs
new file mode 100644
index 000000000000..ad7faa50bfe5
--- /dev/null
+++ b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/Internal/CodeGenSerializationAttribute.cs
@@ -0,0 +1,48 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+
+namespace Azure.ResourceManager.StandbyPool
+{
+ [AttributeUsage((AttributeTargets.Class | AttributeTargets.Struct), AllowMultiple = true, Inherited = true)]
+ internal partial class CodeGenSerializationAttribute : Attribute
+ {
+ /// The property name which these hooks apply to.
+ public CodeGenSerializationAttribute(string propertyName)
+ {
+ PropertyName = propertyName;
+ }
+
+ /// The property name which these hooks apply to.
+ /// The serialization name of the property.
+ public CodeGenSerializationAttribute(string propertyName, string serializationName)
+ {
+ PropertyName = propertyName;
+ SerializationName = serializationName;
+ }
+
+ /// Gets or sets the property name which these hooks should apply to.
+ public string PropertyName { get; }
+
+ /// Gets or sets the serialization name of the property.
+ public string SerializationName { get; set; }
+
+ ///
+ /// Gets or sets the method name to use when serializing the property value (property name excluded).
+ /// The signature of the serialization hook method must be or compatible with when invoking: private void SerializeHook(Utf8JsonWriter writer);
+ ///
+ public string SerializationValueHook { get; set; }
+
+ ///
+ /// Gets or sets the method name to use when deserializing the property value from the JSON.
+ /// private static void DeserializationHook(JsonProperty property, ref TypeOfTheProperty propertyValue); // if the property is required
+ /// private static void DeserializationHook(JsonProperty property, ref Optional<TypeOfTheProperty> propertyValue); // if the property is optional
+ ///
+ public string DeserializationValueHook { get; set; }
+ }
+}
diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/Internal/CodeGenSuppressAttribute.cs b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/Internal/CodeGenSuppressAttribute.cs
new file mode 100644
index 000000000000..769297c1e947
--- /dev/null
+++ b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/Internal/CodeGenSuppressAttribute.cs
@@ -0,0 +1,29 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+
+namespace Azure.ResourceManager.StandbyPool
+{
+ [AttributeUsage((AttributeTargets.Class | AttributeTargets.Enum | AttributeTargets.Struct), AllowMultiple = true)]
+ internal partial class CodeGenSuppressAttribute : Attribute
+ {
+ /// The member to suppress.
+ /// The types of the parameters of the member.
+ public CodeGenSuppressAttribute(string member, params Type[] parameters)
+ {
+ Member = member;
+ Parameters = parameters;
+ }
+
+ /// Gets the Member.
+ public string Member { get; }
+
+ /// Gets the Parameters.
+ public Type[] Parameters { get; }
+ }
+}
diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/Internal/CodeGenTypeAttribute.cs b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/Internal/CodeGenTypeAttribute.cs
new file mode 100644
index 000000000000..568525bb9c6b
--- /dev/null
+++ b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/Internal/CodeGenTypeAttribute.cs
@@ -0,0 +1,24 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+
+namespace Azure.ResourceManager.StandbyPool
+{
+ [AttributeUsage((AttributeTargets.Class | AttributeTargets.Enum | AttributeTargets.Struct))]
+ internal partial class CodeGenTypeAttribute : Attribute
+ {
+ /// The original name of the type.
+ public CodeGenTypeAttribute(string originalName)
+ {
+ OriginalName = originalName;
+ }
+
+ /// Gets the OriginalName.
+ public string OriginalName { get; }
+ }
+}
diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/Internal/ErrorResult.cs b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/Internal/ErrorResult.cs
new file mode 100644
index 000000000000..c2352eb24718
--- /dev/null
+++ b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/Internal/ErrorResult.cs
@@ -0,0 +1,32 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using Azure;
+
+namespace Azure.ResourceManager.StandbyPool
+{
+ internal partial class ErrorResult : Response
+ {
+ private readonly Response _response;
+ private readonly RequestFailedException _exception;
+
+ public ErrorResult(Response response, RequestFailedException exception)
+ {
+ _response = response;
+ _exception = exception;
+ }
+
+ /// Gets the Value.
+ public override T Value => throw _exception;
+
+ ///
+ public override Response GetRawResponse()
+ {
+ return _response;
+ }
+ }
+}
diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/Internal/ModelSerializationExtensions.cs b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/Internal/ModelSerializationExtensions.cs
index 0dbbb53529ed..7590f1892421 100644
--- a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/Internal/ModelSerializationExtensions.cs
+++ b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/Internal/ModelSerializationExtensions.cs
@@ -11,18 +11,16 @@
using System.Diagnostics;
using System.Globalization;
using System.Text.Json;
-using System.Xml;
-using Azure.Core;
namespace Azure.ResourceManager.StandbyPool
{
- internal static class ModelSerializationExtensions
+ internal static partial class ModelSerializationExtensions
{
- internal static readonly JsonDocumentOptions JsonDocumentOptions = new JsonDocumentOptions { MaxDepth = 256 };
internal static readonly ModelReaderWriterOptions WireOptions = new ModelReaderWriterOptions("W");
- internal static readonly ModelReaderWriterOptions WireV3Options = new ModelReaderWriterOptions("W|v3");
- internal static readonly ModelReaderWriterOptions JsonV3Options = new ModelReaderWriterOptions("J|v3");
- internal static readonly BinaryData SentinelValue = BinaryData.FromBytes("\"__EMPTY__\""u8.ToArray());
+ internal static readonly JsonDocumentOptions JsonDocumentOptions = new JsonDocumentOptions
+ {
+ MaxDepth = 256
+ };
public static object GetObject(this JsonElement element)
{
@@ -48,14 +46,14 @@ public static object GetObject(this JsonElement element)
case JsonValueKind.Null:
return null;
case JsonValueKind.Object:
- var dictionary = new Dictionary();
+ Dictionary 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