From 3abfc3f3d97b075f851ede5ab3b92c15b5a10d0b Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 10 Feb 2023 06:21:35 +0000 Subject: [PATCH] CodeGen from PR 22545 in Azure/azure-rest-api-specs Merge cacdc1c8e1916515e3ee4c6d5ba750d1c5cddcb9 into 0f11f8a9062efd957f6c343b53b8850522f8dde7 --- ....ResourceManager.DataBox.netstandard2.0.cs | 62 ++++++++++++++-- .../src/Generated/DataBoxJobData.cs | 10 ++- .../Models/ContactInfo.Serialization.cs | 67 +++++++++++++++++ .../src/Generated/Models/ContactInfo.cs | 51 +++++++++++++ .../DataBoxBasicJobDetails.Serialization.cs | 5 ++ .../Models/DataBoxBasicJobDetails.cs | 6 +- ...BoxCustomerDiskJobDetails.Serialization.cs | 18 ++++- .../Models/DataBoxCustomerDiskJobDetails.cs | 3 +- ...iskGranularCopyLogDetails.Serialization.cs | 58 +++++++++++++++ .../DataBoxDiskGranularCopyLogDetails.cs | 45 ++++++++++++ .../DataBoxDiskJobDetails.Serialization.cs | 34 ++++++++- .../Generated/Models/DataBoxDiskJobDetails.cs | 8 ++- .../DataBoxHeavyJobDetails.Serialization.cs | 18 ++++- .../Models/DataBoxHeavyJobDetails.cs | 3 +- .../Models/DataBoxJobData.Serialization.cs | 24 ++++++- .../Models/DataBoxJobDetails.Serialization.cs | 18 ++++- .../src/Generated/Models/DataBoxJobDetails.cs | 3 +- .../DataBoxOrderPreferences.Serialization.cs | 18 ++++- .../Models/DataBoxOrderPreferences.cs | 18 ++--- .../DataBoxSkuInformation.Serialization.cs | 18 ++++- .../Generated/Models/DataBoxSkuInformation.cs | 7 +- .../Models/DataBoxValidateAddressContent.cs | 11 +-- .../GranularCopyLogDetails.Serialization.cs | 26 +++++++ .../Models/GranularCopyLogDetails.cs | 32 +++++++++ .../MitigateJobContent.Serialization.cs | 18 ++++- .../Generated/Models/MitigateJobContent.cs | 12 ++-- .../ReverseShippingDetails.Serialization.cs | 72 +++++++++++++++++++ .../Models/ReverseShippingDetails.cs | 42 +++++++++++ ...ShippingDetailsEditStatus.Serialization.cs | 30 ++++++++ .../ReverseShippingDetailsEditStatus.cs | 20 ++++++ ...sportPreferenceEditStatus.Serialization.cs | 30 ++++++++ .../ReverseTransportPreferenceEditStatus.cs | 20 ++++++ .../TransportPreferences.Serialization.cs | 15 +++- .../Generated/Models/TransportPreferences.cs | 13 +++- ...ownGranularCopyLogDetails.Serialization.cs | 29 ++++++++ .../Models/UnknownGranularCopyLogDetails.cs | 20 ++++++ .../Models/UnknownJobDetails.Serialization.cs | 18 ++++- .../src/Generated/Models/UnknownJobDetails.cs | 3 +- .../Models/UpdateJobDetails.Serialization.cs | 10 +++ .../src/Generated/Models/UpdateJobDetails.cs | 4 ++ .../DataBoxManagementRestOperations.cs | 2 +- .../RestOperations/JobsRestOperations.cs | 2 +- .../RestOperations/ServiceRestOperations.cs | 2 +- .../src/autorest.md | 2 +- 44 files changed, 872 insertions(+), 55 deletions(-) create mode 100644 sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/ContactInfo.Serialization.cs create mode 100644 sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/ContactInfo.cs create mode 100644 sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxDiskGranularCopyLogDetails.Serialization.cs create mode 100644 sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxDiskGranularCopyLogDetails.cs create mode 100644 sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/GranularCopyLogDetails.Serialization.cs create mode 100644 sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/GranularCopyLogDetails.cs create mode 100644 sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/ReverseShippingDetails.Serialization.cs create mode 100644 sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/ReverseShippingDetails.cs create mode 100644 sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/ReverseShippingDetailsEditStatus.Serialization.cs create mode 100644 sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/ReverseShippingDetailsEditStatus.cs create mode 100644 sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/ReverseTransportPreferenceEditStatus.Serialization.cs create mode 100644 sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/ReverseTransportPreferenceEditStatus.cs create mode 100644 sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/UnknownGranularCopyLogDetails.Serialization.cs create mode 100644 sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/UnknownGranularCopyLogDetails.cs diff --git a/sdk/databox/Azure.ResourceManager.DataBox/api/Azure.ResourceManager.DataBox.netstandard2.0.cs b/sdk/databox/Azure.ResourceManager.DataBox/api/Azure.ResourceManager.DataBox.netstandard2.0.cs index 4b5506193720c..7cd14c3271f93 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/api/Azure.ResourceManager.DataBox.netstandard2.0.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/api/Azure.ResourceManager.DataBox.netstandard2.0.cs @@ -50,6 +50,8 @@ public DataBoxJobData(Azure.Core.AzureLocation location, Azure.ResourceManager.D public bool? IsDeletable { get { throw null; } } public bool? IsPrepareToShipEnabled { get { throw null; } } public bool? IsShippingAddressEditable { get { throw null; } } + public Azure.ResourceManager.DataBox.Models.ReverseShippingDetailsEditStatus? ReverseShippingDetailsUpdate { get { throw null; } } + public Azure.ResourceManager.DataBox.Models.ReverseTransportPreferenceEditStatus? ReverseTransportPreferenceUpdate { get { throw null; } } public Azure.ResourceManager.DataBox.Models.DataBoxSku Sku { get { throw null; } set { } } public System.DateTimeOffset? StartOn { get { throw null; } } public Azure.ResourceManager.DataBox.Models.DataBoxStageName? Status { get { throw null; } } @@ -135,6 +137,14 @@ public BlobFilterDetails() { } public System.Collections.Generic.IList BlobPrefixList { get { throw null; } } public System.Collections.Generic.IList ContainerList { get { throw null; } } } + public partial class ContactInfo + { + public ContactInfo(string contactName, string phone) { } + public string ContactName { get { throw null; } set { } } + public string Mobile { get { throw null; } set { } } + public string Phone { get { throw null; } set { } } + public string PhoneExtension { get { throw null; } set { } } + } public abstract partial class CopyLogDetails { protected CopyLogDetails() { } @@ -217,6 +227,7 @@ protected DataBoxBasicJobDetails(Azure.ResourceManager.DataBox.Models.DataBoxCon public Azure.ResourceManager.DataBox.Models.DataBoxOrderPreferences Preferences { get { throw null; } set { } } public Azure.ResourceManager.DataBox.Models.PackageShippingDetails ReturnPackage { get { throw null; } } public string ReverseShipmentLabelSasKey { get { throw null; } } + public Azure.ResourceManager.DataBox.Models.ReverseShippingDetails ReverseShippingDetails { get { throw null; } set { } } public Azure.ResourceManager.DataBox.Models.DataBoxShippingAddress ShippingAddress { get { throw null; } set { } } } public partial class DataBoxContactDetails @@ -320,6 +331,14 @@ internal DataBoxDiskCopyProgress() { } public string SerialNumber { get { throw null; } } public Azure.ResourceManager.DataBox.Models.DataBoxCopyStatus? Status { get { throw null; } } } + public partial class DataBoxDiskGranularCopyLogDetails : Azure.ResourceManager.DataBox.Models.GranularCopyLogDetails + { + internal DataBoxDiskGranularCopyLogDetails() { } + public Azure.Core.ResourceIdentifier AccountId { get { throw null; } } + public string ErrorLogLink { get { throw null; } } + public string SerialNumber { get { throw null; } } + public string VerboseLogLink { get { throw null; } } + } public partial class DataBoxDiskGranularCopyProgress : Azure.ResourceManager.DataBox.Models.GranularCopyProgress { internal DataBoxDiskGranularCopyProgress() { } @@ -331,6 +350,7 @@ public partial class DataBoxDiskJobDetails : Azure.ResourceManager.DataBox.Model public DataBoxDiskJobDetails(Azure.ResourceManager.DataBox.Models.DataBoxContactDetails contactDetails) : base (default(Azure.ResourceManager.DataBox.Models.DataBoxContactDetails)) { } public System.Collections.Generic.IReadOnlyList CopyProgress { get { throw null; } } public System.Collections.Generic.IReadOnlyDictionary DisksAndSizeDetails { get { throw null; } } + public System.Collections.Generic.IReadOnlyList GranularCopyLogDetails { get { throw null; } } public System.Collections.Generic.IReadOnlyList GranularCopyProgress { get { throw null; } } public string Passkey { get { throw null; } set { } } public System.Collections.Generic.IDictionary PreferredDisks { get { throw null; } } @@ -441,8 +461,9 @@ public partial class DataBoxOrderPreferences public DataBoxOrderPreferences() { } public Azure.ResourceManager.DataBox.Models.DataBoxDoubleEncryption? DoubleEncryption { get { throw null; } set { } } public System.Collections.Generic.IList PreferredDataCenterRegion { get { throw null; } } + public Azure.ResourceManager.DataBox.Models.TransportPreferences ReverseTransportPreferences { get { throw null; } set { } } public System.Collections.Generic.IList StorageAccountAccessTierPreferences { get { throw null; } } - public Azure.ResourceManager.DataBox.Models.TransportShipmentType? TransportPreferencesPreferredShipmentType { get { throw null; } set { } } + public Azure.ResourceManager.DataBox.Models.TransportPreferences TransportPreferences { get { throw null; } set { } } } public partial class DataBoxScheduleAvailabilityContent : Azure.ResourceManager.DataBox.Models.ScheduleAvailabilityContent { @@ -509,6 +530,7 @@ internal DataBoxSkuInformation() { } public System.Collections.Generic.IReadOnlyList ApiVersions { get { throw null; } } public Azure.ResourceManager.DataBox.Models.DataBoxSkuCapacity Capacity { get { throw null; } } public System.Collections.Generic.IReadOnlyList Costs { get { throw null; } } + public System.Collections.Generic.IReadOnlyList CountriesWithinCommerceBoundary { get { throw null; } } public System.Collections.Generic.IReadOnlyList DataLocationToServiceLocationMap { get { throw null; } } public Azure.ResourceManager.DataBox.Models.SkuDisabledReason? DisabledReason { get { throw null; } } public string DisabledReasonMessage { get { throw null; } } @@ -586,7 +608,7 @@ public partial class DataBoxValidateAddressContent : Azure.ResourceManager.DataB public DataBoxValidateAddressContent(Azure.ResourceManager.DataBox.Models.DataBoxShippingAddress shippingAddress, Azure.ResourceManager.DataBox.Models.DataBoxSkuName deviceType) { } public Azure.ResourceManager.DataBox.Models.DataBoxSkuName DeviceType { get { throw null; } } public Azure.ResourceManager.DataBox.Models.DataBoxShippingAddress ShippingAddress { get { throw null; } } - public Azure.ResourceManager.DataBox.Models.TransportShipmentType? TransportPreferencesPreferredShipmentType { get { throw null; } set { } } + public Azure.ResourceManager.DataBox.Models.TransportPreferences TransportPreferences { get { throw null; } set { } } } public abstract partial class DataBoxValidationContent { @@ -790,6 +812,10 @@ public enum FilterFileType AzureBlob = 0, AzureFile = 1, } + public abstract partial class GranularCopyLogDetails + { + protected GranularCopyLogDetails() { } + } public partial class GranularCopyProgress { internal GranularCopyProgress() { } @@ -857,8 +883,9 @@ public MarkDevicesShippedContent(Azure.ResourceManager.DataBox.Models.PackageCar } public partial class MitigateJobContent { - public MitigateJobContent(Azure.ResourceManager.DataBox.Models.CustomerResolutionCode customerResolutionCode) { } - public Azure.ResourceManager.DataBox.Models.CustomerResolutionCode CustomerResolutionCode { get { throw null; } } + public MitigateJobContent() { } + public Azure.ResourceManager.DataBox.Models.CustomerResolutionCode? CustomerResolutionCode { get { throw null; } set { } } + public System.Collections.Generic.IDictionary SerialNumberCustomerResolutionMap { get { throw null; } } } public partial class NotificationPreference { @@ -941,6 +968,25 @@ internal RegionConfigurationResult() { } public System.Collections.Generic.IReadOnlyList ScheduleAvailabilityResponseAvailableDates { get { throw null; } } public System.Collections.Generic.IReadOnlyList TransportAvailabilityDetails { get { throw null; } } } + public partial class ReverseShippingDetails + { + public ReverseShippingDetails() { } + public Azure.ResourceManager.DataBox.Models.ContactInfo ContactDetails { get { throw null; } set { } } + public bool? IsUpdated { get { throw null; } } + public Azure.ResourceManager.DataBox.Models.DataBoxShippingAddress ShippingAddress { get { throw null; } set { } } + } + public enum ReverseShippingDetailsEditStatus + { + Enabled = 0, + Disabled = 1, + NotSupported = 2, + } + public enum ReverseTransportPreferenceEditStatus + { + Enabled = 0, + Disabled = 1, + NotSupported = 2, + } public abstract partial class ScheduleAvailabilityContent { protected ScheduleAvailabilityContent(Azure.Core.AzureLocation storageLocation) { } @@ -1035,6 +1081,12 @@ public partial class TransportAvailabilityDetails internal TransportAvailabilityDetails() { } public Azure.ResourceManager.DataBox.Models.TransportShipmentType? ShipmentType { get { throw null; } } } + public partial class TransportPreferences + { + public TransportPreferences(Azure.ResourceManager.DataBox.Models.TransportShipmentType preferredShipmentType) { } + public bool? IsUpdated { get { throw null; } } + public Azure.ResourceManager.DataBox.Models.TransportShipmentType PreferredShipmentType { get { throw null; } set { } } + } public enum TransportShipmentType { CustomerManaged = 0, @@ -1051,7 +1103,9 @@ public partial class UpdateJobDetails public UpdateJobDetails() { } public Azure.ResourceManager.DataBox.Models.DataBoxContactDetails ContactDetails { get { throw null; } set { } } public Azure.ResourceManager.DataBox.Models.DataBoxKeyEncryptionKey KeyEncryptionKey { get { throw null; } set { } } + public Azure.ResourceManager.DataBox.Models.DataBoxOrderPreferences Preferences { get { throw null; } set { } } public Azure.ResourceManager.DataBox.Models.PackageCarrierDetails ReturnToCustomerPackageDetails { get { throw null; } set { } } + public Azure.ResourceManager.DataBox.Models.ReverseShippingDetails ReverseShippingDetails { get { throw null; } set { } } public Azure.ResourceManager.DataBox.Models.DataBoxShippingAddress ShippingAddress { get { throw null; } set { } } } } diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/DataBoxJobData.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/DataBoxJobData.cs index aa8940286c26b..21d01eb130654 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/DataBoxJobData.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/DataBoxJobData.cs @@ -41,6 +41,8 @@ public DataBoxJobData(AzureLocation location, DataBoxJobTransferType transferTyp /// 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. @@ -56,12 +58,14 @@ public DataBoxJobData(AzureLocation location, DataBoxJobTransferType transferTyp /// Flag to indicate cancellation of scheduled job. /// The sku type. /// Msi identity of the resource. - internal DataBoxJobData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, DataBoxJobTransferType transferType, bool? isCancellable, bool? isDeletable, bool? isShippingAddressEditable, bool? isPrepareToShipEnabled, DataBoxStageName? status, DateTimeOffset? startOn, ResponseError error, DataBoxBasicJobDetails details, string cancellationReason, JobDeliveryType? deliveryType, JobDeliveryInfo deliveryInfo, bool? isCancellableWithoutFee, DataBoxSku sku, ManagedServiceIdentity identity) : 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, DateTimeOffset? startOn, ResponseError error, DataBoxBasicJobDetails details, string cancellationReason, JobDeliveryType? deliveryType, JobDeliveryInfo deliveryInfo, bool? isCancellableWithoutFee, DataBoxSku sku, ManagedServiceIdentity identity) : base(id, name, resourceType, systemData, tags, location) { TransferType = transferType; IsCancellable = isCancellable; IsDeletable = isDeletable; IsShippingAddressEditable = isShippingAddressEditable; + ReverseShippingDetailsUpdate = reverseShippingDetailsUpdate; + ReverseTransportPreferenceUpdate = reverseTransportPreferenceUpdate; IsPrepareToShipEnabled = isPrepareToShipEnabled; Status = status; StartOn = startOn; @@ -83,6 +87,10 @@ internal DataBoxJobData(ResourceIdentifier id, string name, ResourceType resourc public bool? IsDeletable { get; } /// Describes whether the shipping address is editable or not. public bool? IsShippingAddressEditable { get; } + /// The Editable status for Reverse Shipping Address and Contact Info. + public ReverseShippingDetailsEditStatus? ReverseShippingDetailsUpdate { get; } + /// The Editable status for Reverse Transport preferences. + public ReverseTransportPreferenceEditStatus? ReverseTransportPreferenceUpdate { get; } /// Is Prepare To Ship Enabled on this job. public bool? IsPrepareToShipEnabled { get; } /// Name of the stage which is in progress. diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/ContactInfo.Serialization.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/ContactInfo.Serialization.cs new file mode 100644 index 0000000000000..1bf97dd71b46b --- /dev/null +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/ContactInfo.Serialization.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DataBox.Models +{ + public partial class ContactInfo : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("contactName"u8); + writer.WriteStringValue(ContactName); + writer.WritePropertyName("phone"u8); + writer.WriteStringValue(Phone); + if (Optional.IsDefined(PhoneExtension)) + { + writer.WritePropertyName("phoneExtension"u8); + writer.WriteStringValue(PhoneExtension); + } + if (Optional.IsDefined(Mobile)) + { + writer.WritePropertyName("mobile"u8); + writer.WriteStringValue(Mobile); + } + writer.WriteEndObject(); + } + + internal static ContactInfo DeserializeContactInfo(JsonElement element) + { + string contactName = default; + string phone = default; + Optional phoneExtension = default; + Optional mobile = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("contactName"u8)) + { + contactName = property.Value.GetString(); + continue; + } + if (property.NameEquals("phone"u8)) + { + phone = property.Value.GetString(); + continue; + } + if (property.NameEquals("phoneExtension"u8)) + { + phoneExtension = property.Value.GetString(); + continue; + } + if (property.NameEquals("mobile"u8)) + { + mobile = property.Value.GetString(); + continue; + } + } + return new ContactInfo(contactName, phone, phoneExtension.Value, mobile.Value); + } + } +} diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/ContactInfo.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/ContactInfo.cs new file mode 100644 index 0000000000000..6fcbfe9fcd493 --- /dev/null +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/ContactInfo.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.DataBox.Models +{ + /// Contact Info. + public partial class ContactInfo + { + /// Initializes a new instance of ContactInfo. + /// Contact name of the person. + /// Phone number of the contact person. + /// or is null. + public ContactInfo(string contactName, string phone) + { + Argument.AssertNotNull(contactName, nameof(contactName)); + Argument.AssertNotNull(phone, nameof(phone)); + + ContactName = contactName; + Phone = phone; + } + + /// Initializes a new instance of ContactInfo. + /// Contact name of the person. + /// Phone number of the contact person. + /// Phone extension number of the contact person. + /// Mobile number of the contact person. + internal ContactInfo(string contactName, string phone, string phoneExtension, string mobile) + { + ContactName = contactName; + Phone = phone; + PhoneExtension = phoneExtension; + Mobile = mobile; + } + + /// Contact name of the person. + public string ContactName { get; set; } + /// Phone number of the contact person. + public string Phone { get; set; } + /// Phone extension number of the contact person. + public string PhoneExtension { get; set; } + /// Mobile number of the contact person. + public string Mobile { get; set; } + } +} diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxBasicJobDetails.Serialization.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxBasicJobDetails.Serialization.cs index 95b0193ff3fba..1c7867aad3d90 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxBasicJobDetails.Serialization.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxBasicJobDetails.Serialization.cs @@ -49,6 +49,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("preferences"u8); writer.WriteObjectValue(Preferences); } + if (Optional.IsDefined(ReverseShippingDetails)) + { + writer.WritePropertyName("reverseShippingDetails"u8); + writer.WriteObjectValue(ReverseShippingDetails); + } if (Optional.IsDefined(KeyEncryptionKey)) { writer.WritePropertyName("keyEncryptionKey"u8); diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxBasicJobDetails.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxBasicJobDetails.cs index 185718302e649..c8a9e82931327 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxBasicJobDetails.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxBasicJobDetails.cs @@ -43,6 +43,7 @@ protected DataBoxBasicJobDetails(DataBoxContactDetails contactDetails) /// Details of the data to be exported from azure. /// Indicates the type of job details. /// Preferences for the order. + /// Optional Reverse Shipping details for order. /// /// List of copy log details. /// 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. @@ -61,7 +62,7 @@ protected DataBoxBasicJobDetails(DataBoxContactDetails contactDetails) /// The available derived classes include and . /// /// DataCenter code. - internal DataBoxBasicJobDetails(IReadOnlyList jobStages, DataBoxContactDetails contactDetails, DataBoxShippingAddress shippingAddress, PackageShippingDetails deliveryPackage, PackageShippingDetails returnPackage, IList dataImportDetails, IList dataExportDetails, DataBoxOrderType jobDetailsType, DataBoxOrderPreferences preferences, IReadOnlyList copyLogDetails, string reverseShipmentLabelSasKey, string chainOfCustodySasKey, DeviceErasureDetails deviceErasureDetails, DataBoxKeyEncryptionKey keyEncryptionKey, int? expectedDataSizeInTerabytes, IReadOnlyList actions, LastMitigationActionOnJob lastMitigationActionOnJob, DataCenterAddressResult dataCenterAddress, DataCenterCode? dataCenterCode) + internal DataBoxBasicJobDetails(IReadOnlyList jobStages, DataBoxContactDetails contactDetails, DataBoxShippingAddress shippingAddress, PackageShippingDetails deliveryPackage, PackageShippingDetails returnPackage, IList dataImportDetails, IList dataExportDetails, DataBoxOrderType jobDetailsType, DataBoxOrderPreferences preferences, ReverseShippingDetails reverseShippingDetails, IReadOnlyList copyLogDetails, string reverseShipmentLabelSasKey, string chainOfCustodySasKey, DeviceErasureDetails deviceErasureDetails, DataBoxKeyEncryptionKey keyEncryptionKey, int? expectedDataSizeInTerabytes, IReadOnlyList actions, LastMitigationActionOnJob lastMitigationActionOnJob, DataCenterAddressResult dataCenterAddress, DataCenterCode? dataCenterCode) { JobStages = jobStages; ContactDetails = contactDetails; @@ -72,6 +73,7 @@ internal DataBoxBasicJobDetails(IReadOnlyList jobStages, DataBo DataExportDetails = dataExportDetails; JobDetailsType = jobDetailsType; Preferences = preferences; + ReverseShippingDetails = reverseShippingDetails; CopyLogDetails = copyLogDetails; ReverseShipmentLabelSasKey = reverseShipmentLabelSasKey; ChainOfCustodySasKey = chainOfCustodySasKey; @@ -102,6 +104,8 @@ internal DataBoxBasicJobDetails(IReadOnlyList jobStages, DataBo internal DataBoxOrderType JobDetailsType { get; set; } /// Preferences for the order. public DataBoxOrderPreferences Preferences { get; set; } + /// Optional Reverse Shipping details for order. + public ReverseShippingDetails ReverseShippingDetails { get; set; } /// /// List of copy log details. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxCustomerDiskJobDetails.Serialization.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxCustomerDiskJobDetails.Serialization.cs index 6dd396c901f27..f29b50990622f 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxCustomerDiskJobDetails.Serialization.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxCustomerDiskJobDetails.Serialization.cs @@ -68,6 +68,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("preferences"u8); writer.WriteObjectValue(Preferences); } + if (Optional.IsDefined(ReverseShippingDetails)) + { + writer.WritePropertyName("reverseShippingDetails"u8); + writer.WriteObjectValue(ReverseShippingDetails); + } if (Optional.IsDefined(KeyEncryptionKey)) { writer.WritePropertyName("keyEncryptionKey"u8); @@ -98,6 +103,7 @@ internal static DataBoxCustomerDiskJobDetails DeserializeDataBoxCustomerDiskJobD Optional> dataExportDetails = default; DataBoxOrderType jobDetailsType = default; Optional preferences = default; + Optional reverseShippingDetails = default; Optional> copyLogDetails = default; Optional reverseShipmentLabelSasKey = default; Optional chainOfCustodySasKey = default; @@ -275,6 +281,16 @@ internal static DataBoxCustomerDiskJobDetails DeserializeDataBoxCustomerDiskJobD preferences = DataBoxOrderPreferences.DeserializeDataBoxOrderPreferences(property.Value); continue; } + if (property.NameEquals("reverseShippingDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + reverseShippingDetails = ReverseShippingDetails.DeserializeReverseShippingDetails(property.Value); + continue; + } if (property.NameEquals("copyLogDetails"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -376,7 +392,7 @@ internal static DataBoxCustomerDiskJobDetails DeserializeDataBoxCustomerDiskJobD continue; } } - return new DataBoxCustomerDiskJobDetails(Optional.ToList(jobStages), contactDetails, shippingAddress.Value, deliveryPackage.Value, returnPackage.Value, Optional.ToList(dataImportDetails), Optional.ToList(dataExportDetails), jobDetailsType, preferences.Value, Optional.ToList(copyLogDetails), reverseShipmentLabelSasKey.Value, chainOfCustodySasKey.Value, deviceErasureDetails.Value, keyEncryptionKey.Value, Optional.ToNullable(expectedDataSizeInTerabytes), Optional.ToList(actions), lastMitigationActionOnJob.Value, dataCenterAddress.Value, Optional.ToNullable(dataCenterCode), Optional.ToDictionary(importDiskDetailsCollection), Optional.ToDictionary(exportDiskDetailsCollection), Optional.ToList(copyProgress), deliverToDcPackageDetails.Value, returnToCustomerPackageDetails, Optional.ToNullable(enableManifestBackup)); + return new DataBoxCustomerDiskJobDetails(Optional.ToList(jobStages), contactDetails, shippingAddress.Value, deliveryPackage.Value, returnPackage.Value, Optional.ToList(dataImportDetails), Optional.ToList(dataExportDetails), jobDetailsType, preferences.Value, reverseShippingDetails.Value, Optional.ToList(copyLogDetails), reverseShipmentLabelSasKey.Value, chainOfCustodySasKey.Value, deviceErasureDetails.Value, keyEncryptionKey.Value, Optional.ToNullable(expectedDataSizeInTerabytes), Optional.ToList(actions), lastMitigationActionOnJob.Value, dataCenterAddress.Value, Optional.ToNullable(dataCenterCode), Optional.ToDictionary(importDiskDetailsCollection), Optional.ToDictionary(exportDiskDetailsCollection), Optional.ToList(copyProgress), deliverToDcPackageDetails.Value, returnToCustomerPackageDetails, Optional.ToNullable(enableManifestBackup)); } } } diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxCustomerDiskJobDetails.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxCustomerDiskJobDetails.cs index c241b74c57d4e..d63fd6fe81ce2 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxCustomerDiskJobDetails.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxCustomerDiskJobDetails.cs @@ -40,6 +40,7 @@ public DataBoxCustomerDiskJobDetails(DataBoxContactDetails contactDetails, Packa /// Details of the data to be exported from azure. /// Indicates the type of job details. /// Preferences for the order. + /// Optional Reverse Shipping details for order. /// /// List of copy log details. /// 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. @@ -64,7 +65,7 @@ public DataBoxCustomerDiskJobDetails(DataBoxContactDetails contactDetails, Packa /// Delivery package shipping details. /// Return package shipping details. /// Flag to indicate if disk manifest should be backed-up in the Storage Account. - internal DataBoxCustomerDiskJobDetails(IReadOnlyList jobStages, DataBoxContactDetails contactDetails, DataBoxShippingAddress shippingAddress, PackageShippingDetails deliveryPackage, PackageShippingDetails returnPackage, IList dataImportDetails, IList dataExportDetails, DataBoxOrderType jobDetailsType, DataBoxOrderPreferences preferences, IReadOnlyList copyLogDetails, string reverseShipmentLabelSasKey, string chainOfCustodySasKey, DeviceErasureDetails deviceErasureDetails, DataBoxKeyEncryptionKey keyEncryptionKey, int? expectedDataSizeInTerabytes, IReadOnlyList actions, LastMitigationActionOnJob lastMitigationActionOnJob, DataCenterAddressResult dataCenterAddress, DataCenterCode? dataCenterCode, IDictionary importDiskDetails, IReadOnlyDictionary exportDiskDetails, IReadOnlyList copyProgress, PackageCarrierInfo deliverToDataCenterPackageDetails, PackageCarrierDetails returnToCustomerPackageDetails, bool? enableManifestBackup) : base(jobStages, contactDetails, shippingAddress, deliveryPackage, returnPackage, dataImportDetails, dataExportDetails, jobDetailsType, preferences, copyLogDetails, reverseShipmentLabelSasKey, chainOfCustodySasKey, deviceErasureDetails, keyEncryptionKey, expectedDataSizeInTerabytes, actions, lastMitigationActionOnJob, dataCenterAddress, dataCenterCode) + internal DataBoxCustomerDiskJobDetails(IReadOnlyList jobStages, DataBoxContactDetails contactDetails, DataBoxShippingAddress shippingAddress, PackageShippingDetails deliveryPackage, PackageShippingDetails returnPackage, IList dataImportDetails, IList dataExportDetails, DataBoxOrderType jobDetailsType, DataBoxOrderPreferences preferences, ReverseShippingDetails reverseShippingDetails, IReadOnlyList copyLogDetails, string reverseShipmentLabelSasKey, string chainOfCustodySasKey, DeviceErasureDetails deviceErasureDetails, DataBoxKeyEncryptionKey keyEncryptionKey, int? expectedDataSizeInTerabytes, IReadOnlyList actions, LastMitigationActionOnJob lastMitigationActionOnJob, DataCenterAddressResult dataCenterAddress, DataCenterCode? dataCenterCode, IDictionary importDiskDetails, IReadOnlyDictionary exportDiskDetails, IReadOnlyList copyProgress, PackageCarrierInfo deliverToDataCenterPackageDetails, PackageCarrierDetails returnToCustomerPackageDetails, bool? enableManifestBackup) : base(jobStages, contactDetails, shippingAddress, deliveryPackage, returnPackage, dataImportDetails, dataExportDetails, jobDetailsType, preferences, reverseShippingDetails, copyLogDetails, reverseShipmentLabelSasKey, chainOfCustodySasKey, deviceErasureDetails, keyEncryptionKey, expectedDataSizeInTerabytes, actions, lastMitigationActionOnJob, dataCenterAddress, dataCenterCode) { ImportDiskDetails = importDiskDetails; ExportDiskDetails = exportDiskDetails; diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxDiskGranularCopyLogDetails.Serialization.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxDiskGranularCopyLogDetails.Serialization.cs new file mode 100644 index 0000000000000..f96866de6fb88 --- /dev/null +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxDiskGranularCopyLogDetails.Serialization.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DataBox.Models +{ + public partial class DataBoxDiskGranularCopyLogDetails + { + internal static DataBoxDiskGranularCopyLogDetails DeserializeDataBoxDiskGranularCopyLogDetails(JsonElement element) + { + Optional serialNumber = default; + Optional accountId = default; + Optional errorLogLink = default; + Optional verboseLogLink = default; + DataBoxOrderType copyLogDetailsType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("serialNumber"u8)) + { + serialNumber = property.Value.GetString(); + continue; + } + if (property.NameEquals("accountId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + accountId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("errorLogLink"u8)) + { + errorLogLink = property.Value.GetString(); + continue; + } + if (property.NameEquals("verboseLogLink"u8)) + { + verboseLogLink = property.Value.GetString(); + continue; + } + if (property.NameEquals("copyLogDetailsType"u8)) + { + copyLogDetailsType = property.Value.GetString().ToDataBoxOrderType(); + continue; + } + } + return new DataBoxDiskGranularCopyLogDetails(copyLogDetailsType, serialNumber.Value, accountId.Value, errorLogLink.Value, verboseLogLink.Value); + } + } +} diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxDiskGranularCopyLogDetails.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxDiskGranularCopyLogDetails.cs new file mode 100644 index 0000000000000..e1f0f77bfa307 --- /dev/null +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxDiskGranularCopyLogDetails.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.DataBox.Models +{ + /// Granular Copy Log Details for customer disk. + public partial class DataBoxDiskGranularCopyLogDetails : GranularCopyLogDetails + { + /// Initializes a new instance of DataBoxDiskGranularCopyLogDetails. + internal DataBoxDiskGranularCopyLogDetails() + { + CopyLogDetailsType = DataBoxOrderType.DataBoxCustomerDisk; + } + + /// Initializes a new instance of DataBoxDiskGranularCopyLogDetails. + /// Indicates the type of job details. + /// Disk Serial Number. + /// Account id. + /// Link for copy error logs. + /// Link for copy verbose logs. + internal DataBoxDiskGranularCopyLogDetails(DataBoxOrderType copyLogDetailsType, string serialNumber, ResourceIdentifier accountId, string errorLogLink, string verboseLogLink) : base(copyLogDetailsType) + { + SerialNumber = serialNumber; + AccountId = accountId; + ErrorLogLink = errorLogLink; + VerboseLogLink = verboseLogLink; + CopyLogDetailsType = copyLogDetailsType; + } + + /// Disk Serial Number. + public string SerialNumber { get; } + /// Account id. + public ResourceIdentifier AccountId { get; } + /// Link for copy error logs. + public string ErrorLogLink { get; } + /// Link for copy verbose logs. + public string VerboseLogLink { get; } + } +} diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxDiskJobDetails.Serialization.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxDiskJobDetails.Serialization.cs index dacd1c37c3a9e..a220489730557 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxDiskJobDetails.Serialization.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxDiskJobDetails.Serialization.cs @@ -66,6 +66,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("preferences"u8); writer.WriteObjectValue(Preferences); } + if (Optional.IsDefined(ReverseShippingDetails)) + { + writer.WritePropertyName("reverseShippingDetails"u8); + writer.WriteObjectValue(ReverseShippingDetails); + } if (Optional.IsDefined(KeyEncryptionKey)) { writer.WritePropertyName("keyEncryptionKey"u8); @@ -84,6 +89,7 @@ internal static DataBoxDiskJobDetails DeserializeDataBoxDiskJobDetails(JsonEleme Optional> preferredDisks = default; Optional> copyProgress = default; Optional> granularCopyProgress = default; + Optional> granularCopyLogDetails = default; Optional> disksAndSizeDetails = default; Optional passkey = default; Optional> jobStages = default; @@ -95,6 +101,7 @@ internal static DataBoxDiskJobDetails DeserializeDataBoxDiskJobDetails(JsonEleme Optional> dataExportDetails = default; DataBoxOrderType jobDetailsType = default; Optional preferences = default; + Optional reverseShippingDetails = default; Optional> copyLogDetails = default; Optional reverseShipmentLabelSasKey = default; Optional chainOfCustodySasKey = default; @@ -152,6 +159,21 @@ internal static DataBoxDiskJobDetails DeserializeDataBoxDiskJobDetails(JsonEleme granularCopyProgress = array; continue; } + if (property.NameEquals("granularCopyLogDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DataBoxDiskGranularCopyLogDetails.DeserializeDataBoxDiskGranularCopyLogDetails(item)); + } + granularCopyLogDetails = array; + continue; + } if (property.NameEquals("disksAndSizeDetails"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -267,6 +289,16 @@ internal static DataBoxDiskJobDetails DeserializeDataBoxDiskJobDetails(JsonEleme preferences = DataBoxOrderPreferences.DeserializeDataBoxOrderPreferences(property.Value); continue; } + if (property.NameEquals("reverseShippingDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + reverseShippingDetails = ReverseShippingDetails.DeserializeReverseShippingDetails(property.Value); + continue; + } if (property.NameEquals("copyLogDetails"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -368,7 +400,7 @@ internal static DataBoxDiskJobDetails DeserializeDataBoxDiskJobDetails(JsonEleme continue; } } - return new DataBoxDiskJobDetails(Optional.ToList(jobStages), contactDetails, shippingAddress.Value, deliveryPackage.Value, returnPackage.Value, Optional.ToList(dataImportDetails), Optional.ToList(dataExportDetails), jobDetailsType, preferences.Value, Optional.ToList(copyLogDetails), reverseShipmentLabelSasKey.Value, chainOfCustodySasKey.Value, deviceErasureDetails.Value, keyEncryptionKey.Value, Optional.ToNullable(expectedDataSizeInTerabytes), Optional.ToList(actions), lastMitigationActionOnJob.Value, dataCenterAddress.Value, Optional.ToNullable(dataCenterCode), Optional.ToDictionary(preferredDisks), Optional.ToList(copyProgress), Optional.ToList(granularCopyProgress), Optional.ToDictionary(disksAndSizeDetails), passkey.Value); + return new DataBoxDiskJobDetails(Optional.ToList(jobStages), contactDetails, shippingAddress.Value, deliveryPackage.Value, returnPackage.Value, Optional.ToList(dataImportDetails), Optional.ToList(dataExportDetails), jobDetailsType, preferences.Value, reverseShippingDetails.Value, Optional.ToList(copyLogDetails), reverseShipmentLabelSasKey.Value, chainOfCustodySasKey.Value, deviceErasureDetails.Value, keyEncryptionKey.Value, Optional.ToNullable(expectedDataSizeInTerabytes), Optional.ToList(actions), lastMitigationActionOnJob.Value, dataCenterAddress.Value, Optional.ToNullable(dataCenterCode), Optional.ToDictionary(preferredDisks), Optional.ToList(copyProgress), Optional.ToList(granularCopyProgress), Optional.ToList(granularCopyLogDetails), Optional.ToDictionary(disksAndSizeDetails), passkey.Value); } } } diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxDiskJobDetails.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxDiskJobDetails.cs index c065aa7594820..263752a0b2bc0 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxDiskJobDetails.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxDiskJobDetails.cs @@ -24,6 +24,7 @@ public DataBoxDiskJobDetails(DataBoxContactDetails contactDetails) : base(contac PreferredDisks = new ChangeTrackingDictionary(); CopyProgress = new ChangeTrackingList(); GranularCopyProgress = new ChangeTrackingList(); + GranularCopyLogDetails = new ChangeTrackingList(); DisksAndSizeDetails = new ChangeTrackingDictionary(); JobDetailsType = DataBoxOrderType.DataBoxDisk; } @@ -38,6 +39,7 @@ public DataBoxDiskJobDetails(DataBoxContactDetails contactDetails) : base(contac /// Details of the data to be exported from azure. /// Indicates the type of job details. /// Preferences for the order. + /// Optional Reverse Shipping details for order. /// /// List of copy log details. /// 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. @@ -59,13 +61,15 @@ public DataBoxDiskJobDetails(DataBoxContactDetails contactDetails) : base(contac /// User preference on what size disks are needed for the job. The map is from the disk size in TB to the count. Eg. {2,5} means 5 disks of 2 TB size. Key is string but will be checked against an int. /// Copy progress per disk. /// Copy progress per disk. + /// Copy progress per disk. /// Contains the map of disk serial number to the disk size being used for the job. Is returned only after the disks are shipped to the customer. /// User entered passkey for DataBox Disk job. - internal DataBoxDiskJobDetails(IReadOnlyList jobStages, DataBoxContactDetails contactDetails, DataBoxShippingAddress shippingAddress, PackageShippingDetails deliveryPackage, PackageShippingDetails returnPackage, IList dataImportDetails, IList dataExportDetails, DataBoxOrderType jobDetailsType, DataBoxOrderPreferences preferences, IReadOnlyList copyLogDetails, string reverseShipmentLabelSasKey, string chainOfCustodySasKey, DeviceErasureDetails deviceErasureDetails, DataBoxKeyEncryptionKey keyEncryptionKey, int? expectedDataSizeInTerabytes, IReadOnlyList actions, LastMitigationActionOnJob lastMitigationActionOnJob, DataCenterAddressResult dataCenterAddress, DataCenterCode? dataCenterCode, IDictionary preferredDisks, IReadOnlyList copyProgress, IReadOnlyList granularCopyProgress, IReadOnlyDictionary disksAndSizeDetails, string passkey) : base(jobStages, contactDetails, shippingAddress, deliveryPackage, returnPackage, dataImportDetails, dataExportDetails, jobDetailsType, preferences, copyLogDetails, reverseShipmentLabelSasKey, chainOfCustodySasKey, deviceErasureDetails, keyEncryptionKey, expectedDataSizeInTerabytes, actions, lastMitigationActionOnJob, dataCenterAddress, dataCenterCode) + internal DataBoxDiskJobDetails(IReadOnlyList jobStages, DataBoxContactDetails contactDetails, DataBoxShippingAddress shippingAddress, PackageShippingDetails deliveryPackage, PackageShippingDetails returnPackage, IList dataImportDetails, IList dataExportDetails, DataBoxOrderType jobDetailsType, DataBoxOrderPreferences preferences, ReverseShippingDetails reverseShippingDetails, IReadOnlyList copyLogDetails, string reverseShipmentLabelSasKey, string chainOfCustodySasKey, DeviceErasureDetails deviceErasureDetails, DataBoxKeyEncryptionKey keyEncryptionKey, int? expectedDataSizeInTerabytes, IReadOnlyList actions, LastMitigationActionOnJob lastMitigationActionOnJob, DataCenterAddressResult dataCenterAddress, DataCenterCode? dataCenterCode, IDictionary preferredDisks, IReadOnlyList copyProgress, IReadOnlyList granularCopyProgress, IReadOnlyList granularCopyLogDetails, IReadOnlyDictionary disksAndSizeDetails, string passkey) : base(jobStages, contactDetails, shippingAddress, deliveryPackage, returnPackage, dataImportDetails, dataExportDetails, jobDetailsType, preferences, reverseShippingDetails, copyLogDetails, reverseShipmentLabelSasKey, chainOfCustodySasKey, deviceErasureDetails, keyEncryptionKey, expectedDataSizeInTerabytes, actions, lastMitigationActionOnJob, dataCenterAddress, dataCenterCode) { PreferredDisks = preferredDisks; CopyProgress = copyProgress; GranularCopyProgress = granularCopyProgress; + GranularCopyLogDetails = granularCopyLogDetails; DisksAndSizeDetails = disksAndSizeDetails; Passkey = passkey; JobDetailsType = jobDetailsType; @@ -77,6 +81,8 @@ internal DataBoxDiskJobDetails(IReadOnlyList jobStages, DataBox public IReadOnlyList CopyProgress { get; } /// Copy progress per disk. public IReadOnlyList GranularCopyProgress { get; } + /// Copy progress per disk. + public IReadOnlyList GranularCopyLogDetails { get; } /// Contains the map of disk serial number to the disk size being used for the job. Is returned only after the disks are shipped to the customer. public IReadOnlyDictionary DisksAndSizeDetails { get; } /// User entered passkey for DataBox Disk job. diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxHeavyJobDetails.Serialization.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxHeavyJobDetails.Serialization.cs index 7947be03d6dd8..df1bfbdf3c8e8 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxHeavyJobDetails.Serialization.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxHeavyJobDetails.Serialization.cs @@ -55,6 +55,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("preferences"u8); writer.WriteObjectValue(Preferences); } + if (Optional.IsDefined(ReverseShippingDetails)) + { + writer.WritePropertyName("reverseShippingDetails"u8); + writer.WriteObjectValue(ReverseShippingDetails); + } if (Optional.IsDefined(KeyEncryptionKey)) { writer.WritePropertyName("keyEncryptionKey"u8); @@ -81,6 +86,7 @@ internal static DataBoxHeavyJobDetails DeserializeDataBoxHeavyJobDetails(JsonEle Optional> dataExportDetails = default; DataBoxOrderType jobDetailsType = default; Optional preferences = default; + Optional reverseShippingDetails = default; Optional> copyLogDetails = default; Optional reverseShipmentLabelSasKey = default; Optional chainOfCustodySasKey = default; @@ -208,6 +214,16 @@ internal static DataBoxHeavyJobDetails DeserializeDataBoxHeavyJobDetails(JsonEle preferences = DataBoxOrderPreferences.DeserializeDataBoxOrderPreferences(property.Value); continue; } + if (property.NameEquals("reverseShippingDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + reverseShippingDetails = ReverseShippingDetails.DeserializeReverseShippingDetails(property.Value); + continue; + } if (property.NameEquals("copyLogDetails"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -309,7 +325,7 @@ internal static DataBoxHeavyJobDetails DeserializeDataBoxHeavyJobDetails(JsonEle continue; } } - return new DataBoxHeavyJobDetails(Optional.ToList(jobStages), contactDetails, shippingAddress.Value, deliveryPackage.Value, returnPackage.Value, Optional.ToList(dataImportDetails), Optional.ToList(dataExportDetails), jobDetailsType, preferences.Value, Optional.ToList(copyLogDetails), reverseShipmentLabelSasKey.Value, chainOfCustodySasKey.Value, deviceErasureDetails.Value, keyEncryptionKey.Value, Optional.ToNullable(expectedDataSizeInTerabytes), Optional.ToList(actions), lastMitigationActionOnJob.Value, dataCenterAddress.Value, Optional.ToNullable(dataCenterCode), Optional.ToList(copyProgress), devicePassword.Value); + return new DataBoxHeavyJobDetails(Optional.ToList(jobStages), contactDetails, shippingAddress.Value, deliveryPackage.Value, returnPackage.Value, Optional.ToList(dataImportDetails), Optional.ToList(dataExportDetails), jobDetailsType, preferences.Value, reverseShippingDetails.Value, Optional.ToList(copyLogDetails), reverseShipmentLabelSasKey.Value, chainOfCustodySasKey.Value, deviceErasureDetails.Value, keyEncryptionKey.Value, Optional.ToNullable(expectedDataSizeInTerabytes), Optional.ToList(actions), lastMitigationActionOnJob.Value, dataCenterAddress.Value, Optional.ToNullable(dataCenterCode), Optional.ToList(copyProgress), devicePassword.Value); } } } diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxHeavyJobDetails.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxHeavyJobDetails.cs index 21c85c331cee7..e044062ed9353 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxHeavyJobDetails.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxHeavyJobDetails.cs @@ -35,6 +35,7 @@ public DataBoxHeavyJobDetails(DataBoxContactDetails contactDetails) : base(conta /// Details of the data to be exported from azure. /// Indicates the type of job details. /// Preferences for the order. + /// Optional Reverse Shipping details for order. /// /// List of copy log details. /// 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. @@ -55,7 +56,7 @@ public DataBoxHeavyJobDetails(DataBoxContactDetails contactDetails) : base(conta /// DataCenter code. /// Copy progress per account. /// Set Device password for unlocking Databox Heavy. Should not be passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate password itself. This will not be returned in Get Call. Password Requirements : Password must be minimum of 12 and maximum of 64 characters. Password must have at least one uppercase alphabet, one number and one special character. Password cannot have the following characters : IilLoO0 Password can have only alphabets, numbers and these characters : @#\-$%^!+=;:_()]+. - internal DataBoxHeavyJobDetails(IReadOnlyList jobStages, DataBoxContactDetails contactDetails, DataBoxShippingAddress shippingAddress, PackageShippingDetails deliveryPackage, PackageShippingDetails returnPackage, IList dataImportDetails, IList dataExportDetails, DataBoxOrderType jobDetailsType, DataBoxOrderPreferences preferences, IReadOnlyList copyLogDetails, string reverseShipmentLabelSasKey, string chainOfCustodySasKey, DeviceErasureDetails deviceErasureDetails, DataBoxKeyEncryptionKey keyEncryptionKey, int? expectedDataSizeInTerabytes, IReadOnlyList actions, LastMitigationActionOnJob lastMitigationActionOnJob, DataCenterAddressResult dataCenterAddress, DataCenterCode? dataCenterCode, IReadOnlyList copyProgress, string devicePassword) : base(jobStages, contactDetails, shippingAddress, deliveryPackage, returnPackage, dataImportDetails, dataExportDetails, jobDetailsType, preferences, copyLogDetails, reverseShipmentLabelSasKey, chainOfCustodySasKey, deviceErasureDetails, keyEncryptionKey, expectedDataSizeInTerabytes, actions, lastMitigationActionOnJob, dataCenterAddress, dataCenterCode) + internal DataBoxHeavyJobDetails(IReadOnlyList jobStages, DataBoxContactDetails contactDetails, DataBoxShippingAddress shippingAddress, PackageShippingDetails deliveryPackage, PackageShippingDetails returnPackage, IList dataImportDetails, IList dataExportDetails, DataBoxOrderType jobDetailsType, DataBoxOrderPreferences preferences, ReverseShippingDetails reverseShippingDetails, IReadOnlyList copyLogDetails, string reverseShipmentLabelSasKey, string chainOfCustodySasKey, DeviceErasureDetails deviceErasureDetails, DataBoxKeyEncryptionKey keyEncryptionKey, int? expectedDataSizeInTerabytes, IReadOnlyList actions, LastMitigationActionOnJob lastMitigationActionOnJob, DataCenterAddressResult dataCenterAddress, DataCenterCode? dataCenterCode, IReadOnlyList copyProgress, string devicePassword) : base(jobStages, contactDetails, shippingAddress, deliveryPackage, returnPackage, dataImportDetails, dataExportDetails, jobDetailsType, preferences, reverseShippingDetails, copyLogDetails, reverseShipmentLabelSasKey, chainOfCustodySasKey, deviceErasureDetails, keyEncryptionKey, expectedDataSizeInTerabytes, actions, lastMitigationActionOnJob, dataCenterAddress, dataCenterCode) { CopyProgress = copyProgress; DevicePassword = devicePassword; diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxJobData.Serialization.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxJobData.Serialization.cs index 20152f37877bc..be799a7c3b984 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxJobData.Serialization.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxJobData.Serialization.cs @@ -77,6 +77,8 @@ internal static DataBoxJobData DeserializeDataBoxJobData(JsonElement element) Optional isCancellable = default; Optional isDeletable = default; Optional isShippingAddressEditable = default; + Optional reverseShippingDetailsUpdate = default; + Optional reverseTransportPreferenceUpdate = default; Optional isPrepareToShipEnabled = default; Optional status = default; Optional startTime = default; @@ -192,6 +194,26 @@ internal static DataBoxJobData DeserializeDataBoxJobData(JsonElement element) isShippingAddressEditable = property0.Value.GetBoolean(); continue; } + if (property0.NameEquals("reverseShippingDetailsUpdate"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + reverseShippingDetailsUpdate = property0.Value.GetString().ToReverseShippingDetailsEditStatus(); + continue; + } + if (property0.NameEquals("reverseTransportPreferenceUpdate"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + reverseTransportPreferenceUpdate = property0.Value.GetString().ToReverseTransportPreferenceEditStatus(); + continue; + } if (property0.NameEquals("isPrepareToShipEnabled"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -281,7 +303,7 @@ internal static DataBoxJobData DeserializeDataBoxJobData(JsonElement element) continue; } } - return new DataBoxJobData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, transferType, Optional.ToNullable(isCancellable), Optional.ToNullable(isDeletable), Optional.ToNullable(isShippingAddressEditable), Optional.ToNullable(isPrepareToShipEnabled), Optional.ToNullable(status), Optional.ToNullable(startTime), error.Value, details.Value, cancellationReason.Value, Optional.ToNullable(deliveryType), deliveryInfo.Value, Optional.ToNullable(isCancellableWithoutFee), sku, identity); + return new DataBoxJobData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, transferType, Optional.ToNullable(isCancellable), Optional.ToNullable(isDeletable), Optional.ToNullable(isShippingAddressEditable), Optional.ToNullable(reverseShippingDetailsUpdate), Optional.ToNullable(reverseTransportPreferenceUpdate), Optional.ToNullable(isPrepareToShipEnabled), Optional.ToNullable(status), Optional.ToNullable(startTime), error.Value, details.Value, cancellationReason.Value, Optional.ToNullable(deliveryType), deliveryInfo.Value, Optional.ToNullable(isCancellableWithoutFee), sku, identity); } } } diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxJobDetails.Serialization.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxJobDetails.Serialization.cs index 02c7f1f051bae..533c470165015 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxJobDetails.Serialization.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxJobDetails.Serialization.cs @@ -55,6 +55,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("preferences"u8); writer.WriteObjectValue(Preferences); } + if (Optional.IsDefined(ReverseShippingDetails)) + { + writer.WritePropertyName("reverseShippingDetails"u8); + writer.WriteObjectValue(ReverseShippingDetails); + } if (Optional.IsDefined(KeyEncryptionKey)) { writer.WritePropertyName("keyEncryptionKey"u8); @@ -81,6 +86,7 @@ internal static DataBoxJobDetails DeserializeDataBoxJobDetails(JsonElement eleme Optional> dataExportDetails = default; DataBoxOrderType jobDetailsType = default; Optional preferences = default; + Optional reverseShippingDetails = default; Optional> copyLogDetails = default; Optional reverseShipmentLabelSasKey = default; Optional chainOfCustodySasKey = default; @@ -208,6 +214,16 @@ internal static DataBoxJobDetails DeserializeDataBoxJobDetails(JsonElement eleme preferences = DataBoxOrderPreferences.DeserializeDataBoxOrderPreferences(property.Value); continue; } + if (property.NameEquals("reverseShippingDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + reverseShippingDetails = ReverseShippingDetails.DeserializeReverseShippingDetails(property.Value); + continue; + } if (property.NameEquals("copyLogDetails"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -309,7 +325,7 @@ internal static DataBoxJobDetails DeserializeDataBoxJobDetails(JsonElement eleme continue; } } - return new DataBoxJobDetails(Optional.ToList(jobStages), contactDetails, shippingAddress.Value, deliveryPackage.Value, returnPackage.Value, Optional.ToList(dataImportDetails), Optional.ToList(dataExportDetails), jobDetailsType, preferences.Value, Optional.ToList(copyLogDetails), reverseShipmentLabelSasKey.Value, chainOfCustodySasKey.Value, deviceErasureDetails.Value, keyEncryptionKey.Value, Optional.ToNullable(expectedDataSizeInTerabytes), Optional.ToList(actions), lastMitigationActionOnJob.Value, dataCenterAddress.Value, Optional.ToNullable(dataCenterCode), Optional.ToList(copyProgress), devicePassword.Value); + return new DataBoxJobDetails(Optional.ToList(jobStages), contactDetails, shippingAddress.Value, deliveryPackage.Value, returnPackage.Value, Optional.ToList(dataImportDetails), Optional.ToList(dataExportDetails), jobDetailsType, preferences.Value, reverseShippingDetails.Value, Optional.ToList(copyLogDetails), reverseShipmentLabelSasKey.Value, chainOfCustodySasKey.Value, deviceErasureDetails.Value, keyEncryptionKey.Value, Optional.ToNullable(expectedDataSizeInTerabytes), Optional.ToList(actions), lastMitigationActionOnJob.Value, dataCenterAddress.Value, Optional.ToNullable(dataCenterCode), Optional.ToList(copyProgress), devicePassword.Value); } } } diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxJobDetails.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxJobDetails.cs index 5d7a8be195127..45bc5bdfe290c 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxJobDetails.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxJobDetails.cs @@ -35,6 +35,7 @@ public DataBoxJobDetails(DataBoxContactDetails contactDetails) : base(contactDet /// Details of the data to be exported from azure. /// Indicates the type of job details. /// Preferences for the order. + /// Optional Reverse Shipping details for order. /// /// List of copy log details. /// 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. @@ -55,7 +56,7 @@ public DataBoxJobDetails(DataBoxContactDetails contactDetails) : base(contactDet /// DataCenter code. /// Copy progress per storage account. /// Set Device password for unlocking Databox. Should not be passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate password itself. This will not be returned in Get Call. Password Requirements : Password must be minimum of 12 and maximum of 64 characters. Password must have at least one uppercase alphabet, one number and one special character. Password cannot have the following characters : IilLoO0 Password can have only alphabets, numbers and these characters : @#\-$%^!+=;:_()]+. - internal DataBoxJobDetails(IReadOnlyList jobStages, DataBoxContactDetails contactDetails, DataBoxShippingAddress shippingAddress, PackageShippingDetails deliveryPackage, PackageShippingDetails returnPackage, IList dataImportDetails, IList dataExportDetails, DataBoxOrderType jobDetailsType, DataBoxOrderPreferences preferences, IReadOnlyList copyLogDetails, string reverseShipmentLabelSasKey, string chainOfCustodySasKey, DeviceErasureDetails deviceErasureDetails, DataBoxKeyEncryptionKey keyEncryptionKey, int? expectedDataSizeInTerabytes, IReadOnlyList actions, LastMitigationActionOnJob lastMitigationActionOnJob, DataCenterAddressResult dataCenterAddress, DataCenterCode? dataCenterCode, IReadOnlyList copyProgress, string devicePassword) : base(jobStages, contactDetails, shippingAddress, deliveryPackage, returnPackage, dataImportDetails, dataExportDetails, jobDetailsType, preferences, copyLogDetails, reverseShipmentLabelSasKey, chainOfCustodySasKey, deviceErasureDetails, keyEncryptionKey, expectedDataSizeInTerabytes, actions, lastMitigationActionOnJob, dataCenterAddress, dataCenterCode) + internal DataBoxJobDetails(IReadOnlyList jobStages, DataBoxContactDetails contactDetails, DataBoxShippingAddress shippingAddress, PackageShippingDetails deliveryPackage, PackageShippingDetails returnPackage, IList dataImportDetails, IList dataExportDetails, DataBoxOrderType jobDetailsType, DataBoxOrderPreferences preferences, ReverseShippingDetails reverseShippingDetails, IReadOnlyList copyLogDetails, string reverseShipmentLabelSasKey, string chainOfCustodySasKey, DeviceErasureDetails deviceErasureDetails, DataBoxKeyEncryptionKey keyEncryptionKey, int? expectedDataSizeInTerabytes, IReadOnlyList actions, LastMitigationActionOnJob lastMitigationActionOnJob, DataCenterAddressResult dataCenterAddress, DataCenterCode? dataCenterCode, IReadOnlyList copyProgress, string devicePassword) : base(jobStages, contactDetails, shippingAddress, deliveryPackage, returnPackage, dataImportDetails, dataExportDetails, jobDetailsType, preferences, reverseShippingDetails, copyLogDetails, reverseShipmentLabelSasKey, chainOfCustodySasKey, deviceErasureDetails, keyEncryptionKey, expectedDataSizeInTerabytes, actions, lastMitigationActionOnJob, dataCenterAddress, dataCenterCode) { CopyProgress = copyProgress; DevicePassword = devicePassword; diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxOrderPreferences.Serialization.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxOrderPreferences.Serialization.cs index e22768df02c16..34c62be956024 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxOrderPreferences.Serialization.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxOrderPreferences.Serialization.cs @@ -31,6 +31,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("transportPreferences"u8); writer.WriteObjectValue(TransportPreferences); } + if (Optional.IsDefined(ReverseTransportPreferences)) + { + writer.WritePropertyName("reverseTransportPreferences"u8); + writer.WriteObjectValue(ReverseTransportPreferences); + } if (Optional.IsDefined(EncryptionPreferences)) { writer.WritePropertyName("encryptionPreferences"u8); @@ -53,6 +58,7 @@ internal static DataBoxOrderPreferences DeserializeDataBoxOrderPreferences(JsonE { Optional> preferredDataCenterRegion = default; Optional transportPreferences = default; + Optional reverseTransportPreferences = default; Optional encryptionPreferences = default; Optional> storageAccountAccessTierPreferences = default; foreach (var property in element.EnumerateObject()) @@ -82,6 +88,16 @@ internal static DataBoxOrderPreferences DeserializeDataBoxOrderPreferences(JsonE transportPreferences = TransportPreferences.DeserializeTransportPreferences(property.Value); continue; } + if (property.NameEquals("reverseTransportPreferences"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + reverseTransportPreferences = TransportPreferences.DeserializeTransportPreferences(property.Value); + continue; + } if (property.NameEquals("encryptionPreferences"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -108,7 +124,7 @@ internal static DataBoxOrderPreferences DeserializeDataBoxOrderPreferences(JsonE continue; } } - return new DataBoxOrderPreferences(Optional.ToList(preferredDataCenterRegion), transportPreferences.Value, encryptionPreferences.Value, Optional.ToList(storageAccountAccessTierPreferences)); + return new DataBoxOrderPreferences(Optional.ToList(preferredDataCenterRegion), transportPreferences.Value, reverseTransportPreferences.Value, encryptionPreferences.Value, Optional.ToList(storageAccountAccessTierPreferences)); } } } diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxOrderPreferences.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxOrderPreferences.cs index 69102bdbd8bf0..3f6656b9a80a3 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxOrderPreferences.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxOrderPreferences.cs @@ -23,12 +23,14 @@ public DataBoxOrderPreferences() /// Initializes a new instance of DataBoxOrderPreferences. /// Preferred data center region. /// Preferences related to the shipment logistics of the sku. + /// Optional Preferences related to the reverse shipment logistics of the sku. /// Preferences related to the Encryption. /// Preferences related to the Access Tier of storage accounts. - internal DataBoxOrderPreferences(IList preferredDataCenterRegion, TransportPreferences transportPreferences, DataBoxEncryptionPreferences encryptionPreferences, IList storageAccountAccessTierPreferences) + internal DataBoxOrderPreferences(IList preferredDataCenterRegion, TransportPreferences transportPreferences, TransportPreferences reverseTransportPreferences, DataBoxEncryptionPreferences encryptionPreferences, IList storageAccountAccessTierPreferences) { PreferredDataCenterRegion = preferredDataCenterRegion; TransportPreferences = transportPreferences; + ReverseTransportPreferences = reverseTransportPreferences; EncryptionPreferences = encryptionPreferences; StorageAccountAccessTierPreferences = storageAccountAccessTierPreferences; } @@ -36,17 +38,9 @@ internal DataBoxOrderPreferences(IList preferredDataCenterRegion, Transp /// Preferred data center region. public IList PreferredDataCenterRegion { get; } /// Preferences related to the shipment logistics of the sku. - internal TransportPreferences TransportPreferences { get; set; } - /// Indicates Shipment Logistics type that the customer preferred. - public TransportShipmentType? TransportPreferencesPreferredShipmentType - { - get => TransportPreferences is null ? default(TransportShipmentType?) : TransportPreferences.PreferredShipmentType; - set - { - TransportPreferences = value.HasValue ? new TransportPreferences(value.Value) : null; - } - } - + public TransportPreferences TransportPreferences { get; set; } + /// Optional Preferences related to the reverse shipment logistics of the sku. + public TransportPreferences ReverseTransportPreferences { get; set; } /// Preferences related to the Encryption. internal DataBoxEncryptionPreferences EncryptionPreferences { get; set; } /// Defines secondary layer of software-based encryption enablement. diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxSkuInformation.Serialization.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxSkuInformation.Serialization.cs index b7fa0ed0d92d0..45c66642b34ed 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxSkuInformation.Serialization.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxSkuInformation.Serialization.cs @@ -24,6 +24,7 @@ internal static DataBoxSkuInformation DeserializeDataBoxSkuInformation(JsonEleme Optional disabledReason = default; Optional disabledReasonMessage = default; Optional requiredFeature = default; + Optional> countriesWithinCommerceBoundary = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("sku"u8)) @@ -130,11 +131,26 @@ internal static DataBoxSkuInformation DeserializeDataBoxSkuInformation(JsonEleme requiredFeature = property0.Value.GetString(); continue; } + if (property0.NameEquals("countriesWithinCommerceBoundary"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + countriesWithinCommerceBoundary = array; + continue; + } } continue; } } - return new DataBoxSkuInformation(sku.Value, Optional.ToNullable(enabled), Optional.ToList(dataLocationToServiceLocationMap), capacity.Value, Optional.ToList(costs), Optional.ToList(apiVersions), Optional.ToNullable(disabledReason), disabledReasonMessage.Value, requiredFeature.Value); + return new DataBoxSkuInformation(sku.Value, Optional.ToNullable(enabled), Optional.ToList(dataLocationToServiceLocationMap), capacity.Value, Optional.ToList(costs), Optional.ToList(apiVersions), Optional.ToNullable(disabledReason), disabledReasonMessage.Value, requiredFeature.Value, Optional.ToList(countriesWithinCommerceBoundary)); } } } diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxSkuInformation.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxSkuInformation.cs index ea3bdb22abb25..d7e2494f4f308 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxSkuInformation.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxSkuInformation.cs @@ -19,6 +19,7 @@ internal DataBoxSkuInformation() DataLocationToServiceLocationMap = new ChangeTrackingList(); Costs = new ChangeTrackingList(); ApiVersions = new ChangeTrackingList(); + CountriesWithinCommerceBoundary = new ChangeTrackingList(); } /// Initializes a new instance of DataBoxSkuInformation. @@ -31,7 +32,8 @@ internal DataBoxSkuInformation() /// Reason why the Sku is disabled. /// Message for why the Sku is disabled. /// Required feature to access the sku. - internal DataBoxSkuInformation(DataBoxSku sku, bool? isEnabled, IReadOnlyList dataLocationToServiceLocationMap, DataBoxSkuCapacity capacity, IReadOnlyList costs, IReadOnlyList apiVersions, SkuDisabledReason? disabledReason, string disabledReasonMessage, string requiredFeature) + /// List of all the Countries in the SKU specific commerce boundary. + internal DataBoxSkuInformation(DataBoxSku sku, bool? isEnabled, IReadOnlyList dataLocationToServiceLocationMap, DataBoxSkuCapacity capacity, IReadOnlyList costs, IReadOnlyList apiVersions, SkuDisabledReason? disabledReason, string disabledReasonMessage, string requiredFeature, IReadOnlyList countriesWithinCommerceBoundary) { Sku = sku; IsEnabled = isEnabled; @@ -42,6 +44,7 @@ internal DataBoxSkuInformation(DataBoxSku sku, bool? isEnabled, IReadOnlyList The Sku. @@ -62,5 +65,7 @@ internal DataBoxSkuInformation(DataBoxSku sku, bool? isEnabled, IReadOnlyList Required feature to access the sku. public string RequiredFeature { get; } + /// List of all the Countries in the SKU specific commerce boundary. + public IReadOnlyList CountriesWithinCommerceBoundary { get; } } } 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 51937de4b5fdc..83a7ff9462c12 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxValidateAddressContent.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/DataBoxValidateAddressContent.cs @@ -31,15 +31,6 @@ public DataBoxValidateAddressContent(DataBoxShippingAddress shippingAddress, Dat /// Device type to be used for the job. public DataBoxSkuName DeviceType { get; } /// Preferences related to the shipment logistics of the sku. - internal TransportPreferences TransportPreferences { get; set; } - /// Indicates Shipment Logistics type that the customer preferred. - public TransportShipmentType? TransportPreferencesPreferredShipmentType - { - get => TransportPreferences is null ? default(TransportShipmentType?) : TransportPreferences.PreferredShipmentType; - set - { - TransportPreferences = value.HasValue ? new TransportPreferences(value.Value) : null; - } - } + public TransportPreferences TransportPreferences { get; set; } } } diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/GranularCopyLogDetails.Serialization.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/GranularCopyLogDetails.Serialization.cs new file mode 100644 index 0000000000000..384141c88a296 --- /dev/null +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/GranularCopyLogDetails.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; + +namespace Azure.ResourceManager.DataBox.Models +{ + public partial class GranularCopyLogDetails + { + internal static GranularCopyLogDetails DeserializeGranularCopyLogDetails(JsonElement element) + { + if (element.TryGetProperty("copyLogDetailsType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "DataBoxCustomerDisk": return DataBoxDiskGranularCopyLogDetails.DeserializeDataBoxDiskGranularCopyLogDetails(element); + } + } + return UnknownGranularCopyLogDetails.DeserializeUnknownGranularCopyLogDetails(element); + } + } +} diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/GranularCopyLogDetails.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/GranularCopyLogDetails.cs new file mode 100644 index 0000000000000..91feb67d22792 --- /dev/null +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/GranularCopyLogDetails.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.DataBox.Models +{ + /// + /// Granular Details for log generated during copy. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public abstract partial class GranularCopyLogDetails + { + /// Initializes a new instance of GranularCopyLogDetails. + protected GranularCopyLogDetails() + { + } + + /// Initializes a new instance of GranularCopyLogDetails. + /// Indicates the type of job details. + internal GranularCopyLogDetails(DataBoxOrderType copyLogDetailsType) + { + CopyLogDetailsType = copyLogDetailsType; + } + + /// Indicates the type of job details. + internal DataBoxOrderType CopyLogDetailsType { get; set; } + } +} diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/MitigateJobContent.Serialization.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/MitigateJobContent.Serialization.cs index 5ca3cffa0083b..aeee57cb10833 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/MitigateJobContent.Serialization.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/MitigateJobContent.Serialization.cs @@ -15,8 +15,22 @@ public partial class MitigateJobContent : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - writer.WritePropertyName("customerResolutionCode"u8); - writer.WriteStringValue(CustomerResolutionCode.ToSerialString()); + if (Optional.IsDefined(CustomerResolutionCode)) + { + writer.WritePropertyName("customerResolutionCode"u8); + writer.WriteStringValue(CustomerResolutionCode.Value.ToSerialString()); + } + if (Optional.IsCollectionDefined(SerialNumberCustomerResolutionMap)) + { + writer.WritePropertyName("serialNumberCustomerResolutionMap"u8); + writer.WriteStartObject(); + foreach (var item in SerialNumberCustomerResolutionMap) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value.ToSerialString()); + } + writer.WriteEndObject(); + } writer.WriteEndObject(); } } diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/MitigateJobContent.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/MitigateJobContent.cs index b532e48464a92..e3765d35f683a 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/MitigateJobContent.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/MitigateJobContent.cs @@ -5,19 +5,23 @@ #nullable disable +using System.Collections.Generic; +using Azure.Core; + namespace Azure.ResourceManager.DataBox.Models { /// The Mitigate Job captured from request body for Mitigate API. public partial class MitigateJobContent { /// Initializes a new instance of MitigateJobContent. - /// Resolution code for the job. - public MitigateJobContent(CustomerResolutionCode customerResolutionCode) + public MitigateJobContent() { - CustomerResolutionCode = customerResolutionCode; + SerialNumberCustomerResolutionMap = new ChangeTrackingDictionary(); } /// Resolution code for the job. - public CustomerResolutionCode CustomerResolutionCode { get; } + public CustomerResolutionCode? CustomerResolutionCode { get; set; } + /// Serial number and the customer resolution code corresponding to each serial number. + public IDictionary SerialNumberCustomerResolutionMap { get; } } } diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/ReverseShippingDetails.Serialization.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/ReverseShippingDetails.Serialization.cs new file mode 100644 index 0000000000000..a3468fe2619c3 --- /dev/null +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/ReverseShippingDetails.Serialization.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DataBox.Models +{ + public partial class ReverseShippingDetails : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(ContactDetails)) + { + writer.WritePropertyName("contactDetails"u8); + writer.WriteObjectValue(ContactDetails); + } + if (Optional.IsDefined(ShippingAddress)) + { + writer.WritePropertyName("shippingAddress"u8); + writer.WriteObjectValue(ShippingAddress); + } + writer.WriteEndObject(); + } + + internal static ReverseShippingDetails DeserializeReverseShippingDetails(JsonElement element) + { + Optional contactDetails = default; + Optional shippingAddress = default; + Optional isUpdated = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("contactDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + contactDetails = ContactInfo.DeserializeContactInfo(property.Value); + continue; + } + if (property.NameEquals("shippingAddress"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + shippingAddress = DataBoxShippingAddress.DeserializeDataBoxShippingAddress(property.Value); + continue; + } + if (property.NameEquals("isUpdated"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isUpdated = property.Value.GetBoolean(); + continue; + } + } + return new ReverseShippingDetails(contactDetails.Value, shippingAddress.Value, Optional.ToNullable(isUpdated)); + } + } +} diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/ReverseShippingDetails.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/ReverseShippingDetails.cs new file mode 100644 index 0000000000000..6432e59432b72 --- /dev/null +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/ReverseShippingDetails.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.DataBox.Models +{ + /// Reverse Shipping Address and contact details for a job. + public partial class ReverseShippingDetails + { + /// Initializes a new instance of ReverseShippingDetails. + public ReverseShippingDetails() + { + } + + /// Initializes a new instance of ReverseShippingDetails. + /// Contact Info. + /// Shipping address where customer wishes to receive the device. + /// + /// A flag to indicate whether Reverse Shipping details are updated or not after device has been prepared. + /// Read only field + /// + internal ReverseShippingDetails(ContactInfo contactDetails, DataBoxShippingAddress shippingAddress, bool? isUpdated) + { + ContactDetails = contactDetails; + ShippingAddress = shippingAddress; + IsUpdated = isUpdated; + } + + /// Contact Info. + public ContactInfo ContactDetails { get; set; } + /// Shipping address where customer wishes to receive the device. + public DataBoxShippingAddress ShippingAddress { get; set; } + /// + /// A flag to indicate whether Reverse Shipping details are updated or not after device has been prepared. + /// Read only field + /// + public bool? IsUpdated { get; } + } +} diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/ReverseShippingDetailsEditStatus.Serialization.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/ReverseShippingDetailsEditStatus.Serialization.cs new file mode 100644 index 0000000000000..6f5946b81e727 --- /dev/null +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/ReverseShippingDetailsEditStatus.Serialization.cs @@ -0,0 +1,30 @@ +// 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 ReverseShippingDetailsEditStatusExtensions + { + public static string ToSerialString(this ReverseShippingDetailsEditStatus value) => value switch + { + ReverseShippingDetailsEditStatus.Enabled => "Enabled", + ReverseShippingDetailsEditStatus.Disabled => "Disabled", + ReverseShippingDetailsEditStatus.NotSupported => "NotSupported", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ReverseShippingDetailsEditStatus value.") + }; + + public static ReverseShippingDetailsEditStatus ToReverseShippingDetailsEditStatus(this string value) + { + if (string.Equals(value, "Enabled", StringComparison.InvariantCultureIgnoreCase)) return ReverseShippingDetailsEditStatus.Enabled; + if (string.Equals(value, "Disabled", StringComparison.InvariantCultureIgnoreCase)) return ReverseShippingDetailsEditStatus.Disabled; + if (string.Equals(value, "NotSupported", StringComparison.InvariantCultureIgnoreCase)) return ReverseShippingDetailsEditStatus.NotSupported; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ReverseShippingDetailsEditStatus value."); + } + } +} diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/ReverseShippingDetailsEditStatus.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/ReverseShippingDetailsEditStatus.cs new file mode 100644 index 0000000000000..14e46d0ca4131 --- /dev/null +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/ReverseShippingDetailsEditStatus.cs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.DataBox.Models +{ + /// The Editable status for Reverse Shipping Address and Contact Info. + public enum ReverseShippingDetailsEditStatus + { + /// Reverse shipping details can be edited. + Enabled, + /// Edit is disabled for Reverse shipping details. + Disabled, + /// Edit is not supported for Reverse shipping details. Either subscription feature is not available or SKU doesn't support this feature. + NotSupported + } +} diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/ReverseTransportPreferenceEditStatus.Serialization.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/ReverseTransportPreferenceEditStatus.Serialization.cs new file mode 100644 index 0000000000000..445bfa058983d --- /dev/null +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/ReverseTransportPreferenceEditStatus.Serialization.cs @@ -0,0 +1,30 @@ +// 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 ReverseTransportPreferenceEditStatusExtensions + { + public static string ToSerialString(this ReverseTransportPreferenceEditStatus value) => value switch + { + ReverseTransportPreferenceEditStatus.Enabled => "Enabled", + ReverseTransportPreferenceEditStatus.Disabled => "Disabled", + ReverseTransportPreferenceEditStatus.NotSupported => "NotSupported", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ReverseTransportPreferenceEditStatus value.") + }; + + public static ReverseTransportPreferenceEditStatus ToReverseTransportPreferenceEditStatus(this string value) + { + if (string.Equals(value, "Enabled", StringComparison.InvariantCultureIgnoreCase)) return ReverseTransportPreferenceEditStatus.Enabled; + if (string.Equals(value, "Disabled", StringComparison.InvariantCultureIgnoreCase)) return ReverseTransportPreferenceEditStatus.Disabled; + if (string.Equals(value, "NotSupported", StringComparison.InvariantCultureIgnoreCase)) return ReverseTransportPreferenceEditStatus.NotSupported; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ReverseTransportPreferenceEditStatus value."); + } + } +} diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/ReverseTransportPreferenceEditStatus.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/ReverseTransportPreferenceEditStatus.cs new file mode 100644 index 0000000000000..140fd7fd50183 --- /dev/null +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/ReverseTransportPreferenceEditStatus.cs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.DataBox.Models +{ + /// The Editable status for Reverse Transport preferences. + public enum ReverseTransportPreferenceEditStatus + { + /// Reverse Transport Preferences can be edited. + Enabled, + /// Edit is disabled for Reverse Transport Preferences. + Disabled, + /// Edit is not supported for Reverse Transport Preferences. Either subscription feature is not available or SKU doesn't support this feature. + NotSupported + } +} diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/TransportPreferences.Serialization.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/TransportPreferences.Serialization.cs index ac457ee304472..954ac523bdae8 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/TransportPreferences.Serialization.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/TransportPreferences.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.DataBox.Models { - internal partial class TransportPreferences : IUtf8JsonSerializable + public partial class TransportPreferences : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -23,6 +23,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) internal static TransportPreferences DeserializeTransportPreferences(JsonElement element) { TransportShipmentType preferredShipmentType = default; + Optional isUpdated = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("preferredShipmentType"u8)) @@ -30,8 +31,18 @@ internal static TransportPreferences DeserializeTransportPreferences(JsonElement preferredShipmentType = property.Value.GetString().ToTransportShipmentType(); continue; } + if (property.NameEquals("isUpdated"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isUpdated = property.Value.GetBoolean(); + continue; + } } - return new TransportPreferences(preferredShipmentType); + return new TransportPreferences(preferredShipmentType, Optional.ToNullable(isUpdated)); } } } diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/TransportPreferences.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/TransportPreferences.cs index 04c2a5b98b9b0..e73c3d03e4965 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/TransportPreferences.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/TransportPreferences.cs @@ -8,7 +8,7 @@ namespace Azure.ResourceManager.DataBox.Models { /// Preferences related to the shipment logistics of the sku. - internal partial class TransportPreferences + public partial class TransportPreferences { /// Initializes a new instance of TransportPreferences. /// Indicates Shipment Logistics type that the customer preferred. @@ -17,7 +17,18 @@ public TransportPreferences(TransportShipmentType preferredShipmentType) PreferredShipmentType = preferredShipmentType; } + /// Initializes a new instance of TransportPreferences. + /// Indicates Shipment Logistics type that the customer preferred. + /// Read only property which indicates whether transport preferences has been updated or not after device is prepared. + internal TransportPreferences(TransportShipmentType preferredShipmentType, bool? isUpdated) + { + PreferredShipmentType = preferredShipmentType; + IsUpdated = isUpdated; + } + /// Indicates Shipment Logistics type that the customer preferred. public TransportShipmentType PreferredShipmentType { get; set; } + /// Read only property which indicates whether transport preferences has been updated or not after device is prepared. + public bool? IsUpdated { get; } } } diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/UnknownGranularCopyLogDetails.Serialization.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/UnknownGranularCopyLogDetails.Serialization.cs new file mode 100644 index 0000000000000..3148abc2a5f21 --- /dev/null +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/UnknownGranularCopyLogDetails.Serialization.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DataBox.Models +{ + internal partial class UnknownGranularCopyLogDetails + { + internal static UnknownGranularCopyLogDetails DeserializeUnknownGranularCopyLogDetails(JsonElement element) + { + DataBoxOrderType copyLogDetailsType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("copyLogDetailsType"u8)) + { + copyLogDetailsType = property.Value.GetString().ToDataBoxOrderType(); + continue; + } + } + return new UnknownGranularCopyLogDetails(copyLogDetailsType); + } + } +} diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/UnknownGranularCopyLogDetails.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/UnknownGranularCopyLogDetails.cs new file mode 100644 index 0000000000000..8d1058ec86e3c --- /dev/null +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/UnknownGranularCopyLogDetails.cs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.DataBox.Models +{ + /// The UnknownGranularCopyLogDetails. + internal partial class UnknownGranularCopyLogDetails : GranularCopyLogDetails + { + /// Initializes a new instance of UnknownGranularCopyLogDetails. + /// Indicates the type of job details. + internal UnknownGranularCopyLogDetails(DataBoxOrderType copyLogDetailsType) : base(copyLogDetailsType) + { + CopyLogDetailsType = copyLogDetailsType; + } + } +} diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/UnknownJobDetails.Serialization.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/UnknownJobDetails.Serialization.cs index 5ab7a7cab804c..7e3581752a31b 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/UnknownJobDetails.Serialization.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/UnknownJobDetails.Serialization.cs @@ -50,6 +50,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("preferences"u8); writer.WriteObjectValue(Preferences); } + if (Optional.IsDefined(ReverseShippingDetails)) + { + writer.WritePropertyName("reverseShippingDetails"u8); + writer.WriteObjectValue(ReverseShippingDetails); + } if (Optional.IsDefined(KeyEncryptionKey)) { writer.WritePropertyName("keyEncryptionKey"u8); @@ -74,6 +79,7 @@ internal static UnknownJobDetails DeserializeUnknownJobDetails(JsonElement eleme Optional> dataExportDetails = default; DataBoxOrderType jobDetailsType = default; Optional preferences = default; + Optional reverseShippingDetails = default; Optional> copyLogDetails = default; Optional reverseShipmentLabelSasKey = default; Optional chainOfCustodySasKey = default; @@ -181,6 +187,16 @@ internal static UnknownJobDetails DeserializeUnknownJobDetails(JsonElement eleme preferences = DataBoxOrderPreferences.DeserializeDataBoxOrderPreferences(property.Value); continue; } + if (property.NameEquals("reverseShippingDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + reverseShippingDetails = ReverseShippingDetails.DeserializeReverseShippingDetails(property.Value); + continue; + } if (property.NameEquals("copyLogDetails"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -282,7 +298,7 @@ internal static UnknownJobDetails DeserializeUnknownJobDetails(JsonElement eleme continue; } } - return new UnknownJobDetails(Optional.ToList(jobStages), contactDetails, shippingAddress.Value, deliveryPackage.Value, returnPackage.Value, Optional.ToList(dataImportDetails), Optional.ToList(dataExportDetails), jobDetailsType, preferences.Value, Optional.ToList(copyLogDetails), reverseShipmentLabelSasKey.Value, chainOfCustodySasKey.Value, deviceErasureDetails.Value, keyEncryptionKey.Value, Optional.ToNullable(expectedDataSizeInTerabytes), Optional.ToList(actions), lastMitigationActionOnJob.Value, dataCenterAddress.Value, Optional.ToNullable(dataCenterCode)); + return new UnknownJobDetails(Optional.ToList(jobStages), contactDetails, shippingAddress.Value, deliveryPackage.Value, returnPackage.Value, Optional.ToList(dataImportDetails), Optional.ToList(dataExportDetails), jobDetailsType, preferences.Value, reverseShippingDetails.Value, Optional.ToList(copyLogDetails), reverseShipmentLabelSasKey.Value, chainOfCustodySasKey.Value, deviceErasureDetails.Value, keyEncryptionKey.Value, Optional.ToNullable(expectedDataSizeInTerabytes), Optional.ToList(actions), lastMitigationActionOnJob.Value, dataCenterAddress.Value, Optional.ToNullable(dataCenterCode)); } } } diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/UnknownJobDetails.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/UnknownJobDetails.cs index 3e9281ee0392f..549e1e8380db7 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/UnknownJobDetails.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/UnknownJobDetails.cs @@ -22,6 +22,7 @@ internal partial class UnknownJobDetails : DataBoxBasicJobDetails /// Details of the data to be exported from azure. /// Indicates the type of job details. /// Preferences for the order. + /// Optional Reverse Shipping details for order. /// /// List of copy log details. /// 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. @@ -40,7 +41,7 @@ internal partial class UnknownJobDetails : DataBoxBasicJobDetails /// The available derived classes include and . /// /// DataCenter code. - internal UnknownJobDetails(IReadOnlyList jobStages, DataBoxContactDetails contactDetails, DataBoxShippingAddress shippingAddress, PackageShippingDetails deliveryPackage, PackageShippingDetails returnPackage, IList dataImportDetails, IList dataExportDetails, DataBoxOrderType jobDetailsType, DataBoxOrderPreferences preferences, IReadOnlyList copyLogDetails, string reverseShipmentLabelSasKey, string chainOfCustodySasKey, DeviceErasureDetails deviceErasureDetails, DataBoxKeyEncryptionKey keyEncryptionKey, int? expectedDataSizeInTerabytes, IReadOnlyList actions, LastMitigationActionOnJob lastMitigationActionOnJob, DataCenterAddressResult dataCenterAddress, DataCenterCode? dataCenterCode) : base(jobStages, contactDetails, shippingAddress, deliveryPackage, returnPackage, dataImportDetails, dataExportDetails, jobDetailsType, preferences, copyLogDetails, reverseShipmentLabelSasKey, chainOfCustodySasKey, deviceErasureDetails, keyEncryptionKey, expectedDataSizeInTerabytes, actions, lastMitigationActionOnJob, dataCenterAddress, dataCenterCode) + internal UnknownJobDetails(IReadOnlyList jobStages, DataBoxContactDetails contactDetails, DataBoxShippingAddress shippingAddress, PackageShippingDetails deliveryPackage, PackageShippingDetails returnPackage, IList dataImportDetails, IList dataExportDetails, DataBoxOrderType jobDetailsType, DataBoxOrderPreferences preferences, ReverseShippingDetails reverseShippingDetails, IReadOnlyList copyLogDetails, string reverseShipmentLabelSasKey, string chainOfCustodySasKey, DeviceErasureDetails deviceErasureDetails, DataBoxKeyEncryptionKey keyEncryptionKey, int? expectedDataSizeInTerabytes, IReadOnlyList actions, LastMitigationActionOnJob lastMitigationActionOnJob, DataCenterAddressResult dataCenterAddress, DataCenterCode? dataCenterCode) : base(jobStages, contactDetails, shippingAddress, deliveryPackage, returnPackage, dataImportDetails, dataExportDetails, jobDetailsType, preferences, reverseShippingDetails, copyLogDetails, reverseShipmentLabelSasKey, chainOfCustodySasKey, deviceErasureDetails, keyEncryptionKey, expectedDataSizeInTerabytes, actions, lastMitigationActionOnJob, dataCenterAddress, dataCenterCode) { JobDetailsType = jobDetailsType; } diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/UpdateJobDetails.Serialization.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/UpdateJobDetails.Serialization.cs index a6045e484b3f5..a9db8643f8d40 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/UpdateJobDetails.Serialization.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/UpdateJobDetails.Serialization.cs @@ -25,6 +25,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("shippingAddress"u8); writer.WriteObjectValue(ShippingAddress); } + if (Optional.IsDefined(ReverseShippingDetails)) + { + writer.WritePropertyName("reverseShippingDetails"u8); + writer.WriteObjectValue(ReverseShippingDetails); + } + if (Optional.IsDefined(Preferences)) + { + writer.WritePropertyName("preferences"u8); + writer.WriteObjectValue(Preferences); + } if (Optional.IsDefined(KeyEncryptionKey)) { writer.WritePropertyName("keyEncryptionKey"u8); diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/UpdateJobDetails.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/UpdateJobDetails.cs index e15d9d6fe43ef..8718515cf8976 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/UpdateJobDetails.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/Models/UpdateJobDetails.cs @@ -19,6 +19,10 @@ public UpdateJobDetails() public DataBoxContactDetails ContactDetails { get; set; } /// Shipping address of the customer. public DataBoxShippingAddress ShippingAddress { get; set; } + /// Reverse Shipping Address and contact details for a job. + public ReverseShippingDetails ReverseShippingDetails { get; set; } + /// Preferences related to the order. + public DataBoxOrderPreferences Preferences { get; set; } /// Key encryption key for the job. public DataBoxKeyEncryptionKey KeyEncryptionKey { get; set; } /// Return package details of job. 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 43940478f208f..919c5c6e407b8 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/RestOperations/DataBoxManagementRestOperations.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/RestOperations/DataBoxManagementRestOperations.cs @@ -32,7 +32,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-02-01"; + _apiVersion = apiVersion ?? "2022-12-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 479300459a9f9..0d22cc8ab656b 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/RestOperations/JobsRestOperations.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/RestOperations/JobsRestOperations.cs @@ -33,7 +33,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-02-01"; + _apiVersion = apiVersion ?? "2022-12-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 175b61a8708c1..3eab62e51d187 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/RestOperations/ServiceRestOperations.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/RestOperations/ServiceRestOperations.cs @@ -33,7 +33,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-02-01"; + _apiVersion = apiVersion ?? "2022-12-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 7d9da7919d024..65f9d6e1b3ba7 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/df70965d3a207eb2a628c96aa6ed935edc6b7911/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 skip-csproj: true