diff --git a/sdk/databox/azure-resourcemanager-databox/CHANGELOG.md b/sdk/databox/azure-resourcemanager-databox/CHANGELOG.md index fb59322c07256..68479944f3d81 100644 --- a/sdk/databox/azure-resourcemanager-databox/CHANGELOG.md +++ b/sdk/databox/azure-resourcemanager-databox/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.0.0-beta.3 (Unreleased) +## 1.0.0-beta.1 (2023-02-10) + +- Azure Resource Manager DataBox client library for Java. This package contains Microsoft Azure SDK for DataBox Management SDK. Package tag package-2022-12. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added diff --git a/sdk/databox/azure-resourcemanager-databox/README.md b/sdk/databox/azure-resourcemanager-databox/README.md index 11f49083846d6..f8fad4bbccbb9 100644 --- a/sdk/databox/azure-resourcemanager-databox/README.md +++ b/sdk/databox/azure-resourcemanager-databox/README.md @@ -2,7 +2,7 @@ Azure Resource Manager DataBox client library for Java. -This package contains Microsoft Azure SDK for DataBox Management SDK. Package tag package-2021-03. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for DataBox Management SDK. Package tag package-2022-12. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-databox - 1.0.0-beta.2 + 1.0.0-beta.3 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/databox/azure-resourcemanager-databox/SAMPLE.md b/sdk/databox/azure-resourcemanager-databox/SAMPLE.md index dbc24902e9a89..c65e99ebf2c4a 100644 --- a/sdk/databox/azure-resourcemanager-databox/SAMPLE.md +++ b/sdk/databox/azure-resourcemanager-databox/SAMPLE.md @@ -11,6 +11,7 @@ - [List](#jobs_list) - [ListByResourceGroup](#jobs_listbyresourcegroup) - [ListCredentials](#jobs_listcredentials) +- [MarkDevicesShipped](#jobs_markdevicesshipped) - [Update](#jobs_update) ## Operations @@ -38,7 +39,7 @@ import java.time.OffsetDateTime; /** Samples for Jobs BookShipmentPickUp. */ public final class JobsBookShipmentPickUpSamples { /* - * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2021-03-01/examples/BookShipmentPickupPost.json + * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/BookShipmentPickupPost.json */ /** * Sample code: BookShipmentPickupPost. @@ -68,7 +69,7 @@ import com.azure.resourcemanager.databox.models.CancellationReason; /** Samples for Jobs Cancel. */ public final class JobsCancelSamples { /* - * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2021-03-01/examples/JobsCancelPost.json + * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsCancelPost.json */ /** * Sample code: JobsCancelPost. @@ -117,7 +118,7 @@ import java.util.Map; /** Samples for Jobs Create. */ public final class JobsCreateSamples { /* - * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2021-03-01/examples/JobsCreateDevicePassword.json + * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsCreateDevicePassword.json */ /** * Sample code: JobsCreateDevicePassword. @@ -164,7 +165,7 @@ public final class JobsCreateSamples { } /* - * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2021-03-01/examples/JobsCreate.json + * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsCreate.json */ /** * Sample code: JobsCreate. @@ -209,7 +210,7 @@ public final class JobsCreateSamples { } /* - * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2021-03-01/examples/JobsCreateDoubleEncryption.json + * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsCreateDoubleEncryption.json */ /** * Sample code: JobsCreateDoubleEncryption. @@ -258,7 +259,7 @@ public final class JobsCreateSamples { } /* - * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2021-03-01/examples/JobsCreateWithUserAssignedIdentity.json + * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsCreateWithUserAssignedIdentity.json */ /** * Sample code: JobsCreateWithUserAssignedIdentity. @@ -310,7 +311,7 @@ public final class JobsCreateSamples { } /* - * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2021-03-01/examples/JobsCreateExport.json + * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsCreateExport.json */ /** * Sample code: JobsCreateExport. @@ -383,7 +384,7 @@ public final class JobsCreateSamples { /** Samples for Jobs Delete. */ public final class JobsDeleteSamples { /* - * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2021-03-01/examples/JobsDelete.json + * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsDelete.json */ /** * Sample code: JobsDelete. @@ -402,7 +403,7 @@ public final class JobsDeleteSamples { /** Samples for Jobs GetByResourceGroup. */ public final class JobsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2021-03-01/examples/JobsGet.json + * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsGet.json */ /** * Sample code: JobsGet. @@ -416,7 +417,7 @@ public final class JobsGetByResourceGroupSamples { } /* - * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2021-03-01/examples/JobsGetCmk.json + * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsGetCmk.json */ /** * Sample code: JobsGetCmk. @@ -430,7 +431,7 @@ public final class JobsGetByResourceGroupSamples { } /* - * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2021-03-01/examples/JobsGetExport.json + * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsGetExport.json */ /** * Sample code: JobsGetExport. @@ -444,7 +445,7 @@ public final class JobsGetByResourceGroupSamples { } /* - * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2021-03-01/examples/JobsGetCopyStuck.json + * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsGetCopyStuck.json */ /** * Sample code: JobsGetCopyStuck. @@ -457,6 +458,21 @@ public final class JobsGetByResourceGroupSamples { .getByResourceGroupWithResponse( "dmstestresource", "TJx-637505258985313014", "details", com.azure.core.util.Context.NONE); } + + /* + * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsGetWaitingForAction.json + */ + /** + * Sample code: JobsGetWaitingForAction. + * + * @param manager Entry point to DataBoxManager. + */ + public static void jobsGetWaitingForAction(com.azure.resourcemanager.databox.DataBoxManager manager) { + manager + .jobs() + .getByResourceGroupWithResponse( + "dmstestresource", "TJx-637505258985313014", "details", com.azure.core.util.Context.NONE); + } } ``` @@ -466,7 +482,7 @@ public final class JobsGetByResourceGroupSamples { /** Samples for Jobs List. */ public final class JobsListSamples { /* - * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2021-03-01/examples/JobsList.json + * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsList.json */ /** * Sample code: JobsList. @@ -485,7 +501,7 @@ public final class JobsListSamples { /** Samples for Jobs ListByResourceGroup. */ public final class JobsListByResourceGroupSamples { /* - * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2021-03-01/examples/JobsListByResourceGroup.json + * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsListByResourceGroup.json */ /** * Sample code: JobsListByResourceGroup. @@ -504,7 +520,7 @@ public final class JobsListByResourceGroupSamples { /** Samples for Jobs ListCredentials. */ public final class JobsListCredentialsSamples { /* - * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2021-03-01/examples/JobsListCredentials.json + * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsListCredentials.json */ /** * Sample code: JobsListCredentials. @@ -517,6 +533,36 @@ public final class JobsListCredentialsSamples { } ``` +### Jobs_MarkDevicesShipped + +```java +import com.azure.resourcemanager.databox.models.MarkDevicesShippedRequest; +import com.azure.resourcemanager.databox.models.PackageCarrierInfo; + +/** Samples for Jobs MarkDevicesShipped. */ +public final class JobsMarkDevicesShippedSamples { + /* + * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/MarkDevicesShipped.json + */ + /** + * Sample code: MarkDevicesShipped. + * + * @param manager Entry point to DataBoxManager. + */ + public static void markDevicesShipped(com.azure.resourcemanager.databox.DataBoxManager manager) { + manager + .jobs() + .markDevicesShippedWithResponse( + "SdkJob8367", + "SdkRg9836", + new MarkDevicesShippedRequest() + .withDeliverToDcPackageDetails( + new PackageCarrierInfo().withCarrierName("DHL").withTrackingId("123456")), + com.azure.core.util.Context.NONE); + } +} +``` + ### Jobs_Update ```java @@ -538,7 +584,7 @@ import java.util.Map; /** Samples for Jobs Update. */ public final class JobsUpdateSamples { /* - * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2021-03-01/examples/JobsPatchCmk.json + * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsPatchCmk.json */ /** * Sample code: JobsPatchCmk. @@ -565,7 +611,7 @@ public final class JobsUpdateSamples { } /* - * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2021-03-01/examples/JobsPatchSystemAssignedToUserAssigned.json + * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsPatchSystemAssignedToUserAssigned.json */ /** * Sample code: JobsPatchSystemAssignedToUserAssigned. @@ -606,7 +652,7 @@ public final class JobsUpdateSamples { } /* - * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2021-03-01/examples/JobsPatch.json + * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsPatch.json */ /** * Sample code: JobsPatch. @@ -661,7 +707,7 @@ public final class JobsUpdateSamples { /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2021-03-01/examples/OperationsGet.json + * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/OperationsGet.json */ /** * Sample code: OperationsGet. @@ -679,11 +725,13 @@ public final class OperationsListSamples { ```java import com.azure.resourcemanager.databox.models.CustomerResolutionCode; import com.azure.resourcemanager.databox.models.MitigateJobRequest; +import java.util.HashMap; +import java.util.Map; /** Samples for ResourceProvider Mitigate. */ public final class ResourceProviderMitigateSamples { /* - * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2021-03-01/examples/JobMitigate.json + * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobMitigate.json */ /** * Sample code: Mitigate. @@ -696,9 +744,26 @@ public final class ResourceProviderMitigateSamples { .mitigateWithResponse( "SdkJob8367", "SdkRg9836", - new MitigateJobRequest().withCustomerResolutionCode(CustomerResolutionCode.MOVE_TO_CLEAN_UP_DEVICE), + new MitigateJobRequest() + .withSerialNumberCustomerResolutionMap( + mapOf( + "testDISK-1", + CustomerResolutionCode.MOVE_TO_CLEAN_UP_DEVICE, + "testDISK-2", + CustomerResolutionCode.RESUME)), com.azure.core.util.Context.NONE); } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } } ``` @@ -711,7 +776,7 @@ import com.azure.resourcemanager.databox.models.TransferType; /** Samples for Service ListAvailableSkusByResourceGroup. */ public final class ServiceListAvailableSkusByResourceGroupSamples { /* - * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2021-03-01/examples/AvailableSkusPost.json + * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/AvailableSkusPost.json */ /** * Sample code: AvailableSkusPost. @@ -742,7 +807,7 @@ import com.azure.resourcemanager.databox.models.RegionConfigurationRequest; /** Samples for Service RegionConfiguration. */ public final class ServiceRegionConfigurationSamples { /* - * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2021-03-01/examples/RegionConfiguration.json + * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/RegionConfiguration.json */ /** * Sample code: RegionConfiguration. @@ -771,7 +836,7 @@ import com.azure.resourcemanager.databox.models.RegionConfigurationRequest; /** Samples for Service RegionConfigurationByResourceGroup. */ public final class ServiceRegionConfigurationByResourceGroupSamples { /* - * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2021-03-01/examples/RegionConfigurationByResourceGroup.json + * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/RegionConfigurationByResourceGroup.json */ /** * Sample code: RegionConfigurationByResourceGroup. @@ -803,7 +868,7 @@ import com.azure.resourcemanager.databox.models.ValidateAddress; /** Samples for Service ValidateAddress. */ public final class ServiceValidateAddressSamples { /* - * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2021-03-01/examples/ValidateAddressPost.json + * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/ValidateAddressPost.json */ /** * Sample code: ValidateAddressPost. @@ -856,7 +921,7 @@ import java.util.Arrays; /** Samples for Service ValidateInputs. */ public final class ServiceValidateInputsSamples { /* - * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2021-03-01/examples/ValidateInputs.json + * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/ValidateInputs.json */ /** * Sample code: ValidateInputs. @@ -942,7 +1007,7 @@ import java.util.Arrays; /** Samples for Service ValidateInputsByResourceGroup. */ public final class ServiceValidateInputsByResourceGroupSamples { /* - * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2021-03-01/examples/ValidateInputsByResourceGroup.json + * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/ValidateInputsByResourceGroup.json */ /** * Sample code: ValidateInputsByResourceGroup. diff --git a/sdk/databox/azure-resourcemanager-databox/pom.xml b/sdk/databox/azure-resourcemanager-databox/pom.xml index 0369c2f26d72d..c0c0f001c4c42 100644 --- a/sdk/databox/azure-resourcemanager-databox/pom.xml +++ b/sdk/databox/azure-resourcemanager-databox/pom.xml @@ -13,7 +13,7 @@ jar Microsoft Azure SDK for DataBox Management - This package contains Microsoft Azure SDK for DataBox Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2021-03. + This package contains Microsoft Azure SDK for DataBox Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2022-12. https://github.com/Azure/azure-sdk-for-java diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/DataBoxManager.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/DataBoxManager.java index 1180346a1879d..ba1e7c92b1c9c 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/DataBoxManager.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/DataBoxManager.java @@ -215,7 +215,7 @@ public DataBoxManager authenticate(TokenCredential credential, AzureProfile prof .append("-") .append("com.azure.resourcemanager.databox") .append("/") - .append("1.0.0-beta.2"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/JobsClient.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/JobsClient.java index aa69d9acde3e4..1c6194f67a9d5 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/JobsClient.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/JobsClient.java @@ -16,6 +16,7 @@ import com.azure.resourcemanager.databox.fluent.models.UnencryptedCredentialsInner; import com.azure.resourcemanager.databox.models.CancellationReason; import com.azure.resourcemanager.databox.models.JobResourceUpdateParameter; +import com.azure.resourcemanager.databox.models.MarkDevicesShippedRequest; import com.azure.resourcemanager.databox.models.ShipmentPickUpRequest; /** An instance of this class provides access to all the operations defined in JobsClient. */ @@ -43,6 +44,38 @@ public interface JobsClient { @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String skipToken, Context context); + /** + * Request to mark devices for a given job as shipped. + * + * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and + * 24 characters in length and use any alphanumeric and underscore only. + * @param resourceGroupName The Resource Group Name. + * @param markDevicesShippedRequest Mark Devices Shipped Request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response markDevicesShippedWithResponse( + String jobName, String resourceGroupName, MarkDevicesShippedRequest markDevicesShippedRequest, Context context); + + /** + * Request to mark devices for a given job as shipped. + * + * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and + * 24 characters in length and use any alphanumeric and underscore only. + * @param resourceGroupName The Resource Group Name. + * @param markDevicesShippedRequest Mark Devices Shipped Request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void markDevicesShipped( + String jobName, String resourceGroupName, MarkDevicesShippedRequest markDevicesShippedRequest); + /** * Lists all the jobs available under the given resource group. * diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/JobProperties.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/JobProperties.java index ac652dae0a5cc..66fad04c035cb 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/JobProperties.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/JobProperties.java @@ -10,6 +10,8 @@ import com.azure.resourcemanager.databox.models.JobDeliveryInfo; import com.azure.resourcemanager.databox.models.JobDeliveryType; import com.azure.resourcemanager.databox.models.JobDetails; +import com.azure.resourcemanager.databox.models.ReverseShippingDetailsEditStatus; +import com.azure.resourcemanager.databox.models.ReverseTransportPreferenceEditStatus; import com.azure.resourcemanager.databox.models.StageName; import com.azure.resourcemanager.databox.models.TransferType; import com.fasterxml.jackson.annotation.JsonProperty; @@ -42,6 +44,18 @@ public final class JobProperties { @JsonProperty(value = "isShippingAddressEditable", access = JsonProperty.Access.WRITE_ONLY) private Boolean isShippingAddressEditable; + /* + * The Editable status for Reverse Shipping Address and Contact Info + */ + @JsonProperty(value = "reverseShippingDetailsUpdate", access = JsonProperty.Access.WRITE_ONLY) + private ReverseShippingDetailsEditStatus reverseShippingDetailsUpdate; + + /* + * The Editable status for Reverse Transport preferences + */ + @JsonProperty(value = "reverseTransportPreferenceUpdate", access = JsonProperty.Access.WRITE_ONLY) + private ReverseTransportPreferenceEditStatus reverseTransportPreferenceUpdate; + /* * Is Prepare To Ship Enabled on this job */ @@ -147,6 +161,24 @@ public Boolean isShippingAddressEditable() { return this.isShippingAddressEditable; } + /** + * Get the reverseShippingDetailsUpdate property: The Editable status for Reverse Shipping Address and Contact Info. + * + * @return the reverseShippingDetailsUpdate value. + */ + public ReverseShippingDetailsEditStatus reverseShippingDetailsUpdate() { + return this.reverseShippingDetailsUpdate; + } + + /** + * Get the reverseTransportPreferenceUpdate property: The Editable status for Reverse Transport preferences. + * + * @return the reverseTransportPreferenceUpdate value. + */ + public ReverseTransportPreferenceEditStatus reverseTransportPreferenceUpdate() { + return this.reverseTransportPreferenceUpdate; + } + /** * Get the isPrepareToShipEnabled property: Is Prepare To Ship Enabled on this job. * diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/JobResourceInner.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/JobResourceInner.java index e0562bb1163a1..af6ebfee2a995 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/JobResourceInner.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/JobResourceInner.java @@ -13,6 +13,8 @@ import com.azure.resourcemanager.databox.models.JobDeliveryType; import com.azure.resourcemanager.databox.models.JobDetails; import com.azure.resourcemanager.databox.models.ResourceIdentity; +import com.azure.resourcemanager.databox.models.ReverseShippingDetailsEditStatus; +import com.azure.resourcemanager.databox.models.ReverseTransportPreferenceEditStatus; import com.azure.resourcemanager.databox.models.Sku; import com.azure.resourcemanager.databox.models.StageName; import com.azure.resourcemanager.databox.models.TransferType; @@ -218,6 +220,24 @@ public Boolean isShippingAddressEditable() { return this.innerProperties() == null ? null : this.innerProperties().isShippingAddressEditable(); } + /** + * Get the reverseShippingDetailsUpdate property: The Editable status for Reverse Shipping Address and Contact Info. + * + * @return the reverseShippingDetailsUpdate value. + */ + public ReverseShippingDetailsEditStatus reverseShippingDetailsUpdate() { + return this.innerProperties() == null ? null : this.innerProperties().reverseShippingDetailsUpdate(); + } + + /** + * Get the reverseTransportPreferenceUpdate property: The Editable status for Reverse Transport preferences. + * + * @return the reverseTransportPreferenceUpdate value. + */ + public ReverseTransportPreferenceEditStatus reverseTransportPreferenceUpdate() { + return this.innerProperties() == null ? null : this.innerProperties().reverseTransportPreferenceUpdate(); + } + /** * Get the isPrepareToShipEnabled property: Is Prepare To Ship Enabled on this job. * diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/RegionConfigurationResponseInner.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/RegionConfigurationResponseInner.java index dfc8e79563c6a..3edc15a865f3d 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/RegionConfigurationResponseInner.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/RegionConfigurationResponseInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.databox.fluent.models; import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.databox.models.DatacenterAddressResponse; import com.azure.resourcemanager.databox.models.ScheduleAvailabilityResponse; import com.azure.resourcemanager.databox.models.TransportAvailabilityResponse; import com.fasterxml.jackson.annotation.JsonProperty; @@ -24,6 +25,12 @@ public final class RegionConfigurationResponseInner { @JsonProperty(value = "transportAvailabilityResponse", access = JsonProperty.Access.WRITE_ONLY) private TransportAvailabilityResponse transportAvailabilityResponse; + /* + * Datacenter address for given sku in a region. + */ + @JsonProperty(value = "datacenterAddressResponse", access = JsonProperty.Access.WRITE_ONLY) + private DatacenterAddressResponse datacenterAddressResponse; + /** Creates an instance of RegionConfigurationResponseInner class. */ public RegionConfigurationResponseInner() { } @@ -46,6 +53,15 @@ public TransportAvailabilityResponse transportAvailabilityResponse() { return this.transportAvailabilityResponse; } + /** + * Get the datacenterAddressResponse property: Datacenter address for given sku in a region. + * + * @return the datacenterAddressResponse value. + */ + public DatacenterAddressResponse datacenterAddressResponse() { + return this.datacenterAddressResponse; + } + /** * Validates the instance. * @@ -58,5 +74,8 @@ public void validate() { if (transportAvailabilityResponse() != null) { transportAvailabilityResponse().validate(); } + if (datacenterAddressResponse() != null) { + datacenterAddressResponse().validate(); + } } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/SkuInformationInner.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/SkuInformationInner.java index 9da448b125989..5a2e7bee87b80 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/SkuInformationInner.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/SkuInformationInner.java @@ -128,6 +128,16 @@ public String requiredFeature() { return this.innerProperties() == null ? null : this.innerProperties().requiredFeature(); } + /** + * Get the countriesWithinCommerceBoundary property: List of all the Countries in the SKU specific commerce + * boundary. + * + * @return the countriesWithinCommerceBoundary value. + */ + public List countriesWithinCommerceBoundary() { + return this.innerProperties() == null ? null : this.innerProperties().countriesWithinCommerceBoundary(); + } + /** * Validates the instance. * diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/SkuProperties.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/SkuProperties.java index 7f1e60abf3afd..814405d4f85ca 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/SkuProperties.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/SkuProperties.java @@ -57,6 +57,12 @@ public final class SkuProperties { @JsonProperty(value = "requiredFeature", access = JsonProperty.Access.WRITE_ONLY) private String requiredFeature; + /* + * List of all the Countries in the SKU specific commerce boundary + */ + @JsonProperty(value = "countriesWithinCommerceBoundary", access = JsonProperty.Access.WRITE_ONLY) + private List countriesWithinCommerceBoundary; + /** Creates an instance of SkuProperties class. */ public SkuProperties() { } @@ -124,6 +130,16 @@ public String requiredFeature() { return this.requiredFeature; } + /** + * Get the countriesWithinCommerceBoundary property: List of all the Countries in the SKU specific commerce + * boundary. + * + * @return the countriesWithinCommerceBoundary value. + */ + public List countriesWithinCommerceBoundary() { + return this.countriesWithinCommerceBoundary; + } + /** * Validates the instance. * diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/DataBoxManagementClientImpl.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/DataBoxManagementClientImpl.java index 48b6d63293aca..ad926e5b679ab 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/DataBoxManagementClientImpl.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/DataBoxManagementClientImpl.java @@ -181,7 +181,7 @@ public ServicesClient getServices() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2021-03-01"; + this.apiVersion = "2022-12-01"; this.operations = new OperationsClientImpl(this); this.jobs = new JobsClientImpl(this); this.resourceProviders = new ResourceProvidersClientImpl(this); diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobResourceImpl.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobResourceImpl.java index 338b274c9be98..fb03aba9fbb55 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobResourceImpl.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobResourceImpl.java @@ -17,7 +17,10 @@ import com.azure.resourcemanager.databox.models.JobDetails; import com.azure.resourcemanager.databox.models.JobResource; import com.azure.resourcemanager.databox.models.JobResourceUpdateParameter; +import com.azure.resourcemanager.databox.models.MarkDevicesShippedRequest; import com.azure.resourcemanager.databox.models.ResourceIdentity; +import com.azure.resourcemanager.databox.models.ReverseShippingDetailsEditStatus; +import com.azure.resourcemanager.databox.models.ReverseTransportPreferenceEditStatus; import com.azure.resourcemanager.databox.models.ShipmentPickUpRequest; import com.azure.resourcemanager.databox.models.ShipmentPickUpResponse; import com.azure.resourcemanager.databox.models.Sku; @@ -87,6 +90,14 @@ public Boolean isShippingAddressEditable() { return this.innerModel().isShippingAddressEditable(); } + public ReverseShippingDetailsEditStatus reverseShippingDetailsUpdate() { + return this.innerModel().reverseShippingDetailsUpdate(); + } + + public ReverseTransportPreferenceEditStatus reverseTransportPreferenceUpdate() { + return this.innerModel().reverseTransportPreferenceUpdate(); + } + public Boolean isPrepareToShipEnabled() { return this.innerModel().isPrepareToShipEnabled(); } @@ -230,6 +241,17 @@ public JobResource refresh(Context context) { return this; } + public Response markDevicesShippedWithResponse( + MarkDevicesShippedRequest markDevicesShippedRequest, Context context) { + return serviceManager + .jobs() + .markDevicesShippedWithResponse(jobName, resourceGroupName, markDevicesShippedRequest, context); + } + + public void markDevicesShipped(MarkDevicesShippedRequest markDevicesShippedRequest) { + serviceManager.jobs().markDevicesShipped(jobName, resourceGroupName, markDevicesShippedRequest); + } + public Response bookShipmentPickUpWithResponse( ShipmentPickUpRequest shipmentPickUpRequest, Context context) { return serviceManager diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobsClientImpl.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobsClientImpl.java index 5f2cced935e13..2e3d97c513327 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobsClientImpl.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobsClientImpl.java @@ -40,6 +40,7 @@ import com.azure.resourcemanager.databox.models.CancellationReason; import com.azure.resourcemanager.databox.models.JobResourceList; import com.azure.resourcemanager.databox.models.JobResourceUpdateParameter; +import com.azure.resourcemanager.databox.models.MarkDevicesShippedRequest; import com.azure.resourcemanager.databox.models.ShipmentPickUpRequest; import com.azure.resourcemanager.databox.models.UnencryptedCredentialsList; import java.nio.ByteBuffer; @@ -83,6 +84,22 @@ Mono> list( @HeaderParam("Accept") String accept, Context context); + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs" + + "/{jobName}/markDevicesShipped") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> markDevicesShipped( + @HostParam("$host") String endpoint, + @PathParam("jobName") String jobName, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") MarkDevicesShippedRequest markDevicesShippedRequest, + @HeaderParam("Accept") String accept, + Context context); + @Headers({"Content-Type: application/json"}) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs") @ExpectedResponses({200}) @@ -391,6 +408,184 @@ public PagedIterable list(String skipToken, Context context) { return new PagedIterable<>(listAsync(skipToken, context)); } + /** + * Request to mark devices for a given job as shipped. + * + * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and + * 24 characters in length and use any alphanumeric and underscore only. + * @param resourceGroupName The Resource Group Name. + * @param markDevicesShippedRequest Mark Devices Shipped Request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> markDevicesShippedWithResponseAsync( + String jobName, String resourceGroupName, MarkDevicesShippedRequest markDevicesShippedRequest) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (jobName == null) { + return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (markDevicesShippedRequest == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter markDevicesShippedRequest is required and cannot be null.")); + } else { + markDevicesShippedRequest.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .markDevicesShipped( + this.client.getEndpoint(), + jobName, + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + markDevicesShippedRequest, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Request to mark devices for a given job as shipped. + * + * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and + * 24 characters in length and use any alphanumeric and underscore only. + * @param resourceGroupName The Resource Group Name. + * @param markDevicesShippedRequest Mark Devices Shipped Request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> markDevicesShippedWithResponseAsync( + String jobName, + String resourceGroupName, + MarkDevicesShippedRequest markDevicesShippedRequest, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (jobName == null) { + return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (markDevicesShippedRequest == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter markDevicesShippedRequest is required and cannot be null.")); + } else { + markDevicesShippedRequest.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .markDevicesShipped( + this.client.getEndpoint(), + jobName, + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + markDevicesShippedRequest, + accept, + context); + } + + /** + * Request to mark devices for a given job as shipped. + * + * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and + * 24 characters in length and use any alphanumeric and underscore only. + * @param resourceGroupName The Resource Group Name. + * @param markDevicesShippedRequest Mark Devices Shipped Request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono markDevicesShippedAsync( + String jobName, String resourceGroupName, MarkDevicesShippedRequest markDevicesShippedRequest) { + return markDevicesShippedWithResponseAsync(jobName, resourceGroupName, markDevicesShippedRequest) + .flatMap(ignored -> Mono.empty()); + } + + /** + * Request to mark devices for a given job as shipped. + * + * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and + * 24 characters in length and use any alphanumeric and underscore only. + * @param resourceGroupName The Resource Group Name. + * @param markDevicesShippedRequest Mark Devices Shipped Request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response markDevicesShippedWithResponse( + String jobName, + String resourceGroupName, + MarkDevicesShippedRequest markDevicesShippedRequest, + Context context) { + return markDevicesShippedWithResponseAsync(jobName, resourceGroupName, markDevicesShippedRequest, context) + .block(); + } + + /** + * Request to mark devices for a given job as shipped. + * + * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and + * 24 characters in length and use any alphanumeric and underscore only. + * @param resourceGroupName The Resource Group Name. + * @param markDevicesShippedRequest Mark Devices Shipped Request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void markDevicesShipped( + String jobName, String resourceGroupName, MarkDevicesShippedRequest markDevicesShippedRequest) { + markDevicesShippedWithResponse(jobName, resourceGroupName, markDevicesShippedRequest, Context.NONE); + } + /** * Lists all the jobs available under the given resource group. * diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobsImpl.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobsImpl.java index bc67caf627c4d..4de620b3e9294 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobsImpl.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobsImpl.java @@ -16,6 +16,7 @@ import com.azure.resourcemanager.databox.models.CancellationReason; import com.azure.resourcemanager.databox.models.JobResource; import com.azure.resourcemanager.databox.models.Jobs; +import com.azure.resourcemanager.databox.models.MarkDevicesShippedRequest; import com.azure.resourcemanager.databox.models.ShipmentPickUpRequest; import com.azure.resourcemanager.databox.models.ShipmentPickUpResponse; import com.azure.resourcemanager.databox.models.UnencryptedCredentials; @@ -42,6 +43,21 @@ public PagedIterable list(String skipToken, Context context) { return Utils.mapPage(inner, inner1 -> new JobResourceImpl(inner1, this.manager())); } + public Response markDevicesShippedWithResponse( + String jobName, + String resourceGroupName, + MarkDevicesShippedRequest markDevicesShippedRequest, + Context context) { + return this + .serviceClient() + .markDevicesShippedWithResponse(jobName, resourceGroupName, markDevicesShippedRequest, context); + } + + public void markDevicesShipped( + String jobName, String resourceGroupName, MarkDevicesShippedRequest markDevicesShippedRequest) { + this.serviceClient().markDevicesShipped(jobName, resourceGroupName, markDevicesShippedRequest); + } + public PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); return Utils.mapPage(inner, inner1 -> new JobResourceImpl(inner1, this.manager())); diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/RegionConfigurationResponseImpl.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/RegionConfigurationResponseImpl.java index c353222533c18..5b072243eaf9a 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/RegionConfigurationResponseImpl.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/RegionConfigurationResponseImpl.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.databox.implementation; import com.azure.resourcemanager.databox.fluent.models.RegionConfigurationResponseInner; +import com.azure.resourcemanager.databox.models.DatacenterAddressResponse; import com.azure.resourcemanager.databox.models.RegionConfigurationResponse; import com.azure.resourcemanager.databox.models.ScheduleAvailabilityResponse; import com.azure.resourcemanager.databox.models.TransportAvailabilityResponse; @@ -28,6 +29,10 @@ public TransportAvailabilityResponse transportAvailabilityResponse() { return this.innerModel().transportAvailabilityResponse(); } + public DatacenterAddressResponse datacenterAddressResponse() { + return this.innerModel().datacenterAddressResponse(); + } + public RegionConfigurationResponseInner innerModel() { return this.innerObject; } diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/SkuInformationImpl.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/SkuInformationImpl.java index deced71a9bc19..5a0e9b3a75978 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/SkuInformationImpl.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/SkuInformationImpl.java @@ -76,6 +76,15 @@ public String requiredFeature() { return this.innerModel().requiredFeature(); } + public List countriesWithinCommerceBoundary() { + List inner = this.innerModel().countriesWithinCommerceBoundary(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + public SkuInformationInner innerModel() { return this.innerObject; } diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AdditionalErrorInfo.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AdditionalErrorInfo.java index e915e89566f84..02820674bc7b1 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AdditionalErrorInfo.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AdditionalErrorInfo.java @@ -7,62 +7,62 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Additional error info. */ +/** This class represents additional info which Resource Providers pass when an error occurs. */ @Fluent public final class AdditionalErrorInfo { /* - * Additional error type. + * Additional information of the type of error. */ - @JsonProperty(value = "type") - private String type; + @JsonProperty(value = "info") + private Object info; /* - * Additional error info. + * Type of error (e.g. CustomerIntervention, PolicyViolation, SecurityViolation). */ - @JsonProperty(value = "info") - private Object info; + @JsonProperty(value = "type") + private String type; /** Creates an instance of AdditionalErrorInfo class. */ public AdditionalErrorInfo() { } /** - * Get the type property: Additional error type. + * Get the info property: Additional information of the type of error. * - * @return the type value. + * @return the info value. */ - public String type() { - return this.type; + public Object info() { + return this.info; } /** - * Set the type property: Additional error type. + * Set the info property: Additional information of the type of error. * - * @param type the type value to set. + * @param info the info value to set. * @return the AdditionalErrorInfo object itself. */ - public AdditionalErrorInfo withType(String type) { - this.type = type; + public AdditionalErrorInfo withInfo(Object info) { + this.info = info; return this; } /** - * Get the info property: Additional error info. + * Get the type property: Type of error (e.g. CustomerIntervention, PolicyViolation, SecurityViolation). * - * @return the info value. + * @return the type value. */ - public Object info() { - return this.info; + public String type() { + return this.type; } /** - * Set the info property: Additional error info. + * Set the type property: Type of error (e.g. CustomerIntervention, PolicyViolation, SecurityViolation). * - * @param info the info value to set. + * @param type the type value to set. * @return the AdditionalErrorInfo object itself. */ - public AdditionalErrorInfo withInfo(Object info) { - this.info = info; + public AdditionalErrorInfo withType(String type) { + this.type = type; return this; } diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ClassDiscriminator.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ClassDiscriminator.java index 5ff667a948e9d..cc7439da658e1 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ClassDiscriminator.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ClassDiscriminator.java @@ -16,7 +16,10 @@ public enum ClassDiscriminator { DATA_BOX_DISK("DataBoxDisk"), /** Enum value DataBoxHeavy. */ - DATA_BOX_HEAVY("DataBoxHeavy"); + DATA_BOX_HEAVY("DataBoxHeavy"), + + /** Enum value DataBoxCustomerDisk. */ + DATA_BOX_CUSTOMER_DISK("DataBoxCustomerDisk"); /** The actual serialized value for a ClassDiscriminator instance. */ private final String value; diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CloudError.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CloudError.java index 7d7a9e5044ccb..3b14e6519b4f5 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CloudError.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CloudError.java @@ -8,45 +8,54 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Cloud error. */ +/** Provides additional information about an http error response. */ @Fluent public final class CloudError { /* - * Cloud error code. + * Gets or sets additional error info. */ - @JsonProperty(value = "code") - private String code; + @JsonProperty(value = "additionalInfo", access = JsonProperty.Access.WRITE_ONLY) + private List additionalInfo; /* - * Cloud error message. + * Error code. */ - @JsonProperty(value = "message") - private String message; + @JsonProperty(value = "code") + private String code; /* - * Cloud error target. + * Gets or sets details for the error. */ - @JsonProperty(value = "target") - private String target; + @JsonProperty(value = "details", access = JsonProperty.Access.WRITE_ONLY) + private List details; /* - * Cloud error details. + * The error message parsed from the body of the http error response. */ - @JsonProperty(value = "details", access = JsonProperty.Access.WRITE_ONLY) - private List details; + @JsonProperty(value = "message") + private String message; /* - * Cloud error additional info. + * Gets or sets the target of the error. */ - @JsonProperty(value = "additionalInfo", access = JsonProperty.Access.WRITE_ONLY) - private List additionalInfo; + @JsonProperty(value = "target") + private String target; /** Creates an instance of CloudError class. */ public CloudError() { } /** - * Get the code property: Cloud error code. + * Get the additionalInfo property: Gets or sets additional error info. + * + * @return the additionalInfo value. + */ + public List additionalInfo() { + return this.additionalInfo; + } + + /** + * Get the code property: Error code. * * @return the code value. */ @@ -55,7 +64,7 @@ public String code() { } /** - * Set the code property: Cloud error code. + * Set the code property: Error code. * * @param code the code value to set. * @return the CloudError object itself. @@ -66,7 +75,16 @@ public CloudError withCode(String code) { } /** - * Get the message property: Cloud error message. + * Get the details property: Gets or sets details for the error. + * + * @return the details value. + */ + public List details() { + return this.details; + } + + /** + * Get the message property: The error message parsed from the body of the http error response. * * @return the message value. */ @@ -75,7 +93,7 @@ public String message() { } /** - * Set the message property: Cloud error message. + * Set the message property: The error message parsed from the body of the http error response. * * @param message the message value to set. * @return the CloudError object itself. @@ -86,7 +104,7 @@ public CloudError withMessage(String message) { } /** - * Get the target property: Cloud error target. + * Get the target property: Gets or sets the target of the error. * * @return the target value. */ @@ -95,7 +113,7 @@ public String target() { } /** - * Set the target property: Cloud error target. + * Set the target property: Gets or sets the target of the error. * * @param target the target value to set. * @return the CloudError object itself. @@ -105,35 +123,17 @@ public CloudError withTarget(String target) { return this; } - /** - * Get the details property: Cloud error details. - * - * @return the details value. - */ - public List details() { - return this.details; - } - - /** - * Get the additionalInfo property: Cloud error additional info. - * - * @return the additionalInfo value. - */ - public List additionalInfo() { - return this.additionalInfo; - } - /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (details() != null) { - details().forEach(e -> e.validate()); - } if (additionalInfo() != null) { additionalInfo().forEach(e -> e.validate()); } + if (details() != null) { + details().forEach(e -> e.validate()); + } } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ContactInfo.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ContactInfo.java new file mode 100644 index 0000000000000..0388ea606435c --- /dev/null +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ContactInfo.java @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databox.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Contact Info. */ +@Fluent +public final class ContactInfo { + /* + * Contact name of the person. + */ + @JsonProperty(value = "contactName", required = true) + private String contactName; + + /* + * Phone number of the contact person. + */ + @JsonProperty(value = "phone", required = true) + private String phone; + + /* + * Phone extension number of the contact person. + */ + @JsonProperty(value = "phoneExtension") + private String phoneExtension; + + /* + * Mobile number of the contact person. + */ + @JsonProperty(value = "mobile") + private String mobile; + + /** Creates an instance of ContactInfo class. */ + public ContactInfo() { + } + + /** + * Get the contactName property: Contact name of the person. + * + * @return the contactName value. + */ + public String contactName() { + return this.contactName; + } + + /** + * Set the contactName property: Contact name of the person. + * + * @param contactName the contactName value to set. + * @return the ContactInfo object itself. + */ + public ContactInfo withContactName(String contactName) { + this.contactName = contactName; + return this; + } + + /** + * Get the phone property: Phone number of the contact person. + * + * @return the phone value. + */ + public String phone() { + return this.phone; + } + + /** + * Set the phone property: Phone number of the contact person. + * + * @param phone the phone value to set. + * @return the ContactInfo object itself. + */ + public ContactInfo withPhone(String phone) { + this.phone = phone; + return this; + } + + /** + * Get the phoneExtension property: Phone extension number of the contact person. + * + * @return the phoneExtension value. + */ + public String phoneExtension() { + return this.phoneExtension; + } + + /** + * Set the phoneExtension property: Phone extension number of the contact person. + * + * @param phoneExtension the phoneExtension value to set. + * @return the ContactInfo object itself. + */ + public ContactInfo withPhoneExtension(String phoneExtension) { + this.phoneExtension = phoneExtension; + return this; + } + + /** + * Get the mobile property: Mobile number of the contact person. + * + * @return the mobile value. + */ + public String mobile() { + return this.mobile; + } + + /** + * Set the mobile property: Mobile number of the contact person. + * + * @param mobile the mobile value to set. + * @return the ContactInfo object itself. + */ + public ContactInfo withMobile(String mobile) { + this.mobile = mobile; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (contactName() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property contactName in model ContactInfo")); + } + if (phone() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property phone in model ContactInfo")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ContactInfo.class); +} diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CopyLogDetails.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CopyLogDetails.java index 0a46512861654..028fea00319e0 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CopyLogDetails.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CopyLogDetails.java @@ -18,6 +18,7 @@ @JsonTypeName("CopyLogDetails") @JsonSubTypes({ @JsonSubTypes.Type(name = "DataBox", value = DataBoxAccountCopyLogDetails.class), + @JsonSubTypes.Type(name = "DataBoxCustomerDisk", value = DataBoxCustomerDiskCopyLogDetails.class), @JsonSubTypes.Type(name = "DataBoxDisk", value = DataBoxDiskCopyLogDetails.class), @JsonSubTypes.Type(name = "DataBoxHeavy", value = DataBoxHeavyAccountCopyLogDetails.class) }) diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CopyProgress.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CopyProgress.java index 128b05c52422c..6526be1f7a185 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CopyProgress.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CopyProgress.java @@ -9,7 +9,7 @@ /** Copy progress. */ @Immutable -public final class CopyProgress { +public class CopyProgress { /* * Name of the storage account. This will be empty for data account types other than storage account. */ diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CopyStatus.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CopyStatus.java index d293bdd47a8ae..2eb173e62a077 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CopyStatus.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CopyStatus.java @@ -4,75 +4,92 @@ package com.azure.resourcemanager.databox.models; +import com.azure.core.util.ExpandableStringEnum; import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; /** The Status of the copy. */ -public enum CopyStatus { - /** Enum value NotStarted. */ - NOT_STARTED("NotStarted"), +public final class CopyStatus extends ExpandableStringEnum { + /** Static value NotStarted for CopyStatus. */ + public static final CopyStatus NOT_STARTED = fromString("NotStarted"); - /** Enum value InProgress. */ - IN_PROGRESS("InProgress"), + /** Static value InProgress for CopyStatus. */ + public static final CopyStatus IN_PROGRESS = fromString("InProgress"); - /** Enum value Completed. */ - COMPLETED("Completed"), + /** Static value Completed for CopyStatus. */ + public static final CopyStatus COMPLETED = fromString("Completed"); - /** Enum value CompletedWithErrors. */ - COMPLETED_WITH_ERRORS("CompletedWithErrors"), + /** Static value CompletedWithErrors for CopyStatus. */ + public static final CopyStatus COMPLETED_WITH_ERRORS = fromString("CompletedWithErrors"); - /** Enum value Failed. */ - FAILED("Failed"), + /** Static value Failed for CopyStatus. */ + public static final CopyStatus FAILED = fromString("Failed"); - /** Enum value NotReturned. */ - NOT_RETURNED("NotReturned"), + /** Static value NotReturned for CopyStatus. */ + public static final CopyStatus NOT_RETURNED = fromString("NotReturned"); - /** Enum value HardwareError. */ - HARDWARE_ERROR("HardwareError"), + /** Static value HardwareError for CopyStatus. */ + public static final CopyStatus HARDWARE_ERROR = fromString("HardwareError"); - /** Enum value DeviceFormatted. */ - DEVICE_FORMATTED("DeviceFormatted"), + /** Static value DeviceFormatted for CopyStatus. */ + public static final CopyStatus DEVICE_FORMATTED = fromString("DeviceFormatted"); - /** Enum value DeviceMetadataModified. */ - DEVICE_METADATA_MODIFIED("DeviceMetadataModified"), + /** Static value DeviceMetadataModified for CopyStatus. */ + public static final CopyStatus DEVICE_METADATA_MODIFIED = fromString("DeviceMetadataModified"); - /** Enum value StorageAccountNotAccessible. */ - STORAGE_ACCOUNT_NOT_ACCESSIBLE("StorageAccountNotAccessible"), + /** Static value StorageAccountNotAccessible for CopyStatus. */ + public static final CopyStatus STORAGE_ACCOUNT_NOT_ACCESSIBLE = fromString("StorageAccountNotAccessible"); - /** Enum value UnsupportedData. */ - UNSUPPORTED_DATA("UnsupportedData"); + /** Static value UnsupportedData for CopyStatus. */ + public static final CopyStatus UNSUPPORTED_DATA = fromString("UnsupportedData"); - /** The actual serialized value for a CopyStatus instance. */ - private final String value; + /** Static value DriveNotReceived for CopyStatus. */ + public static final CopyStatus DRIVE_NOT_RECEIVED = fromString("DriveNotReceived"); - CopyStatus(String value) { - this.value = value; + /** Static value UnsupportedDrive for CopyStatus. */ + public static final CopyStatus UNSUPPORTED_DRIVE = fromString("UnsupportedDrive"); + + /** Static value OtherServiceError for CopyStatus. */ + public static final CopyStatus OTHER_SERVICE_ERROR = fromString("OtherServiceError"); + + /** Static value OtherUserError for CopyStatus. */ + public static final CopyStatus OTHER_USER_ERROR = fromString("OtherUserError"); + + /** Static value DriveNotDetected for CopyStatus. */ + public static final CopyStatus DRIVE_NOT_DETECTED = fromString("DriveNotDetected"); + + /** Static value DriveCorrupted for CopyStatus. */ + public static final CopyStatus DRIVE_CORRUPTED = fromString("DriveCorrupted"); + + /** Static value MetadataFilesModifiedOrRemoved for CopyStatus. */ + public static final CopyStatus METADATA_FILES_MODIFIED_OR_REMOVED = fromString("MetadataFilesModifiedOrRemoved"); + + /** + * Creates a new instance of CopyStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CopyStatus() { } /** - * Parses a serialized value to a CopyStatus instance. + * Creates or finds a CopyStatus from its string representation. * - * @param value the serialized value to parse. - * @return the parsed CopyStatus object, or null if unable to parse. + * @param name a name to look for. + * @return the corresponding CopyStatus. */ @JsonCreator - public static CopyStatus fromString(String value) { - if (value == null) { - return null; - } - CopyStatus[] items = CopyStatus.values(); - for (CopyStatus item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; + public static CopyStatus fromString(String name) { + return fromString(name, CopyStatus.class); } - /** {@inheritDoc} */ - @JsonValue - @Override - public String toString() { - return this.value; + /** + * Gets known CopyStatus values. + * + * @return known CopyStatus values. + */ + public static Collection values() { + return values(CopyStatus.class); } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CustomerDiskJobSecrets.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CustomerDiskJobSecrets.java new file mode 100644 index 0000000000000..fa8ed81857fd1 --- /dev/null +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CustomerDiskJobSecrets.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databox.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; + +/** The secrets related to customer disk job. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobSecretsType") +@JsonTypeName("DataBoxCustomerDisk") +@Immutable +public final class CustomerDiskJobSecrets extends JobSecrets { + /* + * Contains the list of secrets object for that device. + */ + @JsonProperty(value = "diskSecrets", access = JsonProperty.Access.WRITE_ONLY) + private List diskSecrets; + + /* + * Carrier Account Number of the customer + */ + @JsonProperty(value = "carrierAccountNumber", access = JsonProperty.Access.WRITE_ONLY) + private String carrierAccountNumber; + + /** Creates an instance of CustomerDiskJobSecrets class. */ + public CustomerDiskJobSecrets() { + } + + /** + * Get the diskSecrets property: Contains the list of secrets object for that device. + * + * @return the diskSecrets value. + */ + public List diskSecrets() { + return this.diskSecrets; + } + + /** + * Get the carrierAccountNumber property: Carrier Account Number of the customer. + * + * @return the carrierAccountNumber value. + */ + public String carrierAccountNumber() { + return this.carrierAccountNumber; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (diskSecrets() != null) { + diskSecrets().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CustomerResolutionCode.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CustomerResolutionCode.java index 12d94639deb3b..f861725afc3bd 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CustomerResolutionCode.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/CustomerResolutionCode.java @@ -16,7 +16,13 @@ public enum CustomerResolutionCode { MOVE_TO_CLEAN_UP_DEVICE("MoveToCleanUpDevice"), /** Enum value Resume. */ - RESUME("Resume"); + RESUME("Resume"), + + /** Enum value Restart. */ + RESTART("Restart"), + + /** Enum value ReachOutToOperation. */ + REACH_OUT_TO_OPERATION("ReachOutToOperation"); /** The actual serialized value for a CustomerResolutionCode instance. */ private final String value; diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxCustomerDiskCopyLogDetails.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxCustomerDiskCopyLogDetails.java new file mode 100644 index 0000000000000..6a004d31f9b8b --- /dev/null +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxCustomerDiskCopyLogDetails.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databox.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Copy Log Details for customer disk. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "copyLogDetailsType") +@JsonTypeName("DataBoxCustomerDisk") +@Immutable +public final class DataBoxCustomerDiskCopyLogDetails extends CopyLogDetails { + /* + * Disk Serial Number. + */ + @JsonProperty(value = "serialNumber", access = JsonProperty.Access.WRITE_ONLY) + private String serialNumber; + + /* + * Link for copy error logs. + */ + @JsonProperty(value = "errorLogLink", access = JsonProperty.Access.WRITE_ONLY) + private String errorLogLink; + + /* + * Link for copy verbose logs. + */ + @JsonProperty(value = "verboseLogLink", access = JsonProperty.Access.WRITE_ONLY) + private String verboseLogLink; + + /** Creates an instance of DataBoxCustomerDiskCopyLogDetails class. */ + public DataBoxCustomerDiskCopyLogDetails() { + } + + /** + * Get the serialNumber property: Disk Serial Number. + * + * @return the serialNumber value. + */ + public String serialNumber() { + return this.serialNumber; + } + + /** + * Get the errorLogLink property: Link for copy error logs. + * + * @return the errorLogLink value. + */ + public String errorLogLink() { + return this.errorLogLink; + } + + /** + * Get the verboseLogLink property: Link for copy verbose logs. + * + * @return the verboseLogLink value. + */ + public String verboseLogLink() { + return this.verboseLogLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxCustomerDiskCopyProgress.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxCustomerDiskCopyProgress.java new file mode 100644 index 0000000000000..c390d1d946d8b --- /dev/null +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxCustomerDiskCopyProgress.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databox.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** DataBox CustomerDisk Copy Progress. */ +@Immutable +public final class DataBoxCustomerDiskCopyProgress extends CopyProgress { + /* + * Disk Serial Number. + */ + @JsonProperty(value = "serialNumber", access = JsonProperty.Access.WRITE_ONLY) + private String serialNumber; + + /* + * The Status of the copy + */ + @JsonProperty(value = "copyStatus", access = JsonProperty.Access.WRITE_ONLY) + private CopyStatus copyStatus; + + /** Creates an instance of DataBoxCustomerDiskCopyProgress class. */ + public DataBoxCustomerDiskCopyProgress() { + } + + /** + * Get the serialNumber property: Disk Serial Number. + * + * @return the serialNumber value. + */ + public String serialNumber() { + return this.serialNumber; + } + + /** + * Get the copyStatus property: The Status of the copy. + * + * @return the copyStatus value. + */ + public CopyStatus copyStatus() { + return this.copyStatus; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxCustomerDiskJobDetails.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxCustomerDiskJobDetails.java new file mode 100644 index 0000000000000..cd793d24e42f7 --- /dev/null +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxCustomerDiskJobDetails.java @@ -0,0 +1,259 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databox.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; +import java.util.Map; + +/** Customer disk job details. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobDetailsType") +@JsonTypeName("DataBoxCustomerDisk") +@Fluent +public final class DataBoxCustomerDiskJobDetails extends JobDetails { + /* + * Contains the map of disk serial number to the disk details for import jobs. + */ + @JsonProperty(value = "importDiskDetailsCollection") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map importDiskDetailsCollection; + + /* + * Contains the map of disk serial number to the disk details for export jobs. + */ + @JsonProperty(value = "exportDiskDetailsCollection", access = JsonProperty.Access.WRITE_ONLY) + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map exportDiskDetailsCollection; + + /* + * Copy progress per disk. + */ + @JsonProperty(value = "copyProgress", access = JsonProperty.Access.WRITE_ONLY) + private List copyProgress; + + /* + * Delivery package shipping details. + */ + @JsonProperty(value = "deliverToDcPackageDetails", access = JsonProperty.Access.WRITE_ONLY) + private PackageCarrierInfo deliverToDcPackageDetails; + + /* + * Return package shipping details. + */ + @JsonProperty(value = "returnToCustomerPackageDetails", required = true) + private PackageCarrierDetails returnToCustomerPackageDetails; + + /* + * Flag to indicate if disk manifest should be backed-up in the Storage Account. + */ + @JsonProperty(value = "enableManifestBackup") + private Boolean enableManifestBackup; + + /** Creates an instance of DataBoxCustomerDiskJobDetails class. */ + public DataBoxCustomerDiskJobDetails() { + } + + /** + * Get the importDiskDetailsCollection property: Contains the map of disk serial number to the disk details for + * import jobs. + * + * @return the importDiskDetailsCollection value. + */ + public Map importDiskDetailsCollection() { + return this.importDiskDetailsCollection; + } + + /** + * Set the importDiskDetailsCollection property: Contains the map of disk serial number to the disk details for + * import jobs. + * + * @param importDiskDetailsCollection the importDiskDetailsCollection value to set. + * @return the DataBoxCustomerDiskJobDetails object itself. + */ + public DataBoxCustomerDiskJobDetails withImportDiskDetailsCollection( + Map importDiskDetailsCollection) { + this.importDiskDetailsCollection = importDiskDetailsCollection; + return this; + } + + /** + * Get the exportDiskDetailsCollection property: Contains the map of disk serial number to the disk details for + * export jobs. + * + * @return the exportDiskDetailsCollection value. + */ + public Map exportDiskDetailsCollection() { + return this.exportDiskDetailsCollection; + } + + /** + * Get the copyProgress property: Copy progress per disk. + * + * @return the copyProgress value. + */ + public List copyProgress() { + return this.copyProgress; + } + + /** + * Get the deliverToDcPackageDetails property: Delivery package shipping details. + * + * @return the deliverToDcPackageDetails value. + */ + public PackageCarrierInfo deliverToDcPackageDetails() { + return this.deliverToDcPackageDetails; + } + + /** + * Get the returnToCustomerPackageDetails property: Return package shipping details. + * + * @return the returnToCustomerPackageDetails value. + */ + public PackageCarrierDetails returnToCustomerPackageDetails() { + return this.returnToCustomerPackageDetails; + } + + /** + * Set the returnToCustomerPackageDetails property: Return package shipping details. + * + * @param returnToCustomerPackageDetails the returnToCustomerPackageDetails value to set. + * @return the DataBoxCustomerDiskJobDetails object itself. + */ + public DataBoxCustomerDiskJobDetails withReturnToCustomerPackageDetails( + PackageCarrierDetails returnToCustomerPackageDetails) { + this.returnToCustomerPackageDetails = returnToCustomerPackageDetails; + return this; + } + + /** + * Get the enableManifestBackup property: Flag to indicate if disk manifest should be backed-up in the Storage + * Account. + * + * @return the enableManifestBackup value. + */ + public Boolean enableManifestBackup() { + return this.enableManifestBackup; + } + + /** + * Set the enableManifestBackup property: Flag to indicate if disk manifest should be backed-up in the Storage + * Account. + * + * @param enableManifestBackup the enableManifestBackup value to set. + * @return the DataBoxCustomerDiskJobDetails object itself. + */ + public DataBoxCustomerDiskJobDetails withEnableManifestBackup(Boolean enableManifestBackup) { + this.enableManifestBackup = enableManifestBackup; + return this; + } + + /** {@inheritDoc} */ + @Override + public DataBoxCustomerDiskJobDetails withContactDetails(ContactDetails contactDetails) { + super.withContactDetails(contactDetails); + return this; + } + + /** {@inheritDoc} */ + @Override + public DataBoxCustomerDiskJobDetails withShippingAddress(ShippingAddress shippingAddress) { + super.withShippingAddress(shippingAddress); + return this; + } + + /** {@inheritDoc} */ + @Override + public DataBoxCustomerDiskJobDetails withDataImportDetails(List dataImportDetails) { + super.withDataImportDetails(dataImportDetails); + return this; + } + + /** {@inheritDoc} */ + @Override + public DataBoxCustomerDiskJobDetails withDataExportDetails(List dataExportDetails) { + super.withDataExportDetails(dataExportDetails); + return this; + } + + /** {@inheritDoc} */ + @Override + public DataBoxCustomerDiskJobDetails withPreferences(Preferences preferences) { + super.withPreferences(preferences); + return this; + } + + /** {@inheritDoc} */ + @Override + public DataBoxCustomerDiskJobDetails withReverseShippingDetails(ReverseShippingDetails reverseShippingDetails) { + super.withReverseShippingDetails(reverseShippingDetails); + return this; + } + + /** {@inheritDoc} */ + @Override + public DataBoxCustomerDiskJobDetails withKeyEncryptionKey(KeyEncryptionKey keyEncryptionKey) { + super.withKeyEncryptionKey(keyEncryptionKey); + return this; + } + + /** {@inheritDoc} */ + @Override + public DataBoxCustomerDiskJobDetails withExpectedDataSizeInTeraBytes(Integer expectedDataSizeInTeraBytes) { + super.withExpectedDataSizeInTeraBytes(expectedDataSizeInTeraBytes); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (importDiskDetailsCollection() != null) { + importDiskDetailsCollection() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } + if (exportDiskDetailsCollection() != null) { + exportDiskDetailsCollection() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } + if (copyProgress() != null) { + copyProgress().forEach(e -> e.validate()); + } + if (deliverToDcPackageDetails() != null) { + deliverToDcPackageDetails().validate(); + } + if (returnToCustomerPackageDetails() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property returnToCustomerPackageDetails in model" + + " DataBoxCustomerDiskJobDetails")); + } else { + returnToCustomerPackageDetails().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DataBoxCustomerDiskJobDetails.class); +} diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxDiskGranularCopyLogDetails.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxDiskGranularCopyLogDetails.java new file mode 100644 index 0000000000000..e20ab2537ebb8 --- /dev/null +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxDiskGranularCopyLogDetails.java @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databox.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Granular Copy Log Details for customer disk. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "copyLogDetailsType") +@JsonTypeName("DataBoxCustomerDisk") +@Immutable +public final class DataBoxDiskGranularCopyLogDetails extends GranularCopyLogDetails { + /* + * Disk Serial Number. + */ + @JsonProperty(value = "serialNumber", access = JsonProperty.Access.WRITE_ONLY) + private String serialNumber; + + /* + * Account id. + */ + @JsonProperty(value = "accountId", access = JsonProperty.Access.WRITE_ONLY) + private String accountId; + + /* + * Link for copy error logs. + */ + @JsonProperty(value = "errorLogLink", access = JsonProperty.Access.WRITE_ONLY) + private String errorLogLink; + + /* + * Link for copy verbose logs. + */ + @JsonProperty(value = "verboseLogLink", access = JsonProperty.Access.WRITE_ONLY) + private String verboseLogLink; + + /** Creates an instance of DataBoxDiskGranularCopyLogDetails class. */ + public DataBoxDiskGranularCopyLogDetails() { + } + + /** + * Get the serialNumber property: Disk Serial Number. + * + * @return the serialNumber value. + */ + public String serialNumber() { + return this.serialNumber; + } + + /** + * Get the accountId property: Account id. + * + * @return the accountId value. + */ + public String accountId() { + return this.accountId; + } + + /** + * Get the errorLogLink property: Link for copy error logs. + * + * @return the errorLogLink value. + */ + public String errorLogLink() { + return this.errorLogLink; + } + + /** + * Get the verboseLogLink property: Link for copy verbose logs. + * + * @return the verboseLogLink value. + */ + public String verboseLogLink() { + return this.verboseLogLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxDiskGranularCopyProgress.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxDiskGranularCopyProgress.java new file mode 100644 index 0000000000000..fee969a8d90a8 --- /dev/null +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxDiskGranularCopyProgress.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databox.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** DataBox Disk Granular Copy Progress. */ +@Immutable +public final class DataBoxDiskGranularCopyProgress extends GranularCopyProgress { + /* + * Disk Serial Number. + */ + @JsonProperty(value = "serialNumber", access = JsonProperty.Access.WRITE_ONLY) + private String serialNumber; + + /* + * The Status of the copy + */ + @JsonProperty(value = "copyStatus", access = JsonProperty.Access.WRITE_ONLY) + private CopyStatus copyStatus; + + /** Creates an instance of DataBoxDiskGranularCopyProgress class. */ + public DataBoxDiskGranularCopyProgress() { + } + + /** + * Get the serialNumber property: Disk Serial Number. + * + * @return the serialNumber value. + */ + public String serialNumber() { + return this.serialNumber; + } + + /** + * Get the copyStatus property: The Status of the copy. + * + * @return the copyStatus value. + */ + public CopyStatus copyStatus() { + return this.copyStatus; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxDiskJobDetails.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxDiskJobDetails.java index 4f83baa04ae7e..04f430c6e283f 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxDiskJobDetails.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxDiskJobDetails.java @@ -31,6 +31,18 @@ public final class DataBoxDiskJobDetails extends JobDetails { @JsonProperty(value = "copyProgress", access = JsonProperty.Access.WRITE_ONLY) private List copyProgress; + /* + * Copy progress per disk. + */ + @JsonProperty(value = "granularCopyProgress", access = JsonProperty.Access.WRITE_ONLY) + private List granularCopyProgress; + + /* + * Copy progress per disk. + */ + @JsonProperty(value = "granularCopyLogDetails", access = JsonProperty.Access.WRITE_ONLY) + private List granularCopyLogDetails; + /* * 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. @@ -82,6 +94,24 @@ public List copyProgress() { return this.copyProgress; } + /** + * Get the granularCopyProgress property: Copy progress per disk. + * + * @return the granularCopyProgress value. + */ + public List granularCopyProgress() { + return this.granularCopyProgress; + } + + /** + * Get the granularCopyLogDetails property: Copy progress per disk. + * + * @return the granularCopyLogDetails value. + */ + public List granularCopyLogDetails() { + return this.granularCopyLogDetails; + } + /** * Get the disksAndSizeDetails property: 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. @@ -147,6 +177,13 @@ public DataBoxDiskJobDetails withPreferences(Preferences preferences) { return this; } + /** {@inheritDoc} */ + @Override + public DataBoxDiskJobDetails withReverseShippingDetails(ReverseShippingDetails reverseShippingDetails) { + super.withReverseShippingDetails(reverseShippingDetails); + return this; + } + /** {@inheritDoc} */ @Override public DataBoxDiskJobDetails withKeyEncryptionKey(KeyEncryptionKey keyEncryptionKey) { @@ -172,5 +209,11 @@ public void validate() { if (copyProgress() != null) { copyProgress().forEach(e -> e.validate()); } + if (granularCopyProgress() != null) { + granularCopyProgress().forEach(e -> e.validate()); + } + if (granularCopyLogDetails() != null) { + granularCopyLogDetails().forEach(e -> e.validate()); + } } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxHeavyJobDetails.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxHeavyJobDetails.java index 72a75efabfe8f..0ff5c3cdceeaa 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxHeavyJobDetails.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxHeavyJobDetails.java @@ -109,6 +109,13 @@ public DataBoxHeavyJobDetails withPreferences(Preferences preferences) { return this; } + /** {@inheritDoc} */ + @Override + public DataBoxHeavyJobDetails withReverseShippingDetails(ReverseShippingDetails reverseShippingDetails) { + super.withReverseShippingDetails(reverseShippingDetails); + return this; + } + /** {@inheritDoc} */ @Override public DataBoxHeavyJobDetails withKeyEncryptionKey(KeyEncryptionKey keyEncryptionKey) { diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxJobDetails.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxJobDetails.java index fff5e5190eb2c..9452b0e274fac 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxJobDetails.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataBoxJobDetails.java @@ -109,6 +109,13 @@ public DataBoxJobDetails withPreferences(Preferences preferences) { return this; } + /** {@inheritDoc} */ + @Override + public DataBoxJobDetails withReverseShippingDetails(ReverseShippingDetails reverseShippingDetails) { + super.withReverseShippingDetails(reverseShippingDetails); + return this; + } + /** {@inheritDoc} */ @Override public DataBoxJobDetails withKeyEncryptionKey(KeyEncryptionKey keyEncryptionKey) { diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataCenterCode.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataCenterCode.java new file mode 100644 index 0000000000000..53c49f35d6e05 --- /dev/null +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataCenterCode.java @@ -0,0 +1,218 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databox.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** DataCenter code. */ +public final class DataCenterCode extends ExpandableStringEnum { + /** Static value Invalid for DataCenterCode. */ + public static final DataCenterCode INVALID = fromString("Invalid"); + + /** Static value BY2 for DataCenterCode. */ + public static final DataCenterCode BY2 = fromString("BY2"); + + /** Static value BY1 for DataCenterCode. */ + public static final DataCenterCode BY1 = fromString("BY1"); + + /** Static value ORK70 for DataCenterCode. */ + public static final DataCenterCode ORK70 = fromString("ORK70"); + + /** Static value AM2 for DataCenterCode. */ + public static final DataCenterCode AM2 = fromString("AM2"); + + /** Static value AMS20 for DataCenterCode. */ + public static final DataCenterCode AMS20 = fromString("AMS20"); + + /** Static value BY21 for DataCenterCode. */ + public static final DataCenterCode BY21 = fromString("BY21"); + + /** Static value BY24 for DataCenterCode. */ + public static final DataCenterCode BY24 = fromString("BY24"); + + /** Static value MWH01 for DataCenterCode. */ + public static final DataCenterCode MWH01 = fromString("MWH01"); + + /** Static value AMS06 for DataCenterCode. */ + public static final DataCenterCode AMS06 = fromString("AMS06"); + + /** Static value SSE90 for DataCenterCode. */ + public static final DataCenterCode SSE90 = fromString("SSE90"); + + /** Static value SYD03 for DataCenterCode. */ + public static final DataCenterCode SYD03 = fromString("SYD03"); + + /** Static value SYD23 for DataCenterCode. */ + public static final DataCenterCode SYD23 = fromString("SYD23"); + + /** Static value CBR20 for DataCenterCode. */ + public static final DataCenterCode CBR20 = fromString("CBR20"); + + /** Static value YTO20 for DataCenterCode. */ + public static final DataCenterCode YTO20 = fromString("YTO20"); + + /** Static value CWL20 for DataCenterCode. */ + public static final DataCenterCode CWL20 = fromString("CWL20"); + + /** Static value LON24 for DataCenterCode. */ + public static final DataCenterCode LON24 = fromString("LON24"); + + /** Static value BOM01 for DataCenterCode. */ + public static final DataCenterCode BOM01 = fromString("BOM01"); + + /** Static value BL20 for DataCenterCode. */ + public static final DataCenterCode BL20 = fromString("BL20"); + + /** Static value BL7 for DataCenterCode. */ + public static final DataCenterCode BL7 = fromString("BL7"); + + /** Static value SEL20 for DataCenterCode. */ + public static final DataCenterCode SEL20 = fromString("SEL20"); + + /** Static value TYO01 for DataCenterCode. */ + public static final DataCenterCode TYO01 = fromString("TYO01"); + + /** Static value BN1 for DataCenterCode. */ + public static final DataCenterCode BN1 = fromString("BN1"); + + /** Static value SN5 for DataCenterCode. */ + public static final DataCenterCode SN5 = fromString("SN5"); + + /** Static value CYS04 for DataCenterCode. */ + public static final DataCenterCode CYS04 = fromString("CYS04"); + + /** Static value TYO22 for DataCenterCode. */ + public static final DataCenterCode TYO22 = fromString("TYO22"); + + /** Static value YTO21 for DataCenterCode. */ + public static final DataCenterCode YTO21 = fromString("YTO21"); + + /** Static value YQB20 for DataCenterCode. */ + public static final DataCenterCode YQB20 = fromString("YQB20"); + + /** Static value FRA22 for DataCenterCode. */ + public static final DataCenterCode FRA22 = fromString("FRA22"); + + /** Static value MAA01 for DataCenterCode. */ + public static final DataCenterCode MAA01 = fromString("MAA01"); + + /** Static value CPQ02 for DataCenterCode. */ + public static final DataCenterCode CPQ02 = fromString("CPQ02"); + + /** Static value CPQ20 for DataCenterCode. */ + public static final DataCenterCode CPQ20 = fromString("CPQ20"); + + /** Static value SIN20 for DataCenterCode. */ + public static final DataCenterCode SIN20 = fromString("SIN20"); + + /** Static value HKG20 for DataCenterCode. */ + public static final DataCenterCode HKG20 = fromString("HKG20"); + + /** Static value SG2 for DataCenterCode. */ + public static final DataCenterCode SG2 = fromString("SG2"); + + /** Static value MEL23 for DataCenterCode. */ + public static final DataCenterCode MEL23 = fromString("MEL23"); + + /** Static value SEL21 for DataCenterCode. */ + public static final DataCenterCode SEL21 = fromString("SEL21"); + + /** Static value OSA20 for DataCenterCode. */ + public static final DataCenterCode OSA20 = fromString("OSA20"); + + /** Static value SHA03 for DataCenterCode. */ + public static final DataCenterCode SHA03 = fromString("SHA03"); + + /** Static value BJB for DataCenterCode. */ + public static final DataCenterCode BJB = fromString("BJB"); + + /** Static value JNB22 for DataCenterCode. */ + public static final DataCenterCode JNB22 = fromString("JNB22"); + + /** Static value JNB21 for DataCenterCode. */ + public static final DataCenterCode JNB21 = fromString("JNB21"); + + /** Static value MNZ21 for DataCenterCode. */ + public static final DataCenterCode MNZ21 = fromString("MNZ21"); + + /** Static value SN8 for DataCenterCode. */ + public static final DataCenterCode SN8 = fromString("SN8"); + + /** Static value AUH20 for DataCenterCode. */ + public static final DataCenterCode AUH20 = fromString("AUH20"); + + /** Static value ZRH20 for DataCenterCode. */ + public static final DataCenterCode ZRH20 = fromString("ZRH20"); + + /** Static value PUS20 for DataCenterCode. */ + public static final DataCenterCode PUS20 = fromString("PUS20"); + + /** Static value AdHoc for DataCenterCode. */ + public static final DataCenterCode AD_HOC = fromString("AdHoc"); + + /** Static value CH1 for DataCenterCode. */ + public static final DataCenterCode CH1 = fromString("CH1"); + + /** Static value DSM05 for DataCenterCode. */ + public static final DataCenterCode DSM05 = fromString("DSM05"); + + /** Static value DUB07 for DataCenterCode. */ + public static final DataCenterCode DUB07 = fromString("DUB07"); + + /** Static value PNQ01 for DataCenterCode. */ + public static final DataCenterCode PNQ01 = fromString("PNQ01"); + + /** Static value SVG20 for DataCenterCode. */ + public static final DataCenterCode SVG20 = fromString("SVG20"); + + /** Static value OSA02 for DataCenterCode. */ + public static final DataCenterCode OSA02 = fromString("OSA02"); + + /** Static value OSA22 for DataCenterCode. */ + public static final DataCenterCode OSA22 = fromString("OSA22"); + + /** Static value PAR22 for DataCenterCode. */ + public static final DataCenterCode PAR22 = fromString("PAR22"); + + /** Static value BN7 for DataCenterCode. */ + public static final DataCenterCode BN7 = fromString("BN7"); + + /** Static value SN6 for DataCenterCode. */ + public static final DataCenterCode SN6 = fromString("SN6"); + + /** Static value BJS20 for DataCenterCode. */ + public static final DataCenterCode BJS20 = fromString("BJS20"); + + /** + * Creates a new instance of DataCenterCode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DataCenterCode() { + } + + /** + * Creates or finds a DataCenterCode from its string representation. + * + * @param name a name to look for. + * @return the corresponding DataCenterCode. + */ + @JsonCreator + public static DataCenterCode fromString(String name) { + return fromString(name, DataCenterCode.class); + } + + /** + * Gets known DataCenterCode values. + * + * @return known DataCenterCode values. + */ + public static Collection values() { + return values(DataCenterCode.class); + } +} diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataImportDetails.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataImportDetails.java index 663d54d64d409..6c3a4054585a0 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataImportDetails.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DataImportDetails.java @@ -17,6 +17,12 @@ public final class DataImportDetails { @JsonProperty(value = "accountDetails", required = true) private DataAccountDetails accountDetails; + /* + * Level of the logs to be collected. + */ + @JsonProperty(value = "logCollectionLevel") + private LogCollectionLevel logCollectionLevel; + /** Creates an instance of DataImportDetails class. */ public DataImportDetails() { } @@ -41,6 +47,26 @@ public DataImportDetails withAccountDetails(DataAccountDetails accountDetails) { return this; } + /** + * Get the logCollectionLevel property: Level of the logs to be collected. + * + * @return the logCollectionLevel value. + */ + public LogCollectionLevel logCollectionLevel() { + return this.logCollectionLevel; + } + + /** + * Set the logCollectionLevel property: Level of the logs to be collected. + * + * @param logCollectionLevel the logCollectionLevel value to set. + * @return the DataImportDetails object itself. + */ + public DataImportDetails withLogCollectionLevel(LogCollectionLevel logCollectionLevel) { + this.logCollectionLevel = logCollectionLevel; + return this; + } + /** * Validates the instance. * diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DatacenterAddressInstructionResponse.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DatacenterAddressInstructionResponse.java new file mode 100644 index 0000000000000..817be5f1cc877 --- /dev/null +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DatacenterAddressInstructionResponse.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databox.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Datacenter instruction for given storage location. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "datacenterAddressType") +@JsonTypeName("DatacenterAddressInstruction") +@Immutable +public final class DatacenterAddressInstructionResponse extends DatacenterAddressResponse { + /* + * Data center communication instruction + */ + @JsonProperty(value = "communicationInstruction", access = JsonProperty.Access.WRITE_ONLY) + private String communicationInstruction; + + /** Creates an instance of DatacenterAddressInstructionResponse class. */ + public DatacenterAddressInstructionResponse() { + } + + /** + * Get the communicationInstruction property: Data center communication instruction. + * + * @return the communicationInstruction value. + */ + public String communicationInstruction() { + return this.communicationInstruction; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DatacenterAddressLocationResponse.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DatacenterAddressLocationResponse.java new file mode 100644 index 0000000000000..b17b6f1f73065 --- /dev/null +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DatacenterAddressLocationResponse.java @@ -0,0 +1,225 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databox.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Datacenter address for given storage location. */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "datacenterAddressType") +@JsonTypeName("DatacenterAddressLocation") +@Immutable +public final class DatacenterAddressLocationResponse extends DatacenterAddressResponse { + /* + * Contact person name + */ + @JsonProperty(value = "contactPersonName", access = JsonProperty.Access.WRITE_ONLY) + private String contactPersonName; + + /* + * Company name + */ + @JsonProperty(value = "company", access = JsonProperty.Access.WRITE_ONLY) + private String company; + + /* + * Street address line 1 + */ + @JsonProperty(value = "street1", access = JsonProperty.Access.WRITE_ONLY) + private String street1; + + /* + * Street address line 2 + */ + @JsonProperty(value = "street2", access = JsonProperty.Access.WRITE_ONLY) + private String street2; + + /* + * Street address line 3 + */ + @JsonProperty(value = "street3", access = JsonProperty.Access.WRITE_ONLY) + private String street3; + + /* + * City name + */ + @JsonProperty(value = "city", access = JsonProperty.Access.WRITE_ONLY) + private String city; + + /* + * name of the state + */ + @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) + private String state; + + /* + * Zip code + */ + @JsonProperty(value = "zip", access = JsonProperty.Access.WRITE_ONLY) + private String zip; + + /* + * name of the country + */ + @JsonProperty(value = "country", access = JsonProperty.Access.WRITE_ONLY) + private String country; + + /* + * Phone number + */ + @JsonProperty(value = "phone", access = JsonProperty.Access.WRITE_ONLY) + private String phone; + + /* + * Phone extension + */ + @JsonProperty(value = "phoneExtension", access = JsonProperty.Access.WRITE_ONLY) + private String phoneExtension; + + /* + * Address type + */ + @JsonProperty(value = "addressType", access = JsonProperty.Access.WRITE_ONLY) + private String addressType; + + /* + * Special instruction for shipping + */ + @JsonProperty(value = "additionalShippingInformation", access = JsonProperty.Access.WRITE_ONLY) + private String additionalShippingInformation; + + /** Creates an instance of DatacenterAddressLocationResponse class. */ + public DatacenterAddressLocationResponse() { + } + + /** + * Get the contactPersonName property: Contact person name. + * + * @return the contactPersonName value. + */ + public String contactPersonName() { + return this.contactPersonName; + } + + /** + * Get the company property: Company name. + * + * @return the company value. + */ + public String company() { + return this.company; + } + + /** + * Get the street1 property: Street address line 1. + * + * @return the street1 value. + */ + public String street1() { + return this.street1; + } + + /** + * Get the street2 property: Street address line 2. + * + * @return the street2 value. + */ + public String street2() { + return this.street2; + } + + /** + * Get the street3 property: Street address line 3. + * + * @return the street3 value. + */ + public String street3() { + return this.street3; + } + + /** + * Get the city property: City name. + * + * @return the city value. + */ + public String city() { + return this.city; + } + + /** + * Get the state property: name of the state. + * + * @return the state value. + */ + public String state() { + return this.state; + } + + /** + * Get the zip property: Zip code. + * + * @return the zip value. + */ + public String zip() { + return this.zip; + } + + /** + * Get the country property: name of the country. + * + * @return the country value. + */ + public String country() { + return this.country; + } + + /** + * Get the phone property: Phone number. + * + * @return the phone value. + */ + public String phone() { + return this.phone; + } + + /** + * Get the phoneExtension property: Phone extension. + * + * @return the phoneExtension value. + */ + public String phoneExtension() { + return this.phoneExtension; + } + + /** + * Get the addressType property: Address type. + * + * @return the addressType value. + */ + public String addressType() { + return this.addressType; + } + + /** + * Get the additionalShippingInformation property: Special instruction for shipping. + * + * @return the additionalShippingInformation value. + */ + public String additionalShippingInformation() { + return this.additionalShippingInformation; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DatacenterAddressRequest.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DatacenterAddressRequest.java new file mode 100644 index 0000000000000..ae79e9d2aa55e --- /dev/null +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DatacenterAddressRequest.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databox.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Request body to get the datacenter address. */ +@Fluent +public final class DatacenterAddressRequest { + /* + * Storage location. For locations check: + * https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01 + */ + @JsonProperty(value = "storageLocation", required = true) + private String storageLocation; + + /* + * Sku Name for which the data center address requested. + */ + @JsonProperty(value = "skuName", required = true) + private SkuName skuName; + + /** Creates an instance of DatacenterAddressRequest class. */ + public DatacenterAddressRequest() { + } + + /** + * Get the storageLocation property: Storage location. For locations check: + * https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. + * + * @return the storageLocation value. + */ + public String storageLocation() { + return this.storageLocation; + } + + /** + * Set the storageLocation property: Storage location. For locations check: + * https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01. + * + * @param storageLocation the storageLocation value to set. + * @return the DatacenterAddressRequest object itself. + */ + public DatacenterAddressRequest withStorageLocation(String storageLocation) { + this.storageLocation = storageLocation; + return this; + } + + /** + * Get the skuName property: Sku Name for which the data center address requested. + * + * @return the skuName value. + */ + public SkuName skuName() { + return this.skuName; + } + + /** + * Set the skuName property: Sku Name for which the data center address requested. + * + * @param skuName the skuName value to set. + * @return the DatacenterAddressRequest object itself. + */ + public DatacenterAddressRequest withSkuName(SkuName skuName) { + this.skuName = skuName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (storageLocation() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property storageLocation in model DatacenterAddressRequest")); + } + if (skuName() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property skuName in model DatacenterAddressRequest")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DatacenterAddressRequest.class); +} diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DatacenterAddressResponse.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DatacenterAddressResponse.java new file mode 100644 index 0000000000000..7ed97d0e50ac3 --- /dev/null +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DatacenterAddressResponse.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databox.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; + +/** Datacenter address for given storage location. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "datacenterAddressType", + defaultImpl = DatacenterAddressResponse.class) +@JsonTypeName("DatacenterAddressResponse") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "DatacenterAddressInstruction", value = DatacenterAddressInstructionResponse.class), + @JsonSubTypes.Type(name = "DatacenterAddressLocation", value = DatacenterAddressLocationResponse.class) +}) +@Immutable +public class DatacenterAddressResponse { + /* + * List of supported carriers for return shipment. + */ + @JsonProperty(value = "supportedCarriersForReturnShipment", access = JsonProperty.Access.WRITE_ONLY) + private List supportedCarriersForReturnShipment; + + /* + * Azure Location where the Data Center serves primarily. + */ + @JsonProperty(value = "dataCenterAzureLocation", access = JsonProperty.Access.WRITE_ONLY) + private String dataCenterAzureLocation; + + /** Creates an instance of DatacenterAddressResponse class. */ + public DatacenterAddressResponse() { + } + + /** + * Get the supportedCarriersForReturnShipment property: List of supported carriers for return shipment. + * + * @return the supportedCarriersForReturnShipment value. + */ + public List supportedCarriersForReturnShipment() { + return this.supportedCarriersForReturnShipment; + } + + /** + * Get the dataCenterAzureLocation property: Azure Location where the Data Center serves primarily. + * + * @return the dataCenterAzureLocation value. + */ + public String dataCenterAzureLocation() { + return this.dataCenterAzureLocation; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DatacenterAddressType.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DatacenterAddressType.java new file mode 100644 index 0000000000000..38f5e59f2ffd3 --- /dev/null +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DatacenterAddressType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databox.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Data center address type. */ +public enum DatacenterAddressType { + /** Enum value DatacenterAddressLocation. */ + DATACENTER_ADDRESS_LOCATION("DatacenterAddressLocation"), + + /** Enum value DatacenterAddressInstruction. */ + DATACENTER_ADDRESS_INSTRUCTION("DatacenterAddressInstruction"); + + /** The actual serialized value for a DatacenterAddressType instance. */ + private final String value; + + DatacenterAddressType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a DatacenterAddressType instance. + * + * @param value the serialized value to parse. + * @return the parsed DatacenterAddressType object, or null if unable to parse. + */ + @JsonCreator + public static DatacenterAddressType fromString(String value) { + if (value == null) { + return null; + } + DatacenterAddressType[] items = DatacenterAddressType.values(); + for (DatacenterAddressType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + /** {@inheritDoc} */ + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DeviceErasureDetails.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DeviceErasureDetails.java new file mode 100644 index 0000000000000..1829e7f9b3e1d --- /dev/null +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/DeviceErasureDetails.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databox.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Device erasure details with erasure completion status and erasureordestructionlog sas key. */ +@Immutable +public final class DeviceErasureDetails { + /* + * Holds the device erasure completion status + */ + @JsonProperty(value = "deviceErasureStatus", access = JsonProperty.Access.WRITE_ONLY) + private StageStatus deviceErasureStatus; + + /* + * Shared access key to download cleanup or destruction certificate for device + */ + @JsonProperty(value = "erasureOrDestructionCertificateSasKey", access = JsonProperty.Access.WRITE_ONLY) + private String erasureOrDestructionCertificateSasKey; + + /** Creates an instance of DeviceErasureDetails class. */ + public DeviceErasureDetails() { + } + + /** + * Get the deviceErasureStatus property: Holds the device erasure completion status. + * + * @return the deviceErasureStatus value. + */ + public StageStatus deviceErasureStatus() { + return this.deviceErasureStatus; + } + + /** + * Get the erasureOrDestructionCertificateSasKey property: Shared access key to download cleanup or destruction + * certificate for device. + * + * @return the erasureOrDestructionCertificateSasKey value. + */ + public String erasureOrDestructionCertificateSasKey() { + return this.erasureOrDestructionCertificateSasKey; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ExportDiskDetails.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ExportDiskDetails.java new file mode 100644 index 0000000000000..f10f728c7b01d --- /dev/null +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ExportDiskDetails.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databox.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Export disk details. */ +@Immutable +public final class ExportDiskDetails { + /* + * The relative path of the manifest file on the disk. + */ + @JsonProperty(value = "manifestFile", access = JsonProperty.Access.WRITE_ONLY) + private String manifestFile; + + /* + * The Base16-encoded MD5 hash of the manifest file on the disk. + */ + @JsonProperty(value = "manifestHash", access = JsonProperty.Access.WRITE_ONLY) + private String manifestHash; + + /* + * Path to backed up manifest, only returned if enableManifestBackup is true. + */ + @JsonProperty(value = "backupManifestCloudPath", access = JsonProperty.Access.WRITE_ONLY) + private String backupManifestCloudPath; + + /** Creates an instance of ExportDiskDetails class. */ + public ExportDiskDetails() { + } + + /** + * Get the manifestFile property: The relative path of the manifest file on the disk. + * + * @return the manifestFile value. + */ + public String manifestFile() { + return this.manifestFile; + } + + /** + * Get the manifestHash property: The Base16-encoded MD5 hash of the manifest file on the disk. + * + * @return the manifestHash value. + */ + public String manifestHash() { + return this.manifestHash; + } + + /** + * Get the backupManifestCloudPath property: Path to backed up manifest, only returned if enableManifestBackup is + * true. + * + * @return the backupManifestCloudPath value. + */ + public String backupManifestCloudPath() { + return this.backupManifestCloudPath; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/GranularCopyLogDetails.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/GranularCopyLogDetails.java new file mode 100644 index 0000000000000..bafc7c26c496f --- /dev/null +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/GranularCopyLogDetails.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databox.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** Granular Details for log generated during copy. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "copyLogDetailsType", + defaultImpl = GranularCopyLogDetails.class) +@JsonTypeName("GranularCopyLogDetails") +@JsonSubTypes({@JsonSubTypes.Type(name = "DataBoxCustomerDisk", value = DataBoxDiskGranularCopyLogDetails.class)}) +@Immutable +public class GranularCopyLogDetails { + /** Creates an instance of GranularCopyLogDetails class. */ + public GranularCopyLogDetails() { + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/GranularCopyProgress.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/GranularCopyProgress.java new file mode 100644 index 0000000000000..b54a9660d2dbb --- /dev/null +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/GranularCopyProgress.java @@ -0,0 +1,255 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databox.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Granular Copy progress. */ +@Immutable +public class GranularCopyProgress { + /* + * Name of the storage account. This will be empty for data account types other than storage account. + */ + @JsonProperty(value = "storageAccountName", access = JsonProperty.Access.WRITE_ONLY) + private String storageAccountName; + + /* + * Transfer type of data + */ + @JsonProperty(value = "transferType", access = JsonProperty.Access.WRITE_ONLY) + private TransferType transferType; + + /* + * Data Account Type. + */ + @JsonProperty(value = "dataAccountType", access = JsonProperty.Access.WRITE_ONLY) + private DataAccountType dataAccountType; + + /* + * Id of the account where the data needs to be uploaded. + */ + @JsonProperty(value = "accountId", access = JsonProperty.Access.WRITE_ONLY) + private String accountId; + + /* + * To indicate bytes transferred. + */ + @JsonProperty(value = "bytesProcessed", access = JsonProperty.Access.WRITE_ONLY) + private Long bytesProcessed; + + /* + * Total amount of data to be processed by the job. + */ + @JsonProperty(value = "totalBytesToProcess", access = JsonProperty.Access.WRITE_ONLY) + private Long totalBytesToProcess; + + /* + * Number of files processed + */ + @JsonProperty(value = "filesProcessed", access = JsonProperty.Access.WRITE_ONLY) + private Long filesProcessed; + + /* + * Total files to process + */ + @JsonProperty(value = "totalFilesToProcess", access = JsonProperty.Access.WRITE_ONLY) + private Long totalFilesToProcess; + + /* + * Number of files not adhering to azure naming conventions which were processed by automatic renaming + */ + @JsonProperty(value = "invalidFilesProcessed", access = JsonProperty.Access.WRITE_ONLY) + private Long invalidFilesProcessed; + + /* + * Total amount of data not adhering to azure naming conventions which were processed by automatic renaming + */ + @JsonProperty(value = "invalidFileBytesUploaded", access = JsonProperty.Access.WRITE_ONLY) + private Long invalidFileBytesUploaded; + + /* + * Number of folders not adhering to azure naming conventions which were processed by automatic renaming + */ + @JsonProperty(value = "renamedContainerCount", access = JsonProperty.Access.WRITE_ONLY) + private Long renamedContainerCount; + + /* + * Number of files which could not be copied + */ + @JsonProperty(value = "filesErroredOut", access = JsonProperty.Access.WRITE_ONLY) + private Long filesErroredOut; + + /* + * To indicate directories errored out in the job. + */ + @JsonProperty(value = "directoriesErroredOut", access = JsonProperty.Access.WRITE_ONLY) + private Long directoriesErroredOut; + + /* + * To indicate directories renamed + */ + @JsonProperty(value = "invalidDirectoriesProcessed", access = JsonProperty.Access.WRITE_ONLY) + private Long invalidDirectoriesProcessed; + + /* + * To indicate if enumeration of data is in progress. + * Until this is true, the TotalBytesToProcess may not be valid. + */ + @JsonProperty(value = "isEnumerationInProgress", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isEnumerationInProgress; + + /** Creates an instance of GranularCopyProgress class. */ + public GranularCopyProgress() { + } + + /** + * Get the storageAccountName property: Name of the storage account. This will be empty for data account types other + * than storage account. + * + * @return the storageAccountName value. + */ + public String storageAccountName() { + return this.storageAccountName; + } + + /** + * Get the transferType property: Transfer type of data. + * + * @return the transferType value. + */ + public TransferType transferType() { + return this.transferType; + } + + /** + * Get the dataAccountType property: Data Account Type. + * + * @return the dataAccountType value. + */ + public DataAccountType dataAccountType() { + return this.dataAccountType; + } + + /** + * Get the accountId property: Id of the account where the data needs to be uploaded. + * + * @return the accountId value. + */ + public String accountId() { + return this.accountId; + } + + /** + * Get the bytesProcessed property: To indicate bytes transferred. + * + * @return the bytesProcessed value. + */ + public Long bytesProcessed() { + return this.bytesProcessed; + } + + /** + * Get the totalBytesToProcess property: Total amount of data to be processed by the job. + * + * @return the totalBytesToProcess value. + */ + public Long totalBytesToProcess() { + return this.totalBytesToProcess; + } + + /** + * Get the filesProcessed property: Number of files processed. + * + * @return the filesProcessed value. + */ + public Long filesProcessed() { + return this.filesProcessed; + } + + /** + * Get the totalFilesToProcess property: Total files to process. + * + * @return the totalFilesToProcess value. + */ + public Long totalFilesToProcess() { + return this.totalFilesToProcess; + } + + /** + * Get the invalidFilesProcessed property: Number of files not adhering to azure naming conventions which were + * processed by automatic renaming. + * + * @return the invalidFilesProcessed value. + */ + public Long invalidFilesProcessed() { + return this.invalidFilesProcessed; + } + + /** + * Get the invalidFileBytesUploaded property: Total amount of data not adhering to azure naming conventions which + * were processed by automatic renaming. + * + * @return the invalidFileBytesUploaded value. + */ + public Long invalidFileBytesUploaded() { + return this.invalidFileBytesUploaded; + } + + /** + * Get the renamedContainerCount property: Number of folders not adhering to azure naming conventions which were + * processed by automatic renaming. + * + * @return the renamedContainerCount value. + */ + public Long renamedContainerCount() { + return this.renamedContainerCount; + } + + /** + * Get the filesErroredOut property: Number of files which could not be copied. + * + * @return the filesErroredOut value. + */ + public Long filesErroredOut() { + return this.filesErroredOut; + } + + /** + * Get the directoriesErroredOut property: To indicate directories errored out in the job. + * + * @return the directoriesErroredOut value. + */ + public Long directoriesErroredOut() { + return this.directoriesErroredOut; + } + + /** + * Get the invalidDirectoriesProcessed property: To indicate directories renamed. + * + * @return the invalidDirectoriesProcessed value. + */ + public Long invalidDirectoriesProcessed() { + return this.invalidDirectoriesProcessed; + } + + /** + * Get the isEnumerationInProgress property: To indicate if enumeration of data is in progress. Until this is true, + * the TotalBytesToProcess may not be valid. + * + * @return the isEnumerationInProgress value. + */ + public Boolean isEnumerationInProgress() { + return this.isEnumerationInProgress; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ImportDiskDetails.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ImportDiskDetails.java new file mode 100644 index 0000000000000..5d90213190af4 --- /dev/null +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ImportDiskDetails.java @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databox.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Import disk details. */ +@Fluent +public final class ImportDiskDetails { + /* + * The relative path of the manifest file on the disk. + */ + @JsonProperty(value = "manifestFile", required = true) + private String manifestFile; + + /* + * The Base16-encoded MD5 hash of the manifest file on the disk. + */ + @JsonProperty(value = "manifestHash", required = true) + private String manifestHash; + + /* + * BitLocker key used to encrypt the disk. + */ + @JsonProperty(value = "bitLockerKey", required = true) + private String bitLockerKey; + + /* + * Path to backed up manifest, only returned if enableManifestBackup is true. + */ + @JsonProperty(value = "backupManifestCloudPath", access = JsonProperty.Access.WRITE_ONLY) + private String backupManifestCloudPath; + + /** Creates an instance of ImportDiskDetails class. */ + public ImportDiskDetails() { + } + + /** + * Get the manifestFile property: The relative path of the manifest file on the disk. + * + * @return the manifestFile value. + */ + public String manifestFile() { + return this.manifestFile; + } + + /** + * Set the manifestFile property: The relative path of the manifest file on the disk. + * + * @param manifestFile the manifestFile value to set. + * @return the ImportDiskDetails object itself. + */ + public ImportDiskDetails withManifestFile(String manifestFile) { + this.manifestFile = manifestFile; + return this; + } + + /** + * Get the manifestHash property: The Base16-encoded MD5 hash of the manifest file on the disk. + * + * @return the manifestHash value. + */ + public String manifestHash() { + return this.manifestHash; + } + + /** + * Set the manifestHash property: The Base16-encoded MD5 hash of the manifest file on the disk. + * + * @param manifestHash the manifestHash value to set. + * @return the ImportDiskDetails object itself. + */ + public ImportDiskDetails withManifestHash(String manifestHash) { + this.manifestHash = manifestHash; + return this; + } + + /** + * Get the bitLockerKey property: BitLocker key used to encrypt the disk. + * + * @return the bitLockerKey value. + */ + public String bitLockerKey() { + return this.bitLockerKey; + } + + /** + * Set the bitLockerKey property: BitLocker key used to encrypt the disk. + * + * @param bitLockerKey the bitLockerKey value to set. + * @return the ImportDiskDetails object itself. + */ + public ImportDiskDetails withBitLockerKey(String bitLockerKey) { + this.bitLockerKey = bitLockerKey; + return this; + } + + /** + * Get the backupManifestCloudPath property: Path to backed up manifest, only returned if enableManifestBackup is + * true. + * + * @return the backupManifestCloudPath value. + */ + public String backupManifestCloudPath() { + return this.backupManifestCloudPath; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (manifestFile() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property manifestFile in model ImportDiskDetails")); + } + if (manifestHash() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property manifestHash in model ImportDiskDetails")); + } + if (bitLockerKey() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property bitLockerKey in model ImportDiskDetails")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ImportDiskDetails.class); +} diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobDetails.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobDetails.java index 811148e2c43c7..7e594a55b66ca 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobDetails.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobDetails.java @@ -20,6 +20,7 @@ defaultImpl = JobDetails.class) @JsonTypeName("JobDetails") @JsonSubTypes({ + @JsonSubTypes.Type(name = "DataBoxCustomerDisk", value = DataBoxCustomerDiskJobDetails.class), @JsonSubTypes.Type(name = "DataBoxDisk", value = DataBoxDiskJobDetails.class), @JsonSubTypes.Type(name = "DataBoxHeavy", value = DataBoxHeavyJobDetails.class), @JsonSubTypes.Type(name = "DataBox", value = DataBoxJobDetails.class) @@ -74,6 +75,12 @@ public class JobDetails { @JsonProperty(value = "preferences") private Preferences preferences; + /* + * Optional Reverse Shipping details for order. + */ + @JsonProperty(value = "reverseShippingDetails") + private ReverseShippingDetails reverseShippingDetails; + /* * List of copy log details. */ @@ -92,6 +99,12 @@ public class JobDetails { @JsonProperty(value = "chainOfCustodySasKey", access = JsonProperty.Access.WRITE_ONLY) private String chainOfCustodySasKey; + /* + * Holds device data erasure details + */ + @JsonProperty(value = "deviceErasureDetails", access = JsonProperty.Access.WRITE_ONLY) + private DeviceErasureDetails deviceErasureDetails; + /* * Details about which key encryption type is being used. */ @@ -116,6 +129,18 @@ public class JobDetails { @JsonProperty(value = "lastMitigationActionOnJob", access = JsonProperty.Access.WRITE_ONLY) private LastMitigationActionOnJob lastMitigationActionOnJob; + /* + * Datacenter address to ship to, for the given sku and storage location. + */ + @JsonProperty(value = "datacenterAddress", access = JsonProperty.Access.WRITE_ONLY) + private DatacenterAddressResponse datacenterAddress; + + /* + * DataCenter code. + */ + @JsonProperty(value = "dataCenterCode", access = JsonProperty.Access.WRITE_ONLY) + private DataCenterCode dataCenterCode; + /** Creates an instance of JobDetails class. */ public JobDetails() { } @@ -247,6 +272,26 @@ public JobDetails withPreferences(Preferences preferences) { return this; } + /** + * Get the reverseShippingDetails property: Optional Reverse Shipping details for order. + * + * @return the reverseShippingDetails value. + */ + public ReverseShippingDetails reverseShippingDetails() { + return this.reverseShippingDetails; + } + + /** + * Set the reverseShippingDetails property: Optional Reverse Shipping details for order. + * + * @param reverseShippingDetails the reverseShippingDetails value to set. + * @return the JobDetails object itself. + */ + public JobDetails withReverseShippingDetails(ReverseShippingDetails reverseShippingDetails) { + this.reverseShippingDetails = reverseShippingDetails; + return this; + } + /** * Get the copyLogDetails property: List of copy log details. * @@ -274,6 +319,15 @@ public String chainOfCustodySasKey() { return this.chainOfCustodySasKey; } + /** + * Get the deviceErasureDetails property: Holds device data erasure details. + * + * @return the deviceErasureDetails value. + */ + public DeviceErasureDetails deviceErasureDetails() { + return this.deviceErasureDetails; + } + /** * Get the keyEncryptionKey property: Details about which key encryption type is being used. * @@ -334,6 +388,24 @@ public LastMitigationActionOnJob lastMitigationActionOnJob() { return this.lastMitigationActionOnJob; } + /** + * Get the datacenterAddress property: Datacenter address to ship to, for the given sku and storage location. + * + * @return the datacenterAddress value. + */ + public DatacenterAddressResponse datacenterAddress() { + return this.datacenterAddress; + } + + /** + * Get the dataCenterCode property: DataCenter code. + * + * @return the dataCenterCode value. + */ + public DataCenterCode dataCenterCode() { + return this.dataCenterCode; + } + /** * Validates the instance. * @@ -368,15 +440,24 @@ public void validate() { if (preferences() != null) { preferences().validate(); } + if (reverseShippingDetails() != null) { + reverseShippingDetails().validate(); + } if (copyLogDetails() != null) { copyLogDetails().forEach(e -> e.validate()); } + if (deviceErasureDetails() != null) { + deviceErasureDetails().validate(); + } if (keyEncryptionKey() != null) { keyEncryptionKey().validate(); } if (lastMitigationActionOnJob() != null) { lastMitigationActionOnJob().validate(); } + if (datacenterAddress() != null) { + datacenterAddress().validate(); + } } private static final ClientLogger LOGGER = new ClientLogger(JobDetails.class); diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobResource.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobResource.java index bce1096acb9c7..084fec2b8b276 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobResource.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobResource.java @@ -99,6 +99,21 @@ public interface JobResource { */ Boolean isShippingAddressEditable(); + /** + * Gets the reverseShippingDetailsUpdate property: The Editable status for Reverse Shipping Address and Contact + * Info. + * + * @return the reverseShippingDetailsUpdate value. + */ + ReverseShippingDetailsEditStatus reverseShippingDetailsUpdate(); + + /** + * Gets the reverseTransportPreferenceUpdate property: The Editable status for Reverse Transport preferences. + * + * @return the reverseTransportPreferenceUpdate value. + */ + ReverseTransportPreferenceEditStatus reverseTransportPreferenceUpdate(); + /** * Gets the isPrepareToShipEnabled property: Is Prepare To Ship Enabled on this job. * @@ -416,6 +431,28 @@ interface WithIfMatch { */ JobResource refresh(Context context); + /** + * Request to mark devices for a given job as shipped. + * + * @param markDevicesShippedRequest Mark Devices Shipped Request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response markDevicesShippedWithResponse(MarkDevicesShippedRequest markDevicesShippedRequest, Context context); + + /** + * Request to mark devices for a given job as shipped. + * + * @param markDevicesShippedRequest Mark Devices Shipped Request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void markDevicesShipped(MarkDevicesShippedRequest markDevicesShippedRequest); + /** * Book shipment pick up. * diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobSecrets.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobSecrets.java index 28d8ae18d3225..76a60cf0593f4 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobSecrets.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/JobSecrets.java @@ -18,6 +18,7 @@ defaultImpl = JobSecrets.class) @JsonTypeName("JobSecrets") @JsonSubTypes({ + @JsonSubTypes.Type(name = "DataBoxCustomerDisk", value = CustomerDiskJobSecrets.class), @JsonSubTypes.Type(name = "DataBoxDisk", value = DataBoxDiskJobSecrets.class), @JsonSubTypes.Type(name = "DataBoxHeavy", value = DataBoxHeavyJobSecrets.class), @JsonSubTypes.Type(name = "DataBox", value = DataboxJobSecrets.class) diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/Jobs.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/Jobs.java index 8f28cd22a973e..5372e9242a1ab 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/Jobs.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/Jobs.java @@ -31,6 +31,36 @@ public interface Jobs { */ PagedIterable list(String skipToken, Context context); + /** + * Request to mark devices for a given job as shipped. + * + * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and + * 24 characters in length and use any alphanumeric and underscore only. + * @param resourceGroupName The Resource Group Name. + * @param markDevicesShippedRequest Mark Devices Shipped Request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response markDevicesShippedWithResponse( + String jobName, String resourceGroupName, MarkDevicesShippedRequest markDevicesShippedRequest, Context context); + + /** + * Request to mark devices for a given job as shipped. + * + * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and + * 24 characters in length and use any alphanumeric and underscore only. + * @param resourceGroupName The Resource Group Name. + * @param markDevicesShippedRequest Mark Devices Shipped Request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void markDevicesShipped( + String jobName, String resourceGroupName, MarkDevicesShippedRequest markDevicesShippedRequest); + /** * Lists all the jobs available under the given resource group. * diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/MarkDevicesShippedRequest.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/MarkDevicesShippedRequest.java new file mode 100644 index 0000000000000..68bdbaa03853c --- /dev/null +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/MarkDevicesShippedRequest.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databox.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The request body to provide the delivery package details of job. */ +@Fluent +public final class MarkDevicesShippedRequest { + /* + * Delivery package details + */ + @JsonProperty(value = "deliverToDcPackageDetails", required = true) + private PackageCarrierInfo deliverToDcPackageDetails; + + /** Creates an instance of MarkDevicesShippedRequest class. */ + public MarkDevicesShippedRequest() { + } + + /** + * Get the deliverToDcPackageDetails property: Delivery package details. + * + * @return the deliverToDcPackageDetails value. + */ + public PackageCarrierInfo deliverToDcPackageDetails() { + return this.deliverToDcPackageDetails; + } + + /** + * Set the deliverToDcPackageDetails property: Delivery package details. + * + * @param deliverToDcPackageDetails the deliverToDcPackageDetails value to set. + * @return the MarkDevicesShippedRequest object itself. + */ + public MarkDevicesShippedRequest withDeliverToDcPackageDetails(PackageCarrierInfo deliverToDcPackageDetails) { + this.deliverToDcPackageDetails = deliverToDcPackageDetails; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (deliverToDcPackageDetails() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property deliverToDcPackageDetails in model MarkDevicesShippedRequest")); + } else { + deliverToDcPackageDetails().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(MarkDevicesShippedRequest.class); +} diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/MitigateJobRequest.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/MitigateJobRequest.java index 580be705767e9..ff9fa8ebf92f7 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/MitigateJobRequest.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/MitigateJobRequest.java @@ -5,8 +5,9 @@ package com.azure.resourcemanager.databox.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; /** The Mitigate Job captured from request body for Mitigate API. */ @Fluent @@ -14,9 +15,16 @@ public final class MitigateJobRequest { /* * Resolution code for the job */ - @JsonProperty(value = "customerResolutionCode", required = true) + @JsonProperty(value = "customerResolutionCode") private CustomerResolutionCode customerResolutionCode; + /* + * Serial number and the customer resolution code corresponding to each serial number + */ + @JsonProperty(value = "serialNumberCustomerResolutionMap") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map serialNumberCustomerResolutionMap; + /** Creates an instance of MitigateJobRequest class. */ public MitigateJobRequest() { } @@ -41,19 +49,34 @@ public MitigateJobRequest withCustomerResolutionCode(CustomerResolutionCode cust return this; } + /** + * Get the serialNumberCustomerResolutionMap property: Serial number and the customer resolution code corresponding + * to each serial number. + * + * @return the serialNumberCustomerResolutionMap value. + */ + public Map serialNumberCustomerResolutionMap() { + return this.serialNumberCustomerResolutionMap; + } + + /** + * Set the serialNumberCustomerResolutionMap property: Serial number and the customer resolution code corresponding + * to each serial number. + * + * @param serialNumberCustomerResolutionMap the serialNumberCustomerResolutionMap value to set. + * @return the MitigateJobRequest object itself. + */ + public MitigateJobRequest withSerialNumberCustomerResolutionMap( + Map serialNumberCustomerResolutionMap) { + this.serialNumberCustomerResolutionMap = serialNumberCustomerResolutionMap; + return this; + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (customerResolutionCode() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property customerResolutionCode in model MitigateJobRequest")); - } } - - private static final ClientLogger LOGGER = new ClientLogger(MitigateJobRequest.class); } diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/NotificationStageName.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/NotificationStageName.java index 0cd7a6a193473..46082f68db705 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/NotificationStageName.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/NotificationStageName.java @@ -4,60 +4,62 @@ package com.azure.resourcemanager.databox.models; +import com.azure.core.util.ExpandableStringEnum; import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; /** Name of the stage. */ -public enum NotificationStageName { - /** Enum value DevicePrepared. */ - DEVICE_PREPARED("DevicePrepared"), +public final class NotificationStageName extends ExpandableStringEnum { + /** Static value DevicePrepared for NotificationStageName. */ + public static final NotificationStageName DEVICE_PREPARED = fromString("DevicePrepared"); - /** Enum value Dispatched. */ - DISPATCHED("Dispatched"), + /** Static value Dispatched for NotificationStageName. */ + public static final NotificationStageName DISPATCHED = fromString("Dispatched"); - /** Enum value Delivered. */ - DELIVERED("Delivered"), + /** Static value Delivered for NotificationStageName. */ + public static final NotificationStageName DELIVERED = fromString("Delivered"); - /** Enum value PickedUp. */ - PICKED_UP("PickedUp"), + /** Static value PickedUp for NotificationStageName. */ + public static final NotificationStageName PICKED_UP = fromString("PickedUp"); - /** Enum value AtAzureDC. */ - AT_AZURE_DC("AtAzureDC"), + /** Static value AtAzureDC for NotificationStageName. */ + public static final NotificationStageName AT_AZURE_DC = fromString("AtAzureDC"); - /** Enum value DataCopy. */ - DATA_COPY("DataCopy"); + /** Static value DataCopy for NotificationStageName. */ + public static final NotificationStageName DATA_COPY = fromString("DataCopy"); - /** The actual serialized value for a NotificationStageName instance. */ - private final String value; + /** Static value Created for NotificationStageName. */ + public static final NotificationStageName CREATED = fromString("Created"); - NotificationStageName(String value) { - this.value = value; + /** Static value ShippedToCustomer for NotificationStageName. */ + public static final NotificationStageName SHIPPED_TO_CUSTOMER = fromString("ShippedToCustomer"); + + /** + * Creates a new instance of NotificationStageName value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public NotificationStageName() { } /** - * Parses a serialized value to a NotificationStageName instance. + * Creates or finds a NotificationStageName from its string representation. * - * @param value the serialized value to parse. - * @return the parsed NotificationStageName object, or null if unable to parse. + * @param name a name to look for. + * @return the corresponding NotificationStageName. */ @JsonCreator - public static NotificationStageName fromString(String value) { - if (value == null) { - return null; - } - NotificationStageName[] items = NotificationStageName.values(); - for (NotificationStageName item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; + public static NotificationStageName fromString(String name) { + return fromString(name, NotificationStageName.class); } - /** {@inheritDoc} */ - @JsonValue - @Override - public String toString() { - return this.value; + /** + * Gets known NotificationStageName values. + * + * @return known NotificationStageName values. + */ + public static Collection values() { + return values(NotificationStageName.class); } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/PackageCarrierDetails.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/PackageCarrierDetails.java new file mode 100644 index 0000000000000..ae213bbe55d80 --- /dev/null +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/PackageCarrierDetails.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databox.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Package carrier details. */ +@Fluent +public final class PackageCarrierDetails { + /* + * Carrier Account Number of customer for customer disk. + */ + @JsonProperty(value = "carrierAccountNumber") + private String carrierAccountNumber; + + /* + * Name of the carrier. + */ + @JsonProperty(value = "carrierName") + private String carrierName; + + /* + * Tracking Id of shipment. + */ + @JsonProperty(value = "trackingId") + private String trackingId; + + /** Creates an instance of PackageCarrierDetails class. */ + public PackageCarrierDetails() { + } + + /** + * Get the carrierAccountNumber property: Carrier Account Number of customer for customer disk. + * + * @return the carrierAccountNumber value. + */ + public String carrierAccountNumber() { + return this.carrierAccountNumber; + } + + /** + * Set the carrierAccountNumber property: Carrier Account Number of customer for customer disk. + * + * @param carrierAccountNumber the carrierAccountNumber value to set. + * @return the PackageCarrierDetails object itself. + */ + public PackageCarrierDetails withCarrierAccountNumber(String carrierAccountNumber) { + this.carrierAccountNumber = carrierAccountNumber; + return this; + } + + /** + * Get the carrierName property: Name of the carrier. + * + * @return the carrierName value. + */ + public String carrierName() { + return this.carrierName; + } + + /** + * Set the carrierName property: Name of the carrier. + * + * @param carrierName the carrierName value to set. + * @return the PackageCarrierDetails object itself. + */ + public PackageCarrierDetails withCarrierName(String carrierName) { + this.carrierName = carrierName; + return this; + } + + /** + * Get the trackingId property: Tracking Id of shipment. + * + * @return the trackingId value. + */ + public String trackingId() { + return this.trackingId; + } + + /** + * Set the trackingId property: Tracking Id of shipment. + * + * @param trackingId the trackingId value to set. + * @return the PackageCarrierDetails object itself. + */ + public PackageCarrierDetails withTrackingId(String trackingId) { + this.trackingId = trackingId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/PackageCarrierInfo.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/PackageCarrierInfo.java new file mode 100644 index 0000000000000..6dfaafa6fce59 --- /dev/null +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/PackageCarrierInfo.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databox.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** package carrier info. */ +@Fluent +public final class PackageCarrierInfo { + /* + * Name of the carrier. + */ + @JsonProperty(value = "carrierName") + private String carrierName; + + /* + * Tracking Id of shipment. + */ + @JsonProperty(value = "trackingId") + private String trackingId; + + /** Creates an instance of PackageCarrierInfo class. */ + public PackageCarrierInfo() { + } + + /** + * Get the carrierName property: Name of the carrier. + * + * @return the carrierName value. + */ + public String carrierName() { + return this.carrierName; + } + + /** + * Set the carrierName property: Name of the carrier. + * + * @param carrierName the carrierName value to set. + * @return the PackageCarrierInfo object itself. + */ + public PackageCarrierInfo withCarrierName(String carrierName) { + this.carrierName = carrierName; + return this; + } + + /** + * Get the trackingId property: Tracking Id of shipment. + * + * @return the trackingId value. + */ + public String trackingId() { + return this.trackingId; + } + + /** + * Set the trackingId property: Tracking Id of shipment. + * + * @param trackingId the trackingId value to set. + * @return the PackageCarrierInfo object itself. + */ + public PackageCarrierInfo withTrackingId(String trackingId) { + this.trackingId = trackingId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/PackageShippingDetails.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/PackageShippingDetails.java index 91cc242571c0c..fbc2fc5ee9824 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/PackageShippingDetails.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/PackageShippingDetails.java @@ -7,9 +7,15 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** Shipping details. */ +/** package shipping details. */ @Immutable public final class PackageShippingDetails { + /* + * Url where shipment can be tracked. + */ + @JsonProperty(value = "trackingUrl", access = JsonProperty.Access.WRITE_ONLY) + private String trackingUrl; + /* * Name of the carrier. */ @@ -22,16 +28,19 @@ public final class PackageShippingDetails { @JsonProperty(value = "trackingId", access = JsonProperty.Access.WRITE_ONLY) private String trackingId; - /* - * Url where shipment can be tracked. - */ - @JsonProperty(value = "trackingUrl", access = JsonProperty.Access.WRITE_ONLY) - private String trackingUrl; - /** Creates an instance of PackageShippingDetails class. */ public PackageShippingDetails() { } + /** + * Get the trackingUrl property: Url where shipment can be tracked. + * + * @return the trackingUrl value. + */ + public String trackingUrl() { + return this.trackingUrl; + } + /** * Get the carrierName property: Name of the carrier. * @@ -50,15 +59,6 @@ public String trackingId() { return this.trackingId; } - /** - * Get the trackingUrl property: Url where shipment can be tracked. - * - * @return the trackingUrl value. - */ - public String trackingUrl() { - return this.trackingUrl; - } - /** * Validates the instance. * diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/Preferences.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/Preferences.java index fde8da3478c3f..31c8c675cf665 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/Preferences.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/Preferences.java @@ -23,12 +23,24 @@ public final class Preferences { @JsonProperty(value = "transportPreferences") private TransportPreferences transportPreferences; + /* + * Optional Preferences related to the reverse shipment logistics of the sku. + */ + @JsonProperty(value = "reverseTransportPreferences") + private TransportPreferences reverseTransportPreferences; + /* * Preferences related to the Encryption. */ @JsonProperty(value = "encryptionPreferences") private EncryptionPreferences encryptionPreferences; + /* + * Preferences related to the Access Tier of storage accounts. + */ + @JsonProperty(value = "storageAccountAccessTierPreferences") + private List storageAccountAccessTierPreferences; + /** Creates an instance of Preferences class. */ public Preferences() { } @@ -73,6 +85,28 @@ public Preferences withTransportPreferences(TransportPreferences transportPrefer return this; } + /** + * Get the reverseTransportPreferences property: Optional Preferences related to the reverse shipment logistics of + * the sku. + * + * @return the reverseTransportPreferences value. + */ + public TransportPreferences reverseTransportPreferences() { + return this.reverseTransportPreferences; + } + + /** + * Set the reverseTransportPreferences property: Optional Preferences related to the reverse shipment logistics of + * the sku. + * + * @param reverseTransportPreferences the reverseTransportPreferences value to set. + * @return the Preferences object itself. + */ + public Preferences withReverseTransportPreferences(TransportPreferences reverseTransportPreferences) { + this.reverseTransportPreferences = reverseTransportPreferences; + return this; + } + /** * Get the encryptionPreferences property: Preferences related to the Encryption. * @@ -93,6 +127,26 @@ public Preferences withEncryptionPreferences(EncryptionPreferences encryptionPre return this; } + /** + * Get the storageAccountAccessTierPreferences property: Preferences related to the Access Tier of storage accounts. + * + * @return the storageAccountAccessTierPreferences value. + */ + public List storageAccountAccessTierPreferences() { + return this.storageAccountAccessTierPreferences; + } + + /** + * Set the storageAccountAccessTierPreferences property: Preferences related to the Access Tier of storage accounts. + * + * @param storageAccountAccessTierPreferences the storageAccountAccessTierPreferences value to set. + * @return the Preferences object itself. + */ + public Preferences withStorageAccountAccessTierPreferences(List storageAccountAccessTierPreferences) { + this.storageAccountAccessTierPreferences = storageAccountAccessTierPreferences; + return this; + } + /** * Validates the instance. * @@ -102,6 +156,9 @@ public void validate() { if (transportPreferences() != null) { transportPreferences().validate(); } + if (reverseTransportPreferences() != null) { + reverseTransportPreferences().validate(); + } if (encryptionPreferences() != null) { encryptionPreferences().validate(); } diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/RegionConfigurationRequest.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/RegionConfigurationRequest.java index 991aa10f6848b..931c98cd232f6 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/RegionConfigurationRequest.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/RegionConfigurationRequest.java @@ -22,6 +22,12 @@ public final class RegionConfigurationRequest { @JsonProperty(value = "transportAvailabilityRequest") private TransportAvailabilityRequest transportAvailabilityRequest; + /* + * Request body to get the datacenter address for given sku. + */ + @JsonProperty(value = "datacenterAddressRequest") + private DatacenterAddressRequest datacenterAddressRequest; + /** Creates an instance of RegionConfigurationRequest class. */ public RegionConfigurationRequest() { } @@ -68,6 +74,26 @@ public RegionConfigurationRequest withTransportAvailabilityRequest( return this; } + /** + * Get the datacenterAddressRequest property: Request body to get the datacenter address for given sku. + * + * @return the datacenterAddressRequest value. + */ + public DatacenterAddressRequest datacenterAddressRequest() { + return this.datacenterAddressRequest; + } + + /** + * Set the datacenterAddressRequest property: Request body to get the datacenter address for given sku. + * + * @param datacenterAddressRequest the datacenterAddressRequest value to set. + * @return the RegionConfigurationRequest object itself. + */ + public RegionConfigurationRequest withDatacenterAddressRequest(DatacenterAddressRequest datacenterAddressRequest) { + this.datacenterAddressRequest = datacenterAddressRequest; + return this; + } + /** * Validates the instance. * @@ -80,5 +106,8 @@ public void validate() { if (transportAvailabilityRequest() != null) { transportAvailabilityRequest().validate(); } + if (datacenterAddressRequest() != null) { + datacenterAddressRequest().validate(); + } } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/RegionConfigurationResponse.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/RegionConfigurationResponse.java index 7e2e17b769387..258f74271e909 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/RegionConfigurationResponse.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/RegionConfigurationResponse.java @@ -22,6 +22,13 @@ public interface RegionConfigurationResponse { */ TransportAvailabilityResponse transportAvailabilityResponse(); + /** + * Gets the datacenterAddressResponse property: Datacenter address for given sku in a region. + * + * @return the datacenterAddressResponse value. + */ + DatacenterAddressResponse datacenterAddressResponse(); + /** * Gets the inner com.azure.resourcemanager.databox.fluent.models.RegionConfigurationResponseInner object. * diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ReverseShippingDetails.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ReverseShippingDetails.java new file mode 100644 index 0000000000000..cd8c37c74a26b --- /dev/null +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ReverseShippingDetails.java @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databox.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Reverse Shipping Address and contact details for a job. */ +@Fluent +public final class ReverseShippingDetails { + /* + * Contact Info. + */ + @JsonProperty(value = "contactDetails") + private ContactInfo contactDetails; + + /* + * Shipping address where customer wishes to receive the device. + */ + @JsonProperty(value = "shippingAddress") + private ShippingAddress shippingAddress; + + /* + * A flag to indicate whether Reverse Shipping details are updated or not after device has been prepared. + * Read only field + */ + @JsonProperty(value = "isUpdated", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isUpdated; + + /** Creates an instance of ReverseShippingDetails class. */ + public ReverseShippingDetails() { + } + + /** + * Get the contactDetails property: Contact Info. + * + * @return the contactDetails value. + */ + public ContactInfo contactDetails() { + return this.contactDetails; + } + + /** + * Set the contactDetails property: Contact Info. + * + * @param contactDetails the contactDetails value to set. + * @return the ReverseShippingDetails object itself. + */ + public ReverseShippingDetails withContactDetails(ContactInfo contactDetails) { + this.contactDetails = contactDetails; + return this; + } + + /** + * Get the shippingAddress property: Shipping address where customer wishes to receive the device. + * + * @return the shippingAddress value. + */ + public ShippingAddress shippingAddress() { + return this.shippingAddress; + } + + /** + * Set the shippingAddress property: Shipping address where customer wishes to receive the device. + * + * @param shippingAddress the shippingAddress value to set. + * @return the ReverseShippingDetails object itself. + */ + public ReverseShippingDetails withShippingAddress(ShippingAddress shippingAddress) { + this.shippingAddress = shippingAddress; + return this; + } + + /** + * Get the isUpdated property: A flag to indicate whether Reverse Shipping details are updated or not after device + * has been prepared. Read only field. + * + * @return the isUpdated value. + */ + public Boolean isUpdated() { + return this.isUpdated; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (contactDetails() != null) { + contactDetails().validate(); + } + if (shippingAddress() != null) { + shippingAddress().validate(); + } + } +} diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ReverseShippingDetailsEditStatus.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ReverseShippingDetailsEditStatus.java new file mode 100644 index 0000000000000..17090f64539aa --- /dev/null +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ReverseShippingDetailsEditStatus.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databox.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** The Editable status for Reverse Shipping Address and Contact Info. */ +public enum ReverseShippingDetailsEditStatus { + /** Enum value Enabled. */ + ENABLED("Enabled"), + + /** Enum value Disabled. */ + DISABLED("Disabled"), + + /** Enum value NotSupported. */ + NOT_SUPPORTED("NotSupported"); + + /** The actual serialized value for a ReverseShippingDetailsEditStatus instance. */ + private final String value; + + ReverseShippingDetailsEditStatus(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ReverseShippingDetailsEditStatus instance. + * + * @param value the serialized value to parse. + * @return the parsed ReverseShippingDetailsEditStatus object, or null if unable to parse. + */ + @JsonCreator + public static ReverseShippingDetailsEditStatus fromString(String value) { + if (value == null) { + return null; + } + ReverseShippingDetailsEditStatus[] items = ReverseShippingDetailsEditStatus.values(); + for (ReverseShippingDetailsEditStatus item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + /** {@inheritDoc} */ + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ReverseTransportPreferenceEditStatus.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ReverseTransportPreferenceEditStatus.java new file mode 100644 index 0000000000000..a2e6b51dbca67 --- /dev/null +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/ReverseTransportPreferenceEditStatus.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databox.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** The Editable status for Reverse Transport preferences. */ +public enum ReverseTransportPreferenceEditStatus { + /** Enum value Enabled. */ + ENABLED("Enabled"), + + /** Enum value Disabled. */ + DISABLED("Disabled"), + + /** Enum value NotSupported. */ + NOT_SUPPORTED("NotSupported"); + + /** The actual serialized value for a ReverseTransportPreferenceEditStatus instance. */ + private final String value; + + ReverseTransportPreferenceEditStatus(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ReverseTransportPreferenceEditStatus instance. + * + * @param value the serialized value to parse. + * @return the parsed ReverseTransportPreferenceEditStatus object, or null if unable to parse. + */ + @JsonCreator + public static ReverseTransportPreferenceEditStatus fromString(String value) { + if (value == null) { + return null; + } + ReverseTransportPreferenceEditStatus[] items = ReverseTransportPreferenceEditStatus.values(); + for (ReverseTransportPreferenceEditStatus item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + /** {@inheritDoc} */ + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SkuInformation.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SkuInformation.java index 3fd4df6c66120..e9bfe695c5a0c 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SkuInformation.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SkuInformation.java @@ -72,6 +72,14 @@ public interface SkuInformation { */ String requiredFeature(); + /** + * Gets the countriesWithinCommerceBoundary property: List of all the Countries in the SKU specific commerce + * boundary. + * + * @return the countriesWithinCommerceBoundary value. + */ + List countriesWithinCommerceBoundary(); + /** * Gets the inner com.azure.resourcemanager.databox.fluent.models.SkuInformationInner object. * diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SkuName.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SkuName.java index 1fe91b748d288..63e10d89e6680 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SkuName.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/SkuName.java @@ -16,7 +16,10 @@ public enum SkuName { DATA_BOX_DISK("DataBoxDisk"), /** Enum value DataBoxHeavy. */ - DATA_BOX_HEAVY("DataBoxHeavy"); + DATA_BOX_HEAVY("DataBoxHeavy"), + + /** Enum value DataBoxCustomerDisk. */ + DATA_BOX_CUSTOMER_DISK("DataBoxCustomerDisk"); /** The actual serialized value for a SkuName instance. */ private final String value; diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/StageName.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/StageName.java index f74b000e8ad71..efac86dc76179 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/StageName.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/StageName.java @@ -4,90 +4,101 @@ package com.azure.resourcemanager.databox.models; +import com.azure.core.util.ExpandableStringEnum; import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; /** Name of the stage which is in progress. */ -public enum StageName { - /** Enum value DeviceOrdered. */ - DEVICE_ORDERED("DeviceOrdered"), +public final class StageName extends ExpandableStringEnum { + /** Static value DeviceOrdered for StageName. */ + public static final StageName DEVICE_ORDERED = fromString("DeviceOrdered"); - /** Enum value DevicePrepared. */ - DEVICE_PREPARED("DevicePrepared"), + /** Static value DevicePrepared for StageName. */ + public static final StageName DEVICE_PREPARED = fromString("DevicePrepared"); - /** Enum value Dispatched. */ - DISPATCHED("Dispatched"), + /** Static value Dispatched for StageName. */ + public static final StageName DISPATCHED = fromString("Dispatched"); - /** Enum value Delivered. */ - DELIVERED("Delivered"), + /** Static value Delivered for StageName. */ + public static final StageName DELIVERED = fromString("Delivered"); - /** Enum value PickedUp. */ - PICKED_UP("PickedUp"), + /** Static value PickedUp for StageName. */ + public static final StageName PICKED_UP = fromString("PickedUp"); - /** Enum value AtAzureDC. */ - AT_AZURE_DC("AtAzureDC"), + /** Static value AtAzureDC for StageName. */ + public static final StageName AT_AZURE_DC = fromString("AtAzureDC"); - /** Enum value DataCopy. */ - DATA_COPY("DataCopy"), + /** Static value DataCopy for StageName. */ + public static final StageName DATA_COPY = fromString("DataCopy"); - /** Enum value Completed. */ - COMPLETED("Completed"), + /** Static value Completed for StageName. */ + public static final StageName COMPLETED = fromString("Completed"); - /** Enum value CompletedWithErrors. */ - COMPLETED_WITH_ERRORS("CompletedWithErrors"), + /** Static value CompletedWithErrors for StageName. */ + public static final StageName COMPLETED_WITH_ERRORS = fromString("CompletedWithErrors"); - /** Enum value Cancelled. */ - CANCELLED("Cancelled"), + /** Static value Cancelled for StageName. */ + public static final StageName CANCELLED = fromString("Cancelled"); - /** Enum value Failed_IssueReportedAtCustomer. */ - FAILED_ISSUE_REPORTED_AT_CUSTOMER("Failed_IssueReportedAtCustomer"), + /** Static value Failed_IssueReportedAtCustomer for StageName. */ + public static final StageName FAILED_ISSUE_REPORTED_AT_CUSTOMER = fromString("Failed_IssueReportedAtCustomer"); - /** Enum value Failed_IssueDetectedAtAzureDC. */ - FAILED_ISSUE_DETECTED_AT_AZURE_DC("Failed_IssueDetectedAtAzureDC"), + /** Static value Failed_IssueDetectedAtAzureDC for StageName. */ + public static final StageName FAILED_ISSUE_DETECTED_AT_AZURE_DC = fromString("Failed_IssueDetectedAtAzureDC"); - /** Enum value Aborted. */ - ABORTED("Aborted"), + /** Static value Aborted for StageName. */ + public static final StageName ABORTED = fromString("Aborted"); - /** Enum value CompletedWithWarnings. */ - COMPLETED_WITH_WARNINGS("CompletedWithWarnings"), + /** Static value CompletedWithWarnings for StageName. */ + public static final StageName COMPLETED_WITH_WARNINGS = fromString("CompletedWithWarnings"); - /** Enum value ReadyToDispatchFromAzureDC. */ - READY_TO_DISPATCH_FROM_AZURE_DC("ReadyToDispatchFromAzureDC"), + /** Static value ReadyToDispatchFromAzureDC for StageName. */ + public static final StageName READY_TO_DISPATCH_FROM_AZURE_DC = fromString("ReadyToDispatchFromAzureDC"); - /** Enum value ReadyToReceiveAtAzureDC. */ - READY_TO_RECEIVE_AT_AZURE_DC("ReadyToReceiveAtAzureDC"); + /** Static value ReadyToReceiveAtAzureDC for StageName. */ + public static final StageName READY_TO_RECEIVE_AT_AZURE_DC = fromString("ReadyToReceiveAtAzureDC"); - /** The actual serialized value for a StageName instance. */ - private final String value; + /** Static value Created for StageName. */ + public static final StageName CREATED = fromString("Created"); - StageName(String value) { - this.value = value; + /** Static value ShippedToAzureDC for StageName. */ + public static final StageName SHIPPED_TO_AZURE_DC = fromString("ShippedToAzureDC"); + + /** Static value AwaitingShipmentDetails for StageName. */ + public static final StageName AWAITING_SHIPMENT_DETAILS = fromString("AwaitingShipmentDetails"); + + /** Static value PreparingToShipFromAzureDC for StageName. */ + public static final StageName PREPARING_TO_SHIP_FROM_AZURE_DC = fromString("PreparingToShipFromAzureDC"); + + /** Static value ShippedToCustomer for StageName. */ + public static final StageName SHIPPED_TO_CUSTOMER = fromString("ShippedToCustomer"); + + /** + * Creates a new instance of StageName value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public StageName() { } /** - * Parses a serialized value to a StageName instance. + * Creates or finds a StageName from its string representation. * - * @param value the serialized value to parse. - * @return the parsed StageName object, or null if unable to parse. + * @param name a name to look for. + * @return the corresponding StageName. */ @JsonCreator - public static StageName fromString(String value) { - if (value == null) { - return null; - } - StageName[] items = StageName.values(); - for (StageName item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; + public static StageName fromString(String name) { + return fromString(name, StageName.class); } - /** {@inheritDoc} */ - @JsonValue - @Override - public String toString() { - return this.value; + /** + * Gets known StageName values. + * + * @return known StageName values. + */ + public static Collection values() { + return values(StageName.class); } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/StageStatus.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/StageStatus.java index bb4e561534e49..d9ce4680795e4 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/StageStatus.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/StageStatus.java @@ -7,7 +7,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -/** Status of the job stage. */ +/** Holds the device erasure completion status. */ public enum StageStatus { /** Enum value None. */ NONE("None"), @@ -34,7 +34,19 @@ public enum StageStatus { WAITING_FOR_CUSTOMER_ACTION("WaitingForCustomerAction"), /** Enum value SucceededWithWarnings. */ - SUCCEEDED_WITH_WARNINGS("SucceededWithWarnings"); + SUCCEEDED_WITH_WARNINGS("SucceededWithWarnings"), + + /** Enum value WaitingForCustomerActionForKek. */ + WAITING_FOR_CUSTOMER_ACTION_FOR_KEK("WaitingForCustomerActionForKek"), + + /** Enum value WaitingForCustomerActionForCleanUp. */ + WAITING_FOR_CUSTOMER_ACTION_FOR_CLEAN_UP("WaitingForCustomerActionForCleanUp"), + + /** Enum value CustomerActionPerformedForCleanUp. */ + CUSTOMER_ACTION_PERFORMED_FOR_CLEAN_UP("CustomerActionPerformedForCleanUp"), + + /** Enum value CustomerActionPerformed. */ + CUSTOMER_ACTION_PERFORMED("CustomerActionPerformed"); /** The actual serialized value for a StageStatus instance. */ private final String value; diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransportPreferences.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransportPreferences.java index 535488059fdf0..9d4bbe5654f60 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransportPreferences.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/TransportPreferences.java @@ -17,6 +17,13 @@ public final class TransportPreferences { @JsonProperty(value = "preferredShipmentType", required = true) private TransportShipmentTypes preferredShipmentType; + /* + * Read only property which indicates whether transport preferences has been updated or not after device is + * prepared. + */ + @JsonProperty(value = "isUpdated", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isUpdated; + /** Creates an instance of TransportPreferences class. */ public TransportPreferences() { } @@ -41,6 +48,16 @@ public TransportPreferences withPreferredShipmentType(TransportShipmentTypes pre return this; } + /** + * Get the isUpdated property: Read only property which indicates whether transport preferences has been updated or + * not after device is prepared. + * + * @return the isUpdated value. + */ + public Boolean isUpdated() { + return this.isUpdated; + } + /** * Validates the instance. * diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/UpdateJobDetails.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/UpdateJobDetails.java index c946fea8fc5d8..6b8137d4c8e0f 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/UpdateJobDetails.java +++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/UpdateJobDetails.java @@ -22,12 +22,30 @@ public final class UpdateJobDetails { @JsonProperty(value = "shippingAddress") private ShippingAddress shippingAddress; + /* + * Reverse Shipping Address and contact details for a job. + */ + @JsonProperty(value = "reverseShippingDetails") + private ReverseShippingDetails reverseShippingDetails; + + /* + * Preferences related to the order + */ + @JsonProperty(value = "preferences") + private Preferences preferences; + /* * Key encryption key for the job. */ @JsonProperty(value = "keyEncryptionKey") private KeyEncryptionKey keyEncryptionKey; + /* + * Return package details of job. + */ + @JsonProperty(value = "returnToCustomerPackageDetails") + private PackageCarrierDetails returnToCustomerPackageDetails; + /** Creates an instance of UpdateJobDetails class. */ public UpdateJobDetails() { } @@ -72,6 +90,46 @@ public UpdateJobDetails withShippingAddress(ShippingAddress shippingAddress) { return this; } + /** + * Get the reverseShippingDetails property: Reverse Shipping Address and contact details for a job. + * + * @return the reverseShippingDetails value. + */ + public ReverseShippingDetails reverseShippingDetails() { + return this.reverseShippingDetails; + } + + /** + * Set the reverseShippingDetails property: Reverse Shipping Address and contact details for a job. + * + * @param reverseShippingDetails the reverseShippingDetails value to set. + * @return the UpdateJobDetails object itself. + */ + public UpdateJobDetails withReverseShippingDetails(ReverseShippingDetails reverseShippingDetails) { + this.reverseShippingDetails = reverseShippingDetails; + return this; + } + + /** + * Get the preferences property: Preferences related to the order. + * + * @return the preferences value. + */ + public Preferences preferences() { + return this.preferences; + } + + /** + * Set the preferences property: Preferences related to the order. + * + * @param preferences the preferences value to set. + * @return the UpdateJobDetails object itself. + */ + public UpdateJobDetails withPreferences(Preferences preferences) { + this.preferences = preferences; + return this; + } + /** * Get the keyEncryptionKey property: Key encryption key for the job. * @@ -92,6 +150,26 @@ public UpdateJobDetails withKeyEncryptionKey(KeyEncryptionKey keyEncryptionKey) return this; } + /** + * Get the returnToCustomerPackageDetails property: Return package details of job. + * + * @return the returnToCustomerPackageDetails value. + */ + public PackageCarrierDetails returnToCustomerPackageDetails() { + return this.returnToCustomerPackageDetails; + } + + /** + * Set the returnToCustomerPackageDetails property: Return package details of job. + * + * @param returnToCustomerPackageDetails the returnToCustomerPackageDetails value to set. + * @return the UpdateJobDetails object itself. + */ + public UpdateJobDetails withReturnToCustomerPackageDetails(PackageCarrierDetails returnToCustomerPackageDetails) { + this.returnToCustomerPackageDetails = returnToCustomerPackageDetails; + return this; + } + /** * Validates the instance. * @@ -104,8 +182,17 @@ public void validate() { if (shippingAddress() != null) { shippingAddress().validate(); } + if (reverseShippingDetails() != null) { + reverseShippingDetails().validate(); + } + if (preferences() != null) { + preferences().validate(); + } if (keyEncryptionKey() != null) { keyEncryptionKey().validate(); } + if (returnToCustomerPackageDetails() != null) { + returnToCustomerPackageDetails().validate(); + } } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsBookShipmentPickUpSamples.java b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsBookShipmentPickUpSamples.java index d081856df0645..1a51d3707ead6 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsBookShipmentPickUpSamples.java +++ b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsBookShipmentPickUpSamples.java @@ -10,7 +10,7 @@ /** Samples for Jobs BookShipmentPickUp. */ public final class JobsBookShipmentPickUpSamples { /* - * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2021-03-01/examples/BookShipmentPickupPost.json + * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/BookShipmentPickupPost.json */ /** * Sample code: BookShipmentPickupPost. diff --git a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsCancelSamples.java b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsCancelSamples.java index 542740ade1b95..b09891320f8d0 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsCancelSamples.java +++ b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsCancelSamples.java @@ -9,7 +9,7 @@ /** Samples for Jobs Cancel. */ public final class JobsCancelSamples { /* - * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2021-03-01/examples/JobsCancelPost.json + * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsCancelPost.json */ /** * Sample code: JobsCancelPost. diff --git a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsCreateSamples.java b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsCreateSamples.java index ca31b91263d0d..e30d6f02163a6 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsCreateSamples.java +++ b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsCreateSamples.java @@ -31,7 +31,7 @@ /** Samples for Jobs Create. */ public final class JobsCreateSamples { /* - * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2021-03-01/examples/JobsCreateDevicePassword.json + * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsCreateDevicePassword.json */ /** * Sample code: JobsCreateDevicePassword. @@ -78,7 +78,7 @@ public static void jobsCreateDevicePassword(com.azure.resourcemanager.databox.Da } /* - * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2021-03-01/examples/JobsCreate.json + * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsCreate.json */ /** * Sample code: JobsCreate. @@ -123,7 +123,7 @@ public static void jobsCreate(com.azure.resourcemanager.databox.DataBoxManager m } /* - * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2021-03-01/examples/JobsCreateDoubleEncryption.json + * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsCreateDoubleEncryption.json */ /** * Sample code: JobsCreateDoubleEncryption. @@ -172,7 +172,7 @@ public static void jobsCreateDoubleEncryption(com.azure.resourcemanager.databox. } /* - * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2021-03-01/examples/JobsCreateWithUserAssignedIdentity.json + * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsCreateWithUserAssignedIdentity.json */ /** * Sample code: JobsCreateWithUserAssignedIdentity. @@ -224,7 +224,7 @@ public static void jobsCreateWithUserAssignedIdentity(com.azure.resourcemanager. } /* - * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2021-03-01/examples/JobsCreateExport.json + * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsCreateExport.json */ /** * Sample code: JobsCreateExport. diff --git a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsDeleteSamples.java b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsDeleteSamples.java index 6256ce737370f..47f709c6f555c 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsDeleteSamples.java +++ b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for Jobs Delete. */ public final class JobsDeleteSamples { /* - * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2021-03-01/examples/JobsDelete.json + * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsDelete.json */ /** * Sample code: JobsDelete. diff --git a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsGetByResourceGroupSamples.java b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsGetByResourceGroupSamples.java index 7c583e0e52a0b..e883e29d3b7ac 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsGetByResourceGroupSamples.java +++ b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsGetByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for Jobs GetByResourceGroup. */ public final class JobsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2021-03-01/examples/JobsGet.json + * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsGet.json */ /** * Sample code: JobsGet. @@ -21,7 +21,7 @@ public static void jobsGet(com.azure.resourcemanager.databox.DataBoxManager mana } /* - * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2021-03-01/examples/JobsGetCmk.json + * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsGetCmk.json */ /** * Sample code: JobsGetCmk. @@ -35,7 +35,7 @@ public static void jobsGetCmk(com.azure.resourcemanager.databox.DataBoxManager m } /* - * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2021-03-01/examples/JobsGetExport.json + * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsGetExport.json */ /** * Sample code: JobsGetExport. @@ -49,7 +49,7 @@ public static void jobsGetExport(com.azure.resourcemanager.databox.DataBoxManage } /* - * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2021-03-01/examples/JobsGetCopyStuck.json + * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsGetCopyStuck.json */ /** * Sample code: JobsGetCopyStuck. @@ -62,4 +62,19 @@ public static void jobsGetCopyStuck(com.azure.resourcemanager.databox.DataBoxMan .getByResourceGroupWithResponse( "dmstestresource", "TJx-637505258985313014", "details", com.azure.core.util.Context.NONE); } + + /* + * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsGetWaitingForAction.json + */ + /** + * Sample code: JobsGetWaitingForAction. + * + * @param manager Entry point to DataBoxManager. + */ + public static void jobsGetWaitingForAction(com.azure.resourcemanager.databox.DataBoxManager manager) { + manager + .jobs() + .getByResourceGroupWithResponse( + "dmstestresource", "TJx-637505258985313014", "details", com.azure.core.util.Context.NONE); + } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsListByResourceGroupSamples.java b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsListByResourceGroupSamples.java index 3442526bf3761..96d2c363b759d 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsListByResourceGroupSamples.java +++ b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsListByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for Jobs ListByResourceGroup. */ public final class JobsListByResourceGroupSamples { /* - * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2021-03-01/examples/JobsListByResourceGroup.json + * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsListByResourceGroup.json */ /** * Sample code: JobsListByResourceGroup. diff --git a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsListCredentialsSamples.java b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsListCredentialsSamples.java index ccf2e1987d66a..9fd193746b9d3 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsListCredentialsSamples.java +++ b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsListCredentialsSamples.java @@ -7,7 +7,7 @@ /** Samples for Jobs ListCredentials. */ public final class JobsListCredentialsSamples { /* - * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2021-03-01/examples/JobsListCredentials.json + * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsListCredentials.json */ /** * Sample code: JobsListCredentials. diff --git a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsListSamples.java b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsListSamples.java index 72061b570d29c..d40ddcfe0a88e 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsListSamples.java +++ b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsListSamples.java @@ -7,7 +7,7 @@ /** Samples for Jobs List. */ public final class JobsListSamples { /* - * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2021-03-01/examples/JobsList.json + * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsList.json */ /** * Sample code: JobsList. diff --git a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsMarkDevicesShippedSamples.java b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsMarkDevicesShippedSamples.java new file mode 100644 index 0000000000000..c11c91abb1b8d --- /dev/null +++ b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsMarkDevicesShippedSamples.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.databox.generated; + +import com.azure.resourcemanager.databox.models.MarkDevicesShippedRequest; +import com.azure.resourcemanager.databox.models.PackageCarrierInfo; + +/** Samples for Jobs MarkDevicesShipped. */ +public final class JobsMarkDevicesShippedSamples { + /* + * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/MarkDevicesShipped.json + */ + /** + * Sample code: MarkDevicesShipped. + * + * @param manager Entry point to DataBoxManager. + */ + public static void markDevicesShipped(com.azure.resourcemanager.databox.DataBoxManager manager) { + manager + .jobs() + .markDevicesShippedWithResponse( + "SdkJob8367", + "SdkRg9836", + new MarkDevicesShippedRequest() + .withDeliverToDcPackageDetails( + new PackageCarrierInfo().withCarrierName("DHL").withTrackingId("123456")), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsUpdateSamples.java b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsUpdateSamples.java index a500bed12a7af..50d59b9ad7038 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsUpdateSamples.java +++ b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/JobsUpdateSamples.java @@ -22,7 +22,7 @@ /** Samples for Jobs Update. */ public final class JobsUpdateSamples { /* - * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2021-03-01/examples/JobsPatchCmk.json + * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsPatchCmk.json */ /** * Sample code: JobsPatchCmk. @@ -49,7 +49,7 @@ public static void jobsPatchCmk(com.azure.resourcemanager.databox.DataBoxManager } /* - * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2021-03-01/examples/JobsPatchSystemAssignedToUserAssigned.json + * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsPatchSystemAssignedToUserAssigned.json */ /** * Sample code: JobsPatchSystemAssignedToUserAssigned. @@ -90,7 +90,7 @@ public static void jobsPatchSystemAssignedToUserAssigned(com.azure.resourcemanag } /* - * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2021-03-01/examples/JobsPatch.json + * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsPatch.json */ /** * Sample code: JobsPatch. diff --git a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/OperationsListSamples.java b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/OperationsListSamples.java index ec41fdc4e8509..35b2b7023e197 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/OperationsListSamples.java +++ b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/OperationsListSamples.java @@ -7,7 +7,7 @@ /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2021-03-01/examples/OperationsGet.json + * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/OperationsGet.json */ /** * Sample code: OperationsGet. diff --git a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/ResourceProviderMitigateSamples.java b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/ResourceProviderMitigateSamples.java index 4f4d910eff846..32683fcd7cb23 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/ResourceProviderMitigateSamples.java +++ b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/ResourceProviderMitigateSamples.java @@ -6,11 +6,13 @@ import com.azure.resourcemanager.databox.models.CustomerResolutionCode; import com.azure.resourcemanager.databox.models.MitigateJobRequest; +import java.util.HashMap; +import java.util.Map; /** Samples for ResourceProvider Mitigate. */ public final class ResourceProviderMitigateSamples { /* - * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2021-03-01/examples/JobMitigate.json + * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobMitigate.json */ /** * Sample code: Mitigate. @@ -23,7 +25,24 @@ public static void mitigate(com.azure.resourcemanager.databox.DataBoxManager man .mitigateWithResponse( "SdkJob8367", "SdkRg9836", - new MitigateJobRequest().withCustomerResolutionCode(CustomerResolutionCode.MOVE_TO_CLEAN_UP_DEVICE), + new MitigateJobRequest() + .withSerialNumberCustomerResolutionMap( + mapOf( + "testDISK-1", + CustomerResolutionCode.MOVE_TO_CLEAN_UP_DEVICE, + "testDISK-2", + CustomerResolutionCode.RESUME)), com.azure.core.util.Context.NONE); } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } } diff --git a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/ServiceListAvailableSkusByResourceGroupSamples.java b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/ServiceListAvailableSkusByResourceGroupSamples.java index 224080f2840a6..71cff88decb08 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/ServiceListAvailableSkusByResourceGroupSamples.java +++ b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/ServiceListAvailableSkusByResourceGroupSamples.java @@ -10,7 +10,7 @@ /** Samples for Service ListAvailableSkusByResourceGroup. */ public final class ServiceListAvailableSkusByResourceGroupSamples { /* - * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2021-03-01/examples/AvailableSkusPost.json + * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/AvailableSkusPost.json */ /** * Sample code: AvailableSkusPost. diff --git a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/ServiceRegionConfigurationByResourceGroupSamples.java b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/ServiceRegionConfigurationByResourceGroupSamples.java index 9772a404725e5..889cedf6a3a13 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/ServiceRegionConfigurationByResourceGroupSamples.java +++ b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/ServiceRegionConfigurationByResourceGroupSamples.java @@ -10,7 +10,7 @@ /** Samples for Service RegionConfigurationByResourceGroup. */ public final class ServiceRegionConfigurationByResourceGroupSamples { /* - * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2021-03-01/examples/RegionConfigurationByResourceGroup.json + * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/RegionConfigurationByResourceGroup.json */ /** * Sample code: RegionConfigurationByResourceGroup. diff --git a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/ServiceRegionConfigurationSamples.java b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/ServiceRegionConfigurationSamples.java index ba0440b8ffc3f..6a830ab0d0159 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/ServiceRegionConfigurationSamples.java +++ b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/ServiceRegionConfigurationSamples.java @@ -10,7 +10,7 @@ /** Samples for Service RegionConfiguration. */ public final class ServiceRegionConfigurationSamples { /* - * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2021-03-01/examples/RegionConfiguration.json + * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/RegionConfiguration.json */ /** * Sample code: RegionConfiguration. diff --git a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/ServiceValidateAddressSamples.java b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/ServiceValidateAddressSamples.java index f03c508eb2886..1291fdd711784 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/ServiceValidateAddressSamples.java +++ b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/ServiceValidateAddressSamples.java @@ -12,7 +12,7 @@ /** Samples for Service ValidateAddress. */ public final class ServiceValidateAddressSamples { /* - * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2021-03-01/examples/ValidateAddressPost.json + * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/ValidateAddressPost.json */ /** * Sample code: ValidateAddressPost. diff --git a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/ServiceValidateInputsByResourceGroupSamples.java b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/ServiceValidateInputsByResourceGroupSamples.java index 36e63dc41610a..425c9ed500129 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/ServiceValidateInputsByResourceGroupSamples.java +++ b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/ServiceValidateInputsByResourceGroupSamples.java @@ -25,7 +25,7 @@ /** Samples for Service ValidateInputsByResourceGroup. */ public final class ServiceValidateInputsByResourceGroupSamples { /* - * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2021-03-01/examples/ValidateInputsByResourceGroup.json + * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/ValidateInputsByResourceGroup.json */ /** * Sample code: ValidateInputsByResourceGroup. diff --git a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/ServiceValidateInputsSamples.java b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/ServiceValidateInputsSamples.java index b9b819e7cf21d..afe176f33b759 100644 --- a/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/ServiceValidateInputsSamples.java +++ b/sdk/databox/azure-resourcemanager-databox/src/samples/java/com/azure/resourcemanager/databox/generated/ServiceValidateInputsSamples.java @@ -25,7 +25,7 @@ /** Samples for Service ValidateInputs. */ public final class ServiceValidateInputsSamples { /* - * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2021-03-01/examples/ValidateInputs.json + * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/ValidateInputs.json */ /** * Sample code: ValidateInputs. diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/AdditionalErrorInfoTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/AdditionalErrorInfoTests.java deleted file mode 100644 index 987c14f6b8af9..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/AdditionalErrorInfoTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.models.AdditionalErrorInfo; -import org.junit.jupiter.api.Assertions; - -public final class AdditionalErrorInfoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AdditionalErrorInfo model = - BinaryData - .fromString("{\"type\":\"tumkdosvqwhbm\",\"info\":\"databbjfddgmbmbexp\"}") - .toObject(AdditionalErrorInfo.class); - Assertions.assertEquals("tumkdosvqwhbm", model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AdditionalErrorInfo model = new AdditionalErrorInfo().withType("tumkdosvqwhbm").withInfo("databbjfddgmbmbexp"); - model = BinaryData.fromObject(model).toObject(AdditionalErrorInfo.class); - Assertions.assertEquals("tumkdosvqwhbm", model.type()); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ApplianceNetworkConfigurationTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ApplianceNetworkConfigurationTests.java deleted file mode 100644 index 7d32f15c3fb85..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ApplianceNetworkConfigurationTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.models.ApplianceNetworkConfiguration; - -public final class ApplianceNetworkConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ApplianceNetworkConfiguration model = - BinaryData - .fromString("{\"name\":\"oayqc\",\"macAddress\":\"rtzju\"}") - .toObject(ApplianceNetworkConfiguration.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ApplianceNetworkConfiguration model = new ApplianceNetworkConfiguration(); - model = BinaryData.fromObject(model).toObject(ApplianceNetworkConfiguration.class); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/AvailableSkuRequestTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/AvailableSkuRequestTests.java deleted file mode 100644 index 224e2c7368249..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/AvailableSkuRequestTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.models.AvailableSkuRequest; -import com.azure.resourcemanager.databox.models.SkuName; -import com.azure.resourcemanager.databox.models.TransferType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AvailableSkuRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AvailableSkuRequest model = - BinaryData - .fromString( - "{\"transferType\":\"ImportToAzure\",\"country\":\"ymddys\",\"location\":\"kiiuxhqyudxor\",\"skuNames\":[\"DataBoxDisk\",\"DataBox\",\"DataBoxDisk\",\"DataBoxDisk\"]}") - .toObject(AvailableSkuRequest.class); - Assertions.assertEquals(TransferType.IMPORT_TO_AZURE, model.transferType()); - Assertions.assertEquals("ymddys", model.country()); - Assertions.assertEquals("kiiuxhqyudxor", model.location()); - Assertions.assertEquals(SkuName.DATA_BOX_DISK, model.skuNames().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AvailableSkuRequest model = - new AvailableSkuRequest() - .withTransferType(TransferType.IMPORT_TO_AZURE) - .withCountry("ymddys") - .withLocation("kiiuxhqyudxor") - .withSkuNames( - Arrays - .asList(SkuName.DATA_BOX_DISK, SkuName.DATA_BOX, SkuName.DATA_BOX_DISK, SkuName.DATA_BOX_DISK)); - model = BinaryData.fromObject(model).toObject(AvailableSkuRequest.class); - Assertions.assertEquals(TransferType.IMPORT_TO_AZURE, model.transferType()); - Assertions.assertEquals("ymddys", model.country()); - Assertions.assertEquals("kiiuxhqyudxor", model.location()); - Assertions.assertEquals(SkuName.DATA_BOX_DISK, model.skuNames().get(0)); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/AvailableSkusResultTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/AvailableSkusResultTests.java deleted file mode 100644 index 9077186cbfe10..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/AvailableSkusResultTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.models.AvailableSkusResult; -import org.junit.jupiter.api.Assertions; - -public final class AvailableSkusResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AvailableSkusResult model = - BinaryData - .fromString( - "{\"value\":[{\"sku\":{\"name\":\"DataBox\",\"displayName\":\"qrvkdv\",\"family\":\"llr\"},\"enabled\":true,\"properties\":{\"dataLocationToServiceLocationMap\":[],\"costs\":[],\"apiVersions\":[],\"disabledReason\":\"Region\",\"disabledReasonMessage\":\"pulexxbczw\",\"requiredFeature\":\"uwiqzb\"}},{\"sku\":{\"name\":\"DataBox\",\"displayName\":\"ovm\",\"family\":\"kacspkw\"},\"enabled\":true,\"properties\":{\"dataLocationToServiceLocationMap\":[],\"costs\":[],\"apiVersions\":[],\"disabledReason\":\"Feature\",\"disabledReasonMessage\":\"lb\",\"requiredFeature\":\"nchrkcciww\"}},{\"sku\":{\"name\":\"DataBoxHeavy\",\"displayName\":\"khrs\",\"family\":\"iwkuofos\"},\"enabled\":true,\"properties\":{\"dataLocationToServiceLocationMap\":[],\"costs\":[],\"apiVersions\":[],\"disabledReason\":\"Region\",\"disabledReasonMessage\":\"vxieduugidyj\",\"requiredFeature\":\"f\"}},{\"sku\":{\"name\":\"DataBoxHeavy\",\"displayName\":\"svexcsonpclhoco\",\"family\":\"lkevle\"},\"enabled\":false,\"properties\":{\"dataLocationToServiceLocationMap\":[],\"costs\":[],\"apiVersions\":[],\"disabledReason\":\"Region\",\"disabledReasonMessage\":\"axkffei\",\"requiredFeature\":\"hl\"}}],\"nextLink\":\"ez\"}") - .toObject(AvailableSkusResult.class); - Assertions.assertEquals("ez", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AvailableSkusResult model = new AvailableSkusResult().withNextLink("ez"); - model = BinaryData.fromObject(model).toObject(AvailableSkusResult.class); - Assertions.assertEquals("ez", model.nextLink()); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/AzureFileFilterDetailsTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/AzureFileFilterDetailsTests.java deleted file mode 100644 index 5641720e28ab3..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/AzureFileFilterDetailsTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.models.AzureFileFilterDetails; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AzureFileFilterDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureFileFilterDetails model = - BinaryData - .fromString( - "{\"filePrefixList\":[\"dudgwdslfhot\"],\"filePathList\":[\"ynpwlbj\",\"pgacftadehxnlty\",\"sop\"],\"fileShareList\":[\"uesnzwdejbavo\",\"xzdmohctb\"]}") - .toObject(AzureFileFilterDetails.class); - Assertions.assertEquals("dudgwdslfhot", model.filePrefixList().get(0)); - Assertions.assertEquals("ynpwlbj", model.filePathList().get(0)); - Assertions.assertEquals("uesnzwdejbavo", model.fileShareList().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureFileFilterDetails model = - new AzureFileFilterDetails() - .withFilePrefixList(Arrays.asList("dudgwdslfhot")) - .withFilePathList(Arrays.asList("ynpwlbj", "pgacftadehxnlty", "sop")) - .withFileShareList(Arrays.asList("uesnzwdejbavo", "xzdmohctb")); - model = BinaryData.fromObject(model).toObject(AzureFileFilterDetails.class); - Assertions.assertEquals("dudgwdslfhot", model.filePrefixList().get(0)); - Assertions.assertEquals("ynpwlbj", model.filePathList().get(0)); - Assertions.assertEquals("uesnzwdejbavo", model.fileShareList().get(0)); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/BlobFilterDetailsTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/BlobFilterDetailsTests.java deleted file mode 100644 index 496532168b7d8..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/BlobFilterDetailsTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.models.BlobFilterDetails; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class BlobFilterDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BlobFilterDetails model = - BinaryData - .fromString( - "{\"blobPrefixList\":[\"eipheoflokeyy\",\"enjbdlwtgrhp\"],\"blobPathList\":[\"jumasx\"],\"containerList\":[\"pqyegualhbxxh\",\"jj\"]}") - .toObject(BlobFilterDetails.class); - Assertions.assertEquals("eipheoflokeyy", model.blobPrefixList().get(0)); - Assertions.assertEquals("jumasx", model.blobPathList().get(0)); - Assertions.assertEquals("pqyegualhbxxh", model.containerList().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BlobFilterDetails model = - new BlobFilterDetails() - .withBlobPrefixList(Arrays.asList("eipheoflokeyy", "enjbdlwtgrhp")) - .withBlobPathList(Arrays.asList("jumasx")) - .withContainerList(Arrays.asList("pqyegualhbxxh", "jj")); - model = BinaryData.fromObject(model).toObject(BlobFilterDetails.class); - Assertions.assertEquals("eipheoflokeyy", model.blobPrefixList().get(0)); - Assertions.assertEquals("jumasx", model.blobPathList().get(0)); - Assertions.assertEquals("pqyegualhbxxh", model.containerList().get(0)); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/CancellationReasonTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/CancellationReasonTests.java deleted file mode 100644 index 6546c2019b8d3..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/CancellationReasonTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.models.CancellationReason; -import org.junit.jupiter.api.Assertions; - -public final class CancellationReasonTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CancellationReason model = - BinaryData.fromString("{\"reason\":\"bnbbeldawkz\"}").toObject(CancellationReason.class); - Assertions.assertEquals("bnbbeldawkz", model.reason()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CancellationReason model = new CancellationReason().withReason("bnbbeldawkz"); - model = BinaryData.fromObject(model).toObject(CancellationReason.class); - Assertions.assertEquals("bnbbeldawkz", model.reason()); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ContactDetailsTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ContactDetailsTests.java deleted file mode 100644 index a21892aea68f8..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ContactDetailsTests.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.models.ContactDetails; -import com.azure.resourcemanager.databox.models.NotificationPreference; -import com.azure.resourcemanager.databox.models.NotificationStageName; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ContactDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContactDetails model = - BinaryData - .fromString( - "{\"contactName\":\"inpvswjdkirsoodq\",\"phone\":\"hc\",\"phoneExtension\":\"nohjt\",\"mobile\":\"whdsoifiyip\",\"emailList\":[\"sqwpgrjb\",\"norcjxvsnbyxqab\",\"mocpc\",\"shurzafbljjgpbto\"],\"notificationPreference\":[{\"stageName\":\"Dispatched\",\"sendNotification\":false},{\"stageName\":\"AtAzureDC\",\"sendNotification\":true},{\"stageName\":\"DataCopy\",\"sendNotification\":false},{\"stageName\":\"Dispatched\",\"sendNotification\":true}]}") - .toObject(ContactDetails.class); - Assertions.assertEquals("inpvswjdkirsoodq", model.contactName()); - Assertions.assertEquals("hc", model.phone()); - Assertions.assertEquals("nohjt", model.phoneExtension()); - Assertions.assertEquals("whdsoifiyip", model.mobile()); - Assertions.assertEquals("sqwpgrjb", model.emailList().get(0)); - Assertions.assertEquals(NotificationStageName.DISPATCHED, model.notificationPreference().get(0).stageName()); - Assertions.assertEquals(false, model.notificationPreference().get(0).sendNotification()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContactDetails model = - new ContactDetails() - .withContactName("inpvswjdkirsoodq") - .withPhone("hc") - .withPhoneExtension("nohjt") - .withMobile("whdsoifiyip") - .withEmailList(Arrays.asList("sqwpgrjb", "norcjxvsnbyxqab", "mocpc", "shurzafbljjgpbto")) - .withNotificationPreference( - Arrays - .asList( - new NotificationPreference() - .withStageName(NotificationStageName.DISPATCHED) - .withSendNotification(false), - new NotificationPreference() - .withStageName(NotificationStageName.AT_AZURE_DC) - .withSendNotification(true), - new NotificationPreference() - .withStageName(NotificationStageName.DATA_COPY) - .withSendNotification(false), - new NotificationPreference() - .withStageName(NotificationStageName.DISPATCHED) - .withSendNotification(true))); - model = BinaryData.fromObject(model).toObject(ContactDetails.class); - Assertions.assertEquals("inpvswjdkirsoodq", model.contactName()); - Assertions.assertEquals("hc", model.phone()); - Assertions.assertEquals("nohjt", model.phoneExtension()); - Assertions.assertEquals("whdsoifiyip", model.mobile()); - Assertions.assertEquals("sqwpgrjb", model.emailList().get(0)); - Assertions.assertEquals(NotificationStageName.DISPATCHED, model.notificationPreference().get(0).stageName()); - Assertions.assertEquals(false, model.notificationPreference().get(0).sendNotification()); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/CopyLogDetailsTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/CopyLogDetailsTests.java deleted file mode 100644 index 4499ff11b5e0b..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/CopyLogDetailsTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.models.CopyLogDetails; - -public final class CopyLogDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CopyLogDetails model = - BinaryData.fromString("{\"copyLogDetailsType\":\"CopyLogDetails\"}").toObject(CopyLogDetails.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CopyLogDetails model = new CopyLogDetails(); - model = BinaryData.fromObject(model).toObject(CopyLogDetails.class); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/CopyProgressTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/CopyProgressTests.java deleted file mode 100644 index 5afccc0572f7f..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/CopyProgressTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.models.CopyProgress; - -public final class CopyProgressTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CopyProgress model = - BinaryData - .fromString( - "{\"storageAccountName\":\"wyzmhtxon\",\"transferType\":\"ImportToAzure\",\"dataAccountType\":\"StorageAccount\",\"accountId\":\"jcbpwxqpsrknft\",\"bytesProcessed\":5398442768208830839,\"totalBytesToProcess\":4239243194073786564,\"filesProcessed\":3324276712333747571,\"totalFilesToProcess\":4550073852873606939,\"invalidFilesProcessed\":2697266994096414506,\"invalidFileBytesUploaded\":7804895288232886896,\"renamedContainerCount\":5520430790003990876,\"filesErroredOut\":1881622012006490275,\"directoriesErroredOut\":4284842638181152780,\"invalidDirectoriesProcessed\":6885782130049641990,\"isEnumerationInProgress\":true}") - .toObject(CopyProgress.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CopyProgress model = new CopyProgress(); - model = BinaryData.fromObject(model).toObject(CopyProgress.class); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/CreateJobValidationsTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/CreateJobValidationsTests.java deleted file mode 100644 index 29b762e86c356..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/CreateJobValidationsTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.models.CreateJobValidations; -import com.azure.resourcemanager.databox.models.ValidationInputRequest; -import java.util.Arrays; - -public final class CreateJobValidationsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CreateJobValidations model = - BinaryData - .fromString( - "{\"validationCategory\":\"JobCreationValidation\",\"individualRequestDetails\":[{\"validationType\":\"ValidationInputRequest\"},{\"validationType\":\"ValidationInputRequest\"},{\"validationType\":\"ValidationInputRequest\"}]}") - .toObject(CreateJobValidations.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CreateJobValidations model = - new CreateJobValidations() - .withIndividualRequestDetails( - Arrays - .asList( - new ValidationInputRequest(), new ValidationInputRequest(), new ValidationInputRequest())); - model = BinaryData.fromObject(model).toObject(CreateJobValidations.class); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/CreateOrderLimitForSubscriptionValidationRequestTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/CreateOrderLimitForSubscriptionValidationRequestTests.java deleted file mode 100644 index 3ebc79a418a0d..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/CreateOrderLimitForSubscriptionValidationRequestTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.models.CreateOrderLimitForSubscriptionValidationRequest; -import com.azure.resourcemanager.databox.models.SkuName; -import org.junit.jupiter.api.Assertions; - -public final class CreateOrderLimitForSubscriptionValidationRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CreateOrderLimitForSubscriptionValidationRequest model = - BinaryData - .fromString("{\"validationType\":\"ValidateCreateOrderLimit\",\"deviceType\":\"DataBoxDisk\"}") - .toObject(CreateOrderLimitForSubscriptionValidationRequest.class); - Assertions.assertEquals(SkuName.DATA_BOX_DISK, model.deviceType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CreateOrderLimitForSubscriptionValidationRequest model = - new CreateOrderLimitForSubscriptionValidationRequest().withDeviceType(SkuName.DATA_BOX_DISK); - model = BinaryData.fromObject(model).toObject(CreateOrderLimitForSubscriptionValidationRequest.class); - Assertions.assertEquals(SkuName.DATA_BOX_DISK, model.deviceType()); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DataBoxAccountCopyLogDetailsTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DataBoxAccountCopyLogDetailsTests.java deleted file mode 100644 index aae06dcafc4eb..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DataBoxAccountCopyLogDetailsTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.models.DataBoxAccountCopyLogDetails; - -public final class DataBoxAccountCopyLogDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataBoxAccountCopyLogDetails model = - BinaryData - .fromString( - "{\"copyLogDetailsType\":\"DataBox\",\"accountName\":\"y\",\"copyLogLink\":\"pvgqzcjrvxdjzlm\",\"copyVerboseLogLink\":\"xkvugfhzov\"}") - .toObject(DataBoxAccountCopyLogDetails.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataBoxAccountCopyLogDetails model = new DataBoxAccountCopyLogDetails(); - model = BinaryData.fromObject(model).toObject(DataBoxAccountCopyLogDetails.class); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DataBoxDiskCopyLogDetailsTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DataBoxDiskCopyLogDetailsTests.java deleted file mode 100644 index 474ed9a247067..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DataBoxDiskCopyLogDetailsTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.models.DataBoxDiskCopyLogDetails; - -public final class DataBoxDiskCopyLogDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataBoxDiskCopyLogDetails model = - BinaryData - .fromString( - "{\"copyLogDetailsType\":\"DataBoxDisk\",\"diskSerialNumber\":\"jvzunluthnnp\",\"errorLogLink\":\"xipeilpjzuaejx\",\"verboseLogLink\":\"ltskzbbtd\"}") - .toObject(DataBoxDiskCopyLogDetails.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataBoxDiskCopyLogDetails model = new DataBoxDiskCopyLogDetails(); - model = BinaryData.fromObject(model).toObject(DataBoxDiskCopyLogDetails.class); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DataBoxDiskCopyProgressTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DataBoxDiskCopyProgressTests.java deleted file mode 100644 index 550790a3b7853..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DataBoxDiskCopyProgressTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.models.DataBoxDiskCopyProgress; - -public final class DataBoxDiskCopyProgressTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataBoxDiskCopyProgress model = - BinaryData - .fromString( - "{\"serialNumber\":\"mv\",\"bytesCopied\":6390574886473750480,\"percentComplete\":1792717087,\"status\":\"Completed\"}") - .toObject(DataBoxDiskCopyProgress.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataBoxDiskCopyProgress model = new DataBoxDiskCopyProgress(); - model = BinaryData.fromObject(model).toObject(DataBoxDiskCopyProgress.class); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DataBoxHeavyAccountCopyLogDetailsTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DataBoxHeavyAccountCopyLogDetailsTests.java deleted file mode 100644 index 0abb0d35cb8a5..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DataBoxHeavyAccountCopyLogDetailsTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.models.DataBoxHeavyAccountCopyLogDetails; - -public final class DataBoxHeavyAccountCopyLogDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataBoxHeavyAccountCopyLogDetails model = - BinaryData - .fromString( - "{\"copyLogDetailsType\":\"DataBoxHeavy\",\"accountName\":\"wncwzzhxgktrmg\",\"copyLogLink\":[\"apkteoellwptfdyg\",\"fqbuaceopzf\",\"rhhuaopppcqeqx\"],\"copyVerboseLogLink\":[\"dahzxctobg\"]}") - .toObject(DataBoxHeavyAccountCopyLogDetails.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataBoxHeavyAccountCopyLogDetails model = new DataBoxHeavyAccountCopyLogDetails(); - model = BinaryData.fromObject(model).toObject(DataBoxHeavyAccountCopyLogDetails.class); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DataBoxScheduleAvailabilityRequestTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DataBoxScheduleAvailabilityRequestTests.java deleted file mode 100644 index e28f53555b327..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DataBoxScheduleAvailabilityRequestTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.models.DataBoxScheduleAvailabilityRequest; -import org.junit.jupiter.api.Assertions; - -public final class DataBoxScheduleAvailabilityRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataBoxScheduleAvailabilityRequest model = - BinaryData - .fromString("{\"skuName\":\"DataBox\",\"storageLocation\":\"bhhxsrzdzuc\",\"country\":\"scdntnevf\"}") - .toObject(DataBoxScheduleAvailabilityRequest.class); - Assertions.assertEquals("bhhxsrzdzuc", model.storageLocation()); - Assertions.assertEquals("scdntnevf", model.country()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataBoxScheduleAvailabilityRequest model = - new DataBoxScheduleAvailabilityRequest().withStorageLocation("bhhxsrzdzuc").withCountry("scdntnevf"); - model = BinaryData.fromObject(model).toObject(DataBoxScheduleAvailabilityRequest.class); - Assertions.assertEquals("bhhxsrzdzuc", model.storageLocation()); - Assertions.assertEquals("scdntnevf", model.country()); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DataLocationToServiceLocationMapTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DataLocationToServiceLocationMapTests.java deleted file mode 100644 index 6f918de58784d..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DataLocationToServiceLocationMapTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.models.DataLocationToServiceLocationMap; - -public final class DataLocationToServiceLocationMapTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataLocationToServiceLocationMap model = - BinaryData - .fromString("{\"dataLocation\":\"mpukgriw\",\"serviceLocation\":\"zlfbxzpuzycispnq\"}") - .toObject(DataLocationToServiceLocationMap.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataLocationToServiceLocationMap model = new DataLocationToServiceLocationMap(); - model = BinaryData.fromObject(model).toObject(DataLocationToServiceLocationMap.class); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DiskScheduleAvailabilityRequestTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DiskScheduleAvailabilityRequestTests.java deleted file mode 100644 index 9567bf78aa2f1..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/DiskScheduleAvailabilityRequestTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.models.DiskScheduleAvailabilityRequest; -import org.junit.jupiter.api.Assertions; - -public final class DiskScheduleAvailabilityRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiskScheduleAvailabilityRequest model = - BinaryData - .fromString( - "{\"skuName\":\"DataBoxDisk\",\"expectedDataSizeInTeraBytes\":158092972,\"storageLocation\":\"semwabnet\",\"country\":\"hszhedplvwiwu\"}") - .toObject(DiskScheduleAvailabilityRequest.class); - Assertions.assertEquals("semwabnet", model.storageLocation()); - Assertions.assertEquals("hszhedplvwiwu", model.country()); - Assertions.assertEquals(158092972, model.expectedDataSizeInTeraBytes()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiskScheduleAvailabilityRequest model = - new DiskScheduleAvailabilityRequest() - .withStorageLocation("semwabnet") - .withCountry("hszhedplvwiwu") - .withExpectedDataSizeInTeraBytes(158092972); - model = BinaryData.fromObject(model).toObject(DiskScheduleAvailabilityRequest.class); - Assertions.assertEquals("semwabnet", model.storageLocation()); - Assertions.assertEquals("hszhedplvwiwu", model.country()); - Assertions.assertEquals(158092972, model.expectedDataSizeInTeraBytes()); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/EncryptionPreferencesTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/EncryptionPreferencesTests.java deleted file mode 100644 index 3e9de56fecd6e..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/EncryptionPreferencesTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.models.DoubleEncryption; -import com.azure.resourcemanager.databox.models.EncryptionPreferences; -import org.junit.jupiter.api.Assertions; - -public final class EncryptionPreferencesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EncryptionPreferences model = - BinaryData.fromString("{\"doubleEncryption\":\"Enabled\"}").toObject(EncryptionPreferences.class); - Assertions.assertEquals(DoubleEncryption.ENABLED, model.doubleEncryption()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EncryptionPreferences model = new EncryptionPreferences().withDoubleEncryption(DoubleEncryption.ENABLED); - model = BinaryData.fromObject(model).toObject(EncryptionPreferences.class); - Assertions.assertEquals(DoubleEncryption.ENABLED, model.doubleEncryption()); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/FilterFileDetailsTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/FilterFileDetailsTests.java deleted file mode 100644 index 1602d62c52739..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/FilterFileDetailsTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.models.FilterFileDetails; -import com.azure.resourcemanager.databox.models.FilterFileType; -import org.junit.jupiter.api.Assertions; - -public final class FilterFileDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FilterFileDetails model = - BinaryData - .fromString("{\"filterFileType\":\"AzureBlob\",\"filterFilePath\":\"udwxdndnvowguj\"}") - .toObject(FilterFileDetails.class); - Assertions.assertEquals(FilterFileType.AZURE_BLOB, model.filterFileType()); - Assertions.assertEquals("udwxdndnvowguj", model.filterFilePath()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FilterFileDetails model = - new FilterFileDetails().withFilterFileType(FilterFileType.AZURE_BLOB).withFilterFilePath("udwxdndnvowguj"); - model = BinaryData.fromObject(model).toObject(FilterFileDetails.class); - Assertions.assertEquals(FilterFileType.AZURE_BLOB, model.filterFileType()); - Assertions.assertEquals("udwxdndnvowguj", model.filterFilePath()); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/HeavyScheduleAvailabilityRequestTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/HeavyScheduleAvailabilityRequestTests.java deleted file mode 100644 index ddc3b418c518d..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/HeavyScheduleAvailabilityRequestTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.models.HeavyScheduleAvailabilityRequest; -import org.junit.jupiter.api.Assertions; - -public final class HeavyScheduleAvailabilityRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HeavyScheduleAvailabilityRequest model = - BinaryData - .fromString("{\"skuName\":\"DataBoxHeavy\",\"storageLocation\":\"mwmbes\",\"country\":\"nkww\"}") - .toObject(HeavyScheduleAvailabilityRequest.class); - Assertions.assertEquals("mwmbes", model.storageLocation()); - Assertions.assertEquals("nkww", model.country()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HeavyScheduleAvailabilityRequest model = - new HeavyScheduleAvailabilityRequest().withStorageLocation("mwmbes").withCountry("nkww"); - model = BinaryData.fromObject(model).toObject(HeavyScheduleAvailabilityRequest.class); - Assertions.assertEquals("mwmbes", model.storageLocation()); - Assertions.assertEquals("nkww", model.country()); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/IdentityPropertiesTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/IdentityPropertiesTests.java deleted file mode 100644 index fb7863cf40cbb..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/IdentityPropertiesTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.models.IdentityProperties; -import com.azure.resourcemanager.databox.models.UserAssignedProperties; -import org.junit.jupiter.api.Assertions; - -public final class IdentityPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IdentityProperties model = - BinaryData - .fromString("{\"type\":\"zrkgqhcjrefovg\",\"userAssigned\":{\"resourceId\":\"sle\"}}") - .toObject(IdentityProperties.class); - Assertions.assertEquals("zrkgqhcjrefovg", model.type()); - Assertions.assertEquals("sle", model.userAssigned().resourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IdentityProperties model = - new IdentityProperties() - .withType("zrkgqhcjrefovg") - .withUserAssigned(new UserAssignedProperties().withResourceId("sle")); - model = BinaryData.fromObject(model).toObject(IdentityProperties.class); - Assertions.assertEquals("zrkgqhcjrefovg", model.type()); - Assertions.assertEquals("sle", model.userAssigned().resourceId()); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/JobDeliveryInfoTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/JobDeliveryInfoTests.java deleted file mode 100644 index 9a625cf42b269..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/JobDeliveryInfoTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.models.JobDeliveryInfo; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class JobDeliveryInfoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JobDeliveryInfo model = - BinaryData.fromString("{\"scheduledDateTime\":\"2021-06-22T20:12:51Z\"}").toObject(JobDeliveryInfo.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-22T20:12:51Z"), model.scheduledDateTime()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobDeliveryInfo model = - new JobDeliveryInfo().withScheduledDateTime(OffsetDateTime.parse("2021-06-22T20:12:51Z")); - model = BinaryData.fromObject(model).toObject(JobDeliveryInfo.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-22T20:12:51Z"), model.scheduledDateTime()); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/JobResourceListTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/JobResourceListTests.java deleted file mode 100644 index f4651bd9e4d29..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/JobResourceListTests.java +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.fluent.models.JobResourceInner; -import com.azure.resourcemanager.databox.models.JobDeliveryType; -import com.azure.resourcemanager.databox.models.JobResourceList; -import com.azure.resourcemanager.databox.models.ResourceIdentity; -import com.azure.resourcemanager.databox.models.Sku; -import com.azure.resourcemanager.databox.models.SkuName; -import com.azure.resourcemanager.databox.models.TransferType; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class JobResourceListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JobResourceList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"transferType\":\"ExportFromAzure\",\"isCancellable\":false,\"isDeletable\":true,\"isShippingAddressEditable\":false,\"isPrepareToShipEnabled\":false,\"status\":\"Aborted\",\"startTime\":\"2021-08-18T11:52:54Z\",\"cancellationReason\":\"ryhtnapczwlokjy\",\"deliveryType\":\"Scheduled\",\"isCancellableWithoutFee\":false},\"name\":\"f\",\"id\":\"qtrgqjbpfzfsinzg\",\"type\":\"jrwzox\",\"sku\":{\"name\":\"DataBoxHeavy\",\"displayName\":\"jsprozvcpute\",\"family\":\"vwmf\"},\"identity\":{\"type\":\"scmdvpjhulsuu\",\"principalId\":\"kjozkrwfnd\",\"tenantId\":\"djpslw\",\"userAssignedIdentities\":{}},\"location\":\"dpvwryoqpsoaccta\",\"tags\":{\"dfdosygexp\":\"ljlahbcryf\",\"dphlxaolt\":\"ojakhmsbzjhcrze\"}},{\"properties\":{\"transferType\":\"ImportToAzure\",\"isCancellable\":true,\"isDeletable\":true,\"isShippingAddressEditable\":true,\"isPrepareToShipEnabled\":false,\"status\":\"DevicePrepared\",\"startTime\":\"2021-02-18T08:39:41Z\",\"cancellationReason\":\"qfpjk\",\"deliveryType\":\"Scheduled\",\"isCancellableWithoutFee\":true},\"name\":\"clxxwrljdo\",\"id\":\"gsntnbybkzgcwr\",\"type\":\"skcqvkocrcjd\",\"sku\":{\"name\":\"DataBox\",\"displayName\":\"iheogna\",\"family\":\"zxtheotusivyevcc\"},\"identity\":{\"type\":\"hn\",\"principalId\":\"ngbwjz\",\"tenantId\":\"fygxgispemvtzfk\",\"userAssignedIdentities\":{}},\"location\":\"ubljofxqe\",\"tags\":{\"jqul\":\"aeqjhqjbasvms\"}},{\"properties\":{\"transferType\":\"ExportFromAzure\",\"isCancellable\":false,\"isDeletable\":true,\"isShippingAddressEditable\":true,\"isPrepareToShipEnabled\":false,\"status\":\"Cancelled\",\"startTime\":\"2021-06-26T03:50:20Z\",\"cancellationReason\":\"ssainqpjwnzll\",\"deliveryType\":\"Scheduled\",\"isCancellableWithoutFee\":true},\"name\":\"wyqkgfgibm\",\"id\":\"nqgoulzndli\",\"type\":\"dgak\",\"sku\":{\"name\":\"DataBox\",\"displayName\":\"feusnhut\",\"family\":\"ltmrldh\"},\"identity\":{\"type\":\"zzd\",\"principalId\":\"qxhocdgeablgphut\",\"tenantId\":\"ndv\",\"userAssignedIdentities\":{}},\"location\":\"ozwyiftyhxhuro\",\"tags\":{\"cukjf\":\"yxolniwp\",\"lryplwckbasyy\":\"giawx\",\"jkot\":\"nddhsgcbacph\"}}],\"nextLink\":\"s\"}") - .toObject(JobResourceList.class); - Assertions.assertEquals("dpvwryoqpsoaccta", model.value().get(0).location()); - Assertions.assertEquals("ljlahbcryf", model.value().get(0).tags().get("dfdosygexp")); - Assertions.assertEquals(SkuName.DATA_BOX_HEAVY, model.value().get(0).sku().name()); - Assertions.assertEquals("jsprozvcpute", model.value().get(0).sku().displayName()); - Assertions.assertEquals("vwmf", model.value().get(0).sku().family()); - Assertions.assertEquals("scmdvpjhulsuu", model.value().get(0).identity().type()); - Assertions.assertEquals(TransferType.EXPORT_FROM_AZURE, model.value().get(0).transferType()); - Assertions.assertEquals(JobDeliveryType.SCHEDULED, model.value().get(0).deliveryType()); - Assertions.assertEquals("s", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobResourceList model = - new JobResourceList() - .withValue( - Arrays - .asList( - new JobResourceInner() - .withLocation("dpvwryoqpsoaccta") - .withTags(mapOf("dfdosygexp", "ljlahbcryf", "dphlxaolt", "ojakhmsbzjhcrze")) - .withSku( - new Sku() - .withName(SkuName.DATA_BOX_HEAVY) - .withDisplayName("jsprozvcpute") - .withFamily("vwmf")) - .withIdentity( - new ResourceIdentity() - .withType("scmdvpjhulsuu") - .withUserAssignedIdentities(mapOf())) - .withTransferType(TransferType.EXPORT_FROM_AZURE) - .withDeliveryType(JobDeliveryType.SCHEDULED), - new JobResourceInner() - .withLocation("ubljofxqe") - .withTags(mapOf("jqul", "aeqjhqjbasvms")) - .withSku( - new Sku() - .withName(SkuName.DATA_BOX) - .withDisplayName("iheogna") - .withFamily("zxtheotusivyevcc")) - .withIdentity(new ResourceIdentity().withType("hn").withUserAssignedIdentities(mapOf())) - .withTransferType(TransferType.IMPORT_TO_AZURE) - .withDeliveryType(JobDeliveryType.SCHEDULED), - new JobResourceInner() - .withLocation("ozwyiftyhxhuro") - .withTags(mapOf("cukjf", "yxolniwp", "lryplwckbasyy", "giawx", "jkot", "nddhsgcbacph")) - .withSku( - new Sku() - .withName(SkuName.DATA_BOX) - .withDisplayName("feusnhut") - .withFamily("ltmrldh")) - .withIdentity( - new ResourceIdentity().withType("zzd").withUserAssignedIdentities(mapOf())) - .withTransferType(TransferType.EXPORT_FROM_AZURE) - .withDeliveryType(JobDeliveryType.SCHEDULED))) - .withNextLink("s"); - model = BinaryData.fromObject(model).toObject(JobResourceList.class); - Assertions.assertEquals("dpvwryoqpsoaccta", model.value().get(0).location()); - Assertions.assertEquals("ljlahbcryf", model.value().get(0).tags().get("dfdosygexp")); - Assertions.assertEquals(SkuName.DATA_BOX_HEAVY, model.value().get(0).sku().name()); - Assertions.assertEquals("jsprozvcpute", model.value().get(0).sku().displayName()); - Assertions.assertEquals("vwmf", model.value().get(0).sku().family()); - Assertions.assertEquals("scmdvpjhulsuu", model.value().get(0).identity().type()); - Assertions.assertEquals(TransferType.EXPORT_FROM_AZURE, model.value().get(0).transferType()); - Assertions.assertEquals(JobDeliveryType.SCHEDULED, model.value().get(0).deliveryType()); - Assertions.assertEquals("s", model.nextLink()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/JobResourceUpdateParameterTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/JobResourceUpdateParameterTests.java deleted file mode 100644 index 8f6b293ffe90c..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/JobResourceUpdateParameterTests.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.models.JobResourceUpdateParameter; -import com.azure.resourcemanager.databox.models.ResourceIdentity; -import com.azure.resourcemanager.databox.models.UpdateJobDetails; -import com.azure.resourcemanager.databox.models.UserAssignedIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class JobResourceUpdateParameterTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JobResourceUpdateParameter model = - BinaryData - .fromString( - "{\"properties\":{\"details\":{}},\"tags\":{\"lopwiyig\":\"deslp\"},\"identity\":{\"type\":\"kdwzbaiuebbaumny\",\"principalId\":\"ped\",\"tenantId\":\"jn\",\"userAssignedIdentities\":{\"jjdhtld\":{\"principalId\":\"hsmtxpsiebtfhvp\",\"clientId\":\"apskrdqm\"},\"vnm\":{\"principalId\":\"yzxuutkncw\",\"clientId\":\"wsvlxotogtwrupqs\"},\"dhbt\":{\"principalId\":\"ykvceoveil\",\"clientId\":\"notyfjfcnjbkcn\"}}}}") - .toObject(JobResourceUpdateParameter.class); - Assertions.assertEquals("deslp", model.tags().get("lopwiyig")); - Assertions.assertEquals("kdwzbaiuebbaumny", model.identity().type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobResourceUpdateParameter model = - new JobResourceUpdateParameter() - .withTags(mapOf("lopwiyig", "deslp")) - .withIdentity( - new ResourceIdentity() - .withType("kdwzbaiuebbaumny") - .withUserAssignedIdentities( - mapOf( - "jjdhtld", - new UserAssignedIdentity(), - "vnm", - new UserAssignedIdentity(), - "dhbt", - new UserAssignedIdentity()))) - .withDetails(new UpdateJobDetails()); - model = BinaryData.fromObject(model).toObject(JobResourceUpdateParameter.class); - Assertions.assertEquals("deslp", model.tags().get("lopwiyig")); - Assertions.assertEquals("kdwzbaiuebbaumny", model.identity().type()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/JobStagesTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/JobStagesTests.java deleted file mode 100644 index cd259d6475618..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/JobStagesTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.models.JobStages; - -public final class JobStagesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JobStages model = - BinaryData - .fromString( - "{\"stageName\":\"Completed\",\"displayName\":\"ro\",\"stageStatus\":\"SucceededWithWarnings\",\"stageTime\":\"2021-08-27T09:45:25Z\",\"jobStageDetails\":\"dataehzzvypyqrim\"}") - .toObject(JobStages.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobStages model = new JobStages(); - model = BinaryData.fromObject(model).toObject(JobStages.class); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/JobsBookShipmentPickUpWithResponseMockTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/JobsBookShipmentPickUpWithResponseMockTests.java deleted file mode 100644 index 2512eab49e59b..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/JobsBookShipmentPickUpWithResponseMockTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.databox.DataBoxManager; -import com.azure.resourcemanager.databox.models.ShipmentPickUpRequest; -import com.azure.resourcemanager.databox.models.ShipmentPickUpResponse; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class JobsBookShipmentPickUpWithResponseMockTests { - @Test - public void testBookShipmentPickUpWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"confirmationNumber\":\"mbmpaxmodfvuefy\",\"readyByTime\":\"2021-06-26T00:17:44Z\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataBoxManager manager = - DataBoxManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ShipmentPickUpResponse response = - manager - .jobs() - .bookShipmentPickUpWithResponse( - "mutwuoe", - "rpkhjwn", - new ShipmentPickUpRequest() - .withStartTime(OffsetDateTime.parse("2021-07-28T08:27Z")) - .withEndTime(OffsetDateTime.parse("2021-08-17T21:02:56Z")) - .withShipmentLocation("sluicpdggkzz"), - com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/JobsCancelWithResponseMockTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/JobsCancelWithResponseMockTests.java deleted file mode 100644 index 6817a1c2c4d12..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/JobsCancelWithResponseMockTests.java +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.databox.DataBoxManager; -import com.azure.resourcemanager.databox.models.CancellationReason; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class JobsCancelWithResponseMockTests { - @Test - public void testCancelWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(204); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataBoxManager manager = - DataBoxManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .jobs() - .cancelWithResponse( - "pfvmwyhrfou", "ft", new CancellationReason().withReason("akcp"), com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/JobsDeleteMockTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/JobsDeleteMockTests.java deleted file mode 100644 index cebe74ea2f9f1..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/JobsDeleteMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.databox.DataBoxManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class JobsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataBoxManager manager = - DataBoxManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.jobs().delete("pcjwv", "hdldwmgxcxrsl", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/KeyEncryptionKeyTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/KeyEncryptionKeyTests.java deleted file mode 100644 index 2307104c512cb..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/KeyEncryptionKeyTests.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.models.IdentityProperties; -import com.azure.resourcemanager.databox.models.KekType; -import com.azure.resourcemanager.databox.models.KeyEncryptionKey; -import com.azure.resourcemanager.databox.models.UserAssignedProperties; -import org.junit.jupiter.api.Assertions; - -public final class KeyEncryptionKeyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - KeyEncryptionKey model = - BinaryData - .fromString( - "{\"kekType\":\"MicrosoftManaged\",\"identityProperties\":{\"type\":\"hmenevfyexfwhybc\",\"userAssigned\":{\"resourceId\":\"yvdcsitynnaa\"}},\"kekUrl\":\"ectehf\",\"kekVaultResourceID\":\"scjeypv\"}") - .toObject(KeyEncryptionKey.class); - Assertions.assertEquals(KekType.MICROSOFT_MANAGED, model.kekType()); - Assertions.assertEquals("hmenevfyexfwhybc", model.identityProperties().type()); - Assertions.assertEquals("yvdcsitynnaa", model.identityProperties().userAssigned().resourceId()); - Assertions.assertEquals("ectehf", model.kekUrl()); - Assertions.assertEquals("scjeypv", model.kekVaultResourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - KeyEncryptionKey model = - new KeyEncryptionKey() - .withKekType(KekType.MICROSOFT_MANAGED) - .withIdentityProperties( - new IdentityProperties() - .withType("hmenevfyexfwhybc") - .withUserAssigned(new UserAssignedProperties().withResourceId("yvdcsitynnaa"))) - .withKekUrl("ectehf") - .withKekVaultResourceId("scjeypv"); - model = BinaryData.fromObject(model).toObject(KeyEncryptionKey.class); - Assertions.assertEquals(KekType.MICROSOFT_MANAGED, model.kekType()); - Assertions.assertEquals("hmenevfyexfwhybc", model.identityProperties().type()); - Assertions.assertEquals("yvdcsitynnaa", model.identityProperties().userAssigned().resourceId()); - Assertions.assertEquals("ectehf", model.kekUrl()); - Assertions.assertEquals("scjeypv", model.kekVaultResourceId()); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/LastMitigationActionOnJobTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/LastMitigationActionOnJobTests.java deleted file mode 100644 index b0ea73328827e..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/LastMitigationActionOnJobTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.models.CustomerResolutionCode; -import com.azure.resourcemanager.databox.models.LastMitigationActionOnJob; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class LastMitigationActionOnJobTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LastMitigationActionOnJob model = - BinaryData - .fromString( - "{\"actionDateTimeInUtc\":\"2021-11-04T06:11:04Z\",\"isPerformedByCustomer\":true,\"customerResolution\":\"MoveToCleanUpDevice\"}") - .toObject(LastMitigationActionOnJob.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-04T06:11:04Z"), model.actionDateTimeInUtc()); - Assertions.assertEquals(true, model.isPerformedByCustomer()); - Assertions.assertEquals(CustomerResolutionCode.MOVE_TO_CLEAN_UP_DEVICE, model.customerResolution()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LastMitigationActionOnJob model = - new LastMitigationActionOnJob() - .withActionDateTimeInUtc(OffsetDateTime.parse("2021-11-04T06:11:04Z")) - .withIsPerformedByCustomer(true) - .withCustomerResolution(CustomerResolutionCode.MOVE_TO_CLEAN_UP_DEVICE); - model = BinaryData.fromObject(model).toObject(LastMitigationActionOnJob.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-04T06:11:04Z"), model.actionDateTimeInUtc()); - Assertions.assertEquals(true, model.isPerformedByCustomer()); - Assertions.assertEquals(CustomerResolutionCode.MOVE_TO_CLEAN_UP_DEVICE, model.customerResolution()); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/NotificationPreferenceTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/NotificationPreferenceTests.java deleted file mode 100644 index 71d2febe22957..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/NotificationPreferenceTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.models.NotificationPreference; -import com.azure.resourcemanager.databox.models.NotificationStageName; -import org.junit.jupiter.api.Assertions; - -public final class NotificationPreferenceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NotificationPreference model = - BinaryData - .fromString("{\"stageName\":\"DevicePrepared\",\"sendNotification\":true}") - .toObject(NotificationPreference.class); - Assertions.assertEquals(NotificationStageName.DEVICE_PREPARED, model.stageName()); - Assertions.assertEquals(true, model.sendNotification()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NotificationPreference model = - new NotificationPreference() - .withStageName(NotificationStageName.DEVICE_PREPARED) - .withSendNotification(true); - model = BinaryData.fromObject(model).toObject(NotificationPreference.class); - Assertions.assertEquals(NotificationStageName.DEVICE_PREPARED, model.stageName()); - Assertions.assertEquals(true, model.sendNotification()); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/OperationDisplayTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/OperationDisplayTests.java deleted file mode 100644 index 7419c5dee9567..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/OperationDisplayTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.models.OperationDisplay; -import org.junit.jupiter.api.Assertions; - -public final class OperationDisplayTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationDisplay model = - BinaryData - .fromString( - "{\"provider\":\"bifpikxwczb\",\"resource\":\"cnpqxuhivyqniwby\",\"operation\":\"k\",\"description\":\"dumjgrtfwvuk\"}") - .toObject(OperationDisplay.class); - Assertions.assertEquals("bifpikxwczb", model.provider()); - Assertions.assertEquals("cnpqxuhivyqniwby", model.resource()); - Assertions.assertEquals("k", model.operation()); - Assertions.assertEquals("dumjgrtfwvuk", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDisplay model = - new OperationDisplay() - .withProvider("bifpikxwczb") - .withResource("cnpqxuhivyqniwby") - .withOperation("k") - .withDescription("dumjgrtfwvuk"); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); - Assertions.assertEquals("bifpikxwczb", model.provider()); - Assertions.assertEquals("cnpqxuhivyqniwby", model.resource()); - Assertions.assertEquals("k", model.operation()); - Assertions.assertEquals("dumjgrtfwvuk", model.description()); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/OperationInnerTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/OperationInnerTests.java deleted file mode 100644 index 9981ab31ea05f..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/OperationInnerTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.fluent.models.OperationInner; -import org.junit.jupiter.api.Assertions; - -public final class OperationInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationInner model = - BinaryData - .fromString( - "{\"name\":\"rqobmtuk\",\"display\":{\"provider\":\"yrtih\",\"resource\":\"tijbpzvgnwzsymgl\",\"operation\":\"fcyzkohdbihanufh\",\"description\":\"bj\"},\"properties\":\"dataa\",\"origin\":\"th\",\"isDataAction\":false}") - .toObject(OperationInner.class); - Assertions.assertEquals(false, model.isDataAction()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationInner model = new OperationInner().withIsDataAction(false); - model = BinaryData.fromObject(model).toObject(OperationInner.class); - Assertions.assertEquals(false, model.isDataAction()); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/OperationListTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/OperationListTests.java deleted file mode 100644 index 918df2be5500f..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/OperationListTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.models.OperationList; -import org.junit.jupiter.api.Assertions; - -public final class OperationListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationList model = - BinaryData - .fromString( - "{\"value\":[{\"name\":\"quvgjxpybczme\",\"display\":{\"provider\":\"zopbsphrupidgs\",\"resource\":\"bejhphoycmsxa\",\"operation\":\"hdxbmtqio\",\"description\":\"zehtbmu\"},\"properties\":\"dataownoizhw\",\"origin\":\"xybqsoqij\",\"isDataAction\":true},{\"name\":\"bpazlobcufpdzn\",\"display\":{\"provider\":\"cqqjnqglhqgn\",\"resource\":\"ooojywifsqe\",\"operation\":\"agdfmglzlh\",\"description\":\"rifkwm\"},\"properties\":\"dataktsizntocipaou\",\"origin\":\"psqucmpoyf\",\"isDataAction\":true},{\"name\":\"gknygjofjddeqs\",\"display\":{\"provider\":\"upewnwreitjzy\",\"resource\":\"usarhmofc\",\"operation\":\"smy\",\"description\":\"kdtmlxhekuk\"},\"properties\":\"datatxukcdmp\",\"origin\":\"cryuan\",\"isDataAction\":false}],\"nextLink\":\"zdxtayrlhmwhf\"}") - .toObject(OperationList.class); - Assertions.assertEquals("zdxtayrlhmwhf", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationList model = new OperationList().withNextLink("zdxtayrlhmwhf"); - model = BinaryData.fromObject(model).toObject(OperationList.class); - Assertions.assertEquals("zdxtayrlhmwhf", model.nextLink()); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/OperationsListMockTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/OperationsListMockTests.java deleted file mode 100644 index e9caeb0d8b1a3..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/OperationsListMockTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.databox.DataBoxManager; -import com.azure.resourcemanager.databox.models.Operation; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class OperationsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"name\":\"zizxbmpgcj\",\"display\":{\"provider\":\"zmuvpbttdumorppx\",\"resource\":\"mnzb\",\"operation\":\"hjpglkf\",\"description\":\"hdneuelfph\"},\"properties\":\"datayhtozfikdowwqu\",\"origin\":\"xzxcl\",\"isDataAction\":true}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataBoxManager manager = - DataBoxManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals(true, response.iterator().next().isDataAction()); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/PackageShippingDetailsTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/PackageShippingDetailsTests.java deleted file mode 100644 index f54e75782369b..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/PackageShippingDetailsTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.models.PackageShippingDetails; - -public final class PackageShippingDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PackageShippingDetails model = - BinaryData - .fromString( - "{\"carrierName\":\"dxkqpx\",\"trackingId\":\"ajionpimexgstxg\",\"trackingUrl\":\"odgmaajrmvdjwz\"}") - .toObject(PackageShippingDetails.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PackageShippingDetails model = new PackageShippingDetails(); - model = BinaryData.fromObject(model).toObject(PackageShippingDetails.class); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/PreferencesTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/PreferencesTests.java deleted file mode 100644 index 0a1904a26725e..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/PreferencesTests.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.models.DoubleEncryption; -import com.azure.resourcemanager.databox.models.EncryptionPreferences; -import com.azure.resourcemanager.databox.models.Preferences; -import com.azure.resourcemanager.databox.models.TransportPreferences; -import com.azure.resourcemanager.databox.models.TransportShipmentTypes; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class PreferencesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Preferences model = - BinaryData - .fromString( - "{\"preferredDataCenterRegion\":[\"jdyggdtji\"],\"transportPreferences\":{\"preferredShipmentType\":\"CustomerManaged\"},\"encryptionPreferences\":{\"doubleEncryption\":\"Disabled\"}}") - .toObject(Preferences.class); - Assertions.assertEquals("jdyggdtji", model.preferredDataCenterRegion().get(0)); - Assertions - .assertEquals( - TransportShipmentTypes.CUSTOMER_MANAGED, model.transportPreferences().preferredShipmentType()); - Assertions.assertEquals(DoubleEncryption.DISABLED, model.encryptionPreferences().doubleEncryption()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Preferences model = - new Preferences() - .withPreferredDataCenterRegion(Arrays.asList("jdyggdtji")) - .withTransportPreferences( - new TransportPreferences().withPreferredShipmentType(TransportShipmentTypes.CUSTOMER_MANAGED)) - .withEncryptionPreferences(new EncryptionPreferences().withDoubleEncryption(DoubleEncryption.DISABLED)); - model = BinaryData.fromObject(model).toObject(Preferences.class); - Assertions.assertEquals("jdyggdtji", model.preferredDataCenterRegion().get(0)); - Assertions - .assertEquals( - TransportShipmentTypes.CUSTOMER_MANAGED, model.transportPreferences().preferredShipmentType()); - Assertions.assertEquals(DoubleEncryption.DISABLED, model.encryptionPreferences().doubleEncryption()); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/PreferencesValidationRequestTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/PreferencesValidationRequestTests.java deleted file mode 100644 index 8fc516c6a9501..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/PreferencesValidationRequestTests.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.models.DoubleEncryption; -import com.azure.resourcemanager.databox.models.EncryptionPreferences; -import com.azure.resourcemanager.databox.models.Preferences; -import com.azure.resourcemanager.databox.models.PreferencesValidationRequest; -import com.azure.resourcemanager.databox.models.SkuName; -import com.azure.resourcemanager.databox.models.TransportPreferences; -import com.azure.resourcemanager.databox.models.TransportShipmentTypes; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class PreferencesValidationRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PreferencesValidationRequest model = - BinaryData - .fromString( - "{\"validationType\":\"ValidatePreferences\",\"preference\":{\"preferredDataCenterRegion\":[\"kvmkqzeqq\",\"dltfz\",\"mhhv\"],\"transportPreferences\":{\"preferredShipmentType\":\"CustomerManaged\"},\"encryptionPreferences\":{\"doubleEncryption\":\"Enabled\"}},\"deviceType\":\"DataBoxDisk\"}") - .toObject(PreferencesValidationRequest.class); - Assertions.assertEquals("kvmkqzeqq", model.preference().preferredDataCenterRegion().get(0)); - Assertions - .assertEquals( - TransportShipmentTypes.CUSTOMER_MANAGED, - model.preference().transportPreferences().preferredShipmentType()); - Assertions - .assertEquals(DoubleEncryption.ENABLED, model.preference().encryptionPreferences().doubleEncryption()); - Assertions.assertEquals(SkuName.DATA_BOX_DISK, model.deviceType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PreferencesValidationRequest model = - new PreferencesValidationRequest() - .withPreference( - new Preferences() - .withPreferredDataCenterRegion(Arrays.asList("kvmkqzeqq", "dltfz", "mhhv")) - .withTransportPreferences( - new TransportPreferences() - .withPreferredShipmentType(TransportShipmentTypes.CUSTOMER_MANAGED)) - .withEncryptionPreferences( - new EncryptionPreferences().withDoubleEncryption(DoubleEncryption.ENABLED))) - .withDeviceType(SkuName.DATA_BOX_DISK); - model = BinaryData.fromObject(model).toObject(PreferencesValidationRequest.class); - Assertions.assertEquals("kvmkqzeqq", model.preference().preferredDataCenterRegion().get(0)); - Assertions - .assertEquals( - TransportShipmentTypes.CUSTOMER_MANAGED, - model.preference().transportPreferences().preferredShipmentType()); - Assertions - .assertEquals(DoubleEncryption.ENABLED, model.preference().encryptionPreferences().doubleEncryption()); - Assertions.assertEquals(SkuName.DATA_BOX_DISK, model.deviceType()); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/RegionConfigurationRequestTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/RegionConfigurationRequestTests.java deleted file mode 100644 index 3eb3aeb42f67d..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/RegionConfigurationRequestTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.models.RegionConfigurationRequest; -import com.azure.resourcemanager.databox.models.ScheduleAvailabilityRequest; -import com.azure.resourcemanager.databox.models.SkuName; -import com.azure.resourcemanager.databox.models.TransportAvailabilityRequest; -import org.junit.jupiter.api.Assertions; - -public final class RegionConfigurationRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RegionConfigurationRequest model = - BinaryData - .fromString( - "{\"scheduleAvailabilityRequest\":{\"skuName\":\"ScheduleAvailabilityRequest\",\"storageLocation\":\"fvovbvmeuecivy\",\"country\":\"ce\"},\"transportAvailabilityRequest\":{\"skuName\":\"DataBoxHeavy\"}}") - .toObject(RegionConfigurationRequest.class); - Assertions.assertEquals("fvovbvmeuecivy", model.scheduleAvailabilityRequest().storageLocation()); - Assertions.assertEquals("ce", model.scheduleAvailabilityRequest().country()); - Assertions.assertEquals(SkuName.DATA_BOX_HEAVY, model.transportAvailabilityRequest().skuName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RegionConfigurationRequest model = - new RegionConfigurationRequest() - .withScheduleAvailabilityRequest( - new ScheduleAvailabilityRequest().withStorageLocation("fvovbvmeuecivy").withCountry("ce")) - .withTransportAvailabilityRequest( - new TransportAvailabilityRequest().withSkuName(SkuName.DATA_BOX_HEAVY)); - model = BinaryData.fromObject(model).toObject(RegionConfigurationRequest.class); - Assertions.assertEquals("fvovbvmeuecivy", model.scheduleAvailabilityRequest().storageLocation()); - Assertions.assertEquals("ce", model.scheduleAvailabilityRequest().country()); - Assertions.assertEquals(SkuName.DATA_BOX_HEAVY, model.transportAvailabilityRequest().skuName()); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/RegionConfigurationResponseInnerTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/RegionConfigurationResponseInnerTests.java deleted file mode 100644 index 2a543f6162e44..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/RegionConfigurationResponseInnerTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.fluent.models.RegionConfigurationResponseInner; - -public final class RegionConfigurationResponseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RegionConfigurationResponseInner model = - BinaryData - .fromString( - "{\"scheduleAvailabilityResponse\":{\"availableDates\":[\"2021-06-11T21:37:26Z\",\"2021-05-01T01:26:28Z\"]},\"transportAvailabilityResponse\":{\"transportAvailabilityDetails\":[{\"shipmentType\":\"CustomerManaged\"},{\"shipmentType\":\"CustomerManaged\"},{\"shipmentType\":\"CustomerManaged\"},{\"shipmentType\":\"CustomerManaged\"}]}}") - .toObject(RegionConfigurationResponseInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RegionConfigurationResponseInner model = new RegionConfigurationResponseInner(); - model = BinaryData.fromObject(model).toObject(RegionConfigurationResponseInner.class); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ResourceIdentityTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ResourceIdentityTests.java deleted file mode 100644 index dfcca488f2216..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ResourceIdentityTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.models.ResourceIdentity; -import com.azure.resourcemanager.databox.models.UserAssignedIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ResourceIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceIdentity model = - BinaryData - .fromString( - "{\"type\":\"e\",\"principalId\":\"noae\",\"tenantId\":\"fhyhltrpmopjmcma\",\"userAssignedIdentities\":{\"uaxbezyiuokkt\":{\"principalId\":\"thfuiuaodsfcpkvx\",\"clientId\":\"puozmyzydag\"}}}") - .toObject(ResourceIdentity.class); - Assertions.assertEquals("e", model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceIdentity model = - new ResourceIdentity() - .withType("e") - .withUserAssignedIdentities(mapOf("uaxbezyiuokkt", new UserAssignedIdentity())); - model = BinaryData.fromObject(model).toObject(ResourceIdentity.class); - Assertions.assertEquals("e", model.type()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ScheduleAvailabilityRequestTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ScheduleAvailabilityRequestTests.java deleted file mode 100644 index fa5c49ab6cc94..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ScheduleAvailabilityRequestTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.models.ScheduleAvailabilityRequest; -import org.junit.jupiter.api.Assertions; - -public final class ScheduleAvailabilityRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScheduleAvailabilityRequest model = - BinaryData - .fromString( - "{\"skuName\":\"ScheduleAvailabilityRequest\",\"storageLocation\":\"jrwjueiotwm\",\"country\":\"ytdxwit\"}") - .toObject(ScheduleAvailabilityRequest.class); - Assertions.assertEquals("jrwjueiotwm", model.storageLocation()); - Assertions.assertEquals("ytdxwit", model.country()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScheduleAvailabilityRequest model = - new ScheduleAvailabilityRequest().withStorageLocation("jrwjueiotwm").withCountry("ytdxwit"); - model = BinaryData.fromObject(model).toObject(ScheduleAvailabilityRequest.class); - Assertions.assertEquals("jrwjueiotwm", model.storageLocation()); - Assertions.assertEquals("ytdxwit", model.country()); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ScheduleAvailabilityResponseTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ScheduleAvailabilityResponseTests.java deleted file mode 100644 index 93dc91cdb1426..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ScheduleAvailabilityResponseTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.models.ScheduleAvailabilityResponse; - -public final class ScheduleAvailabilityResponseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScheduleAvailabilityResponse model = - BinaryData - .fromString("{\"availableDates\":[\"2021-04-10T12:35:25Z\"]}") - .toObject(ScheduleAvailabilityResponse.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScheduleAvailabilityResponse model = new ScheduleAvailabilityResponse(); - model = BinaryData.fromObject(model).toObject(ScheduleAvailabilityResponse.class); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ServicesListAvailableSkusByResourceGroupMockTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ServicesListAvailableSkusByResourceGroupMockTests.java deleted file mode 100644 index 661523743c44b..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ServicesListAvailableSkusByResourceGroupMockTests.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.databox.DataBoxManager; -import com.azure.resourcemanager.databox.models.AvailableSkuRequest; -import com.azure.resourcemanager.databox.models.SkuInformation; -import com.azure.resourcemanager.databox.models.SkuName; -import com.azure.resourcemanager.databox.models.TransferType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ServicesListAvailableSkusByResourceGroupMockTests { - @Test - public void testListAvailableSkusByResourceGroup() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"sku\":{\"name\":\"DataBox\",\"displayName\":\"shrtdtkcnqxwb\",\"family\":\"kulpiujwaasi\"},\"enabled\":false,\"properties\":{\"dataLocationToServiceLocationMap\":[],\"capacity\":{\"usable\":\"qerpqlpqwcc\",\"maximum\":\"qgbdbuta\"},\"costs\":[],\"apiVersions\":[\"kuwhh\",\"hykojoxafnndlpic\",\"koymkcd\",\"h\"],\"disabledReason\":\"Feature\",\"disabledReasonMessage\":\"pwdreqnovvqf\",\"requiredFeature\":\"ljxywsu\"}}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataBoxManager manager = - DataBoxManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .services() - .listAvailableSkusByResourceGroup( - "sdqrhzoymibmrq", - "ibahwflus", - new AvailableSkuRequest() - .withTransferType(TransferType.EXPORT_FROM_AZURE) - .withCountry("tmhrkwofyyvoqacp") - .withLocation("expbtg") - .withSkuNames(Arrays.asList(SkuName.DATA_BOX_DISK, SkuName.DATA_BOX, SkuName.DATA_BOX)), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ServicesRegionConfigurationByResourceGroupWithResponseMockTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ServicesRegionConfigurationByResourceGroupWithResponseMockTests.java deleted file mode 100644 index e5423648e774c..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ServicesRegionConfigurationByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.databox.DataBoxManager; -import com.azure.resourcemanager.databox.models.RegionConfigurationRequest; -import com.azure.resourcemanager.databox.models.RegionConfigurationResponse; -import com.azure.resourcemanager.databox.models.ScheduleAvailabilityRequest; -import com.azure.resourcemanager.databox.models.SkuName; -import com.azure.resourcemanager.databox.models.TransportAvailabilityRequest; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ServicesRegionConfigurationByResourceGroupWithResponseMockTests { - @Test - public void testRegionConfigurationByResourceGroupWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"scheduleAvailabilityResponse\":{\"availableDates\":[\"2021-10-28T18:31:30Z\"]},\"transportAvailabilityResponse\":{\"transportAvailabilityDetails\":[]}}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataBoxManager manager = - DataBoxManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - RegionConfigurationResponse response = - manager - .services() - .regionConfigurationByResourceGroupWithResponse( - "nzgmwznmabik", - "sorgj", - new RegionConfigurationRequest() - .withScheduleAvailabilityRequest( - new ScheduleAvailabilityRequest() - .withStorageLocation("bldtlww") - .withCountry("kdmtncvokotll")) - .withTransportAvailabilityRequest( - new TransportAvailabilityRequest().withSkuName(SkuName.DATA_BOX_HEAVY)), - com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ServicesRegionConfigurationWithResponseMockTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ServicesRegionConfigurationWithResponseMockTests.java deleted file mode 100644 index dab843e4fad82..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ServicesRegionConfigurationWithResponseMockTests.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.databox.DataBoxManager; -import com.azure.resourcemanager.databox.models.RegionConfigurationRequest; -import com.azure.resourcemanager.databox.models.RegionConfigurationResponse; -import com.azure.resourcemanager.databox.models.ScheduleAvailabilityRequest; -import com.azure.resourcemanager.databox.models.SkuName; -import com.azure.resourcemanager.databox.models.TransportAvailabilityRequest; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ServicesRegionConfigurationWithResponseMockTests { - @Test - public void testRegionConfigurationWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"scheduleAvailabilityResponse\":{\"availableDates\":[\"2021-11-20T12:54:01Z\",\"2021-06-02T12:49:15Z\",\"2020-12-28T22:53:56Z\"]},\"transportAvailabilityResponse\":{\"transportAvailabilityDetails\":[]}}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataBoxManager manager = - DataBoxManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - RegionConfigurationResponse response = - manager - .services() - .regionConfigurationWithResponse( - "i", - new RegionConfigurationRequest() - .withScheduleAvailabilityRequest( - new ScheduleAvailabilityRequest() - .withStorageLocation("nkedyatrwyhqmib") - .withCountry("hwit")) - .withTransportAvailabilityRequest( - new TransportAvailabilityRequest().withSkuName(SkuName.DATA_BOX)), - com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ServicesValidateInputsByResourceGroupWithResponseMockTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ServicesValidateInputsByResourceGroupWithResponseMockTests.java deleted file mode 100644 index e835fbb87a9e3..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ServicesValidateInputsByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.databox.DataBoxManager; -import com.azure.resourcemanager.databox.models.ValidationInputRequest; -import com.azure.resourcemanager.databox.models.ValidationRequest; -import com.azure.resourcemanager.databox.models.ValidationResponse; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ServicesValidateInputsByResourceGroupWithResponseMockTests { - @Test - public void testValidateInputsByResourceGroupWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"status\":\"CertainInputValidationsSkipped\",\"individualResponseDetails\":[]}}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataBoxManager manager = - DataBoxManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ValidationResponse response = - manager - .services() - .validateInputsByResourceGroupWithResponse( - "odlqiyntor", - "ihleos", - new ValidationRequest() - .withIndividualRequestDetails( - Arrays.asList(new ValidationInputRequest(), new ValidationInputRequest())), - com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ServicesValidateInputsWithResponseMockTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ServicesValidateInputsWithResponseMockTests.java deleted file mode 100644 index b0b6998982026..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ServicesValidateInputsWithResponseMockTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.databox.DataBoxManager; -import com.azure.resourcemanager.databox.models.ValidationInputRequest; -import com.azure.resourcemanager.databox.models.ValidationRequest; -import com.azure.resourcemanager.databox.models.ValidationResponse; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ServicesValidateInputsWithResponseMockTests { - @Test - public void testValidateInputsWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"status\":\"CertainInputValidationsSkipped\",\"individualResponseDetails\":[]}}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DataBoxManager manager = - DataBoxManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ValidationResponse response = - manager - .services() - .validateInputsWithResponse( - "lyzrpzbchckqqzqi", - new ValidationRequest().withIndividualRequestDetails(Arrays.asList(new ValidationInputRequest())), - com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ShipmentPickUpRequestTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ShipmentPickUpRequestTests.java deleted file mode 100644 index 4dcd828aad229..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ShipmentPickUpRequestTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.models.ShipmentPickUpRequest; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class ShipmentPickUpRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ShipmentPickUpRequest model = - BinaryData - .fromString( - "{\"startTime\":\"2021-02-27T12:21:31Z\",\"endTime\":\"2021-04-22T00:28:22Z\",\"shipmentLocation\":\"gvxp\"}") - .toObject(ShipmentPickUpRequest.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-27T12:21:31Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-22T00:28:22Z"), model.endTime()); - Assertions.assertEquals("gvxp", model.shipmentLocation()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ShipmentPickUpRequest model = - new ShipmentPickUpRequest() - .withStartTime(OffsetDateTime.parse("2021-02-27T12:21:31Z")) - .withEndTime(OffsetDateTime.parse("2021-04-22T00:28:22Z")) - .withShipmentLocation("gvxp"); - model = BinaryData.fromObject(model).toObject(ShipmentPickUpRequest.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-27T12:21:31Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-22T00:28:22Z"), model.endTime()); - Assertions.assertEquals("gvxp", model.shipmentLocation()); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ShipmentPickUpResponseInnerTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ShipmentPickUpResponseInnerTests.java deleted file mode 100644 index 038af41590c71..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ShipmentPickUpResponseInnerTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.fluent.models.ShipmentPickUpResponseInner; - -public final class ShipmentPickUpResponseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ShipmentPickUpResponseInner model = - BinaryData - .fromString("{\"confirmationNumber\":\"omzlfmi\",\"readyByTime\":\"2021-07-30T19:47:24Z\"}") - .toObject(ShipmentPickUpResponseInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ShipmentPickUpResponseInner model = new ShipmentPickUpResponseInner(); - model = BinaryData.fromObject(model).toObject(ShipmentPickUpResponseInner.class); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/SkuAvailabilityValidationRequestTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/SkuAvailabilityValidationRequestTests.java deleted file mode 100644 index bf0245d2fd197..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/SkuAvailabilityValidationRequestTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.models.SkuAvailabilityValidationRequest; -import com.azure.resourcemanager.databox.models.SkuName; -import com.azure.resourcemanager.databox.models.TransferType; -import org.junit.jupiter.api.Assertions; - -public final class SkuAvailabilityValidationRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SkuAvailabilityValidationRequest model = - BinaryData - .fromString( - "{\"validationType\":\"ValidateSkuAvailability\",\"deviceType\":\"DataBox\",\"transferType\":\"ImportToAzure\",\"country\":\"wakbogqxndl\",\"location\":\"zgx\"}") - .toObject(SkuAvailabilityValidationRequest.class); - Assertions.assertEquals(SkuName.DATA_BOX, model.deviceType()); - Assertions.assertEquals(TransferType.IMPORT_TO_AZURE, model.transferType()); - Assertions.assertEquals("wakbogqxndl", model.country()); - Assertions.assertEquals("zgx", model.location()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuAvailabilityValidationRequest model = - new SkuAvailabilityValidationRequest() - .withDeviceType(SkuName.DATA_BOX) - .withTransferType(TransferType.IMPORT_TO_AZURE) - .withCountry("wakbogqxndl") - .withLocation("zgx"); - model = BinaryData.fromObject(model).toObject(SkuAvailabilityValidationRequest.class); - Assertions.assertEquals(SkuName.DATA_BOX, model.deviceType()); - Assertions.assertEquals(TransferType.IMPORT_TO_AZURE, model.transferType()); - Assertions.assertEquals("wakbogqxndl", model.country()); - Assertions.assertEquals("zgx", model.location()); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/SkuCapacityTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/SkuCapacityTests.java deleted file mode 100644 index 6a0fc6708e05d..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/SkuCapacityTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.models.SkuCapacity; - -public final class SkuCapacityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SkuCapacity model = - BinaryData.fromString("{\"usable\":\"hmgkbrpyy\",\"maximum\":\"ibnuqqkpik\"}").toObject(SkuCapacity.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuCapacity model = new SkuCapacity(); - model = BinaryData.fromObject(model).toObject(SkuCapacity.class); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/SkuCostTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/SkuCostTests.java deleted file mode 100644 index 52d229002b9ff..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/SkuCostTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.models.SkuCost; - -public final class SkuCostTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SkuCost model = - BinaryData - .fromString("{\"meterId\":\"rgvtqag\",\"meterType\":\"uynhijg\",\"multiplier\":16.016695145624503}") - .toObject(SkuCost.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuCost model = new SkuCost(); - model = BinaryData.fromObject(model).toObject(SkuCost.class); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/SkuInformationInnerTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/SkuInformationInnerTests.java deleted file mode 100644 index 9c17542a08764..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/SkuInformationInnerTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.fluent.models.SkuInformationInner; - -public final class SkuInformationInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SkuInformationInner model = - BinaryData - .fromString( - "{\"sku\":{\"name\":\"DataBoxDisk\",\"displayName\":\"xmzsbbzogg\",\"family\":\"rxwburv\"},\"enabled\":false,\"properties\":{\"dataLocationToServiceLocationMap\":[{\"dataLocation\":\"ydptkoen\",\"serviceLocation\":\"uknvudwti\"}],\"capacity\":{\"usable\":\"ldngkpoci\",\"maximum\":\"z\"},\"costs\":[{\"meterId\":\"gukgjnpiucgygevq\",\"meterType\":\"typmrbpizcdrqjsd\",\"multiplier\":98.3329583727786}],\"apiVersions\":[\"hxdeoejz\",\"cwif\",\"jttgzf\",\"ishc\"],\"disabledReason\":\"OfferType\",\"disabledReasonMessage\":\"jdeyeamdpha\",\"requiredFeature\":\"lpbuxwgipwhonowk\"}}") - .toObject(SkuInformationInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuInformationInner model = new SkuInformationInner(); - model = BinaryData.fromObject(model).toObject(SkuInformationInner.class); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/SkuPropertiesTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/SkuPropertiesTests.java deleted file mode 100644 index 64a30eca27655..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/SkuPropertiesTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.fluent.models.SkuProperties; - -public final class SkuPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SkuProperties model = - BinaryData - .fromString( - "{\"dataLocationToServiceLocationMap\":[{\"dataLocation\":\"ankixzbinjeput\",\"serviceLocation\":\"rywn\"},{\"dataLocation\":\"oqftiyqzrnkcq\",\"serviceLocation\":\"xlwhzlsicoh\"},{\"dataLocation\":\"qnwvlrya\",\"serviceLocation\":\"hheunmmqhgyx\"},{\"dataLocation\":\"onocukok\",\"serviceLocation\":\"axuconuq\"}],\"capacity\":{\"usable\":\"kbeype\",\"maximum\":\"mjmwvvjektcx\"},\"costs\":[{\"meterId\":\"wlrsffrzpwv\",\"meterType\":\"dqgbiqylihkaetc\",\"multiplier\":77.09019868031318},{\"meterId\":\"ivfsnk\",\"meterType\":\"uctqhjfbe\",\"multiplier\":51.75015672682161},{\"meterId\":\"erfuwuttt\",\"meterType\":\"vjrbirphxepcyvah\",\"multiplier\":67.9956140124815},{\"meterId\":\"yq\",\"meterType\":\"vuujq\",\"multiplier\":31.363687102629}],\"apiVersions\":[\"jljyoxgv\",\"ltbgsncghkj\",\"szzhbijhtxfvgxbf\"],\"disabledReason\":\"OfferType\",\"disabledReasonMessage\":\"eh\",\"requiredFeature\":\"vecxgodebfqkk\"}") - .toObject(SkuProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuProperties model = new SkuProperties(); - model = BinaryData.fromObject(model).toObject(SkuProperties.class); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/SkuTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/SkuTests.java deleted file mode 100644 index ba91a1487db02..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/SkuTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.models.Sku; -import com.azure.resourcemanager.databox.models.SkuName; -import org.junit.jupiter.api.Assertions; - -public final class SkuTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Sku model = - BinaryData - .fromString("{\"name\":\"DataBox\",\"displayName\":\"daj\",\"family\":\"ysou\"}") - .toObject(Sku.class); - Assertions.assertEquals(SkuName.DATA_BOX, model.name()); - Assertions.assertEquals("daj", model.displayName()); - Assertions.assertEquals("ysou", model.family()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Sku model = new Sku().withName(SkuName.DATA_BOX).withDisplayName("daj").withFamily("ysou"); - model = BinaryData.fromObject(model).toObject(Sku.class); - Assertions.assertEquals(SkuName.DATA_BOX, model.name()); - Assertions.assertEquals("daj", model.displayName()); - Assertions.assertEquals("ysou", model.family()); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/SubscriptionIsAllowedToCreateJobValidationRequestTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/SubscriptionIsAllowedToCreateJobValidationRequestTests.java deleted file mode 100644 index 86ec74f0aa1ea..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/SubscriptionIsAllowedToCreateJobValidationRequestTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.models.SubscriptionIsAllowedToCreateJobValidationRequest; - -public final class SubscriptionIsAllowedToCreateJobValidationRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SubscriptionIsAllowedToCreateJobValidationRequest model = - BinaryData - .fromString("{\"validationType\":\"ValidateSubscriptionIsAllowedToCreateJob\"}") - .toObject(SubscriptionIsAllowedToCreateJobValidationRequest.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SubscriptionIsAllowedToCreateJobValidationRequest model = - new SubscriptionIsAllowedToCreateJobValidationRequest(); - model = BinaryData.fromObject(model).toObject(SubscriptionIsAllowedToCreateJobValidationRequest.class); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransferAllDetailsTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransferAllDetailsTests.java deleted file mode 100644 index bd1cc653ac911..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransferAllDetailsTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.models.DataAccountType; -import com.azure.resourcemanager.databox.models.TransferAllDetails; -import org.junit.jupiter.api.Assertions; - -public final class TransferAllDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TransferAllDetails model = - BinaryData - .fromString( - "{\"dataAccountType\":\"StorageAccount\",\"transferAllBlobs\":true,\"transferAllFiles\":true}") - .toObject(TransferAllDetails.class); - Assertions.assertEquals(DataAccountType.STORAGE_ACCOUNT, model.dataAccountType()); - Assertions.assertEquals(true, model.transferAllBlobs()); - Assertions.assertEquals(true, model.transferAllFiles()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TransferAllDetails model = - new TransferAllDetails() - .withDataAccountType(DataAccountType.STORAGE_ACCOUNT) - .withTransferAllBlobs(true) - .withTransferAllFiles(true); - model = BinaryData.fromObject(model).toObject(TransferAllDetails.class); - Assertions.assertEquals(DataAccountType.STORAGE_ACCOUNT, model.dataAccountType()); - Assertions.assertEquals(true, model.transferAllBlobs()); - Assertions.assertEquals(true, model.transferAllFiles()); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransferConfigurationTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransferConfigurationTests.java deleted file mode 100644 index b3c93d5afaa3e..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransferConfigurationTests.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.models.DataAccountType; -import com.azure.resourcemanager.databox.models.TransferAllDetails; -import com.azure.resourcemanager.databox.models.TransferConfiguration; -import com.azure.resourcemanager.databox.models.TransferConfigurationTransferAllDetails; -import com.azure.resourcemanager.databox.models.TransferConfigurationTransferFilterDetails; -import com.azure.resourcemanager.databox.models.TransferConfigurationType; -import com.azure.resourcemanager.databox.models.TransferFilterDetails; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class TransferConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TransferConfiguration model = - BinaryData - .fromString( - "{\"transferConfigurationType\":\"TransferUsingFilter\",\"transferFilterDetails\":{\"include\":{\"dataAccountType\":\"ManagedDisk\",\"filterFileDetails\":[]}},\"transferAllDetails\":{\"include\":{\"dataAccountType\":\"ManagedDisk\",\"transferAllBlobs\":false,\"transferAllFiles\":false}}}") - .toObject(TransferConfiguration.class); - Assertions.assertEquals(TransferConfigurationType.TRANSFER_USING_FILTER, model.transferConfigurationType()); - Assertions - .assertEquals(DataAccountType.MANAGED_DISK, model.transferFilterDetails().include().dataAccountType()); - Assertions.assertEquals(DataAccountType.MANAGED_DISK, model.transferAllDetails().include().dataAccountType()); - Assertions.assertEquals(false, model.transferAllDetails().include().transferAllBlobs()); - Assertions.assertEquals(false, model.transferAllDetails().include().transferAllFiles()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TransferConfiguration model = - new TransferConfiguration() - .withTransferConfigurationType(TransferConfigurationType.TRANSFER_USING_FILTER) - .withTransferFilterDetails( - new TransferConfigurationTransferFilterDetails() - .withInclude( - new TransferFilterDetails() - .withDataAccountType(DataAccountType.MANAGED_DISK) - .withFilterFileDetails(Arrays.asList()))) - .withTransferAllDetails( - new TransferConfigurationTransferAllDetails() - .withInclude( - new TransferAllDetails() - .withDataAccountType(DataAccountType.MANAGED_DISK) - .withTransferAllBlobs(false) - .withTransferAllFiles(false))); - model = BinaryData.fromObject(model).toObject(TransferConfiguration.class); - Assertions.assertEquals(TransferConfigurationType.TRANSFER_USING_FILTER, model.transferConfigurationType()); - Assertions - .assertEquals(DataAccountType.MANAGED_DISK, model.transferFilterDetails().include().dataAccountType()); - Assertions.assertEquals(DataAccountType.MANAGED_DISK, model.transferAllDetails().include().dataAccountType()); - Assertions.assertEquals(false, model.transferAllDetails().include().transferAllBlobs()); - Assertions.assertEquals(false, model.transferAllDetails().include().transferAllFiles()); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransferConfigurationTransferAllDetailsTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransferConfigurationTransferAllDetailsTests.java deleted file mode 100644 index c02477d8bf540..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransferConfigurationTransferAllDetailsTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.models.DataAccountType; -import com.azure.resourcemanager.databox.models.TransferAllDetails; -import com.azure.resourcemanager.databox.models.TransferConfigurationTransferAllDetails; -import org.junit.jupiter.api.Assertions; - -public final class TransferConfigurationTransferAllDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TransferConfigurationTransferAllDetails model = - BinaryData - .fromString( - "{\"include\":{\"dataAccountType\":\"ManagedDisk\",\"transferAllBlobs\":false,\"transferAllFiles\":true}}") - .toObject(TransferConfigurationTransferAllDetails.class); - Assertions.assertEquals(DataAccountType.MANAGED_DISK, model.include().dataAccountType()); - Assertions.assertEquals(false, model.include().transferAllBlobs()); - Assertions.assertEquals(true, model.include().transferAllFiles()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TransferConfigurationTransferAllDetails model = - new TransferConfigurationTransferAllDetails() - .withInclude( - new TransferAllDetails() - .withDataAccountType(DataAccountType.MANAGED_DISK) - .withTransferAllBlobs(false) - .withTransferAllFiles(true)); - model = BinaryData.fromObject(model).toObject(TransferConfigurationTransferAllDetails.class); - Assertions.assertEquals(DataAccountType.MANAGED_DISK, model.include().dataAccountType()); - Assertions.assertEquals(false, model.include().transferAllBlobs()); - Assertions.assertEquals(true, model.include().transferAllFiles()); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransferConfigurationTransferFilterDetailsTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransferConfigurationTransferFilterDetailsTests.java deleted file mode 100644 index 6b88d5df02ba7..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransferConfigurationTransferFilterDetailsTests.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.models.AzureFileFilterDetails; -import com.azure.resourcemanager.databox.models.BlobFilterDetails; -import com.azure.resourcemanager.databox.models.DataAccountType; -import com.azure.resourcemanager.databox.models.FilterFileDetails; -import com.azure.resourcemanager.databox.models.FilterFileType; -import com.azure.resourcemanager.databox.models.TransferConfigurationTransferFilterDetails; -import com.azure.resourcemanager.databox.models.TransferFilterDetails; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class TransferConfigurationTransferFilterDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TransferConfigurationTransferFilterDetails model = - BinaryData - .fromString( - "{\"include\":{\"dataAccountType\":\"ManagedDisk\",\"blobFilterDetails\":{\"blobPrefixList\":[\"uexhdzx\"],\"blobPathList\":[\"eojnxqbzvddn\",\"wndeicbtwnp\",\"aoqvuh\",\"hcffcyddglmjthjq\"],\"containerList\":[\"yeicxmqciwqvhk\",\"ixuigdtopbobj\"]},\"azureFileFilterDetails\":{\"filePrefixList\":[\"e\"],\"filePathList\":[\"m\"],\"fileShareList\":[\"rzayv\",\"t\",\"gvdfgiotkftutq\",\"ln\"]},\"filterFileDetails\":[{\"filterFileType\":\"AzureBlob\",\"filterFilePath\":\"fgugnxkrxdqmid\"},{\"filterFileType\":\"AzureBlob\",\"filterFilePath\":\"hzrvqd\"},{\"filterFileType\":\"AzureBlob\",\"filterFilePath\":\"bhj\"}]}}") - .toObject(TransferConfigurationTransferFilterDetails.class); - Assertions.assertEquals(DataAccountType.MANAGED_DISK, model.include().dataAccountType()); - Assertions.assertEquals("uexhdzx", model.include().blobFilterDetails().blobPrefixList().get(0)); - Assertions.assertEquals("eojnxqbzvddn", model.include().blobFilterDetails().blobPathList().get(0)); - Assertions.assertEquals("yeicxmqciwqvhk", model.include().blobFilterDetails().containerList().get(0)); - Assertions.assertEquals("e", model.include().azureFileFilterDetails().filePrefixList().get(0)); - Assertions.assertEquals("m", model.include().azureFileFilterDetails().filePathList().get(0)); - Assertions.assertEquals("rzayv", model.include().azureFileFilterDetails().fileShareList().get(0)); - Assertions.assertEquals(FilterFileType.AZURE_BLOB, model.include().filterFileDetails().get(0).filterFileType()); - Assertions.assertEquals("fgugnxkrxdqmid", model.include().filterFileDetails().get(0).filterFilePath()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TransferConfigurationTransferFilterDetails model = - new TransferConfigurationTransferFilterDetails() - .withInclude( - new TransferFilterDetails() - .withDataAccountType(DataAccountType.MANAGED_DISK) - .withBlobFilterDetails( - new BlobFilterDetails() - .withBlobPrefixList(Arrays.asList("uexhdzx")) - .withBlobPathList( - Arrays.asList("eojnxqbzvddn", "wndeicbtwnp", "aoqvuh", "hcffcyddglmjthjq")) - .withContainerList(Arrays.asList("yeicxmqciwqvhk", "ixuigdtopbobj"))) - .withAzureFileFilterDetails( - new AzureFileFilterDetails() - .withFilePrefixList(Arrays.asList("e")) - .withFilePathList(Arrays.asList("m")) - .withFileShareList(Arrays.asList("rzayv", "t", "gvdfgiotkftutq", "ln"))) - .withFilterFileDetails( - Arrays - .asList( - new FilterFileDetails() - .withFilterFileType(FilterFileType.AZURE_BLOB) - .withFilterFilePath("fgugnxkrxdqmid"), - new FilterFileDetails() - .withFilterFileType(FilterFileType.AZURE_BLOB) - .withFilterFilePath("hzrvqd"), - new FilterFileDetails() - .withFilterFileType(FilterFileType.AZURE_BLOB) - .withFilterFilePath("bhj")))); - model = BinaryData.fromObject(model).toObject(TransferConfigurationTransferFilterDetails.class); - Assertions.assertEquals(DataAccountType.MANAGED_DISK, model.include().dataAccountType()); - Assertions.assertEquals("uexhdzx", model.include().blobFilterDetails().blobPrefixList().get(0)); - Assertions.assertEquals("eojnxqbzvddn", model.include().blobFilterDetails().blobPathList().get(0)); - Assertions.assertEquals("yeicxmqciwqvhk", model.include().blobFilterDetails().containerList().get(0)); - Assertions.assertEquals("e", model.include().azureFileFilterDetails().filePrefixList().get(0)); - Assertions.assertEquals("m", model.include().azureFileFilterDetails().filePathList().get(0)); - Assertions.assertEquals("rzayv", model.include().azureFileFilterDetails().fileShareList().get(0)); - Assertions.assertEquals(FilterFileType.AZURE_BLOB, model.include().filterFileDetails().get(0).filterFileType()); - Assertions.assertEquals("fgugnxkrxdqmid", model.include().filterFileDetails().get(0).filterFilePath()); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransferFilterDetailsTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransferFilterDetailsTests.java deleted file mode 100644 index 22c30b4dcaa1d..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransferFilterDetailsTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.models.AzureFileFilterDetails; -import com.azure.resourcemanager.databox.models.BlobFilterDetails; -import com.azure.resourcemanager.databox.models.DataAccountType; -import com.azure.resourcemanager.databox.models.FilterFileDetails; -import com.azure.resourcemanager.databox.models.FilterFileType; -import com.azure.resourcemanager.databox.models.TransferFilterDetails; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class TransferFilterDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TransferFilterDetails model = - BinaryData - .fromString( - "{\"dataAccountType\":\"StorageAccount\",\"blobFilterDetails\":{\"blobPrefixList\":[\"h\",\"qfbow\",\"kanyktzlcuiywg\"],\"blobPathList\":[\"gndrvynh\",\"gpphrcgyn\",\"ocpecfvmmco\",\"fsxlzevgbmqjqa\"],\"containerList\":[\"pmivkwlzu\"]},\"azureFileFilterDetails\":{\"filePrefixList\":[\"wnfnbacf\",\"onlebxetqgtzxdpn\"],\"filePathList\":[\"qwxrjfeallnw\"],\"fileShareList\":[\"isnjampmngnz\",\"c\"]},\"filterFileDetails\":[{\"filterFileType\":\"AzureBlob\",\"filterFilePath\":\"ooch\"},{\"filterFileType\":\"AzureFile\",\"filterFilePath\":\"onq\"},{\"filterFileType\":\"AzureBlob\",\"filterFilePath\":\"kvlrxnj\"}]}") - .toObject(TransferFilterDetails.class); - Assertions.assertEquals(DataAccountType.STORAGE_ACCOUNT, model.dataAccountType()); - Assertions.assertEquals("h", model.blobFilterDetails().blobPrefixList().get(0)); - Assertions.assertEquals("gndrvynh", model.blobFilterDetails().blobPathList().get(0)); - Assertions.assertEquals("pmivkwlzu", model.blobFilterDetails().containerList().get(0)); - Assertions.assertEquals("wnfnbacf", model.azureFileFilterDetails().filePrefixList().get(0)); - Assertions.assertEquals("qwxrjfeallnw", model.azureFileFilterDetails().filePathList().get(0)); - Assertions.assertEquals("isnjampmngnz", model.azureFileFilterDetails().fileShareList().get(0)); - Assertions.assertEquals(FilterFileType.AZURE_BLOB, model.filterFileDetails().get(0).filterFileType()); - Assertions.assertEquals("ooch", model.filterFileDetails().get(0).filterFilePath()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TransferFilterDetails model = - new TransferFilterDetails() - .withDataAccountType(DataAccountType.STORAGE_ACCOUNT) - .withBlobFilterDetails( - new BlobFilterDetails() - .withBlobPrefixList(Arrays.asList("h", "qfbow", "kanyktzlcuiywg")) - .withBlobPathList(Arrays.asList("gndrvynh", "gpphrcgyn", "ocpecfvmmco", "fsxlzevgbmqjqa")) - .withContainerList(Arrays.asList("pmivkwlzu"))) - .withAzureFileFilterDetails( - new AzureFileFilterDetails() - .withFilePrefixList(Arrays.asList("wnfnbacf", "onlebxetqgtzxdpn")) - .withFilePathList(Arrays.asList("qwxrjfeallnw")) - .withFileShareList(Arrays.asList("isnjampmngnz", "c"))) - .withFilterFileDetails( - Arrays - .asList( - new FilterFileDetails() - .withFilterFileType(FilterFileType.AZURE_BLOB) - .withFilterFilePath("ooch"), - new FilterFileDetails() - .withFilterFileType(FilterFileType.AZURE_FILE) - .withFilterFilePath("onq"), - new FilterFileDetails() - .withFilterFileType(FilterFileType.AZURE_BLOB) - .withFilterFilePath("kvlrxnj"))); - model = BinaryData.fromObject(model).toObject(TransferFilterDetails.class); - Assertions.assertEquals(DataAccountType.STORAGE_ACCOUNT, model.dataAccountType()); - Assertions.assertEquals("h", model.blobFilterDetails().blobPrefixList().get(0)); - Assertions.assertEquals("gndrvynh", model.blobFilterDetails().blobPathList().get(0)); - Assertions.assertEquals("pmivkwlzu", model.blobFilterDetails().containerList().get(0)); - Assertions.assertEquals("wnfnbacf", model.azureFileFilterDetails().filePrefixList().get(0)); - Assertions.assertEquals("qwxrjfeallnw", model.azureFileFilterDetails().filePathList().get(0)); - Assertions.assertEquals("isnjampmngnz", model.azureFileFilterDetails().fileShareList().get(0)); - Assertions.assertEquals(FilterFileType.AZURE_BLOB, model.filterFileDetails().get(0).filterFileType()); - Assertions.assertEquals("ooch", model.filterFileDetails().get(0).filterFilePath()); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransportAvailabilityDetailsTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransportAvailabilityDetailsTests.java deleted file mode 100644 index 899ad7b01c71b..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransportAvailabilityDetailsTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.models.TransportAvailabilityDetails; - -public final class TransportAvailabilityDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TransportAvailabilityDetails model = - BinaryData - .fromString("{\"shipmentType\":\"CustomerManaged\"}") - .toObject(TransportAvailabilityDetails.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TransportAvailabilityDetails model = new TransportAvailabilityDetails(); - model = BinaryData.fromObject(model).toObject(TransportAvailabilityDetails.class); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransportAvailabilityRequestTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransportAvailabilityRequestTests.java deleted file mode 100644 index 768e1bdc229ed..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransportAvailabilityRequestTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.models.SkuName; -import com.azure.resourcemanager.databox.models.TransportAvailabilityRequest; -import org.junit.jupiter.api.Assertions; - -public final class TransportAvailabilityRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TransportAvailabilityRequest model = - BinaryData.fromString("{\"skuName\":\"DataBox\"}").toObject(TransportAvailabilityRequest.class); - Assertions.assertEquals(SkuName.DATA_BOX, model.skuName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TransportAvailabilityRequest model = new TransportAvailabilityRequest().withSkuName(SkuName.DATA_BOX); - model = BinaryData.fromObject(model).toObject(TransportAvailabilityRequest.class); - Assertions.assertEquals(SkuName.DATA_BOX, model.skuName()); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransportAvailabilityResponseTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransportAvailabilityResponseTests.java deleted file mode 100644 index fe05dfc8d0cf8..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransportAvailabilityResponseTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.models.TransportAvailabilityResponse; - -public final class TransportAvailabilityResponseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TransportAvailabilityResponse model = - BinaryData - .fromString( - "{\"transportAvailabilityDetails\":[{\"shipmentType\":\"CustomerManaged\"},{\"shipmentType\":\"CustomerManaged\"}]}") - .toObject(TransportAvailabilityResponse.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TransportAvailabilityResponse model = new TransportAvailabilityResponse(); - model = BinaryData.fromObject(model).toObject(TransportAvailabilityResponse.class); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransportPreferencesTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransportPreferencesTests.java deleted file mode 100644 index e670a34d10a62..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/TransportPreferencesTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.models.TransportPreferences; -import com.azure.resourcemanager.databox.models.TransportShipmentTypes; -import org.junit.jupiter.api.Assertions; - -public final class TransportPreferencesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TransportPreferences model = - BinaryData - .fromString("{\"preferredShipmentType\":\"MicrosoftManaged\"}") - .toObject(TransportPreferences.class); - Assertions.assertEquals(TransportShipmentTypes.MICROSOFT_MANAGED, model.preferredShipmentType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TransportPreferences model = - new TransportPreferences().withPreferredShipmentType(TransportShipmentTypes.MICROSOFT_MANAGED); - model = BinaryData.fromObject(model).toObject(TransportPreferences.class); - Assertions.assertEquals(TransportShipmentTypes.MICROSOFT_MANAGED, model.preferredShipmentType()); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/UserAssignedIdentityTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/UserAssignedIdentityTests.java deleted file mode 100644 index df38f32bad5bd..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/UserAssignedIdentityTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.models.UserAssignedIdentity; - -public final class UserAssignedIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UserAssignedIdentity model = - BinaryData - .fromString("{\"principalId\":\"rdxwzywqsm\",\"clientId\":\"ureximoryocfs\"}") - .toObject(UserAssignedIdentity.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UserAssignedIdentity model = new UserAssignedIdentity(); - model = BinaryData.fromObject(model).toObject(UserAssignedIdentity.class); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/UserAssignedPropertiesTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/UserAssignedPropertiesTests.java deleted file mode 100644 index 62486cb4c86f4..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/UserAssignedPropertiesTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.models.UserAssignedProperties; -import org.junit.jupiter.api.Assertions; - -public final class UserAssignedPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UserAssignedProperties model = - BinaryData.fromString("{\"resourceId\":\"vxyqjpkcattpngjc\"}").toObject(UserAssignedProperties.class); - Assertions.assertEquals("vxyqjpkcattpngjc", model.resourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UserAssignedProperties model = new UserAssignedProperties().withResourceId("vxyqjpkcattpngjc"); - model = BinaryData.fromObject(model).toObject(UserAssignedProperties.class); - Assertions.assertEquals("vxyqjpkcattpngjc", model.resourceId()); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ValidationInputRequestTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ValidationInputRequestTests.java deleted file mode 100644 index e0388e15691f6..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ValidationInputRequestTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.models.ValidationInputRequest; - -public final class ValidationInputRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ValidationInputRequest model = - BinaryData - .fromString("{\"validationType\":\"ValidationInputRequest\"}") - .toObject(ValidationInputRequest.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ValidationInputRequest model = new ValidationInputRequest(); - model = BinaryData.fromObject(model).toObject(ValidationInputRequest.class); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ValidationRequestTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ValidationRequestTests.java deleted file mode 100644 index 6ce95771925a5..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ValidationRequestTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.models.ValidationInputRequest; -import com.azure.resourcemanager.databox.models.ValidationRequest; -import java.util.Arrays; - -public final class ValidationRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ValidationRequest model = - BinaryData - .fromString( - "{\"validationCategory\":\"ValidationRequest\",\"individualRequestDetails\":[{\"validationType\":\"ValidationInputRequest\"},{\"validationType\":\"ValidationInputRequest\"},{\"validationType\":\"ValidationInputRequest\"}]}") - .toObject(ValidationRequest.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ValidationRequest model = - new ValidationRequest() - .withIndividualRequestDetails( - Arrays - .asList( - new ValidationInputRequest(), new ValidationInputRequest(), new ValidationInputRequest())); - model = BinaryData.fromObject(model).toObject(ValidationRequest.class); - } -} diff --git a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ValidationResponseInnerTests.java b/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ValidationResponseInnerTests.java deleted file mode 100644 index 992f43c5fbc85..0000000000000 --- a/sdk/databox/azure-resourcemanager-databox/src/test/java/com/azure/resourcemanager/databox/generated/ValidationResponseInnerTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.databox.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.databox.fluent.models.ValidationResponseInner; - -public final class ValidationResponseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ValidationResponseInner model = - BinaryData - .fromString( - "{\"properties\":{\"status\":\"InputsRevisitRequired\",\"individualResponseDetails\":[{\"validationType\":\"ValidationInputResponse\"},{\"validationType\":\"ValidationInputResponse\"}]}}") - .toObject(ValidationResponseInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ValidationResponseInner model = new ValidationResponseInner(); - model = BinaryData.fromObject(model).toObject(ValidationResponseInner.class); - } -}