diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/samples/Generated/Samples/Sample_AddressResource.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/samples/Generated/Samples/Sample_AddressResource.cs
new file mode 100644
index 000000000000..4145621e79e8
--- /dev/null
+++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/samples/Generated/Samples/Sample_AddressResource.cs
@@ -0,0 +1,107 @@
+// 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_AddressResource
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_GetAddressByName()
+ {
+ // Generated from example definition: 2024-02-01/GetAddressByName.json
+ // this example is just showing the usage of "AddressResource_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this AddressResource created on azure
+ // for more information of creating AddressResource, please refer to the document of AddressResource
+ string subscriptionId = "eb5dc900-6186-49d8-b7d7-febd866fdc1d";
+ string resourceGroupName = "YourResourceGroupName";
+ string addressName = "TestAddressName1";
+ ResourceIdentifier addressResourceId = AddressResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, addressName);
+ AddressResource addressResource = client.GetAddressResource(addressResourceId);
+
+ // invoke the operation
+ AddressResource result = await addressResource.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
+ AddressResourceData 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: 2024-02-01/DeleteAddressByName.json
+ // this example is just showing the usage of "AddressResource_Delete" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this AddressResource created on azure
+ // for more information of creating AddressResource, please refer to the document of AddressResource
+ string subscriptionId = "eb5dc900-6186-49d8-b7d7-febd866fdc1d";
+ string resourceGroupName = "YourResourceGroupName";
+ string addressName = "TestAddressName1";
+ ResourceIdentifier addressResourceId = AddressResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, addressName);
+ AddressResource addressResource = client.GetAddressResource(addressResourceId);
+
+ // invoke the operation
+ await addressResource.DeleteAsync(WaitUntil.Completed);
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Update_UpdateAddress()
+ {
+ // Generated from example definition: 2024-02-01/UpdateAddress.json
+ // this example is just showing the usage of "AddressResource_Update" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this AddressResource created on azure
+ // for more information of creating AddressResource, please refer to the document of AddressResource
+ string subscriptionId = "eb5dc900-6186-49d8-b7d7-febd866fdc1d";
+ string resourceGroupName = "YourResourceGroupName";
+ string addressName = "TestAddressName2";
+ ResourceIdentifier addressResourceId = AddressResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, addressName);
+ AddressResource addressResource = client.GetAddressResource(addressResourceId);
+
+ // invoke the operation
+ AddressResourcePatch patch = new AddressResourcePatch();
+ ArmOperation lro = await addressResource.UpdateAsync(WaitUntil.Completed, patch);
+ AddressResource 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
+ AddressResourceData 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/samples/Generated/Samples/Sample_AddressResourceCollection.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/samples/Generated/Samples/Sample_AddressResourceCollection.cs
new file mode 100644
index 000000000000..b6f1d7dffa22
--- /dev/null
+++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/samples/Generated/Samples/Sample_AddressResourceCollection.cs
@@ -0,0 +1,187 @@
+// 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_AddressResourceCollection
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task CreateOrUpdate_CreateAddress()
+ {
+ // Generated from example definition: 2024-02-01/CreateAddress.json
+ // this example is just showing the usage of "AddressResource_Create" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ 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 = "eb5dc900-6186-49d8-b7d7-febd866fdc1d";
+ string resourceGroupName = "YourResourceGroupName";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this AddressResource
+ AddressResourceCollection collection = resourceGroupResource.GetAddressResources();
+
+ // invoke the operation
+ string addressName = "TestAddressName2";
+ AddressResourceData data = new AddressResourceData(default);
+ await collection.CreateOrUpdateAsync(WaitUntil.Completed, addressName, data);
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_GetAddressByName()
+ {
+ // Generated from example definition: 2024-02-01/GetAddressByName.json
+ // this example is just showing the usage of "AddressResource_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 = "eb5dc900-6186-49d8-b7d7-febd866fdc1d";
+ string resourceGroupName = "YourResourceGroupName";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this AddressResource
+ AddressResourceCollection collection = resourceGroupResource.GetAddressResources();
+
+ // invoke the operation
+ string addressName = "TestAddressName1";
+ AddressResource 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
+ AddressResourceData 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: 2024-02-01/ListAddressesAtResourceGroupLevel.json
+ // this example is just showing the usage of "AddressResource_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "eb5dc900-6186-49d8-b7d7-febd866fdc1d";
+ string resourceGroupName = "YourResourceGroupName";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this AddressResource
+ AddressResourceCollection collection = resourceGroupResource.GetAddressResources();
+
+ // invoke the operation and iterate over the result
+ await foreach (AddressResource 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
+ AddressResourceData 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: 2024-02-01/GetAddressByName.json
+ // this example is just showing the usage of "AddressResource_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 = "eb5dc900-6186-49d8-b7d7-febd866fdc1d";
+ string resourceGroupName = "YourResourceGroupName";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this AddressResource
+ AddressResourceCollection collection = resourceGroupResource.GetAddressResources();
+
+ // invoke the operation
+ string addressName = "TestAddressName1";
+ 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: 2024-02-01/GetAddressByName.json
+ // this example is just showing the usage of "AddressResource_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 = "eb5dc900-6186-49d8-b7d7-febd866fdc1d";
+ string resourceGroupName = "YourResourceGroupName";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this AddressResource
+ AddressResourceCollection collection = resourceGroupResource.GetAddressResources();
+
+ // invoke the operation
+ string addressName = "TestAddressName1";
+ NullableResponse response = await collection.GetIfExistsAsync(addressName);
+ AddressResource 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
+ AddressResourceData 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/samples/Generated/Samples/Sample_OrderItemResource.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/samples/Generated/Samples/Sample_OrderItemResource.cs
new file mode 100644
index 000000000000..fba8369e25a8
--- /dev/null
+++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/samples/Generated/Samples/Sample_OrderItemResource.cs
@@ -0,0 +1,162 @@
+// 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_OrderItemResource
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_GetOrderItemByName()
+ {
+ // Generated from example definition: 2024-02-01/GetOrderItemByName.json
+ // this example is just showing the usage of "OrderItemResource_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this OrderItemResource created on azure
+ // for more information of creating OrderItemResource, please refer to the document of OrderItemResource
+ string subscriptionId = "eb5dc900-6186-49d8-b7d7-febd866fdc1d";
+ string resourceGroupName = "YourResourceGroupName";
+ string orderItemName = "TestOrderItemName1";
+ ResourceIdentifier orderItemResourceId = OrderItemResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, orderItemName);
+ OrderItemResource orderItemResource = client.GetOrderItemResource(orderItemResourceId);
+
+ // invoke the operation
+ OrderItemResource result = await orderItemResource.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
+ OrderItemResourceData 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: 2024-02-01/DeleteOrderItemByName.json
+ // this example is just showing the usage of "OrderItemResource_Delete" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this OrderItemResource created on azure
+ // for more information of creating OrderItemResource, please refer to the document of OrderItemResource
+ string subscriptionId = "eb5dc900-6186-49d8-b7d7-febd866fdc1d";
+ string resourceGroupName = "YourResourceGroupName";
+ string orderItemName = "TestOrderItemName3";
+ ResourceIdentifier orderItemResourceId = OrderItemResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, orderItemName);
+ OrderItemResource orderItemResource = client.GetOrderItemResource(orderItemResourceId);
+
+ // invoke the operation
+ await orderItemResource.DeleteAsync(WaitUntil.Completed);
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Update_UpdateOrderItem()
+ {
+ // Generated from example definition: 2024-02-01/UpdateOrderItem.json
+ // this example is just showing the usage of "OrderItemResource_Update" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this OrderItemResource created on azure
+ // for more information of creating OrderItemResource, please refer to the document of OrderItemResource
+ string subscriptionId = "eb5dc900-6186-49d8-b7d7-febd866fdc1d";
+ string resourceGroupName = "YourResourceGroupName";
+ string orderItemName = "TestOrderItemName3";
+ ResourceIdentifier orderItemResourceId = OrderItemResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, orderItemName);
+ OrderItemResource orderItemResource = client.GetOrderItemResource(orderItemResourceId);
+
+ // invoke the operation
+ OrderItemResourcePatch patch = new OrderItemResourcePatch();
+ ArmOperation lro = await orderItemResource.UpdateAsync(WaitUntil.Completed, patch);
+ OrderItemResource 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
+ OrderItemResourceData 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: 2024-02-01/CancelOrderItem.json
+ // this example is just showing the usage of "OrderItemResources_Cancel" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this OrderItemResource created on azure
+ // for more information of creating OrderItemResource, please refer to the document of OrderItemResource
+ string subscriptionId = "eb5dc900-6186-49d8-b7d7-febd866fdc1d";
+ string resourceGroupName = "YourResourceGroupName";
+ string orderItemName = "TestOrderItemName3";
+ ResourceIdentifier orderItemResourceId = OrderItemResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, orderItemName);
+ OrderItemResource orderItemResource = client.GetOrderItemResource(orderItemResourceId);
+
+ // invoke the operation
+ CancellationReason cancellationReason = new CancellationReason(null);
+ await orderItemResource.CancelAsync(cancellationReason);
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task ReturnOrderItem_ReturnOrderItem()
+ {
+ // Generated from example definition: 2024-02-01/ReturnOrderItem.json
+ // this example is just showing the usage of "OrderItemResources_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 OrderItemResource created on azure
+ // for more information of creating OrderItemResource, please refer to the document of OrderItemResource
+ string subscriptionId = "eb5dc900-6186-49d8-b7d7-febd866fdc1d";
+ string resourceGroupName = "YourResourceGroupName";
+ string orderItemName = "TestOrderName4";
+ ResourceIdentifier orderItemResourceId = OrderItemResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, orderItemName);
+ OrderItemResource orderItemResource = client.GetOrderItemResource(orderItemResourceId);
+
+ // invoke the operation
+ ReturnOrderItemDetails details = new ReturnOrderItemDetails(null);
+ ArmOperation lro = await orderItemResource.ReturnOrderItemAsync(WaitUntil.Completed, details);
+ OkResponse result = lro.Value;
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+ }
+}
diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/samples/Generated/Samples/Sample_OrderItemResourceCollection.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/samples/Generated/Samples/Sample_OrderItemResourceCollection.cs
new file mode 100644
index 000000000000..3f3f31d962ce
--- /dev/null
+++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/samples/Generated/Samples/Sample_OrderItemResourceCollection.cs
@@ -0,0 +1,188 @@
+// 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_OrderItemResourceCollection
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task CreateOrUpdate_CreateOrderItem()
+ {
+ // Generated from example definition: 2024-02-01/CreateOrderItem.json
+ // this example is just showing the usage of "OrderItemResource_Create" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ 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 = "eb5dc900-6186-49d8-b7d7-febd866fdc1d";
+ string resourceGroupName = "YourResourceGroupName";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this OrderItemResource
+ OrderItemResourceCollection collection = resourceGroupResource.GetOrderItemResources();
+
+ // invoke the operation
+ string orderItemName = "TestOrderItemName2";
+ OrderItemResourceData data = new OrderItemResourceData(default, null, null);
+ await collection.CreateOrUpdateAsync(WaitUntil.Completed, orderItemName, data);
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_GetOrderItemByName()
+ {
+ // Generated from example definition: 2024-02-01/GetOrderItemByName.json
+ // this example is just showing the usage of "OrderItemResource_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 = "eb5dc900-6186-49d8-b7d7-febd866fdc1d";
+ string resourceGroupName = "YourResourceGroupName";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this OrderItemResource
+ OrderItemResourceCollection collection = resourceGroupResource.GetOrderItemResources();
+
+ // invoke the operation
+ string orderItemName = "TestOrderItemName1";
+ OrderItemResource 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
+ OrderItemResourceData 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: 2024-02-01/ListOrderItemsAtResourceGroupLevel.json
+ // this example is just showing the usage of "OrderItemResource_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "eb5dc900-6186-49d8-b7d7-febd866fdc1d";
+ string resourceGroupName = "YourResourceGroupName";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this OrderItemResource
+ OrderItemResourceCollection collection = resourceGroupResource.GetOrderItemResources();
+
+ // invoke the operation and iterate over the result
+ await foreach (OrderItemResource 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
+ OrderItemResourceData 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: 2024-02-01/GetOrderItemByName.json
+ // this example is just showing the usage of "OrderItemResource_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 = "eb5dc900-6186-49d8-b7d7-febd866fdc1d";
+ string resourceGroupName = "YourResourceGroupName";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this OrderItemResource
+ OrderItemResourceCollection collection = resourceGroupResource.GetOrderItemResources();
+
+ // invoke the operation
+ string orderItemName = "TestOrderItemName1";
+ 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: 2024-02-01/GetOrderItemByName.json
+ // this example is just showing the usage of "OrderItemResource_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 = "eb5dc900-6186-49d8-b7d7-febd866fdc1d";
+ string resourceGroupName = "YourResourceGroupName";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this OrderItemResource
+ OrderItemResourceCollection collection = resourceGroupResource.GetOrderItemResources();
+
+ // invoke the operation
+ string orderItemName = "TestOrderItemName1";
+ NullableResponse response = await collection.GetIfExistsAsync(orderItemName);
+ OrderItemResource 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
+ OrderItemResourceData 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/samples/Generated/Samples/Sample_OrderResource.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/samples/Generated/Samples/Sample_OrderResource.cs
new file mode 100644
index 000000000000..4c8bbed96312
--- /dev/null
+++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/samples/Generated/Samples/Sample_OrderResource.cs
@@ -0,0 +1,49 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+using NUnit.Framework;
+
+namespace Azure.ResourceManager.EdgeOrder.Samples
+{
+ public partial class Sample_OrderResource
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_GetOrderByName()
+ {
+ // Generated from example definition: 2024-02-01/GetOrderByName.json
+ // this example is just showing the usage of "OrderResource_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this OrderResource created on azure
+ // for more information of creating OrderResource, please refer to the document of OrderResource
+ string subscriptionId = "eb5dc900-6186-49d8-b7d7-febd866fdc1d";
+ string resourceGroupName = "YourResourceGroupName";
+ AzureLocation location = new AzureLocation("eastus");
+ string orderName = "TestOrderName3";
+ ResourceIdentifier orderResourceId = OrderResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, location, orderName);
+ OrderResource orderResource = client.GetOrderResource(orderResourceId);
+
+ // invoke the operation
+ OrderResource result = await orderResource.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
+ OrderResourceData 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/samples/Generated/Samples/Sample_OrderResourceCollection.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/samples/Generated/Samples/Sample_OrderResourceCollection.cs
new file mode 100644
index 000000000000..d0be2d94fe2d
--- /dev/null
+++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/samples/Generated/Samples/Sample_OrderResourceCollection.cs
@@ -0,0 +1,125 @@
+// 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_OrderResourceCollection
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_GetOrderByName()
+ {
+ // Generated from example definition: 2024-02-01/GetOrderByName.json
+ // this example is just showing the usage of "OrderResource_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 = "eb5dc900-6186-49d8-b7d7-febd866fdc1d";
+ string resourceGroupName = "YourResourceGroupName";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this OrderResource
+ OrderResourceCollection collection = resourceGroupResource.GetOrderResources();
+
+ // invoke the operation
+ AzureLocation location = new AzureLocation("eastus");
+ string orderName = "TestOrderName3";
+ OrderResource 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
+ OrderResourceData 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: 2024-02-01/GetOrderByName.json
+ // this example is just showing the usage of "OrderResource_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 = "eb5dc900-6186-49d8-b7d7-febd866fdc1d";
+ string resourceGroupName = "YourResourceGroupName";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this OrderResource
+ OrderResourceCollection collection = resourceGroupResource.GetOrderResources();
+
+ // invoke the operation
+ AzureLocation location = new AzureLocation("eastus");
+ string orderName = "TestOrderName3";
+ 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: 2024-02-01/GetOrderByName.json
+ // this example is just showing the usage of "OrderResource_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 = "eb5dc900-6186-49d8-b7d7-febd866fdc1d";
+ string resourceGroupName = "YourResourceGroupName";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this OrderResource
+ OrderResourceCollection collection = resourceGroupResource.GetOrderResources();
+
+ // invoke the operation
+ AzureLocation location = new AzureLocation("eastus");
+ string orderName = "TestOrderName3";
+ NullableResponse response = await collection.GetIfExistsAsync(location, orderName);
+ OrderResource 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
+ OrderResourceData 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/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs
index f77c514588cb..6a42876c1ca7 100644
--- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs
+++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs
@@ -18,10 +18,10 @@ public partial class Sample_ResourceGroupResourceExtensions
{
[Test]
[Ignore("Only validating compilation of examples")]
- public async Task GetEdgeOrders_ListOrderAtResourceGroupLevel()
+ public async Task GetOrderResources_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.
+ // Generated from example definition: 2024-02-01/ListOrderAtResourceGroupLevel.json
+ // this example is just showing the usage of "OrdersOperationGroup_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
@@ -30,17 +30,17 @@ public async Task GetEdgeOrders_ListOrderAtResourceGroupLevel()
// 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";
+ string subscriptionId = "eb5dc900-6186-49d8-b7d7-febd866fdc1d";
+ string resourceGroupName = "YourResourceGroupName";
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())
+ await foreach (OrderResource item in resourceGroupResource.GetOrderResourcesAsync())
{
// 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;
+ OrderResourceData resourceData = item.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
}
diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs
index afe8473e72e2..b43a570b3790 100644
--- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs
+++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs
@@ -20,10 +20,10 @@ public partial class Sample_SubscriptionResourceExtensions
{
[Test]
[Ignore("Only validating compilation of examples")]
- public async Task GetEdgeOrderAddresses_ListAddressesAtSubscriptionLevel()
+ public async Task GetAddressResources_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.
+ // Generated from example definition: 2024-02-01/ListAddressesAtSubscriptionLevel.json
+ // this example is just showing the usage of "AddressResource_ListBySubscription" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
@@ -32,16 +32,16 @@ public async Task GetEdgeOrderAddresses_ListAddressesAtSubscriptionLevel()
// 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";
+ string subscriptionId = "eb5dc900-6186-49d8-b7d7-febd866fdc1d";
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())
+ await foreach (AddressResource item in subscriptionResource.GetAddressResourcesAsync())
{
// 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;
+ AddressResourceData resourceData = item.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
}
@@ -51,10 +51,10 @@ public async Task GetEdgeOrderAddresses_ListAddressesAtSubscriptionLevel()
[Test]
[Ignore("Only validating compilation of examples")]
- public async Task GetProductFamilies_ListProductFamilies()
+ public async Task GetOrderItemResources_ListOrderItemsAtSubscriptionLevel()
{
- // 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.
+ // Generated from example definition: 2024-02-01/ListOrderItemsAtSubscriptionLevel.json
+ // this example is just showing the usage of "OrderItemResource_ListBySubscription" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
@@ -63,21 +63,18 @@ public async Task GetProductFamilies_ListProductFamilies()
// 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";
+ string subscriptionId = "eb5dc900-6186-49d8-b7d7-febd866fdc1d";
ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
// invoke the operation and iterate over the result
- ProductFamiliesContent content = new ProductFamiliesContent(new Dictionary>
+ await foreach (OrderItemResource item in subscriptionResource.GetOrderItemResourcesAsync())
{
- ["azurestackedge"] = new FilterableProperty[]
- {
-new FilterableProperty(SupportedFilterType.ShipToCountries, new string[]{"US"})
- }
- });
- await foreach (ProductFamily item in subscriptionResource.GetProductFamiliesAsync(content))
- {
- Console.WriteLine($"Succeeded: {item}");
+ // 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
+ OrderItemResourceData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
}
Console.WriteLine("Succeeded");
@@ -85,10 +82,10 @@ public async Task GetProductFamilies_ListProductFamilies()
[Test]
[Ignore("Only validating compilation of examples")]
- public async Task GetConfigurations_ListConfigurations()
+ public async Task GetConfigurationsProductsAndConfigurationsOperationGroups_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.
+ // Generated from example definition: 2024-02-01/ListConfigurations.json
+ // this example is just showing the usage of "ProductsAndConfigurationsOperationGroup_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();
@@ -97,24 +94,13 @@ public async Task GetConfigurations_ListConfigurations()
// 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";
+ string subscriptionId = "eb5dc900-6186-49d8-b7d7-febd866fdc1d";
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))
+ ConfigurationsContent content = new ConfigurationsContent();
+ await foreach (Configuration item in subscriptionResource.GetConfigurationsProductsAndConfigurationsOperationGroupsAsync(content))
{
Console.WriteLine($"Succeeded: {item}");
}
@@ -124,10 +110,10 @@ public async Task GetConfigurations_ListConfigurations()
[Test]
[Ignore("Only validating compilation of examples")]
- public async Task GetProductFamiliesMetadata_ListProductFamiliesMetadata()
+ public async Task GetProductFamiliesProductsAndConfigurationsOperationGroups_ListProductFamilies()
{
- // 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.
+ // Generated from example definition: 2024-02-01/ListProductFamilies.json
+ // this example is just showing the usage of "ProductsAndConfigurationsOperationGroup_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();
@@ -136,12 +122,13 @@ public async Task GetProductFamiliesMetadata_ListProductFamiliesMetadata()
// 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";
+ string subscriptionId = "eb5dc900-6186-49d8-b7d7-febd866fdc1d";
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())
+ ProductFamiliesContent content = new ProductFamiliesContent(null);
+ await foreach (ProductFamily item in subscriptionResource.GetProductFamiliesProductsAndConfigurationsOperationGroupsAsync(content))
{
Console.WriteLine($"Succeeded: {item}");
}
@@ -151,10 +138,10 @@ public async Task GetProductFamiliesMetadata_ListProductFamiliesMetadata()
[Test]
[Ignore("Only validating compilation of examples")]
- public async Task GetEdgeOrders_ListOrderAtSubscriptionLevel()
+ public async Task GetProductFamiliesMetadataProductsAndConfigurationsOperationGroups_ListProductFamiliesMetadata()
{
- // 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.
+ // Generated from example definition: 2024-02-01/ListProductFamiliesMetadata.json
+ // this example is just showing the usage of "ProductsAndConfigurationsOperationGroup_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();
@@ -163,18 +150,14 @@ public async Task GetEdgeOrders_ListOrderAtSubscriptionLevel()
// 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";
+ string subscriptionId = "eb5dc900-6186-49d8-b7d7-febd866fdc1d";
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())
+ await foreach (ProductFamiliesMetadataDetails item in subscriptionResource.GetProductFamiliesMetadataProductsAndConfigurationsOperationGroupsAsync())
{
- // 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: {item}");
}
Console.WriteLine("Succeeded");
@@ -182,10 +165,10 @@ public async Task GetEdgeOrders_ListOrderAtSubscriptionLevel()
[Test]
[Ignore("Only validating compilation of examples")]
- public async Task GetEdgeOrderItems_ListOrderItemsAtSubscriptionLevel()
+ public async Task GetOrderResources_ListOrderAtSubscriptionLevel()
{
- // 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.
+ // Generated from example definition: 2024-02-01/ListOrderAtSubscriptionLevel.json
+ // this example is just showing the usage of "OrdersOperationGroup_ListBySubscription" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
@@ -194,16 +177,16 @@ public async Task GetEdgeOrderItems_ListOrderItemsAtSubscriptionLevel()
// 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";
+ string subscriptionId = "eb5dc900-6186-49d8-b7d7-febd866fdc1d";
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())
+ await foreach (OrderResource item in subscriptionResource.GetOrderResourcesAsync())
{
// 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;
+ OrderResourceData resourceData = item.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
}
diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/AddressResource.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/AddressResource.Serialization.cs
new file mode 100644
index 000000000000..c373ab2566e7
--- /dev/null
+++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/AddressResource.Serialization.cs
@@ -0,0 +1,26 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Text.Json;
+
+namespace Azure.ResourceManager.EdgeOrder
+{
+ public partial class AddressResource : IJsonModel
+ {
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options);
+
+ AddressResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options);
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerEdgeOrderContext.Default);
+
+ AddressResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerEdgeOrderContext.Default);
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options);
+ }
+}
diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderAddressResource.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/AddressResource.cs
similarity index 68%
rename from sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderAddressResource.cs
rename to sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/AddressResource.cs
index 3a9b701c4034..e05a98e6f7aa 100644
--- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderAddressResource.cs
+++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/AddressResource.cs
@@ -18,14 +18,14 @@
namespace Azure.ResourceManager.EdgeOrder
{
///
- /// A Class representing an EdgeOrderAddress along with the instance operations that can be performed on it.
- /// If you have a you can construct an
- /// from an instance of using the GetEdgeOrderAddressResource method.
- /// Otherwise you can get one from its parent resource using the GetEdgeOrderAddress method.
+ /// A Class representing an AddressResource along with the instance operations that can be performed on it.
+ /// If you have a you can construct an
+ /// from an instance of using the GetAddressResource method.
+ /// Otherwise you can get one from its parent resource using the GetAddressResource method.
///
- public partial class EdgeOrderAddressResource : ArmResource
+ public partial class AddressResource : ArmResource
{
- /// Generate the resource identifier of a instance.
+ /// Generate the resource identifier of a instance.
/// The subscriptionId.
/// The resourceGroupName.
/// The addressName.
@@ -35,35 +35,35 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId,
return new ResourceIdentifier(resourceId);
}
- private readonly ClientDiagnostics _edgeOrderAddressClientDiagnostics;
- private readonly EdgeOrderManagementRestOperations _edgeOrderAddressRestClient;
- private readonly EdgeOrderAddressData _data;
+ private readonly ClientDiagnostics _addressResourceClientDiagnostics;
+ private readonly AddressResourcesRestOperations _addressResourceRestClient;
+ private readonly AddressResourceData _data;
/// Gets the resource type for the operations.
public static readonly ResourceType ResourceType = "Microsoft.EdgeOrder/addresses";
- /// Initializes a new instance of the class for mocking.
- protected EdgeOrderAddressResource()
+ /// Initializes a new instance of the class for mocking.
+ protected AddressResource()
{
}
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
/// The client parameters to use in these operations.
/// The resource that is the target of operations.
- internal EdgeOrderAddressResource(ArmClient client, EdgeOrderAddressData data) : this(client, data.Id)
+ internal AddressResource(ArmClient client, AddressResourceData data) : this(client, data.Id)
{
HasData = true;
_data = data;
}
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
/// The client parameters to use in these operations.
/// The identifier of the resource that is the target of operations.
- internal EdgeOrderAddressResource(ArmClient client, ResourceIdentifier id) : base(client, id)
+ internal AddressResource(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);
+ _addressResourceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.EdgeOrder", ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(ResourceType, out string addressResourceApiVersion);
+ _addressResourceRestClient = new AddressResourcesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, addressResourceApiVersion);
#if DEBUG
ValidateResourceId(Id);
#endif
@@ -74,7 +74,7 @@ internal EdgeOrderAddressResource(ArmClient client, ResourceIdentifier id) : bas
/// Gets the data representing this Feature.
/// Throws if there is no data loaded in the current instance.
- public virtual EdgeOrderAddressData Data
+ public virtual AddressResourceData Data
{
get
{
@@ -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,29 +99,29 @@ internal static void ValidateResourceId(ResourceIdentifier id)
///
///
/// Operation Id
- /// GetAddressByName
+ /// AddressResource_Get
///
///
/// Default Api Version
- /// 2021-12-01
+ /// 2024-02-01
///
///
/// Resource
- ///
+ ///
///
///
///
/// The cancellation token to use.
- public virtual async Task> GetAsync(CancellationToken cancellationToken = default)
+ public virtual async Task> GetAsync(CancellationToken cancellationToken = default)
{
- using var scope = _edgeOrderAddressClientDiagnostics.CreateScope("EdgeOrderAddressResource.Get");
+ using var scope = _addressResourceClientDiagnostics.CreateScope("AddressResource.Get");
scope.Start();
try
{
- var response = await _edgeOrderAddressRestClient.GetAddressByNameAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false);
+ var response = await _addressResourceRestClient.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());
+ return Response.FromValue(new AddressResource(Client, response.Value), response.GetRawResponse());
}
catch (Exception e)
{
@@ -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,29 +139,29 @@ public virtual async Task> GetAsync(Cancellat
///
///
/// Operation Id
- /// GetAddressByName
+ /// AddressResource_Get
///
///
/// Default Api Version
- /// 2021-12-01
+ /// 2024-02-01
///
///
/// Resource
- ///
+ ///
///
///
///
/// The cancellation token to use.
- public virtual Response Get(CancellationToken cancellationToken = default)
+ public virtual Response Get(CancellationToken cancellationToken = default)
{
- using var scope = _edgeOrderAddressClientDiagnostics.CreateScope("EdgeOrderAddressResource.Get");
+ using var scope = _addressResourceClientDiagnostics.CreateScope("AddressResource.Get");
scope.Start();
try
{
- var response = _edgeOrderAddressRestClient.GetAddressByName(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken);
+ var response = _addressResourceRestClient.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());
+ return Response.FromValue(new AddressResource(Client, response.Value), response.GetRawResponse());
}
catch (Exception e)
{
@@ -171,7 +171,7 @@ public virtual Response Get(CancellationToken cancella
}
///
- /// Deletes an address.
+ /// Delete an address.
///
///
/// Request Path
@@ -179,15 +179,15 @@ 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 = _addressResourceClientDiagnostics.CreateScope("AddressResource.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 _addressResourceRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false);
+ var operation = new EdgeOrderArmOperation(_addressResourceClientDiagnostics, Pipeline, _addressResourceRestClient.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,15 +221,15 @@ 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 = _addressResourceClientDiagnostics.CreateScope("AddressResource.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 = _addressResourceRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken);
+ var operation = new EdgeOrderArmOperation(_addressResourceClientDiagnostics, Pipeline, _addressResourceRestClient.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,15 +263,15 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel
///
///
/// Operation Id
- /// UpdateAddress
+ /// AddressResource_Update
///
///
/// Default Api Version
- /// 2021-12-01
+ /// 2024-02-01
///
///
/// Resource
- ///
+ ///
///
///
///
@@ -280,16 +280,16 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel
/// 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.
/// is null.
- public virtual async Task> UpdateAsync(WaitUntil waitUntil, EdgeOrderAddressPatch patch, string ifMatch = null, CancellationToken cancellationToken = default)
+ public virtual async Task> UpdateAsync(WaitUntil waitUntil, AddressResourcePatch patch, string ifMatch = null, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(patch, nameof(patch));
- using var scope = _edgeOrderAddressClientDiagnostics.CreateScope("EdgeOrderAddressResource.Update");
+ using var scope = _addressResourceClientDiagnostics.CreateScope("AddressResource.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 _addressResourceRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch, cancellationToken).ConfigureAwait(false);
+ var operation = new EdgeOrderArmOperation(new AddressResourceOperationSource(Client), _addressResourceClientDiagnostics, Pipeline, _addressResourceRestClient.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,15 +310,15 @@ public virtual async Task> UpdateAsync(Wa
///
///
/// Operation Id
- /// UpdateAddress
+ /// AddressResource_Update
///
///
/// Default Api Version
- /// 2021-12-01
+ /// 2024-02-01
///
///
/// Resource
- ///
+ ///
///
///
///
@@ -327,16 +327,16 @@ public virtual async Task> UpdateAsync(Wa
/// 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.
/// is null.
- public virtual ArmOperation Update(WaitUntil waitUntil, EdgeOrderAddressPatch patch, string ifMatch = null, CancellationToken cancellationToken = default)
+ public virtual ArmOperation Update(WaitUntil waitUntil, AddressResourcePatch patch, string ifMatch = null, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(patch, nameof(patch));
- using var scope = _edgeOrderAddressClientDiagnostics.CreateScope("EdgeOrderAddressResource.Update");
+ using var scope = _addressResourceClientDiagnostics.CreateScope("AddressResource.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 = _addressResourceRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch, cancellationToken);
+ var operation = new EdgeOrderArmOperation(new AddressResourceOperationSource(Client), _addressResourceClientDiagnostics, Pipeline, _addressResourceRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, ifMatch).Request, response, OperationFinalStateVia.Location);
if (waitUntil == WaitUntil.Completed)
operation.WaitForCompletion(cancellationToken);
return operation;
@@ -357,15 +357,15 @@ public virtual ArmOperation Update(WaitUntil waitUntil
///
///
/// Operation Id
- /// GetAddressByName
+ /// AddressResource_Get
///
///
/// Default Api Version
- /// 2021-12-01
+ /// 2024-02-01
///
///
/// Resource
- ///
+ ///
///
///
///
@@ -373,12 +373,12 @@ public virtual ArmOperation Update(WaitUntil waitUntil
/// The value for the tag.
/// The cancellation token to use.
/// or is null.
- public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default)
+ public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(key, nameof(key));
Argument.AssertNotNull(value, nameof(value));
- using var scope = _edgeOrderAddressClientDiagnostics.CreateScope("EdgeOrderAddressResource.AddTag");
+ using var scope = _addressResourceClientDiagnostics.CreateScope("AddressResource.AddTag");
scope.Start();
try
{
@@ -387,13 +387,13 @@ 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);
- return Response.FromValue(new EdgeOrderAddressResource(Client, originalResponse.Value), originalResponse.GetRawResponse());
+ var originalResponse = await _addressResourceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false);
+ return Response.FromValue(new AddressResource(Client, originalResponse.Value), originalResponse.GetRawResponse());
}
else
{
var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data;
- var patch = new EdgeOrderAddressPatch();
+ var patch = new AddressResourcePatch();
foreach (var tag in current.Tags)
{
patch.Tags.Add(tag);
@@ -419,15 +419,15 @@ public virtual async Task> AddTagAsync(string
///
///
/// Operation Id
- /// GetAddressByName
+ /// AddressResource_Get
///
///
/// Default Api Version
- /// 2021-12-01
+ /// 2024-02-01
///
///
/// Resource
- ///
+ ///
///
///
///
@@ -435,12 +435,12 @@ public virtual async Task> AddTagAsync(string
/// The value for the tag.
/// The cancellation token to use.
/// or is null.
- public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default)
+ public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(key, nameof(key));
Argument.AssertNotNull(value, nameof(value));
- using var scope = _edgeOrderAddressClientDiagnostics.CreateScope("EdgeOrderAddressResource.AddTag");
+ using var scope = _addressResourceClientDiagnostics.CreateScope("AddressResource.AddTag");
scope.Start();
try
{
@@ -449,13 +449,13 @@ 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);
- return Response.FromValue(new EdgeOrderAddressResource(Client, originalResponse.Value), originalResponse.GetRawResponse());
+ var originalResponse = _addressResourceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken);
+ return Response.FromValue(new AddressResource(Client, originalResponse.Value), originalResponse.GetRawResponse());
}
else
{
var current = Get(cancellationToken: cancellationToken).Value.Data;
- var patch = new EdgeOrderAddressPatch();
+ var patch = new AddressResourcePatch();
foreach (var tag in current.Tags)
{
patch.Tags.Add(tag);
@@ -481,26 +481,26 @@ public virtual Response AddTag(string key, string valu
///
///
/// Operation Id
- /// GetAddressByName
+ /// AddressResource_Get
///
///
/// Default Api Version
- /// 2021-12-01
+ /// 2024-02-01
///
///
/// Resource
- ///
+ ///
///
///
///
/// The set of tags to use as replacement.
/// The cancellation token to use.
/// is null.
- public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default)
+ public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(tags, nameof(tags));
- using var scope = _edgeOrderAddressClientDiagnostics.CreateScope("EdgeOrderAddressResource.SetTags");
+ using var scope = _addressResourceClientDiagnostics.CreateScope("AddressResource.SetTags");
scope.Start();
try
{
@@ -510,13 +510,13 @@ 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);
- return Response.FromValue(new EdgeOrderAddressResource(Client, originalResponse.Value), originalResponse.GetRawResponse());
+ var originalResponse = await _addressResourceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false);
+ return Response.FromValue(new AddressResource(Client, originalResponse.Value), originalResponse.GetRawResponse());
}
else
{
var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data;
- var patch = new EdgeOrderAddressPatch();
+ var patch = new AddressResourcePatch();
patch.Tags.ReplaceWith(tags);
var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false);
return Response.FromValue(result.Value, result.GetRawResponse());
@@ -538,26 +538,26 @@ public virtual async Task> SetTagsAsync(IDict
///
///
/// Operation Id
- /// GetAddressByName
+ /// AddressResource_Get
///
///
/// Default Api Version
- /// 2021-12-01
+ /// 2024-02-01
///
///
/// Resource
- ///
+ ///
///
///
///
/// The set of tags to use as replacement.
/// The cancellation token to use.
/// is null.
- public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default)
+ public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(tags, nameof(tags));
- using var scope = _edgeOrderAddressClientDiagnostics.CreateScope("EdgeOrderAddressResource.SetTags");
+ using var scope = _addressResourceClientDiagnostics.CreateScope("AddressResource.SetTags");
scope.Start();
try
{
@@ -567,13 +567,13 @@ public virtual Response SetTags(IDictionary SetTags(IDictionary
///
/// Operation Id
- /// GetAddressByName
+ /// AddressResource_Get
///
///
/// Default Api Version
- /// 2021-12-01
+ /// 2024-02-01
///
///
/// Resource
- ///
+ ///
///
///
///
/// The key for the tag.
/// The cancellation token to use.
/// is null.
- public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default)
+ public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(key, nameof(key));
- using var scope = _edgeOrderAddressClientDiagnostics.CreateScope("EdgeOrderAddressResource.RemoveTag");
+ using var scope = _addressResourceClientDiagnostics.CreateScope("AddressResource.RemoveTag");
scope.Start();
try
{
@@ -623,13 +623,13 @@ 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);
- return Response.FromValue(new EdgeOrderAddressResource(Client, originalResponse.Value), originalResponse.GetRawResponse());
+ var originalResponse = await _addressResourceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false);
+ return Response.FromValue(new AddressResource(Client, originalResponse.Value), originalResponse.GetRawResponse());
}
else
{
var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data;
- var patch = new EdgeOrderAddressPatch();
+ var patch = new AddressResourcePatch();
foreach (var tag in current.Tags)
{
patch.Tags.Add(tag);
@@ -655,26 +655,26 @@ public virtual async Task> RemoveTagAsync(str
///
///
/// Operation Id
- /// GetAddressByName
+ /// AddressResource_Get
///
///
/// Default Api Version
- /// 2021-12-01
+ /// 2024-02-01
///
///
/// Resource
- ///
+ ///
///
///
///
/// The key for the tag.
/// The cancellation token to use.
/// is null.
- public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default)
+ public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(key, nameof(key));
- using var scope = _edgeOrderAddressClientDiagnostics.CreateScope("EdgeOrderAddressResource.RemoveTag");
+ using var scope = _addressResourceClientDiagnostics.CreateScope("AddressResource.RemoveTag");
scope.Start();
try
{
@@ -683,13 +683,13 @@ 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);
- return Response.FromValue(new EdgeOrderAddressResource(Client, originalResponse.Value), originalResponse.GetRawResponse());
+ var originalResponse = _addressResourceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken);
+ return Response.FromValue(new AddressResource(Client, originalResponse.Value), originalResponse.GetRawResponse());
}
else
{
var current = Get(cancellationToken: cancellationToken).Value.Data;
- var patch = new EdgeOrderAddressPatch();
+ var patch = new AddressResourcePatch();
foreach (var tag in current.Tags)
{
patch.Tags.Add(tag);
diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderAddressCollection.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/AddressResourceCollection.cs
similarity index 62%
rename from sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderAddressCollection.cs
rename to sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/AddressResourceCollection.cs
index ef947343dedf..dd3453951f6d 100644
--- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderAddressCollection.cs
+++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/AddressResourceCollection.cs
@@ -19,28 +19,28 @@
namespace Azure.ResourceManager.EdgeOrder
{
///
- /// A class representing a collection of and their operations.
- /// Each in the collection will belong to the same instance of .
- /// To get an instance call the GetEdgeOrderAddresses method from an instance of .
+ /// A class representing a collection of and their operations.
+ /// Each in the collection will belong to the same instance of .
+ /// To get an instance call the GetAddressResources method from an instance of .
///
- public partial class EdgeOrderAddressCollection : ArmCollection, IEnumerable, IAsyncEnumerable
+ public partial class AddressResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable
{
- private readonly ClientDiagnostics _edgeOrderAddressClientDiagnostics;
- private readonly EdgeOrderManagementRestOperations _edgeOrderAddressRestClient;
+ private readonly ClientDiagnostics _addressResourceClientDiagnostics;
+ private readonly AddressResourcesRestOperations _addressResourceRestClient;
- /// Initializes a new instance of the class for mocking.
- protected EdgeOrderAddressCollection()
+ /// Initializes a new instance of the class for mocking.
+ protected AddressResourceCollection()
{
}
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
/// The client parameters to use in these operations.
/// The identifier of the parent resource that is the target of operations.
- internal EdgeOrderAddressCollection(ArmClient client, ResourceIdentifier id) : base(client, id)
+ internal AddressResourceCollection(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);
+ _addressResourceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.EdgeOrder", AddressResource.ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(AddressResource.ResourceType, out string addressResourceApiVersion);
+ _addressResourceRestClient = new AddressResourcesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, addressResourceApiVersion);
#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,15 +62,15 @@ internal static void ValidateResourceId(ResourceIdentifier id)
///
///
/// Operation Id
- /// CreateAddress
+ /// AddressResource_Create
///
///
/// Default Api Version
- /// 2021-12-01
+ /// 2024-02-01
///
///
/// Resource
- ///
+ ///
///
///
///
@@ -79,19 +80,19 @@ internal static void ValidateResourceId(ResourceIdentifier id)
/// The cancellation token to use.
/// is an empty string, and was expected to be non-empty.
/// or is null.
- public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string addressName, EdgeOrderAddressData data, CancellationToken cancellationToken = default)
+ public virtual async Task CreateOrUpdateAsync(WaitUntil waitUntil, string addressName, AddressResourceData data, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(addressName, nameof(addressName));
Argument.AssertNotNull(data, nameof(data));
- using var scope = _edgeOrderAddressClientDiagnostics.CreateScope("EdgeOrderAddressCollection.CreateOrUpdate");
+ using var scope = _addressResourceClientDiagnostics.CreateScope("AddressResourceCollection.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 _addressResourceRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, addressName, data, cancellationToken).ConfigureAwait(false);
+ var operation = new EdgeOrderArmOperation(_addressResourceClientDiagnostics, Pipeline, _addressResourceRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, addressName, data).Request, response, OperationFinalStateVia.Location);
if (waitUntil == WaitUntil.Completed)
- await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
+ await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false);
return operation;
}
catch (Exception e)
@@ -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,15 +112,15 @@ public virtual async Task> CreateOrUpdate
///
///
/// Operation Id
- /// CreateAddress
+ /// AddressResource_Create
///
///
/// Default Api Version
- /// 2021-12-01
+ /// 2024-02-01
///
///
/// Resource
- ///
+ ///
///
///
///
@@ -128,19 +130,19 @@ public virtual async Task> CreateOrUpdate
/// The cancellation token to use.
/// is an empty string, and was expected to be non-empty.
/// or is null.
- public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string addressName, EdgeOrderAddressData data, CancellationToken cancellationToken = default)
+ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string addressName, AddressResourceData data, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(addressName, nameof(addressName));
Argument.AssertNotNull(data, nameof(data));
- using var scope = _edgeOrderAddressClientDiagnostics.CreateScope("EdgeOrderAddressCollection.CreateOrUpdate");
+ using var scope = _addressResourceClientDiagnostics.CreateScope("AddressResourceCollection.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 = _addressResourceRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, addressName, data, cancellationToken);
+ var operation = new EdgeOrderArmOperation(_addressResourceClientDiagnostics, Pipeline, _addressResourceRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, addressName, data).Request, response, OperationFinalStateVia.Location);
if (waitUntil == WaitUntil.Completed)
- operation.WaitForCompletion(cancellationToken);
+ operation.WaitForCompletionResponse(cancellationToken);
return operation;
}
catch (Exception e)
@@ -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,15 +161,15 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil w
///
///
/// Operation Id
- /// GetAddressByName
+ /// AddressResource_Get
///
///
/// Default Api Version
- /// 2021-12-01
+ /// 2024-02-01
///
///
/// Resource
- ///
+ ///
///
///
///
@@ -175,18 +177,18 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil w
/// The cancellation token to use.
/// is an empty string, and was expected to be non-empty.
/// is null.
- public virtual async Task> GetAsync(string addressName, CancellationToken cancellationToken = default)
+ public virtual async Task> GetAsync(string addressName, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(addressName, nameof(addressName));
- using var scope = _edgeOrderAddressClientDiagnostics.CreateScope("EdgeOrderAddressCollection.Get");
+ using var scope = _addressResourceClientDiagnostics.CreateScope("AddressResourceCollection.Get");
scope.Start();
try
{
- var response = await _edgeOrderAddressRestClient.GetAddressByNameAsync(Id.SubscriptionId, Id.ResourceGroupName, addressName, cancellationToken).ConfigureAwait(false);
+ var response = await _addressResourceRestClient.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());
+ return Response.FromValue(new AddressResource(Client, response.Value), response.GetRawResponse());
}
catch (Exception e)
{
@@ -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,15 +206,15 @@ public virtual async Task> GetAsync(string ad
///
///
/// Operation Id
- /// GetAddressByName
+ /// AddressResource_Get
///
///
/// Default Api Version
- /// 2021-12-01
+ /// 2024-02-01
///
///
/// Resource
- ///
+ ///
///
///
///
@@ -220,18 +222,18 @@ public virtual async Task> GetAsync(string ad
/// The cancellation token to use.
/// is an empty string, and was expected to be non-empty.
/// is null.
- public virtual Response Get(string addressName, CancellationToken cancellationToken = default)
+ public virtual Response Get(string addressName, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(addressName, nameof(addressName));
- using var scope = _edgeOrderAddressClientDiagnostics.CreateScope("EdgeOrderAddressCollection.Get");
+ using var scope = _addressResourceClientDiagnostics.CreateScope("AddressResourceCollection.Get");
scope.Start();
try
{
- var response = _edgeOrderAddressRestClient.GetAddressByName(Id.SubscriptionId, Id.ResourceGroupName, addressName, cancellationToken);
+ var response = _addressResourceRestClient.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());
+ return Response.FromValue(new AddressResource(Client, response.Value), response.GetRawResponse());
}
catch (Exception e)
{
@@ -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,31 +251,32 @@ public virtual Response Get(string addressName, Cancel
///
///
/// Operation Id
- /// ListAddressesAtResourceGroupLevel
+ /// AddressResource_ListByResourceGroup
///
///
/// Default Api Version
- /// 2021-12-01
+ /// 2024-02-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.
+ /// $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)
+ /// An async collection of that may take multiple service requests to iterate over.
+ 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) => _addressResourceRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName, filter, skipToken, top);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _addressResourceRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, filter, skipToken, top);
+ return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new AddressResource(Client, AddressResourceData.DeserializeAddressResourceData(e)), _addressResourceClientDiagnostics, Pipeline, "AddressResourceCollection.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,27 +284,28 @@ public virtual AsyncPageable GetAllAsync(string filter
///
///
/// Operation Id
- /// ListAddressesAtResourceGroupLevel
+ /// AddressResource_ListByResourceGroup
///
///
/// Default Api Version
- /// 2021-12-01
+ /// 2024-02-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.
+ /// $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)
+ /// A collection of that may take multiple service requests to iterate over.
+ 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) => _addressResourceRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName, filter, skipToken, top);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _addressResourceRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, filter, skipToken, top);
+ return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new AddressResource(Client, AddressResourceData.DeserializeAddressResourceData(e)), _addressResourceClientDiagnostics, Pipeline, "AddressResourceCollection.GetAll", "value", "nextLink", cancellationToken);
}
///
@@ -313,15 +317,15 @@ 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 = _addressResourceClientDiagnostics.CreateScope("AddressResourceCollection.Exists");
scope.Start();
try
{
- var response = await _edgeOrderAddressRestClient.GetAddressByNameAsync(Id.SubscriptionId, Id.ResourceGroupName, addressName, cancellationToken: cancellationToken).ConfigureAwait(false);
+ var response = await _addressResourceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, addressName, cancellationToken: cancellationToken).ConfigureAwait(false);
return Response.FromValue(response.Value != null, response.GetRawResponse());
}
catch (Exception e)
@@ -356,15 +360,15 @@ 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 = _addressResourceClientDiagnostics.CreateScope("AddressResourceCollection.Exists");
scope.Start();
try
{
- var response = _edgeOrderAddressRestClient.GetAddressByName(Id.SubscriptionId, Id.ResourceGroupName, addressName, cancellationToken: cancellationToken);
+ var response = _addressResourceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, addressName, cancellationToken: cancellationToken);
return Response.FromValue(response.Value != null, response.GetRawResponse());
}
catch (Exception e)
@@ -399,15 +403,15 @@ public virtual Response Exists(string addressName, CancellationToken cance
///
///
/// Operation Id
- /// GetAddressByName
+ /// AddressResource_Get
///
///
/// Default Api Version
- /// 2021-12-01
+ /// 2024-02-01
///
///
/// Resource
- ///
+ ///
///
///
///
@@ -415,18 +419,18 @@ public virtual Response Exists(string addressName, CancellationToken cance
/// The cancellation token to use.
/// is an empty string, and was expected to be non-empty.
/// is null.
- public virtual async Task> GetIfExistsAsync(string addressName, CancellationToken cancellationToken = default)
+ public virtual async Task> GetIfExistsAsync(string addressName, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(addressName, nameof(addressName));
- using var scope = _edgeOrderAddressClientDiagnostics.CreateScope("EdgeOrderAddressCollection.GetIfExists");
+ using var scope = _addressResourceClientDiagnostics.CreateScope("AddressResourceCollection.GetIfExists");
scope.Start();
try
{
- var response = await _edgeOrderAddressRestClient.GetAddressByNameAsync(Id.SubscriptionId, Id.ResourceGroupName, addressName, cancellationToken: cancellationToken).ConfigureAwait(false);
+ var response = await _addressResourceRestClient.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());
+ return new NoValueResponse(response.GetRawResponse());
+ return Response.FromValue(new AddressResource(Client, response.Value), response.GetRawResponse());
}
catch (Exception e)
{
@@ -444,15 +448,15 @@ public virtual async Task> GetIfExist
///
///
/// Operation Id
- /// GetAddressByName
+ /// AddressResource_Get
///
///
/// Default Api Version
- /// 2021-12-01
+ /// 2024-02-01
///
///
/// Resource
- ///
+ ///
///
///
///
@@ -460,18 +464,18 @@ public virtual async Task> GetIfExist
/// The cancellation token to use.
/// is an empty string, and was expected to be non-empty.
/// is null.
- public virtual NullableResponse GetIfExists(string addressName, CancellationToken cancellationToken = default)
+ public virtual NullableResponse GetIfExists(string addressName, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(addressName, nameof(addressName));
- using var scope = _edgeOrderAddressClientDiagnostics.CreateScope("EdgeOrderAddressCollection.GetIfExists");
+ using var scope = _addressResourceClientDiagnostics.CreateScope("AddressResourceCollection.GetIfExists");
scope.Start();
try
{
- var response = _edgeOrderAddressRestClient.GetAddressByName(Id.SubscriptionId, Id.ResourceGroupName, addressName, cancellationToken: cancellationToken);
+ var response = _addressResourceRestClient.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());
+ return new NoValueResponse(response.GetRawResponse());
+ return Response.FromValue(new AddressResource(Client, response.Value), response.GetRawResponse());
}
catch (Exception e)
{
@@ -480,7 +484,7 @@ public virtual NullableResponse GetIfExists(string add
}
}
- IEnumerator IEnumerable.GetEnumerator()
+ IEnumerator IEnumerable.GetEnumerator()
{
return GetAll().GetEnumerator();
}
@@ -490,7 +494,7 @@ IEnumerator IEnumerable.GetEnumerator()
return GetAll().GetEnumerator();
}
- IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken)
+ IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken)
{
return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken);
}
diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderAddressData.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/AddressResourceData.Serialization.cs
similarity index 61%
rename from sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderAddressData.Serialization.cs
rename to sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/AddressResourceData.Serialization.cs
index c55457db3708..e2c467b207f9 100644
--- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderAddressData.Serialization.cs
+++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/AddressResourceData.Serialization.cs
@@ -15,11 +15,11 @@
namespace Azure.ResourceManager.EdgeOrder
{
- public partial class EdgeOrderAddressData : IUtf8JsonSerializable, IJsonModel
+ public partial class AddressResourceData : 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);
@@ -30,43 +30,56 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr
/// The client options for reading and writing models.
protected override 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(EdgeOrderAddressData)} does not support writing '{format}' format.");
+ throw new FormatException($"The model {nameof(AddressResourceData)} does not support writing '{format}' format.");
}
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();
}
- EdgeOrderAddressData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ AddressResourceData 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(EdgeOrderAddressData)} does not support reading '{format}' format.");
+ throw new FormatException($"The model {nameof(AddressResourceData)} does not support reading '{format}' format.");
}
using JsonDocument document = JsonDocument.ParseValue(ref reader);
- return DeserializeEdgeOrderAddressData(document.RootElement, options);
+ return DeserializeAddressResourceData(document.RootElement, options);
}
- internal static EdgeOrderAddressData DeserializeEdgeOrderAddressData(JsonElement element, ModelReaderWriterOptions options = null)
+ internal static AddressResourceData DeserializeAddressResourceData(JsonElement element, ModelReaderWriterOptions options = null)
{
options ??= ModelSerializationExtensions.WireOptions;
@@ -80,9 +93,11 @@ internal static EdgeOrderAddressData DeserializeEdgeOrderAddressData(JsonElement
string name = default;
ResourceType type = default;
SystemData systemData = default;
- EdgeOrderShippingAddress shippingAddress = default;
- EdgeOrderAddressContactDetails contactDetails = default;
- EdgeOrderAddressValidationStatus? addressValidationStatus = default;
+ AddressClassification? addressClassification = default;
+ ShippingAddress shippingAddress = default;
+ ContactDetails contactDetails = default;
+ AddressValidationStatus? addressValidationStatus = default;
+ ProvisioningState? provisioningState = default;
IDictionary serializedAdditionalRawData = default;
Dictionary rawDataDictionary = new Dictionary();
foreach (var property in element.EnumerateObject())
@@ -139,18 +154,31 @@ 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 AddressClassification(property0.Value.GetString());
+ continue;
+ }
if (property0.NameEquals("shippingAddress"u8))
{
if (property0.Value.ValueKind == JsonValueKind.Null)
{
continue;
}
- shippingAddress = EdgeOrderShippingAddress.DeserializeEdgeOrderShippingAddress(property0.Value, options);
+ shippingAddress = ShippingAddress.DeserializeShippingAddress(property0.Value, options);
continue;
}
if (property0.NameEquals("contactDetails"u8))
{
- contactDetails = EdgeOrderAddressContactDetails.DeserializeEdgeOrderAddressContactDetails(property0.Value, options);
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ contactDetails = ContactDetails.DeserializeContactDetails(property0.Value, options);
continue;
}
if (property0.NameEquals("addressValidationStatus"u8))
@@ -159,7 +187,16 @@ internal static EdgeOrderAddressData DeserializeEdgeOrderAddressData(JsonElement
{
continue;
}
- addressValidationStatus = new EdgeOrderAddressValidationStatus(property0.Value.GetString());
+ addressValidationStatus = new AddressValidationStatus(property0.Value.GetString());
+ continue;
+ }
+ if (property0.NameEquals("provisioningState"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ provisioningState = new ProvisioningState(property0.Value.GetString());
continue;
}
}
@@ -171,48 +208,50 @@ internal static EdgeOrderAddressData DeserializeEdgeOrderAddressData(JsonElement
}
}
serializedAdditionalRawData = rawDataDictionary;
- return new EdgeOrderAddressData(
+ return new AddressResourceData(
id,
name,
type,
systemData,
tags ?? new ChangeTrackingDictionary(),
location,
+ addressClassification,
shippingAddress,
contactDetails,
addressValidationStatus,
+ provisioningState,
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(EdgeOrderAddressData)} does not support writing '{options.Format}' format.");
+ throw new FormatException($"The model {nameof(AddressResourceData)} does not support writing '{options.Format}' format.");
}
}
- EdgeOrderAddressData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
+ AddressResourceData 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 DeserializeEdgeOrderAddressData(document.RootElement, options);
+ return DeserializeAddressResourceData(document.RootElement, options);
}
default:
- throw new FormatException($"The model {nameof(EdgeOrderAddressData)} does not support reading '{options.Format}' format.");
+ throw new FormatException($"The model {nameof(AddressResourceData)} 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/EdgeOrderAddressData.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/AddressResourceData.cs
similarity index 62%
rename from sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderAddressData.cs
rename to sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/AddressResourceData.cs
index 0545e5092d24..ae1ad64d58d3 100644
--- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderAddressData.cs
+++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/AddressResourceData.cs
@@ -14,10 +14,10 @@
namespace Azure.ResourceManager.EdgeOrder
{
///
- /// A class representing the EdgeOrderAddress data model.
+ /// A class representing the AddressResource data model.
/// Address Resource.
///
- public partial class EdgeOrderAddressData : TrackedResourceData
+ public partial class AddressResourceData : TrackedResourceData
{
///
/// Keeps track of any properties unknown to the library.
@@ -51,46 +51,49 @@ public partial class EdgeOrderAddressData : TrackedResourceData
///
private IDictionary _serializedAdditionalRawData;
- /// Initializes a new instance of .
+ /// Initializes a new instance of .
/// The location.
- /// Contact details for the address.
- /// is null.
- public EdgeOrderAddressData(AzureLocation location, EdgeOrderAddressContactDetails contactDetails) : base(location)
+ public AddressResourceData(AzureLocation location) : base(location)
{
- Argument.AssertNotNull(contactDetails, nameof(contactDetails));
-
- ContactDetails = contactDetails;
}
- /// Initializes a new instance of .
+ /// Initializes a new instance of .
/// The id.
/// The name.
/// The resourceType.
/// 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 AddressResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, AddressClassification? addressClassification, ShippingAddress shippingAddress, ContactDetails contactDetails, AddressValidationStatus? addressValidationStatus, ProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location)
{
+ AddressClassification = addressClassification;
ShippingAddress = shippingAddress;
ContactDetails = contactDetails;
AddressValidationStatus = addressValidationStatus;
+ ProvisioningState = provisioningState;
_serializedAdditionalRawData = serializedAdditionalRawData;
}
- /// Initializes a new instance of for deserialization.
- internal EdgeOrderAddressData()
+ /// Initializes a new instance of for deserialization.
+ internal AddressResourceData()
{
}
+ /// Type of address based on its usage context.
+ public AddressClassification? AddressClassification { get; set; }
/// Shipping details for the address.
- public EdgeOrderShippingAddress ShippingAddress { get; set; }
+ public ShippingAddress ShippingAddress { get; set; }
/// Contact details for the address.
- public EdgeOrderAddressContactDetails ContactDetails { get; set; }
+ public ContactDetails ContactDetails { get; set; }
/// Status of address validation.
- public EdgeOrderAddressValidationStatus? AddressValidationStatus { get; }
+ public AddressValidationStatus? AddressValidationStatus { get; }
+ /// Provisioning state.
+ public ProvisioningState? ProvisioningState { get; }
}
}
diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/ArmEdgeOrderModelFactory.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/ArmEdgeOrderModelFactory.cs
index d69edcc2229e..0e93c842e109 100644
--- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/ArmEdgeOrderModelFactory.cs
+++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/ArmEdgeOrderModelFactory.cs
@@ -16,379 +16,57 @@ namespace Azure.ResourceManager.EdgeOrder.Models
/// Model factory for models.
public static partial class ArmEdgeOrderModelFactory
{
- /// Initializes a new instance of .
+ /// Initializes a new instance of .
/// The id.
/// The name.
/// The resourceType.
/// 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.
- /// 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)
+ /// Provisioning state.
+ /// A new instance for mocking.
+ public static AddressResourceData AddressResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, AddressClassification? addressClassification = null, ShippingAddress shippingAddress = null, ContactDetails contactDetails = null, AddressValidationStatus? addressValidationStatus = null, ProvisioningState? provisioningState = null)
{
tags ??= new Dictionary();
- return new EdgeOrderAddressData(
+ return new AddressResourceData(
id,
name,
resourceType,
systemData,
tags,
location,
+ addressClassification,
shippingAddress,
contactDetails,
addressValidationStatus,
+ provisioningState,
serializedAdditionalRawData: null);
}
- /// Initializes a new instance of .
+ /// 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.
- /// A new instance for mocking.
- public static EdgeOrderItemAddressProperties EdgeOrderItemAddressProperties(EdgeOrderShippingAddress shippingAddress = null, EdgeOrderAddressContactDetails contactDetails = null, EdgeOrderAddressValidationStatus? addressValidationStatus = null)
+ /// Provisioning state.
+ /// A new instance for mocking.
+ public static AddressProperties AddressProperties(AddressClassification? addressClassification = null, ShippingAddress shippingAddress = null, ContactDetails contactDetails = null, AddressValidationStatus? addressValidationStatus = null, ProvisioningState? provisioningState = null)
{
- return new EdgeOrderItemAddressProperties(shippingAddress, contactDetails, addressValidationStatus, 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.
- /// 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(
- displayName,
- description,
- imageInformation?.ToList(),
- costInformation,
- availabilityInformation,
- hierarchyInformation,
- filterableProperties?.ToList(),
- productLines?.ToList(),
- resourceProviderDetails?.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 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(
- displayName,
- description,
- imageInformation?.ToList(),
- costInformation,
- availabilityInformation,
- hierarchyInformation,
- filterableProperties?.ToList(),
- products?.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(
- displayName,
- description,
- imageInformation?.ToList(),
- costInformation,
- availabilityInformation,
- hierarchyInformation,
- filterableProperties?.ToList(),
- configurations?.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.
- /// Specifications of the configuration.
- /// Dimensions of the 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)
- {
- imageInformation ??= new List();
- filterableProperties ??= new List();
- specifications ??= new List();
-
- return new ProductConfiguration(
- displayName,
- description,
- imageInformation?.ToList(),
- costInformation,
- availabilityInformation,
- hierarchyInformation,
- filterableProperties?.ToList(),
- specifications?.ToList(),
- dimensions,
- serializedAdditionalRawData: null);
- }
-
- /// Initializes a new instance of .
- /// Name of the specification.
- /// Value of the specification.
- /// A new instance for mocking.
- public static ProductSpecification ProductSpecification(string name = null, string value = null)
- {
- return new ProductSpecification(name, value, serializedAdditionalRawData: null);
- }
-
- /// Initializes a new instance of .
- /// Length of the device.
- /// Height of the device.
- /// Width of the device.
- /// Unit for the dimensions of length, height and width.
- /// Weight of the device.
- /// Depth of the device.
- /// Unit for the dimensions of weight.
- /// A new instance for mocking.
- public static ProductDimensions ProductDimensions(double? length = null, double? height = null, double? width = null, ProductLengthHeightWidthUnit? lengthHeightUnit = null, double? weight = null, double? depth = null, ProductWeightMeasurementUnit? weightUnit = null)
- {
- return new ProductDimensions(
- length,
- height,
- width,
- lengthHeightUnit,
- weight,
- depth,
- weightUnit,
- serializedAdditionalRawData: null);
- }
-
- /// Initializes a new instance of .
- /// Type of description.
- /// Short description of the product system.
- /// Long description of the product system.
- /// Keywords for the product system.
- /// Attributes for the product system.
- /// Links for the product system.
- /// A new instance for mocking.
- public static ProductDescription ProductDescription(ProductDescriptionType? descriptionType = null, string shortDescription = null, string longDescription = null, IEnumerable keywords = null, IEnumerable attributes = null, IEnumerable links = null)
- {
- keywords ??= new List();
- attributes ??= new List();
- links ??= new List();
-
- return new ProductDescription(
- descriptionType,
- shortDescription,
- longDescription,
- keywords?.ToList(),
- attributes?.ToList(),
- 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 .
- /// Type of the image.
- /// Url of the image.
- /// A new instance for mocking.
- public static EdgeOrderProductImageInformation EdgeOrderProductImageInformation(EdgeOrderProductImageType? imageType = null, Uri imageUri = null)
- {
- return new EdgeOrderProductImageInformation(imageType, imageUri, serializedAdditionalRawData: null);
- }
-
- /// Initializes a new instance of .
- /// Details on the various billing aspects for the product system.
- /// Default url to display billing information.
- /// A new instance for mocking.
- public static EdgeOrderProductCostInformation EdgeOrderProductCostInformation(IEnumerable billingMeterDetails = null, Uri billingInfoUri = null)
- {
- billingMeterDetails ??= new List();
-
- return new EdgeOrderProductCostInformation(billingMeterDetails?.ToList(), billingInfoUri, serializedAdditionalRawData: 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.
- public static EdgeOrderProductBillingMeterDetails EdgeOrderProductBillingMeterDetails(string name = null, EdgeOrderProductMeterDetails meterDetails = null, EdgeOrderProductMeteringType? meteringType = null, string frequency = null)
- {
- return new EdgeOrderProductBillingMeterDetails(name, meterDetails, meteringType, frequency, serializedAdditionalRawData: null);
- }
-
- /// Initializes a new instance of .
- /// Represents billing type.
- /// Billing unit applicable for Pav2 billing.
- /// Charging type.
- /// A new instance for mocking.
- public static EdgeOrderProductMeterDetails EdgeOrderProductMeterDetails(string billingType = null, double? multiplier = null, EdgeOrderProductChargingType? chargingType = null)
- {
- return new UnknownMeterDetails(billingType == null ? default : new BillingType(billingType), multiplier, chargingType, serializedAdditionalRawData: null);
- }
-
- /// Initializes a new instance of .
- /// Current availability stage of the product. Availability stage.
- /// Reason why the product is disabled.
- /// Message for why the product is disabled.
- /// A new instance for mocking.
- public static ProductAvailabilityInformation ProductAvailabilityInformation(ProductAvailabilityStage? availabilityStage = null, ProductDisabledReason? disabledReason = null, string disabledReasonMessage = null)
- {
- 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)
- {
- return new ResourceProviderDetails(resourceProviderNamespace, 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)
- {
- filterableProperty ??= new List();
-
- return new ConfigurationFilters(hierarchyInformation, filterableProperty?.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(
- displayName,
- description,
- imageInformation?.ToList(),
- costInformation,
- 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(),
+ return new AddressProperties(
+ addressClassification,
+ shippingAddress,
+ contactDetails,
+ addressValidationStatus,
+ provisioningState,
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.
@@ -399,12 +77,14 @@ public static EdgeOrderStageDetails EdgeOrderStageDetails(EdgeOrderStageStatus?
/// 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)
+ /// Provisioning state.
+ /// Msi identity of the resource.
+ /// A new instance for mocking.
+ public static OrderItemResourceData OrderItemResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, OrderItemDetails orderItemDetails = null, AddressDetails addressDetails = null, DateTimeOffset? startOn = null, string orderId = null, ProvisioningState? provisioningState = null, ManagedServiceIdentity identity = null)
{
tags ??= new Dictionary();
- return new EdgeOrderItemData(
+ return new OrderItemResourceData(
id,
name,
resourceType,
@@ -415,12 +95,16 @@ public static EdgeOrderItemData EdgeOrderItemData(ResourceIdentifier id = null,
addressDetails,
startOn,
orderId,
+ provisioningState,
+ identity,
serializedAdditionalRawData: null);
}
- /// Initializes a new instance of .
- /// Unique identifier for configuration.
+ /// 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.
@@ -432,19 +116,20 @@ public static EdgeOrderItemData EdgeOrderItemData(ResourceIdentifier id = null,
/// 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.
+ /// 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)
+ /// A new instance for mocking.
+ public static OrderItemDetails OrderItemDetails(ProductDetails productDetails = null, OrderItemType orderItemType = default, OrderMode? orderItemMode = null, string siteId = null, StageDetails currentStage = null, IEnumerable orderItemStageHistory = null, Preferences preferences = null, ForwardShippingDetails forwardShippingDetails = null, ReverseShippingDetails reverseShippingDetails = null, IEnumerable notificationEmailList = null, string cancellationReason = null, OrderItemCancellationEnum? cancellationStatus = null, ActionStatusEnum? deletionStatus = null, string returnReason = null, OrderItemReturnEnum? returnStatus = null, IEnumerable managementRpDetailsList = null, ResponseError error = null)
{
- orderItemStageHistory ??= new List();
+ orderItemStageHistory ??= new List();
notificationEmailList ??= new List();
- managementRPDetailsList ??= new List();
+ managementRpDetailsList ??= new List();
- return new EdgeOrderItemDetails(
+ return new OrderItemDetails(
productDetails,
orderItemType,
+ orderItemMode,
+ siteId != null ? new SiteDetails(siteId, serializedAdditionalRawData: null) : null,
currentStage,
orderItemStageHistory?.ToList(),
preferences,
@@ -456,8 +141,7 @@ public static EdgeOrderItemDetails EdgeOrderItemDetails(ProductDetails productDe
deletionStatus,
returnReason,
returnStatus,
- firstOrDefaultManagementResourceProviderNamespace != null ? new ResourceProviderDetails(firstOrDefaultManagementResourceProviderNamespace, serializedAdditionalRawData: null) : null,
- managementRPDetailsList?.ToList(),
+ managementRpDetailsList?.ToList(),
error,
serializedAdditionalRawData: null);
}
@@ -465,40 +149,139 @@ public static EdgeOrderItemDetails EdgeOrderItemDetails(ProductDetails productDe
/// 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.
/// A new instance for mocking.
- public static ProductDetails ProductDetails(ProductDisplayInfo displayInfo = null, HierarchyInformation hierarchyInformation = null, int? count = null, DoubleEncryptionStatus? productDoubleEncryptionStatus = null, IEnumerable deviceDetails = null)
+ public static ProductDetails ProductDetails(DisplayInfo displayInfo = null, HierarchyInformation hierarchyInformation = null, DoubleEncryptionStatus? productDoubleEncryptionStatus = null, IdentificationType? identificationType = null, DeviceDetails parentDeviceDetails = null, ProvisioningDetails parentProvisioningDetails = null, IEnumerable optInAdditionalConfigurations = null, IEnumerable childConfigurationDeviceDetails = null, TermCommitmentInformation termCommitmentInformation = null)
{
- deviceDetails ??= new List();
+ optInAdditionalConfigurations ??= new List();
+ childConfigurationDeviceDetails ??= new List();
return new ProductDetails(
displayInfo,
hierarchyInformation,
- count,
productDoubleEncryptionStatus,
- deviceDetails?.ToList(),
+ identificationType,
+ parentDeviceDetails,
+ parentProvisioningDetails,
+ optInAdditionalConfigurations?.ToList(),
+ childConfigurationDeviceDetails?.ToList(),
+ termCommitmentInformation,
serializedAdditionalRawData: null);
}
- /// Initializes a new instance of .
+ /// 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)
+ /// A new instance for mocking.
+ public static DisplayInfo DisplayInfo(string productFamilyDisplayName = null, string configurationDisplayName = null)
{
- return new ProductDisplayInfo(productFamilyDisplayName, configurationDisplayName, serializedAdditionalRawData: null);
+ return new DisplayInfo(productFamilyDisplayName, configurationDisplayName, serializedAdditionalRawData: null);
}
- /// Initializes a new instance of .
- /// device serial number.
+ /// Initializes a new instance of .
+ /// Device serial number.
+ /// Device serial number to be displayed.
/// 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)
+ /// Determining nature of provisioning that the configuration supports.
+ /// Provisioning Details for the device.
+ /// A new instance for mocking.
+ public static DeviceDetails DeviceDetails(string serialNumber = null, string displaySerialNumber = null, string managementResourceId = null, string managementResourceTenantId = null, ProvisioningSupport? provisioningSupport = null, ProvisioningDetails provisioningDetails = null)
+ {
+ return new DeviceDetails(
+ 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 ProvisioningDetails ProvisioningDetails(int? quantity = null, ResourceIdentifier provisioningArmId = null, string provisioningEndPoint = null, string serialNumber = null, string vendorName = null, ResourceIdentifier readyToConnectArmId = null, ResourceIdentifier managementResourceArmId = null, string uniqueDeviceIdentifier = null, AutoProvisioningStatus? autoProvisioningStatus = null, DevicePresenceVerificationDetails devicePresenceVerification = null)
+ {
+ return new ProvisioningDetails(
+ 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 EdgeOrderProductDeviceDetails(serialNumber, managementResourceId, managementResourceTenantId, serializedAdditionalRawData: 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 ConfigurationDeviceDetails ConfigurationDeviceDetails(DisplayInfo displayInfo = null, HierarchyInformation hierarchyInformation = null, int? quantity = null, IdentificationType? identificationType = null, IEnumerable deviceDetails = null, TermCommitmentInformation termCommitmentInformation = null)
+ {
+ deviceDetails ??= new List();
+
+ return new ConfigurationDeviceDetails(
+ displayInfo,
+ hierarchyInformation,
+ 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 StageDetails StageDetails(StageStatus? stageStatus = null, StageName? stageName = null, string displayName = null, DateTimeOffset? startOn = null)
+ {
+ return new StageDetails(stageStatus, stageName, displayName, startOn, serializedAdditionalRawData: null);
}
/// Initializes a new instance of .
@@ -507,7 +290,7 @@ public static EdgeOrderProductDeviceDetails EdgeOrderProductDeviceDetails(string
/// 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)
+ public static ForwardShippingDetails ForwardShippingDetails(string carrierName = null, string carrierDisplayName = null, string trackingId = null, string trackingUri = null)
{
return new ForwardShippingDetails(carrierName, carrierDisplayName, trackingId, trackingUri, serializedAdditionalRawData: null);
}
@@ -519,7 +302,7 @@ public static ForwardShippingDetails ForwardShippingDetails(string carrierName =
/// 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)
+ public static ReverseShippingDetails ReverseShippingDetails(string sasKeyForLabel = null, string carrierName = null, string carrierDisplayName = null, string trackingId = null, string trackingUri = null)
{
return new ReverseShippingDetails(
sasKeyForLabel,
@@ -530,24 +313,299 @@ public static ReverseShippingDetails ReverseShippingDetails(string sasKeyForLabe
serializedAdditionalRawData: null);
}
- /// Initializes a new instance of .
- /// Customer address and contact details. It should be address resource.
+ /// 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)
+ /// A new instance for mocking.
+ public static AddressDetails AddressDetails(AddressProperties forwardAddress = null, AddressProperties returnAddress = null)
{
- return new EdgeOrderItemAddressDetails(forwardAddress, returnAddress, serializedAdditionalRawData: null);
+ return new AddressDetails(forwardAddress, returnAddress, serializedAdditionalRawData: null);
}
- /// Initializes a new instance of .
- /// customer return address.
+ /// 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)
+ /// Shipping Box required.
+ /// A new instance for mocking.
+ public static ReturnOrderItemDetails ReturnOrderItemDetails(AddressProperties returnAddress = null, string returnReason = null, string serviceTag = null, bool? shippingBoxRequired = null)
+ {
+ return new ReturnOrderItemDetails(returnAddress, returnReason, serviceTag, shippingBoxRequired, 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 OrderResourceData OrderResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable orderItemIds = null, StageDetails currentStage = null, IEnumerable orderStageHistory = null, OrderMode? orderMode = null)
+ {
+ orderItemIds ??= new List();
+ orderStageHistory ??= new List();
+
+ return new OrderResourceData(
+ 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 ConfigurationFilter ConfigurationFilter(HierarchyInformation hierarchyInformation = null, IEnumerable filterableProperty = null, ChildConfigurationFilter childConfigurationFilter = null)
+ {
+ filterableProperty ??= new List();
+
+ return new ConfigurationFilter(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)
{
- return new EdgeOrderItemReturnContent(returnAddress, returnReason, serviceTag, isShippingBoxRequired, serializedAdditionalRawData: null);
+ registeredFeatures ??= new List();
+
+ return new CustomerSubscriptionDetails(registeredFeatures?.ToList(), locationPlacementId, quotaId, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// 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 Configuration Configuration(IEnumerable specifications = null, Dimensions dimensions = null, ProvisioningSupport? provisioningSupport = null, IEnumerable childConfigurationTypes = null, IEnumerable groupedChildConfigurations = null, IEnumerable supportedTermCommitmentDurations = null)
+ {
+ specifications ??= new List();
+ childConfigurationTypes ??= new List();
+ groupedChildConfigurations ??= new List();
+ supportedTermCommitmentDurations ??= new List();
+
+ return new Configuration(
+ specifications?.ToList(),
+ dimensions,
+ provisioningSupport,
+ childConfigurationTypes?.ToList(),
+ groupedChildConfigurations?.ToList(),
+ supportedTermCommitmentDurations?.ToList(),
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Name of the specification.
+ /// Value of the specification.
+ /// A new instance for mocking.
+ public static Specification Specification(string name = null, string value = null)
+ {
+ return new Specification(name, value, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Length of the device.
+ /// Height of the device.
+ /// Width of the device.
+ /// Unit for the dimensions of length, height and width.
+ /// Weight of the device.
+ /// Depth of the device.
+ /// Unit for the dimensions of weight.
+ /// A new instance for mocking.
+ public static Dimensions Dimensions(double? length = null, double? height = null, double? width = null, LengthHeightUnit? lengthHeightUnit = null, double? weight = null, double? depth = null, WeightMeasurementUnit? weightUnit = null)
+ {
+ return new Dimensions(
+ length,
+ height,
+ width,
+ lengthHeightUnit,
+ weight,
+ depth,
+ weightUnit,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Category information.
+ /// List of child configurations.
+ /// A new instance for mocking.
+ public static GroupedChildConfigurations GroupedChildConfigurations(CategoryInformation 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 CategoryInformation CategoryInformation(string categoryName = null, string categoryDisplayName = null, string description = null, IEnumerable links = null)
+ {
+ links ??= new List();
+
+ return new CategoryInformation(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 Link Link(LinkType? linkType = null, string linkUri = null)
+ {
+ return new Link(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 ChildConfiguration ChildConfiguration(ChildConfigurationType? childConfigurationType = null, bool? isPartOfBaseConfiguration = null, int? minimumQuantity = null, int? maximumQuantity = null, IEnumerable specifications = null, Dimensions dimensions = null, ProvisioningSupport? provisioningSupport = null, IEnumerable childConfigurationTypes = null, IEnumerable groupedChildConfigurations = null, IEnumerable supportedTermCommitmentDurations = null, IEnumerable filterableProperties = null, string displayName = null, Description description = null, IEnumerable imageInformation = null, CostInformation costInformation = null, AvailabilityInformation availabilityInformation = null, HierarchyInformation hierarchyInformation = null, FulfillmentType? fulfilledBy = null)
+ {
+ specifications ??= new List();
+ childConfigurationTypes ??= new List();
+ groupedChildConfigurations ??= new List();
+ supportedTermCommitmentDurations ??= new List();
+ filterableProperties ??= new List();
+ imageInformation ??= new List();
+
+ return new ChildConfiguration(
+ 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);
+ }
+
+ ///