diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/CHANGELOG.md b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/CHANGELOG.md index 17a48e61da1a..61bb6ef98f78 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/CHANGELOG.md +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/CHANGELOG.md @@ -10,6 +10,8 @@ ### Other Changes +- Upgraded api-version from `2021-12-01` to `2024-02-01`. + ## 1.1.1 (2025-03-11) ### Features Added diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/api/Azure.ResourceManager.EdgeOrder.net8.0.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/api/Azure.ResourceManager.EdgeOrder.net8.0.cs index 3cf9d88e136f..fb3287b9718f 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/api/Azure.ResourceManager.EdgeOrder.net8.0.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/api/Azure.ResourceManager.EdgeOrder.net8.0.cs @@ -14,8 +14,12 @@ protected EdgeOrderAddressCollection() { } public virtual Azure.Response Exists(string addressName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string addressName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(string addressName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(string filter = null, string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(string filter = null, string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string filter = null, string skipToken = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual Azure.Pageable GetAll(string filter, string skipToken, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string filter = null, string skipToken = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual Azure.AsyncPageable GetAllAsync(string filter, string skipToken, System.Threading.CancellationToken cancellationToken) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(string addressName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.NullableResponse GetIfExists(string addressName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string addressName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -25,9 +29,12 @@ protected EdgeOrderAddressCollection() { } } public partial class EdgeOrderAddressData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + public EdgeOrderAddressData(Azure.Core.AzureLocation location) { } public EdgeOrderAddressData(Azure.Core.AzureLocation location, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressContactDetails contactDetails) { } + public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressClassification? AddressClassification { get { throw null; } set { } } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressValidationStatus? AddressValidationStatus { get { throw null; } } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressContactDetails ContactDetails { get { throw null; } set { } } + public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderShippingAddress ShippingAddress { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.EdgeOrderAddressData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -76,6 +83,7 @@ public partial class EdgeOrderData : Azure.ResourceManager.Models.ResourceData, public EdgeOrderData() { } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderStageDetails CurrentStage { get { throw null; } } public System.Collections.Generic.IReadOnlyList OrderItemIds { get { throw null; } } + public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemMode? OrderMode { get { throw null; } } public System.Collections.Generic.IReadOnlyList OrderStageHistory { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.EdgeOrderData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -92,7 +100,11 @@ public static partial class EdgeOrderExtensions public static Azure.Response GetEdgeOrderAddress(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string addressName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetEdgeOrderAddressAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string addressName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.EdgeOrder.EdgeOrderAddressCollection GetEdgeOrderAddresses(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetEdgeOrderAddresses(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string filter = null, string skipToken = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Pageable GetEdgeOrderAddresses(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string filter = null, string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetEdgeOrderAddressesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string filter = null, string skipToken = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.AsyncPageable GetEdgeOrderAddressesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string filter = null, string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.EdgeOrder.EdgeOrderAddressResource GetEdgeOrderAddressResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static System.Threading.Tasks.Task> GetEdgeOrderAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, Azure.Core.AzureLocation location, string orderName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -100,13 +112,25 @@ public static partial class EdgeOrderExtensions public static System.Threading.Tasks.Task> GetEdgeOrderItemAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string orderItemName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.EdgeOrder.EdgeOrderItemResource GetEdgeOrderItemResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.EdgeOrder.EdgeOrderItemCollection GetEdgeOrderItems(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetEdgeOrderItems(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string filter = null, string expand = null, string skipToken = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Pageable GetEdgeOrderItems(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string filter = null, string expand = null, string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetEdgeOrderItemsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string filter = null, string expand = null, string skipToken = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.AsyncPageable GetEdgeOrderItemsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string filter = null, string expand = null, string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.EdgeOrder.EdgeOrderResource GetEdgeOrderResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.EdgeOrder.EdgeOrderCollection GetEdgeOrders(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetEdgeOrders(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string skipToken = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Pageable GetEdgeOrders(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Pageable GetEdgeOrders(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string skipToken = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Pageable GetEdgeOrders(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetEdgeOrdersAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string skipToken = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.AsyncPageable GetEdgeOrdersAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetEdgeOrdersAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string skipToken = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.AsyncPageable GetEdgeOrdersAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Pageable GetProductFamilies(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.EdgeOrder.Models.ProductFamiliesContent content, string expand = null, string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetProductFamiliesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.EdgeOrder.Models.ProductFamiliesContent content, string expand = null, string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -121,8 +145,12 @@ protected EdgeOrderItemCollection() { } public virtual Azure.Response Exists(string orderItemName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string orderItemName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(string orderItemName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(string filter = null, string expand = null, string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(string filter = null, string expand = null, string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string filter = null, string expand = null, string skipToken = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual Azure.Pageable GetAll(string filter, string expand, string skipToken, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string filter = null, string expand = null, string skipToken = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual Azure.AsyncPageable GetAllAsync(string filter, string expand, string skipToken, System.Threading.CancellationToken cancellationToken) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(string orderItemName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.NullableResponse GetIfExists(string orderItemName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string orderItemName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -132,10 +160,13 @@ protected EdgeOrderItemCollection() { } } public partial class EdgeOrderItemData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + public EdgeOrderItemData(Azure.Core.AzureLocation location, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemDetails orderItemDetails, Azure.Core.ResourceIdentifier orderId) { } public EdgeOrderItemData(Azure.Core.AzureLocation location, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemDetails orderItemDetails, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemAddressDetails addressDetails, Azure.Core.ResourceIdentifier orderId) { } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemAddressDetails AddressDetails { get { throw null; } set { } } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.Core.ResourceIdentifier OrderId { get { throw null; } set { } } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemDetails OrderItemDetails { get { throw null; } set { } } + public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningState? ProvisioningState { get { throw null; } } public System.DateTimeOffset? StartOn { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.EdgeOrderItemData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -210,7 +241,11 @@ protected MockableEdgeOrderResourceGroupResource() { } public virtual System.Threading.Tasks.Task> GetEdgeOrderItemAsync(string orderItemName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.EdgeOrder.EdgeOrderItemCollection GetEdgeOrderItems() { throw null; } public virtual Azure.ResourceManager.EdgeOrder.EdgeOrderCollection GetEdgeOrders() { throw null; } + public virtual Azure.Pageable GetEdgeOrders(string skipToken = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.Pageable GetEdgeOrders(string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetEdgeOrdersAsync(string skipToken = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.AsyncPageable GetEdgeOrdersAsync(string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class MockableEdgeOrderSubscriptionResource : Azure.ResourceManager.ArmResource @@ -218,11 +253,23 @@ public partial class MockableEdgeOrderSubscriptionResource : Azure.ResourceManag protected MockableEdgeOrderSubscriptionResource() { } public virtual Azure.Pageable GetConfigurations(Azure.ResourceManager.EdgeOrder.Models.ConfigurationsContent content, string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetConfigurationsAsync(Azure.ResourceManager.EdgeOrder.Models.ConfigurationsContent content, string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetEdgeOrderAddresses(string filter = null, string skipToken = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.Pageable GetEdgeOrderAddresses(string filter = null, string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetEdgeOrderAddressesAsync(string filter = null, string skipToken = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.AsyncPageable GetEdgeOrderAddressesAsync(string filter = null, string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetEdgeOrderItems(string filter = null, string expand = null, string skipToken = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.Pageable GetEdgeOrderItems(string filter = null, string expand = null, string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetEdgeOrderItemsAsync(string filter = null, string expand = null, string skipToken = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.AsyncPageable GetEdgeOrderItemsAsync(string filter = null, string expand = null, string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetEdgeOrders(string skipToken = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.Pageable GetEdgeOrders(string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetEdgeOrdersAsync(string skipToken = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.AsyncPageable GetEdgeOrdersAsync(string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetProductFamilies(Azure.ResourceManager.EdgeOrder.Models.ProductFamiliesContent content, string expand = null, string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetProductFamiliesAsync(Azure.ResourceManager.EdgeOrder.Models.ProductFamiliesContent content, string expand = null, string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -234,42 +281,119 @@ namespace Azure.ResourceManager.EdgeOrder.Models { public static partial class ArmEdgeOrderModelFactory { - public static Azure.ResourceManager.EdgeOrder.Models.ConfigurationFilters ConfigurationFilters(Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation hierarchyInformation = null, System.Collections.Generic.IEnumerable filterableProperty = null) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.ChildConfigurationCategoryInformation ChildConfigurationCategoryInformation(string categoryName = null, string categoryDisplayName = null, string description = null, System.Collections.Generic.IEnumerable links = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.EdgeOrder.Models.ConfigurationFilters ConfigurationFilters(Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation hierarchyInformation, System.Collections.Generic.IEnumerable filterableProperty) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.ConfigurationFilters ConfigurationFilters(Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation hierarchyInformation = null, System.Collections.Generic.IEnumerable filterableProperty = null, Azure.ResourceManager.EdgeOrder.Models.ChildConfigurationFilter childConfigurationFilter = null) { throw null; } public static Azure.ResourceManager.EdgeOrder.Models.CustomerSubscriptionDetails CustomerSubscriptionDetails(System.Collections.Generic.IEnumerable registeredFeatures = null, string locationPlacementId = null, string quotaId = null) { throw null; } - public static Azure.ResourceManager.EdgeOrder.EdgeOrderAddressData EdgeOrderAddressData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.EdgeOrder.Models.EdgeOrderShippingAddress shippingAddress = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressContactDetails contactDetails = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressValidationStatus? addressValidationStatus = default(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressValidationStatus?)) { throw null; } - public static Azure.ResourceManager.EdgeOrder.EdgeOrderData EdgeOrderData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IEnumerable orderItemIds = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderStageDetails currentStage = null, System.Collections.Generic.IEnumerable orderStageHistory = null) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.DevicePresenceVerificationDetails DevicePresenceVerificationDetails(Azure.ResourceManager.EdgeOrder.Models.DevicePresenceVerificationStatus? status = default(Azure.ResourceManager.EdgeOrder.Models.DevicePresenceVerificationStatus?), string message = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.EdgeOrder.EdgeOrderAddressData EdgeOrderAddressData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderShippingAddress shippingAddress, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressContactDetails contactDetails, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressValidationStatus? addressValidationStatus) { throw null; } + public static Azure.ResourceManager.EdgeOrder.EdgeOrderAddressData EdgeOrderAddressData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressClassification? addressClassification = default(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressClassification?), Azure.ResourceManager.EdgeOrder.Models.EdgeOrderShippingAddress shippingAddress = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressContactDetails contactDetails = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressValidationStatus? addressValidationStatus = default(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressValidationStatus?), Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningState? provisioningState = default(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningState?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.EdgeOrder.EdgeOrderData EdgeOrderData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IEnumerable orderItemIds, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderStageDetails currentStage, System.Collections.Generic.IEnumerable orderStageHistory) { throw null; } + public static Azure.ResourceManager.EdgeOrder.EdgeOrderData EdgeOrderData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IEnumerable orderItemIds = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderStageDetails currentStage = null, System.Collections.Generic.IEnumerable orderStageHistory = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemMode? orderMode = default(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemMode?)) { throw null; } public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemAddressDetails EdgeOrderItemAddressDetails(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemAddressProperties forwardAddress = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemAddressProperties returnAddress = null) { throw null; } - public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemAddressProperties EdgeOrderItemAddressProperties(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderShippingAddress shippingAddress = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressContactDetails contactDetails = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressValidationStatus? addressValidationStatus = default(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressValidationStatus?)) { throw null; } - public static Azure.ResourceManager.EdgeOrder.EdgeOrderItemData EdgeOrderItemData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemDetails orderItemDetails = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemAddressDetails addressDetails = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), Azure.Core.ResourceIdentifier orderId = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemAddressProperties EdgeOrderItemAddressProperties(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderShippingAddress shippingAddress, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressContactDetails contactDetails, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressValidationStatus? addressValidationStatus) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemAddressProperties EdgeOrderItemAddressProperties(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressClassification? addressClassification = default(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressClassification?), Azure.ResourceManager.EdgeOrder.Models.EdgeOrderShippingAddress shippingAddress = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressContactDetails contactDetails = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressValidationStatus? addressValidationStatus = default(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressValidationStatus?), Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningState? provisioningState = default(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningState?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.EdgeOrder.EdgeOrderItemData EdgeOrderItemData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemDetails orderItemDetails, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemAddressDetails addressDetails, System.DateTimeOffset? startOn, Azure.Core.ResourceIdentifier orderId) { throw null; } + public static Azure.ResourceManager.EdgeOrder.EdgeOrderItemData EdgeOrderItemData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemDetails orderItemDetails = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemAddressDetails addressDetails = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), Azure.Core.ResourceIdentifier orderId = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningState? provisioningState = default(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningState?), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemDetails EdgeOrderItemDetails(Azure.ResourceManager.EdgeOrder.Models.ProductDetails productDetails = null, Azure.ResourceManager.EdgeOrder.Models.OrderItemType orderItemType = default(Azure.ResourceManager.EdgeOrder.Models.OrderItemType), Azure.ResourceManager.EdgeOrder.Models.EdgeOrderStageDetails currentStage = null, System.Collections.Generic.IEnumerable orderItemStageHistory = null, Azure.ResourceManager.EdgeOrder.Models.OrderItemPreferences preferences = null, Azure.ResourceManager.EdgeOrder.Models.ForwardShippingDetails forwardShippingDetails = null, Azure.ResourceManager.EdgeOrder.Models.ReverseShippingDetails reverseShippingDetails = null, System.Collections.Generic.IEnumerable notificationEmailList = null, string cancellationReason = null, Azure.ResourceManager.EdgeOrder.Models.OrderItemCancellationStatus? cancellationStatus = default(Azure.ResourceManager.EdgeOrder.Models.OrderItemCancellationStatus?), Azure.ResourceManager.EdgeOrder.Models.EdgeOrderActionStatus? deletionStatus = default(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderActionStatus?), string returnReason = null, Azure.ResourceManager.EdgeOrder.Models.OrderItemReturnStatus? returnStatus = default(Azure.ResourceManager.EdgeOrder.Models.OrderItemReturnStatus?), string firstOrDefaultManagementResourceProviderNamespace = null, System.Collections.Generic.IEnumerable managementRPDetailsList = null, Azure.ResponseError error = null) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemDetails EdgeOrderItemDetails(Azure.ResourceManager.EdgeOrder.Models.ProductDetails productDetails = null, Azure.ResourceManager.EdgeOrder.Models.OrderItemType orderItemType = default(Azure.ResourceManager.EdgeOrder.Models.OrderItemType), Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemMode? orderItemMode = default(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemMode?), string siteId = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderStageDetails currentStage = null, System.Collections.Generic.IEnumerable orderItemStageHistory = null, Azure.ResourceManager.EdgeOrder.Models.OrderItemPreferences preferences = null, Azure.ResourceManager.EdgeOrder.Models.ForwardShippingDetails forwardShippingDetails = null, Azure.ResourceManager.EdgeOrder.Models.ReverseShippingDetails reverseShippingDetails = null, System.Collections.Generic.IEnumerable notificationEmailList = null, string cancellationReason = null, Azure.ResourceManager.EdgeOrder.Models.OrderItemCancellationStatus? cancellationStatus = default(Azure.ResourceManager.EdgeOrder.Models.OrderItemCancellationStatus?), Azure.ResourceManager.EdgeOrder.Models.EdgeOrderActionStatus? deletionStatus = default(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderActionStatus?), string returnReason = null, Azure.ResourceManager.EdgeOrder.Models.OrderItemReturnStatus? returnStatus = default(Azure.ResourceManager.EdgeOrder.Models.OrderItemReturnStatus?), System.Collections.Generic.IEnumerable managementRPDetailsList = null, Azure.ResponseError error = null, string firstOrDefaultManagementResourceProviderNamespace = null) { throw null; } public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemReturnContent EdgeOrderItemReturnContent(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemAddressProperties returnAddress = null, string returnReason = null, string serviceTag = null, bool? isShippingBoxRequired = default(bool?)) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProduct EdgeOrderProduct(System.Collections.Generic.IEnumerable configurations = null, string displayName = null, Azure.ResourceManager.EdgeOrder.Models.ProductDescription description = null, System.Collections.Generic.IEnumerable imageInformation = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductCostInformation costInformation = null, Azure.ResourceManager.EdgeOrder.Models.ProductAvailabilityInformation availabilityInformation = null, Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation hierarchyInformation = null, System.Collections.Generic.IEnumerable filterableProperties = null) { throw null; } public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProduct EdgeOrderProduct(string displayName = null, Azure.ResourceManager.EdgeOrder.Models.ProductDescription description = null, System.Collections.Generic.IEnumerable imageInformation = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductCostInformation costInformation = null, Azure.ResourceManager.EdgeOrder.Models.ProductAvailabilityInformation availabilityInformation = null, Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation hierarchyInformation = null, System.Collections.Generic.IEnumerable filterableProperties = null, System.Collections.Generic.IEnumerable configurations = null) { throw null; } - public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductBillingMeterDetails EdgeOrderProductBillingMeterDetails(string name = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductMeterDetails meterDetails = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductMeteringType? meteringType = default(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductMeteringType?), string frequency = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductBillingMeterDetails EdgeOrderProductBillingMeterDetails(string name, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductMeterDetails meterDetails, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductMeteringType? meteringType, string frequency) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductBillingMeterDetails EdgeOrderProductBillingMeterDetails(string name = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductMeterDetails meterDetails = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductMeteringType? meteringType = default(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductMeteringType?), string frequency = null, Azure.ResourceManager.EdgeOrder.Models.TermTypeDetails termTypeDetails = null) { throw null; } public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductCostInformation EdgeOrderProductCostInformation(System.Collections.Generic.IEnumerable billingMeterDetails = null, System.Uri billingInfoUri = null) { throw null; } - public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductDeviceDetails EdgeOrderProductDeviceDetails(string serialNumber = null, string managementResourceId = null, string managementResourceTenantId = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductDeviceDetails EdgeOrderProductDeviceDetails(string serialNumber, string managementResourceId, string managementResourceTenantId) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductDeviceDetails EdgeOrderProductDeviceDetails(string serialNumber = null, string displaySerialNumber = null, string managementResourceId = null, string managementResourceTenantId = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningSupport? provisioningSupport = default(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningSupport?), Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningDetails provisioningDetails = null) { throw null; } public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductImageInformation EdgeOrderProductImageInformation(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductImageType? imageType = default(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductImageType?), System.Uri imageUri = null) { throw null; } public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductMeterDetails EdgeOrderProductMeterDetails(string billingType = null, double? multiplier = default(double?), Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductChargingType? chargingType = default(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductChargingType?)) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningDetails EdgeOrderProvisioningDetails(int? quantity = default(int?), Azure.Core.ResourceIdentifier provisioningArmId = null, string provisioningEndPoint = null, string serialNumber = null, string vendorName = null, Azure.Core.ResourceIdentifier readyToConnectArmId = null, Azure.Core.ResourceIdentifier managementResourceArmId = null, string uniqueDeviceIdentifier = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAutoProvisioningStatus? autoProvisioningStatus = default(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAutoProvisioningStatus?), Azure.ResourceManager.EdgeOrder.Models.DevicePresenceVerificationDetails devicePresenceVerification = null) { throw null; } public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderStageDetails EdgeOrderStageDetails(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderStageStatus? stageStatus = default(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderStageStatus?), Azure.ResourceManager.EdgeOrder.Models.EdgeOrderStageName? stageName = default(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderStageName?), string displayName = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.EdgeOrder.Models.ForwardShippingDetails ForwardShippingDetails(string carrierName = null, string carrierDisplayName = null, string trackingId = null, System.Uri trackingUri = null) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.GroupedChildConfigurations GroupedChildConfigurations(Azure.ResourceManager.EdgeOrder.Models.ChildConfigurationCategoryInformation categoryInformation = null, System.Collections.Generic.IEnumerable childConfigurations = null) { throw null; } public static Azure.ResourceManager.EdgeOrder.Models.Pav2MeterDetails Pav2MeterDetails(double? multiplier = default(double?), Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductChargingType? chargingType = default(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductChargingType?), System.Guid? meterGuid = default(System.Guid?)) { throw null; } public static Azure.ResourceManager.EdgeOrder.Models.ProductAvailabilityInformation ProductAvailabilityInformation(Azure.ResourceManager.EdgeOrder.Models.ProductAvailabilityStage? availabilityStage = default(Azure.ResourceManager.EdgeOrder.Models.ProductAvailabilityStage?), Azure.ResourceManager.EdgeOrder.Models.ProductDisabledReason? disabledReason = default(Azure.ResourceManager.EdgeOrder.Models.ProductDisabledReason?), string disabledReasonMessage = null) { throw null; } - public static Azure.ResourceManager.EdgeOrder.Models.ProductConfiguration ProductConfiguration(string displayName = null, Azure.ResourceManager.EdgeOrder.Models.ProductDescription description = null, System.Collections.Generic.IEnumerable imageInformation = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductCostInformation costInformation = null, Azure.ResourceManager.EdgeOrder.Models.ProductAvailabilityInformation availabilityInformation = null, Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation hierarchyInformation = null, System.Collections.Generic.IEnumerable filterableProperties = null, System.Collections.Generic.IEnumerable specifications = null, Azure.ResourceManager.EdgeOrder.Models.ProductDimensions dimensions = null) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.ProductChildConfiguration ProductChildConfiguration(Azure.ResourceManager.EdgeOrder.Models.ChildConfigurationType? childConfigurationType = default(Azure.ResourceManager.EdgeOrder.Models.ChildConfigurationType?), bool? isPartOfBaseConfiguration = default(bool?), int? minimumQuantity = default(int?), int? maximumQuantity = default(int?), System.Collections.Generic.IEnumerable specifications = null, Azure.ResourceManager.EdgeOrder.Models.ProductDimensions dimensions = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningSupport? provisioningSupport = default(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningSupport?), System.Collections.Generic.IEnumerable childConfigurationTypes = null, System.Collections.Generic.IEnumerable groupedChildConfigurations = null, System.Collections.Generic.IEnumerable supportedTermCommitmentDurations = null, System.Collections.Generic.IEnumerable filterableProperties = null, string displayName = null, Azure.ResourceManager.EdgeOrder.Models.ProductDescription description = null, System.Collections.Generic.IEnumerable imageInformation = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductCostInformation costInformation = null, Azure.ResourceManager.EdgeOrder.Models.ProductAvailabilityInformation availabilityInformation = null, Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation hierarchyInformation = null, Azure.ResourceManager.EdgeOrder.Models.ConfigurationFulfillmentType? fulfilledBy = default(Azure.ResourceManager.EdgeOrder.Models.ConfigurationFulfillmentType?)) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.ProductConfiguration ProductConfiguration(System.Collections.Generic.IEnumerable specifications = null, Azure.ResourceManager.EdgeOrder.Models.ProductDimensions dimensions = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningSupport? provisioningSupport = default(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningSupport?), System.Collections.Generic.IEnumerable childConfigurationTypes = null, System.Collections.Generic.IEnumerable groupedChildConfigurations = null, System.Collections.Generic.IEnumerable supportedTermCommitmentDurations = null, string displayName = null, Azure.ResourceManager.EdgeOrder.Models.ProductDescription description = null, System.Collections.Generic.IEnumerable imageInformation = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductCostInformation costInformation = null, Azure.ResourceManager.EdgeOrder.Models.ProductAvailabilityInformation availabilityInformation = null, Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation hierarchyInformation = null, System.Collections.Generic.IEnumerable filterableProperties = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.EdgeOrder.Models.ProductConfiguration ProductConfiguration(string displayName, Azure.ResourceManager.EdgeOrder.Models.ProductDescription description, System.Collections.Generic.IEnumerable imageInformation, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductCostInformation costInformation, Azure.ResourceManager.EdgeOrder.Models.ProductAvailabilityInformation availabilityInformation, Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation hierarchyInformation, System.Collections.Generic.IEnumerable filterableProperties, System.Collections.Generic.IEnumerable specifications, Azure.ResourceManager.EdgeOrder.Models.ProductDimensions dimensions) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.ProductConfigurationDeviceDetails ProductConfigurationDeviceDetails(Azure.ResourceManager.EdgeOrder.Models.ProductDisplayInfo displayInfo = null, Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation hierarchyInformation = null, int? quantity = default(int?), Azure.ResourceManager.EdgeOrder.Models.ConfigurationIdentificationType? identificationType = default(Azure.ResourceManager.EdgeOrder.Models.ConfigurationIdentificationType?), System.Collections.Generic.IEnumerable deviceDetails = null, Azure.ResourceManager.EdgeOrder.Models.TermCommitmentInformation termCommitmentInformation = null) { throw null; } public static Azure.ResourceManager.EdgeOrder.Models.ProductDescription ProductDescription(Azure.ResourceManager.EdgeOrder.Models.ProductDescriptionType? descriptionType = default(Azure.ResourceManager.EdgeOrder.Models.ProductDescriptionType?), string shortDescription = null, string longDescription = null, System.Collections.Generic.IEnumerable keywords = null, System.Collections.Generic.IEnumerable attributes = null, System.Collections.Generic.IEnumerable links = null) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.ProductDetails ProductDetails(Azure.ResourceManager.EdgeOrder.Models.ProductDisplayInfo displayInfo = null, Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation hierarchyInformation = null, Azure.ResourceManager.EdgeOrder.Models.DoubleEncryptionStatus? productDoubleEncryptionStatus = default(Azure.ResourceManager.EdgeOrder.Models.DoubleEncryptionStatus?), Azure.ResourceManager.EdgeOrder.Models.ConfigurationIdentificationType? identificationType = default(Azure.ResourceManager.EdgeOrder.Models.ConfigurationIdentificationType?), Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductDeviceDetails parentDeviceDetails = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningDetails parentProvisioningDetails = null, System.Collections.Generic.IEnumerable optInAdditionalConfigurations = null, System.Collections.Generic.IEnumerable childConfigurationDeviceDetails = null, Azure.ResourceManager.EdgeOrder.Models.TermCommitmentInformation termCommitmentInformation = null, int? count = default(int?), System.Collections.Generic.IEnumerable deviceDetails = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.EdgeOrder.Models.ProductDetails ProductDetails(Azure.ResourceManager.EdgeOrder.Models.ProductDisplayInfo displayInfo = null, Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation hierarchyInformation = null, int? count = default(int?), Azure.ResourceManager.EdgeOrder.Models.DoubleEncryptionStatus? productDoubleEncryptionStatus = default(Azure.ResourceManager.EdgeOrder.Models.DoubleEncryptionStatus?), System.Collections.Generic.IEnumerable deviceDetails = null) { throw null; } public static Azure.ResourceManager.EdgeOrder.Models.ProductDimensions ProductDimensions(double? length = default(double?), double? height = default(double?), double? width = default(double?), Azure.ResourceManager.EdgeOrder.Models.ProductLengthHeightWidthUnit? lengthHeightUnit = default(Azure.ResourceManager.EdgeOrder.Models.ProductLengthHeightWidthUnit?), double? weight = default(double?), double? depth = default(double?), Azure.ResourceManager.EdgeOrder.Models.ProductWeightMeasurementUnit? weightUnit = default(Azure.ResourceManager.EdgeOrder.Models.ProductWeightMeasurementUnit?)) { throw null; } public static Azure.ResourceManager.EdgeOrder.Models.ProductDisplayInfo ProductDisplayInfo(string productFamilyDisplayName = null, string configurationDisplayName = null) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.ProductFamiliesMetadata ProductFamiliesMetadata(System.Collections.Generic.IEnumerable productLines = null, System.Collections.Generic.IEnumerable resourceProviderDetails = null, string displayName = null, Azure.ResourceManager.EdgeOrder.Models.ProductDescription description = null, System.Collections.Generic.IEnumerable imageInformation = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductCostInformation costInformation = null, Azure.ResourceManager.EdgeOrder.Models.ProductAvailabilityInformation availabilityInformation = null, Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation hierarchyInformation = null, System.Collections.Generic.IEnumerable filterableProperties = null) { throw null; } public static Azure.ResourceManager.EdgeOrder.Models.ProductFamiliesMetadata ProductFamiliesMetadata(string displayName = null, Azure.ResourceManager.EdgeOrder.Models.ProductDescription description = null, System.Collections.Generic.IEnumerable imageInformation = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductCostInformation costInformation = null, Azure.ResourceManager.EdgeOrder.Models.ProductAvailabilityInformation availabilityInformation = null, Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation hierarchyInformation = null, System.Collections.Generic.IEnumerable filterableProperties = null, System.Collections.Generic.IEnumerable productLines = null, System.Collections.Generic.IEnumerable resourceProviderDetails = null) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.ProductFamily ProductFamily(System.Collections.Generic.IEnumerable productLines = null, System.Collections.Generic.IEnumerable resourceProviderDetails = null, string displayName = null, Azure.ResourceManager.EdgeOrder.Models.ProductDescription description = null, System.Collections.Generic.IEnumerable imageInformation = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductCostInformation costInformation = null, Azure.ResourceManager.EdgeOrder.Models.ProductAvailabilityInformation availabilityInformation = null, Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation hierarchyInformation = null, System.Collections.Generic.IEnumerable filterableProperties = null) { throw null; } public static Azure.ResourceManager.EdgeOrder.Models.ProductFamily ProductFamily(string displayName = null, Azure.ResourceManager.EdgeOrder.Models.ProductDescription description = null, System.Collections.Generic.IEnumerable imageInformation = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductCostInformation costInformation = null, Azure.ResourceManager.EdgeOrder.Models.ProductAvailabilityInformation availabilityInformation = null, Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation hierarchyInformation = null, System.Collections.Generic.IEnumerable filterableProperties = null, System.Collections.Generic.IEnumerable productLines = null, System.Collections.Generic.IEnumerable resourceProviderDetails = null) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.ProductLine ProductLine(System.Collections.Generic.IEnumerable products = null, string displayName = null, Azure.ResourceManager.EdgeOrder.Models.ProductDescription description = null, System.Collections.Generic.IEnumerable imageInformation = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductCostInformation costInformation = null, Azure.ResourceManager.EdgeOrder.Models.ProductAvailabilityInformation availabilityInformation = null, Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation hierarchyInformation = null, System.Collections.Generic.IEnumerable filterableProperties = null) { throw null; } public static Azure.ResourceManager.EdgeOrder.Models.ProductLine ProductLine(string displayName = null, Azure.ResourceManager.EdgeOrder.Models.ProductDescription description = null, System.Collections.Generic.IEnumerable imageInformation = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductCostInformation costInformation = null, Azure.ResourceManager.EdgeOrder.Models.ProductAvailabilityInformation availabilityInformation = null, Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation hierarchyInformation = null, System.Collections.Generic.IEnumerable filterableProperties = null, System.Collections.Generic.IEnumerable products = null) { throw null; } public static Azure.ResourceManager.EdgeOrder.Models.ProductLink ProductLink(Azure.ResourceManager.EdgeOrder.Models.ProductLinkType? linkType = default(Azure.ResourceManager.EdgeOrder.Models.ProductLinkType?), System.Uri linkUri = null) { throw null; } public static Azure.ResourceManager.EdgeOrder.Models.ProductSpecification ProductSpecification(string name = null, string value = null) { throw null; } public static Azure.ResourceManager.EdgeOrder.Models.PurchaseMeterDetails PurchaseMeterDetails(double? multiplier = default(double?), Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductChargingType? chargingType = default(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductChargingType?), string productId = null, string skuId = null, string termId = null) { throw null; } public static Azure.ResourceManager.EdgeOrder.Models.ResourceProviderDetails ResourceProviderDetails(string resourceProviderNamespace = null) { throw null; } public static Azure.ResourceManager.EdgeOrder.Models.ReverseShippingDetails ReverseShippingDetails(string sasKeyForLabel = null, string carrierName = null, string carrierDisplayName = null, string trackingId = null, System.Uri trackingUri = null) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.TermCommitmentInformation TermCommitmentInformation(Azure.ResourceManager.EdgeOrder.Models.TermCommitmentType termCommitmentType = default(Azure.ResourceManager.EdgeOrder.Models.TermCommitmentType), System.TimeSpan? termCommitmentTypeDuration = default(System.TimeSpan?), int? pendingDaysForTerm = default(int?)) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.TermTypeDetails TermTypeDetails(Azure.ResourceManager.EdgeOrder.Models.TermCommitmentType termType = default(Azure.ResourceManager.EdgeOrder.Models.TermCommitmentType), System.TimeSpan termTypeDuration = default(System.TimeSpan)) { throw null; } + } + public partial class ChildConfigurationCategoryInformation : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ChildConfigurationCategoryInformation() { } + public string CategoryDisplayName { get { throw null; } } + public string CategoryName { get { throw null; } } + public string Description { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Links { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EdgeOrder.Models.ChildConfigurationCategoryInformation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EdgeOrder.Models.ChildConfigurationCategoryInformation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ChildConfigurationFilter : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ChildConfigurationFilter() { } + public System.Collections.Generic.IList ChildConfigurationTypes { get { throw null; } } + public System.Collections.Generic.IList HierarchyInformations { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EdgeOrder.Models.ChildConfigurationFilter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EdgeOrder.Models.ChildConfigurationFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ChildConfigurationType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ChildConfigurationType(string value) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.ChildConfigurationType AdditionalConfiguration { get { throw null; } } + public static Azure.ResourceManager.EdgeOrder.Models.ChildConfigurationType DeviceConfiguration { get { throw null; } } + public bool Equals(Azure.ResourceManager.EdgeOrder.Models.ChildConfigurationType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.EdgeOrder.Models.ChildConfigurationType left, Azure.ResourceManager.EdgeOrder.Models.ChildConfigurationType right) { throw null; } + public static implicit operator Azure.ResourceManager.EdgeOrder.Models.ChildConfigurationType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.EdgeOrder.Models.ChildConfigurationType left, Azure.ResourceManager.EdgeOrder.Models.ChildConfigurationType right) { throw null; } + public override string ToString() { throw null; } } public partial class ConfigurationFilters : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ConfigurationFilters(Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation hierarchyInformation) { } + public Azure.ResourceManager.EdgeOrder.Models.ChildConfigurationFilter ChildConfigurationFilter { get { throw null; } set { } } public System.Collections.Generic.IList FilterableProperty { get { throw null; } } public Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation HierarchyInformation { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -279,9 +403,49 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ConfigurationFulfillmentType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ConfigurationFulfillmentType(string value) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.ConfigurationFulfillmentType External { get { throw null; } } + public static Azure.ResourceManager.EdgeOrder.Models.ConfigurationFulfillmentType Microsoft { get { throw null; } } + public bool Equals(Azure.ResourceManager.EdgeOrder.Models.ConfigurationFulfillmentType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.EdgeOrder.Models.ConfigurationFulfillmentType left, Azure.ResourceManager.EdgeOrder.Models.ConfigurationFulfillmentType right) { throw null; } + public static implicit operator Azure.ResourceManager.EdgeOrder.Models.ConfigurationFulfillmentType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.EdgeOrder.Models.ConfigurationFulfillmentType left, Azure.ResourceManager.EdgeOrder.Models.ConfigurationFulfillmentType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ConfigurationIdentificationType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ConfigurationIdentificationType(string value) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.ConfigurationIdentificationType NotSupported { get { throw null; } } + public static Azure.ResourceManager.EdgeOrder.Models.ConfigurationIdentificationType SerialNumber { get { throw null; } } + public bool Equals(Azure.ResourceManager.EdgeOrder.Models.ConfigurationIdentificationType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.EdgeOrder.Models.ConfigurationIdentificationType left, Azure.ResourceManager.EdgeOrder.Models.ConfigurationIdentificationType right) { throw null; } + public static implicit operator Azure.ResourceManager.EdgeOrder.Models.ConfigurationIdentificationType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.EdgeOrder.Models.ConfigurationIdentificationType left, Azure.ResourceManager.EdgeOrder.Models.ConfigurationIdentificationType right) { throw null; } + public override string ToString() { throw null; } + } public partial class ConfigurationsContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + public ConfigurationsContent() { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public ConfigurationsContent(System.Collections.Generic.IEnumerable configurationFilters) { } + public Azure.ResourceManager.EdgeOrder.Models.ConfigurationFilters ConfigurationFilter { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public System.Collections.Generic.IList ConfigurationFilters { get { throw null; } } public Azure.ResourceManager.EdgeOrder.Models.CustomerSubscriptionDetails CustomerSubscriptionDetails { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -316,6 +480,36 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class DevicePresenceVerificationDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DevicePresenceVerificationDetails() { } + public string Message { get { throw null; } } + public Azure.ResourceManager.EdgeOrder.Models.DevicePresenceVerificationStatus? Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EdgeOrder.Models.DevicePresenceVerificationDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EdgeOrder.Models.DevicePresenceVerificationDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DevicePresenceVerificationStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DevicePresenceVerificationStatus(string value) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.DevicePresenceVerificationStatus Completed { get { throw null; } } + public static Azure.ResourceManager.EdgeOrder.Models.DevicePresenceVerificationStatus NotInitiated { get { throw null; } } + public bool Equals(Azure.ResourceManager.EdgeOrder.Models.DevicePresenceVerificationStatus other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.EdgeOrder.Models.DevicePresenceVerificationStatus left, Azure.ResourceManager.EdgeOrder.Models.DevicePresenceVerificationStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.EdgeOrder.Models.DevicePresenceVerificationStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.EdgeOrder.Models.DevicePresenceVerificationStatus left, Azure.ResourceManager.EdgeOrder.Models.DevicePresenceVerificationStatus right) { throw null; } + public override string ToString() { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct DoubleEncryptionStatus : System.IEquatable { @@ -352,8 +546,28 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderActionStatus left, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderActionStatus right) { throw null; } public override string ToString() { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct EdgeOrderAddressClassification : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public EdgeOrderAddressClassification(string value) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressClassification Shipping { get { throw null; } } + public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressClassification Site { get { throw null; } } + public bool Equals(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressClassification other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressClassification left, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressClassification right) { throw null; } + public static implicit operator Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressClassification (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressClassification left, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressClassification right) { throw null; } + public override string ToString() { throw null; } + } public partial class EdgeOrderAddressContactDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + public EdgeOrderAddressContactDetails() { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public EdgeOrderAddressContactDetails(string contactName, string phone, System.Collections.Generic.IEnumerable emailList) { } public string ContactName { get { throw null; } set { } } public System.Collections.Generic.IList EmailList { get { throw null; } } @@ -418,6 +632,24 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressValidationStatus left, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressValidationStatus right) { throw null; } public override string ToString() { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct EdgeOrderAutoProvisioningStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public EdgeOrderAutoProvisioningStatus(string value) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAutoProvisioningStatus Disabled { get { throw null; } } + public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAutoProvisioningStatus Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAutoProvisioningStatus other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAutoProvisioningStatus left, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAutoProvisioningStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAutoProvisioningStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAutoProvisioningStatus left, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAutoProvisioningStatus right) { throw null; } + public override string ToString() { throw null; } + } public partial class EdgeOrderItemAddressDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public EdgeOrderItemAddressDetails(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemAddressProperties forwardAddress) { } @@ -432,9 +664,13 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public partial class EdgeOrderItemAddressProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + public EdgeOrderItemAddressProperties() { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public EdgeOrderItemAddressProperties(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressContactDetails contactDetails) { } + public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressClassification? AddressClassification { get { throw null; } set { } } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressValidationStatus? AddressValidationStatus { get { throw null; } } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressContactDetails ContactDetails { get { throw null; } set { } } + public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderShippingAddress ShippingAddress { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemAddressProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -462,10 +698,12 @@ public EdgeOrderItemDetails(Azure.ResourceManager.EdgeOrder.Models.ProductDetail public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderStageDetails CurrentStage { get { throw null; } } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderActionStatus? DeletionStatus { get { throw null; } } public Azure.ResponseError Error { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public string FirstOrDefaultManagementResourceProviderNamespace { get { throw null; } } public Azure.ResourceManager.EdgeOrder.Models.ForwardShippingDetails ForwardShippingDetails { get { throw null; } } public System.Collections.Generic.IReadOnlyList ManagementRPDetailsList { get { throw null; } } public System.Collections.Generic.IList NotificationEmailList { get { throw null; } } + public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemMode? OrderItemMode { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList OrderItemStageHistory { get { throw null; } } public Azure.ResourceManager.EdgeOrder.Models.OrderItemType OrderItemType { get { throw null; } set { } } public Azure.ResourceManager.EdgeOrder.Models.OrderItemPreferences Preferences { get { throw null; } set { } } @@ -473,6 +711,7 @@ public EdgeOrderItemDetails(Azure.ResourceManager.EdgeOrder.Models.ProductDetail public string ReturnReason { get { throw null; } } public Azure.ResourceManager.EdgeOrder.Models.OrderItemReturnStatus? ReturnStatus { get { throw null; } } public Azure.ResourceManager.EdgeOrder.Models.ReverseShippingDetails ReverseShippingDetails { get { throw null; } } + public string SiteId { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -480,11 +719,43 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class EdgeOrderItemDetailsPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeOrderItemDetailsPatch() { } + public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningDetails ParentProvisioningDetails { get { throw null; } set { } } + public string SiteId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemDetailsPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemDetailsPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct EdgeOrderItemMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public EdgeOrderItemMode(string value) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemMode Default { get { throw null; } } + public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemMode DoNotFulfill { get { throw null; } } + public bool Equals(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemMode other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemMode left, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemMode right) { throw null; } + public static implicit operator Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemMode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemMode left, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemMode right) { throw null; } + public override string ToString() { throw null; } + } public partial class EdgeOrderItemPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public EdgeOrderItemPatch() { } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemAddressProperties ForwardAddress { get { throw null; } set { } } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public System.Collections.Generic.IList NotificationEmailList { get { throw null; } } + public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemDetailsPatch OrderItemDetails { get { throw null; } set { } } public Azure.ResourceManager.EdgeOrder.Models.OrderItemPreferences Preferences { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -533,6 +804,7 @@ internal EdgeOrderProductBillingMeterDetails() { } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductMeterDetails MeterDetails { get { throw null; } } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductMeteringType? MeteringType { get { throw null; } } public string Name { get { throw null; } } + public Azure.ResourceManager.EdgeOrder.Models.TermTypeDetails TermTypeDetails { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductBillingMeterDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -573,8 +845,11 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class EdgeOrderProductDeviceDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal EdgeOrderProductDeviceDetails() { } + public string DisplaySerialNumber { get { throw null; } } public string ManagementResourceId { get { throw null; } } public string ManagementResourceTenantId { get { throw null; } } + public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningDetails ProvisioningDetails { get { throw null; } } + public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningSupport? ProvisioningSupport { get { throw null; } } public string SerialNumber { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductDeviceDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -645,8 +920,68 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductMeteringType left, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductMeteringType right) { throw null; } public override string ToString() { throw null; } } + public partial class EdgeOrderProvisioningDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeOrderProvisioningDetails() { } + public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAutoProvisioningStatus? AutoProvisioningStatus { get { throw null; } set { } } + public Azure.ResourceManager.EdgeOrder.Models.DevicePresenceVerificationDetails DevicePresenceVerification { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier ManagementResourceArmId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier ProvisioningArmId { get { throw null; } set { } } + public string ProvisioningEndPoint { get { throw null; } set { } } + public int? Quantity { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier ReadyToConnectArmId { get { throw null; } set { } } + public string SerialNumber { get { throw null; } set { } } + public string UniqueDeviceIdentifier { get { throw null; } } + public string VendorName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct EdgeOrderProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public EdgeOrderProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningState Creating { get { throw null; } } + public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningState left, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningState left, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct EdgeOrderProvisioningSupport : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public EdgeOrderProvisioningSupport(string value) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningSupport CloudBased { get { throw null; } } + public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningSupport Manual { get { throw null; } } + public bool Equals(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningSupport other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningSupport left, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningSupport right) { throw null; } + public static implicit operator Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningSupport (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningSupport left, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningSupport right) { throw null; } + public override string ToString() { throw null; } + } public partial class EdgeOrderShippingAddress : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + public EdgeOrderShippingAddress(string country) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public EdgeOrderShippingAddress(string streetAddress1, string country) { } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressType? AddressType { get { throw null; } set { } } public string City { get { throw null; } set { } } @@ -691,6 +1026,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderStageName InReview { get { throw null; } } public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderStageName InUse { get { throw null; } } public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderStageName Placed { get { throw null; } } + public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderStageName ReadyToSetup { get { throw null; } } public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderStageName ReadyToShip { get { throw null; } } public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderStageName ReturnCompleted { get { throw null; } } public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderStageName ReturnedToMicrosoft { get { throw null; } } @@ -755,9 +1091,22 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class GroupedChildConfigurations : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal GroupedChildConfigurations() { } + public Azure.ResourceManager.EdgeOrder.Models.ChildConfigurationCategoryInformation CategoryInformation { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ChildConfigurations { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EdgeOrder.Models.GroupedChildConfigurations System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EdgeOrder.Models.GroupedChildConfigurations System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class HierarchyInformation : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public HierarchyInformation() { } + public string ConfigurationIdDisplayName { get { throw null; } set { } } public string ConfigurationName { get { throw null; } set { } } public string ProductFamilyName { get { throw null; } set { } } public string ProductLineName { get { throw null; } set { } } @@ -824,6 +1173,7 @@ public OrderItemPreferences() { } public Azure.ResourceManager.EdgeOrder.Models.DoubleEncryptionStatus? DoubleEncryptionStatus { get { throw null; } set { } } public System.Collections.Generic.IList NotificationPreferences { get { throw null; } } public string PreferredManagementResourceId { get { throw null; } set { } } + public Azure.ResourceManager.EdgeOrder.Models.TermCommitmentPreferences TermCommitmentPreferences { get { throw null; } set { } } public Azure.ResourceManager.EdgeOrder.Models.TransportShipmentType? TransportPreferencesPreferredShipmentType { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.OrderItemPreferences System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -857,6 +1207,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer private readonly object _dummy; private readonly int _dummyPrimitive; public OrderItemType(string value) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.OrderItemType External { get { throw null; } } public static Azure.ResourceManager.EdgeOrder.Models.OrderItemType Purchase { get { throw null; } } public static Azure.ResourceManager.EdgeOrder.Models.OrderItemType Rental { get { throw null; } } public bool Equals(Azure.ResourceManager.EdgeOrder.Models.OrderItemType other) { throw null; } @@ -902,6 +1253,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static Azure.ResourceManager.EdgeOrder.Models.ProductAvailabilityStage Available { get { throw null; } } public static Azure.ResourceManager.EdgeOrder.Models.ProductAvailabilityStage ComingSoon { get { throw null; } } public static Azure.ResourceManager.EdgeOrder.Models.ProductAvailabilityStage Deprecated { get { throw null; } } + public static Azure.ResourceManager.EdgeOrder.Models.ProductAvailabilityStage Discoverable { get { throw null; } } public static Azure.ResourceManager.EdgeOrder.Models.ProductAvailabilityStage Preview { get { throw null; } } public static Azure.ResourceManager.EdgeOrder.Models.ProductAvailabilityStage SignUp { get { throw null; } } public static Azure.ResourceManager.EdgeOrder.Models.ProductAvailabilityStage Unavailable { get { throw null; } } @@ -915,18 +1267,50 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.EdgeOrder.Models.ProductAvailabilityStage left, Azure.ResourceManager.EdgeOrder.Models.ProductAvailabilityStage right) { throw null; } public override string ToString() { throw null; } } + public partial class ProductChildConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ProductChildConfiguration() { } + public Azure.ResourceManager.EdgeOrder.Models.ProductAvailabilityInformation AvailabilityInformation { get { throw null; } } + public Azure.ResourceManager.EdgeOrder.Models.ChildConfigurationType? ChildConfigurationType { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ChildConfigurationTypes { get { throw null; } } + public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductCostInformation CostInformation { get { throw null; } } + public Azure.ResourceManager.EdgeOrder.Models.ProductDescription Description { get { throw null; } } + public Azure.ResourceManager.EdgeOrder.Models.ProductDimensions Dimensions { get { throw null; } } + public string DisplayName { get { throw null; } } + public System.Collections.Generic.IReadOnlyList FilterableProperties { get { throw null; } } + public Azure.ResourceManager.EdgeOrder.Models.ConfigurationFulfillmentType? FulfilledBy { get { throw null; } } + public System.Collections.Generic.IReadOnlyList GroupedChildConfigurations { get { throw null; } } + public Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation HierarchyInformation { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ImageInformation { get { throw null; } } + public bool? IsPartOfBaseConfiguration { get { throw null; } } + public int? MaximumQuantity { get { throw null; } } + public int? MinimumQuantity { get { throw null; } } + public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningSupport? ProvisioningSupport { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Specifications { get { throw null; } } + public System.Collections.Generic.IReadOnlyList SupportedTermCommitmentDurations { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EdgeOrder.Models.ProductChildConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EdgeOrder.Models.ProductChildConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ProductConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ProductConfiguration() { } public Azure.ResourceManager.EdgeOrder.Models.ProductAvailabilityInformation AvailabilityInformation { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ChildConfigurationTypes { get { throw null; } } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductCostInformation CostInformation { get { throw null; } } public Azure.ResourceManager.EdgeOrder.Models.ProductDescription Description { get { throw null; } } public Azure.ResourceManager.EdgeOrder.Models.ProductDimensions Dimensions { get { throw null; } } public string DisplayName { get { throw null; } } public System.Collections.Generic.IReadOnlyList FilterableProperties { get { throw null; } } + public System.Collections.Generic.IReadOnlyList GroupedChildConfigurations { get { throw null; } } public Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation HierarchyInformation { get { throw null; } } public System.Collections.Generic.IReadOnlyList ImageInformation { get { throw null; } } + public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningSupport? ProvisioningSupport { get { throw null; } } public System.Collections.Generic.IReadOnlyList Specifications { get { throw null; } } + public System.Collections.Generic.IReadOnlyList SupportedTermCommitmentDurations { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.ProductConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -934,6 +1318,22 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class ProductConfigurationDeviceDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ProductConfigurationDeviceDetails() { } + public System.Collections.Generic.IReadOnlyList DeviceDetails { get { throw null; } } + public Azure.ResourceManager.EdgeOrder.Models.ProductDisplayInfo DisplayInfo { get { throw null; } } + public Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation HierarchyInformation { get { throw null; } } + public Azure.ResourceManager.EdgeOrder.Models.ConfigurationIdentificationType? IdentificationType { get { throw null; } } + public int? Quantity { get { throw null; } } + public Azure.ResourceManager.EdgeOrder.Models.TermCommitmentInformation TermCommitmentInformation { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EdgeOrder.Models.ProductConfigurationDeviceDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EdgeOrder.Models.ProductConfigurationDeviceDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ProductDescription : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ProductDescription() { } @@ -970,11 +1370,19 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class ProductDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ProductDetails(Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation hierarchyInformation) { } + public System.Collections.Generic.IReadOnlyList ChildConfigurationDeviceDetails { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public int? Count { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public System.Collections.Generic.IReadOnlyList DeviceDetails { get { throw null; } } public Azure.ResourceManager.EdgeOrder.Models.ProductDisplayInfo DisplayInfo { get { throw null; } set { } } public Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation HierarchyInformation { get { throw null; } set { } } + public Azure.ResourceManager.EdgeOrder.Models.ConfigurationIdentificationType? IdentificationType { get { throw null; } } + public System.Collections.Generic.IList OptInAdditionalConfigurations { get { throw null; } } + public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductDeviceDetails ParentDeviceDetails { get { throw null; } } + public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningDetails ParentProvisioningDetails { get { throw null; } set { } } public Azure.ResourceManager.EdgeOrder.Models.DoubleEncryptionStatus? ProductDoubleEncryptionStatus { get { throw null; } } + public Azure.ResourceManager.EdgeOrder.Models.TermCommitmentInformation TermCommitmentInformation { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.ProductDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -982,6 +1390,19 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class ProductDetailsAdditionalConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProductDetailsAdditionalConfiguration(Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation hierarchyInformation, int quantity) { } + public Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation HierarchyInformation { get { throw null; } set { } } + public System.Collections.Generic.IList ProvisioningDetails { get { throw null; } } + public int Quantity { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EdgeOrder.Models.ProductDetailsAdditionalConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EdgeOrder.Models.ProductDetailsAdditionalConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ProductDimensions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ProductDimensions() { } @@ -1139,6 +1560,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer private readonly object _dummy; private readonly int _dummyPrimitive; public ProductLinkType(string value) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.ProductLinkType Discoverable { get { throw null; } } public static Azure.ResourceManager.EdgeOrder.Models.ProductLinkType Documentation { get { throw null; } } public static Azure.ResourceManager.EdgeOrder.Models.ProductLinkType Generic { get { throw null; } } public static Azure.ResourceManager.EdgeOrder.Models.ProductLinkType KnowMore { get { throw null; } } @@ -1242,6 +1664,62 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.EdgeOrder.Models.SupportedFilterType left, Azure.ResourceManager.EdgeOrder.Models.SupportedFilterType right) { throw null; } public override string ToString() { throw null; } } + public partial class TermCommitmentInformation : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TermCommitmentInformation() { } + public int? PendingDaysForTerm { get { throw null; } } + public Azure.ResourceManager.EdgeOrder.Models.TermCommitmentType TermCommitmentType { get { throw null; } } + public System.TimeSpan? TermCommitmentTypeDuration { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EdgeOrder.Models.TermCommitmentInformation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EdgeOrder.Models.TermCommitmentInformation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TermCommitmentPreferences : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public TermCommitmentPreferences(Azure.ResourceManager.EdgeOrder.Models.TermCommitmentType preferredTermCommitmentType) { } + public System.TimeSpan? PreferredTermCommitmentDuration { get { throw null; } set { } } + public Azure.ResourceManager.EdgeOrder.Models.TermCommitmentType PreferredTermCommitmentType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EdgeOrder.Models.TermCommitmentPreferences System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EdgeOrder.Models.TermCommitmentPreferences System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct TermCommitmentType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public TermCommitmentType(string value) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.TermCommitmentType None { get { throw null; } } + public static Azure.ResourceManager.EdgeOrder.Models.TermCommitmentType Timed { get { throw null; } } + public static Azure.ResourceManager.EdgeOrder.Models.TermCommitmentType Trial { get { throw null; } } + public bool Equals(Azure.ResourceManager.EdgeOrder.Models.TermCommitmentType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.EdgeOrder.Models.TermCommitmentType left, Azure.ResourceManager.EdgeOrder.Models.TermCommitmentType right) { throw null; } + public static implicit operator Azure.ResourceManager.EdgeOrder.Models.TermCommitmentType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.EdgeOrder.Models.TermCommitmentType left, Azure.ResourceManager.EdgeOrder.Models.TermCommitmentType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class TermTypeDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TermTypeDetails() { } + public Azure.ResourceManager.EdgeOrder.Models.TermCommitmentType TermType { get { throw null; } } + public System.TimeSpan TermTypeDuration { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EdgeOrder.Models.TermTypeDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EdgeOrder.Models.TermTypeDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct TransportShipmentType : System.IEquatable { diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/api/Azure.ResourceManager.EdgeOrder.netstandard2.0.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/api/Azure.ResourceManager.EdgeOrder.netstandard2.0.cs index 3cf9d88e136f..fb3287b9718f 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/api/Azure.ResourceManager.EdgeOrder.netstandard2.0.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/api/Azure.ResourceManager.EdgeOrder.netstandard2.0.cs @@ -14,8 +14,12 @@ protected EdgeOrderAddressCollection() { } public virtual Azure.Response Exists(string addressName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string addressName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(string addressName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(string filter = null, string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(string filter = null, string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string filter = null, string skipToken = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual Azure.Pageable GetAll(string filter, string skipToken, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string filter = null, string skipToken = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual Azure.AsyncPageable GetAllAsync(string filter, string skipToken, System.Threading.CancellationToken cancellationToken) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(string addressName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.NullableResponse GetIfExists(string addressName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string addressName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -25,9 +29,12 @@ protected EdgeOrderAddressCollection() { } } public partial class EdgeOrderAddressData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + public EdgeOrderAddressData(Azure.Core.AzureLocation location) { } public EdgeOrderAddressData(Azure.Core.AzureLocation location, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressContactDetails contactDetails) { } + public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressClassification? AddressClassification { get { throw null; } set { } } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressValidationStatus? AddressValidationStatus { get { throw null; } } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressContactDetails ContactDetails { get { throw null; } set { } } + public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderShippingAddress ShippingAddress { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.EdgeOrderAddressData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -76,6 +83,7 @@ public partial class EdgeOrderData : Azure.ResourceManager.Models.ResourceData, public EdgeOrderData() { } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderStageDetails CurrentStage { get { throw null; } } public System.Collections.Generic.IReadOnlyList OrderItemIds { get { throw null; } } + public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemMode? OrderMode { get { throw null; } } public System.Collections.Generic.IReadOnlyList OrderStageHistory { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.EdgeOrderData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -92,7 +100,11 @@ public static partial class EdgeOrderExtensions public static Azure.Response GetEdgeOrderAddress(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string addressName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetEdgeOrderAddressAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string addressName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.EdgeOrder.EdgeOrderAddressCollection GetEdgeOrderAddresses(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetEdgeOrderAddresses(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string filter = null, string skipToken = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Pageable GetEdgeOrderAddresses(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string filter = null, string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetEdgeOrderAddressesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string filter = null, string skipToken = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.AsyncPageable GetEdgeOrderAddressesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string filter = null, string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.EdgeOrder.EdgeOrderAddressResource GetEdgeOrderAddressResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static System.Threading.Tasks.Task> GetEdgeOrderAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, Azure.Core.AzureLocation location, string orderName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -100,13 +112,25 @@ public static partial class EdgeOrderExtensions public static System.Threading.Tasks.Task> GetEdgeOrderItemAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string orderItemName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.EdgeOrder.EdgeOrderItemResource GetEdgeOrderItemResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.EdgeOrder.EdgeOrderItemCollection GetEdgeOrderItems(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetEdgeOrderItems(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string filter = null, string expand = null, string skipToken = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Pageable GetEdgeOrderItems(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string filter = null, string expand = null, string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetEdgeOrderItemsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string filter = null, string expand = null, string skipToken = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.AsyncPageable GetEdgeOrderItemsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string filter = null, string expand = null, string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.EdgeOrder.EdgeOrderResource GetEdgeOrderResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.EdgeOrder.EdgeOrderCollection GetEdgeOrders(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetEdgeOrders(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string skipToken = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Pageable GetEdgeOrders(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Pageable GetEdgeOrders(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string skipToken = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Pageable GetEdgeOrders(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetEdgeOrdersAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string skipToken = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.AsyncPageable GetEdgeOrdersAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetEdgeOrdersAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string skipToken = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.AsyncPageable GetEdgeOrdersAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Pageable GetProductFamilies(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.EdgeOrder.Models.ProductFamiliesContent content, string expand = null, string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetProductFamiliesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.EdgeOrder.Models.ProductFamiliesContent content, string expand = null, string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -121,8 +145,12 @@ protected EdgeOrderItemCollection() { } public virtual Azure.Response Exists(string orderItemName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string orderItemName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(string orderItemName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(string filter = null, string expand = null, string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(string filter = null, string expand = null, string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string filter = null, string expand = null, string skipToken = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual Azure.Pageable GetAll(string filter, string expand, string skipToken, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string filter = null, string expand = null, string skipToken = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual Azure.AsyncPageable GetAllAsync(string filter, string expand, string skipToken, System.Threading.CancellationToken cancellationToken) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(string orderItemName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.NullableResponse GetIfExists(string orderItemName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string orderItemName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -132,10 +160,13 @@ protected EdgeOrderItemCollection() { } } public partial class EdgeOrderItemData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + public EdgeOrderItemData(Azure.Core.AzureLocation location, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemDetails orderItemDetails, Azure.Core.ResourceIdentifier orderId) { } public EdgeOrderItemData(Azure.Core.AzureLocation location, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemDetails orderItemDetails, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemAddressDetails addressDetails, Azure.Core.ResourceIdentifier orderId) { } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemAddressDetails AddressDetails { get { throw null; } set { } } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.Core.ResourceIdentifier OrderId { get { throw null; } set { } } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemDetails OrderItemDetails { get { throw null; } set { } } + public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningState? ProvisioningState { get { throw null; } } public System.DateTimeOffset? StartOn { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.EdgeOrderItemData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -210,7 +241,11 @@ protected MockableEdgeOrderResourceGroupResource() { } public virtual System.Threading.Tasks.Task> GetEdgeOrderItemAsync(string orderItemName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.EdgeOrder.EdgeOrderItemCollection GetEdgeOrderItems() { throw null; } public virtual Azure.ResourceManager.EdgeOrder.EdgeOrderCollection GetEdgeOrders() { throw null; } + public virtual Azure.Pageable GetEdgeOrders(string skipToken = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.Pageable GetEdgeOrders(string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetEdgeOrdersAsync(string skipToken = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.AsyncPageable GetEdgeOrdersAsync(string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class MockableEdgeOrderSubscriptionResource : Azure.ResourceManager.ArmResource @@ -218,11 +253,23 @@ public partial class MockableEdgeOrderSubscriptionResource : Azure.ResourceManag protected MockableEdgeOrderSubscriptionResource() { } public virtual Azure.Pageable GetConfigurations(Azure.ResourceManager.EdgeOrder.Models.ConfigurationsContent content, string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetConfigurationsAsync(Azure.ResourceManager.EdgeOrder.Models.ConfigurationsContent content, string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetEdgeOrderAddresses(string filter = null, string skipToken = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.Pageable GetEdgeOrderAddresses(string filter = null, string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetEdgeOrderAddressesAsync(string filter = null, string skipToken = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.AsyncPageable GetEdgeOrderAddressesAsync(string filter = null, string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetEdgeOrderItems(string filter = null, string expand = null, string skipToken = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.Pageable GetEdgeOrderItems(string filter = null, string expand = null, string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetEdgeOrderItemsAsync(string filter = null, string expand = null, string skipToken = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.AsyncPageable GetEdgeOrderItemsAsync(string filter = null, string expand = null, string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetEdgeOrders(string skipToken = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.Pageable GetEdgeOrders(string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetEdgeOrdersAsync(string skipToken = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.AsyncPageable GetEdgeOrdersAsync(string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetProductFamilies(Azure.ResourceManager.EdgeOrder.Models.ProductFamiliesContent content, string expand = null, string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetProductFamiliesAsync(Azure.ResourceManager.EdgeOrder.Models.ProductFamiliesContent content, string expand = null, string skipToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -234,42 +281,119 @@ namespace Azure.ResourceManager.EdgeOrder.Models { public static partial class ArmEdgeOrderModelFactory { - public static Azure.ResourceManager.EdgeOrder.Models.ConfigurationFilters ConfigurationFilters(Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation hierarchyInformation = null, System.Collections.Generic.IEnumerable filterableProperty = null) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.ChildConfigurationCategoryInformation ChildConfigurationCategoryInformation(string categoryName = null, string categoryDisplayName = null, string description = null, System.Collections.Generic.IEnumerable links = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.EdgeOrder.Models.ConfigurationFilters ConfigurationFilters(Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation hierarchyInformation, System.Collections.Generic.IEnumerable filterableProperty) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.ConfigurationFilters ConfigurationFilters(Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation hierarchyInformation = null, System.Collections.Generic.IEnumerable filterableProperty = null, Azure.ResourceManager.EdgeOrder.Models.ChildConfigurationFilter childConfigurationFilter = null) { throw null; } public static Azure.ResourceManager.EdgeOrder.Models.CustomerSubscriptionDetails CustomerSubscriptionDetails(System.Collections.Generic.IEnumerable registeredFeatures = null, string locationPlacementId = null, string quotaId = null) { throw null; } - public static Azure.ResourceManager.EdgeOrder.EdgeOrderAddressData EdgeOrderAddressData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.EdgeOrder.Models.EdgeOrderShippingAddress shippingAddress = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressContactDetails contactDetails = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressValidationStatus? addressValidationStatus = default(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressValidationStatus?)) { throw null; } - public static Azure.ResourceManager.EdgeOrder.EdgeOrderData EdgeOrderData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IEnumerable orderItemIds = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderStageDetails currentStage = null, System.Collections.Generic.IEnumerable orderStageHistory = null) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.DevicePresenceVerificationDetails DevicePresenceVerificationDetails(Azure.ResourceManager.EdgeOrder.Models.DevicePresenceVerificationStatus? status = default(Azure.ResourceManager.EdgeOrder.Models.DevicePresenceVerificationStatus?), string message = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.EdgeOrder.EdgeOrderAddressData EdgeOrderAddressData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderShippingAddress shippingAddress, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressContactDetails contactDetails, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressValidationStatus? addressValidationStatus) { throw null; } + public static Azure.ResourceManager.EdgeOrder.EdgeOrderAddressData EdgeOrderAddressData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressClassification? addressClassification = default(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressClassification?), Azure.ResourceManager.EdgeOrder.Models.EdgeOrderShippingAddress shippingAddress = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressContactDetails contactDetails = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressValidationStatus? addressValidationStatus = default(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressValidationStatus?), Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningState? provisioningState = default(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningState?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.EdgeOrder.EdgeOrderData EdgeOrderData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IEnumerable orderItemIds, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderStageDetails currentStage, System.Collections.Generic.IEnumerable orderStageHistory) { throw null; } + public static Azure.ResourceManager.EdgeOrder.EdgeOrderData EdgeOrderData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IEnumerable orderItemIds = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderStageDetails currentStage = null, System.Collections.Generic.IEnumerable orderStageHistory = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemMode? orderMode = default(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemMode?)) { throw null; } public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemAddressDetails EdgeOrderItemAddressDetails(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemAddressProperties forwardAddress = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemAddressProperties returnAddress = null) { throw null; } - public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemAddressProperties EdgeOrderItemAddressProperties(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderShippingAddress shippingAddress = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressContactDetails contactDetails = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressValidationStatus? addressValidationStatus = default(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressValidationStatus?)) { throw null; } - public static Azure.ResourceManager.EdgeOrder.EdgeOrderItemData EdgeOrderItemData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemDetails orderItemDetails = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemAddressDetails addressDetails = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), Azure.Core.ResourceIdentifier orderId = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemAddressProperties EdgeOrderItemAddressProperties(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderShippingAddress shippingAddress, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressContactDetails contactDetails, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressValidationStatus? addressValidationStatus) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemAddressProperties EdgeOrderItemAddressProperties(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressClassification? addressClassification = default(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressClassification?), Azure.ResourceManager.EdgeOrder.Models.EdgeOrderShippingAddress shippingAddress = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressContactDetails contactDetails = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressValidationStatus? addressValidationStatus = default(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressValidationStatus?), Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningState? provisioningState = default(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningState?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.EdgeOrder.EdgeOrderItemData EdgeOrderItemData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemDetails orderItemDetails, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemAddressDetails addressDetails, System.DateTimeOffset? startOn, Azure.Core.ResourceIdentifier orderId) { throw null; } + public static Azure.ResourceManager.EdgeOrder.EdgeOrderItemData EdgeOrderItemData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemDetails orderItemDetails = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemAddressDetails addressDetails = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), Azure.Core.ResourceIdentifier orderId = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningState? provisioningState = default(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningState?), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemDetails EdgeOrderItemDetails(Azure.ResourceManager.EdgeOrder.Models.ProductDetails productDetails = null, Azure.ResourceManager.EdgeOrder.Models.OrderItemType orderItemType = default(Azure.ResourceManager.EdgeOrder.Models.OrderItemType), Azure.ResourceManager.EdgeOrder.Models.EdgeOrderStageDetails currentStage = null, System.Collections.Generic.IEnumerable orderItemStageHistory = null, Azure.ResourceManager.EdgeOrder.Models.OrderItemPreferences preferences = null, Azure.ResourceManager.EdgeOrder.Models.ForwardShippingDetails forwardShippingDetails = null, Azure.ResourceManager.EdgeOrder.Models.ReverseShippingDetails reverseShippingDetails = null, System.Collections.Generic.IEnumerable notificationEmailList = null, string cancellationReason = null, Azure.ResourceManager.EdgeOrder.Models.OrderItemCancellationStatus? cancellationStatus = default(Azure.ResourceManager.EdgeOrder.Models.OrderItemCancellationStatus?), Azure.ResourceManager.EdgeOrder.Models.EdgeOrderActionStatus? deletionStatus = default(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderActionStatus?), string returnReason = null, Azure.ResourceManager.EdgeOrder.Models.OrderItemReturnStatus? returnStatus = default(Azure.ResourceManager.EdgeOrder.Models.OrderItemReturnStatus?), string firstOrDefaultManagementResourceProviderNamespace = null, System.Collections.Generic.IEnumerable managementRPDetailsList = null, Azure.ResponseError error = null) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemDetails EdgeOrderItemDetails(Azure.ResourceManager.EdgeOrder.Models.ProductDetails productDetails = null, Azure.ResourceManager.EdgeOrder.Models.OrderItemType orderItemType = default(Azure.ResourceManager.EdgeOrder.Models.OrderItemType), Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemMode? orderItemMode = default(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemMode?), string siteId = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderStageDetails currentStage = null, System.Collections.Generic.IEnumerable orderItemStageHistory = null, Azure.ResourceManager.EdgeOrder.Models.OrderItemPreferences preferences = null, Azure.ResourceManager.EdgeOrder.Models.ForwardShippingDetails forwardShippingDetails = null, Azure.ResourceManager.EdgeOrder.Models.ReverseShippingDetails reverseShippingDetails = null, System.Collections.Generic.IEnumerable notificationEmailList = null, string cancellationReason = null, Azure.ResourceManager.EdgeOrder.Models.OrderItemCancellationStatus? cancellationStatus = default(Azure.ResourceManager.EdgeOrder.Models.OrderItemCancellationStatus?), Azure.ResourceManager.EdgeOrder.Models.EdgeOrderActionStatus? deletionStatus = default(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderActionStatus?), string returnReason = null, Azure.ResourceManager.EdgeOrder.Models.OrderItemReturnStatus? returnStatus = default(Azure.ResourceManager.EdgeOrder.Models.OrderItemReturnStatus?), System.Collections.Generic.IEnumerable managementRPDetailsList = null, Azure.ResponseError error = null, string firstOrDefaultManagementResourceProviderNamespace = null) { throw null; } public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemReturnContent EdgeOrderItemReturnContent(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemAddressProperties returnAddress = null, string returnReason = null, string serviceTag = null, bool? isShippingBoxRequired = default(bool?)) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProduct EdgeOrderProduct(System.Collections.Generic.IEnumerable configurations = null, string displayName = null, Azure.ResourceManager.EdgeOrder.Models.ProductDescription description = null, System.Collections.Generic.IEnumerable imageInformation = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductCostInformation costInformation = null, Azure.ResourceManager.EdgeOrder.Models.ProductAvailabilityInformation availabilityInformation = null, Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation hierarchyInformation = null, System.Collections.Generic.IEnumerable filterableProperties = null) { throw null; } public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProduct EdgeOrderProduct(string displayName = null, Azure.ResourceManager.EdgeOrder.Models.ProductDescription description = null, System.Collections.Generic.IEnumerable imageInformation = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductCostInformation costInformation = null, Azure.ResourceManager.EdgeOrder.Models.ProductAvailabilityInformation availabilityInformation = null, Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation hierarchyInformation = null, System.Collections.Generic.IEnumerable filterableProperties = null, System.Collections.Generic.IEnumerable configurations = null) { throw null; } - public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductBillingMeterDetails EdgeOrderProductBillingMeterDetails(string name = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductMeterDetails meterDetails = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductMeteringType? meteringType = default(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductMeteringType?), string frequency = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductBillingMeterDetails EdgeOrderProductBillingMeterDetails(string name, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductMeterDetails meterDetails, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductMeteringType? meteringType, string frequency) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductBillingMeterDetails EdgeOrderProductBillingMeterDetails(string name = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductMeterDetails meterDetails = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductMeteringType? meteringType = default(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductMeteringType?), string frequency = null, Azure.ResourceManager.EdgeOrder.Models.TermTypeDetails termTypeDetails = null) { throw null; } public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductCostInformation EdgeOrderProductCostInformation(System.Collections.Generic.IEnumerable billingMeterDetails = null, System.Uri billingInfoUri = null) { throw null; } - public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductDeviceDetails EdgeOrderProductDeviceDetails(string serialNumber = null, string managementResourceId = null, string managementResourceTenantId = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductDeviceDetails EdgeOrderProductDeviceDetails(string serialNumber, string managementResourceId, string managementResourceTenantId) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductDeviceDetails EdgeOrderProductDeviceDetails(string serialNumber = null, string displaySerialNumber = null, string managementResourceId = null, string managementResourceTenantId = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningSupport? provisioningSupport = default(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningSupport?), Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningDetails provisioningDetails = null) { throw null; } public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductImageInformation EdgeOrderProductImageInformation(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductImageType? imageType = default(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductImageType?), System.Uri imageUri = null) { throw null; } public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductMeterDetails EdgeOrderProductMeterDetails(string billingType = null, double? multiplier = default(double?), Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductChargingType? chargingType = default(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductChargingType?)) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningDetails EdgeOrderProvisioningDetails(int? quantity = default(int?), Azure.Core.ResourceIdentifier provisioningArmId = null, string provisioningEndPoint = null, string serialNumber = null, string vendorName = null, Azure.Core.ResourceIdentifier readyToConnectArmId = null, Azure.Core.ResourceIdentifier managementResourceArmId = null, string uniqueDeviceIdentifier = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAutoProvisioningStatus? autoProvisioningStatus = default(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAutoProvisioningStatus?), Azure.ResourceManager.EdgeOrder.Models.DevicePresenceVerificationDetails devicePresenceVerification = null) { throw null; } public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderStageDetails EdgeOrderStageDetails(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderStageStatus? stageStatus = default(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderStageStatus?), Azure.ResourceManager.EdgeOrder.Models.EdgeOrderStageName? stageName = default(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderStageName?), string displayName = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.EdgeOrder.Models.ForwardShippingDetails ForwardShippingDetails(string carrierName = null, string carrierDisplayName = null, string trackingId = null, System.Uri trackingUri = null) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.GroupedChildConfigurations GroupedChildConfigurations(Azure.ResourceManager.EdgeOrder.Models.ChildConfigurationCategoryInformation categoryInformation = null, System.Collections.Generic.IEnumerable childConfigurations = null) { throw null; } public static Azure.ResourceManager.EdgeOrder.Models.Pav2MeterDetails Pav2MeterDetails(double? multiplier = default(double?), Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductChargingType? chargingType = default(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductChargingType?), System.Guid? meterGuid = default(System.Guid?)) { throw null; } public static Azure.ResourceManager.EdgeOrder.Models.ProductAvailabilityInformation ProductAvailabilityInformation(Azure.ResourceManager.EdgeOrder.Models.ProductAvailabilityStage? availabilityStage = default(Azure.ResourceManager.EdgeOrder.Models.ProductAvailabilityStage?), Azure.ResourceManager.EdgeOrder.Models.ProductDisabledReason? disabledReason = default(Azure.ResourceManager.EdgeOrder.Models.ProductDisabledReason?), string disabledReasonMessage = null) { throw null; } - public static Azure.ResourceManager.EdgeOrder.Models.ProductConfiguration ProductConfiguration(string displayName = null, Azure.ResourceManager.EdgeOrder.Models.ProductDescription description = null, System.Collections.Generic.IEnumerable imageInformation = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductCostInformation costInformation = null, Azure.ResourceManager.EdgeOrder.Models.ProductAvailabilityInformation availabilityInformation = null, Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation hierarchyInformation = null, System.Collections.Generic.IEnumerable filterableProperties = null, System.Collections.Generic.IEnumerable specifications = null, Azure.ResourceManager.EdgeOrder.Models.ProductDimensions dimensions = null) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.ProductChildConfiguration ProductChildConfiguration(Azure.ResourceManager.EdgeOrder.Models.ChildConfigurationType? childConfigurationType = default(Azure.ResourceManager.EdgeOrder.Models.ChildConfigurationType?), bool? isPartOfBaseConfiguration = default(bool?), int? minimumQuantity = default(int?), int? maximumQuantity = default(int?), System.Collections.Generic.IEnumerable specifications = null, Azure.ResourceManager.EdgeOrder.Models.ProductDimensions dimensions = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningSupport? provisioningSupport = default(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningSupport?), System.Collections.Generic.IEnumerable childConfigurationTypes = null, System.Collections.Generic.IEnumerable groupedChildConfigurations = null, System.Collections.Generic.IEnumerable supportedTermCommitmentDurations = null, System.Collections.Generic.IEnumerable filterableProperties = null, string displayName = null, Azure.ResourceManager.EdgeOrder.Models.ProductDescription description = null, System.Collections.Generic.IEnumerable imageInformation = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductCostInformation costInformation = null, Azure.ResourceManager.EdgeOrder.Models.ProductAvailabilityInformation availabilityInformation = null, Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation hierarchyInformation = null, Azure.ResourceManager.EdgeOrder.Models.ConfigurationFulfillmentType? fulfilledBy = default(Azure.ResourceManager.EdgeOrder.Models.ConfigurationFulfillmentType?)) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.ProductConfiguration ProductConfiguration(System.Collections.Generic.IEnumerable specifications = null, Azure.ResourceManager.EdgeOrder.Models.ProductDimensions dimensions = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningSupport? provisioningSupport = default(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningSupport?), System.Collections.Generic.IEnumerable childConfigurationTypes = null, System.Collections.Generic.IEnumerable groupedChildConfigurations = null, System.Collections.Generic.IEnumerable supportedTermCommitmentDurations = null, string displayName = null, Azure.ResourceManager.EdgeOrder.Models.ProductDescription description = null, System.Collections.Generic.IEnumerable imageInformation = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductCostInformation costInformation = null, Azure.ResourceManager.EdgeOrder.Models.ProductAvailabilityInformation availabilityInformation = null, Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation hierarchyInformation = null, System.Collections.Generic.IEnumerable filterableProperties = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.EdgeOrder.Models.ProductConfiguration ProductConfiguration(string displayName, Azure.ResourceManager.EdgeOrder.Models.ProductDescription description, System.Collections.Generic.IEnumerable imageInformation, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductCostInformation costInformation, Azure.ResourceManager.EdgeOrder.Models.ProductAvailabilityInformation availabilityInformation, Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation hierarchyInformation, System.Collections.Generic.IEnumerable filterableProperties, System.Collections.Generic.IEnumerable specifications, Azure.ResourceManager.EdgeOrder.Models.ProductDimensions dimensions) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.ProductConfigurationDeviceDetails ProductConfigurationDeviceDetails(Azure.ResourceManager.EdgeOrder.Models.ProductDisplayInfo displayInfo = null, Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation hierarchyInformation = null, int? quantity = default(int?), Azure.ResourceManager.EdgeOrder.Models.ConfigurationIdentificationType? identificationType = default(Azure.ResourceManager.EdgeOrder.Models.ConfigurationIdentificationType?), System.Collections.Generic.IEnumerable deviceDetails = null, Azure.ResourceManager.EdgeOrder.Models.TermCommitmentInformation termCommitmentInformation = null) { throw null; } public static Azure.ResourceManager.EdgeOrder.Models.ProductDescription ProductDescription(Azure.ResourceManager.EdgeOrder.Models.ProductDescriptionType? descriptionType = default(Azure.ResourceManager.EdgeOrder.Models.ProductDescriptionType?), string shortDescription = null, string longDescription = null, System.Collections.Generic.IEnumerable keywords = null, System.Collections.Generic.IEnumerable attributes = null, System.Collections.Generic.IEnumerable links = null) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.ProductDetails ProductDetails(Azure.ResourceManager.EdgeOrder.Models.ProductDisplayInfo displayInfo = null, Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation hierarchyInformation = null, Azure.ResourceManager.EdgeOrder.Models.DoubleEncryptionStatus? productDoubleEncryptionStatus = default(Azure.ResourceManager.EdgeOrder.Models.DoubleEncryptionStatus?), Azure.ResourceManager.EdgeOrder.Models.ConfigurationIdentificationType? identificationType = default(Azure.ResourceManager.EdgeOrder.Models.ConfigurationIdentificationType?), Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductDeviceDetails parentDeviceDetails = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningDetails parentProvisioningDetails = null, System.Collections.Generic.IEnumerable optInAdditionalConfigurations = null, System.Collections.Generic.IEnumerable childConfigurationDeviceDetails = null, Azure.ResourceManager.EdgeOrder.Models.TermCommitmentInformation termCommitmentInformation = null, int? count = default(int?), System.Collections.Generic.IEnumerable deviceDetails = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.EdgeOrder.Models.ProductDetails ProductDetails(Azure.ResourceManager.EdgeOrder.Models.ProductDisplayInfo displayInfo = null, Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation hierarchyInformation = null, int? count = default(int?), Azure.ResourceManager.EdgeOrder.Models.DoubleEncryptionStatus? productDoubleEncryptionStatus = default(Azure.ResourceManager.EdgeOrder.Models.DoubleEncryptionStatus?), System.Collections.Generic.IEnumerable deviceDetails = null) { throw null; } public static Azure.ResourceManager.EdgeOrder.Models.ProductDimensions ProductDimensions(double? length = default(double?), double? height = default(double?), double? width = default(double?), Azure.ResourceManager.EdgeOrder.Models.ProductLengthHeightWidthUnit? lengthHeightUnit = default(Azure.ResourceManager.EdgeOrder.Models.ProductLengthHeightWidthUnit?), double? weight = default(double?), double? depth = default(double?), Azure.ResourceManager.EdgeOrder.Models.ProductWeightMeasurementUnit? weightUnit = default(Azure.ResourceManager.EdgeOrder.Models.ProductWeightMeasurementUnit?)) { throw null; } public static Azure.ResourceManager.EdgeOrder.Models.ProductDisplayInfo ProductDisplayInfo(string productFamilyDisplayName = null, string configurationDisplayName = null) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.ProductFamiliesMetadata ProductFamiliesMetadata(System.Collections.Generic.IEnumerable productLines = null, System.Collections.Generic.IEnumerable resourceProviderDetails = null, string displayName = null, Azure.ResourceManager.EdgeOrder.Models.ProductDescription description = null, System.Collections.Generic.IEnumerable imageInformation = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductCostInformation costInformation = null, Azure.ResourceManager.EdgeOrder.Models.ProductAvailabilityInformation availabilityInformation = null, Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation hierarchyInformation = null, System.Collections.Generic.IEnumerable filterableProperties = null) { throw null; } public static Azure.ResourceManager.EdgeOrder.Models.ProductFamiliesMetadata ProductFamiliesMetadata(string displayName = null, Azure.ResourceManager.EdgeOrder.Models.ProductDescription description = null, System.Collections.Generic.IEnumerable imageInformation = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductCostInformation costInformation = null, Azure.ResourceManager.EdgeOrder.Models.ProductAvailabilityInformation availabilityInformation = null, Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation hierarchyInformation = null, System.Collections.Generic.IEnumerable filterableProperties = null, System.Collections.Generic.IEnumerable productLines = null, System.Collections.Generic.IEnumerable resourceProviderDetails = null) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.ProductFamily ProductFamily(System.Collections.Generic.IEnumerable productLines = null, System.Collections.Generic.IEnumerable resourceProviderDetails = null, string displayName = null, Azure.ResourceManager.EdgeOrder.Models.ProductDescription description = null, System.Collections.Generic.IEnumerable imageInformation = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductCostInformation costInformation = null, Azure.ResourceManager.EdgeOrder.Models.ProductAvailabilityInformation availabilityInformation = null, Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation hierarchyInformation = null, System.Collections.Generic.IEnumerable filterableProperties = null) { throw null; } public static Azure.ResourceManager.EdgeOrder.Models.ProductFamily ProductFamily(string displayName = null, Azure.ResourceManager.EdgeOrder.Models.ProductDescription description = null, System.Collections.Generic.IEnumerable imageInformation = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductCostInformation costInformation = null, Azure.ResourceManager.EdgeOrder.Models.ProductAvailabilityInformation availabilityInformation = null, Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation hierarchyInformation = null, System.Collections.Generic.IEnumerable filterableProperties = null, System.Collections.Generic.IEnumerable productLines = null, System.Collections.Generic.IEnumerable resourceProviderDetails = null) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.ProductLine ProductLine(System.Collections.Generic.IEnumerable products = null, string displayName = null, Azure.ResourceManager.EdgeOrder.Models.ProductDescription description = null, System.Collections.Generic.IEnumerable imageInformation = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductCostInformation costInformation = null, Azure.ResourceManager.EdgeOrder.Models.ProductAvailabilityInformation availabilityInformation = null, Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation hierarchyInformation = null, System.Collections.Generic.IEnumerable filterableProperties = null) { throw null; } public static Azure.ResourceManager.EdgeOrder.Models.ProductLine ProductLine(string displayName = null, Azure.ResourceManager.EdgeOrder.Models.ProductDescription description = null, System.Collections.Generic.IEnumerable imageInformation = null, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductCostInformation costInformation = null, Azure.ResourceManager.EdgeOrder.Models.ProductAvailabilityInformation availabilityInformation = null, Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation hierarchyInformation = null, System.Collections.Generic.IEnumerable filterableProperties = null, System.Collections.Generic.IEnumerable products = null) { throw null; } public static Azure.ResourceManager.EdgeOrder.Models.ProductLink ProductLink(Azure.ResourceManager.EdgeOrder.Models.ProductLinkType? linkType = default(Azure.ResourceManager.EdgeOrder.Models.ProductLinkType?), System.Uri linkUri = null) { throw null; } public static Azure.ResourceManager.EdgeOrder.Models.ProductSpecification ProductSpecification(string name = null, string value = null) { throw null; } public static Azure.ResourceManager.EdgeOrder.Models.PurchaseMeterDetails PurchaseMeterDetails(double? multiplier = default(double?), Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductChargingType? chargingType = default(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductChargingType?), string productId = null, string skuId = null, string termId = null) { throw null; } public static Azure.ResourceManager.EdgeOrder.Models.ResourceProviderDetails ResourceProviderDetails(string resourceProviderNamespace = null) { throw null; } public static Azure.ResourceManager.EdgeOrder.Models.ReverseShippingDetails ReverseShippingDetails(string sasKeyForLabel = null, string carrierName = null, string carrierDisplayName = null, string trackingId = null, System.Uri trackingUri = null) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.TermCommitmentInformation TermCommitmentInformation(Azure.ResourceManager.EdgeOrder.Models.TermCommitmentType termCommitmentType = default(Azure.ResourceManager.EdgeOrder.Models.TermCommitmentType), System.TimeSpan? termCommitmentTypeDuration = default(System.TimeSpan?), int? pendingDaysForTerm = default(int?)) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.TermTypeDetails TermTypeDetails(Azure.ResourceManager.EdgeOrder.Models.TermCommitmentType termType = default(Azure.ResourceManager.EdgeOrder.Models.TermCommitmentType), System.TimeSpan termTypeDuration = default(System.TimeSpan)) { throw null; } + } + public partial class ChildConfigurationCategoryInformation : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ChildConfigurationCategoryInformation() { } + public string CategoryDisplayName { get { throw null; } } + public string CategoryName { get { throw null; } } + public string Description { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Links { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EdgeOrder.Models.ChildConfigurationCategoryInformation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EdgeOrder.Models.ChildConfigurationCategoryInformation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ChildConfigurationFilter : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ChildConfigurationFilter() { } + public System.Collections.Generic.IList ChildConfigurationTypes { get { throw null; } } + public System.Collections.Generic.IList HierarchyInformations { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EdgeOrder.Models.ChildConfigurationFilter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EdgeOrder.Models.ChildConfigurationFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ChildConfigurationType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ChildConfigurationType(string value) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.ChildConfigurationType AdditionalConfiguration { get { throw null; } } + public static Azure.ResourceManager.EdgeOrder.Models.ChildConfigurationType DeviceConfiguration { get { throw null; } } + public bool Equals(Azure.ResourceManager.EdgeOrder.Models.ChildConfigurationType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.EdgeOrder.Models.ChildConfigurationType left, Azure.ResourceManager.EdgeOrder.Models.ChildConfigurationType right) { throw null; } + public static implicit operator Azure.ResourceManager.EdgeOrder.Models.ChildConfigurationType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.EdgeOrder.Models.ChildConfigurationType left, Azure.ResourceManager.EdgeOrder.Models.ChildConfigurationType right) { throw null; } + public override string ToString() { throw null; } } public partial class ConfigurationFilters : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ConfigurationFilters(Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation hierarchyInformation) { } + public Azure.ResourceManager.EdgeOrder.Models.ChildConfigurationFilter ChildConfigurationFilter { get { throw null; } set { } } public System.Collections.Generic.IList FilterableProperty { get { throw null; } } public Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation HierarchyInformation { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -279,9 +403,49 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ConfigurationFulfillmentType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ConfigurationFulfillmentType(string value) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.ConfigurationFulfillmentType External { get { throw null; } } + public static Azure.ResourceManager.EdgeOrder.Models.ConfigurationFulfillmentType Microsoft { get { throw null; } } + public bool Equals(Azure.ResourceManager.EdgeOrder.Models.ConfigurationFulfillmentType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.EdgeOrder.Models.ConfigurationFulfillmentType left, Azure.ResourceManager.EdgeOrder.Models.ConfigurationFulfillmentType right) { throw null; } + public static implicit operator Azure.ResourceManager.EdgeOrder.Models.ConfigurationFulfillmentType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.EdgeOrder.Models.ConfigurationFulfillmentType left, Azure.ResourceManager.EdgeOrder.Models.ConfigurationFulfillmentType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ConfigurationIdentificationType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ConfigurationIdentificationType(string value) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.ConfigurationIdentificationType NotSupported { get { throw null; } } + public static Azure.ResourceManager.EdgeOrder.Models.ConfigurationIdentificationType SerialNumber { get { throw null; } } + public bool Equals(Azure.ResourceManager.EdgeOrder.Models.ConfigurationIdentificationType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.EdgeOrder.Models.ConfigurationIdentificationType left, Azure.ResourceManager.EdgeOrder.Models.ConfigurationIdentificationType right) { throw null; } + public static implicit operator Azure.ResourceManager.EdgeOrder.Models.ConfigurationIdentificationType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.EdgeOrder.Models.ConfigurationIdentificationType left, Azure.ResourceManager.EdgeOrder.Models.ConfigurationIdentificationType right) { throw null; } + public override string ToString() { throw null; } + } public partial class ConfigurationsContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + public ConfigurationsContent() { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public ConfigurationsContent(System.Collections.Generic.IEnumerable configurationFilters) { } + public Azure.ResourceManager.EdgeOrder.Models.ConfigurationFilters ConfigurationFilter { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public System.Collections.Generic.IList ConfigurationFilters { get { throw null; } } public Azure.ResourceManager.EdgeOrder.Models.CustomerSubscriptionDetails CustomerSubscriptionDetails { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -316,6 +480,36 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class DevicePresenceVerificationDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DevicePresenceVerificationDetails() { } + public string Message { get { throw null; } } + public Azure.ResourceManager.EdgeOrder.Models.DevicePresenceVerificationStatus? Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EdgeOrder.Models.DevicePresenceVerificationDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EdgeOrder.Models.DevicePresenceVerificationDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DevicePresenceVerificationStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DevicePresenceVerificationStatus(string value) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.DevicePresenceVerificationStatus Completed { get { throw null; } } + public static Azure.ResourceManager.EdgeOrder.Models.DevicePresenceVerificationStatus NotInitiated { get { throw null; } } + public bool Equals(Azure.ResourceManager.EdgeOrder.Models.DevicePresenceVerificationStatus other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.EdgeOrder.Models.DevicePresenceVerificationStatus left, Azure.ResourceManager.EdgeOrder.Models.DevicePresenceVerificationStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.EdgeOrder.Models.DevicePresenceVerificationStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.EdgeOrder.Models.DevicePresenceVerificationStatus left, Azure.ResourceManager.EdgeOrder.Models.DevicePresenceVerificationStatus right) { throw null; } + public override string ToString() { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct DoubleEncryptionStatus : System.IEquatable { @@ -352,8 +546,28 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderActionStatus left, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderActionStatus right) { throw null; } public override string ToString() { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct EdgeOrderAddressClassification : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public EdgeOrderAddressClassification(string value) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressClassification Shipping { get { throw null; } } + public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressClassification Site { get { throw null; } } + public bool Equals(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressClassification other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressClassification left, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressClassification right) { throw null; } + public static implicit operator Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressClassification (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressClassification left, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressClassification right) { throw null; } + public override string ToString() { throw null; } + } public partial class EdgeOrderAddressContactDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + public EdgeOrderAddressContactDetails() { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public EdgeOrderAddressContactDetails(string contactName, string phone, System.Collections.Generic.IEnumerable emailList) { } public string ContactName { get { throw null; } set { } } public System.Collections.Generic.IList EmailList { get { throw null; } } @@ -418,6 +632,24 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressValidationStatus left, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressValidationStatus right) { throw null; } public override string ToString() { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct EdgeOrderAutoProvisioningStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public EdgeOrderAutoProvisioningStatus(string value) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAutoProvisioningStatus Disabled { get { throw null; } } + public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAutoProvisioningStatus Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAutoProvisioningStatus other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAutoProvisioningStatus left, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAutoProvisioningStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAutoProvisioningStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAutoProvisioningStatus left, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAutoProvisioningStatus right) { throw null; } + public override string ToString() { throw null; } + } public partial class EdgeOrderItemAddressDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public EdgeOrderItemAddressDetails(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemAddressProperties forwardAddress) { } @@ -432,9 +664,13 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public partial class EdgeOrderItemAddressProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + public EdgeOrderItemAddressProperties() { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public EdgeOrderItemAddressProperties(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressContactDetails contactDetails) { } + public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressClassification? AddressClassification { get { throw null; } set { } } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressValidationStatus? AddressValidationStatus { get { throw null; } } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressContactDetails ContactDetails { get { throw null; } set { } } + public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderShippingAddress ShippingAddress { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemAddressProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -462,10 +698,12 @@ public EdgeOrderItemDetails(Azure.ResourceManager.EdgeOrder.Models.ProductDetail public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderStageDetails CurrentStage { get { throw null; } } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderActionStatus? DeletionStatus { get { throw null; } } public Azure.ResponseError Error { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public string FirstOrDefaultManagementResourceProviderNamespace { get { throw null; } } public Azure.ResourceManager.EdgeOrder.Models.ForwardShippingDetails ForwardShippingDetails { get { throw null; } } public System.Collections.Generic.IReadOnlyList ManagementRPDetailsList { get { throw null; } } public System.Collections.Generic.IList NotificationEmailList { get { throw null; } } + public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemMode? OrderItemMode { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList OrderItemStageHistory { get { throw null; } } public Azure.ResourceManager.EdgeOrder.Models.OrderItemType OrderItemType { get { throw null; } set { } } public Azure.ResourceManager.EdgeOrder.Models.OrderItemPreferences Preferences { get { throw null; } set { } } @@ -473,6 +711,7 @@ public EdgeOrderItemDetails(Azure.ResourceManager.EdgeOrder.Models.ProductDetail public string ReturnReason { get { throw null; } } public Azure.ResourceManager.EdgeOrder.Models.OrderItemReturnStatus? ReturnStatus { get { throw null; } } public Azure.ResourceManager.EdgeOrder.Models.ReverseShippingDetails ReverseShippingDetails { get { throw null; } } + public string SiteId { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -480,11 +719,43 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class EdgeOrderItemDetailsPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeOrderItemDetailsPatch() { } + public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningDetails ParentProvisioningDetails { get { throw null; } set { } } + public string SiteId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemDetailsPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemDetailsPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct EdgeOrderItemMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public EdgeOrderItemMode(string value) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemMode Default { get { throw null; } } + public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemMode DoNotFulfill { get { throw null; } } + public bool Equals(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemMode other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemMode left, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemMode right) { throw null; } + public static implicit operator Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemMode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemMode left, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemMode right) { throw null; } + public override string ToString() { throw null; } + } public partial class EdgeOrderItemPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public EdgeOrderItemPatch() { } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemAddressProperties ForwardAddress { get { throw null; } set { } } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public System.Collections.Generic.IList NotificationEmailList { get { throw null; } } + public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderItemDetailsPatch OrderItemDetails { get { throw null; } set { } } public Azure.ResourceManager.EdgeOrder.Models.OrderItemPreferences Preferences { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -533,6 +804,7 @@ internal EdgeOrderProductBillingMeterDetails() { } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductMeterDetails MeterDetails { get { throw null; } } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductMeteringType? MeteringType { get { throw null; } } public string Name { get { throw null; } } + public Azure.ResourceManager.EdgeOrder.Models.TermTypeDetails TermTypeDetails { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductBillingMeterDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -573,8 +845,11 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class EdgeOrderProductDeviceDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal EdgeOrderProductDeviceDetails() { } + public string DisplaySerialNumber { get { throw null; } } public string ManagementResourceId { get { throw null; } } public string ManagementResourceTenantId { get { throw null; } } + public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningDetails ProvisioningDetails { get { throw null; } } + public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningSupport? ProvisioningSupport { get { throw null; } } public string SerialNumber { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductDeviceDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -645,8 +920,68 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductMeteringType left, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductMeteringType right) { throw null; } public override string ToString() { throw null; } } + public partial class EdgeOrderProvisioningDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EdgeOrderProvisioningDetails() { } + public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAutoProvisioningStatus? AutoProvisioningStatus { get { throw null; } set { } } + public Azure.ResourceManager.EdgeOrder.Models.DevicePresenceVerificationDetails DevicePresenceVerification { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier ManagementResourceArmId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier ProvisioningArmId { get { throw null; } set { } } + public string ProvisioningEndPoint { get { throw null; } set { } } + public int? Quantity { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier ReadyToConnectArmId { get { throw null; } set { } } + public string SerialNumber { get { throw null; } set { } } + public string UniqueDeviceIdentifier { get { throw null; } } + public string VendorName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct EdgeOrderProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public EdgeOrderProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningState Creating { get { throw null; } } + public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningState left, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningState left, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct EdgeOrderProvisioningSupport : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public EdgeOrderProvisioningSupport(string value) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningSupport CloudBased { get { throw null; } } + public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningSupport Manual { get { throw null; } } + public bool Equals(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningSupport other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningSupport left, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningSupport right) { throw null; } + public static implicit operator Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningSupport (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningSupport left, Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningSupport right) { throw null; } + public override string ToString() { throw null; } + } public partial class EdgeOrderShippingAddress : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + public EdgeOrderShippingAddress(string country) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public EdgeOrderShippingAddress(string streetAddress1, string country) { } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderAddressType? AddressType { get { throw null; } set { } } public string City { get { throw null; } set { } } @@ -691,6 +1026,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderStageName InReview { get { throw null; } } public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderStageName InUse { get { throw null; } } public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderStageName Placed { get { throw null; } } + public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderStageName ReadyToSetup { get { throw null; } } public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderStageName ReadyToShip { get { throw null; } } public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderStageName ReturnCompleted { get { throw null; } } public static Azure.ResourceManager.EdgeOrder.Models.EdgeOrderStageName ReturnedToMicrosoft { get { throw null; } } @@ -755,9 +1091,22 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class GroupedChildConfigurations : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal GroupedChildConfigurations() { } + public Azure.ResourceManager.EdgeOrder.Models.ChildConfigurationCategoryInformation CategoryInformation { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ChildConfigurations { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EdgeOrder.Models.GroupedChildConfigurations System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EdgeOrder.Models.GroupedChildConfigurations System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class HierarchyInformation : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public HierarchyInformation() { } + public string ConfigurationIdDisplayName { get { throw null; } set { } } public string ConfigurationName { get { throw null; } set { } } public string ProductFamilyName { get { throw null; } set { } } public string ProductLineName { get { throw null; } set { } } @@ -824,6 +1173,7 @@ public OrderItemPreferences() { } public Azure.ResourceManager.EdgeOrder.Models.DoubleEncryptionStatus? DoubleEncryptionStatus { get { throw null; } set { } } public System.Collections.Generic.IList NotificationPreferences { get { throw null; } } public string PreferredManagementResourceId { get { throw null; } set { } } + public Azure.ResourceManager.EdgeOrder.Models.TermCommitmentPreferences TermCommitmentPreferences { get { throw null; } set { } } public Azure.ResourceManager.EdgeOrder.Models.TransportShipmentType? TransportPreferencesPreferredShipmentType { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.OrderItemPreferences System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -857,6 +1207,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer private readonly object _dummy; private readonly int _dummyPrimitive; public OrderItemType(string value) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.OrderItemType External { get { throw null; } } public static Azure.ResourceManager.EdgeOrder.Models.OrderItemType Purchase { get { throw null; } } public static Azure.ResourceManager.EdgeOrder.Models.OrderItemType Rental { get { throw null; } } public bool Equals(Azure.ResourceManager.EdgeOrder.Models.OrderItemType other) { throw null; } @@ -902,6 +1253,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static Azure.ResourceManager.EdgeOrder.Models.ProductAvailabilityStage Available { get { throw null; } } public static Azure.ResourceManager.EdgeOrder.Models.ProductAvailabilityStage ComingSoon { get { throw null; } } public static Azure.ResourceManager.EdgeOrder.Models.ProductAvailabilityStage Deprecated { get { throw null; } } + public static Azure.ResourceManager.EdgeOrder.Models.ProductAvailabilityStage Discoverable { get { throw null; } } public static Azure.ResourceManager.EdgeOrder.Models.ProductAvailabilityStage Preview { get { throw null; } } public static Azure.ResourceManager.EdgeOrder.Models.ProductAvailabilityStage SignUp { get { throw null; } } public static Azure.ResourceManager.EdgeOrder.Models.ProductAvailabilityStage Unavailable { get { throw null; } } @@ -915,18 +1267,50 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.EdgeOrder.Models.ProductAvailabilityStage left, Azure.ResourceManager.EdgeOrder.Models.ProductAvailabilityStage right) { throw null; } public override string ToString() { throw null; } } + public partial class ProductChildConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ProductChildConfiguration() { } + public Azure.ResourceManager.EdgeOrder.Models.ProductAvailabilityInformation AvailabilityInformation { get { throw null; } } + public Azure.ResourceManager.EdgeOrder.Models.ChildConfigurationType? ChildConfigurationType { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ChildConfigurationTypes { get { throw null; } } + public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductCostInformation CostInformation { get { throw null; } } + public Azure.ResourceManager.EdgeOrder.Models.ProductDescription Description { get { throw null; } } + public Azure.ResourceManager.EdgeOrder.Models.ProductDimensions Dimensions { get { throw null; } } + public string DisplayName { get { throw null; } } + public System.Collections.Generic.IReadOnlyList FilterableProperties { get { throw null; } } + public Azure.ResourceManager.EdgeOrder.Models.ConfigurationFulfillmentType? FulfilledBy { get { throw null; } } + public System.Collections.Generic.IReadOnlyList GroupedChildConfigurations { get { throw null; } } + public Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation HierarchyInformation { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ImageInformation { get { throw null; } } + public bool? IsPartOfBaseConfiguration { get { throw null; } } + public int? MaximumQuantity { get { throw null; } } + public int? MinimumQuantity { get { throw null; } } + public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningSupport? ProvisioningSupport { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Specifications { get { throw null; } } + public System.Collections.Generic.IReadOnlyList SupportedTermCommitmentDurations { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EdgeOrder.Models.ProductChildConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EdgeOrder.Models.ProductChildConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ProductConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ProductConfiguration() { } public Azure.ResourceManager.EdgeOrder.Models.ProductAvailabilityInformation AvailabilityInformation { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ChildConfigurationTypes { get { throw null; } } public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductCostInformation CostInformation { get { throw null; } } public Azure.ResourceManager.EdgeOrder.Models.ProductDescription Description { get { throw null; } } public Azure.ResourceManager.EdgeOrder.Models.ProductDimensions Dimensions { get { throw null; } } public string DisplayName { get { throw null; } } public System.Collections.Generic.IReadOnlyList FilterableProperties { get { throw null; } } + public System.Collections.Generic.IReadOnlyList GroupedChildConfigurations { get { throw null; } } public Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation HierarchyInformation { get { throw null; } } public System.Collections.Generic.IReadOnlyList ImageInformation { get { throw null; } } + public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningSupport? ProvisioningSupport { get { throw null; } } public System.Collections.Generic.IReadOnlyList Specifications { get { throw null; } } + public System.Collections.Generic.IReadOnlyList SupportedTermCommitmentDurations { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.ProductConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -934,6 +1318,22 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class ProductConfigurationDeviceDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ProductConfigurationDeviceDetails() { } + public System.Collections.Generic.IReadOnlyList DeviceDetails { get { throw null; } } + public Azure.ResourceManager.EdgeOrder.Models.ProductDisplayInfo DisplayInfo { get { throw null; } } + public Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation HierarchyInformation { get { throw null; } } + public Azure.ResourceManager.EdgeOrder.Models.ConfigurationIdentificationType? IdentificationType { get { throw null; } } + public int? Quantity { get { throw null; } } + public Azure.ResourceManager.EdgeOrder.Models.TermCommitmentInformation TermCommitmentInformation { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EdgeOrder.Models.ProductConfigurationDeviceDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EdgeOrder.Models.ProductConfigurationDeviceDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ProductDescription : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ProductDescription() { } @@ -970,11 +1370,19 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class ProductDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ProductDetails(Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation hierarchyInformation) { } + public System.Collections.Generic.IReadOnlyList ChildConfigurationDeviceDetails { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public int? Count { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public System.Collections.Generic.IReadOnlyList DeviceDetails { get { throw null; } } public Azure.ResourceManager.EdgeOrder.Models.ProductDisplayInfo DisplayInfo { get { throw null; } set { } } public Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation HierarchyInformation { get { throw null; } set { } } + public Azure.ResourceManager.EdgeOrder.Models.ConfigurationIdentificationType? IdentificationType { get { throw null; } } + public System.Collections.Generic.IList OptInAdditionalConfigurations { get { throw null; } } + public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProductDeviceDetails ParentDeviceDetails { get { throw null; } } + public Azure.ResourceManager.EdgeOrder.Models.EdgeOrderProvisioningDetails ParentProvisioningDetails { get { throw null; } set { } } public Azure.ResourceManager.EdgeOrder.Models.DoubleEncryptionStatus? ProductDoubleEncryptionStatus { get { throw null; } } + public Azure.ResourceManager.EdgeOrder.Models.TermCommitmentInformation TermCommitmentInformation { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.EdgeOrder.Models.ProductDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -982,6 +1390,19 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class ProductDetailsAdditionalConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProductDetailsAdditionalConfiguration(Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation hierarchyInformation, int quantity) { } + public Azure.ResourceManager.EdgeOrder.Models.HierarchyInformation HierarchyInformation { get { throw null; } set { } } + public System.Collections.Generic.IList ProvisioningDetails { get { throw null; } } + public int Quantity { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EdgeOrder.Models.ProductDetailsAdditionalConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EdgeOrder.Models.ProductDetailsAdditionalConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ProductDimensions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ProductDimensions() { } @@ -1139,6 +1560,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer private readonly object _dummy; private readonly int _dummyPrimitive; public ProductLinkType(string value) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.ProductLinkType Discoverable { get { throw null; } } public static Azure.ResourceManager.EdgeOrder.Models.ProductLinkType Documentation { get { throw null; } } public static Azure.ResourceManager.EdgeOrder.Models.ProductLinkType Generic { get { throw null; } } public static Azure.ResourceManager.EdgeOrder.Models.ProductLinkType KnowMore { get { throw null; } } @@ -1242,6 +1664,62 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.EdgeOrder.Models.SupportedFilterType left, Azure.ResourceManager.EdgeOrder.Models.SupportedFilterType right) { throw null; } public override string ToString() { throw null; } } + public partial class TermCommitmentInformation : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TermCommitmentInformation() { } + public int? PendingDaysForTerm { get { throw null; } } + public Azure.ResourceManager.EdgeOrder.Models.TermCommitmentType TermCommitmentType { get { throw null; } } + public System.TimeSpan? TermCommitmentTypeDuration { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EdgeOrder.Models.TermCommitmentInformation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EdgeOrder.Models.TermCommitmentInformation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TermCommitmentPreferences : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public TermCommitmentPreferences(Azure.ResourceManager.EdgeOrder.Models.TermCommitmentType preferredTermCommitmentType) { } + public System.TimeSpan? PreferredTermCommitmentDuration { get { throw null; } set { } } + public Azure.ResourceManager.EdgeOrder.Models.TermCommitmentType PreferredTermCommitmentType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EdgeOrder.Models.TermCommitmentPreferences System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EdgeOrder.Models.TermCommitmentPreferences System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct TermCommitmentType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public TermCommitmentType(string value) { throw null; } + public static Azure.ResourceManager.EdgeOrder.Models.TermCommitmentType None { get { throw null; } } + public static Azure.ResourceManager.EdgeOrder.Models.TermCommitmentType Timed { get { throw null; } } + public static Azure.ResourceManager.EdgeOrder.Models.TermCommitmentType Trial { get { throw null; } } + public bool Equals(Azure.ResourceManager.EdgeOrder.Models.TermCommitmentType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.EdgeOrder.Models.TermCommitmentType left, Azure.ResourceManager.EdgeOrder.Models.TermCommitmentType right) { throw null; } + public static implicit operator Azure.ResourceManager.EdgeOrder.Models.TermCommitmentType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.EdgeOrder.Models.TermCommitmentType left, Azure.ResourceManager.EdgeOrder.Models.TermCommitmentType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class TermTypeDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TermTypeDetails() { } + public Azure.ResourceManager.EdgeOrder.Models.TermCommitmentType TermType { get { throw null; } } + public System.TimeSpan TermTypeDuration { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EdgeOrder.Models.TermTypeDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.EdgeOrder.Models.TermTypeDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct TransportShipmentType : System.IEquatable { diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/assets.json b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/assets.json index 98925aea8e0f..ba0b5b330706 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/assets.json +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/edgeorder/Azure.ResourceManager.EdgeOrder", - "Tag": "net/edgeorder/Azure.ResourceManager.EdgeOrder_23af777640" + "Tag": "net/edgeorder/Azure.ResourceManager.EdgeOrder_79d991bdac" } diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/ArmEdgeOrderModelFactory.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/ArmEdgeOrderModelFactory.cs new file mode 100644 index 000000000000..cd5ff08e4b6c --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/ArmEdgeOrderModelFactory.cs @@ -0,0 +1,207 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; + +namespace Azure.ResourceManager.EdgeOrder.Models +{ + // TODO: workaround for issue https://github.com/Azure/autorest.csharp/issues/5385. Remove after the issue is fixed. + public static partial class ArmEdgeOrderModelFactory + { + /// Initializes a new instance of . + /// Unique identifier for configuration. + /// Order item type. + /// Current Order item Status. + /// Order item status history. + /// Customer notification Preferences. + /// Forward Package Shipping details. + /// Reverse Package Shipping details. + /// Additional notification email list. + /// Cancellation reason. + /// Describes whether the order item is cancellable or not. + /// Describes whether the order item is deletable or not. + /// Return reason. + /// Describes whether the order item is returnable or not. + /// Parent RP details - this returns only the first or default parent RP from the entire list. + /// List of parent RP details supported for configuration. + /// Top level error for the job. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static EdgeOrderItemDetails EdgeOrderItemDetails(ProductDetails productDetails = null, OrderItemType orderItemType = default, EdgeOrderStageDetails currentStage = null, IEnumerable orderItemStageHistory = null, OrderItemPreferences preferences = null, ForwardShippingDetails forwardShippingDetails = null, ReverseShippingDetails reverseShippingDetails = null, IEnumerable notificationEmailList = null, string cancellationReason = null, OrderItemCancellationStatus? cancellationStatus = null, EdgeOrderActionStatus? deletionStatus = null, string returnReason = null, OrderItemReturnStatus? returnStatus = null, string firstOrDefaultManagementResourceProviderNamespace = null, IEnumerable managementRPDetailsList = null, ResponseError error = null) + { + orderItemStageHistory ??= new List(); + notificationEmailList ??= new List(); + managementRPDetailsList ??= new List(); + + return new EdgeOrderItemDetails( + productDetails, + orderItemType, + null, + null, + currentStage, + orderItemStageHistory?.ToList(), + preferences, + forwardShippingDetails, + reverseShippingDetails, + notificationEmailList?.ToList(), + cancellationReason, + cancellationStatus, + deletionStatus, + returnReason, + returnStatus, + managementRPDetailsList?.ToList(), + error, + firstOrDefaultManagementResourceProviderNamespace != null ? new ResourceProviderDetails(firstOrDefaultManagementResourceProviderNamespace, serializedAdditionalRawData: null) : null, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Display Name for the product system. + /// Description related to the product system. + /// Image information for the product system. + /// Cost information for the product system. + /// Availability information of the product system. + /// Hierarchy information of a product. + /// list of filters supported for a product. + /// List of products in the product line. + /// A new instance for mocking. + public static ProductLine ProductLine(string displayName = null, ProductDescription description = null, IEnumerable imageInformation = null, EdgeOrderProductCostInformation costInformation = null, ProductAvailabilityInformation availabilityInformation = null, HierarchyInformation hierarchyInformation = null, IEnumerable filterableProperties = null, IEnumerable products = null) + { + imageInformation ??= new List(); + filterableProperties ??= new List(); + products ??= new List(); + + return new ProductLine( + products?.ToList(), + displayName, + description, + imageInformation?.ToList(), + costInformation, + availabilityInformation, + hierarchyInformation, + filterableProperties?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Display Name for the product system. + /// Description related to the product system. + /// Image information for the product system. + /// Cost information for the product system. + /// Availability information of the product system. + /// Hierarchy information of a product. + /// list of filters supported for a product. + /// List of product lines supported in the product family. + /// Contains details related to resource provider. + /// A new instance for mocking. + public static ProductFamily ProductFamily(string displayName = null, ProductDescription description = null, IEnumerable imageInformation = null, EdgeOrderProductCostInformation costInformation = null, ProductAvailabilityInformation availabilityInformation = null, HierarchyInformation hierarchyInformation = null, IEnumerable filterableProperties = null, IEnumerable productLines = null, IEnumerable resourceProviderDetails = null) + { + imageInformation ??= new List(); + filterableProperties ??= new List(); + productLines ??= new List(); + resourceProviderDetails ??= new List(); + + return new ProductFamily( + productLines?.ToList(), + resourceProviderDetails?.ToList(), + displayName, + description, + imageInformation?.ToList(), + costInformation, + availabilityInformation, + hierarchyInformation, + filterableProperties?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Display Name for the product system. + /// Description related to the product system. + /// Image information for the product system. + /// Cost information for the product system. + /// Availability information of the product system. + /// Hierarchy information of a product. + /// list of filters supported for a product. + /// List of product lines supported in the product family. + /// Contains details related to resource provider. + /// A new instance for mocking. + public static ProductFamiliesMetadata ProductFamiliesMetadata(string displayName = null, ProductDescription description = null, IEnumerable imageInformation = null, EdgeOrderProductCostInformation costInformation = null, ProductAvailabilityInformation availabilityInformation = null, HierarchyInformation hierarchyInformation = null, IEnumerable filterableProperties = null, IEnumerable productLines = null, IEnumerable resourceProviderDetails = null) + { + imageInformation ??= new List(); + filterableProperties ??= new List(); + productLines ??= new List(); + resourceProviderDetails ??= new List(); + + return new ProductFamiliesMetadata( + productLines?.ToList(), + resourceProviderDetails?.ToList(), + displayName, + description, + imageInformation?.ToList(), + costInformation, + availabilityInformation, + hierarchyInformation, + filterableProperties?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Display details of the product. + /// Hierarchy of the product which uniquely identifies the product. + /// Quantity of the product. + /// Double encryption status of the configuration. Read-only field. + /// list of device details. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ProductDetails ProductDetails(ProductDisplayInfo displayInfo = null, HierarchyInformation hierarchyInformation = null, int? count = null, DoubleEncryptionStatus? productDoubleEncryptionStatus = null, IEnumerable deviceDetails = null) + { + deviceDetails ??= new List(); + + return new ProductDetails( + displayInfo, + hierarchyInformation, + productDoubleEncryptionStatus, + null, // identificationType + deviceDetails?.ToList().FirstOrDefault(), + null, // parentProvisioningDetails + new ChangeTrackingList(), + new ChangeTrackingList(), + null, // termCommitmentInformation + count, + deviceDetails?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Display Name for the product system. + /// Description related to the product system. + /// Image information for the product system. + /// Cost information for the product system. + /// Availability information of the product system. + /// Hierarchy information of a product. + /// list of filters supported for a product. + /// List of configurations for the product. + /// A new instance for mocking. + public static EdgeOrderProduct EdgeOrderProduct(string displayName = null, ProductDescription description = null, IEnumerable imageInformation = null, EdgeOrderProductCostInformation costInformation = null, ProductAvailabilityInformation availabilityInformation = null, HierarchyInformation hierarchyInformation = null, IEnumerable filterableProperties = null, IEnumerable configurations = null) + { + imageInformation ??= new List(); + filterableProperties ??= new List(); + configurations ??= new List(); + + return new EdgeOrderProduct( + configurations?.ToList(), + displayName, + description, + imageInformation?.ToList(), + costInformation, + availabilityInformation, + hierarchyInformation, + filterableProperties?.ToList(), + serializedAdditionalRawData: null); + } + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/EdgeOrderAddressCollection.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/EdgeOrderAddressCollection.cs new file mode 100644 index 000000000000..cc4b7925a7a4 --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/EdgeOrderAddressCollection.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.ComponentModel; +using System.Threading; + +namespace Azure.ResourceManager.EdgeOrder +{ + public partial class EdgeOrderAddressCollection + { + /// + /// Lists all the addresses available under the given resource group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/addresses + /// + /// + /// Operation Id + /// ListAddressesAtResourceGroupLevel + /// + /// + /// Default Api Version + /// 2021-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// $filter is supported to filter based on shipping address properties. Filter supports only equals operation. + /// $skipToken is supported on Get list of addresses, which provides the next page in the list of address. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual AsyncPageable GetAllAsync(string filter, string skipToken, CancellationToken cancellationToken) + { + return GetAllAsync(filter, skipToken, null, cancellationToken); + } + + /// + /// Lists all the addresses available under the given resource group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/addresses + /// + /// + /// Operation Id + /// ListAddressesAtResourceGroupLevel + /// + /// + /// Default Api Version + /// 2021-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// $filter is supported to filter based on shipping address properties. Filter supports only equals operation. + /// $skipToken is supported on Get list of addresses, which provides the next page in the list of address. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual Pageable GetAll(string filter, string skipToken, CancellationToken cancellationToken) + { + return GetAll(filter, skipToken, null, cancellationToken); + } + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/EdgeOrderAddressData.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/EdgeOrderAddressData.cs new file mode 100644 index 000000000000..d8561410b6ce --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/EdgeOrderAddressData.cs @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using Azure.Core; +using Azure.ResourceManager.EdgeOrder.Models; + +namespace Azure.ResourceManager.EdgeOrder +{ + public partial class EdgeOrderAddressData + { + /// Initializes a new instance of . + /// The location. + /// Contact details for the address. + /// is null. + public EdgeOrderAddressData(AzureLocation location, EdgeOrderAddressContactDetails contactDetails) : base(location) + { + Argument.AssertNotNull(contactDetails, nameof(contactDetails)); + + ContactDetails = contactDetails; + } + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/EdgeOrderData.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/EdgeOrderData.cs new file mode 100644 index 000000000000..8a8fb2072b80 --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/EdgeOrderData.cs @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using Azure.ResourceManager.EdgeOrder.Models; + +namespace Azure.ResourceManager.EdgeOrder +{ + public partial class EdgeOrderData + { + /// Initializes a new instance of . + public EdgeOrderData() + { + OrderStageHistory = new ChangeTrackingList(); + } + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/EdgeOrderItemCollection.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/EdgeOrderItemCollection.cs new file mode 100644 index 000000000000..5db8c930e17e --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/EdgeOrderItemCollection.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.ComponentModel; +using System.Threading; + +namespace Azure.ResourceManager.EdgeOrder +{ + public partial class EdgeOrderItemCollection + { + /// + /// Lists order item at resource group level. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems + /// + /// + /// Operation Id + /// ListOrderItemsAtResourceGroupLevel + /// + /// + /// Default Api Version + /// 2021-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// $filter is supported to filter based on order id. Filter supports only equals operation. + /// $expand is supported on device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Device Details for order item provides details on the devices of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. + /// $skipToken is supported on Get list of order items, which provides the next page in the list of order items. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual AsyncPageable GetAllAsync(string filter, string expand, string skipToken, CancellationToken cancellationToken) + { + return GetAllAsync(filter, expand, skipToken, null, cancellationToken); + } + + /// + /// Lists order item at resource group level. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems + /// + /// + /// Operation Id + /// ListOrderItemsAtResourceGroupLevel + /// + /// + /// Default Api Version + /// 2021-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// $filter is supported to filter based on order id. Filter supports only equals operation. + /// $expand is supported on device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Device Details for order item provides details on the devices of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. + /// $skipToken is supported on Get list of order items, which provides the next page in the list of order items. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual Pageable GetAll(string filter, string expand, string skipToken, CancellationToken cancellationToken) + { + return GetAll(filter, expand, skipToken, null, cancellationToken); + } + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/EdgeOrderItemData.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/EdgeOrderItemData.cs new file mode 100644 index 000000000000..6f18a0211683 --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/EdgeOrderItemData.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using Azure.Core; +using Azure.ResourceManager.EdgeOrder.Models; + +namespace Azure.ResourceManager.EdgeOrder +{ + public partial class EdgeOrderItemData + { + /// Initializes a new instance of . + /// The location. + /// Represents order item details. + /// Represents shipping and return address for order item. + /// Id of the order to which order item belongs to. + /// , or is null. + public EdgeOrderItemData(AzureLocation location, EdgeOrderItemDetails orderItemDetails, EdgeOrderItemAddressDetails addressDetails, ResourceIdentifier orderId) : base(location) + { + Argument.AssertNotNull(orderItemDetails, nameof(orderItemDetails)); + Argument.AssertNotNull(addressDetails, nameof(addressDetails)); + Argument.AssertNotNull(orderId, nameof(orderId)); + + OrderItemDetails = orderItemDetails; + AddressDetails = addressDetails; + OrderId = orderId; + } + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/Extensions/EdgeOrderExtensions.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/Extensions/EdgeOrderExtensions.cs new file mode 100644 index 000000000000..7e6156eb2a6d --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/Extensions/EdgeOrderExtensions.cs @@ -0,0 +1,310 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.ComponentModel; +using System.Threading; +using Azure.ResourceManager.EdgeOrder.Mocking; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.EdgeOrder +{ + public static partial class EdgeOrderExtensions + { + /// + /// Lists order at resource group level. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orders + /// + /// + /// Operation Id + /// ListOrderAtResourceGroupLevel + /// + /// + /// Default Api Version + /// 2021-12-01 + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// $skipToken is supported on Get list of order, which provides the next page in the list of order. + /// The cancellation token to use. + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + [EditorBrowsable(EditorBrowsableState.Never)] + public static AsyncPageable GetEdgeOrdersAsync(this ResourceGroupResource resourceGroupResource, string skipToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableEdgeOrderResourceGroupResource(resourceGroupResource).GetEdgeOrdersAsync(skipToken, cancellationToken); + } + + /// + /// Lists order at resource group level. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orders + /// + /// + /// Operation Id + /// ListOrderAtResourceGroupLevel + /// + /// + /// Default Api Version + /// 2021-12-01 + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// $skipToken is supported on Get list of order, which provides the next page in the list of order. + /// The cancellation token to use. + /// is null. + /// A collection of that may take multiple service requests to iterate over. + [EditorBrowsable(EditorBrowsableState.Never)] + public static Pageable GetEdgeOrders(this ResourceGroupResource resourceGroupResource, string skipToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableEdgeOrderResourceGroupResource(resourceGroupResource).GetEdgeOrders(skipToken, cancellationToken); + } + + /// + /// Lists order at subscription level. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/orders + /// + /// + /// Operation Id + /// ListOrderAtSubscriptionLevel + /// + /// + /// Default Api Version + /// 2021-12-01 + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// $skipToken is supported on Get list of order, which provides the next page in the list of order. + /// The cancellation token to use. + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + [EditorBrowsable(EditorBrowsableState.Never)] + public static AsyncPageable GetEdgeOrdersAsync(this SubscriptionResource subscriptionResource, string skipToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableEdgeOrderSubscriptionResource(subscriptionResource).GetEdgeOrdersAsync(skipToken, cancellationToken); + } + + /// + /// Lists order at subscription level. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/orders + /// + /// + /// Operation Id + /// ListOrderAtSubscriptionLevel + /// + /// + /// Default Api Version + /// 2021-12-01 + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// $skipToken is supported on Get list of order, which provides the next page in the list of order. + /// The cancellation token to use. + /// is null. + /// A collection of that may take multiple service requests to iterate over. + [EditorBrowsable(EditorBrowsableState.Never)] + public static Pageable GetEdgeOrders(this SubscriptionResource subscriptionResource, string skipToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableEdgeOrderSubscriptionResource(subscriptionResource).GetEdgeOrders(skipToken, cancellationToken); + } + + /// + /// Lists order item at subscription level. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/orderItems + /// + /// + /// Operation Id + /// ListOrderItemsAtSubscriptionLevel + /// + /// + /// Default Api Version + /// 2021-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// $filter is supported to filter based on order id. Filter supports only equals operation. + /// $expand is supported on device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Device Details for order item provides details on the devices of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. + /// $skipToken is supported on Get list of order items, which provides the next page in the list of order items. + /// The cancellation token to use. + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + [EditorBrowsable(EditorBrowsableState.Never)] + public static AsyncPageable GetEdgeOrderItemsAsync(this SubscriptionResource subscriptionResource, string filter = null, string expand = null, string skipToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableEdgeOrderSubscriptionResource(subscriptionResource).GetEdgeOrderItemsAsync(filter, expand, skipToken, cancellationToken); + } + + /// + /// Lists order item at subscription level. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/orderItems + /// + /// + /// Operation Id + /// ListOrderItemsAtSubscriptionLevel + /// + /// + /// Default Api Version + /// 2021-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// $filter is supported to filter based on order id. Filter supports only equals operation. + /// $expand is supported on device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Device Details for order item provides details on the devices of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. + /// $skipToken is supported on Get list of order items, which provides the next page in the list of order items. + /// The cancellation token to use. + /// is null. + /// A collection of that may take multiple service requests to iterate over. + [EditorBrowsable(EditorBrowsableState.Never)] + public static Pageable GetEdgeOrderItems(this SubscriptionResource subscriptionResource, string filter = null, string expand = null, string skipToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableEdgeOrderSubscriptionResource(subscriptionResource).GetEdgeOrderItems(filter, expand, skipToken, cancellationToken); + } + + /// + /// Lists all the addresses available under the subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/addresses + /// + /// + /// Operation Id + /// ListAddressesAtSubscriptionLevel + /// + /// + /// Default Api Version + /// 2021-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// $filter is supported to filter based on shipping address properties. Filter supports only equals operation. + /// $skipToken is supported on Get list of addresses, which provides the next page in the list of addresses. + /// The cancellation token to use. + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + [EditorBrowsable(EditorBrowsableState.Never)] + public static AsyncPageable GetEdgeOrderAddressesAsync(this SubscriptionResource subscriptionResource, string filter = null, string skipToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableEdgeOrderSubscriptionResource(subscriptionResource).GetEdgeOrderAddressesAsync(filter, skipToken, cancellationToken); + } + + /// + /// Lists all the addresses available under the subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/addresses + /// + /// + /// Operation Id + /// ListAddressesAtSubscriptionLevel + /// + /// + /// Default Api Version + /// 2021-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// $filter is supported to filter based on shipping address properties. Filter supports only equals operation. + /// $skipToken is supported on Get list of addresses, which provides the next page in the list of addresses. + /// The cancellation token to use. + /// is null. + /// A collection of that may take multiple service requests to iterate over. + [EditorBrowsable(EditorBrowsableState.Never)] + public static Pageable GetEdgeOrderAddresses(this SubscriptionResource subscriptionResource, string filter = null, string skipToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableEdgeOrderSubscriptionResource(subscriptionResource).GetEdgeOrderAddresses(filter, skipToken, cancellationToken); + } + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/Extensions/MockableEdgeOrderResourceGroupResource.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/Extensions/MockableEdgeOrderResourceGroupResource.cs new file mode 100644 index 000000000000..5e9397bbff52 --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/Extensions/MockableEdgeOrderResourceGroupResource.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.ComponentModel; +using System.Threading; + +namespace Azure.ResourceManager.EdgeOrder.Mocking +{ + public partial class MockableEdgeOrderResourceGroupResource + { + /// + /// Lists order at resource group level. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orders + /// + /// + /// Operation Id + /// ListOrderAtResourceGroupLevel + /// + /// + /// Default Api Version + /// 2021-12-01 + /// + /// + /// + /// $skipToken is supported on Get list of order, which provides the next page in the list of order. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual AsyncPageable GetEdgeOrdersAsync(string skipToken = null, CancellationToken cancellationToken = default) + { + return GetEdgeOrdersAsync(skipToken, null, cancellationToken); + } + + /// + /// Lists order at resource group level. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orders + /// + /// + /// Operation Id + /// ListOrderAtResourceGroupLevel + /// + /// + /// Default Api Version + /// 2021-12-01 + /// + /// + /// + /// $skipToken is supported on Get list of order, which provides the next page in the list of order. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual Pageable GetEdgeOrders(string skipToken = null, CancellationToken cancellationToken = default) + { + return GetEdgeOrders(skipToken, null, cancellationToken); + } + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/Extensions/MockableEdgeOrderSubscriptionResource.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/Extensions/MockableEdgeOrderSubscriptionResource.cs new file mode 100644 index 000000000000..a9b0bccf8910 --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/Extensions/MockableEdgeOrderSubscriptionResource.cs @@ -0,0 +1,191 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.ComponentModel; +using System.Threading; + +namespace Azure.ResourceManager.EdgeOrder.Mocking +{ + public partial class MockableEdgeOrderSubscriptionResource + { + /// + /// Lists order at subscription level. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/orders + /// + /// + /// Operation Id + /// ListOrderAtSubscriptionLevel + /// + /// + /// Default Api Version + /// 2021-12-01 + /// + /// + /// + /// $skipToken is supported on Get list of order, which provides the next page in the list of order. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual AsyncPageable GetEdgeOrdersAsync(string skipToken = null, CancellationToken cancellationToken = default) + { + return GetEdgeOrdersAsync(skipToken, null); + } + + /// + /// Lists order at subscription level. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/orders + /// + /// + /// Operation Id + /// ListOrderAtSubscriptionLevel + /// + /// + /// Default Api Version + /// 2021-12-01 + /// + /// + /// + /// $skipToken is supported on Get list of order, which provides the next page in the list of order. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual Pageable GetEdgeOrders(string skipToken = null, CancellationToken cancellationToken = default) + { + return GetEdgeOrders(skipToken, null); + } + + /// + /// Lists order item at subscription level. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/orderItems + /// + /// + /// Operation Id + /// ListOrderItemsAtSubscriptionLevel + /// + /// + /// Default Api Version + /// 2021-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// $filter is supported to filter based on order id. Filter supports only equals operation. + /// $expand is supported on device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Device Details for order item provides details on the devices of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. + /// $skipToken is supported on Get list of order items, which provides the next page in the list of order items. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual AsyncPageable GetEdgeOrderItemsAsync(string filter = null, string expand = null, string skipToken = null, CancellationToken cancellationToken = default) + { + return GetEdgeOrderItemsAsync(filter, expand, skipToken, null, cancellationToken); + } + + /// + /// Lists order item at subscription level. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/orderItems + /// + /// + /// Operation Id + /// ListOrderItemsAtSubscriptionLevel + /// + /// + /// Default Api Version + /// 2021-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// $filter is supported to filter based on order id. Filter supports only equals operation. + /// $expand is supported on device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Device Details for order item provides details on the devices of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. + /// $skipToken is supported on Get list of order items, which provides the next page in the list of order items. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual Pageable GetEdgeOrderItems(string filter = null, string expand = null, string skipToken = null, CancellationToken cancellationToken = default) + { + return GetEdgeOrderItems(filter, expand, skipToken, null, cancellationToken); + } + + /// + /// Lists all the addresses available under the subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/addresses + /// + /// + /// Operation Id + /// ListAddressesAtSubscriptionLevel + /// + /// + /// Default Api Version + /// 2021-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// $filter is supported to filter based on shipping address properties. Filter supports only equals operation. + /// $skipToken is supported on Get list of addresses, which provides the next page in the list of addresses. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual AsyncPageable GetEdgeOrderAddressesAsync(string filter = null, string skipToken = null, CancellationToken cancellationToken = default) + { + return GetEdgeOrderAddressesAsync(filter, skipToken, null, cancellationToken); + } + + /// + /// Lists all the addresses available under the subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/addresses + /// + /// + /// Operation Id + /// ListAddressesAtSubscriptionLevel + /// + /// + /// Default Api Version + /// 2021-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// $filter is supported to filter based on shipping address properties. Filter supports only equals operation. + /// $skipToken is supported on Get list of addresses, which provides the next page in the list of addresses. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual Pageable GetEdgeOrderAddresses(string filter = null, string skipToken = null, CancellationToken cancellationToken = default) + { + return GetEdgeOrderAddresses(filter, skipToken, null, cancellationToken); + } + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/Models/ConfigurationsContent.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/Models/ConfigurationsContent.cs new file mode 100644 index 000000000000..a004f22de283 --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/Models/ConfigurationsContent.cs @@ -0,0 +1,32 @@ +// 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; +using Azure.Core; + +namespace Azure.ResourceManager.EdgeOrder.Models +{ + [CodeGenSerialization(nameof(ConfigurationFilters), new string[] { "configurationFilters" })] + public partial class ConfigurationsContent + { + /// Initializes a new instance of . + /// Holds details about product hierarchy information and filterable property. + /// is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public ConfigurationsContent(IEnumerable configurationFilters) + { + Argument.AssertNotNull(configurationFilters, nameof(configurationFilters)); + + ConfigurationFilters = configurationFilters.ToList(); + } + + /// Holds details about product hierarchy information and filterable property. + [EditorBrowsable(EditorBrowsableState.Never)] + public IList ConfigurationFilters { get; } + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/Models/EdgeOrderAddressContactDetails.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/Models/EdgeOrderAddressContactDetails.cs new file mode 100644 index 000000000000..dca19178167e --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/Models/EdgeOrderAddressContactDetails.cs @@ -0,0 +1,32 @@ +// 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.EdgeOrder.Models +{ + public partial class EdgeOrderAddressContactDetails + { + /// Initializes a new instance of . + /// Contact name of the person. + /// Phone number of the contact person. + /// List of Email-ids to be notified about job progress. + /// , or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public EdgeOrderAddressContactDetails(string contactName, string phone, IEnumerable emailList) + { + Argument.AssertNotNull(contactName, nameof(contactName)); + Argument.AssertNotNull(phone, nameof(phone)); + Argument.AssertNotNull(emailList, nameof(emailList)); + + ContactName = contactName; + Phone = phone; + EmailList = emailList.ToList(); + } + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/Models/EdgeOrderItemAddressProperties.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/Models/EdgeOrderItemAddressProperties.cs new file mode 100644 index 000000000000..1c98a4bcfa02 --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/Models/EdgeOrderItemAddressProperties.cs @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.EdgeOrder.Models +{ + public partial class EdgeOrderItemAddressProperties + { + /// Initializes a new instance of . + /// Contact details for the address. + /// is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public EdgeOrderItemAddressProperties(EdgeOrderAddressContactDetails contactDetails) + { + Argument.AssertNotNull(contactDetails, nameof(contactDetails)); + + ContactDetails = contactDetails; + } + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/Models/EdgeOrderItemDetails.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/Models/EdgeOrderItemDetails.cs new file mode 100644 index 000000000000..7bc9c44589a8 --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/Models/EdgeOrderItemDetails.cs @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.ComponentModel; +using Azure.Core; + +namespace Azure.ResourceManager.EdgeOrder.Models +{ + [CodeGenSerialization(nameof(FirstOrDefaultManagement), new string[] { "managementRpDetails" })] + public partial class EdgeOrderItemDetails + { + /// Parent RP details - this returns only the first or default parent RP from the entire list. + [EditorBrowsable(EditorBrowsableState.Never)] + internal ResourceProviderDetails FirstOrDefaultManagement { get; } + /// Resource provider namespace. + [EditorBrowsable(EditorBrowsableState.Never)] + public string FirstOrDefaultManagementResourceProviderNamespace + { + get => FirstOrDefaultManagement?.ResourceProviderNamespace; + } + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/Models/EdgeOrderProduct.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/Models/EdgeOrderProduct.cs new file mode 100644 index 000000000000..b325a684602e --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/Models/EdgeOrderProduct.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.EdgeOrder.Models +{ + // TODO: workaround for issue https://github.com/Azure/autorest.csharp/issues/5385. Remove after the issue is fixed. + [CodeGenSerialization(nameof(DisplayName), new string[] { "properties", "displayName" })] + [CodeGenSerialization(nameof(Description), new string[] { "properties", "description" })] + [CodeGenSerialization(nameof(ImageInformation), new string[] { "properties", "imageInformation" })] + [CodeGenSerialization(nameof(CostInformation), new string[] { "properties", "costInformation" })] + [CodeGenSerialization(nameof(AvailabilityInformation), new string[] { "properties", "availabilityInformation" })] + [CodeGenSerialization(nameof(HierarchyInformation), new string[] { "properties", "hierarchyInformation" })] + [CodeGenSerialization(nameof(FilterableProperties), new string[] { "properties", "filterableProperties" })] + public partial class EdgeOrderProduct + { + /// Display Name for the product system. + public string DisplayName { get; } + /// Description related to the product system. + public ProductDescription Description { get; } + /// Image information for the product system. + public IReadOnlyList ImageInformation { get; } + /// Cost information for the product system. + public EdgeOrderProductCostInformation CostInformation { get; } + /// Availability information of the product system. + public ProductAvailabilityInformation AvailabilityInformation { get; } + /// Hierarchy information of a product. + public HierarchyInformation HierarchyInformation { get; } + /// list of filters supported for a product. + public IReadOnlyList FilterableProperties { get; } + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/Models/EdgeOrderShippingAddress.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/Models/EdgeOrderShippingAddress.cs new file mode 100644 index 000000000000..cb8ee9497477 --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/Models/EdgeOrderShippingAddress.cs @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.EdgeOrder.Models +{ + public partial class EdgeOrderShippingAddress + { + /// Initializes a new instance of . + /// Street Address line 1. + /// Name of the Country. + /// or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public EdgeOrderShippingAddress(string streetAddress1, string country) + { + Argument.AssertNotNull(streetAddress1, nameof(streetAddress1)); + Argument.AssertNotNull(country, nameof(country)); + + StreetAddress1 = streetAddress1; + Country = country; + } + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/Models/ProductConfiguration.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/Models/ProductConfiguration.cs new file mode 100644 index 000000000000..3af6145dd3df --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/Models/ProductConfiguration.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.EdgeOrder.Models +{ + // TODO: workaround for issue https://github.com/Azure/autorest.csharp/issues/5385. Remove after the issue is fixed. + [CodeGenSerialization(nameof(DisplayName), new string[] { "properties", "displayName" })] + [CodeGenSerialization(nameof(Description), new string[] { "properties", "description" })] + [CodeGenSerialization(nameof(ImageInformation), new string[] { "properties", "imageInformation" })] + [CodeGenSerialization(nameof(CostInformation), new string[] { "properties", "costInformation" })] + [CodeGenSerialization(nameof(AvailabilityInformation), new string[] { "properties", "availabilityInformation" })] + [CodeGenSerialization(nameof(HierarchyInformation), new string[] { "properties", "hierarchyInformation" })] + [CodeGenSerialization(nameof(FilterableProperties), new string[] { "properties", "filterableProperties" })] + public partial class ProductConfiguration + { + /// Display Name for the product system. + public string DisplayName { get; } + /// Description related to the product system. + public ProductDescription Description { get; } + /// Image information for the product system. + public IReadOnlyList ImageInformation { get; } + /// Cost information for the product system. + public EdgeOrderProductCostInformation CostInformation { get; } + /// Availability information of the product system. + public ProductAvailabilityInformation AvailabilityInformation { get; } + /// Hierarchy information of a product. + public HierarchyInformation HierarchyInformation { get; } + /// list of filters supported for a product. + public IReadOnlyList FilterableProperties { get; } + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/Models/ProductDetails.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/Models/ProductDetails.cs new file mode 100644 index 000000000000..18d029c53ac4 --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/Models/ProductDetails.cs @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.Collections.Generic; +using System.ComponentModel; +using Azure.Core; + +namespace Azure.ResourceManager.EdgeOrder.Models +{ + [CodeGenSerialization(nameof(Count), new string[] { "count" })] + [CodeGenSerialization(nameof(DeviceDetails), new string[] { "deviceDetails" })] + public partial class ProductDetails + { + /// Quantity of the product. + [EditorBrowsable(EditorBrowsableState.Never)] + public int? Count { get; } + + /// list of device details. + [EditorBrowsable(EditorBrowsableState.Never)] + public IReadOnlyList DeviceDetails { get; } + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/Models/ProductFamiliesMetadata.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/Models/ProductFamiliesMetadata.cs new file mode 100644 index 000000000000..e3e253aaf1da --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/Models/ProductFamiliesMetadata.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.EdgeOrder.Models +{ + // TODO: workaround for issue https://github.com/Azure/autorest.csharp/issues/5385. Remove after the issue is fixed. + [CodeGenSerialization(nameof(DisplayName), new string[] { "properties", "displayName" })] + [CodeGenSerialization(nameof(Description), new string[] { "properties", "description" })] + [CodeGenSerialization(nameof(ImageInformation), new string[] { "properties", "imageInformation" })] + [CodeGenSerialization(nameof(CostInformation), new string[] { "properties", "costInformation" })] + [CodeGenSerialization(nameof(AvailabilityInformation), new string[] { "properties", "availabilityInformation" })] + [CodeGenSerialization(nameof(HierarchyInformation), new string[] { "properties", "hierarchyInformation" })] + [CodeGenSerialization(nameof(FilterableProperties), new string[] { "properties", "filterableProperties" })] + public partial class ProductFamiliesMetadata + { + /// Display Name for the product system. + public string DisplayName { get; } + /// Description related to the product system. + public ProductDescription Description { get; } + /// Image information for the product system. + public IReadOnlyList ImageInformation { get; } + /// Cost information for the product system. + public EdgeOrderProductCostInformation CostInformation { get; } + /// Availability information of the product system. + public ProductAvailabilityInformation AvailabilityInformation { get; } + /// Hierarchy information of a product. + public HierarchyInformation HierarchyInformation { get; } + /// list of filters supported for a product. + public IReadOnlyList FilterableProperties { get; } + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/Models/ProductFamily.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/Models/ProductFamily.cs new file mode 100644 index 000000000000..af7d0e39f923 --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/Models/ProductFamily.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.EdgeOrder.Models +{ + // TODO: workaround for issue https://github.com/Azure/autorest.csharp/issues/5385. Remove after the issue is fixed. + [CodeGenSerialization(nameof(DisplayName), new string[] { "properties", "displayName" })] + [CodeGenSerialization(nameof(Description), new string[] { "properties", "description" })] + [CodeGenSerialization(nameof(ImageInformation), new string[] { "properties", "imageInformation" })] + [CodeGenSerialization(nameof(CostInformation), new string[] { "properties", "costInformation" })] + [CodeGenSerialization(nameof(AvailabilityInformation), new string[] { "properties", "availabilityInformation" })] + [CodeGenSerialization(nameof(HierarchyInformation), new string[] { "properties", "hierarchyInformation" })] + [CodeGenSerialization(nameof(FilterableProperties), new string[] { "properties", "filterableProperties" })] + public partial class ProductFamily + { + /// Display Name for the product system. + public string DisplayName { get; } + /// Description related to the product system. + public ProductDescription Description { get; } + /// Image information for the product system. + public IReadOnlyList ImageInformation { get; } + /// Cost information for the product system. + public EdgeOrderProductCostInformation CostInformation { get; } + /// Availability information of the product system. + public ProductAvailabilityInformation AvailabilityInformation { get; } + /// Hierarchy information of a product. + public HierarchyInformation HierarchyInformation { get; } + /// list of filters supported for a product. + public IReadOnlyList FilterableProperties { get; } + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/Models/ProductLine.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/Models/ProductLine.cs new file mode 100644 index 000000000000..ca95e67a5629 --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/Models/ProductLine.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.EdgeOrder.Models +{ + // TODO: workaround for issue https://github.com/Azure/autorest.csharp/issues/5385. Remove after the issue is fixed. + [CodeGenSerialization(nameof(DisplayName), new string[] { "properties", "displayName" })] + [CodeGenSerialization(nameof(Description), new string[] { "properties", "description" })] + [CodeGenSerialization(nameof(ImageInformation), new string[] { "properties", "imageInformation" })] + [CodeGenSerialization(nameof(CostInformation), new string[] { "properties", "costInformation" })] + [CodeGenSerialization(nameof(AvailabilityInformation), new string[] { "properties", "availabilityInformation" })] + [CodeGenSerialization(nameof(HierarchyInformation), new string[] { "properties", "hierarchyInformation" })] + [CodeGenSerialization(nameof(FilterableProperties), new string[] { "properties", "filterableProperties" })] + public partial class ProductLine + { + /// Display Name for the product system. + public string DisplayName { get; } + /// Description related to the product system. + public ProductDescription Description { get; } + /// Image information for the product system. + public IReadOnlyList ImageInformation { get; } + /// Cost information for the product system. + public EdgeOrderProductCostInformation CostInformation { get; } + /// Availability information of the product system. + public ProductAvailabilityInformation AvailabilityInformation { get; } + /// Hierarchy information of a product. + public HierarchyInformation HierarchyInformation { get; } + /// list of filters supported for a product. + public IReadOnlyList FilterableProperties { get; } + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/Models/UnknownMeterDetails.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/Models/UnknownMeterDetails.cs new file mode 100644 index 000000000000..dce71e41c177 --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Custom/Models/UnknownMeterDetails.cs @@ -0,0 +1,16 @@ +// 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.EdgeOrder.Models +{ + [CodeGenType("UnknownEdgeOrderProductMeterDetails")] + internal partial class UnknownMeterDetails + { + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/ArmEdgeOrderModelFactory.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/ArmEdgeOrderModelFactory.cs index d69edcc2229e..9046c51ccb66 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/ArmEdgeOrderModelFactory.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/ArmEdgeOrderModelFactory.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using System.Linq; using Azure.Core; using Azure.ResourceManager.Models; @@ -23,11 +24,13 @@ public static partial class ArmEdgeOrderModelFactory /// The systemData. /// The tags. /// The location. + /// Type of address based on its usage context. /// Shipping details for the address. /// Contact details for the address. /// Status of address validation. + /// Provisioning state. /// A new instance for mocking. - public static EdgeOrderAddressData EdgeOrderAddressData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, EdgeOrderShippingAddress shippingAddress = null, EdgeOrderAddressContactDetails contactDetails = null, EdgeOrderAddressValidationStatus? addressValidationStatus = null) + public static EdgeOrderAddressData EdgeOrderAddressData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, EdgeOrderAddressClassification? addressClassification = null, EdgeOrderShippingAddress shippingAddress = null, EdgeOrderAddressContactDetails contactDetails = null, EdgeOrderAddressValidationStatus? addressValidationStatus = null, EdgeOrderProvisioningState? provisioningState = null) { tags ??= new Dictionary(); @@ -38,139 +41,396 @@ public static EdgeOrderAddressData EdgeOrderAddressData(ResourceIdentifier id = systemData, tags, location, + addressClassification, shippingAddress, contactDetails, addressValidationStatus, + provisioningState, serializedAdditionalRawData: null); } /// Initializes a new instance of . + /// Type of address based on its usage context. /// Shipping details for the address. /// Contact details for the address. /// Status of address validation. + /// Provisioning state. /// A new instance for mocking. - public static EdgeOrderItemAddressProperties EdgeOrderItemAddressProperties(EdgeOrderShippingAddress shippingAddress = null, EdgeOrderAddressContactDetails contactDetails = null, EdgeOrderAddressValidationStatus? addressValidationStatus = null) + public static EdgeOrderItemAddressProperties EdgeOrderItemAddressProperties(EdgeOrderAddressClassification? addressClassification = null, EdgeOrderShippingAddress shippingAddress = null, EdgeOrderAddressContactDetails contactDetails = null, EdgeOrderAddressValidationStatus? addressValidationStatus = null, EdgeOrderProvisioningState? provisioningState = null) { - return new EdgeOrderItemAddressProperties(shippingAddress, contactDetails, addressValidationStatus, serializedAdditionalRawData: null); + return new EdgeOrderItemAddressProperties( + addressClassification, + shippingAddress, + contactDetails, + addressValidationStatus, + provisioningState, + serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// List of registered feature flags for subscription. - /// Location placement Id of a subscription. - /// Quota ID of a subscription. - /// A new instance for mocking. - public static CustomerSubscriptionDetails CustomerSubscriptionDetails(IEnumerable registeredFeatures = null, string locationPlacementId = null, string quotaId = null) + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Represents order item details. + /// Represents shipping and return address for order item. + /// Start time of order item. + /// Id of the order to which order item belongs to. + /// Provisioning state. + /// Msi identity of the resource. + /// A new instance for mocking. + public static EdgeOrderItemData EdgeOrderItemData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, EdgeOrderItemDetails orderItemDetails = null, EdgeOrderItemAddressDetails addressDetails = null, DateTimeOffset? startOn = null, ResourceIdentifier orderId = null, EdgeOrderProvisioningState? provisioningState = null, ManagedServiceIdentity identity = null) { - registeredFeatures ??= new List(); + tags ??= new Dictionary(); - return new CustomerSubscriptionDetails(registeredFeatures?.ToList(), locationPlacementId, quotaId, serializedAdditionalRawData: null); + return new EdgeOrderItemData( + id, + name, + resourceType, + systemData, + tags, + location, + orderItemDetails, + addressDetails, + startOn, + orderId, + provisioningState, + identity, + serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Display Name for the product system. - /// Description related to the product system. - /// Image information for the product system. - /// Cost information for the product system. - /// Availability information of the product system. - /// Hierarchy information of a product. - /// list of filters supported for a product. - /// List of product lines supported in the product family. - /// Contains details related to resource provider. - /// A new instance for mocking. - public static ProductFamily ProductFamily(string displayName = null, ProductDescription description = null, IEnumerable imageInformation = null, EdgeOrderProductCostInformation costInformation = null, ProductAvailabilityInformation availabilityInformation = null, HierarchyInformation hierarchyInformation = null, IEnumerable filterableProperties = null, IEnumerable productLines = null, IEnumerable resourceProviderDetails = null) + /// Initializes a new instance of . + /// Represents product details. + /// Order item type. + /// Defines the mode of the Order item. + /// Site Related Details. + /// Current Order item Status. + /// Order item status history. + /// Customer notification Preferences. + /// Forward Package Shipping details. + /// Reverse Package Shipping details. + /// Additional notification email list. + /// Cancellation reason. + /// Describes whether the order item is cancellable or not. + /// Describes whether the order item is deletable or not. + /// Return reason. + /// Describes whether the order item is returnable or not. + /// List of parent RP details supported for configuration. + /// Top level error for the job. + /// + /// A new instance for mocking. + public static EdgeOrderItemDetails EdgeOrderItemDetails(ProductDetails productDetails = null, OrderItemType orderItemType = default, EdgeOrderItemMode? orderItemMode = null, string siteId = null, EdgeOrderStageDetails currentStage = null, IEnumerable orderItemStageHistory = null, OrderItemPreferences preferences = null, ForwardShippingDetails forwardShippingDetails = null, ReverseShippingDetails reverseShippingDetails = null, IEnumerable notificationEmailList = null, string cancellationReason = null, OrderItemCancellationStatus? cancellationStatus = null, EdgeOrderActionStatus? deletionStatus = null, string returnReason = null, OrderItemReturnStatus? returnStatus = null, IEnumerable managementRPDetailsList = null, ResponseError error = null, string firstOrDefaultManagementResourceProviderNamespace = null) { - imageInformation ??= new List(); - filterableProperties ??= new List(); - productLines ??= new List(); - resourceProviderDetails ??= new List(); + orderItemStageHistory ??= new List(); + notificationEmailList ??= new List(); + managementRPDetailsList ??= new List(); - return new ProductFamily( - displayName, - description, - imageInformation?.ToList(), - costInformation, - availabilityInformation, - hierarchyInformation, - filterableProperties?.ToList(), - productLines?.ToList(), - resourceProviderDetails?.ToList(), + return new EdgeOrderItemDetails( + productDetails, + orderItemType, + orderItemMode, + siteId != null ? new SiteDetails(siteId, serializedAdditionalRawData: null) : null, + currentStage, + orderItemStageHistory?.ToList(), + preferences, + forwardShippingDetails, + reverseShippingDetails, + notificationEmailList?.ToList(), + cancellationReason, + cancellationStatus, + deletionStatus, + returnReason, + returnStatus, + managementRPDetailsList?.ToList(), + error, + firstOrDefaultManagementResourceProviderNamespace != null ? new ResourceProviderDetails(firstOrDefaultManagementResourceProviderNamespace, serializedAdditionalRawData: null) : null, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Display Name for the product system. - /// Description related to the product system. - /// Image information for the product system. - /// Cost information for the product system. - /// Availability information of the product system. - /// Hierarchy information of a product. - /// list of filters supported for a product. - /// List of products in the product line. - /// A new instance for mocking. - public static ProductLine ProductLine(string displayName = null, ProductDescription description = null, IEnumerable imageInformation = null, EdgeOrderProductCostInformation costInformation = null, ProductAvailabilityInformation availabilityInformation = null, HierarchyInformation hierarchyInformation = null, IEnumerable filterableProperties = null, IEnumerable products = null) + /// Initializes a new instance of . + /// Display details of the product. + /// Hierarchy of the product which uniquely identifies the product. + /// Double encryption status of the configuration. Read-only field. + /// Identification type of the configuration. + /// Device details of the parent configuration. + /// Device Provisioning Details for Parent. + /// List of additional configurations customer wants in the order item apart from the ones included in the base configuration. + /// Details of all child configurations that are part of the order item. + /// Term Commitment Information of the Device. + /// + /// + /// A new instance for mocking. + public static ProductDetails ProductDetails(ProductDisplayInfo displayInfo = null, HierarchyInformation hierarchyInformation = null, DoubleEncryptionStatus? productDoubleEncryptionStatus = null, ConfigurationIdentificationType? identificationType = null, EdgeOrderProductDeviceDetails parentDeviceDetails = null, EdgeOrderProvisioningDetails parentProvisioningDetails = null, IEnumerable optInAdditionalConfigurations = null, IEnumerable childConfigurationDeviceDetails = null, TermCommitmentInformation termCommitmentInformation = null, int? count = null, IEnumerable deviceDetails = null) { - imageInformation ??= new List(); - filterableProperties ??= new List(); - products ??= new List(); + optInAdditionalConfigurations ??= new List(); + childConfigurationDeviceDetails ??= new List(); + deviceDetails ??= new List(); - return new ProductLine( - displayName, - description, - imageInformation?.ToList(), - costInformation, - availabilityInformation, + return new ProductDetails( + displayInfo, hierarchyInformation, - filterableProperties?.ToList(), - products?.ToList(), + productDoubleEncryptionStatus, + identificationType, + parentDeviceDetails, + parentProvisioningDetails, + optInAdditionalConfigurations?.ToList(), + childConfigurationDeviceDetails?.ToList(), + termCommitmentInformation, + count, + deviceDetails?.ToList(), serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Display Name for the product system. - /// Description related to the product system. - /// Image information for the product system. - /// Cost information for the product system. - /// Availability information of the product system. - /// Hierarchy information of a product. - /// list of filters supported for a product. - /// List of configurations for the product. - /// A new instance for mocking. - public static EdgeOrderProduct EdgeOrderProduct(string displayName = null, ProductDescription description = null, IEnumerable imageInformation = null, EdgeOrderProductCostInformation costInformation = null, ProductAvailabilityInformation availabilityInformation = null, HierarchyInformation hierarchyInformation = null, IEnumerable filterableProperties = null, IEnumerable configurations = null) + /// Initializes a new instance of . + /// Product family display name. + /// Configuration display name. + /// A new instance for mocking. + public static ProductDisplayInfo ProductDisplayInfo(string productFamilyDisplayName = null, string configurationDisplayName = null) { - imageInformation ??= new List(); - filterableProperties ??= new List(); - configurations ??= new List(); + return new ProductDisplayInfo(productFamilyDisplayName, configurationDisplayName, serializedAdditionalRawData: null); + } - return new EdgeOrderProduct( - displayName, - description, - imageInformation?.ToList(), - costInformation, - availabilityInformation, + /// Initializes a new instance of . + /// Device serial number. + /// Device serial number to be displayed. + /// Management Resource Id. + /// Management Resource Tenant ID. + /// Determining nature of provisioning that the configuration supports. + /// Provisioning Details for the device. + /// A new instance for mocking. + public static EdgeOrderProductDeviceDetails EdgeOrderProductDeviceDetails(string serialNumber = null, string displaySerialNumber = null, string managementResourceId = null, string managementResourceTenantId = null, EdgeOrderProvisioningSupport? provisioningSupport = null, EdgeOrderProvisioningDetails provisioningDetails = null) + { + return new EdgeOrderProductDeviceDetails( + serialNumber, + displaySerialNumber, + managementResourceId, + managementResourceTenantId, + provisioningSupport, + provisioningDetails, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Quantity of the devices. + /// Provisioning Resource Arm ID. + /// Provisioning End Point. + /// Serial Number for the Device. + /// Vendor Name for the Device , (for 1P devices - Microsoft). + /// Arc Enabled Resource Arm id. + /// Management Resource ArmId. + /// Unique Identity for a Device. + /// Auto Provisioning Details. + /// Proof of possession details. + /// A new instance for mocking. + public static EdgeOrderProvisioningDetails EdgeOrderProvisioningDetails(int? quantity = null, ResourceIdentifier provisioningArmId = null, string provisioningEndPoint = null, string serialNumber = null, string vendorName = null, ResourceIdentifier readyToConnectArmId = null, ResourceIdentifier managementResourceArmId = null, string uniqueDeviceIdentifier = null, EdgeOrderAutoProvisioningStatus? autoProvisioningStatus = null, DevicePresenceVerificationDetails devicePresenceVerification = null) + { + return new EdgeOrderProvisioningDetails( + quantity, + provisioningArmId, + provisioningEndPoint, + serialNumber, + vendorName, + readyToConnectArmId, + managementResourceArmId, + uniqueDeviceIdentifier, + autoProvisioningStatus, + devicePresenceVerification, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Proof of possession status. + /// Insights on current status. + /// A new instance for mocking. + public static DevicePresenceVerificationDetails DevicePresenceVerificationDetails(DevicePresenceVerificationStatus? status = null, string message = null) + { + return new DevicePresenceVerificationDetails(status, message, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Display details of the product. + /// Hierarchy of the product which uniquely identifies the configuration. + /// Quantity of the product. + /// Identification type of the configuration. + /// List of device details. + /// Term Commitment Information of the Device. + /// A new instance for mocking. + public static ProductConfigurationDeviceDetails ProductConfigurationDeviceDetails(ProductDisplayInfo displayInfo = null, HierarchyInformation hierarchyInformation = null, int? quantity = null, ConfigurationIdentificationType? identificationType = null, IEnumerable deviceDetails = null, TermCommitmentInformation termCommitmentInformation = null) + { + deviceDetails ??= new List(); + + return new ProductConfigurationDeviceDetails( + displayInfo, hierarchyInformation, - filterableProperties?.ToList(), - configurations?.ToList(), + quantity, + identificationType, + deviceDetails?.ToList(), + termCommitmentInformation, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Term Commitment Type. + /// Term Commitment Duration. Currently Supporting P365D, P1095D. + /// Number of Days Pending for Term Commitment. + /// A new instance for mocking. + public static TermCommitmentInformation TermCommitmentInformation(TermCommitmentType termCommitmentType = default, TimeSpan? termCommitmentTypeDuration = null, int? pendingDaysForTerm = null) + { + return new TermCommitmentInformation(termCommitmentType, termCommitmentTypeDuration, pendingDaysForTerm, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Stage status. + /// Stage name. + /// Display name of the resource stage. + /// Stage start time. + /// A new instance for mocking. + public static EdgeOrderStageDetails EdgeOrderStageDetails(EdgeOrderStageStatus? stageStatus = null, EdgeOrderStageName? stageName = null, string displayName = null, DateTimeOffset? startOn = null) + { + return new EdgeOrderStageDetails(stageStatus, stageName, displayName, startOn, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Name of the carrier. + /// Carrier Name for display purpose. Not to be used for any processing. + /// TrackingId of the package. + /// TrackingUrl of the package. + /// A new instance for mocking. + public static ForwardShippingDetails ForwardShippingDetails(string carrierName = null, string carrierDisplayName = null, string trackingId = null, Uri trackingUri = null) + { + return new ForwardShippingDetails(carrierName, carrierDisplayName, trackingId, trackingUri, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// SAS key to download the reverse shipment label of the package. + /// Name of the carrier. + /// Carrier Name for display purpose. Not to be used for any processing. + /// TrackingId of the package. + /// TrackingUrl of the package. + /// A new instance for mocking. + public static ReverseShippingDetails ReverseShippingDetails(string sasKeyForLabel = null, string carrierName = null, string carrierDisplayName = null, string trackingId = null, Uri trackingUri = null) + { + return new ReverseShippingDetails( + sasKeyForLabel, + carrierName, + carrierDisplayName, + trackingId, + trackingUri, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Resource provider namespace. + /// A new instance for mocking. + public static ResourceProviderDetails ResourceProviderDetails(string resourceProviderNamespace = null) + { + return new ResourceProviderDetails(resourceProviderNamespace, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Customer address and contact details. + /// Return shipping address. + /// A new instance for mocking. + public static EdgeOrderItemAddressDetails EdgeOrderItemAddressDetails(EdgeOrderItemAddressProperties forwardAddress = null, EdgeOrderItemAddressProperties returnAddress = null) + { + return new EdgeOrderItemAddressDetails(forwardAddress, returnAddress, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Customer return address. + /// Return Reason. + /// Service tag (located on the bottom-right corner of the device). + /// Shipping Box required. + /// A new instance for mocking. + public static EdgeOrderItemReturnContent EdgeOrderItemReturnContent(EdgeOrderItemAddressProperties returnAddress = null, string returnReason = null, string serviceTag = null, bool? isShippingBoxRequired = null) + { + return new EdgeOrderItemReturnContent(returnAddress, returnReason, serviceTag, isShippingBoxRequired, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// List of order item ARM Ids which are part of an order. + /// Order current status. + /// Order status history. + /// Order mode. + /// A new instance for mocking. + public static EdgeOrderData EdgeOrderData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable orderItemIds = null, EdgeOrderStageDetails currentStage = null, IEnumerable orderStageHistory = null, EdgeOrderItemMode? orderMode = null) + { + orderItemIds ??= new List(); + orderStageHistory ??= new List(); + + return new EdgeOrderData( + id, + name, + resourceType, + systemData, + orderItemIds?.ToList(), + currentStage, + orderStageHistory?.ToList(), + orderMode, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// Product hierarchy information. + /// Filters specific to product. + /// Filter to fetch specific child configurations that exist in the configuration. This must be passed to either fetch a list of specific child configurations, or all child configurations of specific types of child configurations. + /// A new instance for mocking. + public static ConfigurationFilters ConfigurationFilters(HierarchyInformation hierarchyInformation = null, IEnumerable filterableProperty = null, ChildConfigurationFilter childConfigurationFilter = null) + { + filterableProperty ??= new List(); + + return new ConfigurationFilters(hierarchyInformation, filterableProperty?.ToList(), childConfigurationFilter, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// List of registered feature flags for subscription. + /// Location placement Id of a subscription. + /// Quota ID of a subscription. + /// A new instance for mocking. + public static CustomerSubscriptionDetails CustomerSubscriptionDetails(IEnumerable registeredFeatures = null, string locationPlacementId = null, string quotaId = null) + { + registeredFeatures ??= new List(); + + return new CustomerSubscriptionDetails(registeredFeatures?.ToList(), locationPlacementId, quotaId, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . - /// Display Name for the product system. - /// Description related to the product system. - /// Image information for the product system. - /// Cost information for the product system. - /// Availability information of the product system. - /// Hierarchy information of a product. - /// list of filters supported for a product. /// Specifications of the configuration. /// Dimensions of the configuration. + /// Determining nature of provisioning that the configuration supports. + /// Different types of child configurations which exist for this configuration, these can be used to populate the child configuration filter. + /// Child configurations present for the configuration after applying child configuration filter, grouped by the category name of the child configuration. + /// The Term Commitment Durations that are supported for a configuration. + /// + /// + /// + /// + /// + /// + /// /// A new instance for mocking. - public static ProductConfiguration ProductConfiguration(string displayName = null, ProductDescription description = null, IEnumerable imageInformation = null, EdgeOrderProductCostInformation costInformation = null, ProductAvailabilityInformation availabilityInformation = null, HierarchyInformation hierarchyInformation = null, IEnumerable filterableProperties = null, IEnumerable specifications = null, ProductDimensions dimensions = null) + public static ProductConfiguration ProductConfiguration(IEnumerable specifications = null, ProductDimensions dimensions = null, EdgeOrderProvisioningSupport? provisioningSupport = null, IEnumerable childConfigurationTypes = null, IEnumerable groupedChildConfigurations = null, IEnumerable supportedTermCommitmentDurations = null, string displayName = null, ProductDescription description = null, IEnumerable imageInformation = null, EdgeOrderProductCostInformation costInformation = null, ProductAvailabilityInformation availabilityInformation = null, HierarchyInformation hierarchyInformation = null, IEnumerable filterableProperties = null) { + specifications ??= new List(); + childConfigurationTypes ??= new List(); + groupedChildConfigurations ??= new List(); + supportedTermCommitmentDurations ??= new List(); imageInformation ??= new List(); filterableProperties ??= new List(); - specifications ??= new List(); return new ProductConfiguration( + specifications?.ToList(), + dimensions, + provisioningSupport, + childConfigurationTypes?.ToList(), + groupedChildConfigurations?.ToList(), + supportedTermCommitmentDurations?.ToList(), displayName, description, imageInformation?.ToList(), @@ -178,8 +438,6 @@ public static ProductConfiguration ProductConfiguration(string displayName = nul availabilityInformation, hierarchyInformation, filterableProperties?.ToList(), - specifications?.ToList(), - dimensions, serializedAdditionalRawData: null); } @@ -214,6 +472,90 @@ public static ProductDimensions ProductDimensions(double? length = null, double? serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// Category information. + /// List of child configurations. + /// A new instance for mocking. + public static GroupedChildConfigurations GroupedChildConfigurations(ChildConfigurationCategoryInformation categoryInformation = null, IEnumerable childConfigurations = null) + { + childConfigurations ??= new List(); + + return new GroupedChildConfigurations(categoryInformation, childConfigurations?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Category name of the child configuration. + /// Category display name of the child configuration. + /// Description text for the category. + /// Links for the category. + /// A new instance for mocking. + public static ChildConfigurationCategoryInformation ChildConfigurationCategoryInformation(string categoryName = null, string categoryDisplayName = null, string description = null, IEnumerable links = null) + { + links ??= new List(); + + return new ChildConfigurationCategoryInformation(categoryName, categoryDisplayName, description, links?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Type of link. + /// Url of the link. + /// A new instance for mocking. + public static ProductLink ProductLink(ProductLinkType? linkType = null, Uri linkUri = null) + { + return new ProductLink(linkType, linkUri, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Child configuration type. + /// Flag to indicate if the child configuration is part of the base configuration, which means the customer need not pass this configuration in OptInAdditionalConfigurations while placing an order, it will be shipped by default. + /// Minimum quantity a customer can order while choosing this configuration. + /// Maximum quantity a customer can order while choosing this configuration. + /// Specifications of the configuration. + /// Dimensions of the configuration. + /// Determining nature of provisioning that the configuration supports. + /// Different types of child configurations which exist for this configuration, these can be used to populate the child configuration filter. + /// Child configurations present for the configuration after applying child configuration filter, grouped by the category name of the child configuration. + /// The Term Commitment Durations that are supported for a configuration. + /// List of filters supported for a product. + /// Display Name for the product system. + /// Description related to the product system. + /// Image information for the product system. + /// Cost information for the product system. + /// Availability information of the product system. + /// Hierarchy information of a product. + /// The entity responsible for fulfillment of the item at the given hierarchy level. + /// A new instance for mocking. + public static ProductChildConfiguration ProductChildConfiguration(ChildConfigurationType? childConfigurationType = null, bool? isPartOfBaseConfiguration = null, int? minimumQuantity = null, int? maximumQuantity = null, IEnumerable specifications = null, ProductDimensions dimensions = null, EdgeOrderProvisioningSupport? provisioningSupport = null, IEnumerable childConfigurationTypes = null, IEnumerable groupedChildConfigurations = null, IEnumerable supportedTermCommitmentDurations = null, IEnumerable filterableProperties = null, string displayName = null, ProductDescription description = null, IEnumerable imageInformation = null, EdgeOrderProductCostInformation costInformation = null, ProductAvailabilityInformation availabilityInformation = null, HierarchyInformation hierarchyInformation = null, ConfigurationFulfillmentType? fulfilledBy = null) + { + specifications ??= new List(); + childConfigurationTypes ??= new List(); + groupedChildConfigurations ??= new List(); + supportedTermCommitmentDurations ??= new List(); + filterableProperties ??= new List(); + imageInformation ??= new List(); + + return new ProductChildConfiguration( + childConfigurationType, + isPartOfBaseConfiguration, + minimumQuantity, + maximumQuantity, + specifications?.ToList(), + dimensions, + provisioningSupport, + childConfigurationTypes?.ToList(), + groupedChildConfigurations?.ToList(), + supportedTermCommitmentDurations?.ToList(), + filterableProperties?.ToList(), + displayName, + description, + imageInformation?.ToList(), + costInformation, + availabilityInformation, + hierarchyInformation, + fulfilledBy, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// Type of description. /// Short description of the product system. @@ -238,15 +580,6 @@ public static ProductDescription ProductDescription(ProductDescriptionType? desc serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Type of link. - /// Url of the link. - /// A new instance for mocking. - public static ProductLink ProductLink(ProductLinkType? linkType = null, Uri linkUri = null) - { - return new ProductLink(linkType, linkUri, serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// Type of the image. /// Url of the image. @@ -270,16 +603,23 @@ public static EdgeOrderProductCostInformation EdgeOrderProductCostInformation(IE /// Initializes a new instance of . /// Represents Billing type name. /// - /// Represents MeterDetails + /// Represents MeterDetails. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include and . /// /// Represents Metering type (eg one-time or recurrent). /// Frequency of recurrence. + /// Represent Term Type details. /// A new instance for mocking. - public static EdgeOrderProductBillingMeterDetails EdgeOrderProductBillingMeterDetails(string name = null, EdgeOrderProductMeterDetails meterDetails = null, EdgeOrderProductMeteringType? meteringType = null, string frequency = null) + public static EdgeOrderProductBillingMeterDetails EdgeOrderProductBillingMeterDetails(string name = null, EdgeOrderProductMeterDetails meterDetails = null, EdgeOrderProductMeteringType? meteringType = null, string frequency = null, TermTypeDetails termTypeDetails = null) { - return new EdgeOrderProductBillingMeterDetails(name, meterDetails, meteringType, frequency, serializedAdditionalRawData: null); + return new EdgeOrderProductBillingMeterDetails( + name, + meterDetails, + meteringType, + frequency, + termTypeDetails, + serializedAdditionalRawData: null); } /// Initializes a new instance of . @@ -292,8 +632,46 @@ public static EdgeOrderProductMeterDetails EdgeOrderProductMeterDetails(string b return new UnknownMeterDetails(billingType == null ? default : new BillingType(billingType), multiplier, chargingType, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// Billing unit applicable for Pav2 billing. + /// Charging type. + /// Validation status of requested data center and transport. + /// A new instance for mocking. + public static Pav2MeterDetails Pav2MeterDetails(double? multiplier = null, EdgeOrderProductChargingType? chargingType = null, Guid? meterGuid = null) + { + return new Pav2MeterDetails(BillingType.Pav2, multiplier, chargingType, serializedAdditionalRawData: null, meterGuid); + } + + /// Initializes a new instance of . + /// Billing unit applicable for Pav2 billing. + /// Charging type. + /// Product Id. + /// Sku Id. + /// Term Id. + /// A new instance for mocking. + public static PurchaseMeterDetails PurchaseMeterDetails(double? multiplier = null, EdgeOrderProductChargingType? chargingType = null, string productId = null, string skuId = null, string termId = null) + { + return new PurchaseMeterDetails( + BillingType.Purchase, + multiplier, + chargingType, + serializedAdditionalRawData: null, + productId, + skuId, + termId); + } + + /// Initializes a new instance of . + /// Term Commitment Type. + /// Duration for the term type. + /// A new instance for mocking. + public static TermTypeDetails TermTypeDetails(TermCommitmentType termType = default, TimeSpan termTypeDuration = default) + { + return new TermTypeDetails(termType, termTypeDuration, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . - /// Current availability stage of the product. Availability stage. + /// Current availability stage of the product. /// Reason why the product is disabled. /// Message for why the product is disabled. /// A new instance for mocking. @@ -302,44 +680,114 @@ public static ProductAvailabilityInformation ProductAvailabilityInformation(Prod return new ProductAvailabilityInformation(availabilityStage, disabledReason, disabledReasonMessage, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Resource provider namespace. - /// A new instance for mocking. - public static ResourceProviderDetails ResourceProviderDetails(string resourceProviderNamespace = null) + /// Initializes a new instance of . + /// List of product lines supported in the product family. + /// Contains details related to resource provider. + /// + /// + /// + /// + /// + /// + /// + /// A new instance for mocking. + public static ProductFamily ProductFamily(IEnumerable productLines = null, IEnumerable resourceProviderDetails = null, string displayName = null, ProductDescription description = null, IEnumerable imageInformation = null, EdgeOrderProductCostInformation costInformation = null, ProductAvailabilityInformation availabilityInformation = null, HierarchyInformation hierarchyInformation = null, IEnumerable filterableProperties = null) { - return new ResourceProviderDetails(resourceProviderNamespace, serializedAdditionalRawData: null); + productLines ??= new List(); + resourceProviderDetails ??= new List(); + imageInformation ??= new List(); + filterableProperties ??= new List(); + + return new ProductFamily( + productLines?.ToList(), + resourceProviderDetails?.ToList(), + displayName, + description, + imageInformation?.ToList(), + costInformation, + availabilityInformation, + hierarchyInformation, + filterableProperties?.ToList(), + serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Product hierarchy information. - /// Filters specific to product. - /// A new instance for mocking. - public static ConfigurationFilters ConfigurationFilters(HierarchyInformation hierarchyInformation = null, IEnumerable filterableProperty = null) + /// Initializes a new instance of . + /// List of products in the product line. + /// + /// + /// + /// + /// + /// + /// + /// A new instance for mocking. + public static ProductLine ProductLine(IEnumerable products = null, string displayName = null, ProductDescription description = null, IEnumerable imageInformation = null, EdgeOrderProductCostInformation costInformation = null, ProductAvailabilityInformation availabilityInformation = null, HierarchyInformation hierarchyInformation = null, IEnumerable filterableProperties = null) { - filterableProperty ??= new List(); + products ??= new List(); + imageInformation ??= new List(); + filterableProperties ??= new List(); + + return new ProductLine( + products?.ToList(), + displayName, + description, + imageInformation?.ToList(), + costInformation, + availabilityInformation, + hierarchyInformation, + filterableProperties?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// List of configurations for the product. + /// + /// + /// + /// + /// + /// + /// + /// A new instance for mocking. + public static EdgeOrderProduct EdgeOrderProduct(IEnumerable configurations = null, string displayName = null, ProductDescription description = null, IEnumerable imageInformation = null, EdgeOrderProductCostInformation costInformation = null, ProductAvailabilityInformation availabilityInformation = null, HierarchyInformation hierarchyInformation = null, IEnumerable filterableProperties = null) + { + configurations ??= new List(); + imageInformation ??= new List(); + filterableProperties ??= new List(); - return new ConfigurationFilters(hierarchyInformation, filterableProperty?.ToList(), serializedAdditionalRawData: null); + return new EdgeOrderProduct( + configurations?.ToList(), + displayName, + description, + imageInformation?.ToList(), + costInformation, + availabilityInformation, + hierarchyInformation, + filterableProperties?.ToList(), + serializedAdditionalRawData: null); } /// Initializes a new instance of . - /// Display Name for the product system. - /// Description related to the product system. - /// Image information for the product system. - /// Cost information for the product system. - /// Availability information of the product system. - /// Hierarchy information of a product. - /// list of filters supported for a product. /// List of product lines supported in the product family. /// Contains details related to resource provider. + /// + /// + /// + /// + /// + /// + /// /// A new instance for mocking. - public static ProductFamiliesMetadata ProductFamiliesMetadata(string displayName = null, ProductDescription description = null, IEnumerable imageInformation = null, EdgeOrderProductCostInformation costInformation = null, ProductAvailabilityInformation availabilityInformation = null, HierarchyInformation hierarchyInformation = null, IEnumerable filterableProperties = null, IEnumerable productLines = null, IEnumerable resourceProviderDetails = null) + public static ProductFamiliesMetadata ProductFamiliesMetadata(IEnumerable productLines = null, IEnumerable resourceProviderDetails = null, string displayName = null, ProductDescription description = null, IEnumerable imageInformation = null, EdgeOrderProductCostInformation costInformation = null, ProductAvailabilityInformation availabilityInformation = null, HierarchyInformation hierarchyInformation = null, IEnumerable filterableProperties = null) { - imageInformation ??= new List(); - filterableProperties ??= new List(); productLines ??= new List(); resourceProviderDetails ??= new List(); + imageInformation ??= new List(); + filterableProperties ??= new List(); return new ProductFamiliesMetadata( + productLines?.ToList(), + resourceProviderDetails?.ToList(), displayName, description, imageInformation?.ToList(), @@ -347,236 +795,122 @@ public static ProductFamiliesMetadata ProductFamiliesMetadata(string displayName availabilityInformation, hierarchyInformation, filterableProperties?.ToList(), - productLines?.ToList(), - resourceProviderDetails?.ToList(), - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// List of order item ARM Ids which are part of an order. - /// Order current status. - /// Order status history. - /// A new instance for mocking. - public static EdgeOrderData EdgeOrderData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable orderItemIds = null, EdgeOrderStageDetails currentStage = null, IEnumerable orderStageHistory = null) - { - orderItemIds ??= new List(); - orderStageHistory ??= new List(); - - return new EdgeOrderData( - id, - name, - resourceType, - systemData, - orderItemIds?.ToList(), - currentStage, - orderStageHistory?.ToList(), serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Stage status. - /// Stage name. - /// Display name of the resource stage. - /// Stage start time. - /// A new instance for mocking. - public static EdgeOrderStageDetails EdgeOrderStageDetails(EdgeOrderStageStatus? stageStatus = null, EdgeOrderStageName? stageName = null, string displayName = null, DateTimeOffset? startOn = null) - { - return new EdgeOrderStageDetails(stageStatus, stageName, displayName, startOn, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. /// The tags. /// The location. - /// Represents order item details. - /// Represents shipping and return address for order item. - /// Start time of order item. - /// Id of the order to which order item belongs to. - /// A new instance for mocking. - public static EdgeOrderItemData EdgeOrderItemData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, EdgeOrderItemDetails orderItemDetails = null, EdgeOrderItemAddressDetails addressDetails = null, DateTimeOffset? startOn = null, ResourceIdentifier orderId = null) - { - tags ??= new Dictionary(); - - return new EdgeOrderItemData( - id, - name, - resourceType, - systemData, - tags, - location, - orderItemDetails, - addressDetails, - startOn, - orderId, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Unique identifier for configuration. - /// Order item type. - /// Current Order item Status. - /// Order item status history. - /// Customer notification Preferences. - /// Forward Package Shipping details. - /// Reverse Package Shipping details. - /// Additional notification email list. - /// Cancellation reason. - /// Describes whether the order item is cancellable or not. - /// Describes whether the order item is deletable or not. - /// Return reason. - /// Describes whether the order item is returnable or not. - /// Parent RP details - this returns only the first or default parent RP from the entire list. - /// List of parent RP details supported for configuration. - /// Top level error for the job. - /// A new instance for mocking. - public static EdgeOrderItemDetails EdgeOrderItemDetails(ProductDetails productDetails = null, OrderItemType orderItemType = default, EdgeOrderStageDetails currentStage = null, IEnumerable orderItemStageHistory = null, OrderItemPreferences preferences = null, ForwardShippingDetails forwardShippingDetails = null, ReverseShippingDetails reverseShippingDetails = null, IEnumerable notificationEmailList = null, string cancellationReason = null, OrderItemCancellationStatus? cancellationStatus = null, EdgeOrderActionStatus? deletionStatus = null, string returnReason = null, OrderItemReturnStatus? returnStatus = null, string firstOrDefaultManagementResourceProviderNamespace = null, IEnumerable managementRPDetailsList = null, ResponseError error = null) - { - orderItemStageHistory ??= new List(); - notificationEmailList ??= new List(); - managementRPDetailsList ??= new List(); - - return new EdgeOrderItemDetails( - productDetails, - orderItemType, - currentStage, - orderItemStageHistory?.ToList(), - preferences, - forwardShippingDetails, - reverseShippingDetails, - notificationEmailList?.ToList(), - cancellationReason, - cancellationStatus, - deletionStatus, - returnReason, - returnStatus, - firstOrDefaultManagementResourceProviderNamespace != null ? new ResourceProviderDetails(firstOrDefaultManagementResourceProviderNamespace, serializedAdditionalRawData: null) : null, - managementRPDetailsList?.ToList(), - error, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Display details of the product. - /// Hierarchy of the product which uniquely identifies the product. - /// Quantity of the product. - /// Double encryption status of the configuration. Read-only field. - /// list of device details. - /// A new instance for mocking. - public static ProductDetails ProductDetails(ProductDisplayInfo displayInfo = null, HierarchyInformation hierarchyInformation = null, int? count = null, DoubleEncryptionStatus? productDoubleEncryptionStatus = null, IEnumerable deviceDetails = null) - { - deviceDetails ??= new List(); - - return new ProductDetails( - displayInfo, - hierarchyInformation, - count, - productDoubleEncryptionStatus, - deviceDetails?.ToList(), - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Product family display name. - /// Configuration display name. - /// A new instance for mocking. - public static ProductDisplayInfo ProductDisplayInfo(string productFamilyDisplayName = null, string configurationDisplayName = null) + /// Shipping details for the address. + /// Contact details for the address. + /// Status of address validation. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static EdgeOrderAddressData EdgeOrderAddressData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, EdgeOrderShippingAddress shippingAddress, EdgeOrderAddressContactDetails contactDetails, EdgeOrderAddressValidationStatus? addressValidationStatus) { - return new ProductDisplayInfo(productFamilyDisplayName, configurationDisplayName, serializedAdditionalRawData: null); + return EdgeOrderAddressData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, addressClassification: default, shippingAddress: shippingAddress, contactDetails: contactDetails, addressValidationStatus: addressValidationStatus, provisioningState: default); } - /// Initializes a new instance of . - /// device serial number. - /// Management Resource Id. - /// Management Resource Tenant ID. - /// A new instance for mocking. - public static EdgeOrderProductDeviceDetails EdgeOrderProductDeviceDetails(string serialNumber = null, string managementResourceId = null, string managementResourceTenantId = null) + /// Initializes a new instance of . + /// Shipping details for the address. + /// Contact details for the address. + /// Status of address validation. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static EdgeOrderItemAddressProperties EdgeOrderItemAddressProperties(EdgeOrderShippingAddress shippingAddress, EdgeOrderAddressContactDetails contactDetails, EdgeOrderAddressValidationStatus? addressValidationStatus) { - return new EdgeOrderProductDeviceDetails(serialNumber, managementResourceId, managementResourceTenantId, serializedAdditionalRawData: null); + return EdgeOrderItemAddressProperties(addressClassification: default, shippingAddress: shippingAddress, contactDetails: contactDetails, addressValidationStatus: addressValidationStatus, provisioningState: default); } - /// Initializes a new instance of . - /// Name of the carrier. - /// Carrier Name for display purpose. Not to be used for any processing. - /// TrackingId of the package. - /// TrackingUrl of the package. - /// A new instance for mocking. - public static ForwardShippingDetails ForwardShippingDetails(string carrierName = null, string carrierDisplayName = null, string trackingId = null, Uri trackingUri = null) + /// Initializes a new instance of . + /// Display Name for the product system. + /// Description related to the product system. + /// Image information for the product system. + /// Cost information for the product system. + /// Availability information of the product system. + /// Hierarchy information of a product. + /// list of filters supported for a product. + /// Specifications of the configuration. + /// Dimensions of the configuration. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ProductConfiguration ProductConfiguration(string displayName, ProductDescription description, IEnumerable imageInformation, EdgeOrderProductCostInformation costInformation, ProductAvailabilityInformation availabilityInformation, HierarchyInformation hierarchyInformation, IEnumerable filterableProperties, IEnumerable specifications, ProductDimensions dimensions) { - return new ForwardShippingDetails(carrierName, carrierDisplayName, trackingId, trackingUri, serializedAdditionalRawData: null); + return ProductConfiguration(specifications: specifications, dimensions: dimensions, provisioningSupport: default, childConfigurationTypes: default, groupedChildConfigurations: default, supportedTermCommitmentDurations: default, displayName: displayName, description: description, imageInformation: imageInformation, costInformation: costInformation, availabilityInformation: availabilityInformation, hierarchyInformation: hierarchyInformation, filterableProperties: filterableProperties); } - /// Initializes a new instance of . - /// SAS key to download the reverse shipment label of the package. - /// Name of the carrier. - /// Carrier Name for display purpose. Not to be used for any processing. - /// TrackingId of the package. - /// TrackingUrl of the package. - /// A new instance for mocking. - public static ReverseShippingDetails ReverseShippingDetails(string sasKeyForLabel = null, string carrierName = null, string carrierDisplayName = null, string trackingId = null, Uri trackingUri = null) + /// Initializes a new instance of . + /// Represents Billing type name. + /// + /// Represents MeterDetails + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// Represents Metering type (eg one-time or recurrent). + /// Frequency of recurrence. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static EdgeOrderProductBillingMeterDetails EdgeOrderProductBillingMeterDetails(string name, EdgeOrderProductMeterDetails meterDetails, EdgeOrderProductMeteringType? meteringType, string frequency) { - return new ReverseShippingDetails( - sasKeyForLabel, - carrierName, - carrierDisplayName, - trackingId, - trackingUri, - serializedAdditionalRawData: null); + return EdgeOrderProductBillingMeterDetails(name: name, meterDetails: meterDetails, meteringType: meteringType, frequency: frequency, termTypeDetails: default); } - /// Initializes a new instance of . - /// Customer address and contact details. It should be address resource. - /// Return shipping address. - /// A new instance for mocking. - public static EdgeOrderItemAddressDetails EdgeOrderItemAddressDetails(EdgeOrderItemAddressProperties forwardAddress = null, EdgeOrderItemAddressProperties returnAddress = null) + /// Initializes a new instance of . + /// Product hierarchy information. + /// Filters specific to product. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ConfigurationFilters ConfigurationFilters(HierarchyInformation hierarchyInformation, IEnumerable filterableProperty) { - return new EdgeOrderItemAddressDetails(forwardAddress, returnAddress, serializedAdditionalRawData: null); + return ConfigurationFilters(hierarchyInformation: hierarchyInformation, filterableProperty: filterableProperty, childConfigurationFilter: default); } - /// Initializes a new instance of . - /// customer return address. - /// Return Reason. - /// Service tag (located on the bottom-right corner of the device). - /// Shipping Box required. - /// A new instance for mocking. - public static EdgeOrderItemReturnContent EdgeOrderItemReturnContent(EdgeOrderItemAddressProperties returnAddress = null, string returnReason = null, string serviceTag = null, bool? isShippingBoxRequired = null) + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// List of order item ARM Ids which are part of an order. + /// Order current status. + /// Order status history. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static EdgeOrderData EdgeOrderData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IEnumerable orderItemIds, EdgeOrderStageDetails currentStage, IEnumerable orderStageHistory) { - return new EdgeOrderItemReturnContent(returnAddress, returnReason, serviceTag, isShippingBoxRequired, serializedAdditionalRawData: null); + return EdgeOrderData(id: id, name: name, resourceType: resourceType, systemData: systemData, orderItemIds: orderItemIds, currentStage: currentStage, orderStageHistory: orderStageHistory, orderMode: default); } - /// Initializes a new instance of . - /// Billing unit applicable for Pav2 billing. - /// Charging type. - /// Validation status of requested data center and transport. - /// A new instance for mocking. - public static Pav2MeterDetails Pav2MeterDetails(double? multiplier = null, EdgeOrderProductChargingType? chargingType = null, Guid? meterGuid = null) + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Represents order item details. + /// Represents shipping and return address for order item. + /// Start time of order item. + /// Id of the order to which order item belongs to. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static EdgeOrderItemData EdgeOrderItemData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, EdgeOrderItemDetails orderItemDetails, EdgeOrderItemAddressDetails addressDetails, DateTimeOffset? startOn, ResourceIdentifier orderId) { - return new Pav2MeterDetails(BillingType.Pav2, multiplier, chargingType, serializedAdditionalRawData: null, meterGuid); + return EdgeOrderItemData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, orderItemDetails: orderItemDetails, addressDetails: addressDetails, startOn: startOn, orderId: orderId, provisioningState: default, identity: default); } - /// Initializes a new instance of . - /// Billing unit applicable for Pav2 billing. - /// Charging type. - /// Product Id. - /// Sku Id. - /// Term Id. - /// A new instance for mocking. - public static PurchaseMeterDetails PurchaseMeterDetails(double? multiplier = null, EdgeOrderProductChargingType? chargingType = null, string productId = null, string skuId = null, string termId = null) + /// Initializes a new instance of . + /// device serial number. + /// Management Resource Id. + /// Management Resource Tenant ID. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static EdgeOrderProductDeviceDetails EdgeOrderProductDeviceDetails(string serialNumber, string managementResourceId, string managementResourceTenantId) { - return new PurchaseMeterDetails( - BillingType.Purchase, - multiplier, - chargingType, - serializedAdditionalRawData: null, - productId, - skuId, - termId); + return EdgeOrderProductDeviceDetails(serialNumber: serialNumber, displaySerialNumber: default, managementResourceId: managementResourceId, managementResourceTenantId: managementResourceTenantId, provisioningSupport: default, provisioningDetails: default); } } } diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderAddressCollection.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderAddressCollection.cs index ef947343dedf..67cbebfecc96 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderAddressCollection.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderAddressCollection.cs @@ -25,8 +25,8 @@ namespace Azure.ResourceManager.EdgeOrder /// public partial class EdgeOrderAddressCollection : ArmCollection, IEnumerable, IAsyncEnumerable { - private readonly ClientDiagnostics _edgeOrderAddressClientDiagnostics; - private readonly EdgeOrderManagementRestOperations _edgeOrderAddressRestClient; + private readonly ClientDiagnostics _edgeOrderAddressAddressResourcesClientDiagnostics; + private readonly AddressResourcesRestOperations _edgeOrderAddressAddressResourcesRestClient; /// Initializes a new instance of the class for mocking. protected EdgeOrderAddressCollection() @@ -38,9 +38,9 @@ protected EdgeOrderAddressCollection() /// The identifier of the parent resource that is the target of operations. internal EdgeOrderAddressCollection(ArmClient client, ResourceIdentifier id) : base(client, id) { - _edgeOrderAddressClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.EdgeOrder", EdgeOrderAddressResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(EdgeOrderAddressResource.ResourceType, out string edgeOrderAddressApiVersion); - _edgeOrderAddressRestClient = new EdgeOrderManagementRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, edgeOrderAddressApiVersion); + _edgeOrderAddressAddressResourcesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.EdgeOrder", EdgeOrderAddressResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(EdgeOrderAddressResource.ResourceType, out string edgeOrderAddressAddressResourcesApiVersion); + _edgeOrderAddressAddressResourcesRestClient = new AddressResourcesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, edgeOrderAddressAddressResourcesApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -53,7 +53,8 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Creates a new address with the specified parameters. Existing address can be updated with this API + /// Create a new address with the specified parameters. Existing address cannot be updated with this API and should + /// instead be updated with the Update address API. /// /// /// Request Path @@ -61,11 +62,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// CreateAddress + /// AddressResource_Create /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -84,12 +85,12 @@ public virtual async Task> CreateOrUpdate Argument.AssertNotNullOrEmpty(addressName, nameof(addressName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _edgeOrderAddressClientDiagnostics.CreateScope("EdgeOrderAddressCollection.CreateOrUpdate"); + using var scope = _edgeOrderAddressAddressResourcesClientDiagnostics.CreateScope("EdgeOrderAddressCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _edgeOrderAddressRestClient.CreateAddressAsync(Id.SubscriptionId, Id.ResourceGroupName, addressName, data, cancellationToken).ConfigureAwait(false); - var operation = new EdgeOrderArmOperation(new EdgeOrderAddressOperationSource(Client), _edgeOrderAddressClientDiagnostics, Pipeline, _edgeOrderAddressRestClient.CreateCreateAddressRequest(Id.SubscriptionId, Id.ResourceGroupName, addressName, data).Request, response, OperationFinalStateVia.Location); + var response = await _edgeOrderAddressAddressResourcesRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, addressName, data, cancellationToken).ConfigureAwait(false); + var operation = new EdgeOrderArmOperation(new EdgeOrderAddressOperationSource(Client), _edgeOrderAddressAddressResourcesClientDiagnostics, Pipeline, _edgeOrderAddressAddressResourcesRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, addressName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -102,7 +103,8 @@ public virtual async Task> CreateOrUpdate } /// - /// Creates a new address with the specified parameters. Existing address can be updated with this API + /// Create a new address with the specified parameters. Existing address cannot be updated with this API and should + /// instead be updated with the Update address API. /// /// /// Request Path @@ -110,11 +112,11 @@ public virtual async Task> CreateOrUpdate /// /// /// Operation Id - /// CreateAddress + /// AddressResource_Create /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -133,12 +135,12 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil w Argument.AssertNotNullOrEmpty(addressName, nameof(addressName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _edgeOrderAddressClientDiagnostics.CreateScope("EdgeOrderAddressCollection.CreateOrUpdate"); + using var scope = _edgeOrderAddressAddressResourcesClientDiagnostics.CreateScope("EdgeOrderAddressCollection.CreateOrUpdate"); scope.Start(); try { - var response = _edgeOrderAddressRestClient.CreateAddress(Id.SubscriptionId, Id.ResourceGroupName, addressName, data, cancellationToken); - var operation = new EdgeOrderArmOperation(new EdgeOrderAddressOperationSource(Client), _edgeOrderAddressClientDiagnostics, Pipeline, _edgeOrderAddressRestClient.CreateCreateAddressRequest(Id.SubscriptionId, Id.ResourceGroupName, addressName, data).Request, response, OperationFinalStateVia.Location); + var response = _edgeOrderAddressAddressResourcesRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, addressName, data, cancellationToken); + var operation = new EdgeOrderArmOperation(new EdgeOrderAddressOperationSource(Client), _edgeOrderAddressAddressResourcesClientDiagnostics, Pipeline, _edgeOrderAddressAddressResourcesRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, addressName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -151,7 +153,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil w } /// - /// Gets information about the specified address. + /// Get information about the specified address. /// /// /// Request Path @@ -159,11 +161,11 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil w /// /// /// Operation Id - /// GetAddressByName + /// AddressResource_Get /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -179,11 +181,11 @@ public virtual async Task> GetAsync(string ad { Argument.AssertNotNullOrEmpty(addressName, nameof(addressName)); - using var scope = _edgeOrderAddressClientDiagnostics.CreateScope("EdgeOrderAddressCollection.Get"); + using var scope = _edgeOrderAddressAddressResourcesClientDiagnostics.CreateScope("EdgeOrderAddressCollection.Get"); scope.Start(); try { - var response = await _edgeOrderAddressRestClient.GetAddressByNameAsync(Id.SubscriptionId, Id.ResourceGroupName, addressName, cancellationToken).ConfigureAwait(false); + var response = await _edgeOrderAddressAddressResourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, addressName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new EdgeOrderAddressResource(Client, response.Value), response.GetRawResponse()); @@ -196,7 +198,7 @@ public virtual async Task> GetAsync(string ad } /// - /// Gets information about the specified address. + /// Get information about the specified address. /// /// /// Request Path @@ -204,11 +206,11 @@ public virtual async Task> GetAsync(string ad /// /// /// Operation Id - /// GetAddressByName + /// AddressResource_Get /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -224,11 +226,11 @@ public virtual Response Get(string addressName, Cancel { Argument.AssertNotNullOrEmpty(addressName, nameof(addressName)); - using var scope = _edgeOrderAddressClientDiagnostics.CreateScope("EdgeOrderAddressCollection.Get"); + using var scope = _edgeOrderAddressAddressResourcesClientDiagnostics.CreateScope("EdgeOrderAddressCollection.Get"); scope.Start(); try { - var response = _edgeOrderAddressRestClient.GetAddressByName(Id.SubscriptionId, Id.ResourceGroupName, addressName, cancellationToken); + var response = _edgeOrderAddressAddressResourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, addressName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new EdgeOrderAddressResource(Client, response.Value), response.GetRawResponse()); @@ -241,7 +243,7 @@ public virtual Response Get(string addressName, Cancel } /// - /// Lists all the addresses available under the given resource group. + /// List all the addresses available under the given resource group. /// /// /// Request Path @@ -249,11 +251,11 @@ public virtual Response Get(string addressName, Cancel /// /// /// Operation Id - /// ListAddressesAtResourceGroupLevel + /// AddressResource_ListByResourceGroup /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -262,18 +264,19 @@ public virtual Response Get(string addressName, Cancel /// /// /// $filter is supported to filter based on shipping address properties. Filter supports only equals operation. - /// $skipToken is supported on Get list of addresses, which provides the next page in the list of address. + /// $skipToken is supported on Get list of addresses, which provides the next page in the list of addresses. + /// $top is supported on fetching list of resources. $top=10 means that the first 10 items in the list will be returned to the API caller. /// The cancellation token to use. /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(string filter = null, string skipToken = null, CancellationToken cancellationToken = default) + public virtual AsyncPageable GetAllAsync(string filter = null, string skipToken = null, int? top = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _edgeOrderAddressRestClient.CreateListAddressesAtResourceGroupLevelRequest(Id.SubscriptionId, Id.ResourceGroupName, filter, skipToken); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _edgeOrderAddressRestClient.CreateListAddressesAtResourceGroupLevelNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, filter, skipToken); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EdgeOrderAddressResource(Client, EdgeOrderAddressData.DeserializeEdgeOrderAddressData(e)), _edgeOrderAddressClientDiagnostics, Pipeline, "EdgeOrderAddressCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _edgeOrderAddressAddressResourcesRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName, filter, skipToken, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _edgeOrderAddressAddressResourcesRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, filter, skipToken, top); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EdgeOrderAddressResource(Client, EdgeOrderAddressData.DeserializeEdgeOrderAddressData(e)), _edgeOrderAddressAddressResourcesClientDiagnostics, Pipeline, "EdgeOrderAddressCollection.GetAll", "value", "nextLink", cancellationToken); } /// - /// Lists all the addresses available under the given resource group. + /// List all the addresses available under the given resource group. /// /// /// Request Path @@ -281,11 +284,11 @@ public virtual AsyncPageable GetAllAsync(string filter /// /// /// Operation Id - /// ListAddressesAtResourceGroupLevel + /// AddressResource_ListByResourceGroup /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -294,14 +297,15 @@ public virtual AsyncPageable GetAllAsync(string filter /// /// /// $filter is supported to filter based on shipping address properties. Filter supports only equals operation. - /// $skipToken is supported on Get list of addresses, which provides the next page in the list of address. + /// $skipToken is supported on Get list of addresses, which provides the next page in the list of addresses. + /// $top is supported on fetching list of resources. $top=10 means that the first 10 items in the list will be returned to the API caller. /// The cancellation token to use. /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(string filter = null, string skipToken = null, CancellationToken cancellationToken = default) + public virtual Pageable GetAll(string filter = null, string skipToken = null, int? top = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _edgeOrderAddressRestClient.CreateListAddressesAtResourceGroupLevelRequest(Id.SubscriptionId, Id.ResourceGroupName, filter, skipToken); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _edgeOrderAddressRestClient.CreateListAddressesAtResourceGroupLevelNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, filter, skipToken); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EdgeOrderAddressResource(Client, EdgeOrderAddressData.DeserializeEdgeOrderAddressData(e)), _edgeOrderAddressClientDiagnostics, Pipeline, "EdgeOrderAddressCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _edgeOrderAddressAddressResourcesRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName, filter, skipToken, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _edgeOrderAddressAddressResourcesRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, filter, skipToken, top); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EdgeOrderAddressResource(Client, EdgeOrderAddressData.DeserializeEdgeOrderAddressData(e)), _edgeOrderAddressAddressResourcesClientDiagnostics, Pipeline, "EdgeOrderAddressCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -313,11 +317,11 @@ public virtual Pageable GetAll(string filter = null, s /// /// /// Operation Id - /// GetAddressByName + /// AddressResource_Get /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -333,11 +337,11 @@ public virtual async Task> ExistsAsync(string addressName, Cancel { Argument.AssertNotNullOrEmpty(addressName, nameof(addressName)); - using var scope = _edgeOrderAddressClientDiagnostics.CreateScope("EdgeOrderAddressCollection.Exists"); + using var scope = _edgeOrderAddressAddressResourcesClientDiagnostics.CreateScope("EdgeOrderAddressCollection.Exists"); scope.Start(); try { - var response = await _edgeOrderAddressRestClient.GetAddressByNameAsync(Id.SubscriptionId, Id.ResourceGroupName, addressName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _edgeOrderAddressAddressResourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, addressName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -356,11 +360,11 @@ public virtual async Task> ExistsAsync(string addressName, Cancel /// /// /// Operation Id - /// GetAddressByName + /// AddressResource_Get /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -376,11 +380,11 @@ public virtual Response Exists(string addressName, CancellationToken cance { Argument.AssertNotNullOrEmpty(addressName, nameof(addressName)); - using var scope = _edgeOrderAddressClientDiagnostics.CreateScope("EdgeOrderAddressCollection.Exists"); + using var scope = _edgeOrderAddressAddressResourcesClientDiagnostics.CreateScope("EdgeOrderAddressCollection.Exists"); scope.Start(); try { - var response = _edgeOrderAddressRestClient.GetAddressByName(Id.SubscriptionId, Id.ResourceGroupName, addressName, cancellationToken: cancellationToken); + var response = _edgeOrderAddressAddressResourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, addressName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -399,11 +403,11 @@ public virtual Response Exists(string addressName, CancellationToken cance /// /// /// Operation Id - /// GetAddressByName + /// AddressResource_Get /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -419,11 +423,11 @@ public virtual async Task> GetIfExist { Argument.AssertNotNullOrEmpty(addressName, nameof(addressName)); - using var scope = _edgeOrderAddressClientDiagnostics.CreateScope("EdgeOrderAddressCollection.GetIfExists"); + using var scope = _edgeOrderAddressAddressResourcesClientDiagnostics.CreateScope("EdgeOrderAddressCollection.GetIfExists"); scope.Start(); try { - var response = await _edgeOrderAddressRestClient.GetAddressByNameAsync(Id.SubscriptionId, Id.ResourceGroupName, addressName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _edgeOrderAddressAddressResourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, addressName, cancellationToken: cancellationToken).ConfigureAwait(false); if (response.Value == null) return new NoValueResponse(response.GetRawResponse()); return Response.FromValue(new EdgeOrderAddressResource(Client, response.Value), response.GetRawResponse()); @@ -444,11 +448,11 @@ public virtual async Task> GetIfExist /// /// /// Operation Id - /// GetAddressByName + /// AddressResource_Get /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -464,11 +468,11 @@ public virtual NullableResponse GetIfExists(string add { Argument.AssertNotNullOrEmpty(addressName, nameof(addressName)); - using var scope = _edgeOrderAddressClientDiagnostics.CreateScope("EdgeOrderAddressCollection.GetIfExists"); + using var scope = _edgeOrderAddressAddressResourcesClientDiagnostics.CreateScope("EdgeOrderAddressCollection.GetIfExists"); scope.Start(); try { - var response = _edgeOrderAddressRestClient.GetAddressByName(Id.SubscriptionId, Id.ResourceGroupName, addressName, cancellationToken: cancellationToken); + var response = _edgeOrderAddressAddressResourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, addressName, cancellationToken: cancellationToken); if (response.Value == null) return new NoValueResponse(response.GetRawResponse()); return Response.FromValue(new EdgeOrderAddressResource(Client, response.Value), response.GetRawResponse()); diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderAddressData.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderAddressData.Serialization.cs index ccc3f21a2e99..922f3a5f0e06 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderAddressData.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderAddressData.Serialization.cs @@ -40,18 +40,31 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); + if (Optional.IsDefined(AddressClassification)) + { + writer.WritePropertyName("addressClassification"u8); + writer.WriteStringValue(AddressClassification.Value.ToString()); + } if (Optional.IsDefined(ShippingAddress)) { writer.WritePropertyName("shippingAddress"u8); writer.WriteObjectValue(ShippingAddress, options); } - writer.WritePropertyName("contactDetails"u8); - writer.WriteObjectValue(ContactDetails, options); + if (Optional.IsDefined(ContactDetails)) + { + writer.WritePropertyName("contactDetails"u8); + writer.WriteObjectValue(ContactDetails, options); + } if (options.Format != "W" && Optional.IsDefined(AddressValidationStatus)) { writer.WritePropertyName("addressValidationStatus"u8); writer.WriteStringValue(AddressValidationStatus.Value.ToString()); } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } writer.WriteEndObject(); } @@ -81,9 +94,11 @@ internal static EdgeOrderAddressData DeserializeEdgeOrderAddressData(JsonElement string name = default; ResourceType type = default; SystemData systemData = default; + EdgeOrderAddressClassification? addressClassification = default; EdgeOrderShippingAddress shippingAddress = default; EdgeOrderAddressContactDetails contactDetails = default; EdgeOrderAddressValidationStatus? addressValidationStatus = default; + EdgeOrderProvisioningState? provisioningState = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -140,6 +155,15 @@ internal static EdgeOrderAddressData DeserializeEdgeOrderAddressData(JsonElement } foreach (var property0 in property.Value.EnumerateObject()) { + if (property0.NameEquals("addressClassification"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + addressClassification = new EdgeOrderAddressClassification(property0.Value.GetString()); + continue; + } if (property0.NameEquals("shippingAddress"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -151,6 +175,10 @@ internal static EdgeOrderAddressData DeserializeEdgeOrderAddressData(JsonElement } if (property0.NameEquals("contactDetails"u8)) { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } contactDetails = EdgeOrderAddressContactDetails.DeserializeEdgeOrderAddressContactDetails(property0.Value, options); continue; } @@ -163,6 +191,15 @@ internal static EdgeOrderAddressData DeserializeEdgeOrderAddressData(JsonElement addressValidationStatus = new EdgeOrderAddressValidationStatus(property0.Value.GetString()); continue; } + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new EdgeOrderProvisioningState(property0.Value.GetString()); + continue; + } } continue; } @@ -179,9 +216,11 @@ internal static EdgeOrderAddressData DeserializeEdgeOrderAddressData(JsonElement systemData, tags ?? new ChangeTrackingDictionary(), location, + addressClassification, shippingAddress, contactDetails, addressValidationStatus, + provisioningState, serializedAdditionalRawData); } diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderAddressData.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderAddressData.cs index 0545e5092d24..2aba7321a4e2 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderAddressData.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderAddressData.cs @@ -53,13 +53,8 @@ public partial class EdgeOrderAddressData : TrackedResourceData /// Initializes a new instance of . /// The location. - /// Contact details for the address. - /// is null. - public EdgeOrderAddressData(AzureLocation location, EdgeOrderAddressContactDetails contactDetails) : base(location) + public EdgeOrderAddressData(AzureLocation location) : base(location) { - Argument.AssertNotNull(contactDetails, nameof(contactDetails)); - - ContactDetails = contactDetails; } /// Initializes a new instance of . @@ -69,15 +64,19 @@ public EdgeOrderAddressData(AzureLocation location, EdgeOrderAddressContactDetai /// The systemData. /// The tags. /// The location. + /// Type of address based on its usage context. /// Shipping details for the address. /// Contact details for the address. /// Status of address validation. + /// Provisioning state. /// Keeps track of any properties unknown to the library. - internal EdgeOrderAddressData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, EdgeOrderShippingAddress shippingAddress, EdgeOrderAddressContactDetails contactDetails, EdgeOrderAddressValidationStatus? addressValidationStatus, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal EdgeOrderAddressData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, EdgeOrderAddressClassification? addressClassification, EdgeOrderShippingAddress shippingAddress, EdgeOrderAddressContactDetails contactDetails, EdgeOrderAddressValidationStatus? addressValidationStatus, EdgeOrderProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { + AddressClassification = addressClassification; ShippingAddress = shippingAddress; ContactDetails = contactDetails; AddressValidationStatus = addressValidationStatus; + ProvisioningState = provisioningState; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -86,11 +85,15 @@ internal EdgeOrderAddressData() { } + /// Type of address based on its usage context. + public EdgeOrderAddressClassification? AddressClassification { get; set; } /// Shipping details for the address. public EdgeOrderShippingAddress ShippingAddress { get; set; } /// Contact details for the address. public EdgeOrderAddressContactDetails ContactDetails { get; set; } /// Status of address validation. public EdgeOrderAddressValidationStatus? AddressValidationStatus { get; } + /// Provisioning state. + public EdgeOrderProvisioningState? ProvisioningState { get; } } } diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderAddressResource.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderAddressResource.cs index 3a9b701c4034..f13844f6c518 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderAddressResource.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderAddressResource.cs @@ -35,8 +35,8 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, return new ResourceIdentifier(resourceId); } - private readonly ClientDiagnostics _edgeOrderAddressClientDiagnostics; - private readonly EdgeOrderManagementRestOperations _edgeOrderAddressRestClient; + private readonly ClientDiagnostics _edgeOrderAddressAddressResourcesClientDiagnostics; + private readonly AddressResourcesRestOperations _edgeOrderAddressAddressResourcesRestClient; private readonly EdgeOrderAddressData _data; /// Gets the resource type for the operations. @@ -61,9 +61,9 @@ internal EdgeOrderAddressResource(ArmClient client, EdgeOrderAddressData data) : /// The identifier of the resource that is the target of operations. internal EdgeOrderAddressResource(ArmClient client, ResourceIdentifier id) : base(client, id) { - _edgeOrderAddressClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.EdgeOrder", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string edgeOrderAddressApiVersion); - _edgeOrderAddressRestClient = new EdgeOrderManagementRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, edgeOrderAddressApiVersion); + _edgeOrderAddressAddressResourcesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.EdgeOrder", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string edgeOrderAddressAddressResourcesApiVersion); + _edgeOrderAddressAddressResourcesRestClient = new AddressResourcesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, edgeOrderAddressAddressResourcesApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -91,7 +91,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Gets information about the specified address. + /// Get information about the specified address. /// /// /// Request Path @@ -99,11 +99,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// GetAddressByName + /// AddressResource_Get /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -114,11 +114,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// The cancellation token to use. public virtual async Task> GetAsync(CancellationToken cancellationToken = default) { - using var scope = _edgeOrderAddressClientDiagnostics.CreateScope("EdgeOrderAddressResource.Get"); + using var scope = _edgeOrderAddressAddressResourcesClientDiagnostics.CreateScope("EdgeOrderAddressResource.Get"); scope.Start(); try { - var response = await _edgeOrderAddressRestClient.GetAddressByNameAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _edgeOrderAddressAddressResourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new EdgeOrderAddressResource(Client, response.Value), response.GetRawResponse()); @@ -131,7 +131,7 @@ public virtual async Task> GetAsync(Cancellat } /// - /// Gets information about the specified address. + /// Get information about the specified address. /// /// /// Request Path @@ -139,11 +139,11 @@ public virtual async Task> GetAsync(Cancellat /// /// /// Operation Id - /// GetAddressByName + /// AddressResource_Get /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -154,11 +154,11 @@ public virtual async Task> GetAsync(Cancellat /// The cancellation token to use. public virtual Response Get(CancellationToken cancellationToken = default) { - using var scope = _edgeOrderAddressClientDiagnostics.CreateScope("EdgeOrderAddressResource.Get"); + using var scope = _edgeOrderAddressAddressResourcesClientDiagnostics.CreateScope("EdgeOrderAddressResource.Get"); scope.Start(); try { - var response = _edgeOrderAddressRestClient.GetAddressByName(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var response = _edgeOrderAddressAddressResourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new EdgeOrderAddressResource(Client, response.Value), response.GetRawResponse()); @@ -171,7 +171,7 @@ public virtual Response Get(CancellationToken cancella } /// - /// Deletes an address. + /// Delete an address. /// /// /// Request Path @@ -179,11 +179,11 @@ public virtual Response Get(CancellationToken cancella /// /// /// Operation Id - /// DeleteAddressByName + /// AddressResource_Delete /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -195,12 +195,12 @@ public virtual Response Get(CancellationToken cancella /// The cancellation token to use. public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _edgeOrderAddressClientDiagnostics.CreateScope("EdgeOrderAddressResource.Delete"); + using var scope = _edgeOrderAddressAddressResourcesClientDiagnostics.CreateScope("EdgeOrderAddressResource.Delete"); scope.Start(); try { - var response = await _edgeOrderAddressRestClient.DeleteAddressByNameAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new EdgeOrderArmOperation(_edgeOrderAddressClientDiagnostics, Pipeline, _edgeOrderAddressRestClient.CreateDeleteAddressByNameRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = await _edgeOrderAddressAddressResourcesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new EdgeOrderArmOperation(_edgeOrderAddressAddressResourcesClientDiagnostics, Pipeline, _edgeOrderAddressAddressResourcesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -213,7 +213,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell } /// - /// Deletes an address. + /// Delete an address. /// /// /// Request Path @@ -221,11 +221,11 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id - /// DeleteAddressByName + /// AddressResource_Delete /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -237,12 +237,12 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// The cancellation token to use. public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _edgeOrderAddressClientDiagnostics.CreateScope("EdgeOrderAddressResource.Delete"); + using var scope = _edgeOrderAddressAddressResourcesClientDiagnostics.CreateScope("EdgeOrderAddressResource.Delete"); scope.Start(); try { - var response = _edgeOrderAddressRestClient.DeleteAddressByName(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new EdgeOrderArmOperation(_edgeOrderAddressClientDiagnostics, Pipeline, _edgeOrderAddressRestClient.CreateDeleteAddressByNameRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = _edgeOrderAddressAddressResourcesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new EdgeOrderArmOperation(_edgeOrderAddressAddressResourcesClientDiagnostics, Pipeline, _edgeOrderAddressAddressResourcesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -255,7 +255,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel } /// - /// Updates the properties of an existing address. + /// Update the properties of an existing address. /// /// /// Request Path @@ -263,11 +263,11 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Operation Id - /// UpdateAddress + /// AddressResource_Update /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -284,12 +284,12 @@ public virtual async Task> UpdateAsync(Wa { Argument.AssertNotNull(patch, nameof(patch)); - using var scope = _edgeOrderAddressClientDiagnostics.CreateScope("EdgeOrderAddressResource.Update"); + using var scope = _edgeOrderAddressAddressResourcesClientDiagnostics.CreateScope("EdgeOrderAddressResource.Update"); scope.Start(); try { - var response = await _edgeOrderAddressRestClient.UpdateAddressAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch, cancellationToken).ConfigureAwait(false); - var operation = new EdgeOrderArmOperation(new EdgeOrderAddressOperationSource(Client), _edgeOrderAddressClientDiagnostics, Pipeline, _edgeOrderAddressRestClient.CreateUpdateAddressRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch).Request, response, OperationFinalStateVia.Location); + var response = await _edgeOrderAddressAddressResourcesRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new EdgeOrderArmOperation(new EdgeOrderAddressOperationSource(Client), _edgeOrderAddressAddressResourcesClientDiagnostics, Pipeline, _edgeOrderAddressAddressResourcesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -302,7 +302,7 @@ public virtual async Task> UpdateAsync(Wa } /// - /// Updates the properties of an existing address. + /// Update the properties of an existing address. /// /// /// Request Path @@ -310,11 +310,11 @@ public virtual async Task> UpdateAsync(Wa /// /// /// Operation Id - /// UpdateAddress + /// AddressResource_Update /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -331,12 +331,12 @@ public virtual ArmOperation Update(WaitUntil waitUntil { Argument.AssertNotNull(patch, nameof(patch)); - using var scope = _edgeOrderAddressClientDiagnostics.CreateScope("EdgeOrderAddressResource.Update"); + using var scope = _edgeOrderAddressAddressResourcesClientDiagnostics.CreateScope("EdgeOrderAddressResource.Update"); scope.Start(); try { - var response = _edgeOrderAddressRestClient.UpdateAddress(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch, cancellationToken); - var operation = new EdgeOrderArmOperation(new EdgeOrderAddressOperationSource(Client), _edgeOrderAddressClientDiagnostics, Pipeline, _edgeOrderAddressRestClient.CreateUpdateAddressRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch).Request, response, OperationFinalStateVia.Location); + var response = _edgeOrderAddressAddressResourcesRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch, cancellationToken); + var operation = new EdgeOrderArmOperation(new EdgeOrderAddressOperationSource(Client), _edgeOrderAddressAddressResourcesClientDiagnostics, Pipeline, _edgeOrderAddressAddressResourcesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -357,11 +357,11 @@ public virtual ArmOperation Update(WaitUntil waitUntil /// /// /// Operation Id - /// GetAddressByName + /// AddressResource_Get /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -378,7 +378,7 @@ public virtual async Task> AddTagAsync(string Argument.AssertNotNull(key, nameof(key)); Argument.AssertNotNull(value, nameof(value)); - using var scope = _edgeOrderAddressClientDiagnostics.CreateScope("EdgeOrderAddressResource.AddTag"); + using var scope = _edgeOrderAddressAddressResourcesClientDiagnostics.CreateScope("EdgeOrderAddressResource.AddTag"); scope.Start(); try { @@ -387,7 +387,7 @@ public virtual async Task> AddTagAsync(string var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); originalTags.Value.Data.TagValues[key] = value; await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _edgeOrderAddressRestClient.GetAddressByNameAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var originalResponse = await _edgeOrderAddressAddressResourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); return Response.FromValue(new EdgeOrderAddressResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else @@ -419,11 +419,11 @@ public virtual async Task> AddTagAsync(string /// /// /// Operation Id - /// GetAddressByName + /// AddressResource_Get /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -440,7 +440,7 @@ public virtual Response AddTag(string key, string valu Argument.AssertNotNull(key, nameof(key)); Argument.AssertNotNull(value, nameof(value)); - using var scope = _edgeOrderAddressClientDiagnostics.CreateScope("EdgeOrderAddressResource.AddTag"); + using var scope = _edgeOrderAddressAddressResourcesClientDiagnostics.CreateScope("EdgeOrderAddressResource.AddTag"); scope.Start(); try { @@ -449,7 +449,7 @@ public virtual Response AddTag(string key, string valu var originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues[key] = value; GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _edgeOrderAddressRestClient.GetAddressByName(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var originalResponse = _edgeOrderAddressAddressResourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); return Response.FromValue(new EdgeOrderAddressResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else @@ -481,11 +481,11 @@ public virtual Response AddTag(string key, string valu /// /// /// Operation Id - /// GetAddressByName + /// AddressResource_Get /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -500,7 +500,7 @@ public virtual async Task> SetTagsAsync(IDict { Argument.AssertNotNull(tags, nameof(tags)); - using var scope = _edgeOrderAddressClientDiagnostics.CreateScope("EdgeOrderAddressResource.SetTags"); + using var scope = _edgeOrderAddressAddressResourcesClientDiagnostics.CreateScope("EdgeOrderAddressResource.SetTags"); scope.Start(); try { @@ -510,7 +510,7 @@ public virtual async Task> SetTagsAsync(IDict var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); originalTags.Value.Data.TagValues.ReplaceWith(tags); await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _edgeOrderAddressRestClient.GetAddressByNameAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var originalResponse = await _edgeOrderAddressAddressResourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); return Response.FromValue(new EdgeOrderAddressResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else @@ -538,11 +538,11 @@ public virtual async Task> SetTagsAsync(IDict /// /// /// Operation Id - /// GetAddressByName + /// AddressResource_Get /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -557,7 +557,7 @@ public virtual Response SetTags(IDictionary SetTags(IDictionary SetTags(IDictionary /// /// Operation Id - /// GetAddressByName + /// AddressResource_Get /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -614,7 +614,7 @@ public virtual async Task> RemoveTagAsync(str { Argument.AssertNotNull(key, nameof(key)); - using var scope = _edgeOrderAddressClientDiagnostics.CreateScope("EdgeOrderAddressResource.RemoveTag"); + using var scope = _edgeOrderAddressAddressResourcesClientDiagnostics.CreateScope("EdgeOrderAddressResource.RemoveTag"); scope.Start(); try { @@ -623,7 +623,7 @@ public virtual async Task> RemoveTagAsync(str var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); originalTags.Value.Data.TagValues.Remove(key); await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _edgeOrderAddressRestClient.GetAddressByNameAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var originalResponse = await _edgeOrderAddressAddressResourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); return Response.FromValue(new EdgeOrderAddressResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else @@ -655,11 +655,11 @@ public virtual async Task> RemoveTagAsync(str /// /// /// Operation Id - /// GetAddressByName + /// AddressResource_Get /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -674,7 +674,7 @@ public virtual Response RemoveTag(string key, Cancella { Argument.AssertNotNull(key, nameof(key)); - using var scope = _edgeOrderAddressClientDiagnostics.CreateScope("EdgeOrderAddressResource.RemoveTag"); + using var scope = _edgeOrderAddressAddressResourcesClientDiagnostics.CreateScope("EdgeOrderAddressResource.RemoveTag"); scope.Start(); try { @@ -683,7 +683,7 @@ public virtual Response RemoveTag(string key, Cancella var originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues.Remove(key); GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _edgeOrderAddressRestClient.GetAddressByName(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var originalResponse = _edgeOrderAddressAddressResourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); return Response.FromValue(new EdgeOrderAddressResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderCollection.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderCollection.cs index 600695cc6f2c..59d0e7fc3b36 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderCollection.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderCollection.cs @@ -22,8 +22,8 @@ namespace Azure.ResourceManager.EdgeOrder /// public partial class EdgeOrderCollection : ArmCollection { - private readonly ClientDiagnostics _edgeOrderClientDiagnostics; - private readonly EdgeOrderManagementRestOperations _edgeOrderRestClient; + private readonly ClientDiagnostics _edgeOrderOrderResourcesClientDiagnostics; + private readonly OrderResourcesRestOperations _edgeOrderOrderResourcesRestClient; /// Initializes a new instance of the class for mocking. protected EdgeOrderCollection() @@ -35,9 +35,9 @@ protected EdgeOrderCollection() /// The identifier of the parent resource that is the target of operations. internal EdgeOrderCollection(ArmClient client, ResourceIdentifier id) : base(client, id) { - _edgeOrderClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.EdgeOrder", EdgeOrderResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(EdgeOrderResource.ResourceType, out string edgeOrderApiVersion); - _edgeOrderRestClient = new EdgeOrderManagementRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, edgeOrderApiVersion); + _edgeOrderOrderResourcesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.EdgeOrder", EdgeOrderResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(EdgeOrderResource.ResourceType, out string edgeOrderOrderResourcesApiVersion); + _edgeOrderOrderResourcesRestClient = new OrderResourcesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, edgeOrderOrderResourcesApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -50,7 +50,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Gets an order. + /// Get an order. /// /// /// Request Path @@ -58,11 +58,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// GetOrderByName + /// OrderResource_Get /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -70,7 +70,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// - /// The name of Azure region. + /// The name of the Azure region. /// The name of the order. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -79,11 +79,11 @@ public virtual async Task> GetAsync(AzureLocation lo { Argument.AssertNotNullOrEmpty(orderName, nameof(orderName)); - using var scope = _edgeOrderClientDiagnostics.CreateScope("EdgeOrderCollection.Get"); + using var scope = _edgeOrderOrderResourcesClientDiagnostics.CreateScope("EdgeOrderCollection.Get"); scope.Start(); try { - var response = await _edgeOrderRestClient.GetOrderByNameAsync(Id.SubscriptionId, Id.ResourceGroupName, location, orderName, cancellationToken).ConfigureAwait(false); + var response = await _edgeOrderOrderResourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, location, orderName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new EdgeOrderResource(Client, response.Value), response.GetRawResponse()); @@ -96,7 +96,7 @@ public virtual async Task> GetAsync(AzureLocation lo } /// - /// Gets an order. + /// Get an order. /// /// /// Request Path @@ -104,11 +104,11 @@ public virtual async Task> GetAsync(AzureLocation lo /// /// /// Operation Id - /// GetOrderByName + /// OrderResource_Get /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> GetAsync(AzureLocation lo /// /// /// - /// The name of Azure region. + /// The name of the Azure region. /// The name of the order. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -125,11 +125,11 @@ public virtual Response Get(AzureLocation location, string or { Argument.AssertNotNullOrEmpty(orderName, nameof(orderName)); - using var scope = _edgeOrderClientDiagnostics.CreateScope("EdgeOrderCollection.Get"); + using var scope = _edgeOrderOrderResourcesClientDiagnostics.CreateScope("EdgeOrderCollection.Get"); scope.Start(); try { - var response = _edgeOrderRestClient.GetOrderByName(Id.SubscriptionId, Id.ResourceGroupName, location, orderName, cancellationToken); + var response = _edgeOrderOrderResourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, location, orderName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new EdgeOrderResource(Client, response.Value), response.GetRawResponse()); @@ -150,11 +150,11 @@ public virtual Response Get(AzureLocation location, string or /// /// /// Operation Id - /// GetOrderByName + /// OrderResource_Get /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual Response Get(AzureLocation location, string or /// /// /// - /// The name of Azure region. + /// The name of the Azure region. /// The name of the order. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -171,11 +171,11 @@ public virtual async Task> ExistsAsync(AzureLocation location, st { Argument.AssertNotNullOrEmpty(orderName, nameof(orderName)); - using var scope = _edgeOrderClientDiagnostics.CreateScope("EdgeOrderCollection.Exists"); + using var scope = _edgeOrderOrderResourcesClientDiagnostics.CreateScope("EdgeOrderCollection.Exists"); scope.Start(); try { - var response = await _edgeOrderRestClient.GetOrderByNameAsync(Id.SubscriptionId, Id.ResourceGroupName, location, orderName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _edgeOrderOrderResourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, location, orderName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -194,11 +194,11 @@ public virtual async Task> ExistsAsync(AzureLocation location, st /// /// /// Operation Id - /// GetOrderByName + /// OrderResource_Get /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -206,7 +206,7 @@ public virtual async Task> ExistsAsync(AzureLocation location, st /// /// /// - /// The name of Azure region. + /// The name of the Azure region. /// The name of the order. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -215,11 +215,11 @@ public virtual Response Exists(AzureLocation location, string orderName, C { Argument.AssertNotNullOrEmpty(orderName, nameof(orderName)); - using var scope = _edgeOrderClientDiagnostics.CreateScope("EdgeOrderCollection.Exists"); + using var scope = _edgeOrderOrderResourcesClientDiagnostics.CreateScope("EdgeOrderCollection.Exists"); scope.Start(); try { - var response = _edgeOrderRestClient.GetOrderByName(Id.SubscriptionId, Id.ResourceGroupName, location, orderName, cancellationToken: cancellationToken); + var response = _edgeOrderOrderResourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, location, orderName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -238,11 +238,11 @@ public virtual Response Exists(AzureLocation location, string orderName, C /// /// /// Operation Id - /// GetOrderByName + /// OrderResource_Get /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -250,7 +250,7 @@ public virtual Response Exists(AzureLocation location, string orderName, C /// /// /// - /// The name of Azure region. + /// The name of the Azure region. /// The name of the order. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -259,11 +259,11 @@ public virtual async Task> GetIfExistsAsync( { Argument.AssertNotNullOrEmpty(orderName, nameof(orderName)); - using var scope = _edgeOrderClientDiagnostics.CreateScope("EdgeOrderCollection.GetIfExists"); + using var scope = _edgeOrderOrderResourcesClientDiagnostics.CreateScope("EdgeOrderCollection.GetIfExists"); scope.Start(); try { - var response = await _edgeOrderRestClient.GetOrderByNameAsync(Id.SubscriptionId, Id.ResourceGroupName, location, orderName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _edgeOrderOrderResourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, location, orderName, cancellationToken: cancellationToken).ConfigureAwait(false); if (response.Value == null) return new NoValueResponse(response.GetRawResponse()); return Response.FromValue(new EdgeOrderResource(Client, response.Value), response.GetRawResponse()); @@ -284,11 +284,11 @@ public virtual async Task> GetIfExistsAsync( /// /// /// Operation Id - /// GetOrderByName + /// OrderResource_Get /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -296,7 +296,7 @@ public virtual async Task> GetIfExistsAsync( /// /// /// - /// The name of Azure region. + /// The name of the Azure region. /// The name of the order. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -305,11 +305,11 @@ public virtual NullableResponse GetIfExists(AzureLocation loc { Argument.AssertNotNullOrEmpty(orderName, nameof(orderName)); - using var scope = _edgeOrderClientDiagnostics.CreateScope("EdgeOrderCollection.GetIfExists"); + using var scope = _edgeOrderOrderResourcesClientDiagnostics.CreateScope("EdgeOrderCollection.GetIfExists"); scope.Start(); try { - var response = _edgeOrderRestClient.GetOrderByName(Id.SubscriptionId, Id.ResourceGroupName, location, orderName, cancellationToken: cancellationToken); + var response = _edgeOrderOrderResourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, location, orderName, cancellationToken: cancellationToken); if (response.Value == null) return new NoValueResponse(response.GetRawResponse()); return Response.FromValue(new EdgeOrderResource(Client, response.Value), response.GetRawResponse()); diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderData.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderData.Serialization.cs index 47f82174058f..642723b00ebe 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderData.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderData.Serialization.cs @@ -70,6 +70,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } writer.WriteEndArray(); } + if (options.Format != "W" && Optional.IsDefined(OrderMode)) + { + writer.WritePropertyName("orderMode"u8); + writer.WriteStringValue(OrderMode.Value.ToString()); + } writer.WriteEndObject(); } @@ -100,6 +105,7 @@ internal static EdgeOrderData DeserializeEdgeOrderData(JsonElement element, Mode IReadOnlyList orderItemIds = default; EdgeOrderStageDetails currentStage = default; IReadOnlyList orderStageHistory = default; + EdgeOrderItemMode? orderMode = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -181,6 +187,15 @@ internal static EdgeOrderData DeserializeEdgeOrderData(JsonElement element, Mode orderStageHistory = array; continue; } + if (property0.NameEquals("orderMode"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + orderMode = new EdgeOrderItemMode(property0.Value.GetString()); + continue; + } } continue; } @@ -198,6 +213,7 @@ internal static EdgeOrderData DeserializeEdgeOrderData(JsonElement element, Mode orderItemIds ?? new ChangeTrackingList(), currentStage, orderStageHistory ?? new ChangeTrackingList(), + orderMode, serializedAdditionalRawData); } diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderData.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderData.cs index 8241248e9385..243c7bc2579c 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderData.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderData.cs @@ -51,13 +51,6 @@ public partial class EdgeOrderData : ResourceData /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - public EdgeOrderData() - { - OrderItemIds = new ChangeTrackingList(); - OrderStageHistory = new ChangeTrackingList(); - } - /// Initializes a new instance of . /// The id. /// The name. @@ -66,12 +59,14 @@ public EdgeOrderData() /// List of order item ARM Ids which are part of an order. /// Order current status. /// Order status history. + /// Order mode. /// Keeps track of any properties unknown to the library. - internal EdgeOrderData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IReadOnlyList orderItemIds, EdgeOrderStageDetails currentStage, IReadOnlyList orderStageHistory, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal EdgeOrderData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IReadOnlyList orderItemIds, EdgeOrderStageDetails currentStage, IReadOnlyList orderStageHistory, EdgeOrderItemMode? orderMode, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { OrderItemIds = orderItemIds; CurrentStage = currentStage; OrderStageHistory = orderStageHistory; + OrderMode = orderMode; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -81,5 +76,7 @@ internal EdgeOrderData(ResourceIdentifier id, string name, ResourceType resource public EdgeOrderStageDetails CurrentStage { get; } /// Order status history. public IReadOnlyList OrderStageHistory { get; } + /// Order mode. + public EdgeOrderItemMode? OrderMode { get; } } } diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderItemCollection.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderItemCollection.cs index cbb8e3f147bc..838c48b1a528 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderItemCollection.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderItemCollection.cs @@ -25,8 +25,8 @@ namespace Azure.ResourceManager.EdgeOrder /// public partial class EdgeOrderItemCollection : ArmCollection, IEnumerable, IAsyncEnumerable { - private readonly ClientDiagnostics _edgeOrderItemClientDiagnostics; - private readonly EdgeOrderManagementRestOperations _edgeOrderItemRestClient; + private readonly ClientDiagnostics _edgeOrderItemOrderItemResourcesClientDiagnostics; + private readonly OrderItemResourcesRestOperations _edgeOrderItemOrderItemResourcesRestClient; /// Initializes a new instance of the class for mocking. protected EdgeOrderItemCollection() @@ -38,9 +38,9 @@ protected EdgeOrderItemCollection() /// The identifier of the parent resource that is the target of operations. internal EdgeOrderItemCollection(ArmClient client, ResourceIdentifier id) : base(client, id) { - _edgeOrderItemClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.EdgeOrder", EdgeOrderItemResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(EdgeOrderItemResource.ResourceType, out string edgeOrderItemApiVersion); - _edgeOrderItemRestClient = new EdgeOrderManagementRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, edgeOrderItemApiVersion); + _edgeOrderItemOrderItemResourcesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.EdgeOrder", EdgeOrderItemResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(EdgeOrderItemResource.ResourceType, out string edgeOrderItemOrderItemResourcesApiVersion); + _edgeOrderItemOrderItemResourcesRestClient = new OrderItemResourcesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, edgeOrderItemOrderItemResourcesApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -53,7 +53,8 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Creates an order item. Existing order item cannot be updated with this api and should instead be updated with the Update order item API. + /// Create an order item. Existing order item cannot be updated with this api and should instead be updated with the Update order item + /// API. /// /// /// Request Path @@ -61,11 +62,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// CreateOrderItem + /// OrderItemResource_Create /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -84,12 +85,12 @@ public virtual async Task> CreateOrUpdateAsy Argument.AssertNotNullOrEmpty(orderItemName, nameof(orderItemName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _edgeOrderItemClientDiagnostics.CreateScope("EdgeOrderItemCollection.CreateOrUpdate"); + using var scope = _edgeOrderItemOrderItemResourcesClientDiagnostics.CreateScope("EdgeOrderItemCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _edgeOrderItemRestClient.CreateOrderItemAsync(Id.SubscriptionId, Id.ResourceGroupName, orderItemName, data, cancellationToken).ConfigureAwait(false); - var operation = new EdgeOrderArmOperation(new EdgeOrderItemOperationSource(Client), _edgeOrderItemClientDiagnostics, Pipeline, _edgeOrderItemRestClient.CreateCreateOrderItemRequest(Id.SubscriptionId, Id.ResourceGroupName, orderItemName, data).Request, response, OperationFinalStateVia.Location); + var response = await _edgeOrderItemOrderItemResourcesRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, orderItemName, data, cancellationToken).ConfigureAwait(false); + var operation = new EdgeOrderArmOperation(new EdgeOrderItemOperationSource(Client), _edgeOrderItemOrderItemResourcesClientDiagnostics, Pipeline, _edgeOrderItemOrderItemResourcesRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, orderItemName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -102,7 +103,8 @@ public virtual async Task> CreateOrUpdateAsy } /// - /// Creates an order item. Existing order item cannot be updated with this api and should instead be updated with the Update order item API. + /// Create an order item. Existing order item cannot be updated with this api and should instead be updated with the Update order item + /// API. /// /// /// Request Path @@ -110,11 +112,11 @@ public virtual async Task> CreateOrUpdateAsy /// /// /// Operation Id - /// CreateOrderItem + /// OrderItemResource_Create /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -133,12 +135,12 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wait Argument.AssertNotNullOrEmpty(orderItemName, nameof(orderItemName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _edgeOrderItemClientDiagnostics.CreateScope("EdgeOrderItemCollection.CreateOrUpdate"); + using var scope = _edgeOrderItemOrderItemResourcesClientDiagnostics.CreateScope("EdgeOrderItemCollection.CreateOrUpdate"); scope.Start(); try { - var response = _edgeOrderItemRestClient.CreateOrderItem(Id.SubscriptionId, Id.ResourceGroupName, orderItemName, data, cancellationToken); - var operation = new EdgeOrderArmOperation(new EdgeOrderItemOperationSource(Client), _edgeOrderItemClientDiagnostics, Pipeline, _edgeOrderItemRestClient.CreateCreateOrderItemRequest(Id.SubscriptionId, Id.ResourceGroupName, orderItemName, data).Request, response, OperationFinalStateVia.Location); + var response = _edgeOrderItemOrderItemResourcesRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, orderItemName, data, cancellationToken); + var operation = new EdgeOrderArmOperation(new EdgeOrderItemOperationSource(Client), _edgeOrderItemOrderItemResourcesClientDiagnostics, Pipeline, _edgeOrderItemOrderItemResourcesRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, orderItemName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -151,7 +153,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wait } /// - /// Gets an order item. + /// Get an order item. /// /// /// Request Path @@ -159,11 +161,11 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wait /// /// /// Operation Id - /// GetOrderItemByName + /// OrderItemResource_Get /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -172,7 +174,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wait /// /// /// The name of the order item. - /// $expand is supported on device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Device Details for order item provides details on the devices of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. + /// $expand is supported on parent device details, device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Parent Device Details for order item provides details on the devices of the product, Device Details for order item provides details on the devices of the child configurations of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -180,11 +182,11 @@ public virtual async Task> GetAsync(string order { Argument.AssertNotNullOrEmpty(orderItemName, nameof(orderItemName)); - using var scope = _edgeOrderItemClientDiagnostics.CreateScope("EdgeOrderItemCollection.Get"); + using var scope = _edgeOrderItemOrderItemResourcesClientDiagnostics.CreateScope("EdgeOrderItemCollection.Get"); scope.Start(); try { - var response = await _edgeOrderItemRestClient.GetOrderItemByNameAsync(Id.SubscriptionId, Id.ResourceGroupName, orderItemName, expand, cancellationToken).ConfigureAwait(false); + var response = await _edgeOrderItemOrderItemResourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, orderItemName, expand, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new EdgeOrderItemResource(Client, response.Value), response.GetRawResponse()); @@ -197,7 +199,7 @@ public virtual async Task> GetAsync(string order } /// - /// Gets an order item. + /// Get an order item. /// /// /// Request Path @@ -205,11 +207,11 @@ public virtual async Task> GetAsync(string order /// /// /// Operation Id - /// GetOrderItemByName + /// OrderItemResource_Get /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -218,7 +220,7 @@ public virtual async Task> GetAsync(string order /// /// /// The name of the order item. - /// $expand is supported on device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Device Details for order item provides details on the devices of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. + /// $expand is supported on parent device details, device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Parent Device Details for order item provides details on the devices of the product, Device Details for order item provides details on the devices of the child configurations of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -226,11 +228,11 @@ public virtual Response Get(string orderItemName, string { Argument.AssertNotNullOrEmpty(orderItemName, nameof(orderItemName)); - using var scope = _edgeOrderItemClientDiagnostics.CreateScope("EdgeOrderItemCollection.Get"); + using var scope = _edgeOrderItemOrderItemResourcesClientDiagnostics.CreateScope("EdgeOrderItemCollection.Get"); scope.Start(); try { - var response = _edgeOrderItemRestClient.GetOrderItemByName(Id.SubscriptionId, Id.ResourceGroupName, orderItemName, expand, cancellationToken); + var response = _edgeOrderItemOrderItemResourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, orderItemName, expand, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new EdgeOrderItemResource(Client, response.Value), response.GetRawResponse()); @@ -243,7 +245,7 @@ public virtual Response Get(string orderItemName, string } /// - /// Lists order item at resource group level. + /// List order items at resource group level. /// /// /// Request Path @@ -251,11 +253,11 @@ public virtual Response Get(string orderItemName, string /// /// /// Operation Id - /// ListOrderItemsAtResourceGroupLevel + /// OrderItemResource_ListByResourceGroup /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -263,20 +265,21 @@ public virtual Response Get(string orderItemName, string /// /// /// - /// $filter is supported to filter based on order id. Filter supports only equals operation. - /// $expand is supported on device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Device Details for order item provides details on the devices of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. + /// $filter is supported to filter based on order id and order Item Type. Filter supports only equals operation. + /// $expand is supported on parent device details, device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Parent Device Details for order item provides details on the devices of the product, Device Details for order item provides details on the devices of the child configurations of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. /// $skipToken is supported on Get list of order items, which provides the next page in the list of order items. + /// $top is supported on fetching list of resources. $top=10 means that the first 10 items in the list will be returned to the API caller. /// The cancellation token to use. /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(string filter = null, string expand = null, string skipToken = null, CancellationToken cancellationToken = default) + public virtual AsyncPageable GetAllAsync(string filter = null, string expand = null, string skipToken = null, int? top = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _edgeOrderItemRestClient.CreateListOrderItemsAtResourceGroupLevelRequest(Id.SubscriptionId, Id.ResourceGroupName, filter, expand, skipToken); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _edgeOrderItemRestClient.CreateListOrderItemsAtResourceGroupLevelNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, filter, expand, skipToken); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EdgeOrderItemResource(Client, EdgeOrderItemData.DeserializeEdgeOrderItemData(e)), _edgeOrderItemClientDiagnostics, Pipeline, "EdgeOrderItemCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _edgeOrderItemOrderItemResourcesRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName, filter, expand, skipToken, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _edgeOrderItemOrderItemResourcesRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, filter, expand, skipToken, top); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EdgeOrderItemResource(Client, EdgeOrderItemData.DeserializeEdgeOrderItemData(e)), _edgeOrderItemOrderItemResourcesClientDiagnostics, Pipeline, "EdgeOrderItemCollection.GetAll", "value", "nextLink", cancellationToken); } /// - /// Lists order item at resource group level. + /// List order items at resource group level. /// /// /// Request Path @@ -284,11 +287,11 @@ public virtual AsyncPageable GetAllAsync(string filter = /// /// /// Operation Id - /// ListOrderItemsAtResourceGroupLevel + /// OrderItemResource_ListByResourceGroup /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -296,16 +299,17 @@ public virtual AsyncPageable GetAllAsync(string filter = /// /// /// - /// $filter is supported to filter based on order id. Filter supports only equals operation. - /// $expand is supported on device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Device Details for order item provides details on the devices of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. + /// $filter is supported to filter based on order id and order Item Type. Filter supports only equals operation. + /// $expand is supported on parent device details, device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Parent Device Details for order item provides details on the devices of the product, Device Details for order item provides details on the devices of the child configurations of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. /// $skipToken is supported on Get list of order items, which provides the next page in the list of order items. + /// $top is supported on fetching list of resources. $top=10 means that the first 10 items in the list will be returned to the API caller. /// The cancellation token to use. /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(string filter = null, string expand = null, string skipToken = null, CancellationToken cancellationToken = default) + public virtual Pageable GetAll(string filter = null, string expand = null, string skipToken = null, int? top = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _edgeOrderItemRestClient.CreateListOrderItemsAtResourceGroupLevelRequest(Id.SubscriptionId, Id.ResourceGroupName, filter, expand, skipToken); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _edgeOrderItemRestClient.CreateListOrderItemsAtResourceGroupLevelNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, filter, expand, skipToken); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EdgeOrderItemResource(Client, EdgeOrderItemData.DeserializeEdgeOrderItemData(e)), _edgeOrderItemClientDiagnostics, Pipeline, "EdgeOrderItemCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _edgeOrderItemOrderItemResourcesRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName, filter, expand, skipToken, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _edgeOrderItemOrderItemResourcesRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, filter, expand, skipToken, top); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EdgeOrderItemResource(Client, EdgeOrderItemData.DeserializeEdgeOrderItemData(e)), _edgeOrderItemOrderItemResourcesClientDiagnostics, Pipeline, "EdgeOrderItemCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -317,11 +321,11 @@ public virtual Pageable GetAll(string filter = null, stri /// /// /// Operation Id - /// GetOrderItemByName + /// OrderItemResource_Get /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -330,7 +334,7 @@ public virtual Pageable GetAll(string filter = null, stri /// /// /// The name of the order item. - /// $expand is supported on device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Device Details for order item provides details on the devices of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. + /// $expand is supported on parent device details, device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Parent Device Details for order item provides details on the devices of the product, Device Details for order item provides details on the devices of the child configurations of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -338,11 +342,11 @@ public virtual async Task> ExistsAsync(string orderItemName, stri { Argument.AssertNotNullOrEmpty(orderItemName, nameof(orderItemName)); - using var scope = _edgeOrderItemClientDiagnostics.CreateScope("EdgeOrderItemCollection.Exists"); + using var scope = _edgeOrderItemOrderItemResourcesClientDiagnostics.CreateScope("EdgeOrderItemCollection.Exists"); scope.Start(); try { - var response = await _edgeOrderItemRestClient.GetOrderItemByNameAsync(Id.SubscriptionId, Id.ResourceGroupName, orderItemName, expand, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _edgeOrderItemOrderItemResourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, orderItemName, expand, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -361,11 +365,11 @@ public virtual async Task> ExistsAsync(string orderItemName, stri /// /// /// Operation Id - /// GetOrderItemByName + /// OrderItemResource_Get /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -374,7 +378,7 @@ public virtual async Task> ExistsAsync(string orderItemName, stri /// /// /// The name of the order item. - /// $expand is supported on device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Device Details for order item provides details on the devices of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. + /// $expand is supported on parent device details, device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Parent Device Details for order item provides details on the devices of the product, Device Details for order item provides details on the devices of the child configurations of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -382,11 +386,11 @@ public virtual Response Exists(string orderItemName, string expand = null, { Argument.AssertNotNullOrEmpty(orderItemName, nameof(orderItemName)); - using var scope = _edgeOrderItemClientDiagnostics.CreateScope("EdgeOrderItemCollection.Exists"); + using var scope = _edgeOrderItemOrderItemResourcesClientDiagnostics.CreateScope("EdgeOrderItemCollection.Exists"); scope.Start(); try { - var response = _edgeOrderItemRestClient.GetOrderItemByName(Id.SubscriptionId, Id.ResourceGroupName, orderItemName, expand, cancellationToken: cancellationToken); + var response = _edgeOrderItemOrderItemResourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, orderItemName, expand, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -405,11 +409,11 @@ public virtual Response Exists(string orderItemName, string expand = null, /// /// /// Operation Id - /// GetOrderItemByName + /// OrderItemResource_Get /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -418,7 +422,7 @@ public virtual Response Exists(string orderItemName, string expand = null, /// /// /// The name of the order item. - /// $expand is supported on device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Device Details for order item provides details on the devices of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. + /// $expand is supported on parent device details, device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Parent Device Details for order item provides details on the devices of the product, Device Details for order item provides details on the devices of the child configurations of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -426,11 +430,11 @@ public virtual async Task> GetIfExistsAs { Argument.AssertNotNullOrEmpty(orderItemName, nameof(orderItemName)); - using var scope = _edgeOrderItemClientDiagnostics.CreateScope("EdgeOrderItemCollection.GetIfExists"); + using var scope = _edgeOrderItemOrderItemResourcesClientDiagnostics.CreateScope("EdgeOrderItemCollection.GetIfExists"); scope.Start(); try { - var response = await _edgeOrderItemRestClient.GetOrderItemByNameAsync(Id.SubscriptionId, Id.ResourceGroupName, orderItemName, expand, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _edgeOrderItemOrderItemResourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, orderItemName, expand, cancellationToken: cancellationToken).ConfigureAwait(false); if (response.Value == null) return new NoValueResponse(response.GetRawResponse()); return Response.FromValue(new EdgeOrderItemResource(Client, response.Value), response.GetRawResponse()); @@ -451,11 +455,11 @@ public virtual async Task> GetIfExistsAs /// /// /// Operation Id - /// GetOrderItemByName + /// OrderItemResource_Get /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -464,7 +468,7 @@ public virtual async Task> GetIfExistsAs /// /// /// The name of the order item. - /// $expand is supported on device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Device Details for order item provides details on the devices of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. + /// $expand is supported on parent device details, device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Parent Device Details for order item provides details on the devices of the product, Device Details for order item provides details on the devices of the child configurations of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -472,11 +476,11 @@ public virtual NullableResponse GetIfExists(string orderI { Argument.AssertNotNullOrEmpty(orderItemName, nameof(orderItemName)); - using var scope = _edgeOrderItemClientDiagnostics.CreateScope("EdgeOrderItemCollection.GetIfExists"); + using var scope = _edgeOrderItemOrderItemResourcesClientDiagnostics.CreateScope("EdgeOrderItemCollection.GetIfExists"); scope.Start(); try { - var response = _edgeOrderItemRestClient.GetOrderItemByName(Id.SubscriptionId, Id.ResourceGroupName, orderItemName, expand, cancellationToken: cancellationToken); + var response = _edgeOrderItemOrderItemResourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, orderItemName, expand, cancellationToken: cancellationToken); if (response.Value == null) return new NoValueResponse(response.GetRawResponse()); return Response.FromValue(new EdgeOrderItemResource(Client, response.Value), response.GetRawResponse()); diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderItemData.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderItemData.Serialization.cs index fafbc25c27bb..678097007007 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderItemData.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderItemData.Serialization.cs @@ -38,12 +38,20 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + ((IJsonModel)Identity).Write(writer, options); + } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("orderItemDetails"u8); writer.WriteObjectValue(OrderItemDetails, options); - writer.WritePropertyName("addressDetails"u8); - writer.WriteObjectValue(AddressDetails, options); + if (Optional.IsDefined(AddressDetails)) + { + writer.WritePropertyName("addressDetails"u8); + writer.WriteObjectValue(AddressDetails, options); + } if (options.Format != "W" && Optional.IsDefined(StartOn)) { writer.WritePropertyName("startTime"u8); @@ -51,6 +59,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } writer.WritePropertyName("orderId"u8); writer.WriteStringValue(OrderId); + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } writer.WriteEndObject(); } @@ -74,6 +87,7 @@ internal static EdgeOrderItemData DeserializeEdgeOrderItemData(JsonElement eleme { return null; } + ManagedServiceIdentity identity = default; IDictionary tags = default; AzureLocation location = default; ResourceIdentifier id = default; @@ -84,10 +98,20 @@ internal static EdgeOrderItemData DeserializeEdgeOrderItemData(JsonElement eleme EdgeOrderItemAddressDetails addressDetails = default; DateTimeOffset? startTime = default; ResourceIdentifier orderId = default; + EdgeOrderProvisioningState? provisioningState = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + identity = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), options, AzureResourceManagerEdgeOrderContext.Default); + continue; + } if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -147,6 +171,10 @@ internal static EdgeOrderItemData DeserializeEdgeOrderItemData(JsonElement eleme } if (property0.NameEquals("addressDetails"u8)) { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } addressDetails = EdgeOrderItemAddressDetails.DeserializeEdgeOrderItemAddressDetails(property0.Value, options); continue; } @@ -164,6 +192,15 @@ internal static EdgeOrderItemData DeserializeEdgeOrderItemData(JsonElement eleme orderId = new ResourceIdentifier(property0.Value.GetString()); continue; } + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new EdgeOrderProvisioningState(property0.Value.GetString()); + continue; + } } continue; } @@ -184,6 +221,8 @@ internal static EdgeOrderItemData DeserializeEdgeOrderItemData(JsonElement eleme addressDetails, startTime, orderId, + provisioningState, + identity, serializedAdditionalRawData); } diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderItemData.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderItemData.cs index 8b3caeed525e..9f077e6d3afb 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderItemData.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderItemData.cs @@ -15,7 +15,7 @@ namespace Azure.ResourceManager.EdgeOrder { /// /// A class representing the EdgeOrderItem data model. - /// Represents order item contract + /// Represents order item resource. /// public partial class EdgeOrderItemData : TrackedResourceData { @@ -54,17 +54,14 @@ public partial class EdgeOrderItemData : TrackedResourceData /// Initializes a new instance of . /// The location. /// Represents order item details. - /// Represents shipping and return address for order item. /// Id of the order to which order item belongs to. - /// , or is null. - public EdgeOrderItemData(AzureLocation location, EdgeOrderItemDetails orderItemDetails, EdgeOrderItemAddressDetails addressDetails, ResourceIdentifier orderId) : base(location) + /// or is null. + public EdgeOrderItemData(AzureLocation location, EdgeOrderItemDetails orderItemDetails, ResourceIdentifier orderId) : base(location) { Argument.AssertNotNull(orderItemDetails, nameof(orderItemDetails)); - Argument.AssertNotNull(addressDetails, nameof(addressDetails)); Argument.AssertNotNull(orderId, nameof(orderId)); OrderItemDetails = orderItemDetails; - AddressDetails = addressDetails; OrderId = orderId; } @@ -79,13 +76,17 @@ public EdgeOrderItemData(AzureLocation location, EdgeOrderItemDetails orderItemD /// Represents shipping and return address for order item. /// Start time of order item. /// Id of the order to which order item belongs to. + /// Provisioning state. + /// Msi identity of the resource. /// Keeps track of any properties unknown to the library. - internal EdgeOrderItemData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, EdgeOrderItemDetails orderItemDetails, EdgeOrderItemAddressDetails addressDetails, DateTimeOffset? startOn, ResourceIdentifier orderId, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal EdgeOrderItemData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, EdgeOrderItemDetails orderItemDetails, EdgeOrderItemAddressDetails addressDetails, DateTimeOffset? startOn, ResourceIdentifier orderId, EdgeOrderProvisioningState? provisioningState, ManagedServiceIdentity identity, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { OrderItemDetails = orderItemDetails; AddressDetails = addressDetails; StartOn = startOn; OrderId = orderId; + ProvisioningState = provisioningState; + Identity = identity; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -102,5 +103,9 @@ internal EdgeOrderItemData() public DateTimeOffset? StartOn { get; } /// Id of the order to which order item belongs to. public ResourceIdentifier OrderId { get; set; } + /// Provisioning state. + public EdgeOrderProvisioningState? ProvisioningState { get; } + /// Msi identity of the resource. + public ManagedServiceIdentity Identity { get; set; } } } diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderItemResource.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderItemResource.cs index b4cb81f18627..08d9c907ae1d 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderItemResource.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderItemResource.cs @@ -35,8 +35,8 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, return new ResourceIdentifier(resourceId); } - private readonly ClientDiagnostics _edgeOrderItemClientDiagnostics; - private readonly EdgeOrderManagementRestOperations _edgeOrderItemRestClient; + private readonly ClientDiagnostics _edgeOrderItemOrderItemResourcesClientDiagnostics; + private readonly OrderItemResourcesRestOperations _edgeOrderItemOrderItemResourcesRestClient; private readonly EdgeOrderItemData _data; /// Gets the resource type for the operations. @@ -61,9 +61,9 @@ internal EdgeOrderItemResource(ArmClient client, EdgeOrderItemData data) : this( /// The identifier of the resource that is the target of operations. internal EdgeOrderItemResource(ArmClient client, ResourceIdentifier id) : base(client, id) { - _edgeOrderItemClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.EdgeOrder", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string edgeOrderItemApiVersion); - _edgeOrderItemRestClient = new EdgeOrderManagementRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, edgeOrderItemApiVersion); + _edgeOrderItemOrderItemResourcesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.EdgeOrder", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string edgeOrderItemOrderItemResourcesApiVersion); + _edgeOrderItemOrderItemResourcesRestClient = new OrderItemResourcesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, edgeOrderItemOrderItemResourcesApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -91,7 +91,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Gets an order item. + /// Get an order item. /// /// /// Request Path @@ -99,11 +99,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// GetOrderItemByName + /// OrderItemResource_Get /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -111,15 +111,15 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// - /// $expand is supported on device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Device Details for order item provides details on the devices of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. + /// $expand is supported on parent device details, device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Parent Device Details for order item provides details on the devices of the product, Device Details for order item provides details on the devices of the child configurations of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. /// The cancellation token to use. public virtual async Task> GetAsync(string expand = null, CancellationToken cancellationToken = default) { - using var scope = _edgeOrderItemClientDiagnostics.CreateScope("EdgeOrderItemResource.Get"); + using var scope = _edgeOrderItemOrderItemResourcesClientDiagnostics.CreateScope("EdgeOrderItemResource.Get"); scope.Start(); try { - var response = await _edgeOrderItemRestClient.GetOrderItemByNameAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, expand, cancellationToken).ConfigureAwait(false); + var response = await _edgeOrderItemOrderItemResourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, expand, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new EdgeOrderItemResource(Client, response.Value), response.GetRawResponse()); @@ -132,7 +132,7 @@ public virtual async Task> GetAsync(string expan } /// - /// Gets an order item. + /// Get an order item. /// /// /// Request Path @@ -140,11 +140,11 @@ public virtual async Task> GetAsync(string expan /// /// /// Operation Id - /// GetOrderItemByName + /// OrderItemResource_Get /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -152,15 +152,15 @@ public virtual async Task> GetAsync(string expan /// /// /// - /// $expand is supported on device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Device Details for order item provides details on the devices of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. + /// $expand is supported on parent device details, device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Parent Device Details for order item provides details on the devices of the product, Device Details for order item provides details on the devices of the child configurations of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. /// The cancellation token to use. public virtual Response Get(string expand = null, CancellationToken cancellationToken = default) { - using var scope = _edgeOrderItemClientDiagnostics.CreateScope("EdgeOrderItemResource.Get"); + using var scope = _edgeOrderItemOrderItemResourcesClientDiagnostics.CreateScope("EdgeOrderItemResource.Get"); scope.Start(); try { - var response = _edgeOrderItemRestClient.GetOrderItemByName(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, expand, cancellationToken); + var response = _edgeOrderItemOrderItemResourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, expand, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new EdgeOrderItemResource(Client, response.Value), response.GetRawResponse()); @@ -173,7 +173,7 @@ public virtual Response Get(string expand = null, Cancell } /// - /// Deletes an order item. + /// Delete an order item. /// /// /// Request Path @@ -181,11 +181,11 @@ public virtual Response Get(string expand = null, Cancell /// /// /// Operation Id - /// DeleteOrderItemByName + /// OrderItemResource_Delete /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -197,12 +197,12 @@ public virtual Response Get(string expand = null, Cancell /// The cancellation token to use. public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _edgeOrderItemClientDiagnostics.CreateScope("EdgeOrderItemResource.Delete"); + using var scope = _edgeOrderItemOrderItemResourcesClientDiagnostics.CreateScope("EdgeOrderItemResource.Delete"); scope.Start(); try { - var response = await _edgeOrderItemRestClient.DeleteOrderItemByNameAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new EdgeOrderArmOperation(_edgeOrderItemClientDiagnostics, Pipeline, _edgeOrderItemRestClient.CreateDeleteOrderItemByNameRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = await _edgeOrderItemOrderItemResourcesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new EdgeOrderArmOperation(_edgeOrderItemOrderItemResourcesClientDiagnostics, Pipeline, _edgeOrderItemOrderItemResourcesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -215,7 +215,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell } /// - /// Deletes an order item. + /// Delete an order item. /// /// /// Request Path @@ -223,11 +223,11 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id - /// DeleteOrderItemByName + /// OrderItemResource_Delete /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -239,12 +239,12 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// The cancellation token to use. public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _edgeOrderItemClientDiagnostics.CreateScope("EdgeOrderItemResource.Delete"); + using var scope = _edgeOrderItemOrderItemResourcesClientDiagnostics.CreateScope("EdgeOrderItemResource.Delete"); scope.Start(); try { - var response = _edgeOrderItemRestClient.DeleteOrderItemByName(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new EdgeOrderArmOperation(_edgeOrderItemClientDiagnostics, Pipeline, _edgeOrderItemRestClient.CreateDeleteOrderItemByNameRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = _edgeOrderItemOrderItemResourcesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new EdgeOrderArmOperation(_edgeOrderItemOrderItemResourcesClientDiagnostics, Pipeline, _edgeOrderItemOrderItemResourcesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -257,7 +257,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel } /// - /// Updates the properties of an existing order item. + /// Update the properties of an existing order item. /// /// /// Request Path @@ -265,11 +265,11 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Operation Id - /// UpdateOrderItem + /// OrderItemResource_Update /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -278,7 +278,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// order item update parameters from request body. + /// Order item update parameters from request body. /// Defines the If-Match condition. The patch will be performed only if the ETag of the order on the server matches this value. /// The cancellation token to use. /// is null. @@ -286,12 +286,12 @@ public virtual async Task> UpdateAsync(WaitU { Argument.AssertNotNull(patch, nameof(patch)); - using var scope = _edgeOrderItemClientDiagnostics.CreateScope("EdgeOrderItemResource.Update"); + using var scope = _edgeOrderItemOrderItemResourcesClientDiagnostics.CreateScope("EdgeOrderItemResource.Update"); scope.Start(); try { - var response = await _edgeOrderItemRestClient.UpdateOrderItemAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch, cancellationToken).ConfigureAwait(false); - var operation = new EdgeOrderArmOperation(new EdgeOrderItemOperationSource(Client), _edgeOrderItemClientDiagnostics, Pipeline, _edgeOrderItemRestClient.CreateUpdateOrderItemRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch).Request, response, OperationFinalStateVia.Location); + var response = await _edgeOrderItemOrderItemResourcesRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new EdgeOrderArmOperation(new EdgeOrderItemOperationSource(Client), _edgeOrderItemOrderItemResourcesClientDiagnostics, Pipeline, _edgeOrderItemOrderItemResourcesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -304,7 +304,7 @@ public virtual async Task> UpdateAsync(WaitU } /// - /// Updates the properties of an existing order item. + /// Update the properties of an existing order item. /// /// /// Request Path @@ -312,11 +312,11 @@ public virtual async Task> UpdateAsync(WaitU /// /// /// Operation Id - /// UpdateOrderItem + /// OrderItemResource_Update /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -325,7 +325,7 @@ public virtual async Task> UpdateAsync(WaitU /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// order item update parameters from request body. + /// Order item update parameters from request body. /// Defines the If-Match condition. The patch will be performed only if the ETag of the order on the server matches this value. /// The cancellation token to use. /// is null. @@ -333,12 +333,12 @@ public virtual ArmOperation Update(WaitUntil waitUntil, E { Argument.AssertNotNull(patch, nameof(patch)); - using var scope = _edgeOrderItemClientDiagnostics.CreateScope("EdgeOrderItemResource.Update"); + using var scope = _edgeOrderItemOrderItemResourcesClientDiagnostics.CreateScope("EdgeOrderItemResource.Update"); scope.Start(); try { - var response = _edgeOrderItemRestClient.UpdateOrderItem(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch, cancellationToken); - var operation = new EdgeOrderArmOperation(new EdgeOrderItemOperationSource(Client), _edgeOrderItemClientDiagnostics, Pipeline, _edgeOrderItemRestClient.CreateUpdateOrderItemRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch).Request, response, OperationFinalStateVia.Location); + var response = _edgeOrderItemOrderItemResourcesRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch, cancellationToken); + var operation = new EdgeOrderArmOperation(new EdgeOrderItemOperationSource(Client), _edgeOrderItemOrderItemResourcesClientDiagnostics, Pipeline, _edgeOrderItemOrderItemResourcesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -359,11 +359,11 @@ public virtual ArmOperation Update(WaitUntil waitUntil, E /// /// /// Operation Id - /// CancelOrderItem + /// OrderItemResources_Cancel /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -378,11 +378,11 @@ public virtual async Task CancelAsync(EdgeOrderItemCancellationReason { Argument.AssertNotNull(cancellationReason, nameof(cancellationReason)); - using var scope = _edgeOrderItemClientDiagnostics.CreateScope("EdgeOrderItemResource.Cancel"); + using var scope = _edgeOrderItemOrderItemResourcesClientDiagnostics.CreateScope("EdgeOrderItemResource.Cancel"); scope.Start(); try { - var response = await _edgeOrderItemRestClient.CancelOrderItemAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationReason, cancellationToken).ConfigureAwait(false); + var response = await _edgeOrderItemOrderItemResourcesRestClient.CancelAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationReason, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -401,11 +401,11 @@ public virtual async Task CancelAsync(EdgeOrderItemCancellationReason /// /// /// Operation Id - /// CancelOrderItem + /// OrderItemResources_Cancel /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -420,11 +420,11 @@ public virtual Response Cancel(EdgeOrderItemCancellationReason cancellationReaso { Argument.AssertNotNull(cancellationReason, nameof(cancellationReason)); - using var scope = _edgeOrderItemClientDiagnostics.CreateScope("EdgeOrderItemResource.Cancel"); + using var scope = _edgeOrderItemOrderItemResourcesClientDiagnostics.CreateScope("EdgeOrderItemResource.Cancel"); scope.Start(); try { - var response = _edgeOrderItemRestClient.CancelOrderItem(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationReason, cancellationToken); + var response = _edgeOrderItemOrderItemResourcesRestClient.Cancel(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationReason, cancellationToken); return response; } catch (Exception e) @@ -443,11 +443,11 @@ public virtual Response Cancel(EdgeOrderItemCancellationReason cancellationReaso /// /// /// Operation Id - /// ReturnOrderItem + /// OrderItemResources_Return /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -456,19 +456,19 @@ public virtual Response Cancel(EdgeOrderItemCancellationReason cancellationReaso /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Return order item CurrentStatus. + /// Return order item details. /// The cancellation token to use. /// is null. public virtual async Task ReturnAsync(WaitUntil waitUntil, EdgeOrderItemReturnContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); - using var scope = _edgeOrderItemClientDiagnostics.CreateScope("EdgeOrderItemResource.Return"); + using var scope = _edgeOrderItemOrderItemResourcesClientDiagnostics.CreateScope("EdgeOrderItemResource.Return"); scope.Start(); try { - var response = await _edgeOrderItemRestClient.ReturnOrderItemAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new EdgeOrderArmOperation(_edgeOrderItemClientDiagnostics, Pipeline, _edgeOrderItemRestClient.CreateReturnOrderItemRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var response = await _edgeOrderItemOrderItemResourcesRestClient.ReturnAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new EdgeOrderArmOperation(_edgeOrderItemOrderItemResourcesClientDiagnostics, Pipeline, _edgeOrderItemOrderItemResourcesRestClient.CreateReturnRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -489,11 +489,11 @@ public virtual async Task ReturnAsync(WaitUntil waitUntil, EdgeOrd /// /// /// Operation Id - /// ReturnOrderItem + /// OrderItemResources_Return /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -502,19 +502,19 @@ public virtual async Task ReturnAsync(WaitUntil waitUntil, EdgeOrd /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Return order item CurrentStatus. + /// Return order item details. /// The cancellation token to use. /// is null. public virtual ArmOperation Return(WaitUntil waitUntil, EdgeOrderItemReturnContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); - using var scope = _edgeOrderItemClientDiagnostics.CreateScope("EdgeOrderItemResource.Return"); + using var scope = _edgeOrderItemOrderItemResourcesClientDiagnostics.CreateScope("EdgeOrderItemResource.Return"); scope.Start(); try { - var response = _edgeOrderItemRestClient.ReturnOrderItem(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - var operation = new EdgeOrderArmOperation(_edgeOrderItemClientDiagnostics, Pipeline, _edgeOrderItemRestClient.CreateReturnOrderItemRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var response = _edgeOrderItemOrderItemResourcesRestClient.Return(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + var operation = new EdgeOrderArmOperation(_edgeOrderItemOrderItemResourcesClientDiagnostics, Pipeline, _edgeOrderItemOrderItemResourcesRestClient.CreateReturnRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -535,11 +535,11 @@ public virtual ArmOperation Return(WaitUntil waitUntil, EdgeOrderItemReturnConte /// /// /// Operation Id - /// GetOrderItemByName + /// OrderItemResource_Get /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -556,7 +556,7 @@ public virtual async Task> AddTagAsync(string ke Argument.AssertNotNull(key, nameof(key)); Argument.AssertNotNull(value, nameof(value)); - using var scope = _edgeOrderItemClientDiagnostics.CreateScope("EdgeOrderItemResource.AddTag"); + using var scope = _edgeOrderItemOrderItemResourcesClientDiagnostics.CreateScope("EdgeOrderItemResource.AddTag"); scope.Start(); try { @@ -565,7 +565,7 @@ public virtual async Task> AddTagAsync(string ke var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); originalTags.Value.Data.TagValues[key] = value; await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _edgeOrderItemRestClient.GetOrderItemByNameAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, cancellationToken).ConfigureAwait(false); + var originalResponse = await _edgeOrderItemOrderItemResourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, cancellationToken).ConfigureAwait(false); return Response.FromValue(new EdgeOrderItemResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else @@ -597,11 +597,11 @@ public virtual async Task> AddTagAsync(string ke /// /// /// Operation Id - /// GetOrderItemByName + /// OrderItemResource_Get /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -618,7 +618,7 @@ public virtual Response AddTag(string key, string value, Argument.AssertNotNull(key, nameof(key)); Argument.AssertNotNull(value, nameof(value)); - using var scope = _edgeOrderItemClientDiagnostics.CreateScope("EdgeOrderItemResource.AddTag"); + using var scope = _edgeOrderItemOrderItemResourcesClientDiagnostics.CreateScope("EdgeOrderItemResource.AddTag"); scope.Start(); try { @@ -627,7 +627,7 @@ public virtual Response AddTag(string key, string value, var originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues[key] = value; GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _edgeOrderItemRestClient.GetOrderItemByName(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, cancellationToken); + var originalResponse = _edgeOrderItemOrderItemResourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, cancellationToken); return Response.FromValue(new EdgeOrderItemResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else @@ -659,11 +659,11 @@ public virtual Response AddTag(string key, string value, /// /// /// Operation Id - /// GetOrderItemByName + /// OrderItemResource_Get /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -678,7 +678,7 @@ public virtual async Task> SetTagsAsync(IDiction { Argument.AssertNotNull(tags, nameof(tags)); - using var scope = _edgeOrderItemClientDiagnostics.CreateScope("EdgeOrderItemResource.SetTags"); + using var scope = _edgeOrderItemOrderItemResourcesClientDiagnostics.CreateScope("EdgeOrderItemResource.SetTags"); scope.Start(); try { @@ -688,7 +688,7 @@ public virtual async Task> SetTagsAsync(IDiction var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); originalTags.Value.Data.TagValues.ReplaceWith(tags); await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _edgeOrderItemRestClient.GetOrderItemByNameAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, cancellationToken).ConfigureAwait(false); + var originalResponse = await _edgeOrderItemOrderItemResourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, cancellationToken).ConfigureAwait(false); return Response.FromValue(new EdgeOrderItemResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else @@ -716,11 +716,11 @@ public virtual async Task> SetTagsAsync(IDiction /// /// /// Operation Id - /// GetOrderItemByName + /// OrderItemResource_Get /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -735,7 +735,7 @@ public virtual Response SetTags(IDictionary SetTags(IDictionary SetTags(IDictionary /// /// Operation Id - /// GetOrderItemByName + /// OrderItemResource_Get /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -792,7 +792,7 @@ public virtual async Task> RemoveTagAsync(string { Argument.AssertNotNull(key, nameof(key)); - using var scope = _edgeOrderItemClientDiagnostics.CreateScope("EdgeOrderItemResource.RemoveTag"); + using var scope = _edgeOrderItemOrderItemResourcesClientDiagnostics.CreateScope("EdgeOrderItemResource.RemoveTag"); scope.Start(); try { @@ -801,7 +801,7 @@ public virtual async Task> RemoveTagAsync(string var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); originalTags.Value.Data.TagValues.Remove(key); await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _edgeOrderItemRestClient.GetOrderItemByNameAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, cancellationToken).ConfigureAwait(false); + var originalResponse = await _edgeOrderItemOrderItemResourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, cancellationToken).ConfigureAwait(false); return Response.FromValue(new EdgeOrderItemResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else @@ -833,11 +833,11 @@ public virtual async Task> RemoveTagAsync(string /// /// /// Operation Id - /// GetOrderItemByName + /// OrderItemResource_Get /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -852,7 +852,7 @@ public virtual Response RemoveTag(string key, Cancellatio { Argument.AssertNotNull(key, nameof(key)); - using var scope = _edgeOrderItemClientDiagnostics.CreateScope("EdgeOrderItemResource.RemoveTag"); + using var scope = _edgeOrderItemOrderItemResourcesClientDiagnostics.CreateScope("EdgeOrderItemResource.RemoveTag"); scope.Start(); try { @@ -861,7 +861,7 @@ public virtual Response RemoveTag(string key, Cancellatio var originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues.Remove(key); GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _edgeOrderItemRestClient.GetOrderItemByName(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, cancellationToken); + var originalResponse = _edgeOrderItemOrderItemResourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, cancellationToken); return Response.FromValue(new EdgeOrderItemResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderResource.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderResource.cs index f58cfb126bd3..97056720180a 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderResource.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderResource.cs @@ -34,8 +34,8 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, return new ResourceIdentifier(resourceId); } - private readonly ClientDiagnostics _edgeOrderClientDiagnostics; - private readonly EdgeOrderManagementRestOperations _edgeOrderRestClient; + private readonly ClientDiagnostics _edgeOrderOrderResourcesClientDiagnostics; + private readonly OrderResourcesRestOperations _edgeOrderOrderResourcesRestClient; private readonly EdgeOrderData _data; /// Gets the resource type for the operations. @@ -60,9 +60,9 @@ internal EdgeOrderResource(ArmClient client, EdgeOrderData data) : this(client, /// The identifier of the resource that is the target of operations. internal EdgeOrderResource(ArmClient client, ResourceIdentifier id) : base(client, id) { - _edgeOrderClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.EdgeOrder", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string edgeOrderApiVersion); - _edgeOrderRestClient = new EdgeOrderManagementRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, edgeOrderApiVersion); + _edgeOrderOrderResourcesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.EdgeOrder", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string edgeOrderOrderResourcesApiVersion); + _edgeOrderOrderResourcesRestClient = new OrderResourcesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, edgeOrderOrderResourcesApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -90,7 +90,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Gets an order. + /// Get an order. /// /// /// Request Path @@ -98,11 +98,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// GetOrderByName + /// OrderResource_Get /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -113,11 +113,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// The cancellation token to use. public virtual async Task> GetAsync(CancellationToken cancellationToken = default) { - using var scope = _edgeOrderClientDiagnostics.CreateScope("EdgeOrderResource.Get"); + using var scope = _edgeOrderOrderResourcesClientDiagnostics.CreateScope("EdgeOrderResource.Get"); scope.Start(); try { - var response = await _edgeOrderRestClient.GetOrderByNameAsync(Id.SubscriptionId, Id.ResourceGroupName, new AzureLocation(Id.Parent.Name), Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _edgeOrderOrderResourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, new AzureLocation(Id.Parent.Name), Id.Name, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new EdgeOrderResource(Client, response.Value), response.GetRawResponse()); @@ -130,7 +130,7 @@ public virtual async Task> GetAsync(CancellationToke } /// - /// Gets an order. + /// Get an order. /// /// /// Request Path @@ -138,11 +138,11 @@ public virtual async Task> GetAsync(CancellationToke /// /// /// Operation Id - /// GetOrderByName + /// OrderResource_Get /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -153,11 +153,11 @@ public virtual async Task> GetAsync(CancellationToke /// The cancellation token to use. public virtual Response Get(CancellationToken cancellationToken = default) { - using var scope = _edgeOrderClientDiagnostics.CreateScope("EdgeOrderResource.Get"); + using var scope = _edgeOrderOrderResourcesClientDiagnostics.CreateScope("EdgeOrderResource.Get"); scope.Start(); try { - var response = _edgeOrderRestClient.GetOrderByName(Id.SubscriptionId, Id.ResourceGroupName, new AzureLocation(Id.Parent.Name), Id.Name, cancellationToken); + var response = _edgeOrderOrderResourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, new AzureLocation(Id.Parent.Name), Id.Name, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new EdgeOrderResource(Client, response.Value), response.GetRawResponse()); diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Extensions/EdgeOrderExtensions.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Extensions/EdgeOrderExtensions.cs index 1b87424fde9a..7776c30dc45c 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Extensions/EdgeOrderExtensions.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Extensions/EdgeOrderExtensions.cs @@ -53,41 +53,41 @@ public static EdgeOrderAddressResource GetEdgeOrderAddressResource(this ArmClien } /// - /// Gets an object representing an along with the instance operations that can be performed on it but with no data. - /// You can use to create an from its components. + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static EdgeOrderResource GetEdgeOrderResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static EdgeOrderItemResource GetEdgeOrderItemResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableEdgeOrderArmClient(client).GetEdgeOrderResource(id); + return GetMockableEdgeOrderArmClient(client).GetEdgeOrderItemResource(id); } /// - /// Gets an object representing an along with the instance operations that can be performed on it but with no data. - /// You can use to create an from its components. + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static EdgeOrderItemResource GetEdgeOrderItemResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static EdgeOrderResource GetEdgeOrderResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableEdgeOrderArmClient(client).GetEdgeOrderItemResource(id); + return GetMockableEdgeOrderArmClient(client).GetEdgeOrderResource(id); } /// @@ -108,7 +108,7 @@ public static EdgeOrderAddressCollection GetEdgeOrderAddresses(this ResourceGrou } /// - /// Gets information about the specified address. + /// Get information about the specified address. /// /// /// Request Path @@ -116,11 +116,11 @@ public static EdgeOrderAddressCollection GetEdgeOrderAddresses(this ResourceGrou /// /// /// Operation Id - /// GetAddressByName + /// AddressResource_Get /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -146,7 +146,7 @@ public static async Task> GetEdgeOrderAddress } /// - /// Gets information about the specified address. + /// Get information about the specified address. /// /// /// Request Path @@ -154,11 +154,11 @@ public static async Task> GetEdgeOrderAddress /// /// /// Operation Id - /// GetAddressByName + /// AddressResource_Get /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -184,197 +184,197 @@ public static Response GetEdgeOrderAddress(this Resour } /// - /// Gets a collection of EdgeOrderResources in the ResourceGroupResource. + /// Gets a collection of EdgeOrderItemResources in the ResourceGroupResource. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// is null. - /// An object representing collection of EdgeOrderResources and their operations over a EdgeOrderResource. - public static EdgeOrderCollection GetEdgeOrders(this ResourceGroupResource resourceGroupResource) + /// An object representing collection of EdgeOrderItemResources and their operations over a EdgeOrderItemResource. + public static EdgeOrderItemCollection GetEdgeOrderItems(this ResourceGroupResource resourceGroupResource) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return GetMockableEdgeOrderResourceGroupResource(resourceGroupResource).GetEdgeOrders(); + return GetMockableEdgeOrderResourceGroupResource(resourceGroupResource).GetEdgeOrderItems(); } /// - /// Gets an order. + /// Get an order item. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/locations/{location}/orders/{orderName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName} /// /// /// Operation Id - /// GetOrderByName + /// OrderItemResource_Get /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource - /// + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// The name of Azure region. - /// The name of the order. + /// The name of the order item. + /// $expand is supported on parent device details, device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Parent Device Details for order item provides details on the devices of the product, Device Details for order item provides details on the devices of the child configurations of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. + /// or is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public static async Task> GetEdgeOrderAsync(this ResourceGroupResource resourceGroupResource, AzureLocation location, string orderName, CancellationToken cancellationToken = default) + public static async Task> GetEdgeOrderItemAsync(this ResourceGroupResource resourceGroupResource, string orderItemName, string expand = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return await GetMockableEdgeOrderResourceGroupResource(resourceGroupResource).GetEdgeOrderAsync(location, orderName, cancellationToken).ConfigureAwait(false); + return await GetMockableEdgeOrderResourceGroupResource(resourceGroupResource).GetEdgeOrderItemAsync(orderItemName, expand, cancellationToken).ConfigureAwait(false); } /// - /// Gets an order. + /// Get an order item. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/locations/{location}/orders/{orderName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName} /// /// /// Operation Id - /// GetOrderByName + /// OrderItemResource_Get /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource - /// + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// The name of Azure region. - /// The name of the order. + /// The name of the order item. + /// $expand is supported on parent device details, device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Parent Device Details for order item provides details on the devices of the product, Device Details for order item provides details on the devices of the child configurations of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. + /// or is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public static Response GetEdgeOrder(this ResourceGroupResource resourceGroupResource, AzureLocation location, string orderName, CancellationToken cancellationToken = default) + public static Response GetEdgeOrderItem(this ResourceGroupResource resourceGroupResource, string orderItemName, string expand = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return GetMockableEdgeOrderResourceGroupResource(resourceGroupResource).GetEdgeOrder(location, orderName, cancellationToken); + return GetMockableEdgeOrderResourceGroupResource(resourceGroupResource).GetEdgeOrderItem(orderItemName, expand, cancellationToken); } /// - /// Gets a collection of EdgeOrderItemResources in the ResourceGroupResource. + /// Gets a collection of EdgeOrderResources in the ResourceGroupResource. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// is null. - /// An object representing collection of EdgeOrderItemResources and their operations over a EdgeOrderItemResource. - public static EdgeOrderItemCollection GetEdgeOrderItems(this ResourceGroupResource resourceGroupResource) + /// An object representing collection of EdgeOrderResources and their operations over a EdgeOrderResource. + public static EdgeOrderCollection GetEdgeOrders(this ResourceGroupResource resourceGroupResource) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return GetMockableEdgeOrderResourceGroupResource(resourceGroupResource).GetEdgeOrderItems(); + return GetMockableEdgeOrderResourceGroupResource(resourceGroupResource).GetEdgeOrders(); } /// - /// Gets an order item. + /// Get an order. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/locations/{location}/orders/{orderName} /// /// /// Operation Id - /// GetOrderItemByName + /// OrderResource_Get /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource - /// + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// The name of the order item. - /// $expand is supported on device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Device Details for order item provides details on the devices of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. + /// The name of the Azure region. + /// The name of the order. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. + /// or is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public static async Task> GetEdgeOrderItemAsync(this ResourceGroupResource resourceGroupResource, string orderItemName, string expand = null, CancellationToken cancellationToken = default) + public static async Task> GetEdgeOrderAsync(this ResourceGroupResource resourceGroupResource, AzureLocation location, string orderName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return await GetMockableEdgeOrderResourceGroupResource(resourceGroupResource).GetEdgeOrderItemAsync(orderItemName, expand, cancellationToken).ConfigureAwait(false); + return await GetMockableEdgeOrderResourceGroupResource(resourceGroupResource).GetEdgeOrderAsync(location, orderName, cancellationToken).ConfigureAwait(false); } /// - /// Gets an order item. + /// Get an order. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/locations/{location}/orders/{orderName} /// /// /// Operation Id - /// GetOrderItemByName + /// OrderResource_Get /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource - /// + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// The name of the order item. - /// $expand is supported on device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Device Details for order item provides details on the devices of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. + /// The name of the Azure region. + /// The name of the order. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. + /// or is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public static Response GetEdgeOrderItem(this ResourceGroupResource resourceGroupResource, string orderItemName, string expand = null, CancellationToken cancellationToken = default) + public static Response GetEdgeOrder(this ResourceGroupResource resourceGroupResource, AzureLocation location, string orderName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return GetMockableEdgeOrderResourceGroupResource(resourceGroupResource).GetEdgeOrderItem(orderItemName, expand, cancellationToken); + return GetMockableEdgeOrderResourceGroupResource(resourceGroupResource).GetEdgeOrder(location, orderName, cancellationToken); } /// - /// Lists order at resource group level. + /// List orders at resource group level. /// /// /// Request Path @@ -382,32 +382,33 @@ public static Response GetEdgeOrderItem(this ResourceGrou /// /// /// Operation Id - /// ListOrderAtResourceGroupLevel + /// OrdersOperationGroup_ListByResourceGroup /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// $skipToken is supported on Get list of order, which provides the next page in the list of order. + /// $skipToken is supported on Get list of orders, which provides the next page in the list of orders. + /// $top is supported on fetching list of resources. $top=10 means that the first 10 items in the list will be returned to the API caller. /// The cancellation token to use. /// is null. /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetEdgeOrdersAsync(this ResourceGroupResource resourceGroupResource, string skipToken = null, CancellationToken cancellationToken = default) + public static AsyncPageable GetEdgeOrdersAsync(this ResourceGroupResource resourceGroupResource, string skipToken = null, int? top = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return GetMockableEdgeOrderResourceGroupResource(resourceGroupResource).GetEdgeOrdersAsync(skipToken, cancellationToken); + return GetMockableEdgeOrderResourceGroupResource(resourceGroupResource).GetEdgeOrdersAsync(skipToken, top, cancellationToken); } /// - /// Lists order at resource group level. + /// List orders at resource group level. /// /// /// Request Path @@ -415,32 +416,33 @@ public static AsyncPageable GetEdgeOrdersAsync(this ResourceG /// /// /// Operation Id - /// ListOrderAtResourceGroupLevel + /// OrdersOperationGroup_ListByResourceGroup /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// $skipToken is supported on Get list of order, which provides the next page in the list of order. + /// $skipToken is supported on Get list of orders, which provides the next page in the list of orders. + /// $top is supported on fetching list of resources. $top=10 means that the first 10 items in the list will be returned to the API caller. /// The cancellation token to use. /// is null. /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetEdgeOrders(this ResourceGroupResource resourceGroupResource, string skipToken = null, CancellationToken cancellationToken = default) + public static Pageable GetEdgeOrders(this ResourceGroupResource resourceGroupResource, string skipToken = null, int? top = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return GetMockableEdgeOrderResourceGroupResource(resourceGroupResource).GetEdgeOrders(skipToken, cancellationToken); + return GetMockableEdgeOrderResourceGroupResource(resourceGroupResource).GetEdgeOrders(skipToken, top, cancellationToken); } /// - /// Lists all the addresses available under the subscription. + /// List all the addresses available under the subscription. /// /// /// Request Path @@ -448,11 +450,11 @@ public static Pageable GetEdgeOrders(this ResourceGroupResour /// /// /// Operation Id - /// ListAddressesAtSubscriptionLevel + /// AddressResource_ListBySubscription /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -461,24 +463,25 @@ public static Pageable GetEdgeOrders(this ResourceGroupResour /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// $filter is supported to filter based on shipping address properties. Filter supports only equals operation. /// $skipToken is supported on Get list of addresses, which provides the next page in the list of addresses. + /// $top is supported on fetching list of resources. $top=10 means that the first 10 items in the list will be returned to the API caller. /// The cancellation token to use. /// is null. /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetEdgeOrderAddressesAsync(this SubscriptionResource subscriptionResource, string filter = null, string skipToken = null, CancellationToken cancellationToken = default) + public static AsyncPageable GetEdgeOrderAddressesAsync(this SubscriptionResource subscriptionResource, string filter = null, string skipToken = null, int? top = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableEdgeOrderSubscriptionResource(subscriptionResource).GetEdgeOrderAddressesAsync(filter, skipToken, cancellationToken); + return GetMockableEdgeOrderSubscriptionResource(subscriptionResource).GetEdgeOrderAddressesAsync(filter, skipToken, top, cancellationToken); } /// - /// Lists all the addresses available under the subscription. + /// List all the addresses available under the subscription. /// /// /// Request Path @@ -486,11 +489,11 @@ public static AsyncPageable GetEdgeOrderAddressesAsync /// /// /// Operation Id - /// ListAddressesAtSubscriptionLevel + /// AddressResource_ListBySubscription /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -499,94 +502,105 @@ public static AsyncPageable GetEdgeOrderAddressesAsync /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// $filter is supported to filter based on shipping address properties. Filter supports only equals operation. /// $skipToken is supported on Get list of addresses, which provides the next page in the list of addresses. + /// $top is supported on fetching list of resources. $top=10 means that the first 10 items in the list will be returned to the API caller. /// The cancellation token to use. /// is null. /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetEdgeOrderAddresses(this SubscriptionResource subscriptionResource, string filter = null, string skipToken = null, CancellationToken cancellationToken = default) + public static Pageable GetEdgeOrderAddresses(this SubscriptionResource subscriptionResource, string filter = null, string skipToken = null, int? top = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableEdgeOrderSubscriptionResource(subscriptionResource).GetEdgeOrderAddresses(filter, skipToken, cancellationToken); + return GetMockableEdgeOrderSubscriptionResource(subscriptionResource).GetEdgeOrderAddresses(filter, skipToken, top, cancellationToken); } /// - /// This method provides the list of product families for the given subscription. + /// List order items at subscription level. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/listProductFamilies + /// /subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/orderItems /// /// /// Operation Id - /// ListProductFamilies + /// OrderItemResource_ListBySubscription /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 + /// + /// + /// Resource + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// Filters for showing the product families. - /// $expand is supported on configurations parameter for product, which provides details on the configurations for the product. - /// $skipToken is supported on list of product families, which provides the next page in the list of product families. + /// $filter is supported to filter based on order id and order Item Type. Filter supports only equals operation. + /// $expand is supported on parent device details, device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Parent Device Details for order item provides details on the devices of the product, Device Details for order item provides details on the devices of the child configurations of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. + /// $skipToken is supported on Get list of order items, which provides the next page in the list of order items. + /// $top is supported on fetching list of resources. $top=10 means that the first 10 items in the list will be returned to the API caller. /// The cancellation token to use. - /// or is null. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetProductFamiliesAsync(this SubscriptionResource subscriptionResource, ProductFamiliesContent content, string expand = null, string skipToken = null, CancellationToken cancellationToken = default) + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetEdgeOrderItemsAsync(this SubscriptionResource subscriptionResource, string filter = null, string expand = null, string skipToken = null, int? top = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableEdgeOrderSubscriptionResource(subscriptionResource).GetProductFamiliesAsync(content, expand, skipToken, cancellationToken); + return GetMockableEdgeOrderSubscriptionResource(subscriptionResource).GetEdgeOrderItemsAsync(filter, expand, skipToken, top, cancellationToken); } /// - /// This method provides the list of product families for the given subscription. + /// List order items at subscription level. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/listProductFamilies + /// /subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/orderItems /// /// /// Operation Id - /// ListProductFamilies + /// OrderItemResource_ListBySubscription /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 + /// + /// + /// Resource + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// Filters for showing the product families. - /// $expand is supported on configurations parameter for product, which provides details on the configurations for the product. - /// $skipToken is supported on list of product families, which provides the next page in the list of product families. + /// $filter is supported to filter based on order id and order Item Type. Filter supports only equals operation. + /// $expand is supported on parent device details, device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Parent Device Details for order item provides details on the devices of the product, Device Details for order item provides details on the devices of the child configurations of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. + /// $skipToken is supported on Get list of order items, which provides the next page in the list of order items. + /// $top is supported on fetching list of resources. $top=10 means that the first 10 items in the list will be returned to the API caller. /// The cancellation token to use. - /// or is null. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetProductFamilies(this SubscriptionResource subscriptionResource, ProductFamiliesContent content, string expand = null, string skipToken = null, CancellationToken cancellationToken = default) + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetEdgeOrderItems(this SubscriptionResource subscriptionResource, string filter = null, string expand = null, string skipToken = null, int? top = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableEdgeOrderSubscriptionResource(subscriptionResource).GetProductFamilies(content, expand, skipToken, cancellationToken); + return GetMockableEdgeOrderSubscriptionResource(subscriptionResource).GetEdgeOrderItems(filter, expand, skipToken, top, cancellationToken); } /// - /// This method provides the list of configurations for the given product family, product line and product under subscription. + /// List configurations for the given product family, product line and product for the given subscription. /// /// /// Request Path @@ -594,11 +608,11 @@ public static Pageable GetProductFamilies(this SubscriptionResour /// /// /// Operation Id - /// ListConfigurations + /// ProductsAndConfigurationsOperationGroup_GetConfigurations /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// @@ -620,7 +634,7 @@ public static AsyncPageable GetConfigurationsAsync(this Su } /// - /// This method provides the list of configurations for the given product family, product line and product under subscription. + /// List configurations for the given product family, product line and product for the given subscription. /// /// /// Request Path @@ -628,11 +642,11 @@ public static AsyncPageable GetConfigurationsAsync(this Su /// /// /// Operation Id - /// ListConfigurations + /// ProductsAndConfigurationsOperationGroup_GetConfigurations /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// @@ -654,213 +668,207 @@ public static Pageable GetConfigurations(this Subscription } /// - /// This method provides the list of product families metadata for the given subscription. + /// List product families for the given subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/productFamiliesMetadata + /// /subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/listProductFamilies /// /// /// Operation Id - /// ListProductFamiliesMetadata + /// ProductsAndConfigurationsOperationGroup_GetProductFamilies /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// $skipToken is supported on list of product families metadata, which provides the next page in the list of product families metadata. + /// Filters for showing the product families. + /// $expand is supported on configurations parameter for product, which provides details on the configurations for the product. + /// $skipToken is supported on list of product families, which provides the next page in the list of product families. /// The cancellation token to use. - /// is null. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetProductFamiliesMetadataAsync(this SubscriptionResource subscriptionResource, string skipToken = null, CancellationToken cancellationToken = default) + /// or is null. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetProductFamiliesAsync(this SubscriptionResource subscriptionResource, ProductFamiliesContent content, string expand = null, string skipToken = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableEdgeOrderSubscriptionResource(subscriptionResource).GetProductFamiliesMetadataAsync(skipToken, cancellationToken); + return GetMockableEdgeOrderSubscriptionResource(subscriptionResource).GetProductFamiliesAsync(content, expand, skipToken, cancellationToken); } /// - /// This method provides the list of product families metadata for the given subscription. + /// List product families for the given subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/productFamiliesMetadata + /// /subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/listProductFamilies /// /// /// Operation Id - /// ListProductFamiliesMetadata + /// ProductsAndConfigurationsOperationGroup_GetProductFamilies /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// $skipToken is supported on list of product families metadata, which provides the next page in the list of product families metadata. + /// Filters for showing the product families. + /// $expand is supported on configurations parameter for product, which provides details on the configurations for the product. + /// $skipToken is supported on list of product families, which provides the next page in the list of product families. /// The cancellation token to use. - /// is null. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetProductFamiliesMetadata(this SubscriptionResource subscriptionResource, string skipToken = null, CancellationToken cancellationToken = default) + /// or is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetProductFamilies(this SubscriptionResource subscriptionResource, ProductFamiliesContent content, string expand = null, string skipToken = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableEdgeOrderSubscriptionResource(subscriptionResource).GetProductFamiliesMetadata(skipToken, cancellationToken); + return GetMockableEdgeOrderSubscriptionResource(subscriptionResource).GetProductFamilies(content, expand, skipToken, cancellationToken); } /// - /// Lists order at subscription level. + /// List product families metadata for the given subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/orders + /// /subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/productFamiliesMetadata /// /// /// Operation Id - /// ListOrderAtSubscriptionLevel + /// ProductsAndConfigurationsOperationGroup_GetProductFamiliesMetadata /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// $skipToken is supported on Get list of order, which provides the next page in the list of order. + /// $skipToken is supported on list of product families metadata, which provides the next page in the list of product families metadata. /// The cancellation token to use. /// is null. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetEdgeOrdersAsync(this SubscriptionResource subscriptionResource, string skipToken = null, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetProductFamiliesMetadataAsync(this SubscriptionResource subscriptionResource, string skipToken = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableEdgeOrderSubscriptionResource(subscriptionResource).GetEdgeOrdersAsync(skipToken, cancellationToken); + return GetMockableEdgeOrderSubscriptionResource(subscriptionResource).GetProductFamiliesMetadataAsync(skipToken, cancellationToken); } /// - /// Lists order at subscription level. + /// List product families metadata for the given subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/orders + /// /subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/productFamiliesMetadata /// /// /// Operation Id - /// ListOrderAtSubscriptionLevel + /// ProductsAndConfigurationsOperationGroup_GetProductFamiliesMetadata /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// $skipToken is supported on Get list of order, which provides the next page in the list of order. + /// $skipToken is supported on list of product families metadata, which provides the next page in the list of product families metadata. /// The cancellation token to use. /// is null. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetEdgeOrders(this SubscriptionResource subscriptionResource, string skipToken = null, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetProductFamiliesMetadata(this SubscriptionResource subscriptionResource, string skipToken = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableEdgeOrderSubscriptionResource(subscriptionResource).GetEdgeOrders(skipToken, cancellationToken); + return GetMockableEdgeOrderSubscriptionResource(subscriptionResource).GetProductFamiliesMetadata(skipToken, cancellationToken); } /// - /// Lists order item at subscription level. + /// List orders at subscription level. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/orderItems + /// /subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/orders /// /// /// Operation Id - /// ListOrderItemsAtSubscriptionLevel + /// OrdersOperationGroup_ListBySubscription /// /// /// Default Api Version - /// 2021-12-01 - /// - /// - /// Resource - /// + /// 2024-02-01 /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// $filter is supported to filter based on order id. Filter supports only equals operation. - /// $expand is supported on device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Device Details for order item provides details on the devices of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. - /// $skipToken is supported on Get list of order items, which provides the next page in the list of order items. + /// $skipToken is supported on Get list of orders, which provides the next page in the list of orders. + /// $top is supported on fetching list of resources. $top=10 means that the first 10 items in the list will be returned to the API caller. /// The cancellation token to use. /// is null. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetEdgeOrderItemsAsync(this SubscriptionResource subscriptionResource, string filter = null, string expand = null, string skipToken = null, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetEdgeOrdersAsync(this SubscriptionResource subscriptionResource, string skipToken = null, int? top = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableEdgeOrderSubscriptionResource(subscriptionResource).GetEdgeOrderItemsAsync(filter, expand, skipToken, cancellationToken); + return GetMockableEdgeOrderSubscriptionResource(subscriptionResource).GetEdgeOrdersAsync(skipToken, top, cancellationToken); } /// - /// Lists order item at subscription level. + /// List orders at subscription level. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/orderItems + /// /subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/orders /// /// /// Operation Id - /// ListOrderItemsAtSubscriptionLevel + /// OrdersOperationGroup_ListBySubscription /// /// /// Default Api Version - /// 2021-12-01 - /// - /// - /// Resource - /// + /// 2024-02-01 /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// $filter is supported to filter based on order id. Filter supports only equals operation. - /// $expand is supported on device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Device Details for order item provides details on the devices of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. - /// $skipToken is supported on Get list of order items, which provides the next page in the list of order items. + /// $skipToken is supported on Get list of orders, which provides the next page in the list of orders. + /// $top is supported on fetching list of resources. $top=10 means that the first 10 items in the list will be returned to the API caller. /// The cancellation token to use. /// is null. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetEdgeOrderItems(this SubscriptionResource subscriptionResource, string filter = null, string expand = null, string skipToken = null, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetEdgeOrders(this SubscriptionResource subscriptionResource, string skipToken = null, int? top = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableEdgeOrderSubscriptionResource(subscriptionResource).GetEdgeOrderItems(filter, expand, skipToken, cancellationToken); + return GetMockableEdgeOrderSubscriptionResource(subscriptionResource).GetEdgeOrders(skipToken, top, cancellationToken); } } } diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Extensions/MockableEdgeOrderArmClient.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Extensions/MockableEdgeOrderArmClient.cs index 3d340c106ffb..ed7496e50fb5 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Extensions/MockableEdgeOrderArmClient.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Extensions/MockableEdgeOrderArmClient.cs @@ -46,18 +46,6 @@ public virtual EdgeOrderAddressResource GetEdgeOrderAddressResource(ResourceIden return new EdgeOrderAddressResource(Client, id); } - /// - /// Gets an object representing an along with the instance operations that can be performed on it but with no data. - /// You can use to create an from its components. - /// - /// The resource ID of the resource to get. - /// Returns a object. - public virtual EdgeOrderResource GetEdgeOrderResource(ResourceIdentifier id) - { - EdgeOrderResource.ValidateResourceId(id); - return new EdgeOrderResource(Client, id); - } - /// /// Gets an object representing an along with the instance operations that can be performed on it but with no data. /// You can use to create an from its components. @@ -69,5 +57,17 @@ public virtual EdgeOrderItemResource GetEdgeOrderItemResource(ResourceIdentifier EdgeOrderItemResource.ValidateResourceId(id); return new EdgeOrderItemResource(Client, id); } + + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual EdgeOrderResource GetEdgeOrderResource(ResourceIdentifier id) + { + EdgeOrderResource.ValidateResourceId(id); + return new EdgeOrderResource(Client, id); + } } } diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Extensions/MockableEdgeOrderResourceGroupResource.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Extensions/MockableEdgeOrderResourceGroupResource.cs index 3d6a55411ddd..079da4d8c306 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Extensions/MockableEdgeOrderResourceGroupResource.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Extensions/MockableEdgeOrderResourceGroupResource.cs @@ -17,8 +17,8 @@ namespace Azure.ResourceManager.EdgeOrder.Mocking /// A class to add extension methods to ResourceGroupResource. public partial class MockableEdgeOrderResourceGroupResource : ArmResource { - private ClientDiagnostics _defaultClientDiagnostics; - private EdgeOrderManagementRestOperations _defaultRestClient; + private ClientDiagnostics _ordersOperationGroupClientDiagnostics; + private OrdersOperationGroupRestOperations _ordersOperationGroupRestClient; /// Initializes a new instance of the class for mocking. protected MockableEdgeOrderResourceGroupResource() @@ -32,8 +32,8 @@ internal MockableEdgeOrderResourceGroupResource(ArmClient client, ResourceIdenti { } - private ClientDiagnostics DefaultClientDiagnostics => _defaultClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.EdgeOrder", ProviderConstants.DefaultProviderNamespace, Diagnostics); - private EdgeOrderManagementRestOperations DefaultRestClient => _defaultRestClient ??= new EdgeOrderManagementRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + private ClientDiagnostics OrdersOperationGroupClientDiagnostics => _ordersOperationGroupClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.EdgeOrder", ProviderConstants.DefaultProviderNamespace, Diagnostics); + private OrdersOperationGroupRestOperations OrdersOperationGroupRestClient => _ordersOperationGroupRestClient ??= new OrdersOperationGroupRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); private string GetApiVersionOrNull(ResourceType resourceType) { @@ -49,7 +49,7 @@ public virtual EdgeOrderAddressCollection GetEdgeOrderAddresses() } /// - /// Gets information about the specified address. + /// Get information about the specified address. /// /// /// Request Path @@ -57,11 +57,11 @@ public virtual EdgeOrderAddressCollection GetEdgeOrderAddresses() /// /// /// Operation Id - /// GetAddressByName + /// AddressResource_Get /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -80,7 +80,7 @@ public virtual async Task> GetEdgeOrderAddres } /// - /// Gets information about the specified address. + /// Get information about the specified address. /// /// /// Request Path @@ -88,11 +88,11 @@ public virtual async Task> GetEdgeOrderAddres /// /// /// Operation Id - /// GetAddressByName + /// AddressResource_Get /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -110,150 +110,150 @@ public virtual Response GetEdgeOrderAddress(string add return GetEdgeOrderAddresses().Get(addressName, cancellationToken); } - /// Gets a collection of EdgeOrderResources in the ResourceGroupResource. - /// An object representing collection of EdgeOrderResources and their operations over a EdgeOrderResource. - public virtual EdgeOrderCollection GetEdgeOrders() + /// Gets a collection of EdgeOrderItemResources in the ResourceGroupResource. + /// An object representing collection of EdgeOrderItemResources and their operations over a EdgeOrderItemResource. + public virtual EdgeOrderItemCollection GetEdgeOrderItems() { - return GetCachedClient(client => new EdgeOrderCollection(client, Id)); + return GetCachedClient(client => new EdgeOrderItemCollection(client, Id)); } /// - /// Gets an order. + /// Get an order item. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/locations/{location}/orders/{orderName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName} /// /// /// Operation Id - /// GetOrderByName + /// OrderItemResource_Get /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource - /// + /// /// /// /// - /// The name of Azure region. - /// The name of the order. + /// The name of the order item. + /// $expand is supported on parent device details, device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Parent Device Details for order item provides details on the devices of the product, Device Details for order item provides details on the devices of the child configurations of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual async Task> GetEdgeOrderAsync(AzureLocation location, string orderName, CancellationToken cancellationToken = default) + public virtual async Task> GetEdgeOrderItemAsync(string orderItemName, string expand = null, CancellationToken cancellationToken = default) { - return await GetEdgeOrders().GetAsync(location, orderName, cancellationToken).ConfigureAwait(false); + return await GetEdgeOrderItems().GetAsync(orderItemName, expand, cancellationToken).ConfigureAwait(false); } /// - /// Gets an order. + /// Get an order item. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/locations/{location}/orders/{orderName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName} /// /// /// Operation Id - /// GetOrderByName + /// OrderItemResource_Get /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource - /// + /// /// /// /// - /// The name of Azure region. - /// The name of the order. + /// The name of the order item. + /// $expand is supported on parent device details, device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Parent Device Details for order item provides details on the devices of the product, Device Details for order item provides details on the devices of the child configurations of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual Response GetEdgeOrder(AzureLocation location, string orderName, CancellationToken cancellationToken = default) + public virtual Response GetEdgeOrderItem(string orderItemName, string expand = null, CancellationToken cancellationToken = default) { - return GetEdgeOrders().Get(location, orderName, cancellationToken); + return GetEdgeOrderItems().Get(orderItemName, expand, cancellationToken); } - /// Gets a collection of EdgeOrderItemResources in the ResourceGroupResource. - /// An object representing collection of EdgeOrderItemResources and their operations over a EdgeOrderItemResource. - public virtual EdgeOrderItemCollection GetEdgeOrderItems() + /// Gets a collection of EdgeOrderResources in the ResourceGroupResource. + /// An object representing collection of EdgeOrderResources and their operations over a EdgeOrderResource. + public virtual EdgeOrderCollection GetEdgeOrders() { - return GetCachedClient(client => new EdgeOrderItemCollection(client, Id)); + return GetCachedClient(client => new EdgeOrderCollection(client, Id)); } /// - /// Gets an order item. + /// Get an order. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/locations/{location}/orders/{orderName} /// /// /// Operation Id - /// GetOrderItemByName + /// OrderResource_Get /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource - /// + /// /// /// /// - /// The name of the order item. - /// $expand is supported on device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Device Details for order item provides details on the devices of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. + /// The name of the Azure region. + /// The name of the order. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual async Task> GetEdgeOrderItemAsync(string orderItemName, string expand = null, CancellationToken cancellationToken = default) + public virtual async Task> GetEdgeOrderAsync(AzureLocation location, string orderName, CancellationToken cancellationToken = default) { - return await GetEdgeOrderItems().GetAsync(orderItemName, expand, cancellationToken).ConfigureAwait(false); + return await GetEdgeOrders().GetAsync(location, orderName, cancellationToken).ConfigureAwait(false); } /// - /// Gets an order item. + /// Get an order. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/locations/{location}/orders/{orderName} /// /// /// Operation Id - /// GetOrderItemByName + /// OrderResource_Get /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource - /// + /// /// /// /// - /// The name of the order item. - /// $expand is supported on device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Device Details for order item provides details on the devices of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. + /// The name of the Azure region. + /// The name of the order. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual Response GetEdgeOrderItem(string orderItemName, string expand = null, CancellationToken cancellationToken = default) + public virtual Response GetEdgeOrder(AzureLocation location, string orderName, CancellationToken cancellationToken = default) { - return GetEdgeOrderItems().Get(orderItemName, expand, cancellationToken); + return GetEdgeOrders().Get(location, orderName, cancellationToken); } /// - /// Lists order at resource group level. + /// List orders at resource group level. /// /// /// Request Path @@ -261,26 +261,27 @@ public virtual Response GetEdgeOrderItem(string orderItem /// /// /// Operation Id - /// ListOrderAtResourceGroupLevel + /// OrdersOperationGroup_ListByResourceGroup /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// - /// $skipToken is supported on Get list of order, which provides the next page in the list of order. + /// $skipToken is supported on Get list of orders, which provides the next page in the list of orders. + /// $top is supported on fetching list of resources. $top=10 means that the first 10 items in the list will be returned to the API caller. /// The cancellation token to use. /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetEdgeOrdersAsync(string skipToken = null, CancellationToken cancellationToken = default) + public virtual AsyncPageable GetEdgeOrdersAsync(string skipToken = null, int? top = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => DefaultRestClient.CreateListOrderAtResourceGroupLevelRequest(Id.SubscriptionId, Id.ResourceGroupName, skipToken); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DefaultRestClient.CreateListOrderAtResourceGroupLevelNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, skipToken); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EdgeOrderResource(Client, EdgeOrderData.DeserializeEdgeOrderData(e)), DefaultClientDiagnostics, Pipeline, "MockableEdgeOrderResourceGroupResource.GetEdgeOrders", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => OrdersOperationGroupRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName, skipToken, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => OrdersOperationGroupRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, skipToken, top); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EdgeOrderResource(Client, EdgeOrderData.DeserializeEdgeOrderData(e)), OrdersOperationGroupClientDiagnostics, Pipeline, "MockableEdgeOrderResourceGroupResource.GetEdgeOrders", "value", "nextLink", cancellationToken); } /// - /// Lists order at resource group level. + /// List orders at resource group level. /// /// /// Request Path @@ -288,22 +289,23 @@ public virtual AsyncPageable GetEdgeOrdersAsync(string skipTo /// /// /// Operation Id - /// ListOrderAtResourceGroupLevel + /// OrdersOperationGroup_ListByResourceGroup /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// - /// $skipToken is supported on Get list of order, which provides the next page in the list of order. + /// $skipToken is supported on Get list of orders, which provides the next page in the list of orders. + /// $top is supported on fetching list of resources. $top=10 means that the first 10 items in the list will be returned to the API caller. /// The cancellation token to use. /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetEdgeOrders(string skipToken = null, CancellationToken cancellationToken = default) + public virtual Pageable GetEdgeOrders(string skipToken = null, int? top = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => DefaultRestClient.CreateListOrderAtResourceGroupLevelRequest(Id.SubscriptionId, Id.ResourceGroupName, skipToken); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DefaultRestClient.CreateListOrderAtResourceGroupLevelNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, skipToken); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EdgeOrderResource(Client, EdgeOrderData.DeserializeEdgeOrderData(e)), DefaultClientDiagnostics, Pipeline, "MockableEdgeOrderResourceGroupResource.GetEdgeOrders", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => OrdersOperationGroupRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName, skipToken, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => OrdersOperationGroupRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, skipToken, top); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EdgeOrderResource(Client, EdgeOrderData.DeserializeEdgeOrderData(e)), OrdersOperationGroupClientDiagnostics, Pipeline, "MockableEdgeOrderResourceGroupResource.GetEdgeOrders", "value", "nextLink", cancellationToken); } } } diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Extensions/MockableEdgeOrderSubscriptionResource.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Extensions/MockableEdgeOrderSubscriptionResource.cs index 22dc0aba5c17..70ba6833e04b 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Extensions/MockableEdgeOrderSubscriptionResource.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Extensions/MockableEdgeOrderSubscriptionResource.cs @@ -17,12 +17,14 @@ namespace Azure.ResourceManager.EdgeOrder.Mocking /// A class to add extension methods to SubscriptionResource. public partial class MockableEdgeOrderSubscriptionResource : ArmResource { - private ClientDiagnostics _edgeOrderAddressClientDiagnostics; - private EdgeOrderManagementRestOperations _edgeOrderAddressRestClient; - private ClientDiagnostics _defaultClientDiagnostics; - private EdgeOrderManagementRestOperations _defaultRestClient; - private ClientDiagnostics _edgeOrderItemClientDiagnostics; - private EdgeOrderManagementRestOperations _edgeOrderItemRestClient; + private ClientDiagnostics _edgeOrderAddressAddressResourcesClientDiagnostics; + private AddressResourcesRestOperations _edgeOrderAddressAddressResourcesRestClient; + private ClientDiagnostics _edgeOrderItemOrderItemResourcesClientDiagnostics; + private OrderItemResourcesRestOperations _edgeOrderItemOrderItemResourcesRestClient; + private ClientDiagnostics _productsAndConfigurationsOperationGroupClientDiagnostics; + private ProductsAndConfigurationsOperationGroupRestOperations _productsAndConfigurationsOperationGroupRestClient; + private ClientDiagnostics _ordersOperationGroupClientDiagnostics; + private OrdersOperationGroupRestOperations _ordersOperationGroupRestClient; /// Initializes a new instance of the class for mocking. protected MockableEdgeOrderSubscriptionResource() @@ -36,12 +38,14 @@ internal MockableEdgeOrderSubscriptionResource(ArmClient client, ResourceIdentif { } - private ClientDiagnostics EdgeOrderAddressClientDiagnostics => _edgeOrderAddressClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.EdgeOrder", EdgeOrderAddressResource.ResourceType.Namespace, Diagnostics); - private EdgeOrderManagementRestOperations EdgeOrderAddressRestClient => _edgeOrderAddressRestClient ??= new EdgeOrderManagementRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(EdgeOrderAddressResource.ResourceType)); - private ClientDiagnostics DefaultClientDiagnostics => _defaultClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.EdgeOrder", ProviderConstants.DefaultProviderNamespace, Diagnostics); - private EdgeOrderManagementRestOperations DefaultRestClient => _defaultRestClient ??= new EdgeOrderManagementRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); - private ClientDiagnostics EdgeOrderItemClientDiagnostics => _edgeOrderItemClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.EdgeOrder", EdgeOrderItemResource.ResourceType.Namespace, Diagnostics); - private EdgeOrderManagementRestOperations EdgeOrderItemRestClient => _edgeOrderItemRestClient ??= new EdgeOrderManagementRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(EdgeOrderItemResource.ResourceType)); + private ClientDiagnostics EdgeOrderAddressAddressResourcesClientDiagnostics => _edgeOrderAddressAddressResourcesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.EdgeOrder", EdgeOrderAddressResource.ResourceType.Namespace, Diagnostics); + private AddressResourcesRestOperations EdgeOrderAddressAddressResourcesRestClient => _edgeOrderAddressAddressResourcesRestClient ??= new AddressResourcesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(EdgeOrderAddressResource.ResourceType)); + private ClientDiagnostics EdgeOrderItemOrderItemResourcesClientDiagnostics => _edgeOrderItemOrderItemResourcesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.EdgeOrder", EdgeOrderItemResource.ResourceType.Namespace, Diagnostics); + private OrderItemResourcesRestOperations EdgeOrderItemOrderItemResourcesRestClient => _edgeOrderItemOrderItemResourcesRestClient ??= new OrderItemResourcesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(EdgeOrderItemResource.ResourceType)); + private ClientDiagnostics ProductsAndConfigurationsOperationGroupClientDiagnostics => _productsAndConfigurationsOperationGroupClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.EdgeOrder", ProviderConstants.DefaultProviderNamespace, Diagnostics); + private ProductsAndConfigurationsOperationGroupRestOperations ProductsAndConfigurationsOperationGroupRestClient => _productsAndConfigurationsOperationGroupRestClient ??= new ProductsAndConfigurationsOperationGroupRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + private ClientDiagnostics OrdersOperationGroupClientDiagnostics => _ordersOperationGroupClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.EdgeOrder", ProviderConstants.DefaultProviderNamespace, Diagnostics); + private OrdersOperationGroupRestOperations OrdersOperationGroupRestClient => _ordersOperationGroupRestClient ??= new OrdersOperationGroupRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); private string GetApiVersionOrNull(ResourceType resourceType) { @@ -50,7 +54,7 @@ private string GetApiVersionOrNull(ResourceType resourceType) } /// - /// Lists all the addresses available under the subscription. + /// List all the addresses available under the subscription. /// /// /// Request Path @@ -58,11 +62,11 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// /// Operation Id - /// ListAddressesAtSubscriptionLevel + /// AddressResource_ListBySubscription /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -72,17 +76,18 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// $filter is supported to filter based on shipping address properties. Filter supports only equals operation. /// $skipToken is supported on Get list of addresses, which provides the next page in the list of addresses. + /// $top is supported on fetching list of resources. $top=10 means that the first 10 items in the list will be returned to the API caller. /// The cancellation token to use. /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetEdgeOrderAddressesAsync(string filter = null, string skipToken = null, CancellationToken cancellationToken = default) + public virtual AsyncPageable GetEdgeOrderAddressesAsync(string filter = null, string skipToken = null, int? top = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => EdgeOrderAddressRestClient.CreateListAddressesAtSubscriptionLevelRequest(Id.SubscriptionId, filter, skipToken); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => EdgeOrderAddressRestClient.CreateListAddressesAtSubscriptionLevelNextPageRequest(nextLink, Id.SubscriptionId, filter, skipToken); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EdgeOrderAddressResource(Client, EdgeOrderAddressData.DeserializeEdgeOrderAddressData(e)), EdgeOrderAddressClientDiagnostics, Pipeline, "MockableEdgeOrderSubscriptionResource.GetEdgeOrderAddresses", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => EdgeOrderAddressAddressResourcesRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, filter, skipToken, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => EdgeOrderAddressAddressResourcesRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, filter, skipToken, top); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EdgeOrderAddressResource(Client, EdgeOrderAddressData.DeserializeEdgeOrderAddressData(e)), EdgeOrderAddressAddressResourcesClientDiagnostics, Pipeline, "MockableEdgeOrderSubscriptionResource.GetEdgeOrderAddresses", "value", "nextLink", cancellationToken); } /// - /// Lists all the addresses available under the subscription. + /// List all the addresses available under the subscription. /// /// /// Request Path @@ -90,11 +95,11 @@ public virtual AsyncPageable GetEdgeOrderAddressesAsyn /// /// /// Operation Id - /// ListAddressesAtSubscriptionLevel + /// AddressResource_ListBySubscription /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// Resource @@ -104,81 +109,86 @@ public virtual AsyncPageable GetEdgeOrderAddressesAsyn /// /// $filter is supported to filter based on shipping address properties. Filter supports only equals operation. /// $skipToken is supported on Get list of addresses, which provides the next page in the list of addresses. + /// $top is supported on fetching list of resources. $top=10 means that the first 10 items in the list will be returned to the API caller. /// The cancellation token to use. /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetEdgeOrderAddresses(string filter = null, string skipToken = null, CancellationToken cancellationToken = default) + public virtual Pageable GetEdgeOrderAddresses(string filter = null, string skipToken = null, int? top = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => EdgeOrderAddressRestClient.CreateListAddressesAtSubscriptionLevelRequest(Id.SubscriptionId, filter, skipToken); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => EdgeOrderAddressRestClient.CreateListAddressesAtSubscriptionLevelNextPageRequest(nextLink, Id.SubscriptionId, filter, skipToken); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EdgeOrderAddressResource(Client, EdgeOrderAddressData.DeserializeEdgeOrderAddressData(e)), EdgeOrderAddressClientDiagnostics, Pipeline, "MockableEdgeOrderSubscriptionResource.GetEdgeOrderAddresses", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => EdgeOrderAddressAddressResourcesRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, filter, skipToken, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => EdgeOrderAddressAddressResourcesRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, filter, skipToken, top); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EdgeOrderAddressResource(Client, EdgeOrderAddressData.DeserializeEdgeOrderAddressData(e)), EdgeOrderAddressAddressResourcesClientDiagnostics, Pipeline, "MockableEdgeOrderSubscriptionResource.GetEdgeOrderAddresses", "value", "nextLink", cancellationToken); } /// - /// This method provides the list of product families for the given subscription. + /// List order items at subscription level. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/listProductFamilies + /// /subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/orderItems /// /// /// Operation Id - /// ListProductFamilies + /// OrderItemResource_ListBySubscription /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 + /// + /// + /// Resource + /// /// /// /// - /// Filters for showing the product families. - /// $expand is supported on configurations parameter for product, which provides details on the configurations for the product. - /// $skipToken is supported on list of product families, which provides the next page in the list of product families. + /// $filter is supported to filter based on order id and order Item Type. Filter supports only equals operation. + /// $expand is supported on parent device details, device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Parent Device Details for order item provides details on the devices of the product, Device Details for order item provides details on the devices of the child configurations of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. + /// $skipToken is supported on Get list of order items, which provides the next page in the list of order items. + /// $top is supported on fetching list of resources. $top=10 means that the first 10 items in the list will be returned to the API caller. /// The cancellation token to use. - /// is null. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetProductFamiliesAsync(ProductFamiliesContent content, string expand = null, string skipToken = null, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetEdgeOrderItemsAsync(string filter = null, string expand = null, string skipToken = null, int? top = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(content, nameof(content)); - - HttpMessage FirstPageRequest(int? pageSizeHint) => DefaultRestClient.CreateListProductFamiliesRequest(Id.SubscriptionId, content, expand, skipToken); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DefaultRestClient.CreateListProductFamiliesNextPageRequest(nextLink, Id.SubscriptionId, content, expand, skipToken); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => ProductFamily.DeserializeProductFamily(e), DefaultClientDiagnostics, Pipeline, "MockableEdgeOrderSubscriptionResource.GetProductFamilies", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => EdgeOrderItemOrderItemResourcesRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, filter, expand, skipToken, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => EdgeOrderItemOrderItemResourcesRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, filter, expand, skipToken, top); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EdgeOrderItemResource(Client, EdgeOrderItemData.DeserializeEdgeOrderItemData(e)), EdgeOrderItemOrderItemResourcesClientDiagnostics, Pipeline, "MockableEdgeOrderSubscriptionResource.GetEdgeOrderItems", "value", "nextLink", cancellationToken); } /// - /// This method provides the list of product families for the given subscription. + /// List order items at subscription level. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/listProductFamilies + /// /subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/orderItems /// /// /// Operation Id - /// ListProductFamilies + /// OrderItemResource_ListBySubscription /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 + /// + /// + /// Resource + /// /// /// /// - /// Filters for showing the product families. - /// $expand is supported on configurations parameter for product, which provides details on the configurations for the product. - /// $skipToken is supported on list of product families, which provides the next page in the list of product families. + /// $filter is supported to filter based on order id and order Item Type. Filter supports only equals operation. + /// $expand is supported on parent device details, device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Parent Device Details for order item provides details on the devices of the product, Device Details for order item provides details on the devices of the child configurations of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. + /// $skipToken is supported on Get list of order items, which provides the next page in the list of order items. + /// $top is supported on fetching list of resources. $top=10 means that the first 10 items in the list will be returned to the API caller. /// The cancellation token to use. - /// is null. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetProductFamilies(ProductFamiliesContent content, string expand = null, string skipToken = null, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetEdgeOrderItems(string filter = null, string expand = null, string skipToken = null, int? top = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(content, nameof(content)); - - HttpMessage FirstPageRequest(int? pageSizeHint) => DefaultRestClient.CreateListProductFamiliesRequest(Id.SubscriptionId, content, expand, skipToken); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DefaultRestClient.CreateListProductFamiliesNextPageRequest(nextLink, Id.SubscriptionId, content, expand, skipToken); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => ProductFamily.DeserializeProductFamily(e), DefaultClientDiagnostics, Pipeline, "MockableEdgeOrderSubscriptionResource.GetProductFamilies", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => EdgeOrderItemOrderItemResourcesRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, filter, expand, skipToken, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => EdgeOrderItemOrderItemResourcesRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, filter, expand, skipToken, top); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EdgeOrderItemResource(Client, EdgeOrderItemData.DeserializeEdgeOrderItemData(e)), EdgeOrderItemOrderItemResourcesClientDiagnostics, Pipeline, "MockableEdgeOrderSubscriptionResource.GetEdgeOrderItems", "value", "nextLink", cancellationToken); } /// - /// This method provides the list of configurations for the given product family, product line and product under subscription. + /// List configurations for the given product family, product line and product for the given subscription. /// /// /// Request Path @@ -186,11 +196,11 @@ public virtual Pageable GetProductFamilies(ProductFamiliesContent /// /// /// Operation Id - /// ListConfigurations + /// ProductsAndConfigurationsOperationGroup_GetConfigurations /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// @@ -203,13 +213,13 @@ public virtual AsyncPageable GetConfigurationsAsync(Config { Argument.AssertNotNull(content, nameof(content)); - HttpMessage FirstPageRequest(int? pageSizeHint) => DefaultRestClient.CreateListConfigurationsRequest(Id.SubscriptionId, content, skipToken); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DefaultRestClient.CreateListConfigurationsNextPageRequest(nextLink, Id.SubscriptionId, content, skipToken); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => ProductConfiguration.DeserializeProductConfiguration(e), DefaultClientDiagnostics, Pipeline, "MockableEdgeOrderSubscriptionResource.GetConfigurations", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => ProductsAndConfigurationsOperationGroupRestClient.CreateGetConfigurationsRequest(Id.SubscriptionId, content, skipToken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ProductsAndConfigurationsOperationGroupRestClient.CreateGetConfigurationsNextPageRequest(nextLink, Id.SubscriptionId, content, skipToken); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => ProductConfiguration.DeserializeProductConfiguration(e), ProductsAndConfigurationsOperationGroupClientDiagnostics, Pipeline, "MockableEdgeOrderSubscriptionResource.GetConfigurations", "value", "nextLink", cancellationToken); } /// - /// This method provides the list of configurations for the given product family, product line and product under subscription. + /// List configurations for the given product family, product line and product for the given subscription. /// /// /// Request Path @@ -217,11 +227,11 @@ public virtual AsyncPageable GetConfigurationsAsync(Config /// /// /// Operation Id - /// ListConfigurations + /// ProductsAndConfigurationsOperationGroup_GetConfigurations /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// @@ -234,183 +244,183 @@ public virtual Pageable GetConfigurations(ConfigurationsCo { Argument.AssertNotNull(content, nameof(content)); - HttpMessage FirstPageRequest(int? pageSizeHint) => DefaultRestClient.CreateListConfigurationsRequest(Id.SubscriptionId, content, skipToken); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DefaultRestClient.CreateListConfigurationsNextPageRequest(nextLink, Id.SubscriptionId, content, skipToken); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => ProductConfiguration.DeserializeProductConfiguration(e), DefaultClientDiagnostics, Pipeline, "MockableEdgeOrderSubscriptionResource.GetConfigurations", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => ProductsAndConfigurationsOperationGroupRestClient.CreateGetConfigurationsRequest(Id.SubscriptionId, content, skipToken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ProductsAndConfigurationsOperationGroupRestClient.CreateGetConfigurationsNextPageRequest(nextLink, Id.SubscriptionId, content, skipToken); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => ProductConfiguration.DeserializeProductConfiguration(e), ProductsAndConfigurationsOperationGroupClientDiagnostics, Pipeline, "MockableEdgeOrderSubscriptionResource.GetConfigurations", "value", "nextLink", cancellationToken); } /// - /// This method provides the list of product families metadata for the given subscription. + /// List product families for the given subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/productFamiliesMetadata + /// /subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/listProductFamilies /// /// /// Operation Id - /// ListProductFamiliesMetadata + /// ProductsAndConfigurationsOperationGroup_GetProductFamilies /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// - /// $skipToken is supported on list of product families metadata, which provides the next page in the list of product families metadata. + /// Filters for showing the product families. + /// $expand is supported on configurations parameter for product, which provides details on the configurations for the product. + /// $skipToken is supported on list of product families, which provides the next page in the list of product families. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetProductFamiliesMetadataAsync(string skipToken = null, CancellationToken cancellationToken = default) + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetProductFamiliesAsync(ProductFamiliesContent content, string expand = null, string skipToken = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => DefaultRestClient.CreateListProductFamiliesMetadataRequest(Id.SubscriptionId, skipToken); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DefaultRestClient.CreateListProductFamiliesMetadataNextPageRequest(nextLink, Id.SubscriptionId, skipToken); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => ProductFamiliesMetadata.DeserializeProductFamiliesMetadata(e), DefaultClientDiagnostics, Pipeline, "MockableEdgeOrderSubscriptionResource.GetProductFamiliesMetadata", "value", "nextLink", cancellationToken); + Argument.AssertNotNull(content, nameof(content)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => ProductsAndConfigurationsOperationGroupRestClient.CreateGetProductFamiliesRequest(Id.SubscriptionId, content, expand, skipToken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ProductsAndConfigurationsOperationGroupRestClient.CreateGetProductFamiliesNextPageRequest(nextLink, Id.SubscriptionId, content, expand, skipToken); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => ProductFamily.DeserializeProductFamily(e), ProductsAndConfigurationsOperationGroupClientDiagnostics, Pipeline, "MockableEdgeOrderSubscriptionResource.GetProductFamilies", "value", "nextLink", cancellationToken); } /// - /// This method provides the list of product families metadata for the given subscription. + /// List product families for the given subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/productFamiliesMetadata + /// /subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/listProductFamilies /// /// /// Operation Id - /// ListProductFamiliesMetadata + /// ProductsAndConfigurationsOperationGroup_GetProductFamilies /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// - /// $skipToken is supported on list of product families metadata, which provides the next page in the list of product families metadata. + /// Filters for showing the product families. + /// $expand is supported on configurations parameter for product, which provides details on the configurations for the product. + /// $skipToken is supported on list of product families, which provides the next page in the list of product families. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetProductFamiliesMetadata(string skipToken = null, CancellationToken cancellationToken = default) + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetProductFamilies(ProductFamiliesContent content, string expand = null, string skipToken = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => DefaultRestClient.CreateListProductFamiliesMetadataRequest(Id.SubscriptionId, skipToken); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DefaultRestClient.CreateListProductFamiliesMetadataNextPageRequest(nextLink, Id.SubscriptionId, skipToken); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => ProductFamiliesMetadata.DeserializeProductFamiliesMetadata(e), DefaultClientDiagnostics, Pipeline, "MockableEdgeOrderSubscriptionResource.GetProductFamiliesMetadata", "value", "nextLink", cancellationToken); + Argument.AssertNotNull(content, nameof(content)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => ProductsAndConfigurationsOperationGroupRestClient.CreateGetProductFamiliesRequest(Id.SubscriptionId, content, expand, skipToken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ProductsAndConfigurationsOperationGroupRestClient.CreateGetProductFamiliesNextPageRequest(nextLink, Id.SubscriptionId, content, expand, skipToken); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => ProductFamily.DeserializeProductFamily(e), ProductsAndConfigurationsOperationGroupClientDiagnostics, Pipeline, "MockableEdgeOrderSubscriptionResource.GetProductFamilies", "value", "nextLink", cancellationToken); } /// - /// Lists order at subscription level. + /// List product families metadata for the given subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/orders + /// /subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/productFamiliesMetadata /// /// /// Operation Id - /// ListOrderAtSubscriptionLevel + /// ProductsAndConfigurationsOperationGroup_GetProductFamiliesMetadata /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// - /// $skipToken is supported on Get list of order, which provides the next page in the list of order. + /// $skipToken is supported on list of product families metadata, which provides the next page in the list of product families metadata. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetEdgeOrdersAsync(string skipToken = null, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetProductFamiliesMetadataAsync(string skipToken = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => DefaultRestClient.CreateListOrderAtSubscriptionLevelRequest(Id.SubscriptionId, skipToken); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DefaultRestClient.CreateListOrderAtSubscriptionLevelNextPageRequest(nextLink, Id.SubscriptionId, skipToken); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EdgeOrderResource(Client, EdgeOrderData.DeserializeEdgeOrderData(e)), DefaultClientDiagnostics, Pipeline, "MockableEdgeOrderSubscriptionResource.GetEdgeOrders", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => ProductsAndConfigurationsOperationGroupRestClient.CreateGetProductFamiliesMetadataRequest(Id.SubscriptionId, skipToken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ProductsAndConfigurationsOperationGroupRestClient.CreateGetProductFamiliesMetadataNextPageRequest(nextLink, Id.SubscriptionId, skipToken); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => ProductFamiliesMetadata.DeserializeProductFamiliesMetadata(e), ProductsAndConfigurationsOperationGroupClientDiagnostics, Pipeline, "MockableEdgeOrderSubscriptionResource.GetProductFamiliesMetadata", "value", "nextLink", cancellationToken); } /// - /// Lists order at subscription level. + /// List product families metadata for the given subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/orders + /// /subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/productFamiliesMetadata /// /// /// Operation Id - /// ListOrderAtSubscriptionLevel + /// ProductsAndConfigurationsOperationGroup_GetProductFamiliesMetadata /// /// /// Default Api Version - /// 2021-12-01 + /// 2024-02-01 /// /// /// - /// $skipToken is supported on Get list of order, which provides the next page in the list of order. + /// $skipToken is supported on list of product families metadata, which provides the next page in the list of product families metadata. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetEdgeOrders(string skipToken = null, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetProductFamiliesMetadata(string skipToken = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => DefaultRestClient.CreateListOrderAtSubscriptionLevelRequest(Id.SubscriptionId, skipToken); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DefaultRestClient.CreateListOrderAtSubscriptionLevelNextPageRequest(nextLink, Id.SubscriptionId, skipToken); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EdgeOrderResource(Client, EdgeOrderData.DeserializeEdgeOrderData(e)), DefaultClientDiagnostics, Pipeline, "MockableEdgeOrderSubscriptionResource.GetEdgeOrders", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => ProductsAndConfigurationsOperationGroupRestClient.CreateGetProductFamiliesMetadataRequest(Id.SubscriptionId, skipToken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ProductsAndConfigurationsOperationGroupRestClient.CreateGetProductFamiliesMetadataNextPageRequest(nextLink, Id.SubscriptionId, skipToken); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => ProductFamiliesMetadata.DeserializeProductFamiliesMetadata(e), ProductsAndConfigurationsOperationGroupClientDiagnostics, Pipeline, "MockableEdgeOrderSubscriptionResource.GetProductFamiliesMetadata", "value", "nextLink", cancellationToken); } /// - /// Lists order item at subscription level. + /// List orders at subscription level. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/orderItems + /// /subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/orders /// /// /// Operation Id - /// ListOrderItemsAtSubscriptionLevel + /// OrdersOperationGroup_ListBySubscription /// /// /// Default Api Version - /// 2021-12-01 - /// - /// - /// Resource - /// + /// 2024-02-01 /// /// /// - /// $filter is supported to filter based on order id. Filter supports only equals operation. - /// $expand is supported on device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Device Details for order item provides details on the devices of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. - /// $skipToken is supported on Get list of order items, which provides the next page in the list of order items. + /// $skipToken is supported on Get list of orders, which provides the next page in the list of orders. + /// $top is supported on fetching list of resources. $top=10 means that the first 10 items in the list will be returned to the API caller. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetEdgeOrderItemsAsync(string filter = null, string expand = null, string skipToken = null, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetEdgeOrdersAsync(string skipToken = null, int? top = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => EdgeOrderItemRestClient.CreateListOrderItemsAtSubscriptionLevelRequest(Id.SubscriptionId, filter, expand, skipToken); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => EdgeOrderItemRestClient.CreateListOrderItemsAtSubscriptionLevelNextPageRequest(nextLink, Id.SubscriptionId, filter, expand, skipToken); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EdgeOrderItemResource(Client, EdgeOrderItemData.DeserializeEdgeOrderItemData(e)), EdgeOrderItemClientDiagnostics, Pipeline, "MockableEdgeOrderSubscriptionResource.GetEdgeOrderItems", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => OrdersOperationGroupRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, skipToken, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => OrdersOperationGroupRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, skipToken, top); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EdgeOrderResource(Client, EdgeOrderData.DeserializeEdgeOrderData(e)), OrdersOperationGroupClientDiagnostics, Pipeline, "MockableEdgeOrderSubscriptionResource.GetEdgeOrders", "value", "nextLink", cancellationToken); } /// - /// Lists order item at subscription level. + /// List orders at subscription level. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/orderItems + /// /subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/orders /// /// /// Operation Id - /// ListOrderItemsAtSubscriptionLevel + /// OrdersOperationGroup_ListBySubscription /// /// /// Default Api Version - /// 2021-12-01 - /// - /// - /// Resource - /// + /// 2024-02-01 /// /// /// - /// $filter is supported to filter based on order id. Filter supports only equals operation. - /// $expand is supported on device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Device Details for order item provides details on the devices of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. - /// $skipToken is supported on Get list of order items, which provides the next page in the list of order items. + /// $skipToken is supported on Get list of orders, which provides the next page in the list of orders. + /// $top is supported on fetching list of resources. $top=10 means that the first 10 items in the list will be returned to the API caller. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetEdgeOrderItems(string filter = null, string expand = null, string skipToken = null, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetEdgeOrders(string skipToken = null, int? top = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => EdgeOrderItemRestClient.CreateListOrderItemsAtSubscriptionLevelRequest(Id.SubscriptionId, filter, expand, skipToken); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => EdgeOrderItemRestClient.CreateListOrderItemsAtSubscriptionLevelNextPageRequest(nextLink, Id.SubscriptionId, filter, expand, skipToken); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EdgeOrderItemResource(Client, EdgeOrderItemData.DeserializeEdgeOrderItemData(e)), EdgeOrderItemClientDiagnostics, Pipeline, "MockableEdgeOrderSubscriptionResource.GetEdgeOrderItems", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => OrdersOperationGroupRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, skipToken, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => OrdersOperationGroupRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, skipToken, top); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EdgeOrderResource(Client, EdgeOrderData.DeserializeEdgeOrderData(e)), OrdersOperationGroupClientDiagnostics, Pipeline, "MockableEdgeOrderSubscriptionResource.GetEdgeOrders", "value", "nextLink", cancellationToken); } } } diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/AddressResourceList.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/AddressResourceList.Serialization.cs index d1774dac4a29..57a0ccd2a600 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/AddressResourceList.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/AddressResourceList.Serialization.cs @@ -34,7 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AddressResourceList)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsCollectionDefined(Value)) + if (options.Format != "W") { writer.WritePropertyName("value"u8); writer.WriteStartArray(); @@ -47,7 +47,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +87,13 @@ internal static AddressResourceList DeserializeAddressResourceList(JsonElement e return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +104,11 @@ internal static AddressResourceList DeserializeAddressResourceList(JsonElement e } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +117,7 @@ internal static AddressResourceList DeserializeAddressResourceList(JsonElement e } } serializedAdditionalRawData = rawDataDictionary; - return new AddressResourceList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new AddressResourceList(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/AddressResourceList.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/AddressResourceList.cs index 24d2e31e8aa5..8a88be457b29 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/AddressResourceList.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/AddressResourceList.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.EdgeOrder.Models { @@ -46,25 +47,31 @@ internal partial class AddressResourceList private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal AddressResourceList() + /// The AddressResource items on this page. + internal AddressResourceList(IEnumerable value) { - Value = new ChangeTrackingList(); + Value = value.ToList(); } /// Initializes a new instance of . - /// List of address resources. - /// Link for the next set of job resources. + /// The AddressResource items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal AddressResourceList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal AddressResourceList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// List of address resources. + /// Initializes a new instance of for deserialization. + internal AddressResourceList() + { + } + + /// The AddressResource items on this page. public IReadOnlyList Value { get; } - /// Link for the next set of job resources. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/AzureResourceManagerEdgeOrderContext.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/AzureResourceManagerEdgeOrderContext.cs index 01175e079761..3184185a3f1a 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/AzureResourceManagerEdgeOrderContext.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/AzureResourceManagerEdgeOrderContext.cs @@ -16,10 +16,14 @@ namespace Azure.ResourceManager.EdgeOrder /// For more information see 'https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/System.ClientModel/src/docs/ModelReaderWriterContext.md' /// [ModelReaderWriterBuildable(typeof(AddressResourceList))] + [ModelReaderWriterBuildable(typeof(ChildConfigurationCategoryInformation))] + [ModelReaderWriterBuildable(typeof(ChildConfigurationFilter))] [ModelReaderWriterBuildable(typeof(ConfigurationFilters))] + [ModelReaderWriterBuildable(typeof(Configurations))] [ModelReaderWriterBuildable(typeof(ConfigurationsContent))] [ModelReaderWriterBuildable(typeof(CustomerSubscriptionDetails))] [ModelReaderWriterBuildable(typeof(CustomerSubscriptionRegisteredFeatures))] + [ModelReaderWriterBuildable(typeof(DevicePresenceVerificationDetails))] [ModelReaderWriterBuildable(typeof(EdgeOrderAddressContactDetails))] [ModelReaderWriterBuildable(typeof(EdgeOrderAddressData))] [ModelReaderWriterBuildable(typeof(EdgeOrderAddressPatch))] @@ -30,6 +34,7 @@ namespace Azure.ResourceManager.EdgeOrder [ModelReaderWriterBuildable(typeof(EdgeOrderItemCancellationReason))] [ModelReaderWriterBuildable(typeof(EdgeOrderItemData))] [ModelReaderWriterBuildable(typeof(EdgeOrderItemDetails))] + [ModelReaderWriterBuildable(typeof(EdgeOrderItemDetailsPatch))] [ModelReaderWriterBuildable(typeof(EdgeOrderItemPatch))] [ModelReaderWriterBuildable(typeof(EdgeOrderItemResource))] [ModelReaderWriterBuildable(typeof(EdgeOrderItemReturnContent))] @@ -39,13 +44,16 @@ namespace Azure.ResourceManager.EdgeOrder [ModelReaderWriterBuildable(typeof(EdgeOrderProductDeviceDetails))] [ModelReaderWriterBuildable(typeof(EdgeOrderProductImageInformation))] [ModelReaderWriterBuildable(typeof(EdgeOrderProductMeterDetails))] + [ModelReaderWriterBuildable(typeof(EdgeOrderProvisioningDetails))] [ModelReaderWriterBuildable(typeof(EdgeOrderResource))] [ModelReaderWriterBuildable(typeof(EdgeOrderShippingAddress))] [ModelReaderWriterBuildable(typeof(EdgeOrderStageDetails))] [ModelReaderWriterBuildable(typeof(EncryptionPreferences))] [ModelReaderWriterBuildable(typeof(FilterableProperty))] [ModelReaderWriterBuildable(typeof(ForwardShippingDetails))] + [ModelReaderWriterBuildable(typeof(GroupedChildConfigurations))] [ModelReaderWriterBuildable(typeof(HierarchyInformation))] + [ModelReaderWriterBuildable(typeof(ManagedServiceIdentity))] [ModelReaderWriterBuildable(typeof(ManagementResourcePreferences))] [ModelReaderWriterBuildable(typeof(NotificationPreference))] [ModelReaderWriterBuildable(typeof(OrderItemPreferences))] @@ -53,10 +61,13 @@ namespace Azure.ResourceManager.EdgeOrder [ModelReaderWriterBuildable(typeof(OrderResourceList))] [ModelReaderWriterBuildable(typeof(Pav2MeterDetails))] [ModelReaderWriterBuildable(typeof(ProductAvailabilityInformation))] + [ModelReaderWriterBuildable(typeof(ProductChildConfiguration))] [ModelReaderWriterBuildable(typeof(ProductConfiguration))] - [ModelReaderWriterBuildable(typeof(ProductConfigurations))] + [ModelReaderWriterBuildable(typeof(ProductConfigurationDeviceDetails))] [ModelReaderWriterBuildable(typeof(ProductDescription))] [ModelReaderWriterBuildable(typeof(ProductDetails))] + [ModelReaderWriterBuildable(typeof(ProductDetailsAdditionalConfiguration))] + [ModelReaderWriterBuildable(typeof(ProductDetailsUpdateParameter))] [ModelReaderWriterBuildable(typeof(ProductDimensions))] [ModelReaderWriterBuildable(typeof(ProductDisplayInfo))] [ModelReaderWriterBuildable(typeof(ProductFamilies))] @@ -71,9 +82,14 @@ namespace Azure.ResourceManager.EdgeOrder [ModelReaderWriterBuildable(typeof(ResourceProviderDetails))] [ModelReaderWriterBuildable(typeof(ResponseError))] [ModelReaderWriterBuildable(typeof(ReverseShippingDetails))] + [ModelReaderWriterBuildable(typeof(SiteDetails))] [ModelReaderWriterBuildable(typeof(SystemData))] + [ModelReaderWriterBuildable(typeof(TermCommitmentInformation))] + [ModelReaderWriterBuildable(typeof(TermCommitmentPreferences))] + [ModelReaderWriterBuildable(typeof(TermTypeDetails))] [ModelReaderWriterBuildable(typeof(TransportPreferences))] [ModelReaderWriterBuildable(typeof(UnknownMeterDetails))] + [ModelReaderWriterBuildable(typeof(UserAssignedIdentity))] public partial class AzureResourceManagerEdgeOrderContext : ModelReaderWriterContext { } diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ChildConfigurationCategoryInformation.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ChildConfigurationCategoryInformation.Serialization.cs new file mode 100644 index 000000000000..476a90ae6264 --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ChildConfigurationCategoryInformation.Serialization.cs @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.EdgeOrder.Models +{ + public partial class ChildConfigurationCategoryInformation : 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(ChildConfigurationCategoryInformation)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(CategoryName)) + { + writer.WritePropertyName("categoryName"u8); + writer.WriteStringValue(CategoryName); + } + if (Optional.IsDefined(CategoryDisplayName)) + { + writer.WritePropertyName("categoryDisplayName"u8); + writer.WriteStringValue(CategoryDisplayName); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (Optional.IsCollectionDefined(Links)) + { + writer.WritePropertyName("links"u8); + writer.WriteStartArray(); + foreach (var item in Links) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ChildConfigurationCategoryInformation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ChildConfigurationCategoryInformation)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeChildConfigurationCategoryInformation(document.RootElement, options); + } + + internal static ChildConfigurationCategoryInformation DeserializeChildConfigurationCategoryInformation(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string categoryName = default; + string categoryDisplayName = default; + string description = default; + IReadOnlyList links = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("categoryName"u8)) + { + categoryName = property.Value.GetString(); + continue; + } + if (property.NameEquals("categoryDisplayName"u8)) + { + categoryDisplayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("links"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ProductLink.DeserializeProductLink(item, options)); + } + links = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ChildConfigurationCategoryInformation(categoryName, categoryDisplayName, description, links ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerEdgeOrderContext.Default); + default: + throw new FormatException($"The model {nameof(ChildConfigurationCategoryInformation)} does not support writing '{options.Format}' format."); + } + } + + ChildConfigurationCategoryInformation IPersistableModel.Create(BinaryData 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 DeserializeChildConfigurationCategoryInformation(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ChildConfigurationCategoryInformation)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ChildConfigurationCategoryInformation.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ChildConfigurationCategoryInformation.cs new file mode 100644 index 000000000000..866844fb3a02 --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ChildConfigurationCategoryInformation.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.EdgeOrder.Models +{ + /// Category related properties of a child configuration. + public partial class ChildConfigurationCategoryInformation + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal ChildConfigurationCategoryInformation() + { + Links = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Category name of the child configuration. + /// Category display name of the child configuration. + /// Description text for the category. + /// Links for the category. + /// Keeps track of any properties unknown to the library. + internal ChildConfigurationCategoryInformation(string categoryName, string categoryDisplayName, string description, IReadOnlyList links, IDictionary serializedAdditionalRawData) + { + CategoryName = categoryName; + CategoryDisplayName = categoryDisplayName; + Description = description; + Links = links; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Category name of the child configuration. + public string CategoryName { get; } + /// Category display name of the child configuration. + public string CategoryDisplayName { get; } + /// Description text for the category. + public string Description { get; } + /// Links for the category. + public IReadOnlyList Links { get; } + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ChildConfigurationFilter.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ChildConfigurationFilter.Serialization.cs new file mode 100644 index 000000000000..3cbcd716fd46 --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ChildConfigurationFilter.Serialization.cs @@ -0,0 +1,168 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.EdgeOrder.Models +{ + public partial class ChildConfigurationFilter : 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(ChildConfigurationFilter)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(HierarchyInformations)) + { + writer.WritePropertyName("hierarchyInformations"u8); + writer.WriteStartArray(); + foreach (var item in HierarchyInformations) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(ChildConfigurationTypes)) + { + writer.WritePropertyName("childConfigurationTypes"u8); + writer.WriteStartArray(); + foreach (var item in ChildConfigurationTypes) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ChildConfigurationFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ChildConfigurationFilter)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeChildConfigurationFilter(document.RootElement, options); + } + + internal static ChildConfigurationFilter DeserializeChildConfigurationFilter(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList hierarchyInformations = default; + IList childConfigurationTypes = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("hierarchyInformations"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(HierarchyInformation.DeserializeHierarchyInformation(item, options)); + } + hierarchyInformations = array; + continue; + } + if (property.NameEquals("childConfigurationTypes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(new ChildConfigurationType(item.GetString())); + } + childConfigurationTypes = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ChildConfigurationFilter(hierarchyInformations ?? new ChangeTrackingList(), childConfigurationTypes ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerEdgeOrderContext.Default); + default: + throw new FormatException($"The model {nameof(ChildConfigurationFilter)} does not support writing '{options.Format}' format."); + } + } + + ChildConfigurationFilter IPersistableModel.Create(BinaryData 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 DeserializeChildConfigurationFilter(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ChildConfigurationFilter)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ChildConfigurationFilter.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ChildConfigurationFilter.cs new file mode 100644 index 000000000000..48d7ae264388 --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ChildConfigurationFilter.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.EdgeOrder.Models +{ + /// Child configuration filter. + public partial class ChildConfigurationFilter + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ChildConfigurationFilter() + { + HierarchyInformations = new ChangeTrackingList(); + ChildConfigurationTypes = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The list of child configuration hierarchy customer wants to filter for the given configuration. + /// Filter to fetch all child configurations belonging to the given list of configuration types. + /// Keeps track of any properties unknown to the library. + internal ChildConfigurationFilter(IList hierarchyInformations, IList childConfigurationTypes, IDictionary serializedAdditionalRawData) + { + HierarchyInformations = hierarchyInformations; + ChildConfigurationTypes = childConfigurationTypes; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The list of child configuration hierarchy customer wants to filter for the given configuration. + public IList HierarchyInformations { get; } + /// Filter to fetch all child configurations belonging to the given list of configuration types. + public IList ChildConfigurationTypes { get; } + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ChildConfigurationType.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ChildConfigurationType.cs new file mode 100644 index 000000000000..ed4a544d5d82 --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ChildConfigurationType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.EdgeOrder.Models +{ + /// The ChildConfigurationType. + public readonly partial struct ChildConfigurationType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ChildConfigurationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DeviceConfigurationValue = "DeviceConfiguration"; + private const string AdditionalConfigurationValue = "AdditionalConfiguration"; + + /// Child configuration is a device configuration. + public static ChildConfigurationType DeviceConfiguration { get; } = new ChildConfigurationType(DeviceConfigurationValue); + /// Child configuration is an additional configuration. + public static ChildConfigurationType AdditionalConfiguration { get; } = new ChildConfigurationType(AdditionalConfigurationValue); + /// Determines if two values are the same. + public static bool operator ==(ChildConfigurationType left, ChildConfigurationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ChildConfigurationType left, ChildConfigurationType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ChildConfigurationType(string value) => new ChildConfigurationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ChildConfigurationType other && Equals(other); + /// + public bool Equals(ChildConfigurationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ConfigurationFilters.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ConfigurationFilters.Serialization.cs index 6b8c99aa06dc..ba9ac7f766f1 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ConfigurationFilters.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ConfigurationFilters.Serialization.cs @@ -46,6 +46,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } + if (Optional.IsDefined(ChildConfigurationFilter)) + { + writer.WritePropertyName("childConfigurationFilter"u8); + writer.WriteObjectValue(ChildConfigurationFilter, options); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -85,6 +90,7 @@ internal static ConfigurationFilters DeserializeConfigurationFilters(JsonElement } HierarchyInformation hierarchyInformation = default; IList filterableProperty = default; + ChildConfigurationFilter childConfigurationFilter = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -108,13 +114,22 @@ internal static ConfigurationFilters DeserializeConfigurationFilters(JsonElement filterableProperty = array; continue; } + if (property.NameEquals("childConfigurationFilter"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + childConfigurationFilter = ChildConfigurationFilter.DeserializeChildConfigurationFilter(property.Value, options); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new ConfigurationFilters(hierarchyInformation, filterableProperty ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new ConfigurationFilters(hierarchyInformation, filterableProperty ?? new ChangeTrackingList(), childConfigurationFilter, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ConfigurationFilters.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ConfigurationFilters.cs index 2d22194d7407..47762a9e1336 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ConfigurationFilters.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ConfigurationFilters.cs @@ -59,11 +59,13 @@ public ConfigurationFilters(HierarchyInformation hierarchyInformation) /// Initializes a new instance of . /// Product hierarchy information. /// Filters specific to product. + /// Filter to fetch specific child configurations that exist in the configuration. This must be passed to either fetch a list of specific child configurations, or all child configurations of specific types of child configurations. /// Keeps track of any properties unknown to the library. - internal ConfigurationFilters(HierarchyInformation hierarchyInformation, IList filterableProperty, IDictionary serializedAdditionalRawData) + internal ConfigurationFilters(HierarchyInformation hierarchyInformation, IList filterableProperty, ChildConfigurationFilter childConfigurationFilter, IDictionary serializedAdditionalRawData) { HierarchyInformation = hierarchyInformation; FilterableProperty = filterableProperty; + ChildConfigurationFilter = childConfigurationFilter; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -76,5 +78,7 @@ internal ConfigurationFilters() public HierarchyInformation HierarchyInformation { get; } /// Filters specific to product. public IList FilterableProperty { get; } + /// Filter to fetch specific child configurations that exist in the configuration. This must be passed to either fetch a list of specific child configurations, or all child configurations of specific types of child configurations. + public ChildConfigurationFilter ChildConfigurationFilter { get; set; } } } diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ConfigurationFulfillmentType.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ConfigurationFulfillmentType.cs new file mode 100644 index 000000000000..3f779440cfc4 --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ConfigurationFulfillmentType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.EdgeOrder.Models +{ + /// The entity responsible for fulfillment of the item at the given hierarchy level. + public readonly partial struct ConfigurationFulfillmentType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ConfigurationFulfillmentType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string MicrosoftValue = "Microsoft"; + private const string ExternalValue = "External"; + + /// The fulfillment (the whole journey of the product offering) is handled by microsoft. + public static ConfigurationFulfillmentType Microsoft { get; } = new ConfigurationFulfillmentType(MicrosoftValue); + /// The fulfillment (the whole journey of the product offering) is handled by external third party entities. + public static ConfigurationFulfillmentType External { get; } = new ConfigurationFulfillmentType(ExternalValue); + /// Determines if two values are the same. + public static bool operator ==(ConfigurationFulfillmentType left, ConfigurationFulfillmentType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ConfigurationFulfillmentType left, ConfigurationFulfillmentType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ConfigurationFulfillmentType(string value) => new ConfigurationFulfillmentType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ConfigurationFulfillmentType other && Equals(other); + /// + public bool Equals(ConfigurationFulfillmentType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ConfigurationIdentificationType.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ConfigurationIdentificationType.cs new file mode 100644 index 000000000000..51aac885eff8 --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ConfigurationIdentificationType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.EdgeOrder.Models +{ + /// Identification type of the configuration. + public readonly partial struct ConfigurationIdentificationType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ConfigurationIdentificationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotSupportedValue = "NotSupported"; + private const string SerialNumberValue = "SerialNumber"; + + /// Product does not have any explicit identifier. + public static ConfigurationIdentificationType NotSupported { get; } = new ConfigurationIdentificationType(NotSupportedValue); + /// Product is identifiable by serial number. + public static ConfigurationIdentificationType SerialNumber { get; } = new ConfigurationIdentificationType(SerialNumberValue); + /// Determines if two values are the same. + public static bool operator ==(ConfigurationIdentificationType left, ConfigurationIdentificationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ConfigurationIdentificationType left, ConfigurationIdentificationType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ConfigurationIdentificationType(string value) => new ConfigurationIdentificationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ConfigurationIdentificationType other && Equals(other); + /// + public bool Equals(ConfigurationIdentificationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductConfigurations.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/Configurations.Serialization.cs similarity index 66% rename from sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductConfigurations.Serialization.cs rename to sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/Configurations.Serialization.cs index 724d60d8e737..4df599bb42ac 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductConfigurations.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/Configurations.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.ResourceManager.EdgeOrder.Models { - internal partial class ProductConfigurations : IUtf8JsonSerializable, IJsonModel + internal partial class Configurations : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,13 +28,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW /// 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; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(ProductConfigurations)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(Configurations)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsCollectionDefined(Value)) + if (options.Format != "W") { writer.WritePropertyName("value"u8); writer.WriteStartArray(); @@ -47,7 +47,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -66,19 +66,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - ProductConfigurations IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + Configurations IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(ProductConfigurations)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(Configurations)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeProductConfigurations(document.RootElement, options); + return DeserializeConfigurations(document.RootElement, options); } - internal static ProductConfigurations DeserializeProductConfigurations(JsonElement element, ModelReaderWriterOptions options = null) + internal static Configurations DeserializeConfigurations(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -87,17 +87,13 @@ internal static ProductConfigurations DeserializeProductConfigurations(JsonEleme return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +104,11 @@ internal static ProductConfigurations DeserializeProductConfigurations(JsonEleme } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,38 +117,38 @@ internal static ProductConfigurations DeserializeProductConfigurations(JsonEleme } } serializedAdditionalRawData = rawDataDictionary; - return new ProductConfigurations(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new Configurations(value, nextLink, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options, AzureResourceManagerEdgeOrderContext.Default); default: - throw new FormatException($"The model {nameof(ProductConfigurations)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(Configurations)} does not support writing '{options.Format}' format."); } } - ProductConfigurations IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + Configurations IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeProductConfigurations(document.RootElement, options); + return DeserializeConfigurations(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(ProductConfigurations)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(Configurations)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/Configurations.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/Configurations.cs new file mode 100644 index 000000000000..3c9661ffc2f3 --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/Configurations.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 System.Linq; + +namespace Azure.ResourceManager.EdgeOrder.Models +{ + /// The list of configurations. + internal partial class Configurations + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// 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 Configuration items on this page. + internal Configurations(IEnumerable value) + { + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The Configuration items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal Configurations(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal Configurations() + { + } + + /// The Configuration items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ConfigurationsContent.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ConfigurationsContent.Serialization.cs index 6ffbe15e8945..2640d246a907 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ConfigurationsContent.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ConfigurationsContent.Serialization.cs @@ -34,18 +34,26 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ConfigurationsContent)} does not support writing '{format}' format."); } - writer.WritePropertyName("configurationFilters"u8); - writer.WriteStartArray(); - foreach (var item in ConfigurationFilters) + if (Optional.IsDefined(ConfigurationFilter)) { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("configurationFilter"u8); + writer.WriteObjectValue(ConfigurationFilter, options); } - writer.WriteEndArray(); if (Optional.IsDefined(CustomerSubscriptionDetails)) { writer.WritePropertyName("customerSubscriptionDetails"u8); writer.WriteObjectValue(CustomerSubscriptionDetails, options); } + if (Optional.IsCollectionDefined(ConfigurationFilters)) + { + writer.WritePropertyName("configurationFilters"u8); + writer.WriteStartArray(); + foreach (var item in ConfigurationFilters) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -83,20 +91,20 @@ internal static ConfigurationsContent DeserializeConfigurationsContent(JsonEleme { return null; } - IList configurationFilters = default; + ConfigurationFilters configurationFilter = default; CustomerSubscriptionDetails customerSubscriptionDetails = default; + IList configurationFilters = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("configurationFilters"u8)) + if (property.NameEquals("configurationFilter"u8)) { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + if (property.Value.ValueKind == JsonValueKind.Null) { - array.Add(Models.ConfigurationFilters.DeserializeConfigurationFilters(item, options)); + continue; } - configurationFilters = array; + configurationFilter = Models.ConfigurationFilters.DeserializeConfigurationFilters(property.Value, options); continue; } if (property.NameEquals("customerSubscriptionDetails"u8)) @@ -108,13 +116,27 @@ internal static ConfigurationsContent DeserializeConfigurationsContent(JsonEleme customerSubscriptionDetails = CustomerSubscriptionDetails.DeserializeCustomerSubscriptionDetails(property.Value, options); continue; } + if (property.NameEquals("configurationFilters"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Models.ConfigurationFilters.DeserializeConfigurationFilters(item, options)); + } + configurationFilters = array; + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new ConfigurationsContent(configurationFilters, customerSubscriptionDetails, serializedAdditionalRawData); + return new ConfigurationsContent(configurationFilter, customerSubscriptionDetails, configurationFilters ?? new ChangeTrackingList(), serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ConfigurationsContent.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ConfigurationsContent.cs index e15a810b9ba9..7e71eddecf08 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ConfigurationsContent.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ConfigurationsContent.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.ResourceManager.EdgeOrder.Models { @@ -47,33 +46,26 @@ public partial class ConfigurationsContent private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Holds details about product hierarchy information and filterable property. - /// is null. - public ConfigurationsContent(IEnumerable configurationFilters) + public ConfigurationsContent() { - Argument.AssertNotNull(configurationFilters, nameof(configurationFilters)); - - ConfigurationFilters = configurationFilters.ToList(); + ConfigurationFilters = new ChangeTrackingList(); } /// Initializes a new instance of . - /// Holds details about product hierarchy information and filterable property. + /// Holds details about product hierarchy information and filterable property. /// Customer subscription properties. Clients can display available products to unregistered customers by explicitly passing subscription details. + /// /// Keeps track of any properties unknown to the library. - internal ConfigurationsContent(IList configurationFilters, CustomerSubscriptionDetails customerSubscriptionDetails, IDictionary serializedAdditionalRawData) + internal ConfigurationsContent(ConfigurationFilters configurationFilter, CustomerSubscriptionDetails customerSubscriptionDetails, IList configurationFilters, IDictionary serializedAdditionalRawData) { - ConfigurationFilters = configurationFilters; + ConfigurationFilter = configurationFilter; CustomerSubscriptionDetails = customerSubscriptionDetails; + ConfigurationFilters = configurationFilters; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal ConfigurationsContent() - { - } - /// Holds details about product hierarchy information and filterable property. - public IList ConfigurationFilters { get; } + public ConfigurationFilters ConfigurationFilter { get; set; } /// Customer subscription properties. Clients can display available products to unregistered customers by explicitly passing subscription details. public CustomerSubscriptionDetails CustomerSubscriptionDetails { get; set; } } diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/DevicePresenceVerificationDetails.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/DevicePresenceVerificationDetails.Serialization.cs new file mode 100644 index 000000000000..2e99c9f024b8 --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/DevicePresenceVerificationDetails.Serialization.cs @@ -0,0 +1,144 @@ +// Copyright (c) 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.EdgeOrder.Models +{ + public partial class DevicePresenceVerificationDetails : 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(DevicePresenceVerificationDetails)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Message)) + { + writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DevicePresenceVerificationDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DevicePresenceVerificationDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDevicePresenceVerificationDetails(document.RootElement, options); + } + + internal static DevicePresenceVerificationDetails DeserializeDevicePresenceVerificationDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DevicePresenceVerificationStatus? status = default; + string message = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new DevicePresenceVerificationStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("message"u8)) + { + message = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DevicePresenceVerificationDetails(status, message, 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, AzureResourceManagerEdgeOrderContext.Default); + default: + throw new FormatException($"The model {nameof(DevicePresenceVerificationDetails)} does not support writing '{options.Format}' format."); + } + } + + DevicePresenceVerificationDetails IPersistableModel.Create(BinaryData 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 DeserializeDevicePresenceVerificationDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DevicePresenceVerificationDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/DevicePresenceVerificationDetails.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/DevicePresenceVerificationDetails.cs new file mode 100644 index 000000000000..153fb37f5af7 --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/DevicePresenceVerificationDetails.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.EdgeOrder.Models +{ + /// Proof of possession details. + public partial class DevicePresenceVerificationDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DevicePresenceVerificationDetails() + { + } + + /// Initializes a new instance of . + /// Proof of possession status. + /// Insights on current status. + /// Keeps track of any properties unknown to the library. + internal DevicePresenceVerificationDetails(DevicePresenceVerificationStatus? status, string message, IDictionary serializedAdditionalRawData) + { + Status = status; + Message = message; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Proof of possession status. + public DevicePresenceVerificationStatus? Status { get; } + /// Insights on current status. + public string Message { get; } + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/DevicePresenceVerificationStatus.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/DevicePresenceVerificationStatus.cs new file mode 100644 index 000000000000..ccf05c4062c4 --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/DevicePresenceVerificationStatus.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.EdgeOrder.Models +{ + /// Proof of possession status. + public readonly partial struct DevicePresenceVerificationStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DevicePresenceVerificationStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotInitiatedValue = "NotInitiated"; + private const string CompletedValue = "Completed"; + + /// The device has not yet been verified to be with the right edge operator or at the right location. + public static DevicePresenceVerificationStatus NotInitiated { get; } = new DevicePresenceVerificationStatus(NotInitiatedValue); + /// Confirms that the device is verified to be with the right edge operator or at the right location. + public static DevicePresenceVerificationStatus Completed { get; } = new DevicePresenceVerificationStatus(CompletedValue); + /// Determines if two values are the same. + public static bool operator ==(DevicePresenceVerificationStatus left, DevicePresenceVerificationStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DevicePresenceVerificationStatus left, DevicePresenceVerificationStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DevicePresenceVerificationStatus(string value) => new DevicePresenceVerificationStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DevicePresenceVerificationStatus other && Equals(other); + /// + public bool Equals(DevicePresenceVerificationStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderAddressClassification.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderAddressClassification.cs new file mode 100644 index 000000000000..fca607050a78 --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderAddressClassification.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.EdgeOrder.Models +{ + /// Type of address based on its usage context. + public readonly partial struct EdgeOrderAddressClassification : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public EdgeOrderAddressClassification(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ShippingValue = "Shipping"; + private const string SiteValue = "Site"; + + /// Shipping address for the order. + public static EdgeOrderAddressClassification Shipping { get; } = new EdgeOrderAddressClassification(ShippingValue); + /// Site Address. + public static EdgeOrderAddressClassification Site { get; } = new EdgeOrderAddressClassification(SiteValue); + /// Determines if two values are the same. + public static bool operator ==(EdgeOrderAddressClassification left, EdgeOrderAddressClassification right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(EdgeOrderAddressClassification left, EdgeOrderAddressClassification right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator EdgeOrderAddressClassification(string value) => new EdgeOrderAddressClassification(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is EdgeOrderAddressClassification other && Equals(other); + /// + public bool Equals(EdgeOrderAddressClassification other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderAddressContactDetails.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderAddressContactDetails.Serialization.cs index fb8446073da6..f54b10bb85cf 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderAddressContactDetails.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderAddressContactDetails.Serialization.cs @@ -34,10 +34,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(EdgeOrderAddressContactDetails)} does not support writing '{format}' format."); } - writer.WritePropertyName("contactName"u8); - writer.WriteStringValue(ContactName); - writer.WritePropertyName("phone"u8); - writer.WriteStringValue(Phone); + if (Optional.IsDefined(ContactName)) + { + writer.WritePropertyName("contactName"u8); + writer.WriteStringValue(ContactName); + } + if (Optional.IsDefined(Phone)) + { + writer.WritePropertyName("phone"u8); + writer.WriteStringValue(Phone); + } if (Optional.IsDefined(PhoneExtension)) { writer.WritePropertyName("phoneExtension"u8); @@ -48,13 +54,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("mobile"u8); writer.WriteStringValue(Mobile); } - writer.WritePropertyName("emailList"u8); - writer.WriteStartArray(); - foreach (var item in EmailList) + if (Optional.IsCollectionDefined(EmailList)) { - writer.WriteStringValue(item); + writer.WritePropertyName("emailList"u8); + writer.WriteStartArray(); + foreach (var item in EmailList) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -123,6 +132,10 @@ internal static EdgeOrderAddressContactDetails DeserializeEdgeOrderAddressContac } if (property.NameEquals("emailList"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -142,7 +155,7 @@ internal static EdgeOrderAddressContactDetails DeserializeEdgeOrderAddressContac phone, phoneExtension, mobile, - emailList, + emailList ?? new ChangeTrackingList(), serializedAdditionalRawData); } diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderAddressContactDetails.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderAddressContactDetails.cs index 7db45ce946cf..eb34e467ef9a 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderAddressContactDetails.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderAddressContactDetails.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.ResourceManager.EdgeOrder.Models { @@ -47,19 +46,9 @@ public partial class EdgeOrderAddressContactDetails private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Contact name of the person. - /// Phone number of the contact person. - /// List of Email-ids to be notified about job progress. - /// , or is null. - public EdgeOrderAddressContactDetails(string contactName, string phone, IEnumerable emailList) + public EdgeOrderAddressContactDetails() { - Argument.AssertNotNull(contactName, nameof(contactName)); - Argument.AssertNotNull(phone, nameof(phone)); - Argument.AssertNotNull(emailList, nameof(emailList)); - - ContactName = contactName; - Phone = phone; - EmailList = emailList.ToList(); + EmailList = new ChangeTrackingList(); } /// Initializes a new instance of . @@ -79,11 +68,6 @@ internal EdgeOrderAddressContactDetails(string contactName, string phone, string _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal EdgeOrderAddressContactDetails() - { - } - /// Contact name of the person. public string ContactName { get; set; } /// Phone number of the contact person. diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderAddressPatch.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderAddressPatch.Serialization.cs index ed51c9c82fe2..09235f0894c9 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderAddressPatch.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderAddressPatch.Serialization.cs @@ -152,7 +152,7 @@ internal static EdgeOrderAddressPatch DeserializeEdgeOrderAddressPatch(JsonEleme } } serializedAdditionalRawData = rawDataDictionary; - return new EdgeOrderAddressPatch(tags ?? new ChangeTrackingDictionary(), shippingAddress, contactDetails, serializedAdditionalRawData); + return new EdgeOrderAddressPatch(shippingAddress, contactDetails, tags ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderAddressPatch.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderAddressPatch.cs index 424c932b89e2..571650dabae6 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderAddressPatch.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderAddressPatch.cs @@ -52,23 +52,23 @@ public EdgeOrderAddressPatch() } /// Initializes a new instance of . - /// The list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). /// Shipping details for the address. /// Contact details for the address. + /// The list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). /// Keeps track of any properties unknown to the library. - internal EdgeOrderAddressPatch(IDictionary tags, EdgeOrderShippingAddress shippingAddress, EdgeOrderAddressContactDetails contactDetails, IDictionary serializedAdditionalRawData) + internal EdgeOrderAddressPatch(EdgeOrderShippingAddress shippingAddress, EdgeOrderAddressContactDetails contactDetails, IDictionary tags, IDictionary serializedAdditionalRawData) { - Tags = tags; ShippingAddress = shippingAddress; ContactDetails = contactDetails; + Tags = tags; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). - public IDictionary Tags { get; } /// Shipping details for the address. public EdgeOrderShippingAddress ShippingAddress { get; set; } /// Contact details for the address. public EdgeOrderAddressContactDetails ContactDetails { get; set; } + /// The list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). + public IDictionary Tags { get; } } } diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderAutoProvisioningStatus.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderAutoProvisioningStatus.cs new file mode 100644 index 000000000000..c28d4f5ad3d3 --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderAutoProvisioningStatus.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.EdgeOrder.Models +{ + /// Auto Provisioning Details. + public readonly partial struct EdgeOrderAutoProvisioningStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public EdgeOrderAutoProvisioningStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "Enabled"; + private const string DisabledValue = "Disabled"; + + /// Provisioning Enabled. Will act as pre-approved, and arc extension will be enabled as soon as the device is verified to be at the right edge location. + public static EdgeOrderAutoProvisioningStatus Enabled { get; } = new EdgeOrderAutoProvisioningStatus(EnabledValue); + /// Provisioning Disabled. + public static EdgeOrderAutoProvisioningStatus Disabled { get; } = new EdgeOrderAutoProvisioningStatus(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(EdgeOrderAutoProvisioningStatus left, EdgeOrderAutoProvisioningStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(EdgeOrderAutoProvisioningStatus left, EdgeOrderAutoProvisioningStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator EdgeOrderAutoProvisioningStatus(string value) => new EdgeOrderAutoProvisioningStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is EdgeOrderAutoProvisioningStatus other && Equals(other); + /// + public bool Equals(EdgeOrderAutoProvisioningStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemAddressDetails.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemAddressDetails.cs index 068b99696259..57c9d4c5189a 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemAddressDetails.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemAddressDetails.cs @@ -46,7 +46,7 @@ public partial class EdgeOrderItemAddressDetails private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Customer address and contact details. It should be address resource. + /// Customer address and contact details. /// is null. public EdgeOrderItemAddressDetails(EdgeOrderItemAddressProperties forwardAddress) { @@ -56,7 +56,7 @@ public EdgeOrderItemAddressDetails(EdgeOrderItemAddressProperties forwardAddress } /// Initializes a new instance of . - /// Customer address and contact details. It should be address resource. + /// Customer address and contact details. /// Return shipping address. /// Keeps track of any properties unknown to the library. internal EdgeOrderItemAddressDetails(EdgeOrderItemAddressProperties forwardAddress, EdgeOrderItemAddressProperties returnAddress, IDictionary serializedAdditionalRawData) @@ -71,7 +71,7 @@ internal EdgeOrderItemAddressDetails() { } - /// Customer address and contact details. It should be address resource. + /// Customer address and contact details. public EdgeOrderItemAddressProperties ForwardAddress { get; set; } /// Return shipping address. public EdgeOrderItemAddressProperties ReturnAddress { get; } diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemAddressProperties.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemAddressProperties.Serialization.cs index 5d0dbdc0386e..54d858fd76ad 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemAddressProperties.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemAddressProperties.Serialization.cs @@ -34,18 +34,31 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(EdgeOrderItemAddressProperties)} does not support writing '{format}' format."); } + if (Optional.IsDefined(AddressClassification)) + { + writer.WritePropertyName("addressClassification"u8); + writer.WriteStringValue(AddressClassification.Value.ToString()); + } if (Optional.IsDefined(ShippingAddress)) { writer.WritePropertyName("shippingAddress"u8); writer.WriteObjectValue(ShippingAddress, options); } - writer.WritePropertyName("contactDetails"u8); - writer.WriteObjectValue(ContactDetails, options); + if (Optional.IsDefined(ContactDetails)) + { + writer.WritePropertyName("contactDetails"u8); + writer.WriteObjectValue(ContactDetails, options); + } if (options.Format != "W" && Optional.IsDefined(AddressValidationStatus)) { writer.WritePropertyName("addressValidationStatus"u8); writer.WriteStringValue(AddressValidationStatus.Value.ToString()); } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -83,13 +96,24 @@ internal static EdgeOrderItemAddressProperties DeserializeEdgeOrderItemAddressPr { return null; } + EdgeOrderAddressClassification? addressClassification = default; EdgeOrderShippingAddress shippingAddress = default; EdgeOrderAddressContactDetails contactDetails = default; EdgeOrderAddressValidationStatus? addressValidationStatus = default; + EdgeOrderProvisioningState? provisioningState = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("addressClassification"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + addressClassification = new EdgeOrderAddressClassification(property.Value.GetString()); + continue; + } if (property.NameEquals("shippingAddress"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -101,6 +125,10 @@ internal static EdgeOrderItemAddressProperties DeserializeEdgeOrderItemAddressPr } if (property.NameEquals("contactDetails"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } contactDetails = EdgeOrderAddressContactDetails.DeserializeEdgeOrderAddressContactDetails(property.Value, options); continue; } @@ -113,13 +141,28 @@ internal static EdgeOrderItemAddressProperties DeserializeEdgeOrderItemAddressPr addressValidationStatus = new EdgeOrderAddressValidationStatus(property.Value.GetString()); continue; } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new EdgeOrderProvisioningState(property.Value.GetString()); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new EdgeOrderItemAddressProperties(shippingAddress, contactDetails, addressValidationStatus, serializedAdditionalRawData); + return new EdgeOrderItemAddressProperties( + addressClassification, + shippingAddress, + contactDetails, + addressValidationStatus, + provisioningState, + serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemAddressProperties.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemAddressProperties.cs index f9e9ec1937e3..3184f983634f 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemAddressProperties.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemAddressProperties.cs @@ -46,38 +46,36 @@ public partial class EdgeOrderItemAddressProperties private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Contact details for the address. - /// is null. - public EdgeOrderItemAddressProperties(EdgeOrderAddressContactDetails contactDetails) + public EdgeOrderItemAddressProperties() { - Argument.AssertNotNull(contactDetails, nameof(contactDetails)); - - ContactDetails = contactDetails; } /// Initializes a new instance of . + /// Type of address based on its usage context. /// Shipping details for the address. /// Contact details for the address. /// Status of address validation. + /// Provisioning state. /// Keeps track of any properties unknown to the library. - internal EdgeOrderItemAddressProperties(EdgeOrderShippingAddress shippingAddress, EdgeOrderAddressContactDetails contactDetails, EdgeOrderAddressValidationStatus? addressValidationStatus, IDictionary serializedAdditionalRawData) + internal EdgeOrderItemAddressProperties(EdgeOrderAddressClassification? addressClassification, EdgeOrderShippingAddress shippingAddress, EdgeOrderAddressContactDetails contactDetails, EdgeOrderAddressValidationStatus? addressValidationStatus, EdgeOrderProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) { + AddressClassification = addressClassification; ShippingAddress = shippingAddress; ContactDetails = contactDetails; AddressValidationStatus = addressValidationStatus; + ProvisioningState = provisioningState; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal EdgeOrderItemAddressProperties() - { - } - + /// Type of address based on its usage context. + public EdgeOrderAddressClassification? AddressClassification { get; set; } /// Shipping details for the address. public EdgeOrderShippingAddress ShippingAddress { get; set; } /// Contact details for the address. public EdgeOrderAddressContactDetails ContactDetails { get; set; } /// Status of address validation. public EdgeOrderAddressValidationStatus? AddressValidationStatus { get; } + /// Provisioning state. + public EdgeOrderProvisioningState? ProvisioningState { get; } } } diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemDetails.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemDetails.Serialization.cs index ec1e4a73d982..2281ea1f83f5 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemDetails.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemDetails.Serialization.cs @@ -39,6 +39,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteObjectValue(ProductDetails, options); writer.WritePropertyName("orderItemType"u8); writer.WriteStringValue(OrderItemType.ToString()); + if (Optional.IsDefined(OrderItemMode)) + { + writer.WritePropertyName("orderItemMode"u8); + writer.WriteStringValue(OrderItemMode.Value.ToString()); + } + if (Optional.IsDefined(SiteDetails)) + { + writer.WritePropertyName("siteDetails"u8); + writer.WriteObjectValue(SiteDetails, options); + } if (options.Format != "W" && Optional.IsDefined(CurrentStage)) { writer.WritePropertyName("currentStage"u8); @@ -104,11 +114,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("returnStatus"u8); writer.WriteStringValue(ReturnStatus.Value.ToString()); } - if (options.Format != "W" && Optional.IsDefined(FirstOrDefaultManagement)) - { - writer.WritePropertyName("managementRpDetails"u8); - writer.WriteObjectValue(FirstOrDefaultManagement, options); - } if (options.Format != "W" && Optional.IsCollectionDefined(ManagementRPDetailsList)) { writer.WritePropertyName("managementRpDetailsList"u8); @@ -124,6 +129,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("error"u8); ((IJsonModel)Error).Write(writer, options); } + if (options.Format != "W" && Optional.IsDefined(FirstOrDefaultManagement)) + { + writer.WritePropertyName("managementRpDetails"u8); + writer.WriteObjectValue(FirstOrDefaultManagement, options); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -163,6 +173,8 @@ internal static EdgeOrderItemDetails DeserializeEdgeOrderItemDetails(JsonElement } ProductDetails productDetails = default; OrderItemType orderItemType = default; + EdgeOrderItemMode? orderItemMode = default; + SiteDetails siteDetails = default; EdgeOrderStageDetails currentStage = default; IReadOnlyList orderItemStageHistory = default; OrderItemPreferences preferences = default; @@ -174,9 +186,9 @@ internal static EdgeOrderItemDetails DeserializeEdgeOrderItemDetails(JsonElement EdgeOrderActionStatus? deletionStatus = default; string returnReason = default; OrderItemReturnStatus? returnStatus = default; - ResourceProviderDetails managementRPDetails = default; - IReadOnlyList managementRPDetailsList = default; + IReadOnlyList managementRpDetailsList = default; ResponseError error = default; + ResourceProviderDetails managementRpDetails = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -191,6 +203,24 @@ internal static EdgeOrderItemDetails DeserializeEdgeOrderItemDetails(JsonElement orderItemType = new OrderItemType(property.Value.GetString()); continue; } + if (property.NameEquals("orderItemMode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + orderItemMode = new EdgeOrderItemMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("siteDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + siteDetails = SiteDetails.DeserializeSiteDetails(property.Value, options); + continue; + } if (property.NameEquals("currentStage"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -292,15 +322,6 @@ internal static EdgeOrderItemDetails DeserializeEdgeOrderItemDetails(JsonElement returnStatus = new OrderItemReturnStatus(property.Value.GetString()); continue; } - if (property.NameEquals("managementRpDetails"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - managementRPDetails = ResourceProviderDetails.DeserializeResourceProviderDetails(property.Value, options); - continue; - } if (property.NameEquals("managementRpDetailsList"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -312,7 +333,7 @@ internal static EdgeOrderItemDetails DeserializeEdgeOrderItemDetails(JsonElement { array.Add(ResourceProviderDetails.DeserializeResourceProviderDetails(item, options)); } - managementRPDetailsList = array; + managementRpDetailsList = array; continue; } if (property.NameEquals("error"u8)) @@ -324,6 +345,15 @@ internal static EdgeOrderItemDetails DeserializeEdgeOrderItemDetails(JsonElement error = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), options, AzureResourceManagerEdgeOrderContext.Default); continue; } + if (property.NameEquals("managementRpDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + managementRpDetails = ResourceProviderDetails.DeserializeResourceProviderDetails(property.Value, options); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -333,6 +363,8 @@ internal static EdgeOrderItemDetails DeserializeEdgeOrderItemDetails(JsonElement return new EdgeOrderItemDetails( productDetails, orderItemType, + orderItemMode, + siteDetails, currentStage, orderItemStageHistory ?? new ChangeTrackingList(), preferences, @@ -344,9 +376,9 @@ internal static EdgeOrderItemDetails DeserializeEdgeOrderItemDetails(JsonElement deletionStatus, returnReason, returnStatus, - managementRPDetails, - managementRPDetailsList ?? new ChangeTrackingList(), + managementRpDetailsList ?? new ChangeTrackingList(), error, + managementRpDetails, serializedAdditionalRawData); } diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemDetails.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemDetails.cs index 41bcbf903f5b..37f6f4e39cbb 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemDetails.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemDetails.cs @@ -46,7 +46,7 @@ public partial class EdgeOrderItemDetails private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Unique identifier for configuration. + /// Represents product details. /// Order item type. /// is null. public EdgeOrderItemDetails(ProductDetails productDetails, OrderItemType orderItemType) @@ -61,8 +61,10 @@ public EdgeOrderItemDetails(ProductDetails productDetails, OrderItemType orderIt } /// Initializes a new instance of . - /// Unique identifier for configuration. + /// Represents product details. /// Order item type. + /// Defines the mode of the Order item. + /// Site Related Details. /// Current Order item Status. /// Order item status history. /// Customer notification Preferences. @@ -74,14 +76,16 @@ public EdgeOrderItemDetails(ProductDetails productDetails, OrderItemType orderIt /// Describes whether the order item is deletable or not. /// Return reason. /// Describes whether the order item is returnable or not. - /// Parent RP details - this returns only the first or default parent RP from the entire list. /// List of parent RP details supported for configuration. /// Top level error for the job. + /// /// Keeps track of any properties unknown to the library. - internal EdgeOrderItemDetails(ProductDetails productDetails, OrderItemType orderItemType, EdgeOrderStageDetails currentStage, IReadOnlyList orderItemStageHistory, OrderItemPreferences preferences, ForwardShippingDetails forwardShippingDetails, ReverseShippingDetails reverseShippingDetails, IList notificationEmailList, string cancellationReason, OrderItemCancellationStatus? cancellationStatus, EdgeOrderActionStatus? deletionStatus, string returnReason, OrderItemReturnStatus? returnStatus, ResourceProviderDetails firstOrDefaultManagement, IReadOnlyList managementRPDetailsList, ResponseError error, IDictionary serializedAdditionalRawData) + internal EdgeOrderItemDetails(ProductDetails productDetails, OrderItemType orderItemType, EdgeOrderItemMode? orderItemMode, SiteDetails siteDetails, EdgeOrderStageDetails currentStage, IReadOnlyList orderItemStageHistory, OrderItemPreferences preferences, ForwardShippingDetails forwardShippingDetails, ReverseShippingDetails reverseShippingDetails, IList notificationEmailList, string cancellationReason, OrderItemCancellationStatus? cancellationStatus, EdgeOrderActionStatus? deletionStatus, string returnReason, OrderItemReturnStatus? returnStatus, IReadOnlyList managementRPDetailsList, ResponseError error, ResourceProviderDetails firstOrDefaultManagement, IDictionary serializedAdditionalRawData) { ProductDetails = productDetails; OrderItemType = orderItemType; + OrderItemMode = orderItemMode; + SiteDetails = siteDetails; CurrentStage = currentStage; OrderItemStageHistory = orderItemStageHistory; Preferences = preferences; @@ -93,9 +97,9 @@ internal EdgeOrderItemDetails(ProductDetails productDetails, OrderItemType order DeletionStatus = deletionStatus; ReturnReason = returnReason; ReturnStatus = returnStatus; - FirstOrDefaultManagement = firstOrDefaultManagement; ManagementRPDetailsList = managementRPDetailsList; Error = error; + FirstOrDefaultManagement = firstOrDefaultManagement; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -104,10 +108,21 @@ internal EdgeOrderItemDetails() { } - /// Unique identifier for configuration. + /// Represents product details. public ProductDetails ProductDetails { get; set; } /// Order item type. public OrderItemType OrderItemType { get; set; } + /// Defines the mode of the Order item. + public EdgeOrderItemMode? OrderItemMode { get; set; } + /// Site Related Details. + internal SiteDetails SiteDetails { get; set; } + /// Unique Id, Identifying A Site. + public string SiteId + { + get => SiteDetails is null ? default : SiteDetails.SiteId; + set => SiteDetails = new SiteDetails(value); + } + /// Current Order item Status. public EdgeOrderStageDetails CurrentStage { get; } /// Order item status history. @@ -130,14 +145,6 @@ internal EdgeOrderItemDetails() public string ReturnReason { get; } /// Describes whether the order item is returnable or not. public OrderItemReturnStatus? ReturnStatus { get; } - /// Parent RP details - this returns only the first or default parent RP from the entire list. - internal ResourceProviderDetails FirstOrDefaultManagement { get; } - /// Resource provider namespace. - public string FirstOrDefaultManagementResourceProviderNamespace - { - get => FirstOrDefaultManagement?.ResourceProviderNamespace; - } - /// List of parent RP details supported for configuration. public IReadOnlyList ManagementRPDetailsList { get; } /// Top level error for the job. diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemDetailsPatch.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemDetailsPatch.Serialization.cs new file mode 100644 index 000000000000..6a114beeb475 --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemDetailsPatch.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.EdgeOrder.Models +{ + public partial class EdgeOrderItemDetailsPatch : 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(EdgeOrderItemDetailsPatch)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ProductDetails)) + { + writer.WritePropertyName("productDetails"u8); + writer.WriteObjectValue(ProductDetails, options); + } + if (Optional.IsDefined(SiteDetails)) + { + writer.WritePropertyName("siteDetails"u8); + writer.WriteObjectValue(SiteDetails, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + EdgeOrderItemDetailsPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EdgeOrderItemDetailsPatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeOrderItemDetailsPatch(document.RootElement, options); + } + + internal static EdgeOrderItemDetailsPatch DeserializeEdgeOrderItemDetailsPatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ProductDetailsUpdateParameter productDetails = default; + SiteDetails siteDetails = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("productDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + productDetails = ProductDetailsUpdateParameter.DeserializeProductDetailsUpdateParameter(property.Value, options); + continue; + } + if (property.NameEquals("siteDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + siteDetails = SiteDetails.DeserializeSiteDetails(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeOrderItemDetailsPatch(productDetails, siteDetails, 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, AzureResourceManagerEdgeOrderContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeOrderItemDetailsPatch)} does not support writing '{options.Format}' format."); + } + } + + EdgeOrderItemDetailsPatch IPersistableModel.Create(BinaryData 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 DeserializeEdgeOrderItemDetailsPatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeOrderItemDetailsPatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemDetailsPatch.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemDetailsPatch.cs new file mode 100644 index 000000000000..ff728741bdc3 --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemDetailsPatch.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.EdgeOrder.Models +{ + /// Order item details Patchable Properties. + public partial class EdgeOrderItemDetailsPatch + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public EdgeOrderItemDetailsPatch() + { + } + + /// Initializes a new instance of . + /// Represents product details. + /// Site Related Details. + /// Keeps track of any properties unknown to the library. + internal EdgeOrderItemDetailsPatch(ProductDetailsUpdateParameter productDetails, SiteDetails siteDetails, IDictionary serializedAdditionalRawData) + { + ProductDetails = productDetails; + SiteDetails = siteDetails; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Represents product details. + internal ProductDetailsUpdateParameter ProductDetails { get; set; } + /// Device Provisioning Details for Parent. + public EdgeOrderProvisioningDetails ParentProvisioningDetails + { + get => ProductDetails is null ? default : ProductDetails.ParentProvisioningDetails; + set + { + if (ProductDetails is null) + ProductDetails = new ProductDetailsUpdateParameter(); + ProductDetails.ParentProvisioningDetails = value; + } + } + + /// Site Related Details. + internal SiteDetails SiteDetails { get; set; } + /// Unique Id, Identifying A Site. + public string SiteId + { + get => SiteDetails is null ? default : SiteDetails.SiteId; + set => SiteDetails = new SiteDetails(value); + } + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemMode.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemMode.cs new file mode 100644 index 000000000000..118396dcd7e8 --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemMode.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.EdgeOrder.Models +{ + /// Defines the mode of the Order item. + public readonly partial struct EdgeOrderItemMode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public EdgeOrderItemMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DefaultValue = "Default"; + private const string DoNotFulfillValue = "DoNotFulfill"; + + /// Default Order mode. + public static EdgeOrderItemMode Default { get; } = new EdgeOrderItemMode(DefaultValue); + /// Mode in which the Order will not be fulfilled. + public static EdgeOrderItemMode DoNotFulfill { get; } = new EdgeOrderItemMode(DoNotFulfillValue); + /// Determines if two values are the same. + public static bool operator ==(EdgeOrderItemMode left, EdgeOrderItemMode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(EdgeOrderItemMode left, EdgeOrderItemMode right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator EdgeOrderItemMode(string value) => new EdgeOrderItemMode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is EdgeOrderItemMode other && Equals(other); + /// + public bool Equals(EdgeOrderItemMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemPatch.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemPatch.Serialization.cs index b5c6a8258c8f..98a82d740947 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemPatch.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemPatch.Serialization.cs @@ -8,8 +8,10 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; +using Azure.ResourceManager.Models; namespace Azure.ResourceManager.EdgeOrder.Models { @@ -45,6 +47,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndObject(); } + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + ((IJsonModel)Identity).Write(writer, options); + } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(ForwardAddress)) @@ -67,6 +74,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } + if (Optional.IsDefined(OrderItemDetails)) + { + writer.WritePropertyName("orderItemDetails"u8); + writer.WriteObjectValue(OrderItemDetails, options); + } writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -106,9 +118,11 @@ internal static EdgeOrderItemPatch DeserializeEdgeOrderItemPatch(JsonElement ele return null; } IDictionary tags = default; + ManagedServiceIdentity identity = default; EdgeOrderItemAddressProperties forwardAddress = default; OrderItemPreferences preferences = default; IList notificationEmailList = default; + EdgeOrderItemDetailsPatch orderItemDetails = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -127,6 +141,15 @@ internal static EdgeOrderItemPatch DeserializeEdgeOrderItemPatch(JsonElement ele tags = dictionary; continue; } + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + identity = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), options, AzureResourceManagerEdgeOrderContext.Default); + continue; + } if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -168,6 +191,15 @@ internal static EdgeOrderItemPatch DeserializeEdgeOrderItemPatch(JsonElement ele notificationEmailList = array; continue; } + if (property0.NameEquals("orderItemDetails"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + orderItemDetails = EdgeOrderItemDetailsPatch.DeserializeEdgeOrderItemDetailsPatch(property0.Value, options); + continue; + } } continue; } @@ -177,7 +209,14 @@ internal static EdgeOrderItemPatch DeserializeEdgeOrderItemPatch(JsonElement ele } } serializedAdditionalRawData = rawDataDictionary; - return new EdgeOrderItemPatch(tags ?? new ChangeTrackingDictionary(), forwardAddress, preferences, notificationEmailList ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new EdgeOrderItemPatch( + forwardAddress, + preferences, + notificationEmailList ?? new ChangeTrackingList(), + orderItemDetails, + tags ?? new ChangeTrackingDictionary(), + identity, + serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemPatch.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemPatch.cs index 810b62b5a0e0..5ea7b7c39992 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemPatch.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemPatch.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using Azure.ResourceManager.Models; namespace Azure.ResourceManager.EdgeOrder.Models { @@ -48,32 +49,40 @@ public partial class EdgeOrderItemPatch /// Initializes a new instance of . public EdgeOrderItemPatch() { - Tags = new ChangeTrackingDictionary(); NotificationEmailList = new ChangeTrackingList(); + Tags = new ChangeTrackingDictionary(); } /// Initializes a new instance of . - /// The list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). /// Updates forward shipping address and contact details. /// Customer preference. /// Additional notification email list. + /// Represents order item details. + /// The list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). + /// Msi identity of the resource. /// Keeps track of any properties unknown to the library. - internal EdgeOrderItemPatch(IDictionary tags, EdgeOrderItemAddressProperties forwardAddress, OrderItemPreferences preferences, IList notificationEmailList, IDictionary serializedAdditionalRawData) + internal EdgeOrderItemPatch(EdgeOrderItemAddressProperties forwardAddress, OrderItemPreferences preferences, IList notificationEmailList, EdgeOrderItemDetailsPatch orderItemDetails, IDictionary tags, ManagedServiceIdentity identity, IDictionary serializedAdditionalRawData) { - Tags = tags; ForwardAddress = forwardAddress; Preferences = preferences; NotificationEmailList = notificationEmailList; + OrderItemDetails = orderItemDetails; + Tags = tags; + Identity = identity; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). - public IDictionary Tags { get; } /// Updates forward shipping address and contact details. public EdgeOrderItemAddressProperties ForwardAddress { get; set; } /// Customer preference. public OrderItemPreferences Preferences { get; set; } /// Additional notification email list. public IList NotificationEmailList { get; } + /// Represents order item details. + public EdgeOrderItemDetailsPatch OrderItemDetails { get; set; } + /// The list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). + public IDictionary Tags { get; } + /// Msi identity of the resource. + public ManagedServiceIdentity Identity { get; set; } } } diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemReturnContent.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemReturnContent.cs index 2a3c1a313504..53bd755204e9 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemReturnContent.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderItemReturnContent.cs @@ -56,7 +56,7 @@ public EdgeOrderItemReturnContent(string returnReason) } /// Initializes a new instance of . - /// customer return address. + /// Customer return address. /// Return Reason. /// Service tag (located on the bottom-right corner of the device). /// Shipping Box required. @@ -75,7 +75,7 @@ internal EdgeOrderItemReturnContent() { } - /// customer return address. + /// Customer return address. public EdgeOrderItemAddressProperties ReturnAddress { get; set; } /// Return Reason. public string ReturnReason { get; } diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProduct.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProduct.Serialization.cs index 4fd56b15b876..0eb14097ca94 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProduct.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProduct.Serialization.cs @@ -36,6 +36,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("properties"u8); writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsCollectionDefined(Configurations)) + { + writer.WritePropertyName("configurations"u8); + writer.WriteStartArray(); + foreach (var item in Configurations) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } if (options.Format != "W" && Optional.IsDefined(DisplayName)) { writer.WritePropertyName("displayName"u8); @@ -44,7 +54,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (options.Format != "W" && Optional.IsDefined(Description)) { writer.WritePropertyName("description"u8); - writer.WriteObjectValue(Description, options); + writer.WriteObjectValue(Description, options); } if (options.Format != "W" && Optional.IsCollectionDefined(ImageInformation)) { @@ -52,24 +62,24 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStartArray(); foreach (var item in ImageInformation) { - writer.WriteObjectValue(item, options); + writer.WriteObjectValue(item, options); } writer.WriteEndArray(); } if (options.Format != "W" && Optional.IsDefined(CostInformation)) { writer.WritePropertyName("costInformation"u8); - writer.WriteObjectValue(CostInformation, options); + writer.WriteObjectValue(CostInformation, options); } if (options.Format != "W" && Optional.IsDefined(AvailabilityInformation)) { writer.WritePropertyName("availabilityInformation"u8); - writer.WriteObjectValue(AvailabilityInformation, options); + writer.WriteObjectValue(AvailabilityInformation, options); } if (options.Format != "W" && Optional.IsDefined(HierarchyInformation)) { writer.WritePropertyName("hierarchyInformation"u8); - writer.WriteObjectValue(HierarchyInformation, options); + writer.WriteObjectValue(HierarchyInformation, options); } if (options.Format != "W" && Optional.IsCollectionDefined(FilterableProperties)) { @@ -77,17 +87,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStartArray(); foreach (var item in FilterableProperties) { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (options.Format != "W" && Optional.IsCollectionDefined(Configurations)) - { - writer.WritePropertyName("configurations"u8); - writer.WriteStartArray(); - foreach (var item in Configurations) - { - writer.WriteObjectValue(item, options); + writer.WriteObjectValue(item, options); } writer.WriteEndArray(); } @@ -129,6 +129,7 @@ internal static EdgeOrderProduct DeserializeEdgeOrderProduct(JsonElement element { return null; } + IReadOnlyList configurations = default; string displayName = default; ProductDescription description = default; IReadOnlyList imageInformation = default; @@ -136,7 +137,6 @@ internal static EdgeOrderProduct DeserializeEdgeOrderProduct(JsonElement element ProductAvailabilityInformation availabilityInformation = default; HierarchyInformation hierarchyInformation = default; IReadOnlyList filterableProperties = default; - IReadOnlyList configurations = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -150,6 +150,20 @@ internal static EdgeOrderProduct DeserializeEdgeOrderProduct(JsonElement element } foreach (var property0 in property.Value.EnumerateObject()) { + if (property0.NameEquals("configurations"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(ProductConfiguration.DeserializeProductConfiguration(item, options)); + } + configurations = array; + continue; + } if (property0.NameEquals("displayName"u8)) { displayName = property0.Value.GetString(); @@ -202,7 +216,7 @@ internal static EdgeOrderProduct DeserializeEdgeOrderProduct(JsonElement element { continue; } - hierarchyInformation = HierarchyInformation.DeserializeHierarchyInformation(property0.Value, options); + hierarchyInformation = Models.HierarchyInformation.DeserializeHierarchyInformation(property0.Value, options); continue; } if (property0.NameEquals("filterableProperties"u8)) @@ -219,20 +233,6 @@ internal static EdgeOrderProduct DeserializeEdgeOrderProduct(JsonElement element filterableProperties = array; continue; } - if (property0.NameEquals("configurations"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(ProductConfiguration.DeserializeProductConfiguration(item, options)); - } - configurations = array; - continue; - } } continue; } @@ -243,6 +243,7 @@ internal static EdgeOrderProduct DeserializeEdgeOrderProduct(JsonElement element } serializedAdditionalRawData = rawDataDictionary; return new EdgeOrderProduct( + configurations ?? new ChangeTrackingList(), displayName, description, imageInformation ?? new ChangeTrackingList(), @@ -250,7 +251,6 @@ internal static EdgeOrderProduct DeserializeEdgeOrderProduct(JsonElement element availabilityInformation, hierarchyInformation, filterableProperties ?? new ChangeTrackingList(), - configurations ?? new ChangeTrackingList(), serializedAdditionalRawData); } diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProduct.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProduct.cs index 405be06e85c6..342ad5fab1fc 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProduct.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProduct.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.EdgeOrder.Models { - /// List of Products. + /// Represents a product. public partial class EdgeOrderProduct { /// @@ -48,23 +48,24 @@ public partial class EdgeOrderProduct /// Initializes a new instance of . internal EdgeOrderProduct() { + Configurations = new ChangeTrackingList(); ImageInformation = new ChangeTrackingList(); FilterableProperties = new ChangeTrackingList(); - Configurations = new ChangeTrackingList(); } /// Initializes a new instance of . - /// Display Name for the product system. - /// Description related to the product system. - /// Image information for the product system. - /// Cost information for the product system. - /// Availability information of the product system. - /// Hierarchy information of a product. - /// list of filters supported for a product. /// List of configurations for the product. + /// + /// + /// + /// + /// + /// + /// /// Keeps track of any properties unknown to the library. - internal EdgeOrderProduct(string displayName, ProductDescription description, IReadOnlyList imageInformation, EdgeOrderProductCostInformation costInformation, ProductAvailabilityInformation availabilityInformation, HierarchyInformation hierarchyInformation, IReadOnlyList filterableProperties, IReadOnlyList configurations, IDictionary serializedAdditionalRawData) + internal EdgeOrderProduct(IReadOnlyList configurations, string displayName, ProductDescription description, IReadOnlyList imageInformation, EdgeOrderProductCostInformation costInformation, ProductAvailabilityInformation availabilityInformation, HierarchyInformation hierarchyInformation, IReadOnlyList filterableProperties, IDictionary serializedAdditionalRawData) { + Configurations = configurations; DisplayName = displayName; Description = description; ImageInformation = imageInformation; @@ -72,24 +73,9 @@ internal EdgeOrderProduct(string displayName, ProductDescription description, IR AvailabilityInformation = availabilityInformation; HierarchyInformation = hierarchyInformation; FilterableProperties = filterableProperties; - Configurations = configurations; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Display Name for the product system. - public string DisplayName { get; } - /// Description related to the product system. - public ProductDescription Description { get; } - /// Image information for the product system. - public IReadOnlyList ImageInformation { get; } - /// Cost information for the product system. - public EdgeOrderProductCostInformation CostInformation { get; } - /// Availability information of the product system. - public ProductAvailabilityInformation AvailabilityInformation { get; } - /// Hierarchy information of a product. - public HierarchyInformation HierarchyInformation { get; } - /// list of filters supported for a product. - public IReadOnlyList FilterableProperties { get; } /// List of configurations for the product. public IReadOnlyList Configurations { get; } } diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductBillingMeterDetails.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductBillingMeterDetails.Serialization.cs index 5afcde946c8a..78ea5dc80191 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductBillingMeterDetails.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductBillingMeterDetails.Serialization.cs @@ -54,6 +54,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("frequency"u8); writer.WriteStringValue(Frequency); } + if (options.Format != "W" && Optional.IsDefined(TermTypeDetails)) + { + writer.WritePropertyName("termTypeDetails"u8); + writer.WriteObjectValue(TermTypeDetails, options); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -95,6 +100,7 @@ internal static EdgeOrderProductBillingMeterDetails DeserializeEdgeOrderProductB EdgeOrderProductMeterDetails meterDetails = default; EdgeOrderProductMeteringType? meteringType = default; string frequency = default; + TermTypeDetails termTypeDetails = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -127,13 +133,28 @@ internal static EdgeOrderProductBillingMeterDetails DeserializeEdgeOrderProductB frequency = property.Value.GetString(); continue; } + if (property.NameEquals("termTypeDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + termTypeDetails = TermTypeDetails.DeserializeTermTypeDetails(property.Value, options); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new EdgeOrderProductBillingMeterDetails(name, meterDetails, meteringType, frequency, serializedAdditionalRawData); + return new EdgeOrderProductBillingMeterDetails( + name, + meterDetails, + meteringType, + frequency, + termTypeDetails, + serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductBillingMeterDetails.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductBillingMeterDetails.cs index 07fcb56663f3..5888c3d9cc79 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductBillingMeterDetails.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductBillingMeterDetails.cs @@ -53,26 +53,28 @@ internal EdgeOrderProductBillingMeterDetails() /// Initializes a new instance of . /// Represents Billing type name. /// - /// Represents MeterDetails + /// Represents MeterDetails. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include and . /// /// Represents Metering type (eg one-time or recurrent). /// Frequency of recurrence. + /// Represent Term Type details. /// Keeps track of any properties unknown to the library. - internal EdgeOrderProductBillingMeterDetails(string name, EdgeOrderProductMeterDetails meterDetails, EdgeOrderProductMeteringType? meteringType, string frequency, IDictionary serializedAdditionalRawData) + internal EdgeOrderProductBillingMeterDetails(string name, EdgeOrderProductMeterDetails meterDetails, EdgeOrderProductMeteringType? meteringType, string frequency, TermTypeDetails termTypeDetails, IDictionary serializedAdditionalRawData) { Name = name; MeterDetails = meterDetails; MeteringType = meteringType; Frequency = frequency; + TermTypeDetails = termTypeDetails; _serializedAdditionalRawData = serializedAdditionalRawData; } /// Represents Billing type name. public string Name { get; } /// - /// Represents MeterDetails + /// Represents MeterDetails. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include and . /// @@ -81,5 +83,7 @@ internal EdgeOrderProductBillingMeterDetails(string name, EdgeOrderProductMeterD public EdgeOrderProductMeteringType? MeteringType { get; } /// Frequency of recurrence. public string Frequency { get; } + /// Represent Term Type details. + public TermTypeDetails TermTypeDetails { get; } } } diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductDeviceDetails.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductDeviceDetails.Serialization.cs index fc2ab6804caf..64cf855bb0b2 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductDeviceDetails.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductDeviceDetails.Serialization.cs @@ -39,6 +39,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("serialNumber"u8); writer.WriteStringValue(SerialNumber); } + if (options.Format != "W" && Optional.IsDefined(DisplaySerialNumber)) + { + writer.WritePropertyName("displaySerialNumber"u8); + writer.WriteStringValue(DisplaySerialNumber); + } if (options.Format != "W" && Optional.IsDefined(ManagementResourceId)) { writer.WritePropertyName("managementResourceId"u8); @@ -49,6 +54,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("managementResourceTenantId"u8); writer.WriteStringValue(ManagementResourceTenantId); } + if (options.Format != "W" && Optional.IsDefined(ProvisioningSupport)) + { + writer.WritePropertyName("provisioningSupport"u8); + writer.WriteStringValue(ProvisioningSupport.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningDetails)) + { + writer.WritePropertyName("provisioningDetails"u8); + writer.WriteObjectValue(ProvisioningDetails, options); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -87,8 +102,11 @@ internal static EdgeOrderProductDeviceDetails DeserializeEdgeOrderProductDeviceD return null; } string serialNumber = default; + string displaySerialNumber = default; string managementResourceId = default; string managementResourceTenantId = default; + EdgeOrderProvisioningSupport? provisioningSupport = default; + EdgeOrderProvisioningDetails provisioningDetails = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -98,6 +116,11 @@ internal static EdgeOrderProductDeviceDetails DeserializeEdgeOrderProductDeviceD serialNumber = property.Value.GetString(); continue; } + if (property.NameEquals("displaySerialNumber"u8)) + { + displaySerialNumber = property.Value.GetString(); + continue; + } if (property.NameEquals("managementResourceId"u8)) { managementResourceId = property.Value.GetString(); @@ -108,13 +131,38 @@ internal static EdgeOrderProductDeviceDetails DeserializeEdgeOrderProductDeviceD managementResourceTenantId = property.Value.GetString(); continue; } + if (property.NameEquals("provisioningSupport"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningSupport = new EdgeOrderProvisioningSupport(property.Value.GetString()); + continue; + } + if (property.NameEquals("provisioningDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningDetails = EdgeOrderProvisioningDetails.DeserializeEdgeOrderProvisioningDetails(property.Value, options); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new EdgeOrderProductDeviceDetails(serialNumber, managementResourceId, managementResourceTenantId, serializedAdditionalRawData); + return new EdgeOrderProductDeviceDetails( + serialNumber, + displaySerialNumber, + managementResourceId, + managementResourceTenantId, + provisioningSupport, + provisioningDetails, + serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductDeviceDetails.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductDeviceDetails.cs index c9697148c4e7..b44dbe25c81f 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductDeviceDetails.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductDeviceDetails.cs @@ -51,23 +51,35 @@ internal EdgeOrderProductDeviceDetails() } /// Initializes a new instance of . - /// device serial number. + /// Device serial number. + /// Device serial number to be displayed. /// Management Resource Id. /// Management Resource Tenant ID. + /// Determining nature of provisioning that the configuration supports. + /// Provisioning Details for the device. /// Keeps track of any properties unknown to the library. - internal EdgeOrderProductDeviceDetails(string serialNumber, string managementResourceId, string managementResourceTenantId, IDictionary serializedAdditionalRawData) + internal EdgeOrderProductDeviceDetails(string serialNumber, string displaySerialNumber, string managementResourceId, string managementResourceTenantId, EdgeOrderProvisioningSupport? provisioningSupport, EdgeOrderProvisioningDetails provisioningDetails, IDictionary serializedAdditionalRawData) { SerialNumber = serialNumber; + DisplaySerialNumber = displaySerialNumber; ManagementResourceId = managementResourceId; ManagementResourceTenantId = managementResourceTenantId; + ProvisioningSupport = provisioningSupport; + ProvisioningDetails = provisioningDetails; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// device serial number. + /// Device serial number. public string SerialNumber { get; } + /// Device serial number to be displayed. + public string DisplaySerialNumber { get; } /// Management Resource Id. public string ManagementResourceId { get; } /// Management Resource Tenant ID. public string ManagementResourceTenantId { get; } + /// Determining nature of provisioning that the configuration supports. + public EdgeOrderProvisioningSupport? ProvisioningSupport { get; } + /// Provisioning Details for the device. + public EdgeOrderProvisioningDetails ProvisioningDetails { get; } } } diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductMeterDetails.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductMeterDetails.cs index 0259f56624b0..630bbe7783e8 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductMeterDetails.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProductMeterDetails.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.EdgeOrder.Models { /// - /// Holds details about billing type and its meter guids + /// Holds details about billing type and its meter guids. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include and . /// diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProvisioningDetails.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProvisioningDetails.Serialization.cs new file mode 100644 index 000000000000..7b9eeb0fbbc8 --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProvisioningDetails.Serialization.cs @@ -0,0 +1,263 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.EdgeOrder.Models +{ + public partial class EdgeOrderProvisioningDetails : 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(EdgeOrderProvisioningDetails)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Quantity)) + { + writer.WritePropertyName("quantity"u8); + writer.WriteNumberValue(Quantity.Value); + } + if (Optional.IsDefined(ProvisioningArmId)) + { + writer.WritePropertyName("provisioningArmId"u8); + writer.WriteStringValue(ProvisioningArmId); + } + if (Optional.IsDefined(ProvisioningEndPoint)) + { + writer.WritePropertyName("provisioningEndPoint"u8); + writer.WriteStringValue(ProvisioningEndPoint); + } + if (Optional.IsDefined(SerialNumber)) + { + writer.WritePropertyName("serialNumber"u8); + writer.WriteStringValue(SerialNumber); + } + if (Optional.IsDefined(VendorName)) + { + writer.WritePropertyName("vendorName"u8); + writer.WriteStringValue(VendorName); + } + if (Optional.IsDefined(ReadyToConnectArmId)) + { + writer.WritePropertyName("readyToConnectArmId"u8); + writer.WriteStringValue(ReadyToConnectArmId); + } + if (Optional.IsDefined(ManagementResourceArmId)) + { + writer.WritePropertyName("managementResourceArmId"u8); + writer.WriteStringValue(ManagementResourceArmId); + } + if (options.Format != "W" && Optional.IsDefined(UniqueDeviceIdentifier)) + { + writer.WritePropertyName("uniqueDeviceIdentifier"u8); + writer.WriteStringValue(UniqueDeviceIdentifier); + } + if (Optional.IsDefined(AutoProvisioningStatus)) + { + writer.WritePropertyName("autoProvisioningStatus"u8); + writer.WriteStringValue(AutoProvisioningStatus.Value.ToString()); + } + if (Optional.IsDefined(DevicePresenceVerification)) + { + writer.WritePropertyName("devicePresenceVerification"u8); + writer.WriteObjectValue(DevicePresenceVerification, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + EdgeOrderProvisioningDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EdgeOrderProvisioningDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeOrderProvisioningDetails(document.RootElement, options); + } + + internal static EdgeOrderProvisioningDetails DeserializeEdgeOrderProvisioningDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? quantity = default; + ResourceIdentifier provisioningArmId = default; + string provisioningEndPoint = default; + string serialNumber = default; + string vendorName = default; + ResourceIdentifier readyToConnectArmId = default; + ResourceIdentifier managementResourceArmId = default; + string uniqueDeviceIdentifier = default; + EdgeOrderAutoProvisioningStatus? autoProvisioningStatus = default; + DevicePresenceVerificationDetails devicePresenceVerification = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("quantity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + quantity = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("provisioningArmId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningArmId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("provisioningEndPoint"u8)) + { + provisioningEndPoint = property.Value.GetString(); + continue; + } + if (property.NameEquals("serialNumber"u8)) + { + serialNumber = property.Value.GetString(); + continue; + } + if (property.NameEquals("vendorName"u8)) + { + vendorName = property.Value.GetString(); + continue; + } + if (property.NameEquals("readyToConnectArmId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + readyToConnectArmId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("managementResourceArmId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + managementResourceArmId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("uniqueDeviceIdentifier"u8)) + { + uniqueDeviceIdentifier = property.Value.GetString(); + continue; + } + if (property.NameEquals("autoProvisioningStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + autoProvisioningStatus = new EdgeOrderAutoProvisioningStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("devicePresenceVerification"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + devicePresenceVerification = DevicePresenceVerificationDetails.DeserializeDevicePresenceVerificationDetails(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeOrderProvisioningDetails( + quantity, + provisioningArmId, + provisioningEndPoint, + serialNumber, + vendorName, + readyToConnectArmId, + managementResourceArmId, + uniqueDeviceIdentifier, + autoProvisioningStatus, + devicePresenceVerification, + 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, AzureResourceManagerEdgeOrderContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeOrderProvisioningDetails)} does not support writing '{options.Format}' format."); + } + } + + EdgeOrderProvisioningDetails IPersistableModel.Create(BinaryData 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 DeserializeEdgeOrderProvisioningDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeOrderProvisioningDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProvisioningDetails.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProvisioningDetails.cs new file mode 100644 index 000000000000..0c04830fab50 --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProvisioningDetails.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.EdgeOrder.Models +{ + /// Details Related To Provision Resource. + public partial class EdgeOrderProvisioningDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public EdgeOrderProvisioningDetails() + { + } + + /// Initializes a new instance of . + /// Quantity of the devices. + /// Provisioning Resource Arm ID. + /// Provisioning End Point. + /// Serial Number for the Device. + /// Vendor Name for the Device , (for 1P devices - Microsoft). + /// Arc Enabled Resource Arm id. + /// Management Resource ArmId. + /// Unique Identity for a Device. + /// Auto Provisioning Details. + /// Proof of possession details. + /// Keeps track of any properties unknown to the library. + internal EdgeOrderProvisioningDetails(int? quantity, ResourceIdentifier provisioningArmId, string provisioningEndPoint, string serialNumber, string vendorName, ResourceIdentifier readyToConnectArmId, ResourceIdentifier managementResourceArmId, string uniqueDeviceIdentifier, EdgeOrderAutoProvisioningStatus? autoProvisioningStatus, DevicePresenceVerificationDetails devicePresenceVerification, IDictionary serializedAdditionalRawData) + { + Quantity = quantity; + ProvisioningArmId = provisioningArmId; + ProvisioningEndPoint = provisioningEndPoint; + SerialNumber = serialNumber; + VendorName = vendorName; + ReadyToConnectArmId = readyToConnectArmId; + ManagementResourceArmId = managementResourceArmId; + UniqueDeviceIdentifier = uniqueDeviceIdentifier; + AutoProvisioningStatus = autoProvisioningStatus; + DevicePresenceVerification = devicePresenceVerification; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Quantity of the devices. + public int? Quantity { get; set; } + /// Provisioning Resource Arm ID. + public ResourceIdentifier ProvisioningArmId { get; set; } + /// Provisioning End Point. + public string ProvisioningEndPoint { get; set; } + /// Serial Number for the Device. + public string SerialNumber { get; set; } + /// Vendor Name for the Device , (for 1P devices - Microsoft). + public string VendorName { get; set; } + /// Arc Enabled Resource Arm id. + public ResourceIdentifier ReadyToConnectArmId { get; set; } + /// Management Resource ArmId. + public ResourceIdentifier ManagementResourceArmId { get; set; } + /// Unique Identity for a Device. + public string UniqueDeviceIdentifier { get; } + /// Auto Provisioning Details. + public EdgeOrderAutoProvisioningStatus? AutoProvisioningStatus { get; set; } + /// Proof of possession details. + public DevicePresenceVerificationDetails DevicePresenceVerification { get; set; } + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProvisioningState.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProvisioningState.cs new file mode 100644 index 000000000000..b268bbb514ab --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProvisioningState.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.EdgeOrder.Models +{ + /// Provisioning state. + public readonly partial struct EdgeOrderProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public EdgeOrderProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CreatingValue = "Creating"; + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; + + /// Creating state. + public static EdgeOrderProvisioningState Creating { get; } = new EdgeOrderProvisioningState(CreatingValue); + /// Succeeded state. + public static EdgeOrderProvisioningState Succeeded { get; } = new EdgeOrderProvisioningState(SucceededValue); + /// Failed state. + public static EdgeOrderProvisioningState Failed { get; } = new EdgeOrderProvisioningState(FailedValue); + /// Canceled state. + public static EdgeOrderProvisioningState Canceled { get; } = new EdgeOrderProvisioningState(CanceledValue); + /// Determines if two values are the same. + public static bool operator ==(EdgeOrderProvisioningState left, EdgeOrderProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(EdgeOrderProvisioningState left, EdgeOrderProvisioningState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator EdgeOrderProvisioningState(string value) => new EdgeOrderProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is EdgeOrderProvisioningState other && Equals(other); + /// + public bool Equals(EdgeOrderProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProvisioningSupport.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProvisioningSupport.cs new file mode 100644 index 000000000000..010216a283b2 --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderProvisioningSupport.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.EdgeOrder.Models +{ + /// Determining nature of provisioning that the configuration supports. + public readonly partial struct EdgeOrderProvisioningSupport : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public EdgeOrderProvisioningSupport(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CloudBasedValue = "CloudBased"; + private const string ManualValue = "Manual"; + + /// The configuration can be provisioned from the cloud. + public static EdgeOrderProvisioningSupport CloudBased { get; } = new EdgeOrderProvisioningSupport(CloudBasedValue); + /// The configuration need to be provisioned manually by the end user. + public static EdgeOrderProvisioningSupport Manual { get; } = new EdgeOrderProvisioningSupport(ManualValue); + /// Determines if two values are the same. + public static bool operator ==(EdgeOrderProvisioningSupport left, EdgeOrderProvisioningSupport right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(EdgeOrderProvisioningSupport left, EdgeOrderProvisioningSupport right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator EdgeOrderProvisioningSupport(string value) => new EdgeOrderProvisioningSupport(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is EdgeOrderProvisioningSupport other && Equals(other); + /// + public bool Equals(EdgeOrderProvisioningSupport other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderShippingAddress.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderShippingAddress.Serialization.cs index 84d8b99f3eb0..2ce9877f44a5 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderShippingAddress.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderShippingAddress.Serialization.cs @@ -34,8 +34,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(EdgeOrderShippingAddress)} does not support writing '{format}' format."); } - writer.WritePropertyName("streetAddress1"u8); - writer.WriteStringValue(StreetAddress1); + if (Optional.IsDefined(StreetAddress1)) + { + writer.WritePropertyName("streetAddress1"u8); + writer.WriteStringValue(StreetAddress1); + } if (Optional.IsDefined(StreetAddress2)) { writer.WritePropertyName("streetAddress2"u8); diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderShippingAddress.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderShippingAddress.cs index 23282d32e685..ec3995d94b15 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderShippingAddress.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderShippingAddress.cs @@ -46,15 +46,12 @@ public partial class EdgeOrderShippingAddress private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Street Address line 1. /// Name of the Country. - /// or is null. - public EdgeOrderShippingAddress(string streetAddress1, string country) + /// is null. + public EdgeOrderShippingAddress(string country) { - Argument.AssertNotNull(streetAddress1, nameof(streetAddress1)); Argument.AssertNotNull(country, nameof(country)); - StreetAddress1 = streetAddress1; Country = country; } diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderStageName.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderStageName.cs index ef33d91f0160..df28d08c7e6c 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderStageName.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/EdgeOrderStageName.cs @@ -28,6 +28,7 @@ public EdgeOrderStageName(string value) private const string ReadyToShipValue = "ReadyToShip"; private const string ShippedValue = "Shipped"; private const string DeliveredValue = "Delivered"; + private const string ReadyToSetupValue = "ReadyToSetup"; private const string InUseValue = "InUse"; private const string ReturnInitiatedValue = "ReturnInitiated"; private const string ReturnPickedUpValue = "ReturnPickedUp"; @@ -47,13 +48,15 @@ public EdgeOrderStageName(string value) public static EdgeOrderStageName Shipped { get; } = new EdgeOrderStageName(ShippedValue); /// Order is delivered to customer. public static EdgeOrderStageName Delivered { get; } = new EdgeOrderStageName(DeliveredValue); + /// Order is ready to get cloud connected. + public static EdgeOrderStageName ReadyToSetup { get; } = new EdgeOrderStageName(ReadyToSetupValue); /// Order is in use at customer site. public static EdgeOrderStageName InUse { get; } = new EdgeOrderStageName(InUseValue); /// Return has been initiated by customer. public static EdgeOrderStageName ReturnInitiated { get; } = new EdgeOrderStageName(ReturnInitiatedValue); - /// Order is in transit from customer to microsoft. + /// Order is in transit from customer to Microsoft. public static EdgeOrderStageName ReturnPickedUp { get; } = new EdgeOrderStageName(ReturnPickedUpValue); - /// Order has been received back to microsoft. + /// Order has been received back to Microsoft. public static EdgeOrderStageName ReturnedToMicrosoft { get; } = new EdgeOrderStageName(ReturnedToMicrosoftValue); /// Return has now completed. public static EdgeOrderStageName ReturnCompleted { get; } = new EdgeOrderStageName(ReturnCompletedValue); diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/GroupedChildConfigurations.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/GroupedChildConfigurations.Serialization.cs new file mode 100644 index 000000000000..bc56254c2add --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/GroupedChildConfigurations.Serialization.cs @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.EdgeOrder.Models +{ + public partial class GroupedChildConfigurations : 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(GroupedChildConfigurations)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(CategoryInformation)) + { + writer.WritePropertyName("categoryInformation"u8); + writer.WriteObjectValue(CategoryInformation, options); + } + if (options.Format != "W" && Optional.IsCollectionDefined(ChildConfigurations)) + { + writer.WritePropertyName("childConfigurations"u8); + writer.WriteStartArray(); + foreach (var item in ChildConfigurations) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + GroupedChildConfigurations IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(GroupedChildConfigurations)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeGroupedChildConfigurations(document.RootElement, options); + } + + internal static GroupedChildConfigurations DeserializeGroupedChildConfigurations(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ChildConfigurationCategoryInformation categoryInformation = default; + IReadOnlyList childConfigurations = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("categoryInformation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + categoryInformation = ChildConfigurationCategoryInformation.DeserializeChildConfigurationCategoryInformation(property.Value, options); + continue; + } + if (property.NameEquals("childConfigurations"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ProductChildConfiguration.DeserializeProductChildConfiguration(item, options)); + } + childConfigurations = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new GroupedChildConfigurations(categoryInformation, childConfigurations ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerEdgeOrderContext.Default); + default: + throw new FormatException($"The model {nameof(GroupedChildConfigurations)} does not support writing '{options.Format}' format."); + } + } + + GroupedChildConfigurations IPersistableModel.Create(BinaryData 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 DeserializeGroupedChildConfigurations(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(GroupedChildConfigurations)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/GroupedChildConfigurations.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/GroupedChildConfigurations.cs new file mode 100644 index 000000000000..c470caf74546 --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/GroupedChildConfigurations.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.EdgeOrder.Models +{ + /// Grouped child configuration object. + public partial class GroupedChildConfigurations + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal GroupedChildConfigurations() + { + ChildConfigurations = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Category information. + /// List of child configurations. + /// Keeps track of any properties unknown to the library. + internal GroupedChildConfigurations(ChildConfigurationCategoryInformation categoryInformation, IReadOnlyList childConfigurations, IDictionary serializedAdditionalRawData) + { + CategoryInformation = categoryInformation; + ChildConfigurations = childConfigurations; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Category information. + public ChildConfigurationCategoryInformation CategoryInformation { get; } + /// List of child configurations. + public IReadOnlyList ChildConfigurations { get; } + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/HierarchyInformation.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/HierarchyInformation.Serialization.cs index 22c4c1f015cb..fce20cfd1522 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/HierarchyInformation.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/HierarchyInformation.Serialization.cs @@ -54,6 +54,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("configurationName"u8); writer.WriteStringValue(ConfigurationName); } + if (Optional.IsDefined(ConfigurationIdDisplayName)) + { + writer.WritePropertyName("configurationIdDisplayName"u8); + writer.WriteStringValue(ConfigurationIdDisplayName); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -95,6 +100,7 @@ internal static HierarchyInformation DeserializeHierarchyInformation(JsonElement string productLineName = default; string productName = default; string configurationName = default; + string configurationIdDisplayName = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -119,13 +125,24 @@ internal static HierarchyInformation DeserializeHierarchyInformation(JsonElement configurationName = property.Value.GetString(); continue; } + if (property.NameEquals("configurationIdDisplayName"u8)) + { + configurationIdDisplayName = property.Value.GetString(); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new HierarchyInformation(productFamilyName, productLineName, productName, configurationName, serializedAdditionalRawData); + return new HierarchyInformation( + productFamilyName, + productLineName, + productName, + configurationName, + configurationIdDisplayName, + serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/HierarchyInformation.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/HierarchyInformation.cs index 87dfd35a13d3..10939f6f1be8 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/HierarchyInformation.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/HierarchyInformation.cs @@ -55,13 +55,15 @@ public HierarchyInformation() /// Represents product line name that uniquely identifies product line. /// Represents product name that uniquely identifies product. /// Represents configuration name that uniquely identifies configuration. + /// Represents Model Display Name. /// Keeps track of any properties unknown to the library. - internal HierarchyInformation(string productFamilyName, string productLineName, string productName, string configurationName, IDictionary serializedAdditionalRawData) + internal HierarchyInformation(string productFamilyName, string productLineName, string productName, string configurationName, string configurationIdDisplayName, IDictionary serializedAdditionalRawData) { ProductFamilyName = productFamilyName; ProductLineName = productLineName; ProductName = productName; ConfigurationName = configurationName; + ConfigurationIdDisplayName = configurationIdDisplayName; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -73,5 +75,7 @@ internal HierarchyInformation(string productFamilyName, string productLineName, public string ProductName { get; set; } /// Represents configuration name that uniquely identifies configuration. public string ConfigurationName { get; set; } + /// Represents Model Display Name. + public string ConfigurationIdDisplayName { get; set; } } } diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/OrderItemPreferences.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/OrderItemPreferences.Serialization.cs index 3b2c26f2b681..cf0e2e3d5bbd 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/OrderItemPreferences.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/OrderItemPreferences.Serialization.cs @@ -59,6 +59,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("managementResourcePreferences"u8); writer.WriteObjectValue(ManagementResourcePreferences, options); } + if (Optional.IsDefined(TermCommitmentPreferences)) + { + writer.WritePropertyName("termCommitmentPreferences"u8); + writer.WriteObjectValue(TermCommitmentPreferences, options); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -100,6 +105,7 @@ internal static OrderItemPreferences DeserializeOrderItemPreferences(JsonElement TransportPreferences transportPreferences = default; EncryptionPreferences encryptionPreferences = default; ManagementResourcePreferences managementResourcePreferences = default; + TermCommitmentPreferences termCommitmentPreferences = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -145,13 +151,28 @@ internal static OrderItemPreferences DeserializeOrderItemPreferences(JsonElement managementResourcePreferences = ManagementResourcePreferences.DeserializeManagementResourcePreferences(property.Value, options); continue; } + if (property.NameEquals("termCommitmentPreferences"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + termCommitmentPreferences = TermCommitmentPreferences.DeserializeTermCommitmentPreferences(property.Value, options); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new OrderItemPreferences(notificationPreferences ?? new ChangeTrackingList(), transportPreferences, encryptionPreferences, managementResourcePreferences, serializedAdditionalRawData); + return new OrderItemPreferences( + notificationPreferences ?? new ChangeTrackingList(), + transportPreferences, + encryptionPreferences, + managementResourcePreferences, + termCommitmentPreferences, + serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/OrderItemPreferences.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/OrderItemPreferences.cs index d0531956b15f..a82a460f2440 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/OrderItemPreferences.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/OrderItemPreferences.cs @@ -56,13 +56,15 @@ public OrderItemPreferences() /// Preferences related to the shipment logistics of the order. /// Preferences related to the Encryption. /// Preferences related to the Management resource. + /// Preferences related to the Term commitment. /// Keeps track of any properties unknown to the library. - internal OrderItemPreferences(IList notificationPreferences, TransportPreferences transportPreferences, EncryptionPreferences encryptionPreferences, ManagementResourcePreferences managementResourcePreferences, IDictionary serializedAdditionalRawData) + internal OrderItemPreferences(IList notificationPreferences, TransportPreferences transportPreferences, EncryptionPreferences encryptionPreferences, ManagementResourcePreferences managementResourcePreferences, TermCommitmentPreferences termCommitmentPreferences, IDictionary serializedAdditionalRawData) { NotificationPreferences = notificationPreferences; TransportPreferences = transportPreferences; EncryptionPreferences = encryptionPreferences; ManagementResourcePreferences = managementResourcePreferences; + TermCommitmentPreferences = termCommitmentPreferences; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -107,5 +109,8 @@ public string PreferredManagementResourceId ManagementResourcePreferences.PreferredManagementResourceId = value; } } + + /// Preferences related to the Term commitment. + public TermCommitmentPreferences TermCommitmentPreferences { get; set; } } } diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/OrderItemResourceList.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/OrderItemResourceList.Serialization.cs index e300289402d7..854fe13e8aff 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/OrderItemResourceList.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/OrderItemResourceList.Serialization.cs @@ -34,7 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(OrderItemResourceList)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsCollectionDefined(Value)) + if (options.Format != "W") { writer.WritePropertyName("value"u8); writer.WriteStartArray(); @@ -47,7 +47,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +87,13 @@ internal static OrderItemResourceList DeserializeOrderItemResourceList(JsonEleme return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +104,11 @@ internal static OrderItemResourceList DeserializeOrderItemResourceList(JsonEleme } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +117,7 @@ internal static OrderItemResourceList DeserializeOrderItemResourceList(JsonEleme } } serializedAdditionalRawData = rawDataDictionary; - return new OrderItemResourceList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new OrderItemResourceList(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/OrderItemResourceList.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/OrderItemResourceList.cs index 1501eb329a5e..3f96f3100685 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/OrderItemResourceList.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/OrderItemResourceList.cs @@ -7,10 +7,11 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.EdgeOrder.Models { - /// List of orderItems. + /// List of order items. internal partial class OrderItemResourceList { /// @@ -46,25 +47,31 @@ internal partial class OrderItemResourceList private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal OrderItemResourceList() + /// The OrderItemResource items on this page. + internal OrderItemResourceList(IEnumerable value) { - Value = new ChangeTrackingList(); + Value = value.ToList(); } /// Initializes a new instance of . - /// List of order item resources. - /// Link for the next set of order item resources. + /// The OrderItemResource items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal OrderItemResourceList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal OrderItemResourceList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// List of order item resources. + /// Initializes a new instance of for deserialization. + internal OrderItemResourceList() + { + } + + /// The OrderItemResource items on this page. public IReadOnlyList Value { get; } - /// Link for the next set of order item resources. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/OrderItemType.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/OrderItemType.cs index 52372ab9f79c..3f8c7955d094 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/OrderItemType.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/OrderItemType.cs @@ -24,11 +24,14 @@ public OrderItemType(string value) private const string PurchaseValue = "Purchase"; private const string RentalValue = "Rental"; + private const string ExternalValue = "External"; /// Purchase OrderItem. public static OrderItemType Purchase { get; } = new OrderItemType(PurchaseValue); /// Rental OrderItem. public static OrderItemType Rental { get; } = new OrderItemType(RentalValue); + /// Orders placed outside of azure. + public static OrderItemType External { get; } = new OrderItemType(ExternalValue); /// Determines if two values are the same. public static bool operator ==(OrderItemType left, OrderItemType right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/OrderResourceList.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/OrderResourceList.Serialization.cs index 60f186e4fafb..37b3cd2cb26d 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/OrderResourceList.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/OrderResourceList.Serialization.cs @@ -34,7 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(OrderResourceList)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsCollectionDefined(Value)) + if (options.Format != "W") { writer.WritePropertyName("value"u8); writer.WriteStartArray(); @@ -47,7 +47,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +87,13 @@ internal static OrderResourceList DeserializeOrderResourceList(JsonElement eleme return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +104,11 @@ internal static OrderResourceList DeserializeOrderResourceList(JsonElement eleme } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +117,7 @@ internal static OrderResourceList DeserializeOrderResourceList(JsonElement eleme } } serializedAdditionalRawData = rawDataDictionary; - return new OrderResourceList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new OrderResourceList(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/OrderResourceList.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/OrderResourceList.cs index 2583dfcb18be..bd76d9f9a999 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/OrderResourceList.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/OrderResourceList.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.EdgeOrder.Models { @@ -46,25 +47,31 @@ internal partial class OrderResourceList private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal OrderResourceList() + /// The OrderResource items on this page. + internal OrderResourceList(IEnumerable value) { - Value = new ChangeTrackingList(); + Value = value.ToList(); } /// Initializes a new instance of . - /// List of order resources. - /// Link for the next set of order resources. + /// The OrderResource items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal OrderResourceList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal OrderResourceList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// List of order resources. + /// Initializes a new instance of for deserialization. + internal OrderResourceList() + { + } + + /// The OrderResource items on this page. public IReadOnlyList Value { get; } - /// Link for the next set of order resources. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductAvailabilityInformation.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductAvailabilityInformation.cs index a42ead0b69a2..f4f30d6eaf41 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductAvailabilityInformation.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductAvailabilityInformation.cs @@ -51,7 +51,7 @@ internal ProductAvailabilityInformation() } /// Initializes a new instance of . - /// Current availability stage of the product. Availability stage. + /// Current availability stage of the product. /// Reason why the product is disabled. /// Message for why the product is disabled. /// Keeps track of any properties unknown to the library. @@ -63,7 +63,7 @@ internal ProductAvailabilityInformation(ProductAvailabilityStage? availabilitySt _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Current availability stage of the product. Availability stage. + /// Current availability stage of the product. public ProductAvailabilityStage? AvailabilityStage { get; } /// Reason why the product is disabled. public ProductDisabledReason? DisabledReason { get; } diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductAvailabilityStage.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductAvailabilityStage.cs index ec378b86420d..11edb691360c 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductAvailabilityStage.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductAvailabilityStage.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.EdgeOrder.Models { - /// Current availability stage of the product. Availability stage. + /// Current availability stage of the product. public readonly partial struct ProductAvailabilityStage : IEquatable { private readonly string _value; @@ -23,24 +23,27 @@ public ProductAvailabilityStage(string value) } private const string AvailableValue = "Available"; - private const string ComingSoonValue = "ComingSoon"; private const string PreviewValue = "Preview"; - private const string DeprecatedValue = "Deprecated"; private const string SignUpValue = "Signup"; + private const string DiscoverableValue = "Discoverable"; + private const string ComingSoonValue = "ComingSoon"; private const string UnavailableValue = "Unavailable"; + private const string DeprecatedValue = "Deprecated"; /// Product is available. public static ProductAvailabilityStage Available { get; } = new ProductAvailabilityStage(AvailableValue); - /// Product is coming soon. - public static ProductAvailabilityStage ComingSoon { get; } = new ProductAvailabilityStage(ComingSoonValue); /// Product is in preview. public static ProductAvailabilityStage Preview { get; } = new ProductAvailabilityStage(PreviewValue); - /// Product is deprecated. - public static ProductAvailabilityStage Deprecated { get; } = new ProductAvailabilityStage(DeprecatedValue); /// Product is available only on signup. public static ProductAvailabilityStage SignUp { get; } = new ProductAvailabilityStage(SignUpValue); + /// Product is not available in our service but can be discovered from other sources. + public static ProductAvailabilityStage Discoverable { get; } = new ProductAvailabilityStage(DiscoverableValue); + /// Product is coming soon. + public static ProductAvailabilityStage ComingSoon { get; } = new ProductAvailabilityStage(ComingSoonValue); /// Product is not available. public static ProductAvailabilityStage Unavailable { get; } = new ProductAvailabilityStage(UnavailableValue); + /// Product is deprecated. + public static ProductAvailabilityStage Deprecated { get; } = new ProductAvailabilityStage(DeprecatedValue); /// Determines if two values are the same. public static bool operator ==(ProductAvailabilityStage left, ProductAvailabilityStage right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductChildConfiguration.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductChildConfiguration.Serialization.cs new file mode 100644 index 000000000000..87feddc166d4 --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductChildConfiguration.Serialization.cs @@ -0,0 +1,478 @@ +// Copyright (c) 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.EdgeOrder.Models +{ + public partial class ProductChildConfiguration : 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(ProductChildConfiguration)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(ChildConfigurationType)) + { + writer.WritePropertyName("childConfigurationType"u8); + writer.WriteStringValue(ChildConfigurationType.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(IsPartOfBaseConfiguration)) + { + writer.WritePropertyName("isPartOfBaseConfiguration"u8); + writer.WriteBooleanValue(IsPartOfBaseConfiguration.Value); + } + if (options.Format != "W" && Optional.IsDefined(MinimumQuantity)) + { + writer.WritePropertyName("minimumQuantity"u8); + writer.WriteNumberValue(MinimumQuantity.Value); + } + if (options.Format != "W" && Optional.IsDefined(MaximumQuantity)) + { + writer.WritePropertyName("maximumQuantity"u8); + writer.WriteNumberValue(MaximumQuantity.Value); + } + if (options.Format != "W" && Optional.IsCollectionDefined(Specifications)) + { + writer.WritePropertyName("specifications"u8); + writer.WriteStartArray(); + foreach (var item in Specifications) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(Dimensions)) + { + writer.WritePropertyName("dimensions"u8); + writer.WriteObjectValue(Dimensions, options); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningSupport)) + { + writer.WritePropertyName("provisioningSupport"u8); + writer.WriteStringValue(ProvisioningSupport.Value.ToString()); + } + if (options.Format != "W" && Optional.IsCollectionDefined(ChildConfigurationTypes)) + { + writer.WritePropertyName("childConfigurationTypes"u8); + writer.WriteStartArray(); + foreach (var item in ChildConfigurationTypes) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsCollectionDefined(GroupedChildConfigurations)) + { + writer.WritePropertyName("groupedChildConfigurations"u8); + writer.WriteStartArray(); + foreach (var item in GroupedChildConfigurations) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsCollectionDefined(SupportedTermCommitmentDurations)) + { + writer.WritePropertyName("supportedTermCommitmentDurations"u8); + writer.WriteStartArray(); + foreach (var item in SupportedTermCommitmentDurations) + { + writer.WriteStringValue(item, "P"); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsCollectionDefined(FilterableProperties)) + { + writer.WritePropertyName("filterableProperties"u8); + writer.WriteStartArray(); + foreach (var item in FilterableProperties) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + if (options.Format != "W" && Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteObjectValue(Description, options); + } + if (options.Format != "W" && Optional.IsCollectionDefined(ImageInformation)) + { + writer.WritePropertyName("imageInformation"u8); + writer.WriteStartArray(); + foreach (var item in ImageInformation) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(CostInformation)) + { + writer.WritePropertyName("costInformation"u8); + writer.WriteObjectValue(CostInformation, options); + } + if (options.Format != "W" && Optional.IsDefined(AvailabilityInformation)) + { + writer.WritePropertyName("availabilityInformation"u8); + writer.WriteObjectValue(AvailabilityInformation, options); + } + if (options.Format != "W" && Optional.IsDefined(HierarchyInformation)) + { + writer.WritePropertyName("hierarchyInformation"u8); + writer.WriteObjectValue(HierarchyInformation, options); + } + if (options.Format != "W" && Optional.IsDefined(FulfilledBy)) + { + writer.WritePropertyName("fulfilledBy"u8); + writer.WriteStringValue(FulfilledBy.Value.ToString()); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ProductChildConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProductChildConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProductChildConfiguration(document.RootElement, options); + } + + internal static ProductChildConfiguration DeserializeProductChildConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ChildConfigurationType? childConfigurationType = default; + bool? isPartOfBaseConfiguration = default; + int? minimumQuantity = default; + int? maximumQuantity = default; + IReadOnlyList specifications = default; + ProductDimensions dimensions = default; + EdgeOrderProvisioningSupport? provisioningSupport = default; + IReadOnlyList childConfigurationTypes = default; + IReadOnlyList groupedChildConfigurations = default; + IReadOnlyList supportedTermCommitmentDurations = default; + IReadOnlyList filterableProperties = default; + string displayName = default; + ProductDescription description = default; + IReadOnlyList imageInformation = default; + EdgeOrderProductCostInformation costInformation = default; + ProductAvailabilityInformation availabilityInformation = default; + HierarchyInformation hierarchyInformation = default; + ConfigurationFulfillmentType? fulfilledBy = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("childConfigurationType"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + childConfigurationType = new ChildConfigurationType(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("isPartOfBaseConfiguration"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isPartOfBaseConfiguration = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("minimumQuantity"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + minimumQuantity = property0.Value.GetInt32(); + continue; + } + if (property0.NameEquals("maximumQuantity"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maximumQuantity = property0.Value.GetInt32(); + continue; + } + if (property0.NameEquals("specifications"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(ProductSpecification.DeserializeProductSpecification(item, options)); + } + specifications = array; + continue; + } + if (property0.NameEquals("dimensions"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dimensions = ProductDimensions.DeserializeProductDimensions(property0.Value, options); + continue; + } + if (property0.NameEquals("provisioningSupport"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningSupport = new EdgeOrderProvisioningSupport(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("childConfigurationTypes"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(new ChildConfigurationType(item.GetString())); + } + childConfigurationTypes = array; + continue; + } + if (property0.NameEquals("groupedChildConfigurations"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(Models.GroupedChildConfigurations.DeserializeGroupedChildConfigurations(item, options)); + } + groupedChildConfigurations = array; + continue; + } + if (property0.NameEquals("supportedTermCommitmentDurations"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetTimeSpan("P")); + } + supportedTermCommitmentDurations = array; + continue; + } + if (property0.NameEquals("filterableProperties"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(FilterableProperty.DeserializeFilterableProperty(item, options)); + } + filterableProperties = array; + continue; + } + if (property0.NameEquals("displayName"u8)) + { + displayName = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("description"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + description = ProductDescription.DeserializeProductDescription(property0.Value, options); + continue; + } + if (property0.NameEquals("imageInformation"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(EdgeOrderProductImageInformation.DeserializeEdgeOrderProductImageInformation(item, options)); + } + imageInformation = array; + continue; + } + if (property0.NameEquals("costInformation"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + costInformation = EdgeOrderProductCostInformation.DeserializeEdgeOrderProductCostInformation(property0.Value, options); + continue; + } + if (property0.NameEquals("availabilityInformation"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + availabilityInformation = ProductAvailabilityInformation.DeserializeProductAvailabilityInformation(property0.Value, options); + continue; + } + if (property0.NameEquals("hierarchyInformation"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + hierarchyInformation = HierarchyInformation.DeserializeHierarchyInformation(property0.Value, options); + continue; + } + if (property0.NameEquals("fulfilledBy"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + fulfilledBy = new ConfigurationFulfillmentType(property0.Value.GetString()); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProductChildConfiguration( + childConfigurationType, + isPartOfBaseConfiguration, + minimumQuantity, + maximumQuantity, + specifications ?? new ChangeTrackingList(), + dimensions, + provisioningSupport, + childConfigurationTypes ?? new ChangeTrackingList(), + groupedChildConfigurations ?? new ChangeTrackingList(), + supportedTermCommitmentDurations ?? new ChangeTrackingList(), + filterableProperties ?? new ChangeTrackingList(), + displayName, + description, + imageInformation ?? new ChangeTrackingList(), + costInformation, + availabilityInformation, + hierarchyInformation, + fulfilledBy, + 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, AzureResourceManagerEdgeOrderContext.Default); + default: + throw new FormatException($"The model {nameof(ProductChildConfiguration)} does not support writing '{options.Format}' format."); + } + } + + ProductChildConfiguration IPersistableModel.Create(BinaryData 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 DeserializeProductChildConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProductChildConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductChildConfiguration.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductChildConfiguration.cs new file mode 100644 index 000000000000..07c20bae2e76 --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductChildConfiguration.cs @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.EdgeOrder.Models +{ + /// Child configuration object. + public partial class ProductChildConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal ProductChildConfiguration() + { + Specifications = new ChangeTrackingList(); + ChildConfigurationTypes = new ChangeTrackingList(); + GroupedChildConfigurations = new ChangeTrackingList(); + SupportedTermCommitmentDurations = new ChangeTrackingList(); + FilterableProperties = new ChangeTrackingList(); + ImageInformation = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Child configuration type. + /// Flag to indicate if the child configuration is part of the base configuration, which means the customer need not pass this configuration in OptInAdditionalConfigurations while placing an order, it will be shipped by default. + /// Minimum quantity a customer can order while choosing this configuration. + /// Maximum quantity a customer can order while choosing this configuration. + /// Specifications of the configuration. + /// Dimensions of the configuration. + /// Determining nature of provisioning that the configuration supports. + /// Different types of child configurations which exist for this configuration, these can be used to populate the child configuration filter. + /// Child configurations present for the configuration after applying child configuration filter, grouped by the category name of the child configuration. + /// The Term Commitment Durations that are supported for a configuration. + /// List of filters supported for a product. + /// Display Name for the product system. + /// Description related to the product system. + /// Image information for the product system. + /// Cost information for the product system. + /// Availability information of the product system. + /// Hierarchy information of a product. + /// The entity responsible for fulfillment of the item at the given hierarchy level. + /// Keeps track of any properties unknown to the library. + internal ProductChildConfiguration(ChildConfigurationType? childConfigurationType, bool? isPartOfBaseConfiguration, int? minimumQuantity, int? maximumQuantity, IReadOnlyList specifications, ProductDimensions dimensions, EdgeOrderProvisioningSupport? provisioningSupport, IReadOnlyList childConfigurationTypes, IReadOnlyList groupedChildConfigurations, IReadOnlyList supportedTermCommitmentDurations, IReadOnlyList filterableProperties, string displayName, ProductDescription description, IReadOnlyList imageInformation, EdgeOrderProductCostInformation costInformation, ProductAvailabilityInformation availabilityInformation, HierarchyInformation hierarchyInformation, ConfigurationFulfillmentType? fulfilledBy, IDictionary serializedAdditionalRawData) + { + ChildConfigurationType = childConfigurationType; + IsPartOfBaseConfiguration = isPartOfBaseConfiguration; + MinimumQuantity = minimumQuantity; + MaximumQuantity = maximumQuantity; + Specifications = specifications; + Dimensions = dimensions; + ProvisioningSupport = provisioningSupport; + ChildConfigurationTypes = childConfigurationTypes; + GroupedChildConfigurations = groupedChildConfigurations; + SupportedTermCommitmentDurations = supportedTermCommitmentDurations; + FilterableProperties = filterableProperties; + DisplayName = displayName; + Description = description; + ImageInformation = imageInformation; + CostInformation = costInformation; + AvailabilityInformation = availabilityInformation; + HierarchyInformation = hierarchyInformation; + FulfilledBy = fulfilledBy; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Child configuration type. + public ChildConfigurationType? ChildConfigurationType { get; } + /// Flag to indicate if the child configuration is part of the base configuration, which means the customer need not pass this configuration in OptInAdditionalConfigurations while placing an order, it will be shipped by default. + public bool? IsPartOfBaseConfiguration { get; } + /// Minimum quantity a customer can order while choosing this configuration. + public int? MinimumQuantity { get; } + /// Maximum quantity a customer can order while choosing this configuration. + public int? MaximumQuantity { get; } + /// Specifications of the configuration. + public IReadOnlyList Specifications { get; } + /// Dimensions of the configuration. + public ProductDimensions Dimensions { get; } + /// Determining nature of provisioning that the configuration supports. + public EdgeOrderProvisioningSupport? ProvisioningSupport { get; } + /// Different types of child configurations which exist for this configuration, these can be used to populate the child configuration filter. + public IReadOnlyList ChildConfigurationTypes { get; } + /// Child configurations present for the configuration after applying child configuration filter, grouped by the category name of the child configuration. + public IReadOnlyList GroupedChildConfigurations { get; } + /// The Term Commitment Durations that are supported for a configuration. + public IReadOnlyList SupportedTermCommitmentDurations { get; } + /// List of filters supported for a product. + public IReadOnlyList FilterableProperties { get; } + /// Display Name for the product system. + public string DisplayName { get; } + /// Description related to the product system. + public ProductDescription Description { get; } + /// Image information for the product system. + public IReadOnlyList ImageInformation { get; } + /// Cost information for the product system. + public EdgeOrderProductCostInformation CostInformation { get; } + /// Availability information of the product system. + public ProductAvailabilityInformation AvailabilityInformation { get; } + /// Hierarchy information of a product. + public HierarchyInformation HierarchyInformation { get; } + /// The entity responsible for fulfillment of the item at the given hierarchy level. + public ConfigurationFulfillmentType? FulfilledBy { get; } + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductConfiguration.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductConfiguration.Serialization.cs index 052723020689..6a617ca9c462 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductConfiguration.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductConfiguration.Serialization.cs @@ -36,6 +36,56 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("properties"u8); writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsCollectionDefined(Specifications)) + { + writer.WritePropertyName("specifications"u8); + writer.WriteStartArray(); + foreach (var item in Specifications) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(Dimensions)) + { + writer.WritePropertyName("dimensions"u8); + writer.WriteObjectValue(Dimensions, options); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningSupport)) + { + writer.WritePropertyName("provisioningSupport"u8); + writer.WriteStringValue(ProvisioningSupport.Value.ToString()); + } + if (options.Format != "W" && Optional.IsCollectionDefined(ChildConfigurationTypes)) + { + writer.WritePropertyName("childConfigurationTypes"u8); + writer.WriteStartArray(); + foreach (var item in ChildConfigurationTypes) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsCollectionDefined(GroupedChildConfigurations)) + { + writer.WritePropertyName("groupedChildConfigurations"u8); + writer.WriteStartArray(); + foreach (var item in GroupedChildConfigurations) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsCollectionDefined(SupportedTermCommitmentDurations)) + { + writer.WritePropertyName("supportedTermCommitmentDurations"u8); + writer.WriteStartArray(); + foreach (var item in SupportedTermCommitmentDurations) + { + writer.WriteStringValue(item, "P"); + } + writer.WriteEndArray(); + } if (options.Format != "W" && Optional.IsDefined(DisplayName)) { writer.WritePropertyName("displayName"u8); @@ -44,7 +94,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (options.Format != "W" && Optional.IsDefined(Description)) { writer.WritePropertyName("description"u8); - writer.WriteObjectValue(Description, options); + writer.WriteObjectValue(Description, options); } if (options.Format != "W" && Optional.IsCollectionDefined(ImageInformation)) { @@ -52,24 +102,24 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStartArray(); foreach (var item in ImageInformation) { - writer.WriteObjectValue(item, options); + writer.WriteObjectValue(item, options); } writer.WriteEndArray(); } if (options.Format != "W" && Optional.IsDefined(CostInformation)) { writer.WritePropertyName("costInformation"u8); - writer.WriteObjectValue(CostInformation, options); + writer.WriteObjectValue(CostInformation, options); } if (options.Format != "W" && Optional.IsDefined(AvailabilityInformation)) { writer.WritePropertyName("availabilityInformation"u8); - writer.WriteObjectValue(AvailabilityInformation, options); + writer.WriteObjectValue(AvailabilityInformation, options); } if (options.Format != "W" && Optional.IsDefined(HierarchyInformation)) { writer.WritePropertyName("hierarchyInformation"u8); - writer.WriteObjectValue(HierarchyInformation, options); + writer.WriteObjectValue(HierarchyInformation, options); } if (options.Format != "W" && Optional.IsCollectionDefined(FilterableProperties)) { @@ -77,25 +127,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStartArray(); foreach (var item in FilterableProperties) { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (options.Format != "W" && Optional.IsCollectionDefined(Specifications)) - { - writer.WritePropertyName("specifications"u8); - writer.WriteStartArray(); - foreach (var item in Specifications) - { - writer.WriteObjectValue(item, options); + writer.WriteObjectValue(item, options); } writer.WriteEndArray(); } - if (options.Format != "W" && Optional.IsDefined(Dimensions)) - { - writer.WritePropertyName("dimensions"u8); - writer.WriteObjectValue(Dimensions, options); - } writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -134,6 +169,12 @@ internal static ProductConfiguration DeserializeProductConfiguration(JsonElement { return null; } + IReadOnlyList specifications = default; + ProductDimensions dimensions = default; + EdgeOrderProvisioningSupport? provisioningSupport = default; + IReadOnlyList childConfigurationTypes = default; + IReadOnlyList groupedChildConfigurations = default; + IReadOnlyList supportedTermCommitmentDurations = default; string displayName = default; ProductDescription description = default; IReadOnlyList imageInformation = default; @@ -141,8 +182,6 @@ internal static ProductConfiguration DeserializeProductConfiguration(JsonElement ProductAvailabilityInformation availabilityInformation = default; HierarchyInformation hierarchyInformation = default; IReadOnlyList filterableProperties = default; - IReadOnlyList specifications = default; - ProductDimensions dimensions = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -156,6 +195,80 @@ internal static ProductConfiguration DeserializeProductConfiguration(JsonElement } foreach (var property0 in property.Value.EnumerateObject()) { + if (property0.NameEquals("specifications"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(ProductSpecification.DeserializeProductSpecification(item, options)); + } + specifications = array; + continue; + } + if (property0.NameEquals("dimensions"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dimensions = ProductDimensions.DeserializeProductDimensions(property0.Value, options); + continue; + } + if (property0.NameEquals("provisioningSupport"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningSupport = new EdgeOrderProvisioningSupport(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("childConfigurationTypes"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(new ChildConfigurationType(item.GetString())); + } + childConfigurationTypes = array; + continue; + } + if (property0.NameEquals("groupedChildConfigurations"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(Models.GroupedChildConfigurations.DeserializeGroupedChildConfigurations(item, options)); + } + groupedChildConfigurations = array; + continue; + } + if (property0.NameEquals("supportedTermCommitmentDurations"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetTimeSpan("P")); + } + supportedTermCommitmentDurations = array; + continue; + } if (property0.NameEquals("displayName"u8)) { displayName = property0.Value.GetString(); @@ -208,7 +321,7 @@ internal static ProductConfiguration DeserializeProductConfiguration(JsonElement { continue; } - hierarchyInformation = HierarchyInformation.DeserializeHierarchyInformation(property0.Value, options); + hierarchyInformation = Models.HierarchyInformation.DeserializeHierarchyInformation(property0.Value, options); continue; } if (property0.NameEquals("filterableProperties"u8)) @@ -225,29 +338,6 @@ internal static ProductConfiguration DeserializeProductConfiguration(JsonElement filterableProperties = array; continue; } - if (property0.NameEquals("specifications"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(ProductSpecification.DeserializeProductSpecification(item, options)); - } - specifications = array; - continue; - } - if (property0.NameEquals("dimensions"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - dimensions = ProductDimensions.DeserializeProductDimensions(property0.Value, options); - continue; - } } continue; } @@ -258,6 +348,12 @@ internal static ProductConfiguration DeserializeProductConfiguration(JsonElement } serializedAdditionalRawData = rawDataDictionary; return new ProductConfiguration( + specifications ?? new ChangeTrackingList(), + dimensions, + provisioningSupport, + childConfigurationTypes ?? new ChangeTrackingList(), + groupedChildConfigurations ?? new ChangeTrackingList(), + supportedTermCommitmentDurations ?? new ChangeTrackingList(), displayName, description, imageInformation ?? new ChangeTrackingList(), @@ -265,8 +361,6 @@ internal static ProductConfiguration DeserializeProductConfiguration(JsonElement availabilityInformation, hierarchyInformation, filterableProperties ?? new ChangeTrackingList(), - specifications ?? new ChangeTrackingList(), - dimensions, serializedAdditionalRawData); } diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductConfiguration.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductConfiguration.cs index ff56e28cd795..2684a91b79b2 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductConfiguration.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductConfiguration.cs @@ -48,24 +48,37 @@ public partial class ProductConfiguration /// Initializes a new instance of . internal ProductConfiguration() { + Specifications = new ChangeTrackingList(); + ChildConfigurationTypes = new ChangeTrackingList(); + GroupedChildConfigurations = new ChangeTrackingList(); + SupportedTermCommitmentDurations = new ChangeTrackingList(); ImageInformation = new ChangeTrackingList(); FilterableProperties = new ChangeTrackingList(); - Specifications = new ChangeTrackingList(); } /// Initializes a new instance of . - /// Display Name for the product system. - /// Description related to the product system. - /// Image information for the product system. - /// Cost information for the product system. - /// Availability information of the product system. - /// Hierarchy information of a product. - /// list of filters supported for a product. /// Specifications of the configuration. /// Dimensions of the configuration. + /// Determining nature of provisioning that the configuration supports. + /// Different types of child configurations which exist for this configuration, these can be used to populate the child configuration filter. + /// Child configurations present for the configuration after applying child configuration filter, grouped by the category name of the child configuration. + /// The Term Commitment Durations that are supported for a configuration. + /// + /// + /// + /// + /// + /// + /// /// Keeps track of any properties unknown to the library. - internal ProductConfiguration(string displayName, ProductDescription description, IReadOnlyList imageInformation, EdgeOrderProductCostInformation costInformation, ProductAvailabilityInformation availabilityInformation, HierarchyInformation hierarchyInformation, IReadOnlyList filterableProperties, IReadOnlyList specifications, ProductDimensions dimensions, IDictionary serializedAdditionalRawData) + internal ProductConfiguration(IReadOnlyList specifications, ProductDimensions dimensions, EdgeOrderProvisioningSupport? provisioningSupport, IReadOnlyList childConfigurationTypes, IReadOnlyList groupedChildConfigurations, IReadOnlyList supportedTermCommitmentDurations, string displayName, ProductDescription description, IReadOnlyList imageInformation, EdgeOrderProductCostInformation costInformation, ProductAvailabilityInformation availabilityInformation, HierarchyInformation hierarchyInformation, IReadOnlyList filterableProperties, IDictionary serializedAdditionalRawData) { + Specifications = specifications; + Dimensions = dimensions; + ProvisioningSupport = provisioningSupport; + ChildConfigurationTypes = childConfigurationTypes; + GroupedChildConfigurations = groupedChildConfigurations; + SupportedTermCommitmentDurations = supportedTermCommitmentDurations; DisplayName = displayName; Description = description; ImageInformation = imageInformation; @@ -73,28 +86,20 @@ internal ProductConfiguration(string displayName, ProductDescription description AvailabilityInformation = availabilityInformation; HierarchyInformation = hierarchyInformation; FilterableProperties = filterableProperties; - Specifications = specifications; - Dimensions = dimensions; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Display Name for the product system. - public string DisplayName { get; } - /// Description related to the product system. - public ProductDescription Description { get; } - /// Image information for the product system. - public IReadOnlyList ImageInformation { get; } - /// Cost information for the product system. - public EdgeOrderProductCostInformation CostInformation { get; } - /// Availability information of the product system. - public ProductAvailabilityInformation AvailabilityInformation { get; } - /// Hierarchy information of a product. - public HierarchyInformation HierarchyInformation { get; } - /// list of filters supported for a product. - public IReadOnlyList FilterableProperties { get; } /// Specifications of the configuration. public IReadOnlyList Specifications { get; } /// Dimensions of the configuration. public ProductDimensions Dimensions { get; } + /// Determining nature of provisioning that the configuration supports. + public EdgeOrderProvisioningSupport? ProvisioningSupport { get; } + /// Different types of child configurations which exist for this configuration, these can be used to populate the child configuration filter. + public IReadOnlyList ChildConfigurationTypes { get; } + /// Child configurations present for the configuration after applying child configuration filter, grouped by the category name of the child configuration. + public IReadOnlyList GroupedChildConfigurations { get; } + /// The Term Commitment Durations that are supported for a configuration. + public IReadOnlyList SupportedTermCommitmentDurations { get; } } } diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductConfigurationDeviceDetails.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductConfigurationDeviceDetails.Serialization.cs new file mode 100644 index 000000000000..9f3fc9db3060 --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductConfigurationDeviceDetails.Serialization.cs @@ -0,0 +1,225 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.EdgeOrder.Models +{ + public partial class ProductConfigurationDeviceDetails : 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(ProductConfigurationDeviceDetails)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(DisplayInfo)) + { + writer.WritePropertyName("displayInfo"u8); + writer.WriteObjectValue(DisplayInfo, options); + } + if (options.Format != "W" && Optional.IsDefined(HierarchyInformation)) + { + writer.WritePropertyName("hierarchyInformation"u8); + writer.WriteObjectValue(HierarchyInformation, options); + } + if (options.Format != "W" && Optional.IsDefined(Quantity)) + { + writer.WritePropertyName("quantity"u8); + writer.WriteNumberValue(Quantity.Value); + } + if (options.Format != "W" && Optional.IsDefined(IdentificationType)) + { + writer.WritePropertyName("identificationType"u8); + writer.WriteStringValue(IdentificationType.Value.ToString()); + } + if (options.Format != "W" && Optional.IsCollectionDefined(DeviceDetails)) + { + writer.WritePropertyName("deviceDetails"u8); + writer.WriteStartArray(); + foreach (var item in DeviceDetails) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(TermCommitmentInformation)) + { + writer.WritePropertyName("termCommitmentInformation"u8); + writer.WriteObjectValue(TermCommitmentInformation, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ProductConfigurationDeviceDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProductConfigurationDeviceDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProductConfigurationDeviceDetails(document.RootElement, options); + } + + internal static ProductConfigurationDeviceDetails DeserializeProductConfigurationDeviceDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ProductDisplayInfo displayInfo = default; + HierarchyInformation hierarchyInformation = default; + int? quantity = default; + ConfigurationIdentificationType? identificationType = default; + IReadOnlyList deviceDetails = default; + TermCommitmentInformation termCommitmentInformation = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("displayInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + displayInfo = ProductDisplayInfo.DeserializeProductDisplayInfo(property.Value, options); + continue; + } + if (property.NameEquals("hierarchyInformation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + hierarchyInformation = HierarchyInformation.DeserializeHierarchyInformation(property.Value, options); + continue; + } + if (property.NameEquals("quantity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + quantity = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("identificationType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + identificationType = new ConfigurationIdentificationType(property.Value.GetString()); + continue; + } + if (property.NameEquals("deviceDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(EdgeOrderProductDeviceDetails.DeserializeEdgeOrderProductDeviceDetails(item, options)); + } + deviceDetails = array; + continue; + } + if (property.NameEquals("termCommitmentInformation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + termCommitmentInformation = TermCommitmentInformation.DeserializeTermCommitmentInformation(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProductConfigurationDeviceDetails( + displayInfo, + hierarchyInformation, + quantity, + identificationType, + deviceDetails ?? new ChangeTrackingList(), + termCommitmentInformation, + 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, AzureResourceManagerEdgeOrderContext.Default); + default: + throw new FormatException($"The model {nameof(ProductConfigurationDeviceDetails)} does not support writing '{options.Format}' format."); + } + } + + ProductConfigurationDeviceDetails IPersistableModel.Create(BinaryData 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 DeserializeProductConfigurationDeviceDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProductConfigurationDeviceDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductConfigurationDeviceDetails.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductConfigurationDeviceDetails.cs new file mode 100644 index 000000000000..4f6ec8a5ab8a --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductConfigurationDeviceDetails.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.EdgeOrder.Models +{ + /// Device details for configuration. + public partial class ProductConfigurationDeviceDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal ProductConfigurationDeviceDetails() + { + DeviceDetails = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Display details of the product. + /// Hierarchy of the product which uniquely identifies the configuration. + /// Quantity of the product. + /// Identification type of the configuration. + /// List of device details. + /// Term Commitment Information of the Device. + /// Keeps track of any properties unknown to the library. + internal ProductConfigurationDeviceDetails(ProductDisplayInfo displayInfo, HierarchyInformation hierarchyInformation, int? quantity, ConfigurationIdentificationType? identificationType, IReadOnlyList deviceDetails, TermCommitmentInformation termCommitmentInformation, IDictionary serializedAdditionalRawData) + { + DisplayInfo = displayInfo; + HierarchyInformation = hierarchyInformation; + Quantity = quantity; + IdentificationType = identificationType; + DeviceDetails = deviceDetails; + TermCommitmentInformation = termCommitmentInformation; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Display details of the product. + public ProductDisplayInfo DisplayInfo { get; } + /// Hierarchy of the product which uniquely identifies the configuration. + public HierarchyInformation HierarchyInformation { get; } + /// Quantity of the product. + public int? Quantity { get; } + /// Identification type of the configuration. + public ConfigurationIdentificationType? IdentificationType { get; } + /// List of device details. + public IReadOnlyList DeviceDetails { get; } + /// Term Commitment Information of the Device. + public TermCommitmentInformation TermCommitmentInformation { get; } + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductDetails.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductDetails.Serialization.cs index 80bca8ced9e1..1bb52623f7c8 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductDetails.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductDetails.Serialization.cs @@ -41,23 +41,70 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("hierarchyInformation"u8); writer.WriteObjectValue(HierarchyInformation, options); - if (options.Format != "W" && Optional.IsDefined(Count)) - { - writer.WritePropertyName("count"u8); - writer.WriteNumberValue(Count.Value); - } if (options.Format != "W" && Optional.IsDefined(ProductDoubleEncryptionStatus)) { writer.WritePropertyName("productDoubleEncryptionStatus"u8); writer.WriteStringValue(ProductDoubleEncryptionStatus.Value.ToString()); } + if (options.Format != "W" && Optional.IsDefined(IdentificationType)) + { + writer.WritePropertyName("identificationType"u8); + writer.WriteStringValue(IdentificationType.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(ParentDeviceDetails)) + { + writer.WritePropertyName("parentDeviceDetails"u8); + writer.WriteObjectValue(ParentDeviceDetails, options); + } + if (Optional.IsDefined(ParentProvisioningDetails)) + { + writer.WritePropertyName("parentProvisioningDetails"u8); + writer.WriteObjectValue(ParentProvisioningDetails, options); + } + if (Optional.IsCollectionDefined(OptInAdditionalConfigurations)) + { + writer.WritePropertyName("optInAdditionalConfigurations"u8); + writer.WriteStartArray(); + foreach (var item in OptInAdditionalConfigurations) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsCollectionDefined(ChildConfigurationDeviceDetails)) + { + writer.WritePropertyName("childConfigurationDeviceDetails"u8); + writer.WriteStartArray(); + foreach (var item in ChildConfigurationDeviceDetails) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(TermCommitmentInformation)) + { + writer.WritePropertyName("termCommitmentInformation"u8); + writer.WriteObjectValue(TermCommitmentInformation, options); + } + if (options.Format != "W" && Optional.IsDefined(Count)) + { + if (Count != null) + { + writer.WritePropertyName("count"u8); + writer.WriteNumberValue(Count.Value); + } + else + { + writer.WriteNull("count"); + } + } if (options.Format != "W" && Optional.IsCollectionDefined(DeviceDetails)) { writer.WritePropertyName("deviceDetails"u8); writer.WriteStartArray(); foreach (var item in DeviceDetails) { - writer.WriteObjectValue(item, options); + writer.WriteObjectValue(item, options); } writer.WriteEndArray(); } @@ -100,8 +147,14 @@ internal static ProductDetails DeserializeProductDetails(JsonElement element, Mo } ProductDisplayInfo displayInfo = default; HierarchyInformation hierarchyInformation = default; - int? count = default; DoubleEncryptionStatus? productDoubleEncryptionStatus = default; + ConfigurationIdentificationType? identificationType = default; + EdgeOrderProductDeviceDetails parentDeviceDetails = default; + EdgeOrderProvisioningDetails parentProvisioningDetails = default; + IList optInAdditionalConfigurations = default; + IReadOnlyList childConfigurationDeviceDetails = default; + TermCommitmentInformation termCommitmentInformation = default; + int? count = default; IReadOnlyList deviceDetails = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -121,22 +174,87 @@ internal static ProductDetails DeserializeProductDetails(JsonElement element, Mo hierarchyInformation = HierarchyInformation.DeserializeHierarchyInformation(property.Value, options); continue; } - if (property.NameEquals("count"u8)) + if (property.NameEquals("productDoubleEncryptionStatus"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - count = property.Value.GetInt32(); + productDoubleEncryptionStatus = new DoubleEncryptionStatus(property.Value.GetString()); continue; } - if (property.NameEquals("productDoubleEncryptionStatus"u8)) + if (property.NameEquals("identificationType"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - productDoubleEncryptionStatus = new DoubleEncryptionStatus(property.Value.GetString()); + identificationType = new ConfigurationIdentificationType(property.Value.GetString()); + continue; + } + if (property.NameEquals("parentDeviceDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + parentDeviceDetails = EdgeOrderProductDeviceDetails.DeserializeEdgeOrderProductDeviceDetails(property.Value, options); + continue; + } + if (property.NameEquals("parentProvisioningDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + parentProvisioningDetails = EdgeOrderProvisioningDetails.DeserializeEdgeOrderProvisioningDetails(property.Value, options); + continue; + } + if (property.NameEquals("optInAdditionalConfigurations"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ProductDetailsAdditionalConfiguration.DeserializeProductDetailsAdditionalConfiguration(item, options)); + } + optInAdditionalConfigurations = array; + continue; + } + if (property.NameEquals("childConfigurationDeviceDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ProductConfigurationDeviceDetails.DeserializeProductConfigurationDeviceDetails(item, options)); + } + childConfigurationDeviceDetails = array; + continue; + } + if (property.NameEquals("termCommitmentInformation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + termCommitmentInformation = TermCommitmentInformation.DeserializeTermCommitmentInformation(property.Value, options); + continue; + } + if (property.NameEquals("count"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + count = null; + continue; + } + count = property.Value.GetInt32(); continue; } if (property.NameEquals("deviceDetails"u8)) @@ -162,8 +280,14 @@ internal static ProductDetails DeserializeProductDetails(JsonElement element, Mo return new ProductDetails( displayInfo, hierarchyInformation, - count, productDoubleEncryptionStatus, + identificationType, + parentDeviceDetails, + parentProvisioningDetails, + optInAdditionalConfigurations ?? new ChangeTrackingList(), + childConfigurationDeviceDetails ?? new ChangeTrackingList(), + termCommitmentInformation, + count, deviceDetails ?? new ChangeTrackingList(), serializedAdditionalRawData); } diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductDetails.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductDetails.cs index 96ba4b3d23d3..9ee4b83c4aa1 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductDetails.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductDetails.cs @@ -53,22 +53,36 @@ public ProductDetails(HierarchyInformation hierarchyInformation) Argument.AssertNotNull(hierarchyInformation, nameof(hierarchyInformation)); HierarchyInformation = hierarchyInformation; + OptInAdditionalConfigurations = new ChangeTrackingList(); + ChildConfigurationDeviceDetails = new ChangeTrackingList(); DeviceDetails = new ChangeTrackingList(); } /// Initializes a new instance of . /// Display details of the product. /// Hierarchy of the product which uniquely identifies the product. - /// Quantity of the product. /// Double encryption status of the configuration. Read-only field. - /// list of device details. + /// Identification type of the configuration. + /// Device details of the parent configuration. + /// Device Provisioning Details for Parent. + /// List of additional configurations customer wants in the order item apart from the ones included in the base configuration. + /// Details of all child configurations that are part of the order item. + /// Term Commitment Information of the Device. + /// + /// /// Keeps track of any properties unknown to the library. - internal ProductDetails(ProductDisplayInfo displayInfo, HierarchyInformation hierarchyInformation, int? count, DoubleEncryptionStatus? productDoubleEncryptionStatus, IReadOnlyList deviceDetails, IDictionary serializedAdditionalRawData) + internal ProductDetails(ProductDisplayInfo displayInfo, HierarchyInformation hierarchyInformation, DoubleEncryptionStatus? productDoubleEncryptionStatus, ConfigurationIdentificationType? identificationType, EdgeOrderProductDeviceDetails parentDeviceDetails, EdgeOrderProvisioningDetails parentProvisioningDetails, IList optInAdditionalConfigurations, IReadOnlyList childConfigurationDeviceDetails, TermCommitmentInformation termCommitmentInformation, int? count, IReadOnlyList deviceDetails, IDictionary serializedAdditionalRawData) { DisplayInfo = displayInfo; HierarchyInformation = hierarchyInformation; - Count = count; ProductDoubleEncryptionStatus = productDoubleEncryptionStatus; + IdentificationType = identificationType; + ParentDeviceDetails = parentDeviceDetails; + ParentProvisioningDetails = parentProvisioningDetails; + OptInAdditionalConfigurations = optInAdditionalConfigurations; + ChildConfigurationDeviceDetails = childConfigurationDeviceDetails; + TermCommitmentInformation = termCommitmentInformation; + Count = count; DeviceDetails = deviceDetails; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -82,11 +96,19 @@ internal ProductDetails() public ProductDisplayInfo DisplayInfo { get; set; } /// Hierarchy of the product which uniquely identifies the product. public HierarchyInformation HierarchyInformation { get; set; } - /// Quantity of the product. - public int? Count { get; } /// Double encryption status of the configuration. Read-only field. public DoubleEncryptionStatus? ProductDoubleEncryptionStatus { get; } - /// list of device details. - public IReadOnlyList DeviceDetails { get; } + /// Identification type of the configuration. + public ConfigurationIdentificationType? IdentificationType { get; } + /// Device details of the parent configuration. + public EdgeOrderProductDeviceDetails ParentDeviceDetails { get; } + /// Device Provisioning Details for Parent. + public EdgeOrderProvisioningDetails ParentProvisioningDetails { get; set; } + /// List of additional configurations customer wants in the order item apart from the ones included in the base configuration. + public IList OptInAdditionalConfigurations { get; } + /// Details of all child configurations that are part of the order item. + public IReadOnlyList ChildConfigurationDeviceDetails { get; } + /// Term Commitment Information of the Device. + public TermCommitmentInformation TermCommitmentInformation { get; } } } diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductDetailsAdditionalConfiguration.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductDetailsAdditionalConfiguration.Serialization.cs new file mode 100644 index 000000000000..5a4451188635 --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductDetailsAdditionalConfiguration.Serialization.cs @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.EdgeOrder.Models +{ + public partial class ProductDetailsAdditionalConfiguration : 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(ProductDetailsAdditionalConfiguration)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("hierarchyInformation"u8); + writer.WriteObjectValue(HierarchyInformation, options); + writer.WritePropertyName("quantity"u8); + writer.WriteNumberValue(Quantity); + if (Optional.IsCollectionDefined(ProvisioningDetails)) + { + writer.WritePropertyName("provisioningDetails"u8); + writer.WriteStartArray(); + foreach (var item in ProvisioningDetails) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ProductDetailsAdditionalConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProductDetailsAdditionalConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProductDetailsAdditionalConfiguration(document.RootElement, options); + } + + internal static ProductDetailsAdditionalConfiguration DeserializeProductDetailsAdditionalConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + HierarchyInformation hierarchyInformation = default; + int quantity = default; + IList provisioningDetails = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("hierarchyInformation"u8)) + { + hierarchyInformation = HierarchyInformation.DeserializeHierarchyInformation(property.Value, options); + continue; + } + if (property.NameEquals("quantity"u8)) + { + quantity = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("provisioningDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(EdgeOrderProvisioningDetails.DeserializeEdgeOrderProvisioningDetails(item, options)); + } + provisioningDetails = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProductDetailsAdditionalConfiguration(hierarchyInformation, quantity, provisioningDetails ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerEdgeOrderContext.Default); + default: + throw new FormatException($"The model {nameof(ProductDetailsAdditionalConfiguration)} does not support writing '{options.Format}' format."); + } + } + + ProductDetailsAdditionalConfiguration IPersistableModel.Create(BinaryData 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 DeserializeProductDetailsAdditionalConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProductDetailsAdditionalConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductDetailsAdditionalConfiguration.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductDetailsAdditionalConfiguration.cs new file mode 100644 index 000000000000..8d98e25e825b --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductDetailsAdditionalConfiguration.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.EdgeOrder.Models +{ + /// Additional Configuration details. + public partial class ProductDetailsAdditionalConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Hierarchy of the product which uniquely identifies the configuration. + /// Quantity of the product. + /// is null. + public ProductDetailsAdditionalConfiguration(HierarchyInformation hierarchyInformation, int quantity) + { + Argument.AssertNotNull(hierarchyInformation, nameof(hierarchyInformation)); + + HierarchyInformation = hierarchyInformation; + Quantity = quantity; + ProvisioningDetails = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Hierarchy of the product which uniquely identifies the configuration. + /// Quantity of the product. + /// List Provisioning Details for Devices in Additional Config. + /// Keeps track of any properties unknown to the library. + internal ProductDetailsAdditionalConfiguration(HierarchyInformation hierarchyInformation, int quantity, IList provisioningDetails, IDictionary serializedAdditionalRawData) + { + HierarchyInformation = hierarchyInformation; + Quantity = quantity; + ProvisioningDetails = provisioningDetails; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ProductDetailsAdditionalConfiguration() + { + } + + /// Hierarchy of the product which uniquely identifies the configuration. + public HierarchyInformation HierarchyInformation { get; set; } + /// Quantity of the product. + public int Quantity { get; set; } + /// List Provisioning Details for Devices in Additional Config. + public IList ProvisioningDetails { get; } + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductDetailsUpdateParameter.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductDetailsUpdateParameter.Serialization.cs new file mode 100644 index 000000000000..ad83ab880acc --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductDetailsUpdateParameter.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) 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.EdgeOrder.Models +{ + internal partial class ProductDetailsUpdateParameter : 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(ProductDetailsUpdateParameter)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ParentProvisioningDetails)) + { + writer.WritePropertyName("parentProvisioningDetails"u8); + writer.WriteObjectValue(ParentProvisioningDetails, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ProductDetailsUpdateParameter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProductDetailsUpdateParameter)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProductDetailsUpdateParameter(document.RootElement, options); + } + + internal static ProductDetailsUpdateParameter DeserializeProductDetailsUpdateParameter(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EdgeOrderProvisioningDetails parentProvisioningDetails = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("parentProvisioningDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + parentProvisioningDetails = EdgeOrderProvisioningDetails.DeserializeEdgeOrderProvisioningDetails(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProductDetailsUpdateParameter(parentProvisioningDetails, 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, AzureResourceManagerEdgeOrderContext.Default); + default: + throw new FormatException($"The model {nameof(ProductDetailsUpdateParameter)} does not support writing '{options.Format}' format."); + } + } + + ProductDetailsUpdateParameter IPersistableModel.Create(BinaryData 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 DeserializeProductDetailsUpdateParameter(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProductDetailsUpdateParameter)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductConfigurations.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductDetailsUpdateParameter.cs similarity index 68% rename from sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductConfigurations.cs rename to sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductDetailsUpdateParameter.cs index 14a1f3aabdcb..5ab05feea1b6 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductConfigurations.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductDetailsUpdateParameter.cs @@ -10,8 +10,8 @@ namespace Azure.ResourceManager.EdgeOrder.Models { - /// The list of configurations. - internal partial class ProductConfigurations + /// Represents product details patchable properties. + internal partial class ProductDetailsUpdateParameter { /// /// Keeps track of any properties unknown to the library. @@ -45,26 +45,21 @@ internal partial class ProductConfigurations /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - internal ProductConfigurations() + /// Initializes a new instance of . + public ProductDetailsUpdateParameter() { - Value = new ChangeTrackingList(); } - /// Initializes a new instance of . - /// List of configurations. - /// Link for the next set of configurations. + /// Initializes a new instance of . + /// Device Provisioning Details for Parent. /// Keeps track of any properties unknown to the library. - internal ProductConfigurations(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal ProductDetailsUpdateParameter(EdgeOrderProvisioningDetails parentProvisioningDetails, IDictionary serializedAdditionalRawData) { - Value = value; - NextLink = nextLink; + ParentProvisioningDetails = parentProvisioningDetails; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// List of configurations. - public IReadOnlyList Value { get; } - /// Link for the next set of configurations. - public string NextLink { get; } + /// Device Provisioning Details for Parent. + public EdgeOrderProvisioningDetails ParentProvisioningDetails { get; set; } } } diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamilies.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamilies.Serialization.cs index 1ad0129c0c45..1331f031c950 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamilies.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamilies.Serialization.cs @@ -34,7 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ProductFamilies)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsCollectionDefined(Value)) + if (options.Format != "W") { writer.WritePropertyName("value"u8); writer.WriteStartArray(); @@ -47,7 +47,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +87,13 @@ internal static ProductFamilies DeserializeProductFamilies(JsonElement element, return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +104,11 @@ internal static ProductFamilies DeserializeProductFamilies(JsonElement element, } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +117,7 @@ internal static ProductFamilies DeserializeProductFamilies(JsonElement element, } } serializedAdditionalRawData = rawDataDictionary; - return new ProductFamilies(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new ProductFamilies(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamilies.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamilies.cs index 3be6a64c34ad..865202eeda00 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamilies.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamilies.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.EdgeOrder.Models { @@ -46,25 +47,31 @@ internal partial class ProductFamilies private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ProductFamilies() + /// The ProductFamily items on this page. + internal ProductFamilies(IEnumerable value) { - Value = new ChangeTrackingList(); + Value = value.ToList(); } /// Initializes a new instance of . - /// List of product families. - /// Link for the next set of product families. + /// The ProductFamily items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal ProductFamilies(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal ProductFamilies(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// List of product families. + /// Initializes a new instance of for deserialization. + internal ProductFamilies() + { + } + + /// The ProductFamily items on this page. public IReadOnlyList Value { get; } - /// Link for the next set of product families. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamiliesMetadata.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamiliesMetadata.Serialization.cs index a40062130841..fdccb9c77df0 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamiliesMetadata.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamiliesMetadata.Serialization.cs @@ -36,6 +36,26 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("properties"u8); writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsCollectionDefined(ProductLines)) + { + writer.WritePropertyName("productLines"u8); + writer.WriteStartArray(); + foreach (var item in ProductLines) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(ResourceProviderDetails)) + { + writer.WritePropertyName("resourceProviderDetails"u8); + writer.WriteStartArray(); + foreach (var item in ResourceProviderDetails) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } if (options.Format != "W" && Optional.IsDefined(DisplayName)) { writer.WritePropertyName("displayName"u8); @@ -44,7 +64,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (options.Format != "W" && Optional.IsDefined(Description)) { writer.WritePropertyName("description"u8); - writer.WriteObjectValue(Description, options); + writer.WriteObjectValue(Description, options); } if (options.Format != "W" && Optional.IsCollectionDefined(ImageInformation)) { @@ -52,24 +72,24 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStartArray(); foreach (var item in ImageInformation) { - writer.WriteObjectValue(item, options); + writer.WriteObjectValue(item, options); } writer.WriteEndArray(); } if (options.Format != "W" && Optional.IsDefined(CostInformation)) { writer.WritePropertyName("costInformation"u8); - writer.WriteObjectValue(CostInformation, options); + writer.WriteObjectValue(CostInformation, options); } if (options.Format != "W" && Optional.IsDefined(AvailabilityInformation)) { writer.WritePropertyName("availabilityInformation"u8); - writer.WriteObjectValue(AvailabilityInformation, options); + writer.WriteObjectValue(AvailabilityInformation, options); } if (options.Format != "W" && Optional.IsDefined(HierarchyInformation)) { writer.WritePropertyName("hierarchyInformation"u8); - writer.WriteObjectValue(HierarchyInformation, options); + writer.WriteObjectValue(HierarchyInformation, options); } if (options.Format != "W" && Optional.IsCollectionDefined(FilterableProperties)) { @@ -77,27 +97,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStartArray(); foreach (var item in FilterableProperties) { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (options.Format != "W" && Optional.IsCollectionDefined(ProductLines)) - { - writer.WritePropertyName("productLines"u8); - writer.WriteStartArray(); - foreach (var item in ProductLines) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(ResourceProviderDetails)) - { - writer.WritePropertyName("resourceProviderDetails"u8); - writer.WriteStartArray(); - foreach (var item in ResourceProviderDetails) - { - writer.WriteObjectValue(item, options); + writer.WriteObjectValue(item, options); } writer.WriteEndArray(); } @@ -139,6 +139,8 @@ internal static ProductFamiliesMetadata DeserializeProductFamiliesMetadata(JsonE { return null; } + IReadOnlyList productLines = default; + IReadOnlyList resourceProviderDetails = default; string displayName = default; ProductDescription description = default; IReadOnlyList imageInformation = default; @@ -146,8 +148,6 @@ internal static ProductFamiliesMetadata DeserializeProductFamiliesMetadata(JsonE ProductAvailabilityInformation availabilityInformation = default; HierarchyInformation hierarchyInformation = default; IReadOnlyList filterableProperties = default; - IReadOnlyList productLines = default; - IReadOnlyList resourceProviderDetails = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -161,6 +161,34 @@ internal static ProductFamiliesMetadata DeserializeProductFamiliesMetadata(JsonE } foreach (var property0 in property.Value.EnumerateObject()) { + if (property0.NameEquals("productLines"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(ProductLine.DeserializeProductLine(item, options)); + } + productLines = array; + continue; + } + if (property0.NameEquals("resourceProviderDetails"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(Models.ResourceProviderDetails.DeserializeResourceProviderDetails(item, options)); + } + resourceProviderDetails = array; + continue; + } if (property0.NameEquals("displayName"u8)) { displayName = property0.Value.GetString(); @@ -213,7 +241,7 @@ internal static ProductFamiliesMetadata DeserializeProductFamiliesMetadata(JsonE { continue; } - hierarchyInformation = HierarchyInformation.DeserializeHierarchyInformation(property0.Value, options); + hierarchyInformation = Models.HierarchyInformation.DeserializeHierarchyInformation(property0.Value, options); continue; } if (property0.NameEquals("filterableProperties"u8)) @@ -230,34 +258,6 @@ internal static ProductFamiliesMetadata DeserializeProductFamiliesMetadata(JsonE filterableProperties = array; continue; } - if (property0.NameEquals("productLines"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(ProductLine.DeserializeProductLine(item, options)); - } - productLines = array; - continue; - } - if (property0.NameEquals("resourceProviderDetails"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(Models.ResourceProviderDetails.DeserializeResourceProviderDetails(item, options)); - } - resourceProviderDetails = array; - continue; - } } continue; } @@ -268,6 +268,8 @@ internal static ProductFamiliesMetadata DeserializeProductFamiliesMetadata(JsonE } serializedAdditionalRawData = rawDataDictionary; return new ProductFamiliesMetadata( + productLines ?? new ChangeTrackingList(), + resourceProviderDetails ?? new ChangeTrackingList(), displayName, description, imageInformation ?? new ChangeTrackingList(), @@ -275,8 +277,6 @@ internal static ProductFamiliesMetadata DeserializeProductFamiliesMetadata(JsonE availabilityInformation, hierarchyInformation, filterableProperties ?? new ChangeTrackingList(), - productLines ?? new ChangeTrackingList(), - resourceProviderDetails ?? new ChangeTrackingList(), serializedAdditionalRawData); } diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamiliesMetadata.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamiliesMetadata.cs index b78c4f0b5ffc..73b9cc0b0534 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamiliesMetadata.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamiliesMetadata.cs @@ -48,25 +48,27 @@ public partial class ProductFamiliesMetadata /// Initializes a new instance of . internal ProductFamiliesMetadata() { - ImageInformation = new ChangeTrackingList(); - FilterableProperties = new ChangeTrackingList(); ProductLines = new ChangeTrackingList(); ResourceProviderDetails = new ChangeTrackingList(); + ImageInformation = new ChangeTrackingList(); + FilterableProperties = new ChangeTrackingList(); } /// Initializes a new instance of . - /// Display Name for the product system. - /// Description related to the product system. - /// Image information for the product system. - /// Cost information for the product system. - /// Availability information of the product system. - /// Hierarchy information of a product. - /// list of filters supported for a product. /// List of product lines supported in the product family. /// Contains details related to resource provider. + /// + /// + /// + /// + /// + /// + /// /// Keeps track of any properties unknown to the library. - internal ProductFamiliesMetadata(string displayName, ProductDescription description, IReadOnlyList imageInformation, EdgeOrderProductCostInformation costInformation, ProductAvailabilityInformation availabilityInformation, HierarchyInformation hierarchyInformation, IReadOnlyList filterableProperties, IReadOnlyList productLines, IReadOnlyList resourceProviderDetails, IDictionary serializedAdditionalRawData) + internal ProductFamiliesMetadata(IReadOnlyList productLines, IReadOnlyList resourceProviderDetails, string displayName, ProductDescription description, IReadOnlyList imageInformation, EdgeOrderProductCostInformation costInformation, ProductAvailabilityInformation availabilityInformation, HierarchyInformation hierarchyInformation, IReadOnlyList filterableProperties, IDictionary serializedAdditionalRawData) { + ProductLines = productLines; + ResourceProviderDetails = resourceProviderDetails; DisplayName = displayName; Description = description; ImageInformation = imageInformation; @@ -74,25 +76,9 @@ internal ProductFamiliesMetadata(string displayName, ProductDescription descript AvailabilityInformation = availabilityInformation; HierarchyInformation = hierarchyInformation; FilterableProperties = filterableProperties; - ProductLines = productLines; - ResourceProviderDetails = resourceProviderDetails; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Display Name for the product system. - public string DisplayName { get; } - /// Description related to the product system. - public ProductDescription Description { get; } - /// Image information for the product system. - public IReadOnlyList ImageInformation { get; } - /// Cost information for the product system. - public EdgeOrderProductCostInformation CostInformation { get; } - /// Availability information of the product system. - public ProductAvailabilityInformation AvailabilityInformation { get; } - /// Hierarchy information of a product. - public HierarchyInformation HierarchyInformation { get; } - /// list of filters supported for a product. - public IReadOnlyList FilterableProperties { get; } /// List of product lines supported in the product family. public IReadOnlyList ProductLines { get; } /// Contains details related to resource provider. diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamiliesMetadataListResult.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamiliesMetadataListResult.Serialization.cs index 36cf8eabc793..91214715e7fd 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamiliesMetadataListResult.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamiliesMetadataListResult.Serialization.cs @@ -34,7 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ProductFamiliesMetadataListResult)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsCollectionDefined(Value)) + if (options.Format != "W") { writer.WritePropertyName("value"u8); writer.WriteStartArray(); @@ -44,10 +44,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +87,13 @@ internal static ProductFamiliesMetadataListResult DeserializeProductFamiliesMeta return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +104,11 @@ internal static ProductFamiliesMetadataListResult DeserializeProductFamiliesMeta } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +117,7 @@ internal static ProductFamiliesMetadataListResult DeserializeProductFamiliesMeta } } serializedAdditionalRawData = rawDataDictionary; - return new ProductFamiliesMetadataListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new ProductFamiliesMetadataListResult(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamiliesMetadataListResult.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamiliesMetadataListResult.cs index 7b51dc436edb..b3847145af59 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamiliesMetadataListResult.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamiliesMetadataListResult.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.EdgeOrder.Models { @@ -46,25 +47,31 @@ internal partial class ProductFamiliesMetadataListResult private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ProductFamiliesMetadataListResult() + /// The ProductFamiliesMetadataDetails items on this page. + internal ProductFamiliesMetadataListResult(IEnumerable value) { - Value = new ChangeTrackingList(); + Value = value.ToList(); } /// Initializes a new instance of . - /// List of product family metadata details. - /// Link for the next set of product families. + /// The ProductFamiliesMetadataDetails items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal ProductFamiliesMetadataListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal ProductFamiliesMetadataListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// List of product family metadata details. + /// Initializes a new instance of for deserialization. + internal ProductFamiliesMetadataListResult() + { + } + + /// The ProductFamiliesMetadataDetails items on this page. public IReadOnlyList Value { get; } - /// Link for the next set of product families. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamily.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamily.Serialization.cs index 4289d9deb47f..008fa78d0873 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamily.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamily.Serialization.cs @@ -36,6 +36,26 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("properties"u8); writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsCollectionDefined(ProductLines)) + { + writer.WritePropertyName("productLines"u8); + writer.WriteStartArray(); + foreach (var item in ProductLines) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(ResourceProviderDetails)) + { + writer.WritePropertyName("resourceProviderDetails"u8); + writer.WriteStartArray(); + foreach (var item in ResourceProviderDetails) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } if (options.Format != "W" && Optional.IsDefined(DisplayName)) { writer.WritePropertyName("displayName"u8); @@ -44,7 +64,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (options.Format != "W" && Optional.IsDefined(Description)) { writer.WritePropertyName("description"u8); - writer.WriteObjectValue(Description, options); + writer.WriteObjectValue(Description, options); } if (options.Format != "W" && Optional.IsCollectionDefined(ImageInformation)) { @@ -52,24 +72,24 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStartArray(); foreach (var item in ImageInformation) { - writer.WriteObjectValue(item, options); + writer.WriteObjectValue(item, options); } writer.WriteEndArray(); } if (options.Format != "W" && Optional.IsDefined(CostInformation)) { writer.WritePropertyName("costInformation"u8); - writer.WriteObjectValue(CostInformation, options); + writer.WriteObjectValue(CostInformation, options); } if (options.Format != "W" && Optional.IsDefined(AvailabilityInformation)) { writer.WritePropertyName("availabilityInformation"u8); - writer.WriteObjectValue(AvailabilityInformation, options); + writer.WriteObjectValue(AvailabilityInformation, options); } if (options.Format != "W" && Optional.IsDefined(HierarchyInformation)) { writer.WritePropertyName("hierarchyInformation"u8); - writer.WriteObjectValue(HierarchyInformation, options); + writer.WriteObjectValue(HierarchyInformation, options); } if (options.Format != "W" && Optional.IsCollectionDefined(FilterableProperties)) { @@ -77,27 +97,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStartArray(); foreach (var item in FilterableProperties) { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (options.Format != "W" && Optional.IsCollectionDefined(ProductLines)) - { - writer.WritePropertyName("productLines"u8); - writer.WriteStartArray(); - foreach (var item in ProductLines) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(ResourceProviderDetails)) - { - writer.WritePropertyName("resourceProviderDetails"u8); - writer.WriteStartArray(); - foreach (var item in ResourceProviderDetails) - { - writer.WriteObjectValue(item, options); + writer.WriteObjectValue(item, options); } writer.WriteEndArray(); } @@ -139,6 +139,8 @@ internal static ProductFamily DeserializeProductFamily(JsonElement element, Mode { return null; } + IReadOnlyList productLines = default; + IReadOnlyList resourceProviderDetails = default; string displayName = default; ProductDescription description = default; IReadOnlyList imageInformation = default; @@ -146,8 +148,6 @@ internal static ProductFamily DeserializeProductFamily(JsonElement element, Mode ProductAvailabilityInformation availabilityInformation = default; HierarchyInformation hierarchyInformation = default; IReadOnlyList filterableProperties = default; - IReadOnlyList productLines = default; - IReadOnlyList resourceProviderDetails = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -161,6 +161,34 @@ internal static ProductFamily DeserializeProductFamily(JsonElement element, Mode } foreach (var property0 in property.Value.EnumerateObject()) { + if (property0.NameEquals("productLines"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(ProductLine.DeserializeProductLine(item, options)); + } + productLines = array; + continue; + } + if (property0.NameEquals("resourceProviderDetails"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(Models.ResourceProviderDetails.DeserializeResourceProviderDetails(item, options)); + } + resourceProviderDetails = array; + continue; + } if (property0.NameEquals("displayName"u8)) { displayName = property0.Value.GetString(); @@ -213,7 +241,7 @@ internal static ProductFamily DeserializeProductFamily(JsonElement element, Mode { continue; } - hierarchyInformation = HierarchyInformation.DeserializeHierarchyInformation(property0.Value, options); + hierarchyInformation = Models.HierarchyInformation.DeserializeHierarchyInformation(property0.Value, options); continue; } if (property0.NameEquals("filterableProperties"u8)) @@ -230,34 +258,6 @@ internal static ProductFamily DeserializeProductFamily(JsonElement element, Mode filterableProperties = array; continue; } - if (property0.NameEquals("productLines"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(ProductLine.DeserializeProductLine(item, options)); - } - productLines = array; - continue; - } - if (property0.NameEquals("resourceProviderDetails"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(Models.ResourceProviderDetails.DeserializeResourceProviderDetails(item, options)); - } - resourceProviderDetails = array; - continue; - } } continue; } @@ -268,6 +268,8 @@ internal static ProductFamily DeserializeProductFamily(JsonElement element, Mode } serializedAdditionalRawData = rawDataDictionary; return new ProductFamily( + productLines ?? new ChangeTrackingList(), + resourceProviderDetails ?? new ChangeTrackingList(), displayName, description, imageInformation ?? new ChangeTrackingList(), @@ -275,8 +277,6 @@ internal static ProductFamily DeserializeProductFamily(JsonElement element, Mode availabilityInformation, hierarchyInformation, filterableProperties ?? new ChangeTrackingList(), - productLines ?? new ChangeTrackingList(), - resourceProviderDetails ?? new ChangeTrackingList(), serializedAdditionalRawData); } diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamily.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamily.cs index 2438a32be5b5..ffc6f02a7737 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamily.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductFamily.cs @@ -48,25 +48,27 @@ public partial class ProductFamily /// Initializes a new instance of . internal ProductFamily() { - ImageInformation = new ChangeTrackingList(); - FilterableProperties = new ChangeTrackingList(); ProductLines = new ChangeTrackingList(); ResourceProviderDetails = new ChangeTrackingList(); + ImageInformation = new ChangeTrackingList(); + FilterableProperties = new ChangeTrackingList(); } /// Initializes a new instance of . - /// Display Name for the product system. - /// Description related to the product system. - /// Image information for the product system. - /// Cost information for the product system. - /// Availability information of the product system. - /// Hierarchy information of a product. - /// list of filters supported for a product. /// List of product lines supported in the product family. /// Contains details related to resource provider. + /// + /// + /// + /// + /// + /// + /// /// Keeps track of any properties unknown to the library. - internal ProductFamily(string displayName, ProductDescription description, IReadOnlyList imageInformation, EdgeOrderProductCostInformation costInformation, ProductAvailabilityInformation availabilityInformation, HierarchyInformation hierarchyInformation, IReadOnlyList filterableProperties, IReadOnlyList productLines, IReadOnlyList resourceProviderDetails, IDictionary serializedAdditionalRawData) + internal ProductFamily(IReadOnlyList productLines, IReadOnlyList resourceProviderDetails, string displayName, ProductDescription description, IReadOnlyList imageInformation, EdgeOrderProductCostInformation costInformation, ProductAvailabilityInformation availabilityInformation, HierarchyInformation hierarchyInformation, IReadOnlyList filterableProperties, IDictionary serializedAdditionalRawData) { + ProductLines = productLines; + ResourceProviderDetails = resourceProviderDetails; DisplayName = displayName; Description = description; ImageInformation = imageInformation; @@ -74,25 +76,9 @@ internal ProductFamily(string displayName, ProductDescription description, IRead AvailabilityInformation = availabilityInformation; HierarchyInformation = hierarchyInformation; FilterableProperties = filterableProperties; - ProductLines = productLines; - ResourceProviderDetails = resourceProviderDetails; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Display Name for the product system. - public string DisplayName { get; } - /// Description related to the product system. - public ProductDescription Description { get; } - /// Image information for the product system. - public IReadOnlyList ImageInformation { get; } - /// Cost information for the product system. - public EdgeOrderProductCostInformation CostInformation { get; } - /// Availability information of the product system. - public ProductAvailabilityInformation AvailabilityInformation { get; } - /// Hierarchy information of a product. - public HierarchyInformation HierarchyInformation { get; } - /// list of filters supported for a product. - public IReadOnlyList FilterableProperties { get; } /// List of product lines supported in the product family. public IReadOnlyList ProductLines { get; } /// Contains details related to resource provider. diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductLine.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductLine.Serialization.cs index 3ca74f228ce6..6f01b2f4dd69 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductLine.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductLine.Serialization.cs @@ -36,6 +36,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("properties"u8); writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsCollectionDefined(Products)) + { + writer.WritePropertyName("products"u8); + writer.WriteStartArray(); + foreach (var item in Products) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } if (options.Format != "W" && Optional.IsDefined(DisplayName)) { writer.WritePropertyName("displayName"u8); @@ -44,7 +54,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (options.Format != "W" && Optional.IsDefined(Description)) { writer.WritePropertyName("description"u8); - writer.WriteObjectValue(Description, options); + writer.WriteObjectValue(Description, options); } if (options.Format != "W" && Optional.IsCollectionDefined(ImageInformation)) { @@ -52,24 +62,24 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStartArray(); foreach (var item in ImageInformation) { - writer.WriteObjectValue(item, options); + writer.WriteObjectValue(item, options); } writer.WriteEndArray(); } if (options.Format != "W" && Optional.IsDefined(CostInformation)) { writer.WritePropertyName("costInformation"u8); - writer.WriteObjectValue(CostInformation, options); + writer.WriteObjectValue(CostInformation, options); } if (options.Format != "W" && Optional.IsDefined(AvailabilityInformation)) { writer.WritePropertyName("availabilityInformation"u8); - writer.WriteObjectValue(AvailabilityInformation, options); + writer.WriteObjectValue(AvailabilityInformation, options); } if (options.Format != "W" && Optional.IsDefined(HierarchyInformation)) { writer.WritePropertyName("hierarchyInformation"u8); - writer.WriteObjectValue(HierarchyInformation, options); + writer.WriteObjectValue(HierarchyInformation, options); } if (options.Format != "W" && Optional.IsCollectionDefined(FilterableProperties)) { @@ -77,17 +87,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStartArray(); foreach (var item in FilterableProperties) { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (options.Format != "W" && Optional.IsCollectionDefined(Products)) - { - writer.WritePropertyName("products"u8); - writer.WriteStartArray(); - foreach (var item in Products) - { - writer.WriteObjectValue(item, options); + writer.WriteObjectValue(item, options); } writer.WriteEndArray(); } @@ -129,6 +129,7 @@ internal static ProductLine DeserializeProductLine(JsonElement element, ModelRea { return null; } + IReadOnlyList products = default; string displayName = default; ProductDescription description = default; IReadOnlyList imageInformation = default; @@ -136,7 +137,6 @@ internal static ProductLine DeserializeProductLine(JsonElement element, ModelRea ProductAvailabilityInformation availabilityInformation = default; HierarchyInformation hierarchyInformation = default; IReadOnlyList filterableProperties = default; - IReadOnlyList products = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -150,6 +150,20 @@ internal static ProductLine DeserializeProductLine(JsonElement element, ModelRea } foreach (var property0 in property.Value.EnumerateObject()) { + if (property0.NameEquals("products"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(EdgeOrderProduct.DeserializeEdgeOrderProduct(item, options)); + } + products = array; + continue; + } if (property0.NameEquals("displayName"u8)) { displayName = property0.Value.GetString(); @@ -202,7 +216,7 @@ internal static ProductLine DeserializeProductLine(JsonElement element, ModelRea { continue; } - hierarchyInformation = HierarchyInformation.DeserializeHierarchyInformation(property0.Value, options); + hierarchyInformation = Models.HierarchyInformation.DeserializeHierarchyInformation(property0.Value, options); continue; } if (property0.NameEquals("filterableProperties"u8)) @@ -219,20 +233,6 @@ internal static ProductLine DeserializeProductLine(JsonElement element, ModelRea filterableProperties = array; continue; } - if (property0.NameEquals("products"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(EdgeOrderProduct.DeserializeEdgeOrderProduct(item, options)); - } - products = array; - continue; - } } continue; } @@ -243,6 +243,7 @@ internal static ProductLine DeserializeProductLine(JsonElement element, ModelRea } serializedAdditionalRawData = rawDataDictionary; return new ProductLine( + products ?? new ChangeTrackingList(), displayName, description, imageInformation ?? new ChangeTrackingList(), @@ -250,7 +251,6 @@ internal static ProductLine DeserializeProductLine(JsonElement element, ModelRea availabilityInformation, hierarchyInformation, filterableProperties ?? new ChangeTrackingList(), - products ?? new ChangeTrackingList(), serializedAdditionalRawData); } diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductLine.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductLine.cs index d2a7c50e8cc8..e650054a7ff3 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductLine.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductLine.cs @@ -48,23 +48,24 @@ public partial class ProductLine /// Initializes a new instance of . internal ProductLine() { + Products = new ChangeTrackingList(); ImageInformation = new ChangeTrackingList(); FilterableProperties = new ChangeTrackingList(); - Products = new ChangeTrackingList(); } /// Initializes a new instance of . - /// Display Name for the product system. - /// Description related to the product system. - /// Image information for the product system. - /// Cost information for the product system. - /// Availability information of the product system. - /// Hierarchy information of a product. - /// list of filters supported for a product. /// List of products in the product line. + /// + /// + /// + /// + /// + /// + /// /// Keeps track of any properties unknown to the library. - internal ProductLine(string displayName, ProductDescription description, IReadOnlyList imageInformation, EdgeOrderProductCostInformation costInformation, ProductAvailabilityInformation availabilityInformation, HierarchyInformation hierarchyInformation, IReadOnlyList filterableProperties, IReadOnlyList products, IDictionary serializedAdditionalRawData) + internal ProductLine(IReadOnlyList products, string displayName, ProductDescription description, IReadOnlyList imageInformation, EdgeOrderProductCostInformation costInformation, ProductAvailabilityInformation availabilityInformation, HierarchyInformation hierarchyInformation, IReadOnlyList filterableProperties, IDictionary serializedAdditionalRawData) { + Products = products; DisplayName = displayName; Description = description; ImageInformation = imageInformation; @@ -72,24 +73,9 @@ internal ProductLine(string displayName, ProductDescription description, IReadOn AvailabilityInformation = availabilityInformation; HierarchyInformation = hierarchyInformation; FilterableProperties = filterableProperties; - Products = products; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Display Name for the product system. - public string DisplayName { get; } - /// Description related to the product system. - public ProductDescription Description { get; } - /// Image information for the product system. - public IReadOnlyList ImageInformation { get; } - /// Cost information for the product system. - public EdgeOrderProductCostInformation CostInformation { get; } - /// Availability information of the product system. - public ProductAvailabilityInformation AvailabilityInformation { get; } - /// Hierarchy information of a product. - public HierarchyInformation HierarchyInformation { get; } - /// list of filters supported for a product. - public IReadOnlyList FilterableProperties { get; } /// List of products in the product line. public IReadOnlyList Products { get; } } diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductLinkType.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductLinkType.cs index 42dd55a25b7e..95661143d8ca 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductLinkType.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductLinkType.cs @@ -28,6 +28,7 @@ public ProductLinkType(string value) private const string DocumentationValue = "Documentation"; private const string KnowMoreValue = "KnowMore"; private const string SignUpValue = "SignUp"; + private const string DiscoverableValue = "Discoverable"; /// Generic link. public static ProductLinkType Generic { get; } = new ProductLinkType(GenericValue); @@ -41,6 +42,8 @@ public ProductLinkType(string value) public static ProductLinkType KnowMore { get; } = new ProductLinkType(KnowMoreValue); /// Link to sign up for products. public static ProductLinkType SignUp { get; } = new ProductLinkType(SignUpValue); + /// Link to order the product from another source and not from Azure Edge Hardware Center. + public static ProductLinkType Discoverable { get; } = new ProductLinkType(DiscoverableValue); /// Determines if two values are the same. public static bool operator ==(ProductLinkType left, ProductLinkType right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductSpecification.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductSpecification.cs index b8013aed62da..93dc7b9c0c4f 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductSpecification.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/ProductSpecification.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.EdgeOrder.Models { - /// Specifications of the configurations. + /// Specification of the configurations. public partial class ProductSpecification { /// diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/SiteDetails.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/SiteDetails.Serialization.cs new file mode 100644 index 000000000000..81384ba8c1fa --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/SiteDetails.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.EdgeOrder.Models +{ + internal partial class SiteDetails : 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(SiteDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("siteId"u8); + writer.WriteStringValue(SiteId); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var 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 + } + } + } + + SiteDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SiteDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSiteDetails(document.RootElement, options); + } + + internal static SiteDetails DeserializeSiteDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string siteId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("siteId"u8)) + { + siteId = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SiteDetails(siteId, 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, AzureResourceManagerEdgeOrderContext.Default); + default: + throw new FormatException($"The model {nameof(SiteDetails)} does not support writing '{options.Format}' format."); + } + } + + SiteDetails IPersistableModel.Create(BinaryData 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 DeserializeSiteDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SiteDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/SiteDetails.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/SiteDetails.cs new file mode 100644 index 000000000000..5921a414d87b --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/SiteDetails.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.EdgeOrder.Models +{ + /// Represents Site Related Details. + internal partial class SiteDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Unique Id, Identifying A Site. + /// is null. + public SiteDetails(string siteId) + { + Argument.AssertNotNull(siteId, nameof(siteId)); + + SiteId = siteId; + } + + /// Initializes a new instance of . + /// Unique Id, Identifying A Site. + /// Keeps track of any properties unknown to the library. + internal SiteDetails(string siteId, IDictionary serializedAdditionalRawData) + { + SiteId = siteId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SiteDetails() + { + } + + /// Unique Id, Identifying A Site. + public string SiteId { get; set; } + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/TermCommitmentInformation.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/TermCommitmentInformation.Serialization.cs new file mode 100644 index 000000000000..10367b325941 --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/TermCommitmentInformation.Serialization.cs @@ -0,0 +1,156 @@ +// Copyright (c) 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.EdgeOrder.Models +{ + public partial class TermCommitmentInformation : 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(TermCommitmentInformation)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("termCommitmentType"u8); + writer.WriteStringValue(TermCommitmentType.ToString()); + if (options.Format != "W" && Optional.IsDefined(TermCommitmentTypeDuration)) + { + writer.WritePropertyName("termCommitmentTypeDuration"u8); + writer.WriteStringValue(TermCommitmentTypeDuration.Value, "P"); + } + if (options.Format != "W" && Optional.IsDefined(PendingDaysForTerm)) + { + writer.WritePropertyName("pendingDaysForTerm"u8); + writer.WriteNumberValue(PendingDaysForTerm.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + TermCommitmentInformation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TermCommitmentInformation)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTermCommitmentInformation(document.RootElement, options); + } + + internal static TermCommitmentInformation DeserializeTermCommitmentInformation(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + TermCommitmentType termCommitmentType = default; + TimeSpan? termCommitmentTypeDuration = default; + int? pendingDaysForTerm = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("termCommitmentType"u8)) + { + termCommitmentType = new TermCommitmentType(property.Value.GetString()); + continue; + } + if (property.NameEquals("termCommitmentTypeDuration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + termCommitmentTypeDuration = property.Value.GetTimeSpan("P"); + continue; + } + if (property.NameEquals("pendingDaysForTerm"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + pendingDaysForTerm = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new TermCommitmentInformation(termCommitmentType, termCommitmentTypeDuration, pendingDaysForTerm, 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, AzureResourceManagerEdgeOrderContext.Default); + default: + throw new FormatException($"The model {nameof(TermCommitmentInformation)} does not support writing '{options.Format}' format."); + } + } + + TermCommitmentInformation IPersistableModel.Create(BinaryData 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 DeserializeTermCommitmentInformation(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TermCommitmentInformation)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/TermCommitmentInformation.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/TermCommitmentInformation.cs new file mode 100644 index 000000000000..9a6c096af664 --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/TermCommitmentInformation.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.EdgeOrder.Models +{ + /// Term Commitment Information. + public partial class TermCommitmentInformation + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Term Commitment Type. + internal TermCommitmentInformation(TermCommitmentType termCommitmentType) + { + TermCommitmentType = termCommitmentType; + } + + /// Initializes a new instance of . + /// Term Commitment Type. + /// Term Commitment Duration. Currently Supporting P365D, P1095D. + /// Number of Days Pending for Term Commitment. + /// Keeps track of any properties unknown to the library. + internal TermCommitmentInformation(TermCommitmentType termCommitmentType, TimeSpan? termCommitmentTypeDuration, int? pendingDaysForTerm, IDictionary serializedAdditionalRawData) + { + TermCommitmentType = termCommitmentType; + TermCommitmentTypeDuration = termCommitmentTypeDuration; + PendingDaysForTerm = pendingDaysForTerm; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal TermCommitmentInformation() + { + } + + /// Term Commitment Type. + public TermCommitmentType TermCommitmentType { get; } + /// Term Commitment Duration. Currently Supporting P365D, P1095D. + public TimeSpan? TermCommitmentTypeDuration { get; } + /// Number of Days Pending for Term Commitment. + public int? PendingDaysForTerm { get; } + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/TermCommitmentPreferences.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/TermCommitmentPreferences.Serialization.cs new file mode 100644 index 000000000000..f9f2a1899c98 --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/TermCommitmentPreferences.Serialization.cs @@ -0,0 +1,141 @@ +// Copyright (c) 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.EdgeOrder.Models +{ + public partial class TermCommitmentPreferences : 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(TermCommitmentPreferences)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("preferredTermCommitmentType"u8); + writer.WriteStringValue(PreferredTermCommitmentType.ToString()); + if (Optional.IsDefined(PreferredTermCommitmentDuration)) + { + writer.WritePropertyName("preferredTermCommitmentDuration"u8); + writer.WriteStringValue(PreferredTermCommitmentDuration.Value, "P"); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + TermCommitmentPreferences IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TermCommitmentPreferences)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTermCommitmentPreferences(document.RootElement, options); + } + + internal static TermCommitmentPreferences DeserializeTermCommitmentPreferences(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + TermCommitmentType preferredTermCommitmentType = default; + TimeSpan? preferredTermCommitmentDuration = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("preferredTermCommitmentType"u8)) + { + preferredTermCommitmentType = new TermCommitmentType(property.Value.GetString()); + continue; + } + if (property.NameEquals("preferredTermCommitmentDuration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + preferredTermCommitmentDuration = property.Value.GetTimeSpan("P"); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new TermCommitmentPreferences(preferredTermCommitmentType, preferredTermCommitmentDuration, 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, AzureResourceManagerEdgeOrderContext.Default); + default: + throw new FormatException($"The model {nameof(TermCommitmentPreferences)} does not support writing '{options.Format}' format."); + } + } + + TermCommitmentPreferences IPersistableModel.Create(BinaryData 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 DeserializeTermCommitmentPreferences(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TermCommitmentPreferences)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/TermCommitmentPreferences.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/TermCommitmentPreferences.cs new file mode 100644 index 000000000000..ca1f4f0ca154 --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/TermCommitmentPreferences.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.EdgeOrder.Models +{ + /// Term Commitment preference received from customer. + public partial class TermCommitmentPreferences + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Term Commitment Type. + public TermCommitmentPreferences(TermCommitmentType preferredTermCommitmentType) + { + PreferredTermCommitmentType = preferredTermCommitmentType; + } + + /// Initializes a new instance of . + /// Term Commitment Type. + /// Customer preferred Term Duration. + /// Keeps track of any properties unknown to the library. + internal TermCommitmentPreferences(TermCommitmentType preferredTermCommitmentType, TimeSpan? preferredTermCommitmentDuration, IDictionary serializedAdditionalRawData) + { + PreferredTermCommitmentType = preferredTermCommitmentType; + PreferredTermCommitmentDuration = preferredTermCommitmentDuration; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal TermCommitmentPreferences() + { + } + + /// Term Commitment Type. + public TermCommitmentType PreferredTermCommitmentType { get; set; } + /// Customer preferred Term Duration. + public TimeSpan? PreferredTermCommitmentDuration { get; set; } + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/TermCommitmentType.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/TermCommitmentType.cs new file mode 100644 index 000000000000..4fec635dc9be --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/TermCommitmentType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.EdgeOrder.Models +{ + /// Term Commitment Type. + public readonly partial struct TermCommitmentType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public TermCommitmentType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "None"; + private const string TrialValue = "Trial"; + private const string TimedValue = "Timed"; + + /// Pay as you go Term Commitment Model. + public static TermCommitmentType None { get; } = new TermCommitmentType(NoneValue); + /// Trial Term Commitment Model. + public static TermCommitmentType Trial { get; } = new TermCommitmentType(TrialValue); + /// Time based Term Commitment Model. + public static TermCommitmentType Timed { get; } = new TermCommitmentType(TimedValue); + /// Determines if two values are the same. + public static bool operator ==(TermCommitmentType left, TermCommitmentType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(TermCommitmentType left, TermCommitmentType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator TermCommitmentType(string value) => new TermCommitmentType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is TermCommitmentType other && Equals(other); + /// + public bool Equals(TermCommitmentType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/TermTypeDetails.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/TermTypeDetails.Serialization.cs new file mode 100644 index 000000000000..e8996879f61a --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/TermTypeDetails.Serialization.cs @@ -0,0 +1,134 @@ +// Copyright (c) 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.EdgeOrder.Models +{ + public partial class TermTypeDetails : 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(TermTypeDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("termType"u8); + writer.WriteStringValue(TermType.ToString()); + writer.WritePropertyName("termTypeDuration"u8); + writer.WriteStringValue(TermTypeDuration, "P"); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + TermTypeDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TermTypeDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTermTypeDetails(document.RootElement, options); + } + + internal static TermTypeDetails DeserializeTermTypeDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + TermCommitmentType termType = default; + TimeSpan termTypeDuration = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("termType"u8)) + { + termType = new TermCommitmentType(property.Value.GetString()); + continue; + } + if (property.NameEquals("termTypeDuration"u8)) + { + termTypeDuration = property.Value.GetTimeSpan("P"); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new TermTypeDetails(termType, termTypeDuration, 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, AzureResourceManagerEdgeOrderContext.Default); + default: + throw new FormatException($"The model {nameof(TermTypeDetails)} does not support writing '{options.Format}' format."); + } + } + + TermTypeDetails IPersistableModel.Create(BinaryData 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 DeserializeTermTypeDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TermTypeDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/TermTypeDetails.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/TermTypeDetails.cs new file mode 100644 index 000000000000..e04b26ecf7ff --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/TermTypeDetails.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.EdgeOrder.Models +{ + /// Holds details about term type and duration. + public partial class TermTypeDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Term Commitment Type. + /// Duration for the term type. + internal TermTypeDetails(TermCommitmentType termType, TimeSpan termTypeDuration) + { + TermType = termType; + TermTypeDuration = termTypeDuration; + } + + /// Initializes a new instance of . + /// Term Commitment Type. + /// Duration for the term type. + /// Keeps track of any properties unknown to the library. + internal TermTypeDetails(TermCommitmentType termType, TimeSpan termTypeDuration, IDictionary serializedAdditionalRawData) + { + TermType = termType; + TermTypeDuration = termTypeDuration; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal TermTypeDetails() + { + } + + /// Term Commitment Type. + public TermCommitmentType TermType { get; } + /// Duration for the term type. + public TimeSpan TermTypeDuration { get; } + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/UnknownMeterDetails.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/UnknownMeterDetails.cs index 95770966dd70..9973a907f1fa 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/UnknownMeterDetails.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/Models/UnknownMeterDetails.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.EdgeOrder.Models { - /// Unknown version of MeterDetails. + /// Unknown version of EdgeOrderProductMeterDetails. internal partial class UnknownMeterDetails : EdgeOrderProductMeterDetails { /// Initializes a new instance of . diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/RestOperations/AddressResourcesRestOperations.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/RestOperations/AddressResourcesRestOperations.cs new file mode 100644 index 000000000000..bb9d3c5a3727 --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/RestOperations/AddressResourcesRestOperations.cs @@ -0,0 +1,806 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.EdgeOrder.Models; + +namespace Azure.ResourceManager.EdgeOrder +{ + internal partial class AddressResourcesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of AddressResourcesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public AddressResourcesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-02-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string addressName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.EdgeOrder/addresses/", false); + uri.AppendPath(addressName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string addressName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.EdgeOrder/addresses/", false); + uri.AppendPath(addressName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get information about the specified address. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the address Resource within the specified resource group. address names must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string addressName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(addressName, nameof(addressName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, addressName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EdgeOrderAddressData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EdgeOrderAddressData.DeserializeEdgeOrderAddressData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EdgeOrderAddressData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get information about the specified address. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the address Resource within the specified resource group. address names must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string addressName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(addressName, nameof(addressName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, addressName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EdgeOrderAddressData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EdgeOrderAddressData.DeserializeEdgeOrderAddressData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EdgeOrderAddressData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string addressName, EdgeOrderAddressData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.EdgeOrder/addresses/", false); + uri.AppendPath(addressName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string addressName, EdgeOrderAddressData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.EdgeOrder/addresses/", false); + uri.AppendPath(addressName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// + /// Create a new address with the specified parameters. Existing address cannot be updated with this API and should + /// instead be updated with the Update address API. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the address Resource within the specified resource group. address names must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + /// Address details from request body. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string addressName, EdgeOrderAddressData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(addressName, nameof(addressName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, addressName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// + /// Create a new address with the specified parameters. Existing address cannot be updated with this API and should + /// instead be updated with the Update address API. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the address Resource within the specified resource group. address names must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + /// Address details from request body. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Create(string subscriptionId, string resourceGroupName, string addressName, EdgeOrderAddressData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(addressName, nameof(addressName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, addressName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string addressName, EdgeOrderAddressPatch patch, string ifMatch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.EdgeOrder/addresses/", false); + uri.AppendPath(addressName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string addressName, EdgeOrderAddressPatch patch, string ifMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.EdgeOrder/addresses/", false); + uri.AppendPath(addressName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch); + } + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update the properties of an existing address. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the address Resource within the specified resource group. address names must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + /// Address update parameters from request body. + /// Defines the If-Match condition. The patch will be performed only if the ETag of the job on the server matches this value. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string addressName, EdgeOrderAddressPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(addressName, nameof(addressName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, addressName, patch, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update the properties of an existing address. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the address Resource within the specified resource group. address names must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + /// Address update parameters from request body. + /// Defines the If-Match condition. The patch will be performed only if the ETag of the job on the server matches this value. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string addressName, EdgeOrderAddressPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(addressName, nameof(addressName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, addressName, patch, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string addressName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.EdgeOrder/addresses/", false); + uri.AppendPath(addressName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string addressName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.EdgeOrder/addresses/", false); + uri.AppendPath(addressName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + _userAgent.Apply(message); + return message; + } + + /// Delete an address. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the address Resource within the specified resource group. address names must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string addressName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(addressName, nameof(addressName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, addressName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete an address. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the address Resource within the specified resource group. address names must be between 3 and 24 characters in length and use any alphanumeric and underscore only. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string addressName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(addressName, nameof(addressName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, addressName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName, string filter, string skipToken, int? top) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.EdgeOrder/addresses", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + if (skipToken != null) + { + uri.AppendQuery("$skipToken", skipToken, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + return uri; + } + + internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName, string filter, string skipToken, int? top) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.EdgeOrder/addresses", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + if (skipToken != null) + { + uri.AppendQuery("$skipToken", skipToken, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List all the addresses available under the given resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// $filter is supported to filter based on shipping address properties. Filter supports only equals operation. + /// $skipToken is supported on Get list of addresses, which provides the next page in the list of addresses. + /// $top is supported on fetching list of resources. $top=10 means that the first 10 items in the list will be returned to the API caller. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, string filter = null, string skipToken = null, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName, filter, skipToken, top); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AddressResourceList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AddressResourceList.DeserializeAddressResourceList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List all the addresses available under the given resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// $filter is supported to filter based on shipping address properties. Filter supports only equals operation. + /// $skipToken is supported on Get list of addresses, which provides the next page in the list of addresses. + /// $top is supported on fetching list of resources. $top=10 means that the first 10 items in the list will be returned to the API caller. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, string filter = null, string skipToken = null, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName, filter, skipToken, top); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AddressResourceList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AddressResourceList.DeserializeAddressResourceList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySubscriptionRequestUri(string subscriptionId, string filter, string skipToken, int? top) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.EdgeOrder/addresses", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + if (skipToken != null) + { + uri.AppendQuery("$skipToken", skipToken, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + return uri; + } + + internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId, string filter, string skipToken, int? top) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.EdgeOrder/addresses", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + if (skipToken != null) + { + uri.AppendQuery("$skipToken", skipToken, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List all the addresses available under the subscription. + /// The ID of the target subscription. The value must be an UUID. + /// $filter is supported to filter based on shipping address properties. Filter supports only equals operation. + /// $skipToken is supported on Get list of addresses, which provides the next page in the list of addresses. + /// $top is supported on fetching list of resources. $top=10 means that the first 10 items in the list will be returned to the API caller. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionAsync(string subscriptionId, string filter = null, string skipToken = null, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId, filter, skipToken, top); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AddressResourceList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AddressResourceList.DeserializeAddressResourceList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List all the addresses available under the subscription. + /// The ID of the target subscription. The value must be an UUID. + /// $filter is supported to filter based on shipping address properties. Filter supports only equals operation. + /// $skipToken is supported on Get list of addresses, which provides the next page in the list of addresses. + /// $top is supported on fetching list of resources. $top=10 means that the first 10 items in the list will be returned to the API caller. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscription(string subscriptionId, string filter = null, string skipToken = null, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId, filter, skipToken, top); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AddressResourceList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AddressResourceList.DeserializeAddressResourceList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string filter, string skipToken, int? top) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string filter, string skipToken, int? top) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List all the addresses available under the given resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// $filter is supported to filter based on shipping address properties. Filter supports only equals operation. + /// $skipToken is supported on Get list of addresses, which provides the next page in the list of addresses. + /// $top is supported on fetching list of resources. $top=10 means that the first 10 items in the list will be returned to the API caller. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string filter = null, string skipToken = null, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName, filter, skipToken, top); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AddressResourceList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AddressResourceList.DeserializeAddressResourceList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List all the addresses available under the given resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// $filter is supported to filter based on shipping address properties. Filter supports only equals operation. + /// $skipToken is supported on Get list of addresses, which provides the next page in the list of addresses. + /// $top is supported on fetching list of resources. $top=10 means that the first 10 items in the list will be returned to the API caller. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, string filter = null, string skipToken = null, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName, filter, skipToken, top); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AddressResourceList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AddressResourceList.DeserializeAddressResourceList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySubscriptionNextPageRequestUri(string nextLink, string subscriptionId, string filter, string skipToken, int? top) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId, string filter, string skipToken, int? top) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List all the addresses available under the subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// $filter is supported to filter based on shipping address properties. Filter supports only equals operation. + /// $skipToken is supported on Get list of addresses, which provides the next page in the list of addresses. + /// $top is supported on fetching list of resources. $top=10 means that the first 10 items in the list will be returned to the API caller. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, string filter = null, string skipToken = null, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId, filter, skipToken, top); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AddressResourceList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AddressResourceList.DeserializeAddressResourceList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List all the addresses available under the subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// $filter is supported to filter based on shipping address properties. Filter supports only equals operation. + /// $skipToken is supported on Get list of addresses, which provides the next page in the list of addresses. + /// $top is supported on fetching list of resources. $top=10 means that the first 10 items in the list will be returned to the API caller. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, string filter = null, string skipToken = null, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId, filter, skipToken, top); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AddressResourceList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AddressResourceList.DeserializeAddressResourceList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/RestOperations/EdgeOrderManagementRestOperations.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/RestOperations/EdgeOrderManagementRestOperations.cs deleted file mode 100644 index ba6164a9fde2..000000000000 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/RestOperations/EdgeOrderManagementRestOperations.cs +++ /dev/null @@ -1,2721 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.EdgeOrder.Models; - -namespace Azure.ResourceManager.EdgeOrder -{ - internal partial class EdgeOrderManagementRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of EdgeOrderManagementRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public EdgeOrderManagementRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-12-01"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal RequestUriBuilder CreateListAddressesAtSubscriptionLevelRequestUri(string subscriptionId, string filter, string skipToken) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.EdgeOrder/addresses", false); - uri.AppendQuery("api-version", _apiVersion, true); - if (filter != null) - { - uri.AppendQuery("$filter", filter, true); - } - if (skipToken != null) - { - uri.AppendQuery("$skipToken", skipToken, true); - } - return uri; - } - - internal HttpMessage CreateListAddressesAtSubscriptionLevelRequest(string subscriptionId, string filter, string skipToken) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.EdgeOrder/addresses", false); - uri.AppendQuery("api-version", _apiVersion, true); - if (filter != null) - { - uri.AppendQuery("$filter", filter, true); - } - if (skipToken != null) - { - uri.AppendQuery("$skipToken", skipToken, true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists all the addresses available under the subscription. - /// The ID of the target subscription. - /// $filter is supported to filter based on shipping address properties. Filter supports only equals operation. - /// $skipToken is supported on Get list of addresses, which provides the next page in the list of addresses. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListAddressesAtSubscriptionLevelAsync(string subscriptionId, string filter = null, string skipToken = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListAddressesAtSubscriptionLevelRequest(subscriptionId, filter, skipToken); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - AddressResourceList value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = AddressResourceList.DeserializeAddressResourceList(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists all the addresses available under the subscription. - /// The ID of the target subscription. - /// $filter is supported to filter based on shipping address properties. Filter supports only equals operation. - /// $skipToken is supported on Get list of addresses, which provides the next page in the list of addresses. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public Response ListAddressesAtSubscriptionLevel(string subscriptionId, string filter = null, string skipToken = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListAddressesAtSubscriptionLevelRequest(subscriptionId, filter, skipToken); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - AddressResourceList value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = AddressResourceList.DeserializeAddressResourceList(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListProductFamiliesRequestUri(string subscriptionId, ProductFamiliesContent content, string expand, string skipToken) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.EdgeOrder/listProductFamilies", false); - uri.AppendQuery("api-version", _apiVersion, true); - if (expand != null) - { - uri.AppendQuery("$expand", expand, true); - } - if (skipToken != null) - { - uri.AppendQuery("$skipToken", skipToken, true); - } - return uri; - } - - internal HttpMessage CreateListProductFamiliesRequest(string subscriptionId, ProductFamiliesContent content, string expand, string skipToken) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.EdgeOrder/listProductFamilies", false); - uri.AppendQuery("api-version", _apiVersion, true); - if (expand != null) - { - uri.AppendQuery("$expand", expand, true); - } - if (skipToken != null) - { - uri.AppendQuery("$skipToken", skipToken, true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); - request.Content = content0; - _userAgent.Apply(message); - return message; - } - - /// This method provides the list of product families for the given subscription. - /// The ID of the target subscription. - /// Filters for showing the product families. - /// $expand is supported on configurations parameter for product, which provides details on the configurations for the product. - /// $skipToken is supported on list of product families, which provides the next page in the list of product families. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListProductFamiliesAsync(string subscriptionId, ProductFamiliesContent content, string expand = null, string skipToken = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateListProductFamiliesRequest(subscriptionId, content, expand, skipToken); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - ProductFamilies value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ProductFamilies.DeserializeProductFamilies(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// This method provides the list of product families for the given subscription. - /// The ID of the target subscription. - /// Filters for showing the product families. - /// $expand is supported on configurations parameter for product, which provides details on the configurations for the product. - /// $skipToken is supported on list of product families, which provides the next page in the list of product families. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public Response ListProductFamilies(string subscriptionId, ProductFamiliesContent content, string expand = null, string skipToken = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateListProductFamiliesRequest(subscriptionId, content, expand, skipToken); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - ProductFamilies value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ProductFamilies.DeserializeProductFamilies(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListConfigurationsRequestUri(string subscriptionId, ConfigurationsContent content, string skipToken) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.EdgeOrder/listConfigurations", false); - uri.AppendQuery("api-version", _apiVersion, true); - if (skipToken != null) - { - uri.AppendQuery("$skipToken", skipToken, true); - } - return uri; - } - - internal HttpMessage CreateListConfigurationsRequest(string subscriptionId, ConfigurationsContent content, string skipToken) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.EdgeOrder/listConfigurations", false); - uri.AppendQuery("api-version", _apiVersion, true); - if (skipToken != null) - { - uri.AppendQuery("$skipToken", skipToken, true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); - request.Content = content0; - _userAgent.Apply(message); - return message; - } - - /// This method provides the list of configurations for the given product family, product line and product under subscription. - /// The ID of the target subscription. - /// Filters for showing the configurations. - /// $skipToken is supported on list of configurations, which provides the next page in the list of configurations. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListConfigurationsAsync(string subscriptionId, ConfigurationsContent content, string skipToken = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateListConfigurationsRequest(subscriptionId, content, skipToken); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - ProductConfigurations value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ProductConfigurations.DeserializeProductConfigurations(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// This method provides the list of configurations for the given product family, product line and product under subscription. - /// The ID of the target subscription. - /// Filters for showing the configurations. - /// $skipToken is supported on list of configurations, which provides the next page in the list of configurations. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public Response ListConfigurations(string subscriptionId, ConfigurationsContent content, string skipToken = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateListConfigurationsRequest(subscriptionId, content, skipToken); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - ProductConfigurations value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ProductConfigurations.DeserializeProductConfigurations(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListProductFamiliesMetadataRequestUri(string subscriptionId, string skipToken) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.EdgeOrder/productFamiliesMetadata", false); - uri.AppendQuery("api-version", _apiVersion, true); - if (skipToken != null) - { - uri.AppendQuery("$skipToken", skipToken, true); - } - return uri; - } - - internal HttpMessage CreateListProductFamiliesMetadataRequest(string subscriptionId, string skipToken) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.EdgeOrder/productFamiliesMetadata", false); - uri.AppendQuery("api-version", _apiVersion, true); - if (skipToken != null) - { - uri.AppendQuery("$skipToken", skipToken, true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// This method provides the list of product families metadata for the given subscription. - /// The ID of the target subscription. - /// $skipToken is supported on list of product families metadata, which provides the next page in the list of product families metadata. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListProductFamiliesMetadataAsync(string subscriptionId, string skipToken = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListProductFamiliesMetadataRequest(subscriptionId, skipToken); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - ProductFamiliesMetadataListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ProductFamiliesMetadataListResult.DeserializeProductFamiliesMetadataListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// This method provides the list of product families metadata for the given subscription. - /// The ID of the target subscription. - /// $skipToken is supported on list of product families metadata, which provides the next page in the list of product families metadata. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public Response ListProductFamiliesMetadata(string subscriptionId, string skipToken = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListProductFamiliesMetadataRequest(subscriptionId, skipToken); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - ProductFamiliesMetadataListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ProductFamiliesMetadataListResult.DeserializeProductFamiliesMetadataListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListOrderAtSubscriptionLevelRequestUri(string subscriptionId, string skipToken) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.EdgeOrder/orders", false); - uri.AppendQuery("api-version", _apiVersion, true); - if (skipToken != null) - { - uri.AppendQuery("$skipToken", skipToken, true); - } - return uri; - } - - internal HttpMessage CreateListOrderAtSubscriptionLevelRequest(string subscriptionId, string skipToken) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.EdgeOrder/orders", false); - uri.AppendQuery("api-version", _apiVersion, true); - if (skipToken != null) - { - uri.AppendQuery("$skipToken", skipToken, true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists order at subscription level. - /// The ID of the target subscription. - /// $skipToken is supported on Get list of order, which provides the next page in the list of order. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListOrderAtSubscriptionLevelAsync(string subscriptionId, string skipToken = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListOrderAtSubscriptionLevelRequest(subscriptionId, skipToken); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - OrderResourceList value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = OrderResourceList.DeserializeOrderResourceList(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists order at subscription level. - /// The ID of the target subscription. - /// $skipToken is supported on Get list of order, which provides the next page in the list of order. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public Response ListOrderAtSubscriptionLevel(string subscriptionId, string skipToken = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListOrderAtSubscriptionLevelRequest(subscriptionId, skipToken); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - OrderResourceList value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = OrderResourceList.DeserializeOrderResourceList(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListOrderItemsAtSubscriptionLevelRequestUri(string subscriptionId, string filter, string expand, string skipToken) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.EdgeOrder/orderItems", false); - uri.AppendQuery("api-version", _apiVersion, true); - if (filter != null) - { - uri.AppendQuery("$filter", filter, true); - } - if (expand != null) - { - uri.AppendQuery("$expand", expand, true); - } - if (skipToken != null) - { - uri.AppendQuery("$skipToken", skipToken, true); - } - return uri; - } - - internal HttpMessage CreateListOrderItemsAtSubscriptionLevelRequest(string subscriptionId, string filter, string expand, string skipToken) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.EdgeOrder/orderItems", false); - uri.AppendQuery("api-version", _apiVersion, true); - if (filter != null) - { - uri.AppendQuery("$filter", filter, true); - } - if (expand != null) - { - uri.AppendQuery("$expand", expand, true); - } - if (skipToken != null) - { - uri.AppendQuery("$skipToken", skipToken, true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists order item at subscription level. - /// The ID of the target subscription. - /// $filter is supported to filter based on order id. Filter supports only equals operation. - /// $expand is supported on device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Device Details for order item provides details on the devices of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. - /// $skipToken is supported on Get list of order items, which provides the next page in the list of order items. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListOrderItemsAtSubscriptionLevelAsync(string subscriptionId, string filter = null, string expand = null, string skipToken = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListOrderItemsAtSubscriptionLevelRequest(subscriptionId, filter, expand, skipToken); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - OrderItemResourceList value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = OrderItemResourceList.DeserializeOrderItemResourceList(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists order item at subscription level. - /// The ID of the target subscription. - /// $filter is supported to filter based on order id. Filter supports only equals operation. - /// $expand is supported on device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Device Details for order item provides details on the devices of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. - /// $skipToken is supported on Get list of order items, which provides the next page in the list of order items. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public Response ListOrderItemsAtSubscriptionLevel(string subscriptionId, string filter = null, string expand = null, string skipToken = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListOrderItemsAtSubscriptionLevelRequest(subscriptionId, filter, expand, skipToken); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - OrderItemResourceList value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = OrderItemResourceList.DeserializeOrderItemResourceList(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListAddressesAtResourceGroupLevelRequestUri(string subscriptionId, string resourceGroupName, string filter, string skipToken) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.EdgeOrder/addresses", false); - uri.AppendQuery("api-version", _apiVersion, true); - if (filter != null) - { - uri.AppendQuery("$filter", filter, true); - } - if (skipToken != null) - { - uri.AppendQuery("$skipToken", skipToken, true); - } - return uri; - } - - internal HttpMessage CreateListAddressesAtResourceGroupLevelRequest(string subscriptionId, string resourceGroupName, string filter, string skipToken) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.EdgeOrder/addresses", false); - uri.AppendQuery("api-version", _apiVersion, true); - if (filter != null) - { - uri.AppendQuery("$filter", filter, true); - } - if (skipToken != null) - { - uri.AppendQuery("$skipToken", skipToken, true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists all the addresses available under the given resource group. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// $filter is supported to filter based on shipping address properties. Filter supports only equals operation. - /// $skipToken is supported on Get list of addresses, which provides the next page in the list of address. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> ListAddressesAtResourceGroupLevelAsync(string subscriptionId, string resourceGroupName, string filter = null, string skipToken = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListAddressesAtResourceGroupLevelRequest(subscriptionId, resourceGroupName, filter, skipToken); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - AddressResourceList value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = AddressResourceList.DeserializeAddressResourceList(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists all the addresses available under the given resource group. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// $filter is supported to filter based on shipping address properties. Filter supports only equals operation. - /// $skipToken is supported on Get list of addresses, which provides the next page in the list of address. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public Response ListAddressesAtResourceGroupLevel(string subscriptionId, string resourceGroupName, string filter = null, string skipToken = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListAddressesAtResourceGroupLevelRequest(subscriptionId, resourceGroupName, filter, skipToken); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - AddressResourceList value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = AddressResourceList.DeserializeAddressResourceList(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateGetAddressByNameRequestUri(string subscriptionId, string resourceGroupName, string addressName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.EdgeOrder/addresses/", false); - uri.AppendPath(addressName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateGetAddressByNameRequest(string subscriptionId, string resourceGroupName, string addressName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.EdgeOrder/addresses/", false); - uri.AppendPath(addressName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets information about the specified address. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the address Resource within the specified resource group. address names must be between 3 and 24 characters in length and use any alphanumeric and underscore only. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> GetAddressByNameAsync(string subscriptionId, string resourceGroupName, string addressName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(addressName, nameof(addressName)); - - using var message = CreateGetAddressByNameRequest(subscriptionId, resourceGroupName, addressName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - EdgeOrderAddressData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = EdgeOrderAddressData.DeserializeEdgeOrderAddressData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((EdgeOrderAddressData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets information about the specified address. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the address Resource within the specified resource group. address names must be between 3 and 24 characters in length and use any alphanumeric and underscore only. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response GetAddressByName(string subscriptionId, string resourceGroupName, string addressName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(addressName, nameof(addressName)); - - using var message = CreateGetAddressByNameRequest(subscriptionId, resourceGroupName, addressName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - EdgeOrderAddressData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = EdgeOrderAddressData.DeserializeEdgeOrderAddressData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((EdgeOrderAddressData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateCreateAddressRequestUri(string subscriptionId, string resourceGroupName, string addressName, EdgeOrderAddressData data) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.EdgeOrder/addresses/", false); - uri.AppendPath(addressName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateCreateAddressRequest(string subscriptionId, string resourceGroupName, string addressName, EdgeOrderAddressData data) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.EdgeOrder/addresses/", false); - uri.AppendPath(addressName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Creates a new address with the specified parameters. Existing address can be updated with this API. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the address Resource within the specified resource group. address names must be between 3 and 24 characters in length and use any alphanumeric and underscore only. - /// Address details from request body. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task CreateAddressAsync(string subscriptionId, string resourceGroupName, string addressName, EdgeOrderAddressData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(addressName, nameof(addressName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateAddressRequest(subscriptionId, resourceGroupName, addressName, data); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Creates a new address with the specified parameters. Existing address can be updated with this API. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the address Resource within the specified resource group. address names must be between 3 and 24 characters in length and use any alphanumeric and underscore only. - /// Address details from request body. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response CreateAddress(string subscriptionId, string resourceGroupName, string addressName, EdgeOrderAddressData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(addressName, nameof(addressName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateAddressRequest(subscriptionId, resourceGroupName, addressName, data); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateDeleteAddressByNameRequestUri(string subscriptionId, string resourceGroupName, string addressName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.EdgeOrder/addresses/", false); - uri.AppendPath(addressName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateDeleteAddressByNameRequest(string subscriptionId, string resourceGroupName, string addressName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.EdgeOrder/addresses/", false); - uri.AppendPath(addressName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Deletes an address. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the address Resource within the specified resource group. address names must be between 3 and 24 characters in length and use any alphanumeric and underscore only. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task DeleteAddressByNameAsync(string subscriptionId, string resourceGroupName, string addressName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(addressName, nameof(addressName)); - - using var message = CreateDeleteAddressByNameRequest(subscriptionId, resourceGroupName, addressName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Deletes an address. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the address Resource within the specified resource group. address names must be between 3 and 24 characters in length and use any alphanumeric and underscore only. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response DeleteAddressByName(string subscriptionId, string resourceGroupName, string addressName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(addressName, nameof(addressName)); - - using var message = CreateDeleteAddressByNameRequest(subscriptionId, resourceGroupName, addressName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateUpdateAddressRequestUri(string subscriptionId, string resourceGroupName, string addressName, EdgeOrderAddressPatch patch, string ifMatch) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.EdgeOrder/addresses/", false); - uri.AppendPath(addressName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateUpdateAddressRequest(string subscriptionId, string resourceGroupName, string addressName, EdgeOrderAddressPatch patch, string ifMatch) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Patch; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.EdgeOrder/addresses/", false); - uri.AppendPath(addressName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - if (ifMatch != null) - { - request.Headers.Add("If-Match", ifMatch); - } - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Updates the properties of an existing address. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the address Resource within the specified resource group. address names must be between 3 and 24 characters in length and use any alphanumeric and underscore only. - /// Address update parameters from request body. - /// Defines the If-Match condition. The patch will be performed only if the ETag of the job on the server matches this value. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task UpdateAddressAsync(string subscriptionId, string resourceGroupName, string addressName, EdgeOrderAddressPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(addressName, nameof(addressName)); - Argument.AssertNotNull(patch, nameof(patch)); - - using var message = CreateUpdateAddressRequest(subscriptionId, resourceGroupName, addressName, patch, ifMatch); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Updates the properties of an existing address. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the address Resource within the specified resource group. address names must be between 3 and 24 characters in length and use any alphanumeric and underscore only. - /// Address update parameters from request body. - /// Defines the If-Match condition. The patch will be performed only if the ETag of the job on the server matches this value. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response UpdateAddress(string subscriptionId, string resourceGroupName, string addressName, EdgeOrderAddressPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(addressName, nameof(addressName)); - Argument.AssertNotNull(patch, nameof(patch)); - - using var message = CreateUpdateAddressRequest(subscriptionId, resourceGroupName, addressName, patch, ifMatch); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListOrderAtResourceGroupLevelRequestUri(string subscriptionId, string resourceGroupName, string skipToken) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.EdgeOrder/orders", false); - uri.AppendQuery("api-version", _apiVersion, true); - if (skipToken != null) - { - uri.AppendQuery("$skipToken", skipToken, true); - } - return uri; - } - - internal HttpMessage CreateListOrderAtResourceGroupLevelRequest(string subscriptionId, string resourceGroupName, string skipToken) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.EdgeOrder/orders", false); - uri.AppendQuery("api-version", _apiVersion, true); - if (skipToken != null) - { - uri.AppendQuery("$skipToken", skipToken, true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists order at resource group level. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// $skipToken is supported on Get list of order, which provides the next page in the list of order. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> ListOrderAtResourceGroupLevelAsync(string subscriptionId, string resourceGroupName, string skipToken = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListOrderAtResourceGroupLevelRequest(subscriptionId, resourceGroupName, skipToken); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - OrderResourceList value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = OrderResourceList.DeserializeOrderResourceList(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists order at resource group level. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// $skipToken is supported on Get list of order, which provides the next page in the list of order. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public Response ListOrderAtResourceGroupLevel(string subscriptionId, string resourceGroupName, string skipToken = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListOrderAtResourceGroupLevelRequest(subscriptionId, resourceGroupName, skipToken); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - OrderResourceList value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = OrderResourceList.DeserializeOrderResourceList(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateGetOrderByNameRequestUri(string subscriptionId, string resourceGroupName, AzureLocation location, string orderName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.EdgeOrder/locations/", false); - uri.AppendPath(location, true); - uri.AppendPath("/orders/", false); - uri.AppendPath(orderName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateGetOrderByNameRequest(string subscriptionId, string resourceGroupName, AzureLocation location, string orderName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.EdgeOrder/locations/", false); - uri.AppendPath(location, true); - uri.AppendPath("/orders/", false); - uri.AppendPath(orderName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets an order. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of Azure region. - /// The name of the order. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> GetOrderByNameAsync(string subscriptionId, string resourceGroupName, AzureLocation location, string orderName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(orderName, nameof(orderName)); - - using var message = CreateGetOrderByNameRequest(subscriptionId, resourceGroupName, location, orderName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - EdgeOrderData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = EdgeOrderData.DeserializeEdgeOrderData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((EdgeOrderData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets an order. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of Azure region. - /// The name of the order. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response GetOrderByName(string subscriptionId, string resourceGroupName, AzureLocation location, string orderName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(orderName, nameof(orderName)); - - using var message = CreateGetOrderByNameRequest(subscriptionId, resourceGroupName, location, orderName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - EdgeOrderData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = EdgeOrderData.DeserializeEdgeOrderData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((EdgeOrderData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListOrderItemsAtResourceGroupLevelRequestUri(string subscriptionId, string resourceGroupName, string filter, string expand, string skipToken) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.EdgeOrder/orderItems", false); - uri.AppendQuery("api-version", _apiVersion, true); - if (filter != null) - { - uri.AppendQuery("$filter", filter, true); - } - if (expand != null) - { - uri.AppendQuery("$expand", expand, true); - } - if (skipToken != null) - { - uri.AppendQuery("$skipToken", skipToken, true); - } - return uri; - } - - internal HttpMessage CreateListOrderItemsAtResourceGroupLevelRequest(string subscriptionId, string resourceGroupName, string filter, string expand, string skipToken) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.EdgeOrder/orderItems", false); - uri.AppendQuery("api-version", _apiVersion, true); - if (filter != null) - { - uri.AppendQuery("$filter", filter, true); - } - if (expand != null) - { - uri.AppendQuery("$expand", expand, true); - } - if (skipToken != null) - { - uri.AppendQuery("$skipToken", skipToken, true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists order item at resource group level. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// $filter is supported to filter based on order id. Filter supports only equals operation. - /// $expand is supported on device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Device Details for order item provides details on the devices of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. - /// $skipToken is supported on Get list of order items, which provides the next page in the list of order items. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> ListOrderItemsAtResourceGroupLevelAsync(string subscriptionId, string resourceGroupName, string filter = null, string expand = null, string skipToken = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListOrderItemsAtResourceGroupLevelRequest(subscriptionId, resourceGroupName, filter, expand, skipToken); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - OrderItemResourceList value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = OrderItemResourceList.DeserializeOrderItemResourceList(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists order item at resource group level. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// $filter is supported to filter based on order id. Filter supports only equals operation. - /// $expand is supported on device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Device Details for order item provides details on the devices of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. - /// $skipToken is supported on Get list of order items, which provides the next page in the list of order items. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public Response ListOrderItemsAtResourceGroupLevel(string subscriptionId, string resourceGroupName, string filter = null, string expand = null, string skipToken = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListOrderItemsAtResourceGroupLevelRequest(subscriptionId, resourceGroupName, filter, expand, skipToken); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - OrderItemResourceList value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = OrderItemResourceList.DeserializeOrderItemResourceList(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateGetOrderItemByNameRequestUri(string subscriptionId, string resourceGroupName, string orderItemName, string expand) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.EdgeOrder/orderItems/", false); - uri.AppendPath(orderItemName, true); - uri.AppendQuery("api-version", _apiVersion, true); - if (expand != null) - { - uri.AppendQuery("$expand", expand, true); - } - return uri; - } - - internal HttpMessage CreateGetOrderItemByNameRequest(string subscriptionId, string resourceGroupName, string orderItemName, string expand) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.EdgeOrder/orderItems/", false); - uri.AppendPath(orderItemName, true); - uri.AppendQuery("api-version", _apiVersion, true); - if (expand != null) - { - uri.AppendQuery("$expand", expand, true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets an order item. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the order item. - /// $expand is supported on device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Device Details for order item provides details on the devices of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> GetOrderItemByNameAsync(string subscriptionId, string resourceGroupName, string orderItemName, string expand = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(orderItemName, nameof(orderItemName)); - - using var message = CreateGetOrderItemByNameRequest(subscriptionId, resourceGroupName, orderItemName, expand); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - EdgeOrderItemData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = EdgeOrderItemData.DeserializeEdgeOrderItemData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((EdgeOrderItemData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets an order item. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the order item. - /// $expand is supported on device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Device Details for order item provides details on the devices of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response GetOrderItemByName(string subscriptionId, string resourceGroupName, string orderItemName, string expand = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(orderItemName, nameof(orderItemName)); - - using var message = CreateGetOrderItemByNameRequest(subscriptionId, resourceGroupName, orderItemName, expand); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - EdgeOrderItemData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = EdgeOrderItemData.DeserializeEdgeOrderItemData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((EdgeOrderItemData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateCreateOrderItemRequestUri(string subscriptionId, string resourceGroupName, string orderItemName, EdgeOrderItemData data) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.EdgeOrder/orderItems/", false); - uri.AppendPath(orderItemName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateCreateOrderItemRequest(string subscriptionId, string resourceGroupName, string orderItemName, EdgeOrderItemData data) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.EdgeOrder/orderItems/", false); - uri.AppendPath(orderItemName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Creates an order item. Existing order item cannot be updated with this api and should instead be updated with the Update order item API. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the order item. - /// Order item details from request body. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task CreateOrderItemAsync(string subscriptionId, string resourceGroupName, string orderItemName, EdgeOrderItemData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(orderItemName, nameof(orderItemName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrderItemRequest(subscriptionId, resourceGroupName, orderItemName, data); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Creates an order item. Existing order item cannot be updated with this api and should instead be updated with the Update order item API. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the order item. - /// Order item details from request body. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response CreateOrderItem(string subscriptionId, string resourceGroupName, string orderItemName, EdgeOrderItemData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(orderItemName, nameof(orderItemName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrderItemRequest(subscriptionId, resourceGroupName, orderItemName, data); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateDeleteOrderItemByNameRequestUri(string subscriptionId, string resourceGroupName, string orderItemName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.EdgeOrder/orderItems/", false); - uri.AppendPath(orderItemName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateDeleteOrderItemByNameRequest(string subscriptionId, string resourceGroupName, string orderItemName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.EdgeOrder/orderItems/", false); - uri.AppendPath(orderItemName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Deletes an order item. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the order item. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task DeleteOrderItemByNameAsync(string subscriptionId, string resourceGroupName, string orderItemName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(orderItemName, nameof(orderItemName)); - - using var message = CreateDeleteOrderItemByNameRequest(subscriptionId, resourceGroupName, orderItemName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Deletes an order item. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the order item. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response DeleteOrderItemByName(string subscriptionId, string resourceGroupName, string orderItemName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(orderItemName, nameof(orderItemName)); - - using var message = CreateDeleteOrderItemByNameRequest(subscriptionId, resourceGroupName, orderItemName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateUpdateOrderItemRequestUri(string subscriptionId, string resourceGroupName, string orderItemName, EdgeOrderItemPatch patch, string ifMatch) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.EdgeOrder/orderItems/", false); - uri.AppendPath(orderItemName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateUpdateOrderItemRequest(string subscriptionId, string resourceGroupName, string orderItemName, EdgeOrderItemPatch patch, string ifMatch) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Patch; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.EdgeOrder/orderItems/", false); - uri.AppendPath(orderItemName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - if (ifMatch != null) - { - request.Headers.Add("If-Match", ifMatch); - } - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Updates the properties of an existing order item. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the order item. - /// order item update parameters from request body. - /// Defines the If-Match condition. The patch will be performed only if the ETag of the order on the server matches this value. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task UpdateOrderItemAsync(string subscriptionId, string resourceGroupName, string orderItemName, EdgeOrderItemPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(orderItemName, nameof(orderItemName)); - Argument.AssertNotNull(patch, nameof(patch)); - - using var message = CreateUpdateOrderItemRequest(subscriptionId, resourceGroupName, orderItemName, patch, ifMatch); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Updates the properties of an existing order item. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the order item. - /// order item update parameters from request body. - /// Defines the If-Match condition. The patch will be performed only if the ETag of the order on the server matches this value. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response UpdateOrderItem(string subscriptionId, string resourceGroupName, string orderItemName, EdgeOrderItemPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(orderItemName, nameof(orderItemName)); - Argument.AssertNotNull(patch, nameof(patch)); - - using var message = CreateUpdateOrderItemRequest(subscriptionId, resourceGroupName, orderItemName, patch, ifMatch); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateCancelOrderItemRequestUri(string subscriptionId, string resourceGroupName, string orderItemName, EdgeOrderItemCancellationReason cancellationReason) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.EdgeOrder/orderItems/", false); - uri.AppendPath(orderItemName, true); - uri.AppendPath("/cancel", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateCancelOrderItemRequest(string subscriptionId, string resourceGroupName, string orderItemName, EdgeOrderItemCancellationReason cancellationReason) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.EdgeOrder/orderItems/", false); - uri.AppendPath(orderItemName, true); - uri.AppendPath("/cancel", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(cancellationReason, ModelSerializationExtensions.WireOptions); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Cancel order item. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the order item. - /// Reason for cancellation. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task CancelOrderItemAsync(string subscriptionId, string resourceGroupName, string orderItemName, EdgeOrderItemCancellationReason cancellationReason, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(orderItemName, nameof(orderItemName)); - Argument.AssertNotNull(cancellationReason, nameof(cancellationReason)); - - using var message = CreateCancelOrderItemRequest(subscriptionId, resourceGroupName, orderItemName, cancellationReason); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Cancel order item. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the order item. - /// Reason for cancellation. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response CancelOrderItem(string subscriptionId, string resourceGroupName, string orderItemName, EdgeOrderItemCancellationReason cancellationReason, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(orderItemName, nameof(orderItemName)); - Argument.AssertNotNull(cancellationReason, nameof(cancellationReason)); - - using var message = CreateCancelOrderItemRequest(subscriptionId, resourceGroupName, orderItemName, cancellationReason); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateReturnOrderItemRequestUri(string subscriptionId, string resourceGroupName, string orderItemName, EdgeOrderItemReturnContent content) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.EdgeOrder/orderItems/", false); - uri.AppendPath(orderItemName, true); - uri.AppendPath("/return", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateReturnOrderItemRequest(string subscriptionId, string resourceGroupName, string orderItemName, EdgeOrderItemReturnContent content) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.EdgeOrder/orderItems/", false); - uri.AppendPath(orderItemName, true); - uri.AppendPath("/return", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); - request.Content = content0; - _userAgent.Apply(message); - return message; - } - - /// Return order item. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the order item. - /// Return order item CurrentStatus. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task ReturnOrderItemAsync(string subscriptionId, string resourceGroupName, string orderItemName, EdgeOrderItemReturnContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(orderItemName, nameof(orderItemName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateReturnOrderItemRequest(subscriptionId, resourceGroupName, orderItemName, content); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Return order item. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the order item. - /// Return order item CurrentStatus. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ReturnOrderItem(string subscriptionId, string resourceGroupName, string orderItemName, EdgeOrderItemReturnContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(orderItemName, nameof(orderItemName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateReturnOrderItemRequest(subscriptionId, resourceGroupName, orderItemName, content); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListAddressesAtSubscriptionLevelNextPageRequestUri(string nextLink, string subscriptionId, string filter, string skipToken) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - return uri; - } - - internal HttpMessage CreateListAddressesAtSubscriptionLevelNextPageRequest(string nextLink, string subscriptionId, string filter, string skipToken) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists all the addresses available under the subscription. - /// The URL to the next page of results. - /// The ID of the target subscription. - /// $filter is supported to filter based on shipping address properties. Filter supports only equals operation. - /// $skipToken is supported on Get list of addresses, which provides the next page in the list of addresses. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListAddressesAtSubscriptionLevelNextPageAsync(string nextLink, string subscriptionId, string filter = null, string skipToken = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListAddressesAtSubscriptionLevelNextPageRequest(nextLink, subscriptionId, filter, skipToken); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - AddressResourceList value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = AddressResourceList.DeserializeAddressResourceList(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists all the addresses available under the subscription. - /// The URL to the next page of results. - /// The ID of the target subscription. - /// $filter is supported to filter based on shipping address properties. Filter supports only equals operation. - /// $skipToken is supported on Get list of addresses, which provides the next page in the list of addresses. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public Response ListAddressesAtSubscriptionLevelNextPage(string nextLink, string subscriptionId, string filter = null, string skipToken = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListAddressesAtSubscriptionLevelNextPageRequest(nextLink, subscriptionId, filter, skipToken); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - AddressResourceList value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = AddressResourceList.DeserializeAddressResourceList(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListProductFamiliesNextPageRequestUri(string nextLink, string subscriptionId, ProductFamiliesContent content, string expand, string skipToken) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - return uri; - } - - internal HttpMessage CreateListProductFamiliesNextPageRequest(string nextLink, string subscriptionId, ProductFamiliesContent content, string expand, string skipToken) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// This method provides the list of product families for the given subscription. - /// The URL to the next page of results. - /// The ID of the target subscription. - /// Filters for showing the product families. - /// $expand is supported on configurations parameter for product, which provides details on the configurations for the product. - /// $skipToken is supported on list of product families, which provides the next page in the list of product families. - /// The cancellation token to use. - /// , or is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListProductFamiliesNextPageAsync(string nextLink, string subscriptionId, ProductFamiliesContent content, string expand = null, string skipToken = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateListProductFamiliesNextPageRequest(nextLink, subscriptionId, content, expand, skipToken); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - ProductFamilies value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ProductFamilies.DeserializeProductFamilies(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// This method provides the list of product families for the given subscription. - /// The URL to the next page of results. - /// The ID of the target subscription. - /// Filters for showing the product families. - /// $expand is supported on configurations parameter for product, which provides details on the configurations for the product. - /// $skipToken is supported on list of product families, which provides the next page in the list of product families. - /// The cancellation token to use. - /// , or is null. - /// is an empty string, and was expected to be non-empty. - public Response ListProductFamiliesNextPage(string nextLink, string subscriptionId, ProductFamiliesContent content, string expand = null, string skipToken = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateListProductFamiliesNextPageRequest(nextLink, subscriptionId, content, expand, skipToken); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - ProductFamilies value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ProductFamilies.DeserializeProductFamilies(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListConfigurationsNextPageRequestUri(string nextLink, string subscriptionId, ConfigurationsContent content, string skipToken) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - return uri; - } - - internal HttpMessage CreateListConfigurationsNextPageRequest(string nextLink, string subscriptionId, ConfigurationsContent content, string skipToken) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// This method provides the list of configurations for the given product family, product line and product under subscription. - /// The URL to the next page of results. - /// The ID of the target subscription. - /// Filters for showing the configurations. - /// $skipToken is supported on list of configurations, which provides the next page in the list of configurations. - /// The cancellation token to use. - /// , or is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListConfigurationsNextPageAsync(string nextLink, string subscriptionId, ConfigurationsContent content, string skipToken = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateListConfigurationsNextPageRequest(nextLink, subscriptionId, content, skipToken); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - ProductConfigurations value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ProductConfigurations.DeserializeProductConfigurations(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// This method provides the list of configurations for the given product family, product line and product under subscription. - /// The URL to the next page of results. - /// The ID of the target subscription. - /// Filters for showing the configurations. - /// $skipToken is supported on list of configurations, which provides the next page in the list of configurations. - /// The cancellation token to use. - /// , or is null. - /// is an empty string, and was expected to be non-empty. - public Response ListConfigurationsNextPage(string nextLink, string subscriptionId, ConfigurationsContent content, string skipToken = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateListConfigurationsNextPageRequest(nextLink, subscriptionId, content, skipToken); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - ProductConfigurations value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ProductConfigurations.DeserializeProductConfigurations(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListProductFamiliesMetadataNextPageRequestUri(string nextLink, string subscriptionId, string skipToken) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - return uri; - } - - internal HttpMessage CreateListProductFamiliesMetadataNextPageRequest(string nextLink, string subscriptionId, string skipToken) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// This method provides the list of product families metadata for the given subscription. - /// The URL to the next page of results. - /// The ID of the target subscription. - /// $skipToken is supported on list of product families metadata, which provides the next page in the list of product families metadata. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListProductFamiliesMetadataNextPageAsync(string nextLink, string subscriptionId, string skipToken = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListProductFamiliesMetadataNextPageRequest(nextLink, subscriptionId, skipToken); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - ProductFamiliesMetadataListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ProductFamiliesMetadataListResult.DeserializeProductFamiliesMetadataListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// This method provides the list of product families metadata for the given subscription. - /// The URL to the next page of results. - /// The ID of the target subscription. - /// $skipToken is supported on list of product families metadata, which provides the next page in the list of product families metadata. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public Response ListProductFamiliesMetadataNextPage(string nextLink, string subscriptionId, string skipToken = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListProductFamiliesMetadataNextPageRequest(nextLink, subscriptionId, skipToken); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - ProductFamiliesMetadataListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ProductFamiliesMetadataListResult.DeserializeProductFamiliesMetadataListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListOrderAtSubscriptionLevelNextPageRequestUri(string nextLink, string subscriptionId, string skipToken) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - return uri; - } - - internal HttpMessage CreateListOrderAtSubscriptionLevelNextPageRequest(string nextLink, string subscriptionId, string skipToken) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists order at subscription level. - /// The URL to the next page of results. - /// The ID of the target subscription. - /// $skipToken is supported on Get list of order, which provides the next page in the list of order. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListOrderAtSubscriptionLevelNextPageAsync(string nextLink, string subscriptionId, string skipToken = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListOrderAtSubscriptionLevelNextPageRequest(nextLink, subscriptionId, skipToken); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - OrderResourceList value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = OrderResourceList.DeserializeOrderResourceList(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists order at subscription level. - /// The URL to the next page of results. - /// The ID of the target subscription. - /// $skipToken is supported on Get list of order, which provides the next page in the list of order. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public Response ListOrderAtSubscriptionLevelNextPage(string nextLink, string subscriptionId, string skipToken = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListOrderAtSubscriptionLevelNextPageRequest(nextLink, subscriptionId, skipToken); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - OrderResourceList value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = OrderResourceList.DeserializeOrderResourceList(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListOrderItemsAtSubscriptionLevelNextPageRequestUri(string nextLink, string subscriptionId, string filter, string expand, string skipToken) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - return uri; - } - - internal HttpMessage CreateListOrderItemsAtSubscriptionLevelNextPageRequest(string nextLink, string subscriptionId, string filter, string expand, string skipToken) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists order item at subscription level. - /// The URL to the next page of results. - /// The ID of the target subscription. - /// $filter is supported to filter based on order id. Filter supports only equals operation. - /// $expand is supported on device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Device Details for order item provides details on the devices of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. - /// $skipToken is supported on Get list of order items, which provides the next page in the list of order items. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListOrderItemsAtSubscriptionLevelNextPageAsync(string nextLink, string subscriptionId, string filter = null, string expand = null, string skipToken = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListOrderItemsAtSubscriptionLevelNextPageRequest(nextLink, subscriptionId, filter, expand, skipToken); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - OrderItemResourceList value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = OrderItemResourceList.DeserializeOrderItemResourceList(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists order item at subscription level. - /// The URL to the next page of results. - /// The ID of the target subscription. - /// $filter is supported to filter based on order id. Filter supports only equals operation. - /// $expand is supported on device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Device Details for order item provides details on the devices of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. - /// $skipToken is supported on Get list of order items, which provides the next page in the list of order items. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public Response ListOrderItemsAtSubscriptionLevelNextPage(string nextLink, string subscriptionId, string filter = null, string expand = null, string skipToken = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListOrderItemsAtSubscriptionLevelNextPageRequest(nextLink, subscriptionId, filter, expand, skipToken); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - OrderItemResourceList value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = OrderItemResourceList.DeserializeOrderItemResourceList(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListAddressesAtResourceGroupLevelNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string filter, string skipToken) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - return uri; - } - - internal HttpMessage CreateListAddressesAtResourceGroupLevelNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string filter, string skipToken) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists all the addresses available under the given resource group. - /// The URL to the next page of results. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// $filter is supported to filter based on shipping address properties. Filter supports only equals operation. - /// $skipToken is supported on Get list of addresses, which provides the next page in the list of address. - /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> ListAddressesAtResourceGroupLevelNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string filter = null, string skipToken = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListAddressesAtResourceGroupLevelNextPageRequest(nextLink, subscriptionId, resourceGroupName, filter, skipToken); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - AddressResourceList value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = AddressResourceList.DeserializeAddressResourceList(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists all the addresses available under the given resource group. - /// The URL to the next page of results. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// $filter is supported to filter based on shipping address properties. Filter supports only equals operation. - /// $skipToken is supported on Get list of addresses, which provides the next page in the list of address. - /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public Response ListAddressesAtResourceGroupLevelNextPage(string nextLink, string subscriptionId, string resourceGroupName, string filter = null, string skipToken = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListAddressesAtResourceGroupLevelNextPageRequest(nextLink, subscriptionId, resourceGroupName, filter, skipToken); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - AddressResourceList value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = AddressResourceList.DeserializeAddressResourceList(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListOrderAtResourceGroupLevelNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string skipToken) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - return uri; - } - - internal HttpMessage CreateListOrderAtResourceGroupLevelNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string skipToken) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists order at resource group level. - /// The URL to the next page of results. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// $skipToken is supported on Get list of order, which provides the next page in the list of order. - /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> ListOrderAtResourceGroupLevelNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string skipToken = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListOrderAtResourceGroupLevelNextPageRequest(nextLink, subscriptionId, resourceGroupName, skipToken); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - OrderResourceList value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = OrderResourceList.DeserializeOrderResourceList(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists order at resource group level. - /// The URL to the next page of results. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// $skipToken is supported on Get list of order, which provides the next page in the list of order. - /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public Response ListOrderAtResourceGroupLevelNextPage(string nextLink, string subscriptionId, string resourceGroupName, string skipToken = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListOrderAtResourceGroupLevelNextPageRequest(nextLink, subscriptionId, resourceGroupName, skipToken); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - OrderResourceList value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = OrderResourceList.DeserializeOrderResourceList(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListOrderItemsAtResourceGroupLevelNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string filter, string expand, string skipToken) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - return uri; - } - - internal HttpMessage CreateListOrderItemsAtResourceGroupLevelNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string filter, string expand, string skipToken) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists order item at resource group level. - /// The URL to the next page of results. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// $filter is supported to filter based on order id. Filter supports only equals operation. - /// $expand is supported on device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Device Details for order item provides details on the devices of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. - /// $skipToken is supported on Get list of order items, which provides the next page in the list of order items. - /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> ListOrderItemsAtResourceGroupLevelNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string filter = null, string expand = null, string skipToken = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListOrderItemsAtResourceGroupLevelNextPageRequest(nextLink, subscriptionId, resourceGroupName, filter, expand, skipToken); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - OrderItemResourceList value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = OrderItemResourceList.DeserializeOrderItemResourceList(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists order item at resource group level. - /// The URL to the next page of results. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// $filter is supported to filter based on order id. Filter supports only equals operation. - /// $expand is supported on device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Device Details for order item provides details on the devices of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. - /// $skipToken is supported on Get list of order items, which provides the next page in the list of order items. - /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public Response ListOrderItemsAtResourceGroupLevelNextPage(string nextLink, string subscriptionId, string resourceGroupName, string filter = null, string expand = null, string skipToken = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListOrderItemsAtResourceGroupLevelNextPageRequest(nextLink, subscriptionId, resourceGroupName, filter, expand, skipToken); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - OrderItemResourceList value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = OrderItemResourceList.DeserializeOrderItemResourceList(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/RestOperations/OrderItemResourcesRestOperations.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/RestOperations/OrderItemResourcesRestOperations.cs new file mode 100644 index 000000000000..6c50066f9156 --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/RestOperations/OrderItemResourcesRestOperations.cs @@ -0,0 +1,1026 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.EdgeOrder.Models; + +namespace Azure.ResourceManager.EdgeOrder +{ + internal partial class OrderItemResourcesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of OrderItemResourcesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public OrderItemResourcesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-02-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string orderItemName, string expand) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.EdgeOrder/orderItems/", false); + uri.AppendPath(orderItemName, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (expand != null) + { + uri.AppendQuery("$expand", expand, true); + } + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string orderItemName, string expand) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.EdgeOrder/orderItems/", false); + uri.AppendPath(orderItemName, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (expand != null) + { + uri.AppendQuery("$expand", expand, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get an order item. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the order item. + /// $expand is supported on parent device details, device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Parent Device Details for order item provides details on the devices of the product, Device Details for order item provides details on the devices of the child configurations of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string orderItemName, string expand = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(orderItemName, nameof(orderItemName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, orderItemName, expand); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EdgeOrderItemData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EdgeOrderItemData.DeserializeEdgeOrderItemData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EdgeOrderItemData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get an order item. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the order item. + /// $expand is supported on parent device details, device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Parent Device Details for order item provides details on the devices of the product, Device Details for order item provides details on the devices of the child configurations of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string orderItemName, string expand = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(orderItemName, nameof(orderItemName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, orderItemName, expand); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EdgeOrderItemData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EdgeOrderItemData.DeserializeEdgeOrderItemData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EdgeOrderItemData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string orderItemName, EdgeOrderItemData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.EdgeOrder/orderItems/", false); + uri.AppendPath(orderItemName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string orderItemName, EdgeOrderItemData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.EdgeOrder/orderItems/", false); + uri.AppendPath(orderItemName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// + /// Create an order item. Existing order item cannot be updated with this api and should instead be updated with the Update order item + /// API. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the order item. + /// Order item details from request body. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string orderItemName, EdgeOrderItemData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(orderItemName, nameof(orderItemName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, orderItemName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// + /// Create an order item. Existing order item cannot be updated with this api and should instead be updated with the Update order item + /// API. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the order item. + /// Order item details from request body. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Create(string subscriptionId, string resourceGroupName, string orderItemName, EdgeOrderItemData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(orderItemName, nameof(orderItemName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, orderItemName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string orderItemName, EdgeOrderItemPatch patch, string ifMatch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.EdgeOrder/orderItems/", false); + uri.AppendPath(orderItemName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string orderItemName, EdgeOrderItemPatch patch, string ifMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.EdgeOrder/orderItems/", false); + uri.AppendPath(orderItemName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch); + } + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update the properties of an existing order item. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the order item. + /// Order item update parameters from request body. + /// Defines the If-Match condition. The patch will be performed only if the ETag of the order on the server matches this value. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string orderItemName, EdgeOrderItemPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(orderItemName, nameof(orderItemName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, orderItemName, patch, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update the properties of an existing order item. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the order item. + /// Order item update parameters from request body. + /// Defines the If-Match condition. The patch will be performed only if the ETag of the order on the server matches this value. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string orderItemName, EdgeOrderItemPatch patch, string ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(orderItemName, nameof(orderItemName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, orderItemName, patch, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string orderItemName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.EdgeOrder/orderItems/", false); + uri.AppendPath(orderItemName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string orderItemName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.EdgeOrder/orderItems/", false); + uri.AppendPath(orderItemName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + _userAgent.Apply(message); + return message; + } + + /// Delete an order item. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the order item. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string orderItemName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(orderItemName, nameof(orderItemName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, orderItemName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete an order item. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the order item. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string orderItemName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(orderItemName, nameof(orderItemName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, orderItemName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName, string filter, string expand, string skipToken, int? top) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.EdgeOrder/orderItems", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + if (expand != null) + { + uri.AppendQuery("$expand", expand, true); + } + if (skipToken != null) + { + uri.AppendQuery("$skipToken", skipToken, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + return uri; + } + + internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName, string filter, string expand, string skipToken, int? top) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.EdgeOrder/orderItems", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + if (expand != null) + { + uri.AppendQuery("$expand", expand, true); + } + if (skipToken != null) + { + uri.AppendQuery("$skipToken", skipToken, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List order items at resource group level. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// $filter is supported to filter based on order id and order Item Type. Filter supports only equals operation. + /// $expand is supported on parent device details, device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Parent Device Details for order item provides details on the devices of the product, Device Details for order item provides details on the devices of the child configurations of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. + /// $skipToken is supported on Get list of order items, which provides the next page in the list of order items. + /// $top is supported on fetching list of resources. $top=10 means that the first 10 items in the list will be returned to the API caller. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, string filter = null, string expand = null, string skipToken = null, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName, filter, expand, skipToken, top); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + OrderItemResourceList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = OrderItemResourceList.DeserializeOrderItemResourceList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List order items at resource group level. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// $filter is supported to filter based on order id and order Item Type. Filter supports only equals operation. + /// $expand is supported on parent device details, device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Parent Device Details for order item provides details on the devices of the product, Device Details for order item provides details on the devices of the child configurations of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. + /// $skipToken is supported on Get list of order items, which provides the next page in the list of order items. + /// $top is supported on fetching list of resources. $top=10 means that the first 10 items in the list will be returned to the API caller. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, string filter = null, string expand = null, string skipToken = null, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName, filter, expand, skipToken, top); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + OrderItemResourceList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = OrderItemResourceList.DeserializeOrderItemResourceList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySubscriptionRequestUri(string subscriptionId, string filter, string expand, string skipToken, int? top) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.EdgeOrder/orderItems", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + if (expand != null) + { + uri.AppendQuery("$expand", expand, true); + } + if (skipToken != null) + { + uri.AppendQuery("$skipToken", skipToken, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + return uri; + } + + internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId, string filter, string expand, string skipToken, int? top) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.EdgeOrder/orderItems", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + if (expand != null) + { + uri.AppendQuery("$expand", expand, true); + } + if (skipToken != null) + { + uri.AppendQuery("$skipToken", skipToken, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List order items at subscription level. + /// The ID of the target subscription. The value must be an UUID. + /// $filter is supported to filter based on order id and order Item Type. Filter supports only equals operation. + /// $expand is supported on parent device details, device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Parent Device Details for order item provides details on the devices of the product, Device Details for order item provides details on the devices of the child configurations of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. + /// $skipToken is supported on Get list of order items, which provides the next page in the list of order items. + /// $top is supported on fetching list of resources. $top=10 means that the first 10 items in the list will be returned to the API caller. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionAsync(string subscriptionId, string filter = null, string expand = null, string skipToken = null, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId, filter, expand, skipToken, top); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + OrderItemResourceList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = OrderItemResourceList.DeserializeOrderItemResourceList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List order items at subscription level. + /// The ID of the target subscription. The value must be an UUID. + /// $filter is supported to filter based on order id and order Item Type. Filter supports only equals operation. + /// $expand is supported on parent device details, device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Parent Device Details for order item provides details on the devices of the product, Device Details for order item provides details on the devices of the child configurations of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. + /// $skipToken is supported on Get list of order items, which provides the next page in the list of order items. + /// $top is supported on fetching list of resources. $top=10 means that the first 10 items in the list will be returned to the API caller. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscription(string subscriptionId, string filter = null, string expand = null, string skipToken = null, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId, filter, expand, skipToken, top); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + OrderItemResourceList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = OrderItemResourceList.DeserializeOrderItemResourceList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCancelRequestUri(string subscriptionId, string resourceGroupName, string orderItemName, EdgeOrderItemCancellationReason cancellationReason) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.EdgeOrder/orderItems/", false); + uri.AppendPath(orderItemName, true); + uri.AppendPath("/cancel", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCancelRequest(string subscriptionId, string resourceGroupName, string orderItemName, EdgeOrderItemCancellationReason cancellationReason) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.EdgeOrder/orderItems/", false); + uri.AppendPath(orderItemName, true); + uri.AppendPath("/cancel", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(cancellationReason, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Cancel order item. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the order item. + /// Reason for cancellation. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task CancelAsync(string subscriptionId, string resourceGroupName, string orderItemName, EdgeOrderItemCancellationReason cancellationReason, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(orderItemName, nameof(orderItemName)); + Argument.AssertNotNull(cancellationReason, nameof(cancellationReason)); + + using var message = CreateCancelRequest(subscriptionId, resourceGroupName, orderItemName, cancellationReason); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Cancel order item. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the order item. + /// Reason for cancellation. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Cancel(string subscriptionId, string resourceGroupName, string orderItemName, EdgeOrderItemCancellationReason cancellationReason, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(orderItemName, nameof(orderItemName)); + Argument.AssertNotNull(cancellationReason, nameof(cancellationReason)); + + using var message = CreateCancelRequest(subscriptionId, resourceGroupName, orderItemName, cancellationReason); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateReturnRequestUri(string subscriptionId, string resourceGroupName, string orderItemName, EdgeOrderItemReturnContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.EdgeOrder/orderItems/", false); + uri.AppendPath(orderItemName, true); + uri.AppendPath("/return", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateReturnRequest(string subscriptionId, string resourceGroupName, string orderItemName, EdgeOrderItemReturnContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.EdgeOrder/orderItems/", false); + uri.AppendPath(orderItemName, true); + uri.AppendPath("/return", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// Return order item. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the order item. + /// Return order item details. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task ReturnAsync(string subscriptionId, string resourceGroupName, string orderItemName, EdgeOrderItemReturnContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(orderItemName, nameof(orderItemName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateReturnRequest(subscriptionId, resourceGroupName, orderItemName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Return order item. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the order item. + /// Return order item details. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Return(string subscriptionId, string resourceGroupName, string orderItemName, EdgeOrderItemReturnContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(orderItemName, nameof(orderItemName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateReturnRequest(subscriptionId, resourceGroupName, orderItemName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string filter, string expand, string skipToken, int? top) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string filter, string expand, string skipToken, int? top) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List order items at resource group level. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// $filter is supported to filter based on order id and order Item Type. Filter supports only equals operation. + /// $expand is supported on parent device details, device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Parent Device Details for order item provides details on the devices of the product, Device Details for order item provides details on the devices of the child configurations of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. + /// $skipToken is supported on Get list of order items, which provides the next page in the list of order items. + /// $top is supported on fetching list of resources. $top=10 means that the first 10 items in the list will be returned to the API caller. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string filter = null, string expand = null, string skipToken = null, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName, filter, expand, skipToken, top); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + OrderItemResourceList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = OrderItemResourceList.DeserializeOrderItemResourceList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List order items at resource group level. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// $filter is supported to filter based on order id and order Item Type. Filter supports only equals operation. + /// $expand is supported on parent device details, device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Parent Device Details for order item provides details on the devices of the product, Device Details for order item provides details on the devices of the child configurations of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. + /// $skipToken is supported on Get list of order items, which provides the next page in the list of order items. + /// $top is supported on fetching list of resources. $top=10 means that the first 10 items in the list will be returned to the API caller. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, string filter = null, string expand = null, string skipToken = null, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName, filter, expand, skipToken, top); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + OrderItemResourceList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = OrderItemResourceList.DeserializeOrderItemResourceList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySubscriptionNextPageRequestUri(string nextLink, string subscriptionId, string filter, string expand, string skipToken, int? top) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId, string filter, string expand, string skipToken, int? top) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List order items at subscription level. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// $filter is supported to filter based on order id and order Item Type. Filter supports only equals operation. + /// $expand is supported on parent device details, device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Parent Device Details for order item provides details on the devices of the product, Device Details for order item provides details on the devices of the child configurations of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. + /// $skipToken is supported on Get list of order items, which provides the next page in the list of order items. + /// $top is supported on fetching list of resources. $top=10 means that the first 10 items in the list will be returned to the API caller. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, string filter = null, string expand = null, string skipToken = null, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId, filter, expand, skipToken, top); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + OrderItemResourceList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = OrderItemResourceList.DeserializeOrderItemResourceList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List order items at subscription level. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// $filter is supported to filter based on order id and order Item Type. Filter supports only equals operation. + /// $expand is supported on parent device details, device details, forward shipping details and reverse shipping details parameters. Each of these can be provided as a comma separated list. Parent Device Details for order item provides details on the devices of the product, Device Details for order item provides details on the devices of the child configurations of the product, Forward and Reverse Shipping details provide forward and reverse shipping details respectively. + /// $skipToken is supported on Get list of order items, which provides the next page in the list of order items. + /// $top is supported on fetching list of resources. $top=10 means that the first 10 items in the list will be returned to the API caller. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, string filter = null, string expand = null, string skipToken = null, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId, filter, expand, skipToken, top); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + OrderItemResourceList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = OrderItemResourceList.DeserializeOrderItemResourceList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/RestOperations/OrderResourcesRestOperations.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/RestOperations/OrderResourcesRestOperations.cs new file mode 100644 index 000000000000..7b6b67c3128e --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/RestOperations/OrderResourcesRestOperations.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.EdgeOrder +{ + internal partial class OrderResourcesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of OrderResourcesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public OrderResourcesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-02-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, AzureLocation location, string orderName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.EdgeOrder/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/orders/", false); + uri.AppendPath(orderName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, AzureLocation location, string orderName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.EdgeOrder/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/orders/", false); + uri.AppendPath(orderName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get an order. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Azure region. + /// The name of the order. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, AzureLocation location, string orderName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(orderName, nameof(orderName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, location, orderName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EdgeOrderData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EdgeOrderData.DeserializeEdgeOrderData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EdgeOrderData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get an order. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Azure region. + /// The name of the order. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, AzureLocation location, string orderName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(orderName, nameof(orderName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, location, orderName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EdgeOrderData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EdgeOrderData.DeserializeEdgeOrderData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EdgeOrderData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/RestOperations/OrdersOperationGroupRestOperations.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/RestOperations/OrdersOperationGroupRestOperations.cs new file mode 100644 index 000000000000..fc840dadc04f --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/RestOperations/OrdersOperationGroupRestOperations.cs @@ -0,0 +1,407 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.EdgeOrder.Models; + +namespace Azure.ResourceManager.EdgeOrder +{ + internal partial class OrdersOperationGroupRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of OrdersOperationGroupRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public OrdersOperationGroupRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-02-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListBySubscriptionRequestUri(string subscriptionId, string skipToken, int? top) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.EdgeOrder/orders", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (skipToken != null) + { + uri.AppendQuery("$skipToken", skipToken, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + return uri; + } + + internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId, string skipToken, int? top) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.EdgeOrder/orders", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (skipToken != null) + { + uri.AppendQuery("$skipToken", skipToken, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List orders at subscription level. + /// The ID of the target subscription. The value must be an UUID. + /// $skipToken is supported on Get list of orders, which provides the next page in the list of orders. + /// $top is supported on fetching list of resources. $top=10 means that the first 10 items in the list will be returned to the API caller. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionAsync(string subscriptionId, string skipToken = null, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId, skipToken, top); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + OrderResourceList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = OrderResourceList.DeserializeOrderResourceList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List orders at subscription level. + /// The ID of the target subscription. The value must be an UUID. + /// $skipToken is supported on Get list of orders, which provides the next page in the list of orders. + /// $top is supported on fetching list of resources. $top=10 means that the first 10 items in the list will be returned to the API caller. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscription(string subscriptionId, string skipToken = null, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId, skipToken, top); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + OrderResourceList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = OrderResourceList.DeserializeOrderResourceList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName, string skipToken, int? top) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.EdgeOrder/orders", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (skipToken != null) + { + uri.AppendQuery("$skipToken", skipToken, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + return uri; + } + + internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName, string skipToken, int? top) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.EdgeOrder/orders", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (skipToken != null) + { + uri.AppendQuery("$skipToken", skipToken, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List orders at resource group level. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// $skipToken is supported on Get list of orders, which provides the next page in the list of orders. + /// $top is supported on fetching list of resources. $top=10 means that the first 10 items in the list will be returned to the API caller. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, string skipToken = null, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName, skipToken, top); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + OrderResourceList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = OrderResourceList.DeserializeOrderResourceList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List orders at resource group level. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// $skipToken is supported on Get list of orders, which provides the next page in the list of orders. + /// $top is supported on fetching list of resources. $top=10 means that the first 10 items in the list will be returned to the API caller. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, string skipToken = null, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName, skipToken, top); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + OrderResourceList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = OrderResourceList.DeserializeOrderResourceList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySubscriptionNextPageRequestUri(string nextLink, string subscriptionId, string skipToken, int? top) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId, string skipToken, int? top) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List orders at subscription level. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// $skipToken is supported on Get list of orders, which provides the next page in the list of orders. + /// $top is supported on fetching list of resources. $top=10 means that the first 10 items in the list will be returned to the API caller. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, string skipToken = null, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId, skipToken, top); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + OrderResourceList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = OrderResourceList.DeserializeOrderResourceList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List orders at subscription level. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// $skipToken is supported on Get list of orders, which provides the next page in the list of orders. + /// $top is supported on fetching list of resources. $top=10 means that the first 10 items in the list will be returned to the API caller. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, string skipToken = null, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId, skipToken, top); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + OrderResourceList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = OrderResourceList.DeserializeOrderResourceList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string skipToken, int? top) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string skipToken, int? top) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List orders at resource group level. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// $skipToken is supported on Get list of orders, which provides the next page in the list of orders. + /// $top is supported on fetching list of resources. $top=10 means that the first 10 items in the list will be returned to the API caller. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string skipToken = null, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName, skipToken, top); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + OrderResourceList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = OrderResourceList.DeserializeOrderResourceList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List orders at resource group level. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// $skipToken is supported on Get list of orders, which provides the next page in the list of orders. + /// $top is supported on fetching list of resources. $top=10 means that the first 10 items in the list will be returned to the API caller. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, string skipToken = null, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName, skipToken, top); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + OrderResourceList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = OrderResourceList.DeserializeOrderResourceList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/RestOperations/ProductsAndConfigurationsOperationGroupRestOperations.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/RestOperations/ProductsAndConfigurationsOperationGroupRestOperations.cs new file mode 100644 index 000000000000..fa040dcbd9bf --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/RestOperations/ProductsAndConfigurationsOperationGroupRestOperations.cs @@ -0,0 +1,573 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.EdgeOrder.Models; + +namespace Azure.ResourceManager.EdgeOrder +{ + internal partial class ProductsAndConfigurationsOperationGroupRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ProductsAndConfigurationsOperationGroupRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public ProductsAndConfigurationsOperationGroupRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-02-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetConfigurationsRequestUri(string subscriptionId, ConfigurationsContent content, string skipToken) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.EdgeOrder/listConfigurations", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (skipToken != null) + { + uri.AppendQuery("$skipToken", skipToken, true); + } + return uri; + } + + internal HttpMessage CreateGetConfigurationsRequest(string subscriptionId, ConfigurationsContent content, string skipToken) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.EdgeOrder/listConfigurations", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (skipToken != null) + { + uri.AppendQuery("$skipToken", skipToken, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// List configurations for the given product family, product line and product for the given subscription. + /// The ID of the target subscription. The value must be an UUID. + /// Filters for showing the configurations. + /// $skipToken is supported on list of configurations, which provides the next page in the list of configurations. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> GetConfigurationsAsync(string subscriptionId, ConfigurationsContent content, string skipToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateGetConfigurationsRequest(subscriptionId, content, skipToken); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Configurations value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = Configurations.DeserializeConfigurations(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List configurations for the given product family, product line and product for the given subscription. + /// The ID of the target subscription. The value must be an UUID. + /// Filters for showing the configurations. + /// $skipToken is supported on list of configurations, which provides the next page in the list of configurations. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response GetConfigurations(string subscriptionId, ConfigurationsContent content, string skipToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateGetConfigurationsRequest(subscriptionId, content, skipToken); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Configurations value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = Configurations.DeserializeConfigurations(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetProductFamiliesRequestUri(string subscriptionId, ProductFamiliesContent content, string expand, string skipToken) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.EdgeOrder/listProductFamilies", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (expand != null) + { + uri.AppendQuery("$expand", expand, true); + } + if (skipToken != null) + { + uri.AppendQuery("$skipToken", skipToken, true); + } + return uri; + } + + internal HttpMessage CreateGetProductFamiliesRequest(string subscriptionId, ProductFamiliesContent content, string expand, string skipToken) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.EdgeOrder/listProductFamilies", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (expand != null) + { + uri.AppendQuery("$expand", expand, true); + } + if (skipToken != null) + { + uri.AppendQuery("$skipToken", skipToken, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// List product families for the given subscription. + /// The ID of the target subscription. The value must be an UUID. + /// Filters for showing the product families. + /// $expand is supported on configurations parameter for product, which provides details on the configurations for the product. + /// $skipToken is supported on list of product families, which provides the next page in the list of product families. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> GetProductFamiliesAsync(string subscriptionId, ProductFamiliesContent content, string expand = null, string skipToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateGetProductFamiliesRequest(subscriptionId, content, expand, skipToken); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ProductFamilies value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ProductFamilies.DeserializeProductFamilies(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List product families for the given subscription. + /// The ID of the target subscription. The value must be an UUID. + /// Filters for showing the product families. + /// $expand is supported on configurations parameter for product, which provides details on the configurations for the product. + /// $skipToken is supported on list of product families, which provides the next page in the list of product families. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response GetProductFamilies(string subscriptionId, ProductFamiliesContent content, string expand = null, string skipToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateGetProductFamiliesRequest(subscriptionId, content, expand, skipToken); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ProductFamilies value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ProductFamilies.DeserializeProductFamilies(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetProductFamiliesMetadataRequestUri(string subscriptionId, string skipToken) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.EdgeOrder/productFamiliesMetadata", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (skipToken != null) + { + uri.AppendQuery("$skipToken", skipToken, true); + } + return uri; + } + + internal HttpMessage CreateGetProductFamiliesMetadataRequest(string subscriptionId, string skipToken) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.EdgeOrder/productFamiliesMetadata", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (skipToken != null) + { + uri.AppendQuery("$skipToken", skipToken, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List product families metadata for the given subscription. + /// The ID of the target subscription. The value must be an UUID. + /// $skipToken is supported on list of product families metadata, which provides the next page in the list of product families metadata. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> GetProductFamiliesMetadataAsync(string subscriptionId, string skipToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateGetProductFamiliesMetadataRequest(subscriptionId, skipToken); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ProductFamiliesMetadataListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ProductFamiliesMetadataListResult.DeserializeProductFamiliesMetadataListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List product families metadata for the given subscription. + /// The ID of the target subscription. The value must be an UUID. + /// $skipToken is supported on list of product families metadata, which provides the next page in the list of product families metadata. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response GetProductFamiliesMetadata(string subscriptionId, string skipToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateGetProductFamiliesMetadataRequest(subscriptionId, skipToken); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ProductFamiliesMetadataListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ProductFamiliesMetadataListResult.DeserializeProductFamiliesMetadataListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetConfigurationsNextPageRequestUri(string nextLink, string subscriptionId, ConfigurationsContent content, string skipToken) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateGetConfigurationsNextPageRequest(string nextLink, string subscriptionId, ConfigurationsContent content, string skipToken) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List configurations for the given product family, product line and product for the given subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// Filters for showing the configurations. + /// $skipToken is supported on list of configurations, which provides the next page in the list of configurations. + /// The cancellation token to use. + /// , or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> GetConfigurationsNextPageAsync(string nextLink, string subscriptionId, ConfigurationsContent content, string skipToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateGetConfigurationsNextPageRequest(nextLink, subscriptionId, content, skipToken); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Configurations value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = Configurations.DeserializeConfigurations(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List configurations for the given product family, product line and product for the given subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// Filters for showing the configurations. + /// $skipToken is supported on list of configurations, which provides the next page in the list of configurations. + /// The cancellation token to use. + /// , or is null. + /// is an empty string, and was expected to be non-empty. + public Response GetConfigurationsNextPage(string nextLink, string subscriptionId, ConfigurationsContent content, string skipToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateGetConfigurationsNextPageRequest(nextLink, subscriptionId, content, skipToken); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Configurations value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = Configurations.DeserializeConfigurations(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetProductFamiliesNextPageRequestUri(string nextLink, string subscriptionId, ProductFamiliesContent content, string expand, string skipToken) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateGetProductFamiliesNextPageRequest(string nextLink, string subscriptionId, ProductFamiliesContent content, string expand, string skipToken) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List product families for the given subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// Filters for showing the product families. + /// $expand is supported on configurations parameter for product, which provides details on the configurations for the product. + /// $skipToken is supported on list of product families, which provides the next page in the list of product families. + /// The cancellation token to use. + /// , or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> GetProductFamiliesNextPageAsync(string nextLink, string subscriptionId, ProductFamiliesContent content, string expand = null, string skipToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateGetProductFamiliesNextPageRequest(nextLink, subscriptionId, content, expand, skipToken); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ProductFamilies value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ProductFamilies.DeserializeProductFamilies(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List product families for the given subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// Filters for showing the product families. + /// $expand is supported on configurations parameter for product, which provides details on the configurations for the product. + /// $skipToken is supported on list of product families, which provides the next page in the list of product families. + /// The cancellation token to use. + /// , or is null. + /// is an empty string, and was expected to be non-empty. + public Response GetProductFamiliesNextPage(string nextLink, string subscriptionId, ProductFamiliesContent content, string expand = null, string skipToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateGetProductFamiliesNextPageRequest(nextLink, subscriptionId, content, expand, skipToken); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ProductFamilies value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ProductFamilies.DeserializeProductFamilies(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetProductFamiliesMetadataNextPageRequestUri(string nextLink, string subscriptionId, string skipToken) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateGetProductFamiliesMetadataNextPageRequest(string nextLink, string subscriptionId, string skipToken) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List product families metadata for the given subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// $skipToken is supported on list of product families metadata, which provides the next page in the list of product families metadata. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> GetProductFamiliesMetadataNextPageAsync(string nextLink, string subscriptionId, string skipToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateGetProductFamiliesMetadataNextPageRequest(nextLink, subscriptionId, skipToken); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ProductFamiliesMetadataListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ProductFamiliesMetadataListResult.DeserializeProductFamiliesMetadataListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List product families metadata for the given subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// $skipToken is supported on list of product families metadata, which provides the next page in the list of product families metadata. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response GetProductFamiliesMetadataNextPage(string nextLink, string subscriptionId, string skipToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateGetProductFamiliesMetadataNextPageRequest(nextLink, subscriptionId, skipToken); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ProductFamiliesMetadataListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ProductFamiliesMetadataListResult.DeserializeProductFamiliesMetadataListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/autorest.md b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/autorest.md.bak similarity index 96% rename from sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/autorest.md rename to sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/autorest.md.bak index f89b4a79f8ee..31d1f0a82fba 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/autorest.md +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/autorest.md.bak @@ -8,7 +8,7 @@ azure-arm: true csharp: true library-name: EdgeOrder namespace: Azure.ResourceManager.EdgeOrder -require: https://github.com/Azure/azure-rest-api-specs/blob/58891380ba22c3565ca884dee3831445f638b545/specification/edgeorder/resource-manager/readme.md +require: https://github.com/Azure/azure-rest-api-specs/blob/b770b86265d5dc3a26b16c5d30a736e6bbba04de/specification/edgeorder/resource-manager/readme.md output-folder: $(this-folder)/Generated clear-output-folder: true sample-gen: diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/tests/Generated/Samples/Sample_EdgeOrderAddressCollection.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/tests/Generated/Samples/Sample_EdgeOrderAddressCollection.cs deleted file mode 100644 index ab2d668462e9..000000000000 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/tests/Generated/Samples/Sample_EdgeOrderAddressCollection.cs +++ /dev/null @@ -1,207 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager.EdgeOrder.Models; -using Azure.ResourceManager.Resources; -using NUnit.Framework; - -namespace Azure.ResourceManager.EdgeOrder.Samples -{ - public partial class Sample_EdgeOrderAddressCollection - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_CreateAddress() - { - // Generated from example definition: specification/edgeorder/resource-manager/Microsoft.EdgeOrder/stable/2021-12-01/examples/CreateAddress.json - // this example is just showing the usage of "CreateAddress" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f"; - string resourceGroupName = "TestRG"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this EdgeOrderAddressResource - EdgeOrderAddressCollection collection = resourceGroupResource.GetEdgeOrderAddresses(); - - // invoke the operation - string addressName = "TestMSAddressName"; - EdgeOrderAddressData data = new EdgeOrderAddressData(new AzureLocation("westus"), new EdgeOrderAddressContactDetails("Petr Cech", "1234567890", new string[] { "testemail@microsoft.com" }) - { - PhoneExtension = "", - }) - { - ShippingAddress = new EdgeOrderShippingAddress("16 TOWNSEND ST", "US") - { - StreetAddress2 = "UNIT 1", - City = "San Francisco", - StateOrProvince = "CA", - PostalCode = "94107", - CompanyName = "Microsoft", - AddressType = EdgeOrderAddressType.None, - }, - }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, addressName, data); - EdgeOrderAddressResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - EdgeOrderAddressData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_GetAddressByName() - { - // Generated from example definition: specification/edgeorder/resource-manager/Microsoft.EdgeOrder/stable/2021-12-01/examples/GetAddressByName.json - // this example is just showing the usage of "GetAddressByName" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f"; - string resourceGroupName = "TestRG"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this EdgeOrderAddressResource - EdgeOrderAddressCollection collection = resourceGroupResource.GetEdgeOrderAddresses(); - - // invoke the operation - string addressName = "TestMSAddressName"; - EdgeOrderAddressResource result = await collection.GetAsync(addressName); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - EdgeOrderAddressData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetAll_ListAddressesAtResourceGroupLevel() - { - // Generated from example definition: specification/edgeorder/resource-manager/Microsoft.EdgeOrder/stable/2021-12-01/examples/ListAddressesAtResourceGroupLevel.json - // this example is just showing the usage of "ListAddressesAtResourceGroupLevel" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f"; - string resourceGroupName = "TestRG"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this EdgeOrderAddressResource - EdgeOrderAddressCollection collection = resourceGroupResource.GetEdgeOrderAddresses(); - - // invoke the operation and iterate over the result - await foreach (EdgeOrderAddressResource item in collection.GetAllAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - EdgeOrderAddressData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Exists_GetAddressByName() - { - // Generated from example definition: specification/edgeorder/resource-manager/Microsoft.EdgeOrder/stable/2021-12-01/examples/GetAddressByName.json - // this example is just showing the usage of "GetAddressByName" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f"; - string resourceGroupName = "TestRG"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this EdgeOrderAddressResource - EdgeOrderAddressCollection collection = resourceGroupResource.GetEdgeOrderAddresses(); - - // invoke the operation - string addressName = "TestMSAddressName"; - bool result = await collection.ExistsAsync(addressName); - - Console.WriteLine($"Succeeded: {result}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetIfExists_GetAddressByName() - { - // Generated from example definition: specification/edgeorder/resource-manager/Microsoft.EdgeOrder/stable/2021-12-01/examples/GetAddressByName.json - // this example is just showing the usage of "GetAddressByName" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f"; - string resourceGroupName = "TestRG"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this EdgeOrderAddressResource - EdgeOrderAddressCollection collection = resourceGroupResource.GetEdgeOrderAddresses(); - - // invoke the operation - string addressName = "TestMSAddressName"; - NullableResponse response = await collection.GetIfExistsAsync(addressName); - EdgeOrderAddressResource result = response.HasValue ? response.Value : null; - - if (result == null) - { - Console.WriteLine("Succeeded with null as result"); - } - else - { - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - EdgeOrderAddressData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } - } -} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/tests/Generated/Samples/Sample_EdgeOrderAddressResource.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/tests/Generated/Samples/Sample_EdgeOrderAddressResource.cs deleted file mode 100644 index f6d2bebf3fa4..000000000000 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/tests/Generated/Samples/Sample_EdgeOrderAddressResource.cs +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager.EdgeOrder.Models; -using NUnit.Framework; - -namespace Azure.ResourceManager.EdgeOrder.Samples -{ - public partial class Sample_EdgeOrderAddressResource - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_GetAddressByName() - { - // Generated from example definition: specification/edgeorder/resource-manager/Microsoft.EdgeOrder/stable/2021-12-01/examples/GetAddressByName.json - // this example is just showing the usage of "GetAddressByName" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this EdgeOrderAddressResource created on azure - // for more information of creating EdgeOrderAddressResource, please refer to the document of EdgeOrderAddressResource - string subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f"; - string resourceGroupName = "TestRG"; - string addressName = "TestMSAddressName"; - ResourceIdentifier edgeOrderAddressResourceId = EdgeOrderAddressResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, addressName); - EdgeOrderAddressResource edgeOrderAddress = client.GetEdgeOrderAddressResource(edgeOrderAddressResourceId); - - // invoke the operation - EdgeOrderAddressResource result = await edgeOrderAddress.GetAsync(); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - EdgeOrderAddressData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Delete_DeleteAddressByName() - { - // Generated from example definition: specification/edgeorder/resource-manager/Microsoft.EdgeOrder/stable/2021-12-01/examples/DeleteAddressByName.json - // this example is just showing the usage of "DeleteAddressByName" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this EdgeOrderAddressResource created on azure - // for more information of creating EdgeOrderAddressResource, please refer to the document of EdgeOrderAddressResource - string subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f"; - string resourceGroupName = "TestRG"; - string addressName = "TestAddressName1"; - ResourceIdentifier edgeOrderAddressResourceId = EdgeOrderAddressResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, addressName); - EdgeOrderAddressResource edgeOrderAddress = client.GetEdgeOrderAddressResource(edgeOrderAddressResourceId); - - // invoke the operation - await edgeOrderAddress.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Update_UpdateAddress() - { - // Generated from example definition: specification/edgeorder/resource-manager/Microsoft.EdgeOrder/stable/2021-12-01/examples/UpdateAddress.json - // this example is just showing the usage of "UpdateAddress" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this EdgeOrderAddressResource created on azure - // for more information of creating EdgeOrderAddressResource, please refer to the document of EdgeOrderAddressResource - string subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f"; - string resourceGroupName = "TestRG"; - string addressName = "TestAddressName2"; - ResourceIdentifier edgeOrderAddressResourceId = EdgeOrderAddressResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, addressName); - EdgeOrderAddressResource edgeOrderAddress = client.GetEdgeOrderAddressResource(edgeOrderAddressResourceId); - - // invoke the operation - EdgeOrderAddressPatch patch = new EdgeOrderAddressPatch - { - Tags = -{ -["Hobby"] = "Web Series Added", -["Name"] = "Smile-Updated", -["WhatElse"] = "Web Series Added", -["Work"] = "Engineering" -}, - ShippingAddress = new EdgeOrderShippingAddress("16 TOWNSEND STT", "US") - { - StreetAddress2 = "UNIT 1", - City = "San Francisco", - StateOrProvince = "CA", - PostalCode = "94107", - CompanyName = "Microsoft", - AddressType = EdgeOrderAddressType.None, - }, - ContactDetails = new EdgeOrderAddressContactDetails("Petr Cech", "1234567890", new string[] { "ssemcr@microsoft.com" }) - { - PhoneExtension = "", - }, - }; - ArmOperation lro = await edgeOrderAddress.UpdateAsync(WaitUntil.Completed, patch); - EdgeOrderAddressResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - EdgeOrderAddressData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } -} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/tests/Generated/Samples/Sample_EdgeOrderCollection.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/tests/Generated/Samples/Sample_EdgeOrderCollection.cs deleted file mode 100644 index fb639608bbe3..000000000000 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/tests/Generated/Samples/Sample_EdgeOrderCollection.cs +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager.Resources; -using NUnit.Framework; - -namespace Azure.ResourceManager.EdgeOrder.Samples -{ - public partial class Sample_EdgeOrderCollection - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_GetOrderByName() - { - // Generated from example definition: specification/edgeorder/resource-manager/Microsoft.EdgeOrder/stable/2021-12-01/examples/GetOrderByName.json - // this example is just showing the usage of "GetOrderByName" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f"; - string resourceGroupName = "TestRG"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this EdgeOrderResource - EdgeOrderCollection collection = resourceGroupResource.GetEdgeOrders(); - - // invoke the operation - AzureLocation location = new AzureLocation("%7B%7B%7Blocation%7D%7D"); - string orderName = "TestOrderItemName901"; - EdgeOrderResource result = await collection.GetAsync(location, orderName); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - EdgeOrderData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Exists_GetOrderByName() - { - // Generated from example definition: specification/edgeorder/resource-manager/Microsoft.EdgeOrder/stable/2021-12-01/examples/GetOrderByName.json - // this example is just showing the usage of "GetOrderByName" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f"; - string resourceGroupName = "TestRG"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this EdgeOrderResource - EdgeOrderCollection collection = resourceGroupResource.GetEdgeOrders(); - - // invoke the operation - AzureLocation location = new AzureLocation("%7B%7B%7Blocation%7D%7D"); - string orderName = "TestOrderItemName901"; - bool result = await collection.ExistsAsync(location, orderName); - - Console.WriteLine($"Succeeded: {result}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetIfExists_GetOrderByName() - { - // Generated from example definition: specification/edgeorder/resource-manager/Microsoft.EdgeOrder/stable/2021-12-01/examples/GetOrderByName.json - // this example is just showing the usage of "GetOrderByName" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f"; - string resourceGroupName = "TestRG"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this EdgeOrderResource - EdgeOrderCollection collection = resourceGroupResource.GetEdgeOrders(); - - // invoke the operation - AzureLocation location = new AzureLocation("%7B%7B%7Blocation%7D%7D"); - string orderName = "TestOrderItemName901"; - NullableResponse response = await collection.GetIfExistsAsync(location, orderName); - EdgeOrderResource result = response.HasValue ? response.Value : null; - - if (result == null) - { - Console.WriteLine("Succeeded with null as result"); - } - else - { - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - EdgeOrderData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } - } -} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/tests/Generated/Samples/Sample_EdgeOrderItemCollection.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/tests/Generated/Samples/Sample_EdgeOrderItemCollection.cs deleted file mode 100644 index 8d41016bc287..000000000000 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/tests/Generated/Samples/Sample_EdgeOrderItemCollection.cs +++ /dev/null @@ -1,224 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager.EdgeOrder.Models; -using Azure.ResourceManager.Resources; -using NUnit.Framework; - -namespace Azure.ResourceManager.EdgeOrder.Samples -{ - public partial class Sample_EdgeOrderItemCollection - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_CreateOrderItem() - { - // Generated from example definition: specification/edgeorder/resource-manager/Microsoft.EdgeOrder/stable/2021-12-01/examples/CreateOrderItem.json - // this example is just showing the usage of "CreateOrderItem" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f"; - string resourceGroupName = "TestRG"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this EdgeOrderItemResource - EdgeOrderItemCollection collection = resourceGroupResource.GetEdgeOrderItems(); - - // invoke the operation - string orderItemName = "TestOrderItemName01"; - EdgeOrderItemData data = new EdgeOrderItemData(new AzureLocation("westus"), new EdgeOrderItemDetails(new ProductDetails(new HierarchyInformation - { - ProductFamilyName = "AzureStackEdge", - ProductLineName = "AzureStackEdge", - ProductName = "AzureStackEdgeGPU", - ConfigurationName = "AzureStackEdgeGPU", - }), OrderItemType.Purchase) - { - Preferences = new OrderItemPreferences - { - TransportPreferencesPreferredShipmentType = TransportShipmentType.MicrosoftManaged, - }, - }, new EdgeOrderItemAddressDetails(new EdgeOrderItemAddressProperties(new EdgeOrderAddressContactDetails("164 TOWNSEND ST", "3213131190", new string[] { "ssemmail@microsoft.com", "vishwamdir@microsoft.com" })) - { - ShippingAddress = new EdgeOrderShippingAddress("16 TOWNSEND ST", "US") - { - StreetAddress2 = "UNIT 1", - City = "San Francisco", - StateOrProvince = "CA", - PostalCode = "94107", - ZipExtendedCode = "1", - CompanyName = "Microsoft", - AddressType = EdgeOrderAddressType.Residential, - }, - }), new ResourceIdentifier("/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/TestRG/providers/Microsoft.EdgeOrder/locations/westus/orders/TestOrderItemName01")) - { - Tags = -{ -["carrot"] = "vegetable", -["mango"] = "fruit" -}, - }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, orderItemName, data); - EdgeOrderItemResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - EdgeOrderItemData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_GetOrderItemByName() - { - // Generated from example definition: specification/edgeorder/resource-manager/Microsoft.EdgeOrder/stable/2021-12-01/examples/GetOrderItemByName.json - // this example is just showing the usage of "GetOrderItemByName" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f"; - string resourceGroupName = "TestRG"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this EdgeOrderItemResource - EdgeOrderItemCollection collection = resourceGroupResource.GetEdgeOrderItems(); - - // invoke the operation - string orderItemName = "TestOrderItemName01"; - EdgeOrderItemResource result = await collection.GetAsync(orderItemName); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - EdgeOrderItemData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetAll_ListOrderItemsAtResourceGroupLevel() - { - // Generated from example definition: specification/edgeorder/resource-manager/Microsoft.EdgeOrder/stable/2021-12-01/examples/ListOrderItemsAtResourceGroupLevel.json - // this example is just showing the usage of "ListOrderItemsAtResourceGroupLevel" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f"; - string resourceGroupName = "TestRG"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this EdgeOrderItemResource - EdgeOrderItemCollection collection = resourceGroupResource.GetEdgeOrderItems(); - - // invoke the operation and iterate over the result - await foreach (EdgeOrderItemResource item in collection.GetAllAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - EdgeOrderItemData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Exists_GetOrderItemByName() - { - // Generated from example definition: specification/edgeorder/resource-manager/Microsoft.EdgeOrder/stable/2021-12-01/examples/GetOrderItemByName.json - // this example is just showing the usage of "GetOrderItemByName" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f"; - string resourceGroupName = "TestRG"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this EdgeOrderItemResource - EdgeOrderItemCollection collection = resourceGroupResource.GetEdgeOrderItems(); - - // invoke the operation - string orderItemName = "TestOrderItemName01"; - bool result = await collection.ExistsAsync(orderItemName); - - Console.WriteLine($"Succeeded: {result}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetIfExists_GetOrderItemByName() - { - // Generated from example definition: specification/edgeorder/resource-manager/Microsoft.EdgeOrder/stable/2021-12-01/examples/GetOrderItemByName.json - // this example is just showing the usage of "GetOrderItemByName" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f"; - string resourceGroupName = "TestRG"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this EdgeOrderItemResource - EdgeOrderItemCollection collection = resourceGroupResource.GetEdgeOrderItems(); - - // invoke the operation - string orderItemName = "TestOrderItemName01"; - NullableResponse response = await collection.GetIfExistsAsync(orderItemName); - EdgeOrderItemResource result = response.HasValue ? response.Value : null; - - if (result == null) - { - Console.WriteLine("Succeeded with null as result"); - } - else - { - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - EdgeOrderItemData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } - } -} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/tests/Generated/Samples/Sample_EdgeOrderItemResource.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/tests/Generated/Samples/Sample_EdgeOrderItemResource.cs deleted file mode 100644 index a77049e4b329..000000000000 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/tests/Generated/Samples/Sample_EdgeOrderItemResource.cs +++ /dev/null @@ -1,174 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager.EdgeOrder.Models; -using NUnit.Framework; - -namespace Azure.ResourceManager.EdgeOrder.Samples -{ - public partial class Sample_EdgeOrderItemResource - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_GetOrderItemByName() - { - // Generated from example definition: specification/edgeorder/resource-manager/Microsoft.EdgeOrder/stable/2021-12-01/examples/GetOrderItemByName.json - // this example is just showing the usage of "GetOrderItemByName" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this EdgeOrderItemResource created on azure - // for more information of creating EdgeOrderItemResource, please refer to the document of EdgeOrderItemResource - string subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f"; - string resourceGroupName = "TestRG"; - string orderItemName = "TestOrderItemName01"; - ResourceIdentifier edgeOrderItemResourceId = EdgeOrderItemResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, orderItemName); - EdgeOrderItemResource edgeOrderItem = client.GetEdgeOrderItemResource(edgeOrderItemResourceId); - - // invoke the operation - EdgeOrderItemResource result = await edgeOrderItem.GetAsync(); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - EdgeOrderItemData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Delete_DeleteOrderItemByName() - { - // Generated from example definition: specification/edgeorder/resource-manager/Microsoft.EdgeOrder/stable/2021-12-01/examples/DeleteOrderItemByName.json - // this example is just showing the usage of "DeleteOrderItemByName" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this EdgeOrderItemResource created on azure - // for more information of creating EdgeOrderItemResource, please refer to the document of EdgeOrderItemResource - string subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f"; - string resourceGroupName = "TestRG"; - string orderItemName = "TestOrderItemName01"; - ResourceIdentifier edgeOrderItemResourceId = EdgeOrderItemResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, orderItemName); - EdgeOrderItemResource edgeOrderItem = client.GetEdgeOrderItemResource(edgeOrderItemResourceId); - - // invoke the operation - await edgeOrderItem.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Update_UpdateOrderItem() - { - // Generated from example definition: specification/edgeorder/resource-manager/Microsoft.EdgeOrder/stable/2021-12-01/examples/UpdateOrderItem.json - // this example is just showing the usage of "UpdateOrderItem" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this EdgeOrderItemResource created on azure - // for more information of creating EdgeOrderItemResource, please refer to the document of EdgeOrderItemResource - string subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f"; - string resourceGroupName = "TestRG"; - string orderItemName = "TestOrderItemName01"; - ResourceIdentifier edgeOrderItemResourceId = EdgeOrderItemResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, orderItemName); - EdgeOrderItemResource edgeOrderItem = client.GetEdgeOrderItemResource(edgeOrderItemResourceId); - - // invoke the operation - EdgeOrderItemPatch patch = new EdgeOrderItemPatch - { - Tags = -{ -["ant"] = "insect", -["pigeon"] = "bird", -["tiger"] = "animal" -}, - ForwardAddress = new EdgeOrderItemAddressProperties(new EdgeOrderAddressContactDetails("Updated contact name", "2222200000", new string[] { "testemail@microsoft.com" })), - Preferences = new OrderItemPreferences - { - TransportPreferencesPreferredShipmentType = TransportShipmentType.CustomerManaged, - }, - }; - ArmOperation lro = await edgeOrderItem.UpdateAsync(WaitUntil.Completed, patch); - EdgeOrderItemResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - EdgeOrderItemData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Cancel_CancelOrderItem() - { - // Generated from example definition: specification/edgeorder/resource-manager/Microsoft.EdgeOrder/stable/2021-12-01/examples/CancelOrderItem.json - // this example is just showing the usage of "CancelOrderItem" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this EdgeOrderItemResource created on azure - // for more information of creating EdgeOrderItemResource, please refer to the document of EdgeOrderItemResource - string subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f"; - string resourceGroupName = "TestRG"; - string orderItemName = "TestOrderItemName1"; - ResourceIdentifier edgeOrderItemResourceId = EdgeOrderItemResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, orderItemName); - EdgeOrderItemResource edgeOrderItem = client.GetEdgeOrderItemResource(edgeOrderItemResourceId); - - // invoke the operation - EdgeOrderItemCancellationReason cancellationReason = new EdgeOrderItemCancellationReason("Order cancelled"); - await edgeOrderItem.CancelAsync(cancellationReason); - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Return_ReturnOrderItem() - { - // Generated from example definition: specification/edgeorder/resource-manager/Microsoft.EdgeOrder/stable/2021-12-01/examples/ReturnOrderItem.json - // this example is just showing the usage of "ReturnOrderItem" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this EdgeOrderItemResource created on azure - // for more information of creating EdgeOrderItemResource, please refer to the document of EdgeOrderItemResource - string subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f"; - string resourceGroupName = "TestRG"; - string orderItemName = "TestOrderName1"; - ResourceIdentifier edgeOrderItemResourceId = EdgeOrderItemResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, orderItemName); - EdgeOrderItemResource edgeOrderItem = client.GetEdgeOrderItemResource(edgeOrderItemResourceId); - - // invoke the operation - EdgeOrderItemReturnContent content = new EdgeOrderItemReturnContent("Order returned"); - await edgeOrderItem.ReturnAsync(WaitUntil.Completed, content); - - Console.WriteLine("Succeeded"); - } - } -} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/tests/Generated/Samples/Sample_EdgeOrderResource.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/tests/Generated/Samples/Sample_EdgeOrderResource.cs deleted file mode 100644 index 3b653844390e..000000000000 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/tests/Generated/Samples/Sample_EdgeOrderResource.cs +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using NUnit.Framework; - -namespace Azure.ResourceManager.EdgeOrder.Samples -{ - public partial class Sample_EdgeOrderResource - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_GetOrderByName() - { - // Generated from example definition: specification/edgeorder/resource-manager/Microsoft.EdgeOrder/stable/2021-12-01/examples/GetOrderByName.json - // this example is just showing the usage of "GetOrderByName" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this EdgeOrderResource created on azure - // for more information of creating EdgeOrderResource, please refer to the document of EdgeOrderResource - string subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f"; - string resourceGroupName = "TestRG"; - AzureLocation location = new AzureLocation("%7B%7B%7Blocation%7D%7D"); - string orderName = "TestOrderItemName901"; - ResourceIdentifier edgeOrderResourceId = EdgeOrderResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, location, orderName); - EdgeOrderResource edgeOrder = client.GetEdgeOrderResource(edgeOrderResourceId); - - // invoke the operation - EdgeOrderResource result = await edgeOrder.GetAsync(); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - EdgeOrderData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } -} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/tests/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/tests/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs deleted file mode 100644 index f77c514588cb..000000000000 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/tests/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager.Resources; -using NUnit.Framework; - -namespace Azure.ResourceManager.EdgeOrder.Samples -{ - public partial class Sample_ResourceGroupResourceExtensions - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetEdgeOrders_ListOrderAtResourceGroupLevel() - { - // Generated from example definition: specification/edgeorder/resource-manager/Microsoft.EdgeOrder/stable/2021-12-01/examples/ListOrderAtResourceGroupLevel.json - // this example is just showing the usage of "ListOrderAtResourceGroupLevel" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f"; - string resourceGroupName = "TestRG"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // invoke the operation and iterate over the result - await foreach (EdgeOrderResource item in resourceGroupResource.GetEdgeOrdersAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - EdgeOrderData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine("Succeeded"); - } - } -} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs deleted file mode 100644 index afe8473e72e2..000000000000 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ /dev/null @@ -1,214 +0,0 @@ -// 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.Core; -using Azure.Identity; -using Azure.ResourceManager.EdgeOrder.Models; -using Azure.ResourceManager.Resources; -using NUnit.Framework; - -namespace Azure.ResourceManager.EdgeOrder.Samples -{ - public partial class Sample_SubscriptionResourceExtensions - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetEdgeOrderAddresses_ListAddressesAtSubscriptionLevel() - { - // Generated from example definition: specification/edgeorder/resource-manager/Microsoft.EdgeOrder/stable/2021-12-01/examples/ListAddressesAtSubscriptionLevel.json - // this example is just showing the usage of "ListAddressesAtSubscriptionLevel" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this SubscriptionResource created on azure - // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f"; - ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); - SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - - // invoke the operation and iterate over the result - await foreach (EdgeOrderAddressResource item in subscriptionResource.GetEdgeOrderAddressesAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - EdgeOrderAddressData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetProductFamilies_ListProductFamilies() - { - // Generated from example definition: specification/edgeorder/resource-manager/Microsoft.EdgeOrder/stable/2021-12-01/examples/ListProductFamilies.json - // this example is just showing the usage of "ListProductFamilies" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this SubscriptionResource created on azure - // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f"; - ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); - SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - - // invoke the operation and iterate over the result - ProductFamiliesContent content = new ProductFamiliesContent(new Dictionary> - { - ["azurestackedge"] = new FilterableProperty[] - { -new FilterableProperty(SupportedFilterType.ShipToCountries, new string[]{"US"}) - } - }); - await foreach (ProductFamily item in subscriptionResource.GetProductFamiliesAsync(content)) - { - Console.WriteLine($"Succeeded: {item}"); - } - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetConfigurations_ListConfigurations() - { - // Generated from example definition: specification/edgeorder/resource-manager/Microsoft.EdgeOrder/stable/2021-12-01/examples/ListConfigurations.json - // this example is just showing the usage of "ListConfigurations" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this SubscriptionResource created on azure - // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f"; - ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); - SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - - // invoke the operation and iterate over the result - ConfigurationsContent content = new ConfigurationsContent(new ConfigurationFilters[] - { -new ConfigurationFilters(new HierarchyInformation -{ -ProductFamilyName = "AzureStackEdge", -ProductLineName = "AzureStackEdge", -ProductName = "AzureStackEdgeGPU", -}) -{ -FilterableProperty = {new FilterableProperty(SupportedFilterType.ShipToCountries, new string[]{"US"})}, -} - }); - await foreach (ProductConfiguration item in subscriptionResource.GetConfigurationsAsync(content)) - { - Console.WriteLine($"Succeeded: {item}"); - } - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetProductFamiliesMetadata_ListProductFamiliesMetadata() - { - // Generated from example definition: specification/edgeorder/resource-manager/Microsoft.EdgeOrder/stable/2021-12-01/examples/ListProductFamiliesMetadata.json - // this example is just showing the usage of "ListProductFamiliesMetadata" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this SubscriptionResource created on azure - // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f"; - ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); - SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - - // invoke the operation and iterate over the result - await foreach (ProductFamiliesMetadata item in subscriptionResource.GetProductFamiliesMetadataAsync()) - { - Console.WriteLine($"Succeeded: {item}"); - } - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetEdgeOrders_ListOrderAtSubscriptionLevel() - { - // Generated from example definition: specification/edgeorder/resource-manager/Microsoft.EdgeOrder/stable/2021-12-01/examples/ListOrderAtSubscriptionLevel.json - // this example is just showing the usage of "ListOrderAtSubscriptionLevel" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this SubscriptionResource created on azure - // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f"; - ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); - SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - - // invoke the operation and iterate over the result - await foreach (EdgeOrderResource item in subscriptionResource.GetEdgeOrdersAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - EdgeOrderData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetEdgeOrderItems_ListOrderItemsAtSubscriptionLevel() - { - // Generated from example definition: specification/edgeorder/resource-manager/Microsoft.EdgeOrder/stable/2021-12-01/examples/ListOrderItemsAtSubscriptionLevel.json - // this example is just showing the usage of "ListOrderItemsAtSubscriptionLevel" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this SubscriptionResource created on azure - // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "fa68082f-8ff7-4a25-95c7-ce9da541242f"; - ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); - SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - - // invoke the operation and iterate over the result - await foreach (EdgeOrderItemResource item in subscriptionResource.GetEdgeOrderItemsAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - EdgeOrderItemData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine("Succeeded"); - } - } -} diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/tests/Tests/ListAddressTests.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/tests/Tests/ListAddressTests.cs index 209b5ed3d07d..6ff4ff6d43e8 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/tests/Tests/ListAddressTests.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/tests/Tests/ListAddressTests.cs @@ -60,7 +60,7 @@ public void Cleanup() [TestCase, Order(1)] public async Task TestListAddressesAtSubscriptionLevel() { - AsyncPageable addresses = EdgeOrderExtensions.GetEdgeOrderAddressesAsync(Subscription); + AsyncPageable addresses = EdgeOrderExtensions.GetEdgeOrderAddressesAsync(Subscription, null, null, null); List addressesResult = await addresses.ToEnumerableAsync(); Assert.NotNull(addressesResult); diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/tests/Tests/ListOrderItemTests.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/tests/Tests/ListOrderItemTests.cs index da79d9d8c8ef..b3870f7eeff2 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/tests/Tests/ListOrderItemTests.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/tests/Tests/ListOrderItemTests.cs @@ -82,7 +82,7 @@ public async Task Cleanup() [TestCase, Order(1)] public async Task TestListOrderItemsAtSubscriptionLevel() { - AsyncPageable orderItems = EdgeOrderExtensions.GetEdgeOrderItemsAsync(Subscription); + AsyncPageable orderItems = EdgeOrderExtensions.GetEdgeOrderItemsAsync(Subscription, null, null, null, null); List orderItemsResult = await orderItems.ToEnumerableAsync(); Assert.NotNull(orderItemsResult); diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/tests/Tests/ListOrderTests.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/tests/Tests/ListOrderTests.cs index d681f71e2cfa..081fb82a9a7e 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/tests/Tests/ListOrderTests.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/tests/Tests/ListOrderTests.cs @@ -85,7 +85,7 @@ await EdgeOrderManagementTestUtilities.TryRegisterResourceGroupAsync(ResourceGro [TestCase, Order(1)] public async Task TestListOrdersAtSubscriptionLevel() { - AsyncPageable orders = EdgeOrderExtensions.GetEdgeOrdersAsync(Subscription); + AsyncPageable orders = EdgeOrderExtensions.GetEdgeOrdersAsync(Subscription, null, null); List ordersResult = await orders.ToEnumerableAsync(); Assert.NotNull(ordersResult); @@ -96,7 +96,7 @@ public async Task TestListOrdersAtSubscriptionLevel() public async Task TestListOrdersAtResourceGroupLevel() { ResourceGroupResource rg = await GetResourceGroupAsync(_resourceGroupName); - AsyncPageable orders = EdgeOrderExtensions.GetEdgeOrdersAsync(rg); + AsyncPageable orders = EdgeOrderExtensions.GetEdgeOrdersAsync(rg, null, null); List ordersResult = await orders.ToEnumerableAsync(); Assert.NotNull(ordersResult); diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/tests/Tests/ProductConfigTests.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/tests/Tests/ProductConfigTests.cs index 94b028bde1df..474c52aa7886 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/tests/Tests/ProductConfigTests.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/tests/Tests/ProductConfigTests.cs @@ -65,8 +65,7 @@ public async Task TestListConfigurations() ConfigurationFilters configurationFilters = new(GetHierarchyInformation()); configurationFilters.FilterableProperty.Add(new FilterableProperty(SupportedFilterType.ShipToCountries, new List() { "US" })); - ConfigurationsContent configurationsRequest = new( - new List() { configurationFilters }); + var configurationsRequest = new ConfigurationsContent() { ConfigurationFilter = configurationFilters }; AsyncPageable configurations = EdgeOrderExtensions.GetConfigurationsAsync(Subscription, configurationsRequest); List configurationsResult = await configurations.ToEnumerableAsync(); diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/tsp-location.yaml b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/tsp-location.yaml new file mode 100644 index 000000000000..f4c0d1ca5c85 --- /dev/null +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/tsp-location.yaml @@ -0,0 +1,3 @@ +directory: specification\edgeorder\EdgeOrder.Management +commit: bbe7ce3f01187616839e2dab59cc65fb1ff16779 +repo: Azure/azure-rest-api-specs