diff --git a/sdk/databox/Azure.ResourceManager.DataBox/samples/Generated/Samples/Sample_DataBoxJobCollection.cs b/sdk/databox/Azure.ResourceManager.DataBox/samples/Generated/Samples/Sample_DataBoxJobCollection.cs index 033298c31ccd..b7ec23f5ccfc 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/samples/Generated/Samples/Sample_DataBoxJobCollection.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/samples/Generated/Samples/Sample_DataBoxJobCollection.cs @@ -22,7 +22,7 @@ public partial class Sample_DataBoxJobCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_JobsCreate() { - // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsCreate.json + // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsCreate.json // this example is just showing the usage of "Jobs_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 @@ -42,18 +42,22 @@ public async Task CreateOrUpdate_JobsCreate() // invoke the operation string jobName = "TestJobName1"; - DataBoxJobData data = new DataBoxJobData(new AzureLocation("westus"), DataBoxJobTransferType.ImportToAzure, new DataBoxSku(DataBoxSkuName.DataBox)) + DataBoxJobData data = new DataBoxJobData(new AzureLocation("westus"), DataBoxJobTransferType.ImportToAzure, new DataBoxSku(DataBoxSkuName.DataBox) + { + Model = ModelName.DataBox, + }) { Details = new DataBoxJobDetails(new DataBoxContactDetails("XXXX XXXX", "0000000000", new string[] { "xxxx@xxxx.xxx" }) { PhoneExtension = "", }) { - ShippingAddress = new DataBoxShippingAddress("XXXX XXXX", "XX", "00000") + ShippingAddress = new DataBoxShippingAddress("XXXX XXXX", "XX") { StreetAddress2 = "XXXX XXXX", City = "XXXX XXXX", StateOrProvince = "XX", + PostalCode = "00000", CompanyName = "XXXX XXXX", AddressType = DataBoxShippingAddressType.Commercial, }, @@ -74,7 +78,7 @@ public async Task CreateOrUpdate_JobsCreate() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_JobsCreateDevicePassword() { - // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsCreateDevicePassword.json + // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsCreateDevicePassword.json // this example is just showing the usage of "Jobs_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 @@ -94,7 +98,10 @@ public async Task CreateOrUpdate_JobsCreateDevicePassword() // invoke the operation string jobName = "TestJobName1"; - DataBoxJobData data = new DataBoxJobData(new AzureLocation("westus"), DataBoxJobTransferType.ImportToAzure, new DataBoxSku(DataBoxSkuName.DataBox)) + DataBoxJobData data = new DataBoxJobData(new AzureLocation("westus"), DataBoxJobTransferType.ImportToAzure, new DataBoxSku(DataBoxSkuName.DataBox) + { + Model = ModelName.DataBox, + }) { Details = new DataBoxJobDetails(new DataBoxContactDetails("XXXX XXXX", "0000000000", new string[] { "xxxx@xxxx.xxx" }) { @@ -102,11 +109,12 @@ public async Task CreateOrUpdate_JobsCreateDevicePassword() }) { DevicePassword = "", - ShippingAddress = new DataBoxShippingAddress("XXXX XXXX", "XX", "00000") + ShippingAddress = new DataBoxShippingAddress("XXXX XXXX", "XX") { StreetAddress2 = "XXXX XXXX", City = "XXXX XXXX", StateOrProvince = "XX", + PostalCode = "00000", CompanyName = "XXXX XXXX", AddressType = DataBoxShippingAddressType.Commercial, }, @@ -130,7 +138,7 @@ public async Task CreateOrUpdate_JobsCreateDevicePassword() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_JobsCreateDoubleEncryption() { - // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsCreateDoubleEncryption.json + // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsCreateDoubleEncryption.json // this example is just showing the usage of "Jobs_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 @@ -150,18 +158,22 @@ public async Task CreateOrUpdate_JobsCreateDoubleEncryption() // invoke the operation string jobName = "TestJobName1"; - DataBoxJobData data = new DataBoxJobData(new AzureLocation("westus"), DataBoxJobTransferType.ImportToAzure, new DataBoxSku(DataBoxSkuName.DataBox)) + DataBoxJobData data = new DataBoxJobData(new AzureLocation("westus"), DataBoxJobTransferType.ImportToAzure, new DataBoxSku(DataBoxSkuName.DataBox) + { + Model = ModelName.DataBox, + }) { Details = new DataBoxJobDetails(new DataBoxContactDetails("XXXX XXXX", "0000000000", new string[] { "xxxx@xxxx.xxx" }) { PhoneExtension = "", }) { - ShippingAddress = new DataBoxShippingAddress("XXXX XXXX", "XX", "00000") + ShippingAddress = new DataBoxShippingAddress("XXXX XXXX", "XX") { StreetAddress2 = "XXXX XXXX", City = "XXXX XXXX", StateOrProvince = "XX", + PostalCode = "00000", CompanyName = "XXXX XXXX", AddressType = DataBoxShippingAddressType.Commercial, }, @@ -189,7 +201,7 @@ public async Task CreateOrUpdate_JobsCreateDoubleEncryption() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_JobsCreateExport() { - // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsCreateExport.json + // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsCreateExport.json // this example is just showing the usage of "Jobs_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 @@ -209,18 +221,22 @@ public async Task CreateOrUpdate_JobsCreateExport() // invoke the operation string jobName = "TestJobName1"; - DataBoxJobData data = new DataBoxJobData(new AzureLocation("westus"), DataBoxJobTransferType.ExportFromAzure, new DataBoxSku(DataBoxSkuName.DataBox)) + DataBoxJobData data = new DataBoxJobData(new AzureLocation("westus"), DataBoxJobTransferType.ExportFromAzure, new DataBoxSku(DataBoxSkuName.DataBox) + { + Model = ModelName.DataBox, + }) { Details = new DataBoxJobDetails(new DataBoxContactDetails("XXXX XXXX", "0000000000", new string[] { "xxxx@xxxx.xxx" }) { PhoneExtension = "", }) { - ShippingAddress = new DataBoxShippingAddress("XXXX XXXX", "XX", "00000") + ShippingAddress = new DataBoxShippingAddress("XXXX XXXX", "XX") { StreetAddress2 = "XXXX XXXX", City = "XXXX XXXX", StateOrProvince = "XX", + PostalCode = "00000", CompanyName = "XXXX XXXX", AddressType = DataBoxShippingAddressType.Commercial, }, @@ -248,7 +264,7 @@ public async Task CreateOrUpdate_JobsCreateExport() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_JobsCreateWithUserAssignedIdentity() { - // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsCreateWithUserAssignedIdentity.json + // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsCreateWithUserAssignedIdentity.json // this example is just showing the usage of "Jobs_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 @@ -268,18 +284,22 @@ public async Task CreateOrUpdate_JobsCreateWithUserAssignedIdentity() // invoke the operation string jobName = "TestJobName1"; - DataBoxJobData data = new DataBoxJobData(new AzureLocation("westus"), DataBoxJobTransferType.ImportToAzure, new DataBoxSku(DataBoxSkuName.DataBox)) + DataBoxJobData data = new DataBoxJobData(new AzureLocation("westus"), DataBoxJobTransferType.ImportToAzure, new DataBoxSku(DataBoxSkuName.DataBox) + { + Model = ModelName.DataBox, + }) { Details = new DataBoxJobDetails(new DataBoxContactDetails("XXXX XXXX", "0000000000", new string[] { "xxxx@xxxx.xxx" }) { PhoneExtension = "", }) { - ShippingAddress = new DataBoxShippingAddress("XXXX XXXX", "XX", "00000") + ShippingAddress = new DataBoxShippingAddress("XXXX XXXX", "XX") { StreetAddress2 = "XXXX XXXX", City = "XXXX XXXX", StateOrProvince = "XX", + PostalCode = "00000", CompanyName = "XXXX XXXX", AddressType = DataBoxShippingAddressType.Commercial, }, @@ -307,7 +327,7 @@ public async Task CreateOrUpdate_JobsCreateWithUserAssignedIdentity() [Ignore("Only validating compilation of examples")] public async Task Get_JobsGet() { - // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsGet.json + // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsGet.json // this example is just showing the usage of "Jobs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -341,7 +361,7 @@ public async Task Get_JobsGet() [Ignore("Only validating compilation of examples")] public async Task Get_JobsGetCmk() { - // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsGetCmk.json + // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsGetCmk.json // this example is just showing the usage of "Jobs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -375,7 +395,7 @@ public async Task Get_JobsGetCmk() [Ignore("Only validating compilation of examples")] public async Task Get_JobsGetCopyStuck() { - // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsGetCopyStuck.json + // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsGetCopyStuck.json // this example is just showing the usage of "Jobs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -409,7 +429,7 @@ public async Task Get_JobsGetCopyStuck() [Ignore("Only validating compilation of examples")] public async Task Get_JobsGetExport() { - // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsGetExport.json + // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsGetExport.json // this example is just showing the usage of "Jobs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -443,7 +463,7 @@ public async Task Get_JobsGetExport() [Ignore("Only validating compilation of examples")] public async Task Get_JobsGetWaitingForAction() { - // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsGetWaitingForAction.json + // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsGetWaitingForAction.json // this example is just showing the usage of "Jobs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -477,7 +497,7 @@ public async Task Get_JobsGetWaitingForAction() [Ignore("Only validating compilation of examples")] public async Task GetAll_JobsListByResourceGroup() { - // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsListByResourceGroup.json + // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsListByResourceGroup.json // this example is just showing the usage of "Jobs_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 @@ -512,7 +532,7 @@ public async Task GetAll_JobsListByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_JobsGet() { - // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsGet.json + // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsGet.json // this example is just showing the usage of "Jobs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -542,7 +562,7 @@ public async Task Exists_JobsGet() [Ignore("Only validating compilation of examples")] public async Task Exists_JobsGetCmk() { - // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsGetCmk.json + // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsGetCmk.json // this example is just showing the usage of "Jobs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -572,7 +592,7 @@ public async Task Exists_JobsGetCmk() [Ignore("Only validating compilation of examples")] public async Task Exists_JobsGetCopyStuck() { - // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsGetCopyStuck.json + // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsGetCopyStuck.json // this example is just showing the usage of "Jobs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -602,7 +622,7 @@ public async Task Exists_JobsGetCopyStuck() [Ignore("Only validating compilation of examples")] public async Task Exists_JobsGetExport() { - // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsGetExport.json + // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsGetExport.json // this example is just showing the usage of "Jobs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -632,7 +652,7 @@ public async Task Exists_JobsGetExport() [Ignore("Only validating compilation of examples")] public async Task Exists_JobsGetWaitingForAction() { - // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsGetWaitingForAction.json + // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsGetWaitingForAction.json // this example is just showing the usage of "Jobs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -662,7 +682,7 @@ public async Task Exists_JobsGetWaitingForAction() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_JobsGet() { - // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsGet.json + // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsGet.json // this example is just showing the usage of "Jobs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -704,7 +724,7 @@ public async Task GetIfExists_JobsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_JobsGetCmk() { - // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsGetCmk.json + // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsGetCmk.json // this example is just showing the usage of "Jobs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -746,7 +766,7 @@ public async Task GetIfExists_JobsGetCmk() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_JobsGetCopyStuck() { - // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsGetCopyStuck.json + // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsGetCopyStuck.json // this example is just showing the usage of "Jobs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -788,7 +808,7 @@ public async Task GetIfExists_JobsGetCopyStuck() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_JobsGetExport() { - // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsGetExport.json + // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsGetExport.json // this example is just showing the usage of "Jobs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -830,7 +850,7 @@ public async Task GetIfExists_JobsGetExport() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_JobsGetWaitingForAction() { - // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsGetWaitingForAction.json + // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsGetWaitingForAction.json // this example is just showing the usage of "Jobs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/databox/Azure.ResourceManager.DataBox/samples/Generated/Samples/Sample_DataBoxJobResource.cs b/sdk/databox/Azure.ResourceManager.DataBox/samples/Generated/Samples/Sample_DataBoxJobResource.cs index c7339ed56c76..76266d2ae6af 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/samples/Generated/Samples/Sample_DataBoxJobResource.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/samples/Generated/Samples/Sample_DataBoxJobResource.cs @@ -20,7 +20,7 @@ public partial class Sample_DataBoxJobResource [Ignore("Only validating compilation of examples")] public async Task Get_JobsGet() { - // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsGet.json + // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsGet.json // this example is just showing the usage of "Jobs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_JobsGet() [Ignore("Only validating compilation of examples")] public async Task Get_JobsGetCmk() { - // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsGetCmk.json + // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsGetCmk.json // this example is just showing the usage of "Jobs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -82,7 +82,7 @@ public async Task Get_JobsGetCmk() [Ignore("Only validating compilation of examples")] public async Task Get_JobsGetCopyStuck() { - // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsGetCopyStuck.json + // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsGetCopyStuck.json // this example is just showing the usage of "Jobs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -113,7 +113,7 @@ public async Task Get_JobsGetCopyStuck() [Ignore("Only validating compilation of examples")] public async Task Get_JobsGetExport() { - // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsGetExport.json + // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsGetExport.json // this example is just showing the usage of "Jobs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -144,7 +144,7 @@ public async Task Get_JobsGetExport() [Ignore("Only validating compilation of examples")] public async Task Get_JobsGetWaitingForAction() { - // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsGetWaitingForAction.json + // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsGetWaitingForAction.json // this example is just showing the usage of "Jobs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -175,7 +175,7 @@ public async Task Get_JobsGetWaitingForAction() [Ignore("Only validating compilation of examples")] public async Task Delete_JobsDelete() { - // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsDelete.json + // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsDelete.json // this example is just showing the usage of "Jobs_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 @@ -201,7 +201,7 @@ public async Task Delete_JobsDelete() [Ignore("Only validating compilation of examples")] public async Task MarkDevicesShipped_MarkDevicesShipped() { - // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/MarkDevicesShipped.json + // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/MarkDevicesShipped.json // this example is just showing the usage of "Jobs_MarkDevicesShipped" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -232,7 +232,7 @@ public async Task MarkDevicesShipped_MarkDevicesShipped() [Ignore("Only validating compilation of examples")] public async Task BookShipmentPickUp_BookShipmentPickupPost() { - // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/BookShipmentPickupPost.json + // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/BookShipmentPickupPost.json // this example is just showing the usage of "Jobs_BookShipmentPickUp" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -259,7 +259,7 @@ public async Task BookShipmentPickUp_BookShipmentPickupPost() [Ignore("Only validating compilation of examples")] public async Task Cancel_JobsCancelPost() { - // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsCancelPost.json + // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsCancelPost.json // this example is just showing the usage of "Jobs_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 @@ -286,7 +286,7 @@ public async Task Cancel_JobsCancelPost() [Ignore("Only validating compilation of examples")] public async Task GetCredentials_JobsListCredentials() { - // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsListCredentials.json + // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsListCredentials.json // this example is just showing the usage of "Jobs_ListCredentials" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/databox/Azure.ResourceManager.DataBox/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs b/sdk/databox/Azure.ResourceManager.DataBox/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs index 73916c4fd6e6..050adf1589fe 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs @@ -21,7 +21,7 @@ public partial class Sample_ResourceGroupResourceExtensions [Ignore("Only validating compilation of examples")] public async Task GetAvailableSkus_AvailableSkusPost() { - // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/AvailableSkusPost.json + // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/AvailableSkusPost.json // this example is just showing the usage of "Service_ListAvailableSkusByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task GetAvailableSkus_AvailableSkusPost() [Ignore("Only validating compilation of examples")] public async Task ValidateInputs_ValidateInputsByResourceGroup() { - // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/ValidateInputsByResourceGroup.json + // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/ValidateInputsByResourceGroup.json // this example is just showing the usage of "Service_ValidateInputsByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -73,27 +73,37 @@ public async Task ValidateInputs_ValidateInputsByResourceGroup() new DataTransferDetailsValidationContent(DataBoxSkuName.DataBox, DataBoxJobTransferType.ImportToAzure) { DataImportDetails = {new DataImportDetails(new DataBoxStorageAccountDetails(new ResourceIdentifier("/subscriptions/YourSubscriptionId/resourcegroups/YourResourceGroupName/providers/Microsoft.Storage/storageAccounts/YourStorageAccountName")))}, +Model = ModelName.DataBox, }, -new DataBoxValidateAddressContent(new DataBoxShippingAddress("XXXX XXXX", "XX", "00000") +new DataBoxValidateAddressContent(new DataBoxShippingAddress("XXXX XXXX", "XX") { StreetAddress2 = "XXXX XXXX", City = "XXXX XXXX", StateOrProvince = "XX", +PostalCode = "00000", CompanyName = "XXXX XXXX", AddressType = DataBoxShippingAddressType.Commercial, }, DataBoxSkuName.DataBox) { TransportPreferences = new TransportPreferences(TransportShipmentType.MicrosoftManaged), +Model = ModelName.DataBox, }, new SubscriptionIsAllowedToCreateJobValidationContent(), -new SkuAvailabilityValidationContent(DataBoxSkuName.DataBox, DataBoxJobTransferType.ImportToAzure, "XX", new AzureLocation("westus")), -new CreateOrderLimitForSubscriptionValidationContent(DataBoxSkuName.DataBox), +new SkuAvailabilityValidationContent(DataBoxSkuName.DataBox, DataBoxJobTransferType.ImportToAzure, "XX", new AzureLocation("westus")) +{ +Model = ModelName.DataBox, +}, +new CreateOrderLimitForSubscriptionValidationContent(DataBoxSkuName.DataBox) +{ +Model = ModelName.DataBox, +}, new PreferencesValidationContent(DataBoxSkuName.DataBox) { Preference = new DataBoxOrderPreferences { TransportPreferences = new TransportPreferences(TransportShipmentType.MicrosoftManaged), }, +Model = ModelName.DataBox, } }); DataBoxValidationResult result = await resourceGroupResource.ValidateInputsAsync(location, content); @@ -105,7 +115,7 @@ public async Task ValidateInputs_ValidateInputsByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task GetRegionConfiguration_RegionConfigurationByResourceGroup() { - // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/RegionConfigurationByResourceGroup.json + // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/RegionConfigurationByResourceGroup.json // this example is just showing the usage of "Service_RegionConfigurationByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -124,7 +134,15 @@ public async Task GetRegionConfiguration_RegionConfigurationByResourceGroup() AzureLocation location = new AzureLocation("westus"); RegionConfigurationContent content = new RegionConfigurationContent { - ScheduleAvailabilityRequest = new DataBoxScheduleAvailabilityContent(new AzureLocation("westus")), + ScheduleAvailabilityRequest = new DataBoxScheduleAvailabilityContent(new AzureLocation("westus")) + { + Model = ModelName.DataBox, + }, + DeviceCapabilityRequest = new DeviceCapabilityRequest + { + SkuName = DataBoxSkuName.DataBoxDisk, + Model = ModelName.DataBoxDisk, + }, }; RegionConfigurationResult result = await resourceGroupResource.GetRegionConfigurationAsync(location, content); diff --git a/sdk/databox/Azure.ResourceManager.DataBox/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/databox/Azure.ResourceManager.DataBox/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index 0e54accb8b8c..8b59a309780e 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -21,7 +21,7 @@ public partial class Sample_SubscriptionResourceExtensions [Ignore("Only validating compilation of examples")] public async Task GetDataBoxJobs_JobsList() { - // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsList.json + // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsList.json // this example is just showing the usage of "Jobs_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task GetDataBoxJobs_JobsList() [Ignore("Only validating compilation of examples")] public async Task ValidateAddress_ValidateAddressPost() { - // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/ValidateAddressPost.json + // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/ValidateAddressPost.json // this example is just showing the usage of "Service_ValidateAddress" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -68,14 +68,18 @@ public async Task ValidateAddress_ValidateAddressPost() // invoke the operation AzureLocation location = new AzureLocation("westus"); - DataBoxValidateAddressContent content = new DataBoxValidateAddressContent(new DataBoxShippingAddress("XXXX XXXX", "XX", "00000") + DataBoxValidateAddressContent content = new DataBoxValidateAddressContent(new DataBoxShippingAddress("XXXX XXXX", "XX") { StreetAddress2 = "XXXX XXXX", City = "XXXX XXXX", StateOrProvince = "XX", + PostalCode = "00000", CompanyName = "XXXX XXXX", AddressType = DataBoxShippingAddressType.Commercial, - }, DataBoxSkuName.DataBox); + }, DataBoxSkuName.DataBox) + { + Model = ModelName.DataBox, + }; AddressValidationOutput result = await subscriptionResource.ValidateAddressAsync(location, content); Console.WriteLine($"Succeeded: {result}"); @@ -85,7 +89,7 @@ public async Task ValidateAddress_ValidateAddressPost() [Ignore("Only validating compilation of examples")] public async Task ValidateInputs_ValidateInputs() { - // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/ValidateInputs.json + // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/ValidateInputs.json // this example is just showing the usage of "Service_ValidateInputs" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -106,27 +110,37 @@ public async Task ValidateInputs_ValidateInputs() new DataTransferDetailsValidationContent(DataBoxSkuName.DataBox, DataBoxJobTransferType.ImportToAzure) { DataImportDetails = {new DataImportDetails(new DataBoxStorageAccountDetails(new ResourceIdentifier("/subscriptions/YourSubscriptionId/resourcegroups/YourResourceGroupName/providers/Microsoft.Storage/storageAccounts/YourStorageAccountName")))}, +Model = ModelName.DataBox, }, -new DataBoxValidateAddressContent(new DataBoxShippingAddress("XXXX XXXX", "XX", "00000") +new DataBoxValidateAddressContent(new DataBoxShippingAddress("XXXX XXXX", "XX") { StreetAddress2 = "XXXX XXXX", City = "XXXX XXXX", StateOrProvince = "XX", +PostalCode = "00000", CompanyName = "XXXX XXXX", AddressType = DataBoxShippingAddressType.Commercial, }, DataBoxSkuName.DataBox) { TransportPreferences = new TransportPreferences(TransportShipmentType.MicrosoftManaged), +Model = ModelName.DataBox, }, new SubscriptionIsAllowedToCreateJobValidationContent(), -new SkuAvailabilityValidationContent(DataBoxSkuName.DataBox, DataBoxJobTransferType.ImportToAzure, "XX", new AzureLocation("westus")), -new CreateOrderLimitForSubscriptionValidationContent(DataBoxSkuName.DataBox), +new SkuAvailabilityValidationContent(DataBoxSkuName.DataBox, DataBoxJobTransferType.ImportToAzure, "XX", new AzureLocation("westus")) +{ +Model = ModelName.DataBox, +}, +new CreateOrderLimitForSubscriptionValidationContent(DataBoxSkuName.DataBox) +{ +Model = ModelName.DataBox, +}, new PreferencesValidationContent(DataBoxSkuName.DataBox) { Preference = new DataBoxOrderPreferences { TransportPreferences = new TransportPreferences(TransportShipmentType.MicrosoftManaged), }, +Model = ModelName.DataBox, } }); DataBoxValidationResult result = await subscriptionResource.ValidateInputsAsync(location, content); @@ -138,7 +152,7 @@ public async Task ValidateInputs_ValidateInputs() [Ignore("Only validating compilation of examples")] public async Task GetRegionConfiguration_RegionConfiguration() { - // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/RegionConfiguration.json + // Generated from example definition: specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/RegionConfiguration.json // this example is just showing the usage of "Service_RegionConfiguration" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -156,7 +170,15 @@ public async Task GetRegionConfiguration_RegionConfiguration() AzureLocation location = new AzureLocation("westus"); RegionConfigurationContent content = new RegionConfigurationContent { - ScheduleAvailabilityRequest = new DataBoxScheduleAvailabilityContent(new AzureLocation("westus")), + ScheduleAvailabilityRequest = new DataBoxScheduleAvailabilityContent(new AzureLocation("westus")) + { + Model = ModelName.DataBox, + }, + DeviceCapabilityRequest = new DeviceCapabilityRequest + { + SkuName = DataBoxSkuName.DataBoxDisk, + Model = ModelName.DataBoxDisk, + }, }; RegionConfigurationResult result = await subscriptionResource.GetRegionConfigurationAsync(location, content); diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/ArmDataBoxModelFactory.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/ArmDataBoxModelFactory.cs index ad2cb3bbc6dd..0e99d9cbbef0 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/ArmDataBoxModelFactory.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/ArmDataBoxModelFactory.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using System.Linq; using Azure.Core; using Azure.ResourceManager.Models; @@ -31,6 +32,7 @@ public static partial class ArmDataBoxModelFactory /// The Editable status for Reverse Transport preferences. /// Is Prepare To Ship Enabled on this job. /// Name of the stage which is in progress. + /// Name of the stage where delay might be present. /// Time at which the job was started in UTC ISO 8601 format. /// Top level error for the job. /// @@ -42,10 +44,11 @@ public static partial class ArmDataBoxModelFactory /// Delivery type of Job. /// Delivery Info of Job. /// Flag to indicate cancellation of scheduled job. + /// Flag to indicate if all devices associated with the job are lost. /// The sku type. /// Msi identity of the resource. /// A new instance for mocking. - public static DataBoxJobData DataBoxJobData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, DataBoxJobTransferType transferType = default, bool? isCancellable = null, bool? isDeletable = null, bool? isShippingAddressEditable = null, ReverseShippingDetailsEditStatus? reverseShippingDetailsUpdate = null, ReverseTransportPreferenceEditStatus? reverseTransportPreferenceUpdate = null, bool? isPrepareToShipEnabled = null, DataBoxStageName? status = null, DateTimeOffset? startOn = null, ResponseError error = null, DataBoxBasicJobDetails details = null, string cancellationReason = null, JobDeliveryType? deliveryType = null, DateTimeOffset? deliveryInfoScheduledOn = null, bool? isCancellableWithoutFee = null, DataBoxSku sku = null, ManagedServiceIdentity identity = null) + public static DataBoxJobData DataBoxJobData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, DataBoxJobTransferType transferType = default, bool? isCancellable = null, bool? isDeletable = null, bool? isShippingAddressEditable = null, ReverseShippingDetailsEditStatus? reverseShippingDetailsUpdate = null, ReverseTransportPreferenceEditStatus? reverseTransportPreferenceUpdate = null, bool? isPrepareToShipEnabled = null, DataBoxStageName? status = null, DataBoxStageName? delayedStage = null, DateTimeOffset? startOn = null, ResponseError error = null, DataBoxBasicJobDetails details = null, string cancellationReason = null, JobDeliveryType? deliveryType = null, DateTimeOffset? deliveryInfoScheduledOn = null, bool? isCancellableWithoutFee = null, bool? allDevicesLost = null, DataBoxSku sku = null, ManagedServiceIdentity identity = null) { tags ??= new Dictionary(); @@ -64,6 +67,7 @@ public static DataBoxJobData DataBoxJobData(ResourceIdentifier id = null, string reverseTransportPreferenceUpdate, isPrepareToShipEnabled, status, + delayedStage, startOn, error, details, @@ -71,6 +75,7 @@ public static DataBoxJobData DataBoxJobData(ResourceIdentifier id = null, string deliveryType, deliveryInfoScheduledOn != null ? new JobDeliveryInfo(deliveryInfoScheduledOn, serializedAdditionalRawData: null) : null, isCancellableWithoutFee, + allDevicesLost, sku, identity, serializedAdditionalRawData: null); @@ -143,15 +148,37 @@ public static DataBoxBasicJobDetails DataBoxBasicJobDetails(IEnumerable Status of the job stage. /// Time for the job stage in UTC ISO 8601 format. /// Job Stage Details. + /// Delay information for the job stages. /// A new instance for mocking. - public static DataBoxJobStage DataBoxJobStage(DataBoxStageName? stageName = null, string displayName = null, DataBoxStageStatus? stageStatus = null, DateTimeOffset? stageTime = null, BinaryData jobStageDetails = null) + public static DataBoxJobStage DataBoxJobStage(DataBoxStageName? stageName = null, string displayName = null, DataBoxStageStatus? stageStatus = null, DateTimeOffset? stageTime = null, BinaryData jobStageDetails = null, IEnumerable delayInformation = null) { + delayInformation ??= new List(); + return new DataBoxJobStage( stageName, displayName, stageStatus, stageTime, jobStageDetails, + delayInformation?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Status of notification. + /// Delay Error code. + /// Description of the delay. + /// Timestamp when the delay notification was created. + /// Timestamp when the delay notification was resolved. + /// A new instance for mocking. + public static JobDelayDetails JobDelayDetails(DelayNotificationStatus? status = null, PortalDelayErrorCode? errorCode = null, string description = null, DateTimeOffset? startOn = null, DateTimeOffset? resolutionOn = null) + { + return new JobDelayDetails( + status, + errorCode, + description, + startOn, + resolutionOn, serializedAdditionalRawData: null); } @@ -289,10 +316,11 @@ public static DataLocationToServiceLocationMap DataLocationToServiceLocationMap( /// Initializes a new instance of . /// Usable capacity in TB. /// Maximum capacity in TB. + /// Maximum capacity per device in TB. /// A new instance for mocking. - public static DataBoxSkuCapacity DataBoxSkuCapacity(string usable = null, string maximum = null) + public static DataBoxSkuCapacity DataBoxSkuCapacity(string usable = null, string maximum = null, string individualSkuUsable = null) { - return new DataBoxSkuCapacity(usable, maximum, serializedAdditionalRawData: null); + return new DataBoxSkuCapacity(usable, maximum, individualSkuUsable, serializedAdditionalRawData: null); } /// Initializes a new instance of . @@ -309,10 +337,17 @@ public static DataBoxSkuCost DataBoxSkuCost(Guid? meterId = null, string meterTy /// Shipping address of the customer. /// Device type to be used for the job. /// Preferences related to the shipment logistics of the sku. + /// The customer friendly name of the combination of version and capacity of the device. This field is necessary only at the time of ordering the newer generation device i.e. AzureDataBox120 and AzureDataBox525 as of Feb/2025. /// A new instance for mocking. - public static DataBoxValidateAddressContent DataBoxValidateAddressContent(DataBoxShippingAddress shippingAddress = null, DataBoxSkuName deviceType = default, TransportPreferences transportPreferences = null) + public static DataBoxValidateAddressContent DataBoxValidateAddressContent(DataBoxShippingAddress shippingAddress = null, DataBoxSkuName deviceType = default, TransportPreferences transportPreferences = null, ModelName? model = null) { - return new DataBoxValidateAddressContent(DataBoxValidationInputDiscriminator.ValidateAddress, serializedAdditionalRawData: null, shippingAddress, deviceType, transportPreferences); + return new DataBoxValidateAddressContent( + DataBoxValidationInputDiscriminator.ValidateAddress, + serializedAdditionalRawData: null, + shippingAddress, + deviceType, + transportPreferences, + model); } /// Initializes a new instance of . @@ -393,10 +428,21 @@ public static DataCenterAccessSecurityCode DataCenterAccessSecurityCode(string r /// Initializes a new instance of . /// Location for data transfer. For locations check: https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. /// Country in which storage location should be supported. + /// The customer friendly name of the combination of version and capacity of the device. This field is necessary only at the time of ordering the newer generation device i.e. AzureDataBox120 and AzureDataBox525 as of Feb/2025. /// A new instance for mocking. - public static ScheduleAvailabilityContent ScheduleAvailabilityContent(AzureLocation storageLocation = default, string country = null) + public static ScheduleAvailabilityContent ScheduleAvailabilityContent(AzureLocation storageLocation = default, string country = null, ModelName? model = null) { - return new UnknownScheduleAvailabilityRequest(storageLocation, default, country, serializedAdditionalRawData: null); + return new UnknownScheduleAvailabilityRequest(storageLocation, default, country, model, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Storage location. For locations check: https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. + /// Sku Name for which the data center address requested. + /// The customer friendly name of the combination of version and capacity of the device. This field is necessary only at the time of ordering the newer generation device i.e. AzureDataBox120 and AzureDataBox525 as of Feb/2025. + /// A new instance for mocking. + public static DataCenterAddressContent DataCenterAddressContent(AzureLocation storageLocation = default, DataBoxSkuName skuName = default, ModelName? model = null) + { + return new DataCenterAddressContent(storageLocation, skuName, model, serializedAdditionalRawData: null); } /// Initializes a new instance of . @@ -407,13 +453,15 @@ public static ScheduleAvailabilityContent ScheduleAvailabilityContent(AzureLocat /// 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 . /// + /// Device capabilities available for a given sku in a region. /// A new instance for mocking. - public static RegionConfigurationResult RegionConfigurationResult(IEnumerable scheduleAvailabilityResponseAvailableDates = null, IEnumerable transportAvailabilityDetails = null, DataCenterAddressResult dataCenterAddressResponse = null) + public static RegionConfigurationResult RegionConfigurationResult(IEnumerable scheduleAvailabilityResponseAvailableDates = null, IEnumerable transportAvailabilityDetails = null, DataCenterAddressResult dataCenterAddressResponse = null, IEnumerable deviceCapabilityDetails = null) { scheduleAvailabilityResponseAvailableDates ??= new List(); transportAvailabilityDetails ??= new List(); + deviceCapabilityDetails ??= new List(); - return new RegionConfigurationResult(scheduleAvailabilityResponseAvailableDates != null ? new ScheduleAvailabilityResponse(scheduleAvailabilityResponseAvailableDates?.ToList(), serializedAdditionalRawData: null) : null, transportAvailabilityDetails != null ? new TransportAvailabilityResponse(transportAvailabilityDetails?.ToList(), serializedAdditionalRawData: null) : null, dataCenterAddressResponse, serializedAdditionalRawData: null); + return new RegionConfigurationResult(scheduleAvailabilityResponseAvailableDates != null ? new ScheduleAvailabilityResponse(scheduleAvailabilityResponseAvailableDates?.ToList(), serializedAdditionalRawData: null) : null, transportAvailabilityDetails != null ? new TransportAvailabilityResponse(transportAvailabilityDetails?.ToList(), serializedAdditionalRawData: null) : null, dataCenterAddressResponse, deviceCapabilityDetails != null ? new DeviceCapabilityResponse(deviceCapabilityDetails?.ToList(), serializedAdditionalRawData: null) : null, serializedAdditionalRawData: null); } /// Initializes a new instance of . @@ -424,6 +472,14 @@ public static TransportAvailabilityDetails TransportAvailabilityDetails(Transpor return new TransportAvailabilityDetails(shipmentType, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// Hardware encryption support for a given sku for a given region. + /// A new instance for mocking. + public static DeviceCapabilityDetails DeviceCapabilityDetails(HardwareEncryption? hardwareEncryption = null) + { + return new DeviceCapabilityDetails(hardwareEncryption, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// Name of the account. /// Type of the account. @@ -613,10 +669,11 @@ public static GranularCopyProgress GranularCopyProgress(string storageAccountNam /// Initializes a new instance of . /// Device type to be used for the job. + /// The customer friendly name of the combination of version and capacity of the device. This field is necessary only at the time of ordering the newer generation device i.e. AzureDataBox120 and AzureDataBox525 as of Feb/2025. /// A new instance for mocking. - public static CreateOrderLimitForSubscriptionValidationContent CreateOrderLimitForSubscriptionValidationContent(DataBoxSkuName deviceType = default) + public static CreateOrderLimitForSubscriptionValidationContent CreateOrderLimitForSubscriptionValidationContent(DataBoxSkuName deviceType = default, ModelName? model = null) { - return new CreateOrderLimitForSubscriptionValidationContent(DataBoxValidationInputDiscriminator.ValidateCreateOrderLimit, serializedAdditionalRawData: null, deviceType); + return new CreateOrderLimitForSubscriptionValidationContent(DataBoxValidationInputDiscriminator.ValidateCreateOrderLimit, serializedAdditionalRawData: null, deviceType, model); } /// Initializes a new instance of . @@ -1239,10 +1296,11 @@ public static DataBoxSecret DataBoxSecret(string deviceSerialNumber = null, stri /// Initializes a new instance of . /// Location for data transfer. For locations check: https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. /// Country in which storage location should be supported. + /// The customer friendly name of the combination of version and capacity of the device. This field is necessary only at the time of ordering the newer generation device i.e. AzureDataBox120 and AzureDataBox525 as of Feb/2025. /// A new instance for mocking. - public static DataBoxScheduleAvailabilityContent DataBoxScheduleAvailabilityContent(AzureLocation storageLocation = default, string country = null) + public static DataBoxScheduleAvailabilityContent DataBoxScheduleAvailabilityContent(AzureLocation storageLocation = default, string country = null, ModelName? model = null) { - return new DataBoxScheduleAvailabilityContent(storageLocation, DataBoxSkuName.DataBox, country, serializedAdditionalRawData: null); + return new DataBoxScheduleAvailabilityContent(storageLocation, DataBoxSkuName.DataBox, country, model, serializedAdditionalRawData: null); } /// Initializes a new instance of . @@ -1250,8 +1308,9 @@ public static DataBoxScheduleAvailabilityContent DataBoxScheduleAvailabilityCont /// List of DataTransfer details to be used to import data to azure. /// Device type. /// Type of the transfer. + /// The customer friendly name of the combination of version and capacity of the device. This field is necessary only at the time of ordering the newer generation device i.e. AzureDataBox120 and AzureDataBox525 as of Feb/2025. /// A new instance for mocking. - public static DataTransferDetailsValidationContent DataTransferDetailsValidationContent(IEnumerable dataExportDetails = null, IEnumerable dataImportDetails = null, DataBoxSkuName deviceType = default, DataBoxJobTransferType transferType = default) + public static DataTransferDetailsValidationContent DataTransferDetailsValidationContent(IEnumerable dataExportDetails = null, IEnumerable dataImportDetails = null, DataBoxSkuName deviceType = default, DataBoxJobTransferType transferType = default, ModelName? model = null) { dataExportDetails ??= new List(); dataImportDetails ??= new List(); @@ -1262,7 +1321,8 @@ public static DataTransferDetailsValidationContent DataTransferDetailsValidation dataExportDetails?.ToList(), dataImportDetails?.ToList(), deviceType, - transferType); + transferType, + model); } /// Initializes a new instance of . @@ -1277,29 +1337,38 @@ public static DataTransferDetailsValidationResult DataTransferDetailsValidationR /// Initializes a new instance of . /// Location for data transfer. For locations check: https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. /// Country in which storage location should be supported. + /// The customer friendly name of the combination of version and capacity of the device. This field is necessary only at the time of ordering the newer generation device i.e. AzureDataBox120 and AzureDataBox525 as of Feb/2025. /// The expected size of the data, which needs to be transferred in this job, in terabytes. /// A new instance for mocking. - public static DiskScheduleAvailabilityContent DiskScheduleAvailabilityContent(AzureLocation storageLocation = default, string country = null, int expectedDataSizeInTerabytes = default) + public static DiskScheduleAvailabilityContent DiskScheduleAvailabilityContent(AzureLocation storageLocation = default, string country = null, ModelName? model = null, int expectedDataSizeInTerabytes = default) { - return new DiskScheduleAvailabilityContent(storageLocation, DataBoxSkuName.DataBoxDisk, country, serializedAdditionalRawData: null, expectedDataSizeInTerabytes); + return new DiskScheduleAvailabilityContent( + storageLocation, + DataBoxSkuName.DataBoxDisk, + country, + model, + serializedAdditionalRawData: null, + expectedDataSizeInTerabytes); } /// Initializes a new instance of . /// Location for data transfer. For locations check: https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. /// Country in which storage location should be supported. + /// The customer friendly name of the combination of version and capacity of the device. This field is necessary only at the time of ordering the newer generation device i.e. AzureDataBox120 and AzureDataBox525 as of Feb/2025. /// A new instance for mocking. - public static HeavyScheduleAvailabilityContent HeavyScheduleAvailabilityContent(AzureLocation storageLocation = default, string country = null) + public static HeavyScheduleAvailabilityContent HeavyScheduleAvailabilityContent(AzureLocation storageLocation = default, string country = null, ModelName? model = null) { - return new HeavyScheduleAvailabilityContent(storageLocation, DataBoxSkuName.DataBoxHeavy, country, serializedAdditionalRawData: null); + return new HeavyScheduleAvailabilityContent(storageLocation, DataBoxSkuName.DataBoxHeavy, country, model, serializedAdditionalRawData: null); } /// Initializes a new instance of . /// Preference of transport and data center. /// Device type to be used for the job. + /// The customer friendly name of the combination of version and capacity of the device. This field is necessary only at the time of ordering the newer generation device i.e. AzureDataBox120 and AzureDataBox525 as of Feb/2025. /// A new instance for mocking. - public static PreferencesValidationContent PreferencesValidationContent(DataBoxOrderPreferences preference = null, DataBoxSkuName deviceType = default) + public static PreferencesValidationContent PreferencesValidationContent(DataBoxOrderPreferences preference = null, DataBoxSkuName deviceType = default, ModelName? model = null) { - return new PreferencesValidationContent(DataBoxValidationInputDiscriminator.ValidatePreferences, serializedAdditionalRawData: null, preference, deviceType); + return new PreferencesValidationContent(DataBoxValidationInputDiscriminator.ValidatePreferences, serializedAdditionalRawData: null, preference, deviceType, model); } /// Initializes a new instance of . @@ -1316,8 +1385,9 @@ public static PreferencesValidationResult PreferencesValidationResult(ResponseEr /// Type of the transfer. /// ISO country code. Country for hardware shipment. For codes check: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements. /// Location for data transfer. For locations check: https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. + /// The customer friendly name of the combination of version and capacity of the device. This field is necessary only at the time of ordering the newer generation device i.e. AzureDataBox120 and AzureDataBox525 as of Feb/2025. /// A new instance for mocking. - public static SkuAvailabilityValidationContent SkuAvailabilityValidationContent(DataBoxSkuName deviceType = default, DataBoxJobTransferType transferType = default, string country = null, AzureLocation location = default) + public static SkuAvailabilityValidationContent SkuAvailabilityValidationContent(DataBoxSkuName deviceType = default, DataBoxJobTransferType transferType = default, string country = null, AzureLocation location = default, ModelName? model = null) { return new SkuAvailabilityValidationContent( DataBoxValidationInputDiscriminator.ValidateSkuAvailability, @@ -1325,7 +1395,8 @@ public static SkuAvailabilityValidationContent SkuAvailabilityValidationContent( deviceType, transferType, country, - location); + location, + model); } /// Initializes a new instance of . @@ -1345,5 +1416,78 @@ public static SubscriptionIsAllowedToCreateJobValidationResult SubscriptionIsAll { return new SubscriptionIsAllowedToCreateJobValidationResult(DataBoxValidationInputDiscriminator.ValidateSubscriptionIsAllowedToCreateJob, error, serializedAdditionalRawData: null, status); } + + /// Initializes a new instance of DataBoxJobData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Type of the data transfer. + /// Describes whether the job is cancellable or not. + /// Describes whether the job is deletable or not. + /// Describes whether the shipping address is editable or not. + /// The Editable status for Reverse Shipping Address and Contact Info. + /// The Editable status for Reverse Transport preferences. + /// Is Prepare To Ship Enabled on this job. + /// Name of the stage which is in progress. + /// Time at which the job was started in UTC ISO 8601 format. + /// Top level error for the job. + /// + /// Details of a job run. This field will only be sent for expand details filter. + /// 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 . + /// + /// Reason for cancellation. + /// Delivery type of Job. + /// Delivery Info of Job. + /// Flag to indicate cancellation of scheduled job. + /// The sku type. + /// Msi identity of the resource. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static DataBoxJobData DataBoxJobData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, DataBoxJobTransferType transferType, bool? isCancellable, bool? isDeletable, bool? isShippingAddressEditable, ReverseShippingDetailsEditStatus? reverseShippingDetailsUpdate, ReverseTransportPreferenceEditStatus? reverseTransportPreferenceUpdate, bool? isPrepareToShipEnabled, DataBoxStageName? status, DateTimeOffset? startOn, ResponseError error, DataBoxBasicJobDetails details, string cancellationReason, JobDeliveryType? deliveryType, DateTimeOffset? deliveryInfoScheduledOn, bool? isCancellableWithoutFee, DataBoxSku sku, ManagedServiceIdentity identity) + { + return DataBoxJobData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, transferType: transferType, isCancellable: isCancellable, isDeletable: isDeletable, isShippingAddressEditable: isShippingAddressEditable, reverseShippingDetailsUpdate: reverseShippingDetailsUpdate, reverseTransportPreferenceUpdate: reverseTransportPreferenceUpdate, isPrepareToShipEnabled: isPrepareToShipEnabled, status: status, delayedStage: default, startOn: startOn, error: error, details: details, cancellationReason: cancellationReason, deliveryType: deliveryType, deliveryInfoScheduledOn: deliveryInfoScheduledOn, isCancellableWithoutFee: isCancellableWithoutFee, allDevicesLost: default, sku: sku, identity: identity); + } + + /// Initializes a new instance of DataBoxJobStage. + /// Name of the job stage. + /// Display name of the job stage. + /// Status of the job stage. + /// Time for the job stage in UTC ISO 8601 format. + /// Job Stage Details. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static DataBoxJobStage DataBoxJobStage(DataBoxStageName? stageName, string displayName, DataBoxStageStatus? stageStatus, DateTimeOffset? stageTime, BinaryData jobStageDetails) + { + return DataBoxJobStage(stageName: stageName, displayName: displayName, stageStatus: stageStatus, stageTime: stageTime, jobStageDetails: jobStageDetails, delayInformation: default); + } + + /// Initializes a new instance of DataBoxSkuCapacity. + /// Usable capacity in TB. + /// Maximum capacity in TB. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static DataBoxSkuCapacity DataBoxSkuCapacity(string usable, string maximum) + { + return DataBoxSkuCapacity(usable: usable, maximum: maximum, individualSkuUsable: default); + } + + /// Initializes a new instance of RegionConfigurationResult. + /// Schedule availability for given sku in a region. + /// Transport options available for given sku in a region. + /// + /// Datacenter address for given sku in a region. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static RegionConfigurationResult RegionConfigurationResult(IEnumerable scheduleAvailabilityResponseAvailableDates, IEnumerable transportAvailabilityDetails, DataCenterAddressResult dataCenterAddressResponse) + { + return RegionConfigurationResult(scheduleAvailabilityResponseAvailableDates: scheduleAvailabilityResponseAvailableDates, transportAvailabilityDetails: transportAvailabilityDetails, dataCenterAddressResponse: dataCenterAddressResponse, deviceCapabilityDetails: default); + } } } diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/DataBoxJobCollection.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/DataBoxJobCollection.cs index 93d465f2e1be..42afb7795598 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/DataBoxJobCollection.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/DataBoxJobCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAsync( /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUnt /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync(string jobName, /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(string jobName, string expand = /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllAsync(string skipToken = /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// Resource @@ -317,7 +317,7 @@ public virtual Pageable GetAll(string skipToken = null, Canc /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// Resource @@ -361,7 +361,7 @@ public virtual async Task> ExistsAsync(string jobName, string exp /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// Resource @@ -405,7 +405,7 @@ public virtual Response Exists(string jobName, string expand = null, Cance /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// Resource @@ -451,7 +451,7 @@ public virtual async Task> GetIfExistsAsync /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// Resource diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/DataBoxJobData.Serialization.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/DataBoxJobData.Serialization.cs index 2d068735b99d..1280c9c1e90d 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/DataBoxJobData.Serialization.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/DataBoxJobData.Serialization.cs @@ -83,6 +83,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("status"u8); writer.WriteStringValue(Status.Value.ToString()); } + if (options.Format != "W" && Optional.IsDefined(DelayedStage)) + { + writer.WritePropertyName("delayedStage"u8); + writer.WriteStringValue(DelayedStage.Value.ToString()); + } if (options.Format != "W" && Optional.IsDefined(StartOn)) { writer.WritePropertyName("startTime"u8); @@ -118,6 +123,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("isCancellableWithoutFee"u8); writer.WriteBooleanValue(IsCancellableWithoutFee.Value); } + if (options.Format != "W" && Optional.IsDefined(AllDevicesLost)) + { + writer.WritePropertyName("allDevicesLost"u8); + writer.WriteBooleanValue(AllDevicesLost.Value); + } writer.WriteEndObject(); } @@ -157,6 +167,7 @@ internal static DataBoxJobData DeserializeDataBoxJobData(JsonElement element, Mo ReverseTransportPreferenceEditStatus? reverseTransportPreferenceUpdate = default; bool? isPrepareToShipEnabled = default; DataBoxStageName? status = default; + DataBoxStageName? delayedStage = default; DateTimeOffset? startTime = default; ResponseError error = default; DataBoxBasicJobDetails details = default; @@ -164,6 +175,7 @@ internal static DataBoxJobData DeserializeDataBoxJobData(JsonElement element, Mo JobDeliveryType? deliveryType = default; JobDeliveryInfo deliveryInfo = default; bool? isCancellableWithoutFee = default; + bool? allDevicesLost = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -302,6 +314,15 @@ internal static DataBoxJobData DeserializeDataBoxJobData(JsonElement element, Mo status = new DataBoxStageName(property0.Value.GetString()); continue; } + if (property0.NameEquals("delayedStage"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + delayedStage = new DataBoxStageName(property0.Value.GetString()); + continue; + } if (property0.NameEquals("startTime"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -361,6 +382,15 @@ internal static DataBoxJobData DeserializeDataBoxJobData(JsonElement element, Mo isCancellableWithoutFee = property0.Value.GetBoolean(); continue; } + if (property0.NameEquals("allDevicesLost"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + allDevicesLost = property0.Value.GetBoolean(); + continue; + } } continue; } @@ -385,6 +415,7 @@ internal static DataBoxJobData DeserializeDataBoxJobData(JsonElement element, Mo reverseTransportPreferenceUpdate, isPrepareToShipEnabled, status, + delayedStage, startTime, error, details, @@ -392,6 +423,7 @@ internal static DataBoxJobData DeserializeDataBoxJobData(JsonElement element, Mo deliveryType, deliveryInfo, isCancellableWithoutFee, + allDevicesLost, sku, identity, serializedAdditionalRawData); diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/DataBoxJobData.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/DataBoxJobData.cs index 18c4c3be294d..22e9a188b646 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/DataBoxJobData.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/DataBoxJobData.cs @@ -79,6 +79,7 @@ public DataBoxJobData(AzureLocation location, DataBoxJobTransferType transferTyp /// The Editable status for Reverse Transport preferences. /// Is Prepare To Ship Enabled on this job. /// Name of the stage which is in progress. + /// Name of the stage where delay might be present. /// Time at which the job was started in UTC ISO 8601 format. /// Top level error for the job. /// @@ -90,10 +91,11 @@ public DataBoxJobData(AzureLocation location, DataBoxJobTransferType transferTyp /// Delivery type of Job. /// Delivery Info of Job. /// Flag to indicate cancellation of scheduled job. + /// Flag to indicate if all devices associated with the job are lost. /// The sku type. /// Msi identity of the resource. /// Keeps track of any properties unknown to the library. - internal DataBoxJobData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, DataBoxJobTransferType transferType, bool? isCancellable, bool? isDeletable, bool? isShippingAddressEditable, ReverseShippingDetailsEditStatus? reverseShippingDetailsUpdate, ReverseTransportPreferenceEditStatus? reverseTransportPreferenceUpdate, bool? isPrepareToShipEnabled, DataBoxStageName? status, DateTimeOffset? startOn, ResponseError error, DataBoxBasicJobDetails details, string cancellationReason, JobDeliveryType? deliveryType, JobDeliveryInfo deliveryInfo, bool? isCancellableWithoutFee, DataBoxSku sku, ManagedServiceIdentity identity, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal DataBoxJobData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, DataBoxJobTransferType transferType, bool? isCancellable, bool? isDeletable, bool? isShippingAddressEditable, ReverseShippingDetailsEditStatus? reverseShippingDetailsUpdate, ReverseTransportPreferenceEditStatus? reverseTransportPreferenceUpdate, bool? isPrepareToShipEnabled, DataBoxStageName? status, DataBoxStageName? delayedStage, DateTimeOffset? startOn, ResponseError error, DataBoxBasicJobDetails details, string cancellationReason, JobDeliveryType? deliveryType, JobDeliveryInfo deliveryInfo, bool? isCancellableWithoutFee, bool? allDevicesLost, DataBoxSku sku, ManagedServiceIdentity identity, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { TransferType = transferType; IsCancellable = isCancellable; @@ -103,6 +105,7 @@ internal DataBoxJobData(ResourceIdentifier id, string name, ResourceType resourc ReverseTransportPreferenceUpdate = reverseTransportPreferenceUpdate; IsPrepareToShipEnabled = isPrepareToShipEnabled; Status = status; + DelayedStage = delayedStage; StartOn = startOn; Error = error; Details = details; @@ -110,6 +113,7 @@ internal DataBoxJobData(ResourceIdentifier id, string name, ResourceType resourc DeliveryType = deliveryType; DeliveryInfo = deliveryInfo; IsCancellableWithoutFee = isCancellableWithoutFee; + AllDevicesLost = allDevicesLost; Sku = sku; Identity = identity; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -136,6 +140,8 @@ internal DataBoxJobData() public bool? IsPrepareToShipEnabled { get; } /// Name of the stage which is in progress. public DataBoxStageName? Status { get; } + /// Name of the stage where delay might be present. + public DataBoxStageName? DelayedStage { get; } /// Time at which the job was started in UTC ISO 8601 format. public DateTimeOffset? StartOn { get; } /// Top level error for the job. @@ -166,6 +172,8 @@ public DateTimeOffset? DeliveryInfoScheduledOn /// Flag to indicate cancellation of scheduled job. public bool? IsCancellableWithoutFee { get; } + /// Flag to indicate if all devices associated with the job are lost. + public bool? AllDevicesLost { get; } /// The sku type. public DataBoxSku Sku { get; set; } /// Msi identity of the resource. diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/DataBoxJobResource.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/DataBoxJobResource.cs index ed8925ea4719..3ffbb8404221 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/DataBoxJobResource.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/DataBoxJobResource.cs @@ -108,7 +108,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// Resource @@ -149,7 +149,7 @@ public virtual async Task> GetAsync(string expand = /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// Resource @@ -190,7 +190,7 @@ public virtual Response Get(string expand = null, Cancellati /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// Resource @@ -232,7 +232,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// Resource @@ -274,7 +274,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// Resource @@ -321,7 +321,7 @@ public virtual async Task> UpdateAsync(WaitUnti /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// Resource @@ -368,7 +368,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Data /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual async Task MarkDevicesShippedAsync(MarkDevicesShippedCo /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// Resource @@ -452,7 +452,7 @@ public virtual Response MarkDevicesShipped(MarkDevicesShippedContent content, Ca /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// Resource @@ -494,7 +494,7 @@ public virtual async Task> BookShipmentPic /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// Resource @@ -536,7 +536,7 @@ public virtual Response BookShipmentPickUp(Shipment /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// Resource @@ -578,7 +578,7 @@ public virtual async Task CancelAsync(DataBoxJobCancellationReason can /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// Resource @@ -620,7 +620,7 @@ public virtual Response Cancel(DataBoxJobCancellationReason cancellationReason, /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// Resource @@ -649,7 +649,7 @@ public virtual AsyncPageable GetCredentialsAsync(Cancell /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// Resource @@ -678,7 +678,7 @@ public virtual Pageable GetCredentials(CancellationToken /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// @@ -716,7 +716,7 @@ public virtual async Task MitigateAsync(MitigateJobContent content, Ca /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// @@ -754,7 +754,7 @@ public virtual Response Mitigate(MitigateJobContent content, CancellationToken c /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// Resource @@ -816,7 +816,7 @@ public virtual async Task> AddTagAsync(string key, /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// Resource @@ -878,7 +878,7 @@ public virtual Response AddTag(string key, string value, Can /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// Resource @@ -935,7 +935,7 @@ public virtual async Task> SetTagsAsync(IDictionary /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// Resource @@ -992,7 +992,7 @@ public virtual Response SetTags(IDictionary /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// Resource @@ -1052,7 +1052,7 @@ public virtual async Task> RemoveTagAsync(string ke /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// Resource diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Extensions/DataBoxExtensions.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Extensions/DataBoxExtensions.cs index 39b4d279b367..bc27f1efbe68 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Extensions/DataBoxExtensions.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Extensions/DataBoxExtensions.cs @@ -82,7 +82,7 @@ public static DataBoxJobCollection GetDataBoxJobs(this ResourceGroupResource res /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// Resource @@ -121,7 +121,7 @@ public static async Task> GetDataBoxJobAsync(this R /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// Resource @@ -160,7 +160,7 @@ public static Response GetDataBoxJob(this ResourceGroupResou /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// @@ -194,7 +194,7 @@ public static AsyncPageable GetAvailableSkusAsync(this Re /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// @@ -228,7 +228,7 @@ public static Pageable GetAvailableSkus(this ResourceGrou /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// @@ -261,7 +261,7 @@ public static async Task> ValidateInputsAsync( /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// @@ -294,7 +294,7 @@ public static Response ValidateInputs(this ResourceGrou /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// @@ -327,7 +327,7 @@ public static async Task> GetRegionConfigura /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// @@ -360,7 +360,7 @@ public static Response GetRegionConfiguration(this Re /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// Resource @@ -397,7 +397,7 @@ public static AsyncPageable GetDataBoxJobsAsync(this Subscri /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// Resource @@ -434,7 +434,7 @@ public static Pageable GetDataBoxJobs(this SubscriptionResou /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// @@ -467,7 +467,7 @@ public static async Task> ValidateAddressAsync /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// @@ -500,7 +500,7 @@ public static Response ValidateAddress(this Subscriptio /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// @@ -533,7 +533,7 @@ public static async Task> ValidateInputsAsync( /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// @@ -566,7 +566,7 @@ public static Response ValidateInputs(this Subscription /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// @@ -599,7 +599,7 @@ public static async Task> GetRegionConfigura /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Extensions/MockableDataBoxResourceGroupResource.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Extensions/MockableDataBoxResourceGroupResource.cs index 0c1c963cc534..ec8b08111150 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Extensions/MockableDataBoxResourceGroupResource.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Extensions/MockableDataBoxResourceGroupResource.cs @@ -62,7 +62,7 @@ public virtual DataBoxJobCollection GetDataBoxJobs() /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// Resource @@ -94,7 +94,7 @@ public virtual async Task> GetDataBoxJobAsync(strin /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// Resource @@ -126,7 +126,7 @@ public virtual Response GetDataBoxJob(string jobName, string /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// @@ -157,7 +157,7 @@ public virtual AsyncPageable GetAvailableSkusAsync(AzureL /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// @@ -188,7 +188,7 @@ public virtual Pageable GetAvailableSkus(AzureLocation lo /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// @@ -227,7 +227,7 @@ public virtual async Task> ValidateInputsAsync /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// @@ -266,7 +266,7 @@ public virtual Response ValidateInputs(AzureLocation lo /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// @@ -305,7 +305,7 @@ public virtual async Task> GetRegionConfigur /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Extensions/MockableDataBoxSubscriptionResource.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Extensions/MockableDataBoxSubscriptionResource.cs index aed38d1450a8..472b5da9d7a0 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Extensions/MockableDataBoxSubscriptionResource.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Extensions/MockableDataBoxSubscriptionResource.cs @@ -59,7 +59,7 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// Resource @@ -90,7 +90,7 @@ public virtual AsyncPageable GetDataBoxJobsAsync(string skip /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// Resource @@ -121,7 +121,7 @@ public virtual Pageable GetDataBoxJobs(string skipToken = nu /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// @@ -160,7 +160,7 @@ public virtual async Task> ValidateAddressAsyn /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// @@ -199,7 +199,7 @@ public virtual Response ValidateAddress(AzureLocation l /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// @@ -238,7 +238,7 @@ public virtual async Task> ValidateInputsAsync /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// @@ -277,7 +277,7 @@ public virtual Response ValidateInputs(AzureLocation lo /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// @@ -316,7 +316,7 @@ public virtual async Task> GetRegionConfigur /// /// /// Default Api Version - /// 2022-12-01 + /// 2025-02-01 /// /// /// diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/CreateOrderLimitForSubscriptionValidationContent.Serialization.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/CreateOrderLimitForSubscriptionValidationContent.Serialization.cs index 53973afce847..e07166c3a71a 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/CreateOrderLimitForSubscriptionValidationContent.Serialization.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/CreateOrderLimitForSubscriptionValidationContent.Serialization.cs @@ -37,6 +37,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); writer.WritePropertyName("deviceType"u8); writer.WriteStringValue(DeviceType.ToSerialString()); + if (Optional.IsDefined(Model)) + { + writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model.Value.ToSerialString()); + } } CreateOrderLimitForSubscriptionValidationContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -60,6 +65,7 @@ internal static CreateOrderLimitForSubscriptionValidationContent DeserializeCrea return null; } DataBoxSkuName deviceType = default; + ModelName? model = default; DataBoxValidationInputDiscriminator validationType = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -70,6 +76,15 @@ internal static CreateOrderLimitForSubscriptionValidationContent DeserializeCrea deviceType = property.Value.GetString().ToDataBoxSkuName(); continue; } + if (property.NameEquals("model"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + model = property.Value.GetString().ToModelName(); + continue; + } if (property.NameEquals("validationType"u8)) { validationType = property.Value.GetString().ToDataBoxValidationInputDiscriminator(); @@ -81,7 +96,7 @@ internal static CreateOrderLimitForSubscriptionValidationContent DeserializeCrea } } serializedAdditionalRawData = rawDataDictionary; - return new CreateOrderLimitForSubscriptionValidationContent(validationType, serializedAdditionalRawData, deviceType); + return new CreateOrderLimitForSubscriptionValidationContent(validationType, serializedAdditionalRawData, deviceType, model); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/CreateOrderLimitForSubscriptionValidationContent.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/CreateOrderLimitForSubscriptionValidationContent.cs index c971b66171d6..2a88b6bc8273 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/CreateOrderLimitForSubscriptionValidationContent.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/CreateOrderLimitForSubscriptionValidationContent.cs @@ -25,9 +25,11 @@ public CreateOrderLimitForSubscriptionValidationContent(DataBoxSkuName deviceTyp /// Identifies the type of validation request. /// Keeps track of any properties unknown to the library. /// Device type to be used for the job. - internal CreateOrderLimitForSubscriptionValidationContent(DataBoxValidationInputDiscriminator validationType, IDictionary serializedAdditionalRawData, DataBoxSkuName deviceType) : base(validationType, serializedAdditionalRawData) + /// The customer friendly name of the combination of version and capacity of the device. This field is necessary only at the time of ordering the newer generation device i.e. AzureDataBox120 and AzureDataBox525 as of Feb/2025. + internal CreateOrderLimitForSubscriptionValidationContent(DataBoxValidationInputDiscriminator validationType, IDictionary serializedAdditionalRawData, DataBoxSkuName deviceType, ModelName? model) : base(validationType, serializedAdditionalRawData) { DeviceType = deviceType; + Model = model; ValidationType = validationType; } @@ -38,5 +40,7 @@ internal CreateOrderLimitForSubscriptionValidationContent() /// Device type to be used for the job. public DataBoxSkuName DeviceType { get; } + /// The customer friendly name of the combination of version and capacity of the device. This field is necessary only at the time of ordering the newer generation device i.e. AzureDataBox120 and AzureDataBox525 as of Feb/2025. + public ModelName? Model { get; set; } } } diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxJobStage.Serialization.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxJobStage.Serialization.cs index 3c0bc77b1ba6..cf888b6bb387 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxJobStage.Serialization.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxJobStage.Serialization.cs @@ -66,6 +66,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } #endif } + if (options.Format != "W" && Optional.IsCollectionDefined(DelayInformation)) + { + writer.WritePropertyName("delayInformation"u8); + writer.WriteStartArray(); + foreach (var item in DelayInformation) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -108,6 +118,7 @@ internal static DataBoxJobStage DeserializeDataBoxJobStage(JsonElement element, DataBoxStageStatus? stageStatus = default; DateTimeOffset? stageTime = default; BinaryData jobStageDetails = default; + IReadOnlyList delayInformation = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -153,6 +164,20 @@ internal static DataBoxJobStage DeserializeDataBoxJobStage(JsonElement element, jobStageDetails = BinaryData.FromString(property.Value.GetRawText()); continue; } + if (property.NameEquals("delayInformation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(JobDelayDetails.DeserializeJobDelayDetails(item, options)); + } + delayInformation = array; + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -165,6 +190,7 @@ internal static DataBoxJobStage DeserializeDataBoxJobStage(JsonElement element, stageStatus, stageTime, jobStageDetails, + delayInformation ?? new ChangeTrackingList(), serializedAdditionalRawData); } diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxJobStage.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxJobStage.cs index fdd702bfc1f8..c6b7f275b554 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxJobStage.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxJobStage.cs @@ -48,6 +48,7 @@ public partial class DataBoxJobStage /// Initializes a new instance of . internal DataBoxJobStage() { + DelayInformation = new ChangeTrackingList(); } /// Initializes a new instance of . @@ -56,14 +57,16 @@ internal DataBoxJobStage() /// Status of the job stage. /// Time for the job stage in UTC ISO 8601 format. /// Job Stage Details. + /// Delay information for the job stages. /// Keeps track of any properties unknown to the library. - internal DataBoxJobStage(DataBoxStageName? stageName, string displayName, DataBoxStageStatus? stageStatus, DateTimeOffset? stageTime, BinaryData jobStageDetails, IDictionary serializedAdditionalRawData) + internal DataBoxJobStage(DataBoxStageName? stageName, string displayName, DataBoxStageStatus? stageStatus, DateTimeOffset? stageTime, BinaryData jobStageDetails, IReadOnlyList delayInformation, IDictionary serializedAdditionalRawData) { StageName = stageName; DisplayName = displayName; StageStatus = stageStatus; StageTime = stageTime; JobStageDetails = jobStageDetails; + DelayInformation = delayInformation; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -104,5 +107,7 @@ internal DataBoxJobStage(DataBoxStageName? stageName, string displayName, DataBo /// /// public BinaryData JobStageDetails { get; } + /// Delay information for the job stages. + public IReadOnlyList DelayInformation { get; } } } diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxScheduleAvailabilityContent.Serialization.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxScheduleAvailabilityContent.Serialization.cs index d497d1c73d78..67bfd533640d 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxScheduleAvailabilityContent.Serialization.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxScheduleAvailabilityContent.Serialization.cs @@ -60,6 +60,7 @@ internal static DataBoxScheduleAvailabilityContent DeserializeDataBoxScheduleAva AzureLocation storageLocation = default; DataBoxSkuName skuName = default; string country = default; + ModelName? model = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -79,13 +80,22 @@ internal static DataBoxScheduleAvailabilityContent DeserializeDataBoxScheduleAva country = property.Value.GetString(); continue; } + if (property.NameEquals("model"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + model = property.Value.GetString().ToModelName(); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new DataBoxScheduleAvailabilityContent(storageLocation, skuName, country, serializedAdditionalRawData); + return new DataBoxScheduleAvailabilityContent(storageLocation, skuName, country, model, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxScheduleAvailabilityContent.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxScheduleAvailabilityContent.cs index 65379ac2c6dc..0b8ed10da99e 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxScheduleAvailabilityContent.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxScheduleAvailabilityContent.cs @@ -25,8 +25,9 @@ public DataBoxScheduleAvailabilityContent(AzureLocation storageLocation) : base( /// Location for data transfer. For locations check: https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. /// Sku Name for which the order is to be scheduled. /// Country in which storage location should be supported. + /// The customer friendly name of the combination of version and capacity of the device. This field is necessary only at the time of ordering the newer generation device i.e. AzureDataBox120 and AzureDataBox525 as of Feb/2025. /// Keeps track of any properties unknown to the library. - internal DataBoxScheduleAvailabilityContent(AzureLocation storageLocation, DataBoxSkuName skuName, string country, IDictionary serializedAdditionalRawData) : base(storageLocation, skuName, country, serializedAdditionalRawData) + internal DataBoxScheduleAvailabilityContent(AzureLocation storageLocation, DataBoxSkuName skuName, string country, ModelName? model, IDictionary serializedAdditionalRawData) : base(storageLocation, skuName, country, model, serializedAdditionalRawData) { SkuName = skuName; } diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxShippingAddress.Serialization.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxShippingAddress.Serialization.cs index 38b64e537f1b..1905859975eb 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxShippingAddress.Serialization.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxShippingAddress.Serialization.cs @@ -58,8 +58,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("country"u8); writer.WriteStringValue(Country); - writer.WritePropertyName("postalCode"u8); - writer.WriteStringValue(PostalCode); + if (Optional.IsDefined(PostalCode)) + { + writer.WritePropertyName("postalCode"u8); + writer.WriteStringValue(PostalCode); + } if (Optional.IsDefined(ZipExtendedCode)) { writer.WritePropertyName("zipExtendedCode"u8); diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxShippingAddress.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxShippingAddress.cs index 0d267fabf8c9..f7fa51c651c0 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxShippingAddress.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxShippingAddress.cs @@ -48,17 +48,14 @@ public partial class DataBoxShippingAddress /// Initializes a new instance of . /// Street Address line 1. /// Name of the Country. - /// Postal code. - /// , or is null. - public DataBoxShippingAddress(string streetAddress1, string country, string postalCode) + /// or is null. + public DataBoxShippingAddress(string streetAddress1, string country) { Argument.AssertNotNull(streetAddress1, nameof(streetAddress1)); Argument.AssertNotNull(country, nameof(country)); - Argument.AssertNotNull(postalCode, nameof(postalCode)); StreetAddress1 = streetAddress1; Country = country; - PostalCode = postalCode; } /// Initializes a new instance of . diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxSku.Serialization.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxSku.Serialization.cs index cd244e3587ef..5e9fe330fe49 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxSku.Serialization.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxSku.Serialization.cs @@ -46,6 +46,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("family"u8); writer.WriteStringValue(Family); } + if (Optional.IsDefined(Model)) + { + writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model.Value.ToSerialString()); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -86,6 +91,7 @@ internal static DataBoxSku DeserializeDataBoxSku(JsonElement element, ModelReade DataBoxSkuName name = default; string displayName = default; string family = default; + ModelName? model = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -105,13 +111,22 @@ internal static DataBoxSku DeserializeDataBoxSku(JsonElement element, ModelReade family = property.Value.GetString(); continue; } + if (property.NameEquals("model"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + model = property.Value.GetString().ToModelName(); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new DataBoxSku(name, displayName, family, serializedAdditionalRawData); + return new DataBoxSku(name, displayName, family, model, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxSku.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxSku.cs index d3be63bbe763..a0dd221e53cd 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxSku.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxSku.cs @@ -56,12 +56,14 @@ public DataBoxSku(DataBoxSkuName name) /// The sku name. /// The display name of the sku. /// The sku family. + /// The customer friendly name of the combination of version and capacity of the device. This field is necessary only at the time of ordering the newer generation device i.e. AzureDataBox120 and AzureDataBox525 as of Feb/2025. /// Keeps track of any properties unknown to the library. - internal DataBoxSku(DataBoxSkuName name, string displayName, string family, IDictionary serializedAdditionalRawData) + internal DataBoxSku(DataBoxSkuName name, string displayName, string family, ModelName? model, IDictionary serializedAdditionalRawData) { Name = name; DisplayName = displayName; Family = family; + Model = model; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -76,5 +78,7 @@ internal DataBoxSku() public string DisplayName { get; set; } /// The sku family. public string Family { get; set; } + /// The customer friendly name of the combination of version and capacity of the device. This field is necessary only at the time of ordering the newer generation device i.e. AzureDataBox120 and AzureDataBox525 as of Feb/2025. + public ModelName? Model { get; set; } } } diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxSkuCapacity.Serialization.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxSkuCapacity.Serialization.cs index 7ae0b7749885..95ef477fa804 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxSkuCapacity.Serialization.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxSkuCapacity.Serialization.cs @@ -44,6 +44,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("maximum"u8); writer.WriteStringValue(Maximum); } + if (options.Format != "W" && Optional.IsDefined(IndividualSkuUsable)) + { + writer.WritePropertyName("individualSkuUsable"u8); + writer.WriteStringValue(IndividualSkuUsable); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -83,6 +88,7 @@ internal static DataBoxSkuCapacity DeserializeDataBoxSkuCapacity(JsonElement ele } string usable = default; string maximum = default; + string individualSkuUsable = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -97,13 +103,18 @@ internal static DataBoxSkuCapacity DeserializeDataBoxSkuCapacity(JsonElement ele maximum = property.Value.GetString(); continue; } + if (property.NameEquals("individualSkuUsable"u8)) + { + individualSkuUsable = property.Value.GetString(); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new DataBoxSkuCapacity(usable, maximum, serializedAdditionalRawData); + return new DataBoxSkuCapacity(usable, maximum, individualSkuUsable, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxSkuCapacity.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxSkuCapacity.cs index 26df75a1d194..f515f172c881 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxSkuCapacity.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxSkuCapacity.cs @@ -53,11 +53,13 @@ internal DataBoxSkuCapacity() /// Initializes a new instance of . /// Usable capacity in TB. /// Maximum capacity in TB. + /// Maximum capacity per device in TB. /// Keeps track of any properties unknown to the library. - internal DataBoxSkuCapacity(string usable, string maximum, IDictionary serializedAdditionalRawData) + internal DataBoxSkuCapacity(string usable, string maximum, string individualSkuUsable, IDictionary serializedAdditionalRawData) { Usable = usable; Maximum = maximum; + IndividualSkuUsable = individualSkuUsable; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -65,5 +67,7 @@ internal DataBoxSkuCapacity(string usable, string maximum, IDictionary Maximum capacity in TB. public string Maximum { get; } + /// Maximum capacity per device in TB. + public string IndividualSkuUsable { get; } } } diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxValidateAddressContent.Serialization.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxValidateAddressContent.Serialization.cs index c0ab8dbc6fa9..1d6d801e7afd 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxValidateAddressContent.Serialization.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxValidateAddressContent.Serialization.cs @@ -44,6 +44,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("transportPreferences"u8); writer.WriteObjectValue(TransportPreferences, options); } + if (Optional.IsDefined(Model)) + { + writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model.Value.ToSerialString()); + } } DataBoxValidateAddressContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -69,6 +74,7 @@ internal static DataBoxValidateAddressContent DeserializeDataBoxValidateAddressC DataBoxShippingAddress shippingAddress = default; DataBoxSkuName deviceType = default; TransportPreferences transportPreferences = default; + ModelName? model = default; DataBoxValidationInputDiscriminator validationType = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -93,6 +99,15 @@ internal static DataBoxValidateAddressContent DeserializeDataBoxValidateAddressC transportPreferences = TransportPreferences.DeserializeTransportPreferences(property.Value, options); continue; } + if (property.NameEquals("model"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + model = property.Value.GetString().ToModelName(); + continue; + } if (property.NameEquals("validationType"u8)) { validationType = property.Value.GetString().ToDataBoxValidationInputDiscriminator(); @@ -104,7 +119,13 @@ internal static DataBoxValidateAddressContent DeserializeDataBoxValidateAddressC } } serializedAdditionalRawData = rawDataDictionary; - return new DataBoxValidateAddressContent(validationType, serializedAdditionalRawData, shippingAddress, deviceType, transportPreferences); + return new DataBoxValidateAddressContent( + validationType, + serializedAdditionalRawData, + shippingAddress, + deviceType, + transportPreferences, + model); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxValidateAddressContent.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxValidateAddressContent.cs index 2634a16faa72..50d0f44d5a53 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxValidateAddressContent.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxValidateAddressContent.cs @@ -32,11 +32,13 @@ public DataBoxValidateAddressContent(DataBoxShippingAddress shippingAddress, Dat /// Shipping address of the customer. /// Device type to be used for the job. /// Preferences related to the shipment logistics of the sku. - internal DataBoxValidateAddressContent(DataBoxValidationInputDiscriminator validationType, IDictionary serializedAdditionalRawData, DataBoxShippingAddress shippingAddress, DataBoxSkuName deviceType, TransportPreferences transportPreferences) : base(validationType, serializedAdditionalRawData) + /// The customer friendly name of the combination of version and capacity of the device. This field is necessary only at the time of ordering the newer generation device i.e. AzureDataBox120 and AzureDataBox525 as of Feb/2025. + internal DataBoxValidateAddressContent(DataBoxValidationInputDiscriminator validationType, IDictionary serializedAdditionalRawData, DataBoxShippingAddress shippingAddress, DataBoxSkuName deviceType, TransportPreferences transportPreferences, ModelName? model) : base(validationType, serializedAdditionalRawData) { ShippingAddress = shippingAddress; DeviceType = deviceType; TransportPreferences = transportPreferences; + Model = model; ValidationType = validationType; } @@ -51,5 +53,7 @@ internal DataBoxValidateAddressContent() public DataBoxSkuName DeviceType { get; } /// Preferences related to the shipment logistics of the sku. public TransportPreferences TransportPreferences { get; set; } + /// The customer friendly name of the combination of version and capacity of the device. This field is necessary only at the time of ordering the newer generation device i.e. AzureDataBox120 and AzureDataBox525 as of Feb/2025. + public ModelName? Model { get; set; } } } diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataCenterAddressContent.Serialization.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataCenterAddressContent.Serialization.cs index 434fa9a97853..2e7296c2d73b 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataCenterAddressContent.Serialization.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataCenterAddressContent.Serialization.cs @@ -38,6 +38,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(StorageLocation); writer.WritePropertyName("skuName"u8); writer.WriteStringValue(SkuName.ToSerialString()); + if (Optional.IsDefined(Model)) + { + writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model.Value.ToSerialString()); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -77,6 +82,7 @@ internal static DataCenterAddressContent DeserializeDataCenterAddressContent(Jso } AzureLocation storageLocation = default; DataBoxSkuName skuName = default; + ModelName? model = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -91,13 +97,22 @@ internal static DataCenterAddressContent DeserializeDataCenterAddressContent(Jso skuName = property.Value.GetString().ToDataBoxSkuName(); continue; } + if (property.NameEquals("model"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + model = property.Value.GetString().ToModelName(); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new DataCenterAddressContent(storageLocation, skuName, serializedAdditionalRawData); + return new DataCenterAddressContent(storageLocation, skuName, model, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataCenterAddressContent.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataCenterAddressContent.cs index 0db63c63f913..9b8a61d35ee0 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataCenterAddressContent.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataCenterAddressContent.cs @@ -58,11 +58,13 @@ public DataCenterAddressContent(AzureLocation storageLocation, DataBoxSkuName sk /// Initializes a new instance of . /// Storage location. For locations check: https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. /// Sku Name for which the data center address requested. + /// The customer friendly name of the combination of version and capacity of the device. This field is necessary only at the time of ordering the newer generation device i.e. AzureDataBox120 and AzureDataBox525 as of Feb/2025. /// Keeps track of any properties unknown to the library. - internal DataCenterAddressContent(AzureLocation storageLocation, DataBoxSkuName skuName, IDictionary serializedAdditionalRawData) + internal DataCenterAddressContent(AzureLocation storageLocation, DataBoxSkuName skuName, ModelName? model, IDictionary serializedAdditionalRawData) { StorageLocation = storageLocation; SkuName = skuName; + Model = model; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -75,5 +77,7 @@ internal DataCenterAddressContent() public AzureLocation StorageLocation { get; } /// Sku Name for which the data center address requested. public DataBoxSkuName SkuName { get; } + /// The customer friendly name of the combination of version and capacity of the device. This field is necessary only at the time of ordering the newer generation device i.e. AzureDataBox120 and AzureDataBox525 as of Feb/2025. + public ModelName? Model { get; set; } } } diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataCenterCode.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataCenterCode.cs index 503860785014..f0faf5b6fd65 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataCenterCode.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataCenterCode.cs @@ -81,6 +81,15 @@ public DataCenterCode(string value) private const string BN7Value = "BN7"; private const string SN6Value = "SN6"; private const string BJS20Value = "BJS20"; + private const string BL24Value = "BL24"; + private const string IdC5Value = "IDC5"; + private const string TYO23Value = "TYO23"; + private const string CPQ21Value = "CPQ21"; + private const string NTG20Value = "NTG20"; + private const string DXB23Value = "DXB23"; + private const string DSM11Value = "DSM11"; + private const string OSA23Value = "OSA23"; + private const string AMS25Value = "AMS25"; /// Invalid. public static DataCenterCode Invalid { get; } = new DataCenterCode(InvalidValue); @@ -200,6 +209,24 @@ public DataCenterCode(string value) public static DataCenterCode SN6 { get; } = new DataCenterCode(SN6Value); /// BJS20. public static DataCenterCode BJS20 { get; } = new DataCenterCode(BJS20Value); + /// BL24. + public static DataCenterCode BL24 { get; } = new DataCenterCode(BL24Value); + /// IDC5. + public static DataCenterCode IdC5 { get; } = new DataCenterCode(IdC5Value); + /// TYO23. + public static DataCenterCode TYO23 { get; } = new DataCenterCode(TYO23Value); + /// CPQ21. + public static DataCenterCode CPQ21 { get; } = new DataCenterCode(CPQ21Value); + /// NTG20. + public static DataCenterCode NTG20 { get; } = new DataCenterCode(NTG20Value); + /// DXB23. + public static DataCenterCode DXB23 { get; } = new DataCenterCode(DXB23Value); + /// DSM11. + public static DataCenterCode DSM11 { get; } = new DataCenterCode(DSM11Value); + /// OSA23. + public static DataCenterCode OSA23 { get; } = new DataCenterCode(OSA23Value); + /// AMS25. + public static DataCenterCode AMS25 { get; } = new DataCenterCode(AMS25Value); /// Determines if two values are the same. public static bool operator ==(DataCenterCode left, DataCenterCode right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataTransferDetailsValidationContent.Serialization.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataTransferDetailsValidationContent.Serialization.cs index 0f4979b6ce9c..d850efd36310 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataTransferDetailsValidationContent.Serialization.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataTransferDetailsValidationContent.Serialization.cs @@ -59,6 +59,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteStringValue(DeviceType.ToSerialString()); writer.WritePropertyName("transferType"u8); writer.WriteStringValue(TransferType.ToSerialString()); + if (Optional.IsDefined(Model)) + { + writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model.Value.ToSerialString()); + } } DataTransferDetailsValidationContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -85,6 +90,7 @@ internal static DataTransferDetailsValidationContent DeserializeDataTransferDeta IList dataImportDetails = default; DataBoxSkuName deviceType = default; DataBoxJobTransferType transferType = default; + ModelName? model = default; DataBoxValidationInputDiscriminator validationType = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -128,6 +134,15 @@ internal static DataTransferDetailsValidationContent DeserializeDataTransferDeta transferType = property.Value.GetString().ToDataBoxJobTransferType(); continue; } + if (property.NameEquals("model"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + model = property.Value.GetString().ToModelName(); + continue; + } if (property.NameEquals("validationType"u8)) { validationType = property.Value.GetString().ToDataBoxValidationInputDiscriminator(); @@ -145,7 +160,8 @@ internal static DataTransferDetailsValidationContent DeserializeDataTransferDeta dataExportDetails ?? new ChangeTrackingList(), dataImportDetails ?? new ChangeTrackingList(), deviceType, - transferType); + transferType, + model); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataTransferDetailsValidationContent.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataTransferDetailsValidationContent.cs index 6de59a9627ce..4cd7aafda561 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataTransferDetailsValidationContent.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataTransferDetailsValidationContent.cs @@ -32,12 +32,14 @@ public DataTransferDetailsValidationContent(DataBoxSkuName deviceType, DataBoxJo /// List of DataTransfer details to be used to import data to azure. /// Device type. /// Type of the transfer. - internal DataTransferDetailsValidationContent(DataBoxValidationInputDiscriminator validationType, IDictionary serializedAdditionalRawData, IList dataExportDetails, IList dataImportDetails, DataBoxSkuName deviceType, DataBoxJobTransferType transferType) : base(validationType, serializedAdditionalRawData) + /// The customer friendly name of the combination of version and capacity of the device. This field is necessary only at the time of ordering the newer generation device i.e. AzureDataBox120 and AzureDataBox525 as of Feb/2025. + internal DataTransferDetailsValidationContent(DataBoxValidationInputDiscriminator validationType, IDictionary serializedAdditionalRawData, IList dataExportDetails, IList dataImportDetails, DataBoxSkuName deviceType, DataBoxJobTransferType transferType, ModelName? model) : base(validationType, serializedAdditionalRawData) { DataExportDetails = dataExportDetails; DataImportDetails = dataImportDetails; DeviceType = deviceType; TransferType = transferType; + Model = model; ValidationType = validationType; } @@ -54,5 +56,7 @@ internal DataTransferDetailsValidationContent() public DataBoxSkuName DeviceType { get; } /// Type of the transfer. public DataBoxJobTransferType TransferType { get; } + /// The customer friendly name of the combination of version and capacity of the device. This field is necessary only at the time of ordering the newer generation device i.e. AzureDataBox120 and AzureDataBox525 as of Feb/2025. + public ModelName? Model { get; set; } } } diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DelayNotificationStatus.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DelayNotificationStatus.cs new file mode 100644 index 000000000000..0c96fa00f72f --- /dev/null +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DelayNotificationStatus.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.DataBox.Models +{ + /// Status of notification. + public readonly partial struct DelayNotificationStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DelayNotificationStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ActiveValue = "Active"; + private const string ResolvedValue = "Resolved"; + + /// Delay is still active. + public static DelayNotificationStatus Active { get; } = new DelayNotificationStatus(ActiveValue); + /// Delay has been resolved. + public static DelayNotificationStatus Resolved { get; } = new DelayNotificationStatus(ResolvedValue); + /// Determines if two values are the same. + public static bool operator ==(DelayNotificationStatus left, DelayNotificationStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DelayNotificationStatus left, DelayNotificationStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DelayNotificationStatus(string value) => new DelayNotificationStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DelayNotificationStatus other && Equals(other); + /// + public bool Equals(DelayNotificationStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DeviceCapabilityDetails.Serialization.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DeviceCapabilityDetails.Serialization.cs new file mode 100644 index 000000000000..ac4a48fed24b --- /dev/null +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DeviceCapabilityDetails.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DataBox.Models +{ + public partial class DeviceCapabilityDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeviceCapabilityDetails)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(HardwareEncryption)) + { + writer.WritePropertyName("hardwareEncryption"u8); + writer.WriteStringValue(HardwareEncryption.Value.ToSerialString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DeviceCapabilityDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeviceCapabilityDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeviceCapabilityDetails(document.RootElement, options); + } + + internal static DeviceCapabilityDetails DeserializeDeviceCapabilityDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + HardwareEncryption? hardwareEncryption = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("hardwareEncryption"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + hardwareEncryption = property.Value.GetString().ToHardwareEncryption(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DeviceCapabilityDetails(hardwareEncryption, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DeviceCapabilityDetails)} does not support writing '{options.Format}' format."); + } + } + + DeviceCapabilityDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDeviceCapabilityDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DeviceCapabilityDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DeviceCapabilityDetails.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DeviceCapabilityDetails.cs new file mode 100644 index 000000000000..27fe0bf1ea7d --- /dev/null +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DeviceCapabilityDetails.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DataBox.Models +{ + /// Device capability details for a given sku for a given region. + public partial class DeviceCapabilityDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal DeviceCapabilityDetails() + { + } + + /// Initializes a new instance of . + /// Hardware encryption support for a given sku for a given region. + /// Keeps track of any properties unknown to the library. + internal DeviceCapabilityDetails(HardwareEncryption? hardwareEncryption, IDictionary serializedAdditionalRawData) + { + HardwareEncryption = hardwareEncryption; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Hardware encryption support for a given sku for a given region. + public HardwareEncryption? HardwareEncryption { get; } + } +} diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DeviceCapabilityRequest.Serialization.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DeviceCapabilityRequest.Serialization.cs new file mode 100644 index 000000000000..e2c04a4c1e3b --- /dev/null +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DeviceCapabilityRequest.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DataBox.Models +{ + public partial class DeviceCapabilityRequest : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeviceCapabilityRequest)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(SkuName)) + { + writer.WritePropertyName("skuName"u8); + writer.WriteStringValue(SkuName.Value.ToSerialString()); + } + if (Optional.IsDefined(Model)) + { + writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model.Value.ToSerialString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DeviceCapabilityRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeviceCapabilityRequest)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeviceCapabilityRequest(document.RootElement, options); + } + + internal static DeviceCapabilityRequest DeserializeDeviceCapabilityRequest(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DataBoxSkuName? skuName = default; + ModelName? model = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("skuName"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + skuName = property.Value.GetString().ToDataBoxSkuName(); + continue; + } + if (property.NameEquals("model"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + model = property.Value.GetString().ToModelName(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DeviceCapabilityRequest(skuName, model, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DeviceCapabilityRequest)} does not support writing '{options.Format}' format."); + } + } + + DeviceCapabilityRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDeviceCapabilityRequest(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DeviceCapabilityRequest)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DeviceCapabilityRequest.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DeviceCapabilityRequest.cs new file mode 100644 index 000000000000..a1c72b25303b --- /dev/null +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DeviceCapabilityRequest.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DataBox.Models +{ + /// Request body to get the device capabilities for given sku. + public partial class DeviceCapabilityRequest + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DeviceCapabilityRequest() + { + } + + /// Initializes a new instance of . + /// Type of the device. + /// The customer friendly name of the combination of version and capacity of the device. This field is necessary only at the time of ordering the newer generation device i.e. AzureDataBox120 and AzureDataBox525 as of Feb/2025. + /// Keeps track of any properties unknown to the library. + internal DeviceCapabilityRequest(DataBoxSkuName? skuName, ModelName? model, IDictionary serializedAdditionalRawData) + { + SkuName = skuName; + Model = model; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Type of the device. + public DataBoxSkuName? SkuName { get; set; } + /// The customer friendly name of the combination of version and capacity of the device. This field is necessary only at the time of ordering the newer generation device i.e. AzureDataBox120 and AzureDataBox525 as of Feb/2025. + public ModelName? Model { get; set; } + } +} diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DeviceCapabilityResponse.Serialization.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DeviceCapabilityResponse.Serialization.cs new file mode 100644 index 000000000000..5feac13d1b06 --- /dev/null +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DeviceCapabilityResponse.Serialization.cs @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DataBox.Models +{ + internal partial class DeviceCapabilityResponse : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeviceCapabilityResponse)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsCollectionDefined(DeviceCapabilityDetails)) + { + writer.WritePropertyName("deviceCapabilityDetails"u8); + writer.WriteStartArray(); + foreach (var item in DeviceCapabilityDetails) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DeviceCapabilityResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeviceCapabilityResponse)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeviceCapabilityResponse(document.RootElement, options); + } + + internal static DeviceCapabilityResponse DeserializeDeviceCapabilityResponse(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList deviceCapabilityDetails = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("deviceCapabilityDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Models.DeviceCapabilityDetails.DeserializeDeviceCapabilityDetails(item, options)); + } + deviceCapabilityDetails = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DeviceCapabilityResponse(deviceCapabilityDetails ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DeviceCapabilityResponse)} does not support writing '{options.Format}' format."); + } + } + + DeviceCapabilityResponse IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDeviceCapabilityResponse(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DeviceCapabilityResponse)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DeviceCapabilityResponse.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DeviceCapabilityResponse.cs new file mode 100644 index 000000000000..ce29981cea35 --- /dev/null +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DeviceCapabilityResponse.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DataBox.Models +{ + /// Device capabilities for given sku in a region. + internal partial class DeviceCapabilityResponse + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal DeviceCapabilityResponse() + { + DeviceCapabilityDetails = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// List of device capabilities available for a given region and a given sku. + /// Keeps track of any properties unknown to the library. + internal DeviceCapabilityResponse(IReadOnlyList deviceCapabilityDetails, IDictionary serializedAdditionalRawData) + { + DeviceCapabilityDetails = deviceCapabilityDetails; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// List of device capabilities available for a given region and a given sku. + public IReadOnlyList DeviceCapabilityDetails { get; } + } +} diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DiskScheduleAvailabilityContent.Serialization.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DiskScheduleAvailabilityContent.Serialization.cs index 22cd33a2ed1b..92e9b489e997 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DiskScheduleAvailabilityContent.Serialization.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DiskScheduleAvailabilityContent.Serialization.cs @@ -63,6 +63,7 @@ internal static DiskScheduleAvailabilityContent DeserializeDiskScheduleAvailabil AzureLocation storageLocation = default; DataBoxSkuName skuName = default; string country = default; + ModelName? model = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -87,13 +88,28 @@ internal static DiskScheduleAvailabilityContent DeserializeDiskScheduleAvailabil country = property.Value.GetString(); continue; } + if (property.NameEquals("model"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + model = property.Value.GetString().ToModelName(); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new DiskScheduleAvailabilityContent(storageLocation, skuName, country, serializedAdditionalRawData, expectedDataSizeInTerabytes); + return new DiskScheduleAvailabilityContent( + storageLocation, + skuName, + country, + model, + serializedAdditionalRawData, + expectedDataSizeInTerabytes); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DiskScheduleAvailabilityContent.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DiskScheduleAvailabilityContent.cs index 8c7b54f044a7..0526e50db265 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DiskScheduleAvailabilityContent.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DiskScheduleAvailabilityContent.cs @@ -27,9 +27,10 @@ public DiskScheduleAvailabilityContent(AzureLocation storageLocation, int expect /// Location for data transfer. For locations check: https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. /// Sku Name for which the order is to be scheduled. /// Country in which storage location should be supported. + /// The customer friendly name of the combination of version and capacity of the device. This field is necessary only at the time of ordering the newer generation device i.e. AzureDataBox120 and AzureDataBox525 as of Feb/2025. /// Keeps track of any properties unknown to the library. /// The expected size of the data, which needs to be transferred in this job, in terabytes. - internal DiskScheduleAvailabilityContent(AzureLocation storageLocation, DataBoxSkuName skuName, string country, IDictionary serializedAdditionalRawData, int expectedDataSizeInTerabytes) : base(storageLocation, skuName, country, serializedAdditionalRawData) + internal DiskScheduleAvailabilityContent(AzureLocation storageLocation, DataBoxSkuName skuName, string country, ModelName? model, IDictionary serializedAdditionalRawData, int expectedDataSizeInTerabytes) : base(storageLocation, skuName, country, model, serializedAdditionalRawData) { ExpectedDataSizeInTerabytes = expectedDataSizeInTerabytes; SkuName = skuName; diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/HardwareEncryption.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/HardwareEncryption.cs index 143e053825ea..c33298297010 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/HardwareEncryption.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/HardwareEncryption.cs @@ -7,12 +7,12 @@ namespace Azure.ResourceManager.DataBox.Models { - /// Defines Hardware level encryption (Only for disk). + /// Hardware encryption support for a given sku for a given region. public enum HardwareEncryption { /// Hardware-based encryption is enabled. Enabled, - /// Hardware-based encryption is enabled. + /// Hardware-based encryption is disabled. Disabled } } diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/HeavyScheduleAvailabilityContent.Serialization.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/HeavyScheduleAvailabilityContent.Serialization.cs index cd5cc41c7754..dde50c988b53 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/HeavyScheduleAvailabilityContent.Serialization.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/HeavyScheduleAvailabilityContent.Serialization.cs @@ -60,6 +60,7 @@ internal static HeavyScheduleAvailabilityContent DeserializeHeavyScheduleAvailab AzureLocation storageLocation = default; DataBoxSkuName skuName = default; string country = default; + ModelName? model = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -79,13 +80,22 @@ internal static HeavyScheduleAvailabilityContent DeserializeHeavyScheduleAvailab country = property.Value.GetString(); continue; } + if (property.NameEquals("model"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + model = property.Value.GetString().ToModelName(); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new HeavyScheduleAvailabilityContent(storageLocation, skuName, country, serializedAdditionalRawData); + return new HeavyScheduleAvailabilityContent(storageLocation, skuName, country, model, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/HeavyScheduleAvailabilityContent.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/HeavyScheduleAvailabilityContent.cs index 5d01d007513c..37c9a1c7ef94 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/HeavyScheduleAvailabilityContent.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/HeavyScheduleAvailabilityContent.cs @@ -25,8 +25,9 @@ public HeavyScheduleAvailabilityContent(AzureLocation storageLocation) : base(st /// Location for data transfer. For locations check: https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. /// Sku Name for which the order is to be scheduled. /// Country in which storage location should be supported. + /// The customer friendly name of the combination of version and capacity of the device. This field is necessary only at the time of ordering the newer generation device i.e. AzureDataBox120 and AzureDataBox525 as of Feb/2025. /// Keeps track of any properties unknown to the library. - internal HeavyScheduleAvailabilityContent(AzureLocation storageLocation, DataBoxSkuName skuName, string country, IDictionary serializedAdditionalRawData) : base(storageLocation, skuName, country, serializedAdditionalRawData) + internal HeavyScheduleAvailabilityContent(AzureLocation storageLocation, DataBoxSkuName skuName, string country, ModelName? model, IDictionary serializedAdditionalRawData) : base(storageLocation, skuName, country, model, serializedAdditionalRawData) { SkuName = skuName; } diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/JobDelayDetails.Serialization.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/JobDelayDetails.Serialization.cs new file mode 100644 index 000000000000..ed713588b8d5 --- /dev/null +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/JobDelayDetails.Serialization.cs @@ -0,0 +1,195 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DataBox.Models +{ + public partial class JobDelayDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(JobDelayDetails)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(ErrorCode)) + { + writer.WritePropertyName("errorCode"u8); + writer.WriteStringValue(ErrorCode.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (options.Format != "W" && Optional.IsDefined(StartOn)) + { + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(ResolutionOn)) + { + writer.WritePropertyName("resolutionTime"u8); + writer.WriteStringValue(ResolutionOn.Value, "O"); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + JobDelayDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(JobDelayDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeJobDelayDetails(document.RootElement, options); + } + + internal static JobDelayDetails DeserializeJobDelayDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DelayNotificationStatus? status = default; + PortalDelayErrorCode? errorCode = default; + string description = default; + DateTimeOffset? startTime = default; + DateTimeOffset? resolutionTime = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new DelayNotificationStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("errorCode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + errorCode = new PortalDelayErrorCode(property.Value.GetString()); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("startTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("resolutionTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resolutionTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new JobDelayDetails( + status, + errorCode, + description, + startTime, + resolutionTime, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(JobDelayDetails)} does not support writing '{options.Format}' format."); + } + } + + JobDelayDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeJobDelayDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(JobDelayDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/JobDelayDetails.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/JobDelayDetails.cs new file mode 100644 index 000000000000..2c492af3e425 --- /dev/null +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/JobDelayDetails.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DataBox.Models +{ + /// Job Delay Notification details. + public partial class JobDelayDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal JobDelayDetails() + { + } + + /// Initializes a new instance of . + /// Status of notification. + /// Delay Error code. + /// Description of the delay. + /// Timestamp when the delay notification was created. + /// Timestamp when the delay notification was resolved. + /// Keeps track of any properties unknown to the library. + internal JobDelayDetails(DelayNotificationStatus? status, PortalDelayErrorCode? errorCode, string description, DateTimeOffset? startOn, DateTimeOffset? resolutionOn, IDictionary serializedAdditionalRawData) + { + Status = status; + ErrorCode = errorCode; + Description = description; + StartOn = startOn; + ResolutionOn = resolutionOn; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Status of notification. + public DelayNotificationStatus? Status { get; } + /// Delay Error code. + public PortalDelayErrorCode? ErrorCode { get; } + /// Description of the delay. + public string Description { get; } + /// Timestamp when the delay notification was created. + public DateTimeOffset? StartOn { get; } + /// Timestamp when the delay notification was resolved. + public DateTimeOffset? ResolutionOn { get; } + } +} diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/ModelName.Serialization.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/ModelName.Serialization.cs new file mode 100644 index 000000000000..4caca7dd5375 --- /dev/null +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/ModelName.Serialization.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.DataBox.Models +{ + internal static partial class ModelNameExtensions + { + public static string ToSerialString(this ModelName value) => value switch + { + ModelName.DataBox => "DataBox", + ModelName.DataBoxDisk => "DataBoxDisk", + ModelName.DataBoxHeavy => "DataBoxHeavy", + ModelName.DataBoxCustomerDisk => "DataBoxCustomerDisk", + ModelName.AzureDataBox120 => "AzureDataBox120", + ModelName.AzureDataBox525 => "AzureDataBox525", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ModelName value.") + }; + + public static ModelName ToModelName(this string value) + { + if (StringComparer.OrdinalIgnoreCase.Equals(value, "DataBox")) return ModelName.DataBox; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "DataBoxDisk")) return ModelName.DataBoxDisk; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "DataBoxHeavy")) return ModelName.DataBoxHeavy; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "DataBoxCustomerDisk")) return ModelName.DataBoxCustomerDisk; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "AzureDataBox120")) return ModelName.AzureDataBox120; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "AzureDataBox525")) return ModelName.AzureDataBox525; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ModelName value."); + } + } +} diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/ModelName.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/ModelName.cs new file mode 100644 index 000000000000..429fd7d9aef9 --- /dev/null +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/ModelName.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.DataBox.Models +{ + /// The customer friendly name of the combination of version and capacity of the device. This field is necessary only at the time of ordering the newer generation device i.e. AzureDataBox120 and AzureDataBox525 as of Feb/2025. + public enum ModelName + { + /// Data Box. + DataBox, + /// Data Box Disk. + DataBoxDisk, + /// Data Box Heavy. + DataBoxHeavy, + /// Data Box Customer Disk. + DataBoxCustomerDisk, + /// Data Box V2 with 125TB usable capacity. + AzureDataBox120, + /// Data Box V2 with 500TB usable capacity. + AzureDataBox525 + } +} diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/PortalDelayErrorCode.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/PortalDelayErrorCode.cs new file mode 100644 index 000000000000..8273282d0e0f --- /dev/null +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/PortalDelayErrorCode.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.DataBox.Models +{ + /// Delay Error code. + public readonly partial struct PortalDelayErrorCode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PortalDelayErrorCode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string InternalIssueDelayValue = "InternalIssueDelay"; + private const string ActiveOrderLimitBreachedDelayValue = "ActiveOrderLimitBreachedDelay"; + private const string HighDemandDelayValue = "HighDemandDelay"; + private const string LargeNumberOfFilesDelayValue = "LargeNumberOfFilesDelay"; + + /// Delay due to any internal reasons. + public static PortalDelayErrorCode InternalIssueDelay { get; } = new PortalDelayErrorCode(InternalIssueDelayValue); + /// Active Order limit breached. + public static PortalDelayErrorCode ActiveOrderLimitBreachedDelay { get; } = new PortalDelayErrorCode(ActiveOrderLimitBreachedDelayValue); + /// High demand. + public static PortalDelayErrorCode HighDemandDelay { get; } = new PortalDelayErrorCode(HighDemandDelayValue); + /// Slow copy due to large number of files. + public static PortalDelayErrorCode LargeNumberOfFilesDelay { get; } = new PortalDelayErrorCode(LargeNumberOfFilesDelayValue); + /// Determines if two values are the same. + public static bool operator ==(PortalDelayErrorCode left, PortalDelayErrorCode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PortalDelayErrorCode left, PortalDelayErrorCode right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator PortalDelayErrorCode(string value) => new PortalDelayErrorCode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PortalDelayErrorCode other && Equals(other); + /// + public bool Equals(PortalDelayErrorCode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/PreferencesValidationContent.Serialization.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/PreferencesValidationContent.Serialization.cs index 8eae6a28ff39..8655202776fc 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/PreferencesValidationContent.Serialization.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/PreferencesValidationContent.Serialization.cs @@ -42,6 +42,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } writer.WritePropertyName("deviceType"u8); writer.WriteStringValue(DeviceType.ToSerialString()); + if (Optional.IsDefined(Model)) + { + writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model.Value.ToSerialString()); + } } PreferencesValidationContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -66,6 +71,7 @@ internal static PreferencesValidationContent DeserializePreferencesValidationCon } DataBoxOrderPreferences preference = default; DataBoxSkuName deviceType = default; + ModelName? model = default; DataBoxValidationInputDiscriminator validationType = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -85,6 +91,15 @@ internal static PreferencesValidationContent DeserializePreferencesValidationCon deviceType = property.Value.GetString().ToDataBoxSkuName(); continue; } + if (property.NameEquals("model"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + model = property.Value.GetString().ToModelName(); + continue; + } if (property.NameEquals("validationType"u8)) { validationType = property.Value.GetString().ToDataBoxValidationInputDiscriminator(); @@ -96,7 +111,7 @@ internal static PreferencesValidationContent DeserializePreferencesValidationCon } } serializedAdditionalRawData = rawDataDictionary; - return new PreferencesValidationContent(validationType, serializedAdditionalRawData, preference, deviceType); + return new PreferencesValidationContent(validationType, serializedAdditionalRawData, preference, deviceType, model); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/PreferencesValidationContent.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/PreferencesValidationContent.cs index 4ce667f07456..39fb22e110d6 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/PreferencesValidationContent.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/PreferencesValidationContent.cs @@ -26,10 +26,12 @@ public PreferencesValidationContent(DataBoxSkuName deviceType) /// Keeps track of any properties unknown to the library. /// Preference of transport and data center. /// Device type to be used for the job. - internal PreferencesValidationContent(DataBoxValidationInputDiscriminator validationType, IDictionary serializedAdditionalRawData, DataBoxOrderPreferences preference, DataBoxSkuName deviceType) : base(validationType, serializedAdditionalRawData) + /// The customer friendly name of the combination of version and capacity of the device. This field is necessary only at the time of ordering the newer generation device i.e. AzureDataBox120 and AzureDataBox525 as of Feb/2025. + internal PreferencesValidationContent(DataBoxValidationInputDiscriminator validationType, IDictionary serializedAdditionalRawData, DataBoxOrderPreferences preference, DataBoxSkuName deviceType, ModelName? model) : base(validationType, serializedAdditionalRawData) { Preference = preference; DeviceType = deviceType; + Model = model; ValidationType = validationType; } @@ -42,5 +44,7 @@ internal PreferencesValidationContent() public DataBoxOrderPreferences Preference { get; set; } /// Device type to be used for the job. public DataBoxSkuName DeviceType { get; } + /// The customer friendly name of the combination of version and capacity of the device. This field is necessary only at the time of ordering the newer generation device i.e. AzureDataBox120 and AzureDataBox525 as of Feb/2025. + public ModelName? Model { get; set; } } } diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/RegionConfigurationContent.Serialization.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/RegionConfigurationContent.Serialization.cs index 601139acd33b..e5bc9a4ee05b 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/RegionConfigurationContent.Serialization.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/RegionConfigurationContent.Serialization.cs @@ -49,6 +49,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("datacenterAddressRequest"u8); writer.WriteObjectValue(DataCenterAddressRequest, options); } + if (Optional.IsDefined(DeviceCapabilityRequest)) + { + writer.WritePropertyName("deviceCapabilityRequest"u8); + writer.WriteObjectValue(DeviceCapabilityRequest, options); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -89,6 +94,7 @@ internal static RegionConfigurationContent DeserializeRegionConfigurationContent ScheduleAvailabilityContent scheduleAvailabilityRequest = default; TransportAvailabilityRequest transportAvailabilityRequest = default; DataCenterAddressContent dataCenterAddressRequest = default; + DeviceCapabilityRequest deviceCapabilityRequest = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -120,13 +126,22 @@ internal static RegionConfigurationContent DeserializeRegionConfigurationContent dataCenterAddressRequest = DataCenterAddressContent.DeserializeDataCenterAddressContent(property.Value, options); continue; } + if (property.NameEquals("deviceCapabilityRequest"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + deviceCapabilityRequest = DeviceCapabilityRequest.DeserializeDeviceCapabilityRequest(property.Value, options); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new RegionConfigurationContent(scheduleAvailabilityRequest, transportAvailabilityRequest, dataCenterAddressRequest, serializedAdditionalRawData); + return new RegionConfigurationContent(scheduleAvailabilityRequest, transportAvailabilityRequest, dataCenterAddressRequest, deviceCapabilityRequest, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/RegionConfigurationContent.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/RegionConfigurationContent.cs index 178bc0f19c92..d5e2d9ba6ed7 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/RegionConfigurationContent.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/RegionConfigurationContent.cs @@ -58,12 +58,14 @@ public RegionConfigurationContent() /// /// Request body to get the transport availability for given sku. /// Request body to get the datacenter address for given sku. + /// Request body to get the device capabilities for a given sku. /// Keeps track of any properties unknown to the library. - internal RegionConfigurationContent(ScheduleAvailabilityContent scheduleAvailabilityRequest, TransportAvailabilityRequest transportAvailabilityRequest, DataCenterAddressContent dataCenterAddressRequest, IDictionary serializedAdditionalRawData) + internal RegionConfigurationContent(ScheduleAvailabilityContent scheduleAvailabilityRequest, TransportAvailabilityRequest transportAvailabilityRequest, DataCenterAddressContent dataCenterAddressRequest, DeviceCapabilityRequest deviceCapabilityRequest, IDictionary serializedAdditionalRawData) { ScheduleAvailabilityRequest = scheduleAvailabilityRequest; TransportAvailabilityRequest = transportAvailabilityRequest; DataCenterAddressRequest = dataCenterAddressRequest; + DeviceCapabilityRequest = deviceCapabilityRequest; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -74,20 +76,10 @@ internal RegionConfigurationContent(ScheduleAvailabilityContent scheduleAvailabi /// public ScheduleAvailabilityContent ScheduleAvailabilityRequest { get; set; } /// Request body to get the transport availability for given sku. - internal TransportAvailabilityRequest TransportAvailabilityRequest { get; set; } - /// Type of the device. - public DataBoxSkuName? TransportAvailabilityRequestSkuName - { - get => TransportAvailabilityRequest is null ? default : TransportAvailabilityRequest.SkuName; - set - { - if (TransportAvailabilityRequest is null) - TransportAvailabilityRequest = new TransportAvailabilityRequest(); - TransportAvailabilityRequest.SkuName = value; - } - } - + public TransportAvailabilityRequest TransportAvailabilityRequest { get; set; } /// Request body to get the datacenter address for given sku. public DataCenterAddressContent DataCenterAddressRequest { get; set; } + /// Request body to get the device capabilities for a given sku. + public DeviceCapabilityRequest DeviceCapabilityRequest { get; set; } } } diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/RegionConfigurationResult.Serialization.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/RegionConfigurationResult.Serialization.cs index 544d792140db..46243d19b783 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/RegionConfigurationResult.Serialization.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/RegionConfigurationResult.Serialization.cs @@ -49,6 +49,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("datacenterAddressResponse"u8); writer.WriteObjectValue(DataCenterAddressResponse, options); } + if (options.Format != "W" && Optional.IsDefined(DeviceCapabilityResponse)) + { + writer.WritePropertyName("deviceCapabilityResponse"u8); + writer.WriteObjectValue(DeviceCapabilityResponse, options); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -89,6 +94,7 @@ internal static RegionConfigurationResult DeserializeRegionConfigurationResult(J ScheduleAvailabilityResponse scheduleAvailabilityResponse = default; TransportAvailabilityResponse transportAvailabilityResponse = default; DataCenterAddressResult dataCenterAddressResponse = default; + DeviceCapabilityResponse deviceCapabilityResponse = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -120,13 +126,22 @@ internal static RegionConfigurationResult DeserializeRegionConfigurationResult(J dataCenterAddressResponse = DataCenterAddressResult.DeserializeDataCenterAddressResult(property.Value, options); continue; } + if (property.NameEquals("deviceCapabilityResponse"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + deviceCapabilityResponse = DeviceCapabilityResponse.DeserializeDeviceCapabilityResponse(property.Value, options); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new RegionConfigurationResult(scheduleAvailabilityResponse, transportAvailabilityResponse, dataCenterAddressResponse, serializedAdditionalRawData); + return new RegionConfigurationResult(scheduleAvailabilityResponse, transportAvailabilityResponse, dataCenterAddressResponse, deviceCapabilityResponse, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/RegionConfigurationResult.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/RegionConfigurationResult.cs index 0f54fc2577f0..3eaffda864f2 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/RegionConfigurationResult.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/RegionConfigurationResult.cs @@ -58,12 +58,14 @@ internal RegionConfigurationResult() /// 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 . /// + /// Device capabilities available for a given sku in a region. /// Keeps track of any properties unknown to the library. - internal RegionConfigurationResult(ScheduleAvailabilityResponse scheduleAvailabilityResponse, TransportAvailabilityResponse transportAvailabilityResponse, DataCenterAddressResult dataCenterAddressResponse, IDictionary serializedAdditionalRawData) + internal RegionConfigurationResult(ScheduleAvailabilityResponse scheduleAvailabilityResponse, TransportAvailabilityResponse transportAvailabilityResponse, DataCenterAddressResult dataCenterAddressResponse, DeviceCapabilityResponse deviceCapabilityResponse, IDictionary serializedAdditionalRawData) { ScheduleAvailabilityResponse = scheduleAvailabilityResponse; TransportAvailabilityResponse = transportAvailabilityResponse; DataCenterAddressResponse = dataCenterAddressResponse; + DeviceCapabilityResponse = deviceCapabilityResponse; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -89,5 +91,12 @@ public IReadOnlyList TransportAvailabilityDetails /// The available derived classes include and . /// public DataCenterAddressResult DataCenterAddressResponse { get; } + /// Device capabilities available for a given sku in a region. + internal DeviceCapabilityResponse DeviceCapabilityResponse { get; } + /// List of device capabilities available for a given region and a given sku. + public IReadOnlyList DeviceCapabilityDetails + { + get => DeviceCapabilityResponse?.DeviceCapabilityDetails; + } } } diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/ScheduleAvailabilityContent.Serialization.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/ScheduleAvailabilityContent.Serialization.cs index 9804bcb16882..0550c21dd621 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/ScheduleAvailabilityContent.Serialization.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/ScheduleAvailabilityContent.Serialization.cs @@ -43,6 +43,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("country"u8); writer.WriteStringValue(Country); } + if (Optional.IsDefined(Model)) + { + writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model.Value.ToSerialString()); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/ScheduleAvailabilityContent.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/ScheduleAvailabilityContent.cs index 9e27a7f5eeb7..82192537b90b 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/ScheduleAvailabilityContent.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/ScheduleAvailabilityContent.cs @@ -61,12 +61,14 @@ protected ScheduleAvailabilityContent(AzureLocation storageLocation) /// Location for data transfer. For locations check: https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. /// Sku Name for which the order is to be scheduled. /// Country in which storage location should be supported. + /// The customer friendly name of the combination of version and capacity of the device. This field is necessary only at the time of ordering the newer generation device i.e. AzureDataBox120 and AzureDataBox525 as of Feb/2025. /// Keeps track of any properties unknown to the library. - internal ScheduleAvailabilityContent(AzureLocation storageLocation, DataBoxSkuName skuName, string country, IDictionary serializedAdditionalRawData) + internal ScheduleAvailabilityContent(AzureLocation storageLocation, DataBoxSkuName skuName, string country, ModelName? model, IDictionary serializedAdditionalRawData) { StorageLocation = storageLocation; SkuName = skuName; Country = country; + Model = model; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -81,5 +83,7 @@ internal ScheduleAvailabilityContent() internal DataBoxSkuName SkuName { get; set; } /// Country in which storage location should be supported. public string Country { get; set; } + /// The customer friendly name of the combination of version and capacity of the device. This field is necessary only at the time of ordering the newer generation device i.e. AzureDataBox120 and AzureDataBox525 as of Feb/2025. + public ModelName? Model { get; set; } } } diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/SkuAvailabilityValidationContent.Serialization.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/SkuAvailabilityValidationContent.Serialization.cs index 70f90efd32e0..c710873267ae 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/SkuAvailabilityValidationContent.Serialization.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/SkuAvailabilityValidationContent.Serialization.cs @@ -43,6 +43,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteStringValue(Country); writer.WritePropertyName("location"u8); writer.WriteStringValue(Location); + if (Optional.IsDefined(Model)) + { + writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model.Value.ToSerialString()); + } } SkuAvailabilityValidationContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -69,6 +74,7 @@ internal static SkuAvailabilityValidationContent DeserializeSkuAvailabilityValid DataBoxJobTransferType transferType = default; string country = default; AzureLocation location = default; + ModelName? model = default; DataBoxValidationInputDiscriminator validationType = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -94,6 +100,15 @@ internal static SkuAvailabilityValidationContent DeserializeSkuAvailabilityValid location = new AzureLocation(property.Value.GetString()); continue; } + if (property.NameEquals("model"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + model = property.Value.GetString().ToModelName(); + continue; + } if (property.NameEquals("validationType"u8)) { validationType = property.Value.GetString().ToDataBoxValidationInputDiscriminator(); @@ -111,7 +126,8 @@ internal static SkuAvailabilityValidationContent DeserializeSkuAvailabilityValid deviceType, transferType, country, - location); + location, + model); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/SkuAvailabilityValidationContent.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/SkuAvailabilityValidationContent.cs index 465b6fbd8c3d..afce89b482c2 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/SkuAvailabilityValidationContent.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/SkuAvailabilityValidationContent.cs @@ -38,12 +38,14 @@ public SkuAvailabilityValidationContent(DataBoxSkuName deviceType, DataBoxJobTra /// Type of the transfer. /// ISO country code. Country for hardware shipment. For codes check: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements. /// Location for data transfer. For locations check: https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. - internal SkuAvailabilityValidationContent(DataBoxValidationInputDiscriminator validationType, IDictionary serializedAdditionalRawData, DataBoxSkuName deviceType, DataBoxJobTransferType transferType, string country, AzureLocation location) : base(validationType, serializedAdditionalRawData) + /// The customer friendly name of the combination of version and capacity of the device. This field is necessary only at the time of ordering the newer generation device i.e. AzureDataBox120 and AzureDataBox525 as of Feb/2025. + internal SkuAvailabilityValidationContent(DataBoxValidationInputDiscriminator validationType, IDictionary serializedAdditionalRawData, DataBoxSkuName deviceType, DataBoxJobTransferType transferType, string country, AzureLocation location, ModelName? model) : base(validationType, serializedAdditionalRawData) { DeviceType = deviceType; TransferType = transferType; Country = country; Location = location; + Model = model; ValidationType = validationType; } @@ -60,5 +62,7 @@ internal SkuAvailabilityValidationContent() public string Country { get; } /// Location for data transfer. For locations check: https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. public AzureLocation Location { get; } + /// The customer friendly name of the combination of version and capacity of the device. This field is necessary only at the time of ordering the newer generation device i.e. AzureDataBox120 and AzureDataBox525 as of Feb/2025. + public ModelName? Model { get; set; } } } diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/TransportAvailabilityRequest.Serialization.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/TransportAvailabilityRequest.Serialization.cs index 7aac459ed157..3f3d9b00749f 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/TransportAvailabilityRequest.Serialization.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/TransportAvailabilityRequest.Serialization.cs @@ -13,7 +13,7 @@ namespace Azure.ResourceManager.DataBox.Models { - internal partial class TransportAvailabilityRequest : IUtf8JsonSerializable, IJsonModel + public partial class TransportAvailabilityRequest : IUtf8JsonSerializable, IJsonModel { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); @@ -39,6 +39,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("skuName"u8); writer.WriteStringValue(SkuName.Value.ToSerialString()); } + if (Optional.IsDefined(Model)) + { + writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model.Value.ToSerialString()); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -77,6 +82,7 @@ internal static TransportAvailabilityRequest DeserializeTransportAvailabilityReq return null; } DataBoxSkuName? skuName = default; + ModelName? model = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -90,13 +96,22 @@ internal static TransportAvailabilityRequest DeserializeTransportAvailabilityReq skuName = property.Value.GetString().ToDataBoxSkuName(); continue; } + if (property.NameEquals("model"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + model = property.Value.GetString().ToModelName(); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new TransportAvailabilityRequest(skuName, serializedAdditionalRawData); + return new TransportAvailabilityRequest(skuName, model, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/TransportAvailabilityRequest.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/TransportAvailabilityRequest.cs index 9d4fb222b07e..b8106c88c912 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/TransportAvailabilityRequest.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/TransportAvailabilityRequest.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.DataBox.Models { /// Request body to get the transport availability for given sku. - internal partial class TransportAvailabilityRequest + public partial class TransportAvailabilityRequest { /// /// Keeps track of any properties unknown to the library. @@ -52,14 +52,18 @@ public TransportAvailabilityRequest() /// Initializes a new instance of . /// Type of the device. + /// The customer friendly name of the combination of version and capacity of the device. This field is necessary only at the time of ordering the newer generation device i.e. AzureDataBox120 and AzureDataBox525 as of Feb/2025. /// Keeps track of any properties unknown to the library. - internal TransportAvailabilityRequest(DataBoxSkuName? skuName, IDictionary serializedAdditionalRawData) + internal TransportAvailabilityRequest(DataBoxSkuName? skuName, ModelName? model, IDictionary serializedAdditionalRawData) { SkuName = skuName; + Model = model; _serializedAdditionalRawData = serializedAdditionalRawData; } /// Type of the device. public DataBoxSkuName? SkuName { get; set; } + /// The customer friendly name of the combination of version and capacity of the device. This field is necessary only at the time of ordering the newer generation device i.e. AzureDataBox120 and AzureDataBox525 as of Feb/2025. + public ModelName? Model { get; set; } } } diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/UnknownScheduleAvailabilityRequest.Serialization.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/UnknownScheduleAvailabilityRequest.Serialization.cs index c75efe48f663..25c2497549c4 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/UnknownScheduleAvailabilityRequest.Serialization.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/UnknownScheduleAvailabilityRequest.Serialization.cs @@ -60,6 +60,7 @@ internal static UnknownScheduleAvailabilityRequest DeserializeUnknownScheduleAva AzureLocation storageLocation = default; DataBoxSkuName skuName = default; string country = default; + ModelName? model = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -79,13 +80,22 @@ internal static UnknownScheduleAvailabilityRequest DeserializeUnknownScheduleAva country = property.Value.GetString(); continue; } + if (property.NameEquals("model"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + model = property.Value.GetString().ToModelName(); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new UnknownScheduleAvailabilityRequest(storageLocation, skuName, country, serializedAdditionalRawData); + return new UnknownScheduleAvailabilityRequest(storageLocation, skuName, country, model, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/UnknownScheduleAvailabilityRequest.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/UnknownScheduleAvailabilityRequest.cs index defc3d0d9f5c..6116c8636f8d 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/UnknownScheduleAvailabilityRequest.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/UnknownScheduleAvailabilityRequest.cs @@ -18,8 +18,9 @@ internal partial class UnknownScheduleAvailabilityRequest : ScheduleAvailability /// Location for data transfer. For locations check: https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. /// Sku Name for which the order is to be scheduled. /// Country in which storage location should be supported. + /// The customer friendly name of the combination of version and capacity of the device. This field is necessary only at the time of ordering the newer generation device i.e. AzureDataBox120 and AzureDataBox525 as of Feb/2025. /// Keeps track of any properties unknown to the library. - internal UnknownScheduleAvailabilityRequest(AzureLocation storageLocation, DataBoxSkuName skuName, string country, IDictionary serializedAdditionalRawData) : base(storageLocation, skuName, country, serializedAdditionalRawData) + internal UnknownScheduleAvailabilityRequest(AzureLocation storageLocation, DataBoxSkuName skuName, string country, ModelName? model, IDictionary serializedAdditionalRawData) : base(storageLocation, skuName, country, model, serializedAdditionalRawData) { SkuName = skuName; } diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/RestOperations/DataBoxManagementRestOperations.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/RestOperations/DataBoxManagementRestOperations.cs index 7ae30e8505fb..633da521e6eb 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/RestOperations/DataBoxManagementRestOperations.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/RestOperations/DataBoxManagementRestOperations.cs @@ -31,7 +31,7 @@ public DataBoxManagementRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-12-01"; + _apiVersion = apiVersion ?? "2025-02-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/RestOperations/JobsRestOperations.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/RestOperations/JobsRestOperations.cs index ffd8df4bef51..d78c7d146d43 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/RestOperations/JobsRestOperations.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/RestOperations/JobsRestOperations.cs @@ -32,7 +32,7 @@ public JobsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpo { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-12-01"; + _apiVersion = apiVersion ?? "2025-02-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/RestOperations/ServiceRestOperations.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/RestOperations/ServiceRestOperations.cs index a71917cda8fd..64dc2a5f64be 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/RestOperations/ServiceRestOperations.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/RestOperations/ServiceRestOperations.cs @@ -32,7 +32,7 @@ public ServiceRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-12-01"; + _apiVersion = apiVersion ?? "2025-02-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/autorest.md b/sdk/databox/Azure.ResourceManager.DataBox/src/autorest.md index c4b99e5a62c5..dcec85194ae7 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/autorest.md +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/autorest.md @@ -8,7 +8,7 @@ azure-arm: true csharp: true library-name: DataBox namespace: Azure.ResourceManager.DataBox -require: https://github.com/Azure/azure-rest-api-specs/blob/8e20af0463637085b47a018ec9c8372a2242bdac/specification/databox/resource-manager/readme.md +require: /mnt/vss/_work/1/s/azure-rest-api-specs/specification/databox/resource-manager/readme.md output-folder: $(this-folder)/Generated clear-output-folder: true sample-gen: diff --git a/sdk/resourcemanager/ci.mgmt.yml b/sdk/resourcemanager/ci.mgmt.yml index d8bf790b5988..f28c28a5d39c 100644 --- a/sdk/resourcemanager/ci.mgmt.yml +++ b/sdk/resourcemanager/ci.mgmt.yml @@ -79,7 +79,6 @@ trigger: - sdk/dnsresolver/Azure.ResourceManager.DnsResolver - sdk/dynatrace/Azure.ResourceManager.Dynatrace - sdk/edgeorder/Azure.ResourceManager.EdgeOrder - - sdk/iotoperations/Azure.ResourceManager.IotOperations - sdk/edgezones/Azure.ResourceManager.EdgeZones - sdk/elastic/Azure.ResourceManager.Elastic - sdk/elasticsan/Azure.ResourceManager.ElasticSan @@ -108,6 +107,7 @@ trigger: - sdk/iot/Azure.ResourceManager.IotFirmwareDefense - sdk/iotcentral/Azure.ResourceManager.IotCentral - sdk/iothub/Azure.ResourceManager.IotHub + - sdk/iotoperations/Azure.ResourceManager.IotOperations - sdk/keyvault/Azure.ResourceManager.KeyVault - sdk/kubernetesconfiguration/Azure.ResourceManager.KubernetesConfiguration - sdk/kusto/Azure.ResourceManager.Kusto @@ -285,7 +285,6 @@ pr: - sdk/dnsresolver/Azure.ResourceManager.DnsResolver - sdk/dynatrace/Azure.ResourceManager.Dynatrace - sdk/edgeorder/Azure.ResourceManager.EdgeOrder - - sdk/iotoperations/Azure.ResourceManager.IotOperations - sdk/edgezones/Azure.ResourceManager.EdgeZones - sdk/elastic/Azure.ResourceManager.Elastic - sdk/elasticsan/Azure.ResourceManager.ElasticSan @@ -314,6 +313,7 @@ pr: - sdk/iot/Azure.ResourceManager.IotFirmwareDefense - sdk/iotcentral/Azure.ResourceManager.IotCentral - sdk/iothub/Azure.ResourceManager.IotHub + - sdk/iotoperations/Azure.ResourceManager.IotOperations - sdk/keyvault/Azure.ResourceManager.KeyVault - sdk/kubernetesconfiguration/Azure.ResourceManager.KubernetesConfiguration - sdk/kusto/Azure.ResourceManager.Kusto