diff --git a/sdk/databox/azure-resourcemanager-databox/CHANGELOG.md b/sdk/databox/azure-resourcemanager-databox/CHANGELOG.md
index 95f9217c5a82..3442172d855f 100644
--- a/sdk/databox/azure-resourcemanager-databox/CHANGELOG.md
+++ b/sdk/databox/azure-resourcemanager-databox/CHANGELOG.md
@@ -1,7 +1,8 @@
# Release History
-## 1.0.0-beta.2 (Unreleased)
+## 1.0.0-beta.1 (2022-12-13)
+- Azure Resource Manager DataBox client library for Java. This package contains Microsoft Azure SDK for DataBox Management SDK. Package tag package-2022-10. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
## 1.0.0-beta.1 (2021-04-14)
diff --git a/sdk/databox/azure-resourcemanager-databox/README.md b/sdk/databox/azure-resourcemanager-databox/README.md
index 848c2965820b..360c5ba563e7 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-10. 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.resourcemanagerazure-resourcemanager-databox
- 1.0.0-beta.1
+ 1.0.0-beta.2
```
[//]: # ({x-version-update-end})
@@ -41,19 +41,19 @@ Various documentation is available to help you get started
Azure Management Libraries require a `TokenCredential` implementation for authentication and an `HttpClient` implementation for HTTP client.
-[Azure Identity][azure_identity] package and [Azure Core Netty HTTP][azure_core_http_netty] package provide the default implementation.
+[Azure Identity][azure_identity] and [Azure Core Netty HTTP][azure_core_http_netty] packages provide the default implementation.
### Authentication
-By default, Azure Active Directory token authentication depends on correct configure of following environment variables.
+By default, Azure Active Directory token authentication depends on correct configuration of the following environment variables.
- `AZURE_CLIENT_ID` for Azure client ID.
- `AZURE_TENANT_ID` for Azure tenant ID.
- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate.
-In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`.
+In addition, Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable.
-With above configuration, `azure` client can be authenticated by following code:
+With above configuration, `azure` client can be authenticated using the following code:
```java
AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
@@ -74,19 +74,22 @@ See [API design][design] for general introduction on design and key concepts on
## Examples
+[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/databox/azure-resourcemanager-databox/SAMPLE.md)
+
+
## Troubleshooting
## Next steps
## Contributing
-For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md).
+For details on contributing to this repository, see the [contributing guide][cg].
+
+This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit .
+
+When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA.
-1. Fork it
-1. Create your feature branch (`git checkout -b my-new-feature`)
-1. Commit your changes (`git commit -am 'Add some feature'`)
-1. Push to the branch (`git push origin my-new-feature`)
-1. Create new Pull Request
+This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact with any additional questions or comments.
[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS
@@ -97,3 +100,6 @@ For details on contributing to this repository, see the [contributing guide](htt
[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty
[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md
[design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md
+[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md
+[coc]: https://opensource.microsoft.com/codeofconduct/
+[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
diff --git a/sdk/databox/azure-resourcemanager-databox/SAMPLE.md b/sdk/databox/azure-resourcemanager-databox/SAMPLE.md
new file mode 100644
index 000000000000..7d742a13005e
--- /dev/null
+++ b/sdk/databox/azure-resourcemanager-databox/SAMPLE.md
@@ -0,0 +1,1075 @@
+# Code snippets and samples
+
+
+## Jobs
+
+- [BookShipmentPickUp](#jobs_bookshipmentpickup)
+- [Cancel](#jobs_cancel)
+- [Create](#jobs_create)
+- [Delete](#jobs_delete)
+- [GetByResourceGroup](#jobs_getbyresourcegroup)
+- [List](#jobs_list)
+- [ListByResourceGroup](#jobs_listbyresourcegroup)
+- [ListCredentials](#jobs_listcredentials)
+- [MarkDevicesShipped](#jobs_markdevicesshipped)
+- [Update](#jobs_update)
+
+## Operations
+
+- [List](#operations_list)
+
+## ResourceProvider
+
+- [Mitigate](#resourceprovider_mitigate)
+
+## Service
+
+- [ListAvailableSkusByResourceGroup](#service_listavailableskusbyresourcegroup)
+- [RegionConfiguration](#service_regionconfiguration)
+- [RegionConfigurationByResourceGroup](#service_regionconfigurationbyresourcegroup)
+- [ValidateAddress](#service_validateaddress)
+- [ValidateInputs](#service_validateinputs)
+- [ValidateInputsByResourceGroup](#service_validateinputsbyresourcegroup)
+### Jobs_BookShipmentPickUp
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.databox.models.ShipmentPickUpRequest;
+import java.time.OffsetDateTime;
+
+/** Samples for Jobs BookShipmentPickUp. */
+public final class JobsBookShipmentPickUpSamples {
+ /*
+ * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-10-01/examples/BookShipmentPickupPost.json
+ */
+ /**
+ * Sample code: BookShipmentPickupPost.
+ *
+ * @param manager Entry point to DataBoxManager.
+ */
+ public static void bookShipmentPickupPost(com.azure.resourcemanager.databox.DataBoxManager manager) {
+ manager
+ .jobs()
+ .bookShipmentPickUpWithResponse(
+ "bvttoolrg6",
+ "TJ-636646322037905056",
+ new ShipmentPickUpRequest()
+ .withStartTime(OffsetDateTime.parse("2019-09-20T18:30:00Z"))
+ .withEndTime(OffsetDateTime.parse("2019-09-22T18:30:00Z"))
+ .withShipmentLocation("Front desk"),
+ Context.NONE);
+ }
+}
+```
+
+### Jobs_Cancel
+
+```java
+import com.azure.core.util.Context;
+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/2022-10-01/examples/JobsCancelPost.json
+ */
+ /**
+ * Sample code: JobsCancelPost.
+ *
+ * @param manager Entry point to DataBoxManager.
+ */
+ public static void jobsCancelPost(com.azure.resourcemanager.databox.DataBoxManager manager) {
+ manager
+ .jobs()
+ .cancelWithResponse(
+ "SdkRg5154", "SdkJob952", new CancellationReason().withReason("CancelTest"), Context.NONE);
+ }
+}
+```
+
+### Jobs_Create
+
+```java
+import com.azure.resourcemanager.databox.models.AddressType;
+import com.azure.resourcemanager.databox.models.ContactDetails;
+import com.azure.resourcemanager.databox.models.DataAccountType;
+import com.azure.resourcemanager.databox.models.DataBoxJobDetails;
+import com.azure.resourcemanager.databox.models.DataExportDetails;
+import com.azure.resourcemanager.databox.models.DataImportDetails;
+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.ResourceIdentity;
+import com.azure.resourcemanager.databox.models.ShippingAddress;
+import com.azure.resourcemanager.databox.models.Sku;
+import com.azure.resourcemanager.databox.models.SkuName;
+import com.azure.resourcemanager.databox.models.StorageAccountDetails;
+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.TransferConfigurationType;
+import com.azure.resourcemanager.databox.models.TransferType;
+import com.azure.resourcemanager.databox.models.UserAssignedIdentity;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for Jobs Create. */
+public final class JobsCreateSamples {
+ /*
+ * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-10-01/examples/JobsCreateDevicePassword.json
+ */
+ /**
+ * Sample code: JobsCreateDevicePassword.
+ *
+ * @param manager Entry point to DataBoxManager.
+ */
+ public static void jobsCreateDevicePassword(com.azure.resourcemanager.databox.DataBoxManager manager) {
+ manager
+ .jobs()
+ .define("SdkJob9640")
+ .withRegion("westus")
+ .withExistingResourceGroup("SdkRg7478")
+ .withSku(new Sku().withName(SkuName.DATA_BOX))
+ .withTransferType(TransferType.IMPORT_TO_AZURE)
+ .withDetails(
+ new DataBoxJobDetails()
+ .withContactDetails(
+ new ContactDetails()
+ .withContactName("Public SDK Test")
+ .withPhone("1234567890")
+ .withPhoneExtension("1234")
+ .withEmailList(Arrays.asList("testing@microsoft.com")))
+ .withShippingAddress(
+ new ShippingAddress()
+ .withStreetAddress1("16 TOWNSEND ST")
+ .withStreetAddress2("Unit 1")
+ .withCity("San Francisco")
+ .withStateOrProvince("CA")
+ .withCountry("US")
+ .withPostalCode("fakeTokenPlaceholder")
+ .withCompanyName("Microsoft")
+ .withAddressType(AddressType.COMMERCIAL))
+ .withDataImportDetails(
+ Arrays
+ .asList(
+ new DataImportDetails()
+ .withAccountDetails(
+ new StorageAccountDetails()
+ .withSharePassword("fakeTokenPlaceholder")
+ .withStorageAccountId(
+ "/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/databoxbvt1/providers/Microsoft.Storage/storageAccounts/databoxbvttestaccount2"))))
+ .withDevicePassword("fakeTokenPlaceholder"))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-10-01/examples/JobsCreate.json
+ */
+ /**
+ * Sample code: JobsCreate.
+ *
+ * @param manager Entry point to DataBoxManager.
+ */
+ public static void jobsCreate(com.azure.resourcemanager.databox.DataBoxManager manager) {
+ manager
+ .jobs()
+ .define("SdkJob952")
+ .withRegion("westus")
+ .withExistingResourceGroup("SdkRg5154")
+ .withSku(new Sku().withName(SkuName.DATA_BOX))
+ .withTransferType(TransferType.IMPORT_TO_AZURE)
+ .withDetails(
+ new DataBoxJobDetails()
+ .withContactDetails(
+ new ContactDetails()
+ .withContactName("Public SDK Test")
+ .withPhone("1234567890")
+ .withPhoneExtension("1234")
+ .withEmailList(Arrays.asList("testing@microsoft.com")))
+ .withShippingAddress(
+ new ShippingAddress()
+ .withStreetAddress1("16 TOWNSEND ST")
+ .withStreetAddress2("Unit 1")
+ .withCity("San Francisco")
+ .withStateOrProvince("CA")
+ .withCountry("US")
+ .withPostalCode("fakeTokenPlaceholder")
+ .withCompanyName("Microsoft")
+ .withAddressType(AddressType.COMMERCIAL))
+ .withDataImportDetails(
+ Arrays
+ .asList(
+ new DataImportDetails()
+ .withAccountDetails(
+ new StorageAccountDetails()
+ .withStorageAccountId(
+ "/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/databoxbvt/providers/Microsoft.Storage/storageAccounts/databoxbvttestaccount")))))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-10-01/examples/JobsCreateDoubleEncryption.json
+ */
+ /**
+ * Sample code: JobsCreateDoubleEncryption.
+ *
+ * @param manager Entry point to DataBoxManager.
+ */
+ public static void jobsCreateDoubleEncryption(com.azure.resourcemanager.databox.DataBoxManager manager) {
+ manager
+ .jobs()
+ .define("SdkJob6599")
+ .withRegion("westus")
+ .withExistingResourceGroup("SdkRg608")
+ .withSku(new Sku().withName(SkuName.DATA_BOX))
+ .withTransferType(TransferType.IMPORT_TO_AZURE)
+ .withDetails(
+ new DataBoxJobDetails()
+ .withContactDetails(
+ new ContactDetails()
+ .withContactName("Public SDK Test")
+ .withPhone("1234567890")
+ .withPhoneExtension("1234")
+ .withEmailList(Arrays.asList("testing@microsoft.com")))
+ .withShippingAddress(
+ new ShippingAddress()
+ .withStreetAddress1("16 TOWNSEND ST")
+ .withStreetAddress2("Unit 1")
+ .withCity("San Francisco")
+ .withStateOrProvince("CA")
+ .withCountry("US")
+ .withPostalCode("fakeTokenPlaceholder")
+ .withCompanyName("Microsoft")
+ .withAddressType(AddressType.COMMERCIAL))
+ .withDataImportDetails(
+ Arrays
+ .asList(
+ new DataImportDetails()
+ .withAccountDetails(
+ new StorageAccountDetails()
+ .withStorageAccountId(
+ "/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/databoxbvt/providers/Microsoft.Storage/storageAccounts/databoxbvttestaccount"))))
+ .withPreferences(
+ new Preferences()
+ .withEncryptionPreferences(
+ new EncryptionPreferences().withDoubleEncryption(DoubleEncryption.ENABLED))))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-10-01/examples/JobsCreateWithUserAssignedIdentity.json
+ */
+ /**
+ * Sample code: JobsCreateWithUserAssignedIdentity.
+ *
+ * @param manager Entry point to DataBoxManager.
+ */
+ public static void jobsCreateWithUserAssignedIdentity(com.azure.resourcemanager.databox.DataBoxManager manager) {
+ manager
+ .jobs()
+ .define("SdkJob5337")
+ .withRegion("westus")
+ .withExistingResourceGroup("SdkRg7552")
+ .withSku(new Sku().withName(SkuName.DATA_BOX))
+ .withTransferType(TransferType.IMPORT_TO_AZURE)
+ .withIdentity(
+ new ResourceIdentity()
+ .withType("UserAssigned")
+ .withUserAssignedIdentities(
+ mapOf(
+ "/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/akvenkat/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sdkIdentity",
+ new UserAssignedIdentity())))
+ .withDetails(
+ new DataBoxJobDetails()
+ .withContactDetails(
+ new ContactDetails()
+ .withContactName("Public SDK Test")
+ .withPhone("1234567890")
+ .withPhoneExtension("1234")
+ .withEmailList(Arrays.asList("testing@microsoft.com")))
+ .withShippingAddress(
+ new ShippingAddress()
+ .withStreetAddress1("16 TOWNSEND ST")
+ .withStreetAddress2("Unit 1")
+ .withCity("San Francisco")
+ .withStateOrProvince("CA")
+ .withCountry("US")
+ .withPostalCode("fakeTokenPlaceholder")
+ .withCompanyName("Microsoft")
+ .withAddressType(AddressType.COMMERCIAL))
+ .withDataImportDetails(
+ Arrays
+ .asList(
+ new DataImportDetails()
+ .withAccountDetails(
+ new StorageAccountDetails()
+ .withStorageAccountId(
+ "/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/databoxbvt1/providers/Microsoft.Storage/storageAccounts/databoxbvttestaccount2")))))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-10-01/examples/JobsCreateExport.json
+ */
+ /**
+ * Sample code: JobsCreateExport.
+ *
+ * @param manager Entry point to DataBoxManager.
+ */
+ public static void jobsCreateExport(com.azure.resourcemanager.databox.DataBoxManager manager) {
+ manager
+ .jobs()
+ .define("SdkJob6429")
+ .withRegion("westus")
+ .withExistingResourceGroup("SdkRg8091")
+ .withSku(new Sku().withName(SkuName.DATA_BOX))
+ .withTransferType(TransferType.EXPORT_FROM_AZURE)
+ .withDetails(
+ new DataBoxJobDetails()
+ .withContactDetails(
+ new ContactDetails()
+ .withContactName("Public SDK Test")
+ .withPhone("1234567890")
+ .withPhoneExtension("1234")
+ .withEmailList(Arrays.asList("testing@microsoft.com")))
+ .withShippingAddress(
+ new ShippingAddress()
+ .withStreetAddress1("16 TOWNSEND ST")
+ .withStreetAddress2("Unit 1")
+ .withCity("San Francisco")
+ .withStateOrProvince("CA")
+ .withCountry("US")
+ .withPostalCode("fakeTokenPlaceholder")
+ .withCompanyName("Microsoft")
+ .withAddressType(AddressType.COMMERCIAL))
+ .withDataExportDetails(
+ Arrays
+ .asList(
+ new DataExportDetails()
+ .withTransferConfiguration(
+ new TransferConfiguration()
+ .withTransferConfigurationType(TransferConfigurationType.TRANSFER_ALL)
+ .withTransferAllDetails(
+ new TransferConfigurationTransferAllDetails()
+ .withInclude(
+ new TransferAllDetails()
+ .withDataAccountType(DataAccountType.STORAGE_ACCOUNT)
+ .withTransferAllBlobs(true)
+ .withTransferAllFiles(true))))
+ .withAccountDetails(
+ new StorageAccountDetails()
+ .withStorageAccountId(
+ "/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/akvenkat/providers/Microsoft.Storage/storageAccounts/aaaaaa2")))))
+ .create();
+ }
+
+ @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;
+ }
+}
+```
+
+### Jobs_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Jobs Delete. */
+public final class JobsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-10-01/examples/JobsDelete.json
+ */
+ /**
+ * Sample code: JobsDelete.
+ *
+ * @param manager Entry point to DataBoxManager.
+ */
+ public static void jobsDelete(com.azure.resourcemanager.databox.DataBoxManager manager) {
+ manager.jobs().delete("SdkRg5154", "SdkJob952", Context.NONE);
+ }
+}
+```
+
+### Jobs_GetByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Jobs GetByResourceGroup. */
+public final class JobsGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-10-01/examples/JobsGet.json
+ */
+ /**
+ * Sample code: JobsGet.
+ *
+ * @param manager Entry point to DataBoxManager.
+ */
+ public static void jobsGet(com.azure.resourcemanager.databox.DataBoxManager manager) {
+ manager.jobs().getByResourceGroupWithResponse("SdkRg5154", "SdkJob952", "details", Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-10-01/examples/JobsGetCmk.json
+ */
+ /**
+ * Sample code: JobsGetCmk.
+ *
+ * @param manager Entry point to DataBoxManager.
+ */
+ public static void jobsGetCmk(com.azure.resourcemanager.databox.DataBoxManager manager) {
+ manager.jobs().getByResourceGroupWithResponse("SdkRg7937", "SdkJob1735", "details", Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-10-01/examples/JobsGetExport.json
+ */
+ /**
+ * Sample code: JobsGetExport.
+ *
+ * @param manager Entry point to DataBoxManager.
+ */
+ public static void jobsGetExport(com.azure.resourcemanager.databox.DataBoxManager manager) {
+ manager.jobs().getByResourceGroupWithResponse("SdkRg8091", "SdkJob6429", "details", Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-10-01/examples/JobsGetCopyStuck.json
+ */
+ /**
+ * Sample code: JobsGetCopyStuck.
+ *
+ * @param manager Entry point to DataBoxManager.
+ */
+ public static void jobsGetCopyStuck(com.azure.resourcemanager.databox.DataBoxManager manager) {
+ manager
+ .jobs()
+ .getByResourceGroupWithResponse("dmstestresource", "TJx-637505258985313014", "details", Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-10-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", Context.NONE);
+ }
+}
+```
+
+### Jobs_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Jobs List. */
+public final class JobsListSamples {
+ /*
+ * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-10-01/examples/JobsList.json
+ */
+ /**
+ * Sample code: JobsList.
+ *
+ * @param manager Entry point to DataBoxManager.
+ */
+ public static void jobsList(com.azure.resourcemanager.databox.DataBoxManager manager) {
+ manager.jobs().list(null, Context.NONE);
+ }
+}
+```
+
+### Jobs_ListByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Jobs ListByResourceGroup. */
+public final class JobsListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-10-01/examples/JobsListByResourceGroup.json
+ */
+ /**
+ * Sample code: JobsListByResourceGroup.
+ *
+ * @param manager Entry point to DataBoxManager.
+ */
+ public static void jobsListByResourceGroup(com.azure.resourcemanager.databox.DataBoxManager manager) {
+ manager.jobs().listByResourceGroup("SdkRg5154", null, Context.NONE);
+ }
+}
+```
+
+### Jobs_ListCredentials
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Jobs ListCredentials. */
+public final class JobsListCredentialsSamples {
+ /*
+ * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-10-01/examples/JobsListCredentials.json
+ */
+ /**
+ * Sample code: JobsListCredentials.
+ *
+ * @param manager Entry point to DataBoxManager.
+ */
+ public static void jobsListCredentials(com.azure.resourcemanager.databox.DataBoxManager manager) {
+ manager.jobs().listCredentials("bvttoolrg6", "TJ-636646322037905056", Context.NONE);
+ }
+}
+```
+
+### Jobs_MarkDevicesShipped
+
+```java
+import com.azure.core.util.Context;
+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-10-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")),
+ Context.NONE);
+ }
+}
+```
+
+### Jobs_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.databox.models.AddressType;
+import com.azure.resourcemanager.databox.models.ContactDetails;
+import com.azure.resourcemanager.databox.models.IdentityProperties;
+import com.azure.resourcemanager.databox.models.JobResource;
+import com.azure.resourcemanager.databox.models.KekType;
+import com.azure.resourcemanager.databox.models.KeyEncryptionKey;
+import com.azure.resourcemanager.databox.models.ResourceIdentity;
+import com.azure.resourcemanager.databox.models.ShippingAddress;
+import com.azure.resourcemanager.databox.models.UpdateJobDetails;
+import com.azure.resourcemanager.databox.models.UserAssignedIdentity;
+import com.azure.resourcemanager.databox.models.UserAssignedProperties;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for Jobs Update. */
+public final class JobsUpdateSamples {
+ /*
+ * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-10-01/examples/JobsPatchCmk.json
+ */
+ /**
+ * Sample code: JobsPatchCmk.
+ *
+ * @param manager Entry point to DataBoxManager.
+ */
+ public static void jobsPatchCmk(com.azure.resourcemanager.databox.DataBoxManager manager) {
+ JobResource resource =
+ manager.jobs().getByResourceGroupWithResponse("SdkRg7937", "SdkJob1735", null, Context.NONE).getValue();
+ resource
+ .update()
+ .withDetails(
+ new UpdateJobDetails()
+ .withKeyEncryptionKey(
+ new KeyEncryptionKey()
+ .withKekType(KekType.CUSTOMER_MANAGED)
+ .withKekUrl("https://sdkkeyvault.vault.azure.net/keys/SSDKEY/")
+ .withKekVaultResourceId(
+ "/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/akvenkat/providers/Microsoft.KeyVault/vaults/SDKKeyVault")))
+ .apply();
+ }
+
+ /*
+ * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-10-01/examples/JobsPatchSystemAssignedToUserAssigned.json
+ */
+ /**
+ * Sample code: JobsPatchSystemAssignedToUserAssigned.
+ *
+ * @param manager Entry point to DataBoxManager.
+ */
+ public static void jobsPatchSystemAssignedToUserAssigned(com.azure.resourcemanager.databox.DataBoxManager manager) {
+ JobResource resource =
+ manager.jobs().getByResourceGroupWithResponse("SdkRg9765", "SdkJob2965", null, Context.NONE).getValue();
+ resource
+ .update()
+ .withIdentity(
+ new ResourceIdentity()
+ .withType("SystemAssigned,UserAssigned")
+ .withUserAssignedIdentities(
+ mapOf(
+ "/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/akvenkat/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sdkIdentity",
+ new UserAssignedIdentity())))
+ .withDetails(
+ new UpdateJobDetails()
+ .withKeyEncryptionKey(
+ new KeyEncryptionKey()
+ .withKekType(KekType.CUSTOMER_MANAGED)
+ .withIdentityProperties(
+ new IdentityProperties()
+ .withType("UserAssigned")
+ .withUserAssigned(
+ new UserAssignedProperties()
+ .withResourceId(
+ "/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/akvenkat/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sdkIdentity")))
+ .withKekUrl("https://sdkkeyvault.vault.azure.net/keys/SSDKEY/")
+ .withKekVaultResourceId(
+ "/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/akvenkat/providers/Microsoft.KeyVault/vaults/SDKKeyVault")))
+ .apply();
+ }
+
+ /*
+ * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-10-01/examples/JobsPatch.json
+ */
+ /**
+ * Sample code: JobsPatch.
+ *
+ * @param manager Entry point to DataBoxManager.
+ */
+ public static void jobsPatch(com.azure.resourcemanager.databox.DataBoxManager manager) {
+ JobResource resource =
+ manager.jobs().getByResourceGroupWithResponse("SdkRg5154", "SdkJob952", "details", Context.NONE).getValue();
+ resource
+ .update()
+ .withDetails(
+ new UpdateJobDetails()
+ .withContactDetails(
+ new ContactDetails()
+ .withContactName("Update Job")
+ .withPhone("1234567890")
+ .withPhoneExtension("1234")
+ .withEmailList(Arrays.asList("testing@microsoft.com")))
+ .withShippingAddress(
+ new ShippingAddress()
+ .withStreetAddress1("16 TOWNSEND ST")
+ .withStreetAddress2("Unit 1")
+ .withCity("San Francisco")
+ .withStateOrProvince("CA")
+ .withCountry("US")
+ .withPostalCode("fakeTokenPlaceholder")
+ .withCompanyName("Microsoft")
+ .withAddressType(AddressType.COMMERCIAL)))
+ .apply();
+ }
+
+ @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;
+ }
+}
+```
+
+### Operations_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Operations List. */
+public final class OperationsListSamples {
+ /*
+ * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-10-01/examples/OperationsGet.json
+ */
+ /**
+ * Sample code: OperationsGet.
+ *
+ * @param manager Entry point to DataBoxManager.
+ */
+ public static void operationsGet(com.azure.resourcemanager.databox.DataBoxManager manager) {
+ manager.operations().list(Context.NONE);
+ }
+}
+```
+
+### ResourceProvider_Mitigate
+
+```java
+import com.azure.core.util.Context;
+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/2022-10-01/examples/JobMitigate.json
+ */
+ /**
+ * Sample code: Mitigate.
+ *
+ * @param manager Entry point to DataBoxManager.
+ */
+ public static void mitigate(com.azure.resourcemanager.databox.DataBoxManager manager) {
+ manager
+ .resourceProviders()
+ .mitigateWithResponse(
+ "SdkJob8367",
+ "SdkRg9836",
+ new MitigateJobRequest()
+ .withSerialNumberCustomerResolutionMap(
+ mapOf(
+ "testDISK-1",
+ CustomerResolutionCode.MOVE_TO_CLEAN_UP_DEVICE,
+ "testDISK-2",
+ CustomerResolutionCode.RESUME)),
+ 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;
+ }
+}
+```
+
+### Service_ListAvailableSkusByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.databox.models.AvailableSkuRequest;
+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/2022-10-01/examples/AvailableSkusPost.json
+ */
+ /**
+ * Sample code: AvailableSkusPost.
+ *
+ * @param manager Entry point to DataBoxManager.
+ */
+ public static void availableSkusPost(com.azure.resourcemanager.databox.DataBoxManager manager) {
+ manager
+ .services()
+ .listAvailableSkusByResourceGroup(
+ "bvttoolrg6",
+ "westus",
+ new AvailableSkuRequest()
+ .withTransferType(TransferType.IMPORT_TO_AZURE)
+ .withCountry("US")
+ .withLocation("westus"),
+ Context.NONE);
+ }
+}
+```
+
+### Service_RegionConfiguration
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.databox.models.DataBoxScheduleAvailabilityRequest;
+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/2022-10-01/examples/RegionConfiguration.json
+ */
+ /**
+ * Sample code: RegionConfiguration.
+ *
+ * @param manager Entry point to DataBoxManager.
+ */
+ public static void regionConfiguration(com.azure.resourcemanager.databox.DataBoxManager manager) {
+ manager
+ .services()
+ .regionConfigurationWithResponse(
+ "westus",
+ new RegionConfigurationRequest()
+ .withScheduleAvailabilityRequest(
+ new DataBoxScheduleAvailabilityRequest().withStorageLocation("westus")),
+ Context.NONE);
+ }
+}
+```
+
+### Service_RegionConfigurationByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.databox.models.DataBoxScheduleAvailabilityRequest;
+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/2022-10-01/examples/RegionConfigurationByResourceGroup.json
+ */
+ /**
+ * Sample code: RegionConfigurationByResourceGroup.
+ *
+ * @param manager Entry point to DataBoxManager.
+ */
+ public static void regionConfigurationByResourceGroup(com.azure.resourcemanager.databox.DataBoxManager manager) {
+ manager
+ .services()
+ .regionConfigurationByResourceGroupWithResponse(
+ "SdkRg4981",
+ "westus",
+ new RegionConfigurationRequest()
+ .withScheduleAvailabilityRequest(
+ new DataBoxScheduleAvailabilityRequest().withStorageLocation("westus")),
+ Context.NONE);
+ }
+}
+```
+
+### Service_ValidateAddress
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.databox.models.AddressType;
+import com.azure.resourcemanager.databox.models.ShippingAddress;
+import com.azure.resourcemanager.databox.models.SkuName;
+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/2022-10-01/examples/ValidateAddressPost.json
+ */
+ /**
+ * Sample code: ValidateAddressPost.
+ *
+ * @param manager Entry point to DataBoxManager.
+ */
+ public static void validateAddressPost(com.azure.resourcemanager.databox.DataBoxManager manager) {
+ manager
+ .services()
+ .validateAddressWithResponse(
+ "westus",
+ new ValidateAddress()
+ .withShippingAddress(
+ new ShippingAddress()
+ .withStreetAddress1("16 TOWNSEND ST")
+ .withStreetAddress2("Unit 1")
+ .withCity("San Francisco")
+ .withStateOrProvince("CA")
+ .withCountry("US")
+ .withPostalCode("fakeTokenPlaceholder")
+ .withCompanyName("Microsoft")
+ .withAddressType(AddressType.COMMERCIAL))
+ .withDeviceType(SkuName.DATA_BOX),
+ Context.NONE);
+ }
+}
+```
+
+### Service_ValidateInputs
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.databox.models.AddressType;
+import com.azure.resourcemanager.databox.models.CreateJobValidations;
+import com.azure.resourcemanager.databox.models.CreateOrderLimitForSubscriptionValidationRequest;
+import com.azure.resourcemanager.databox.models.DataImportDetails;
+import com.azure.resourcemanager.databox.models.DataTransferDetailsValidationRequest;
+import com.azure.resourcemanager.databox.models.Preferences;
+import com.azure.resourcemanager.databox.models.PreferencesValidationRequest;
+import com.azure.resourcemanager.databox.models.ShippingAddress;
+import com.azure.resourcemanager.databox.models.SkuAvailabilityValidationRequest;
+import com.azure.resourcemanager.databox.models.SkuName;
+import com.azure.resourcemanager.databox.models.StorageAccountDetails;
+import com.azure.resourcemanager.databox.models.SubscriptionIsAllowedToCreateJobValidationRequest;
+import com.azure.resourcemanager.databox.models.TransferType;
+import com.azure.resourcemanager.databox.models.TransportPreferences;
+import com.azure.resourcemanager.databox.models.TransportShipmentTypes;
+import com.azure.resourcemanager.databox.models.ValidateAddress;
+import java.util.Arrays;
+
+/** Samples for Service ValidateInputs. */
+public final class ServiceValidateInputsSamples {
+ /*
+ * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-10-01/examples/ValidateInputs.json
+ */
+ /**
+ * Sample code: ValidateInputs.
+ *
+ * @param manager Entry point to DataBoxManager.
+ */
+ public static void validateInputs(com.azure.resourcemanager.databox.DataBoxManager manager) {
+ manager
+ .services()
+ .validateInputsWithResponse(
+ "westus",
+ new CreateJobValidations()
+ .withIndividualRequestDetails(
+ Arrays
+ .asList(
+ new DataTransferDetailsValidationRequest()
+ .withDataImportDetails(
+ Arrays
+ .asList(
+ new DataImportDetails()
+ .withAccountDetails(
+ new StorageAccountDetails()
+ .withStorageAccountId(
+ "/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/databoxbvt/providers/Microsoft.Storage/storageAccounts/databoxbvttestaccount"))))
+ .withDeviceType(SkuName.DATA_BOX)
+ .withTransferType(TransferType.IMPORT_TO_AZURE),
+ new ValidateAddress()
+ .withShippingAddress(
+ new ShippingAddress()
+ .withStreetAddress1("16 TOWNSEND ST")
+ .withStreetAddress2("Unit 1")
+ .withCity("San Francisco")
+ .withStateOrProvince("CA")
+ .withCountry("US")
+ .withPostalCode("fakeTokenPlaceholder")
+ .withCompanyName("Microsoft")
+ .withAddressType(AddressType.COMMERCIAL))
+ .withDeviceType(SkuName.DATA_BOX)
+ .withTransportPreferences(
+ new TransportPreferences()
+ .withPreferredShipmentType(TransportShipmentTypes.MICROSOFT_MANAGED)),
+ new SubscriptionIsAllowedToCreateJobValidationRequest(),
+ new SkuAvailabilityValidationRequest()
+ .withDeviceType(SkuName.DATA_BOX)
+ .withTransferType(TransferType.IMPORT_TO_AZURE)
+ .withCountry("US")
+ .withLocation("westus"),
+ new CreateOrderLimitForSubscriptionValidationRequest().withDeviceType(SkuName.DATA_BOX),
+ new PreferencesValidationRequest()
+ .withPreference(
+ new Preferences()
+ .withTransportPreferences(
+ new TransportPreferences()
+ .withPreferredShipmentType(
+ TransportShipmentTypes.MICROSOFT_MANAGED)))
+ .withDeviceType(SkuName.DATA_BOX))),
+ Context.NONE);
+ }
+}
+```
+
+### Service_ValidateInputsByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.databox.models.AddressType;
+import com.azure.resourcemanager.databox.models.CreateJobValidations;
+import com.azure.resourcemanager.databox.models.CreateOrderLimitForSubscriptionValidationRequest;
+import com.azure.resourcemanager.databox.models.DataImportDetails;
+import com.azure.resourcemanager.databox.models.DataTransferDetailsValidationRequest;
+import com.azure.resourcemanager.databox.models.Preferences;
+import com.azure.resourcemanager.databox.models.PreferencesValidationRequest;
+import com.azure.resourcemanager.databox.models.ShippingAddress;
+import com.azure.resourcemanager.databox.models.SkuAvailabilityValidationRequest;
+import com.azure.resourcemanager.databox.models.SkuName;
+import com.azure.resourcemanager.databox.models.StorageAccountDetails;
+import com.azure.resourcemanager.databox.models.SubscriptionIsAllowedToCreateJobValidationRequest;
+import com.azure.resourcemanager.databox.models.TransferType;
+import com.azure.resourcemanager.databox.models.TransportPreferences;
+import com.azure.resourcemanager.databox.models.TransportShipmentTypes;
+import com.azure.resourcemanager.databox.models.ValidateAddress;
+import java.util.Arrays;
+
+/** Samples for Service ValidateInputsByResourceGroup. */
+public final class ServiceValidateInputsByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-10-01/examples/ValidateInputsByResourceGroup.json
+ */
+ /**
+ * Sample code: ValidateInputsByResourceGroup.
+ *
+ * @param manager Entry point to DataBoxManager.
+ */
+ public static void validateInputsByResourceGroup(com.azure.resourcemanager.databox.DataBoxManager manager) {
+ manager
+ .services()
+ .validateInputsByResourceGroupWithResponse(
+ "SdkRg6861",
+ "westus",
+ new CreateJobValidations()
+ .withIndividualRequestDetails(
+ Arrays
+ .asList(
+ new DataTransferDetailsValidationRequest()
+ .withDataImportDetails(
+ Arrays
+ .asList(
+ new DataImportDetails()
+ .withAccountDetails(
+ new StorageAccountDetails()
+ .withStorageAccountId(
+ "/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourcegroups/databoxbvt/providers/Microsoft.Storage/storageAccounts/databoxbvttestaccount"))))
+ .withDeviceType(SkuName.DATA_BOX)
+ .withTransferType(TransferType.IMPORT_TO_AZURE),
+ new ValidateAddress()
+ .withShippingAddress(
+ new ShippingAddress()
+ .withStreetAddress1("16 TOWNSEND ST")
+ .withStreetAddress2("Unit 1")
+ .withCity("San Francisco")
+ .withStateOrProvince("CA")
+ .withCountry("US")
+ .withPostalCode("fakeTokenPlaceholder")
+ .withCompanyName("Microsoft")
+ .withAddressType(AddressType.COMMERCIAL))
+ .withDeviceType(SkuName.DATA_BOX)
+ .withTransportPreferences(
+ new TransportPreferences()
+ .withPreferredShipmentType(TransportShipmentTypes.MICROSOFT_MANAGED)),
+ new SubscriptionIsAllowedToCreateJobValidationRequest(),
+ new SkuAvailabilityValidationRequest()
+ .withDeviceType(SkuName.DATA_BOX)
+ .withTransferType(TransferType.IMPORT_TO_AZURE)
+ .withCountry("US")
+ .withLocation("westus"),
+ new CreateOrderLimitForSubscriptionValidationRequest().withDeviceType(SkuName.DATA_BOX),
+ new PreferencesValidationRequest()
+ .withPreference(
+ new Preferences()
+ .withTransportPreferences(
+ new TransportPreferences()
+ .withPreferredShipmentType(
+ TransportShipmentTypes.MICROSOFT_MANAGED)))
+ .withDeviceType(SkuName.DATA_BOX))),
+ Context.NONE);
+ }
+}
+```
+
diff --git a/sdk/databox/azure-resourcemanager-databox/pom.xml b/sdk/databox/azure-resourcemanager-databox/pom.xml
index 120acb43967e..b92d45b0a826 100644
--- a/sdk/databox/azure-resourcemanager-databox/pom.xml
+++ b/sdk/databox/azure-resourcemanager-databox/pom.xml
@@ -1,55 +1,55 @@
- 4.0.0
-
- com.azure
- azure-client-sdk-parent
- 1.7.0
- ../../parents/azure-client-sdk-parent
-
+ 4.0.0
+
+ com.azure
+ azure-client-sdk-parent
+ 1.7.0
+ ../../parents/azure-client-sdk-parent
+
- com.azure.resourcemanager
- azure-resourcemanager-databox
- 1.0.0-beta.2
- jar
+ com.azure.resourcemanager
+ azure-resourcemanager-databox
+ 1.0.0-beta.2
+ 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.
- https://github.com/Azure/azure-sdk-for-java
+ 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-2022-10.
+ https://github.com/Azure/azure-sdk-for-java
-
-
- The MIT License (MIT)
- http://opensource.org/licenses/MIT
- repo
-
-
+
+
+ The MIT License (MIT)
+ http://opensource.org/licenses/MIT
+ repo
+
+
-
- https://github.com/Azure/azure-sdk-for-java
- scm:git:git@github.com:Azure/azure-sdk-for-java.git
- scm:git:git@github.com:Azure/azure-sdk-for-java.git
- HEAD
-
-
-
- microsoft
- Microsoft
-
-
-
- UTF-8
- true
-
-
-
- com.azure
- azure-core
- 1.34.0
-
-
- com.azure
- azure-core-management
- 1.9.0
-
-
+
+ https://github.com/Azure/azure-sdk-for-java
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ HEAD
+
+
+
+ microsoft
+ Microsoft
+
+
+
+ UTF-8
+ true
+
+
+
+ com.azure
+ azure-core
+ 1.34.0
+
+
+ com.azure
+ azure-core-management
+ 1.9.0
+
+
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 dcc1eadb4a88..ba1e7c92b1c9 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
@@ -8,15 +8,18 @@
import com.azure.core.http.HttpClient;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpPipelineBuilder;
+import com.azure.core.http.HttpPipelinePosition;
import com.azure.core.http.policy.AddDatePolicy;
-import com.azure.core.http.policy.BearerTokenAuthenticationPolicy;
+import com.azure.core.http.policy.AddHeadersFromContextPolicy;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
import com.azure.core.http.policy.HttpPipelinePolicy;
import com.azure.core.http.policy.HttpPolicyProviders;
import com.azure.core.http.policy.RequestIdPolicy;
+import com.azure.core.http.policy.RetryOptions;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
+import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy;
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.util.Configuration;
import com.azure.core.util.logging.ClientLogger;
@@ -35,6 +38,7 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
+import java.util.stream.Collectors;
/** Entry point to DataBoxManager. */
public final class DataBoxManager {
@@ -73,6 +77,19 @@ public static DataBoxManager authenticate(TokenCredential credential, AzureProfi
return configure().authenticate(credential, profile);
}
+ /**
+ * Creates an instance of DataBox service API entry point.
+ *
+ * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential.
+ * @param profile the Azure profile for client.
+ * @return the DataBox service API instance.
+ */
+ public static DataBoxManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) {
+ Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+ return new DataBoxManager(httpPipeline, profile, null);
+ }
+
/**
* Gets a Configurable instance that can be used to create DataBoxManager with optional configuration.
*
@@ -84,12 +101,14 @@ public static Configurable configure() {
/** The Configurable allowing configurations to be set. */
public static final class Configurable {
- private final ClientLogger logger = new ClientLogger(Configurable.class);
+ private static final ClientLogger LOGGER = new ClientLogger(Configurable.class);
private HttpClient httpClient;
private HttpLogOptions httpLogOptions;
private final List policies = new ArrayList<>();
+ private final List scopes = new ArrayList<>();
private RetryPolicy retryPolicy;
+ private RetryOptions retryOptions;
private Duration defaultPollInterval;
private Configurable() {
@@ -128,6 +147,17 @@ public Configurable withPolicy(HttpPipelinePolicy policy) {
return this;
}
+ /**
+ * Adds the scope to permission sets.
+ *
+ * @param scope the scope.
+ * @return the configurable object itself.
+ */
+ public Configurable withScope(String scope) {
+ this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null."));
+ return this;
+ }
+
/**
* Sets the retry policy to the HTTP pipeline.
*
@@ -139,6 +169,19 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
return this;
}
+ /**
+ * Sets the retry options for the HTTP pipeline retry policy.
+ *
+ *
This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}.
+ *
+ * @param retryOptions the retry options for the HTTP pipeline retry policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withRetryOptions(RetryOptions retryOptions) {
+ this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null.");
+ return this;
+ }
+
/**
* Sets the default poll interval, used when service does not provide "Retry-After" header.
*
@@ -146,9 +189,11 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
* @return the configurable object itself.
*/
public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
- this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null.");
+ this.defaultPollInterval =
+ Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
if (this.defaultPollInterval.isNegative()) {
- throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative"));
+ throw LOGGER
+ .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative"));
}
return this;
}
@@ -184,20 +229,38 @@ public DataBoxManager authenticate(TokenCredential credential, AzureProfile prof
userAgentBuilder.append(" (auto-generated)");
}
+ if (scopes.isEmpty()) {
+ scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
+ }
if (retryPolicy == null) {
- retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ if (retryOptions != null) {
+ retryPolicy = new RetryPolicy(retryOptions);
+ } else {
+ retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ }
}
List policies = new ArrayList<>();
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
+ policies.add(new AddHeadersFromContextPolicy());
policies.add(new RequestIdPolicy());
+ policies
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
+ .collect(Collectors.toList()));
HttpPolicyProviders.addBeforeRetryPolicies(policies);
policies.add(retryPolicy);
policies.add(new AddDatePolicy());
+ policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
policies
- .add(
- new BearerTokenAuthenticationPolicy(
- credential, profile.getEnvironment().getManagementEndpoint() + "/.default"));
- policies.addAll(this.policies);
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
+ .collect(Collectors.toList()));
HttpPolicyProviders.addAfterRetryPolicies(policies);
policies.add(new HttpLoggingPolicy(httpLogOptions));
HttpPipeline httpPipeline =
@@ -209,7 +272,11 @@ public DataBoxManager authenticate(TokenCredential credential, AzureProfile prof
}
}
- /** @return Resource collection API of Operations. */
+ /**
+ * Gets the resource collection API of Operations.
+ *
+ * @return Resource collection API of Operations.
+ */
public Operations operations() {
if (this.operations == null) {
this.operations = new OperationsImpl(clientObject.getOperations(), this);
@@ -217,7 +284,11 @@ public Operations operations() {
return operations;
}
- /** @return Resource collection API of Jobs. */
+ /**
+ * Gets the resource collection API of Jobs. It manages JobResource.
+ *
+ * @return Resource collection API of Jobs.
+ */
public Jobs jobs() {
if (this.jobs == null) {
this.jobs = new JobsImpl(clientObject.getJobs(), this);
@@ -225,7 +296,11 @@ public Jobs jobs() {
return jobs;
}
- /** @return Resource collection API of ResourceProviders. */
+ /**
+ * Gets the resource collection API of ResourceProviders.
+ *
+ * @return Resource collection API of ResourceProviders.
+ */
public ResourceProviders resourceProviders() {
if (this.resourceProviders == null) {
this.resourceProviders = new ResourceProvidersImpl(clientObject.getResourceProviders(), this);
@@ -233,7 +308,11 @@ public ResourceProviders resourceProviders() {
return resourceProviders;
}
- /** @return Resource collection API of Services. */
+ /**
+ * Gets the resource collection API of Services.
+ *
+ * @return Resource collection API of Services.
+ */
public Services services() {
if (this.services == null) {
this.services = new ServicesImpl(clientObject.getServices(), this);
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 c7ea07334dc9..1c6194f67a9d 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. */
@@ -25,7 +26,7 @@ public interface JobsClient {
*
* @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 job Resource Collection.
+ * @return job Resource Collection as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -38,11 +39,43 @@ public interface JobsClient {
* @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 job Resource Collection.
+ * @return job Resource Collection as paginated response with {@link PagedIterable}.
*/
@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.
*
@@ -50,7 +83,7 @@ public interface JobsClient {
* @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 job Resource Collection.
+ * @return job Resource Collection as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName);
@@ -64,7 +97,7 @@ public interface JobsClient {
* @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 job Resource Collection.
+ * @return job Resource Collection as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName, String skipToken, Context context);
@@ -75,13 +108,16 @@ public interface JobsClient {
* @param resourceGroupName The Resource Group Name.
* @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 expand $expand is supported on details parameter for job, which provides details on the job stages.
+ * @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 information about the specified job.
+ * @return information about the specified job along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- JobResourceInner getByResourceGroup(String resourceGroupName, String jobName);
+ Response getByResourceGroupWithResponse(
+ String resourceGroupName, String jobName, String expand, Context context);
/**
* Gets information about the specified job.
@@ -89,16 +125,13 @@ public interface JobsClient {
* @param resourceGroupName The Resource Group Name.
* @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 expand $expand is supported on details parameter for job, which provides details on the job stages.
- * @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 information about the specified job.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getByResourceGroupWithResponse(
- String resourceGroupName, String jobName, String expand, Context context);
+ JobResourceInner getByResourceGroup(String resourceGroupName, String jobName);
/**
* Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead
@@ -111,9 +144,9 @@ Response getByResourceGroupWithResponse(
* @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 job Resource.
+ * @return the {@link SyncPoller} for polling of job Resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, JobResourceInner> beginCreate(
String resourceGroupName, String jobName, JobResourceInner jobResource);
@@ -129,9 +162,9 @@ SyncPoller, JobResourceInner> beginCreate(
* @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 job Resource.
+ * @return the {@link SyncPoller} for polling of job Resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, JobResourceInner> beginCreate(
String resourceGroupName, String jobName, JobResourceInner jobResource, Context context);
@@ -177,9 +210,9 @@ SyncPoller, JobResourceInner> beginCreate(
* @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 completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(String resourceGroupName, String jobName);
/**
@@ -192,9 +225,9 @@ SyncPoller, JobResourceInner> beginCreate(
* @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 completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(String resourceGroupName, String jobName, Context context);
/**
@@ -231,19 +264,14 @@ SyncPoller, JobResourceInner> beginCreate(
* @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 jobResourceUpdateParameter Job update parameters from request body.
- * @param ifMatch Defines the If-Match condition. The patch will be performed only if the ETag of the job on the
- * server matches this value.
* @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 job Resource.
+ * @return the {@link SyncPoller} for polling of job Resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, JobResourceInner> beginUpdate(
- String resourceGroupName,
- String jobName,
- JobResourceUpdateParameter jobResourceUpdateParameter,
- String ifMatch);
+ String resourceGroupName, String jobName, JobResourceUpdateParameter jobResourceUpdateParameter);
/**
* Updates the properties of an existing job.
@@ -258,9 +286,9 @@ SyncPoller, JobResourceInner> beginUpdate(
* @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 job Resource.
+ * @return the {@link SyncPoller} for polling of job Resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, JobResourceInner> beginUpdate(
String resourceGroupName,
String jobName,
@@ -268,27 +296,6 @@ SyncPoller, JobResourceInner> beginUpdate(
String ifMatch,
Context context);
- /**
- * Updates the properties of an existing job.
- *
- * @param resourceGroupName The Resource Group Name.
- * @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 jobResourceUpdateParameter Job update parameters from request body.
- * @param ifMatch Defines the If-Match condition. The patch will be performed only if the ETag of the job on the
- * server matches this value.
- * @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 job Resource.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- JobResourceInner update(
- String resourceGroupName,
- String jobName,
- JobResourceUpdateParameter jobResourceUpdateParameter,
- String ifMatch);
-
/**
* Updates the properties of an existing job.
*
@@ -335,14 +342,15 @@ JobResourceInner update(
* @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 shipmentPickUpRequest Details of shipment pick up 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 shipment pick up response.
+ * @return shipment pick up response along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- ShipmentPickUpResponseInner bookShipmentPickUp(
- String resourceGroupName, String jobName, ShipmentPickUpRequest shipmentPickUpRequest);
+ Response bookShipmentPickUpWithResponse(
+ String resourceGroupName, String jobName, ShipmentPickUpRequest shipmentPickUpRequest, Context context);
/**
* Book shipment pick up.
@@ -351,15 +359,14 @@ ShipmentPickUpResponseInner bookShipmentPickUp(
* @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 shipmentPickUpRequest Details of shipment pick up 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 shipment pick up response.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response bookShipmentPickUpWithResponse(
- String resourceGroupName, String jobName, ShipmentPickUpRequest shipmentPickUpRequest, Context context);
+ ShipmentPickUpResponseInner bookShipmentPickUp(
+ String resourceGroupName, String jobName, ShipmentPickUpRequest shipmentPickUpRequest);
/**
* CancelJob.
@@ -368,12 +375,15 @@ Response bookShipmentPickUpWithResponse(
* @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 cancellationReason Reason for cancellation.
+ * @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)
- void cancel(String resourceGroupName, String jobName, CancellationReason cancellationReason);
+ Response cancelWithResponse(
+ String resourceGroupName, String jobName, CancellationReason cancellationReason, Context context);
/**
* CancelJob.
@@ -382,15 +392,12 @@ Response bookShipmentPickUpWithResponse(
* @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 cancellationReason Reason for cancellation.
- * @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 response.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response cancelWithResponse(
- String resourceGroupName, String jobName, CancellationReason cancellationReason, Context context);
+ void cancel(String resourceGroupName, String jobName, CancellationReason cancellationReason);
/**
* This method gets the unencrypted secrets related to the job.
@@ -401,7 +408,7 @@ Response cancelWithResponse(
* @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 list of unencrypted credentials for accessing device.
+ * @return list of unencrypted credentials for accessing device as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listCredentials(String resourceGroupName, String jobName);
@@ -416,7 +423,7 @@ Response cancelWithResponse(
* @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 list of unencrypted credentials for accessing device.
+ * @return list of unencrypted credentials for accessing device as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listCredentials(
diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/OperationsClient.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/OperationsClient.java
index 8c5ca0f8163e..d969702bbcd6 100644
--- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/OperationsClient.java
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/OperationsClient.java
@@ -17,7 +17,7 @@ public interface OperationsClient {
*
* @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 operation Collection.
+ * @return operation Collection as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -29,7 +29,7 @@ public interface OperationsClient {
* @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 operation Collection.
+ * @return operation Collection as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/ResourceProvidersClient.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/ResourceProvidersClient.java
index 7a3f79325b34..50ef8c2b8a37 100644
--- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/ResourceProvidersClient.java
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/ResourceProvidersClient.java
@@ -19,12 +19,15 @@ public interface ResourceProvidersClient {
* 24 characters in length and use any alphanumeric and underscore only.
* @param resourceGroupName The Resource Group Name.
* @param mitigateJobRequest Mitigation 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)
- void mitigate(String jobName, String resourceGroupName, MitigateJobRequest mitigateJobRequest);
+ Response mitigateWithResponse(
+ String jobName, String resourceGroupName, MitigateJobRequest mitigateJobRequest, Context context);
/**
* Request to mitigate for a given job.
@@ -33,13 +36,10 @@ public interface ResourceProvidersClient {
* 24 characters in length and use any alphanumeric and underscore only.
* @param resourceGroupName The Resource Group Name.
* @param mitigateJobRequest Mitigation 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 response.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response mitigateWithResponse(
- String jobName, String resourceGroupName, MitigateJobRequest mitigateJobRequest, Context context);
+ void mitigate(String jobName, String resourceGroupName, MitigateJobRequest mitigateJobRequest);
}
diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/ServicesClient.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/ServicesClient.java
index c71af55f903a..6153f7584d66 100644
--- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/ServicesClient.java
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/ServicesClient.java
@@ -29,7 +29,7 @@ public interface ServicesClient {
* @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 available skus operation response.
+ * @return the available skus operation response as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listAvailableSkusByResourceGroup(
@@ -45,7 +45,7 @@ PagedIterable listAvailableSkusByResourceGroup(
* @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 available skus operation response.
+ * @return the available skus operation response as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listAvailableSkusByResourceGroup(
@@ -57,13 +57,15 @@ PagedIterable listAvailableSkusByResourceGroup(
*
* @param location The location of the resource.
* @param validateAddress Shipping address of the customer.
+ * @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 output of the address validation api.
+ * @return output of the address validation api along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- AddressValidationOutputInner validateAddress(String location, ValidateAddress validateAddress);
+ Response validateAddressWithResponse(
+ String location, ValidateAddress validateAddress, Context context);
/**
* [DEPRECATED NOTICE: This operation will soon be removed]. This method validates the customer shipping address and
@@ -71,15 +73,13 @@ PagedIterable listAvailableSkusByResourceGroup(
*
* @param location The location of the resource.
* @param validateAddress Shipping address of the customer.
- * @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 output of the address validation api.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response validateAddressWithResponse(
- String location, ValidateAddress validateAddress, Context context);
+ AddressValidationOutputInner validateAddress(String location, ValidateAddress validateAddress);
/**
* This method does all necessary pre-job creation validation under resource group.
@@ -87,14 +87,15 @@ Response validateAddressWithResponse(
* @param resourceGroupName The Resource Group Name.
* @param location The location of the resource.
* @param validationRequest Inputs of the customer.
+ * @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 response of pre job creation validations.
+ * @return response of pre job creation validations along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- ValidationResponseInner validateInputsByResourceGroup(
- String resourceGroupName, String location, ValidationRequest validationRequest);
+ Response validateInputsByResourceGroupWithResponse(
+ String resourceGroupName, String location, ValidationRequest validationRequest, Context context);
/**
* This method does all necessary pre-job creation validation under resource group.
@@ -102,72 +103,71 @@ ValidationResponseInner validateInputsByResourceGroup(
* @param resourceGroupName The Resource Group Name.
* @param location The location of the resource.
* @param validationRequest Inputs of the customer.
- * @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 response of pre job creation validations.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response validateInputsByResourceGroupWithResponse(
- String resourceGroupName, String location, ValidationRequest validationRequest, Context context);
+ ValidationResponseInner validateInputsByResourceGroup(
+ String resourceGroupName, String location, ValidationRequest validationRequest);
/**
* This method does all necessary pre-job creation validation under subscription.
*
* @param location The location of the resource.
* @param validationRequest Inputs of the customer.
+ * @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 response of pre job creation validations.
+ * @return response of pre job creation validations along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- ValidationResponseInner validateInputs(String location, ValidationRequest validationRequest);
+ Response validateInputsWithResponse(
+ String location, ValidationRequest validationRequest, Context context);
/**
* This method does all necessary pre-job creation validation under subscription.
*
* @param location The location of the resource.
* @param validationRequest Inputs of the customer.
- * @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 response of pre job creation validations.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response validateInputsWithResponse(
- String location, ValidationRequest validationRequest, Context context);
+ ValidationResponseInner validateInputs(String location, ValidationRequest validationRequest);
/**
* This API provides configuration details specific to given region/location at Subscription level.
*
* @param location The location of the resource.
* @param regionConfigurationRequest Request body to get the configuration for the region.
+ * @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 configuration response specific to a region.
+ * @return configuration response specific to a region along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- RegionConfigurationResponseInner regionConfiguration(
- String location, RegionConfigurationRequest regionConfigurationRequest);
+ Response regionConfigurationWithResponse(
+ String location, RegionConfigurationRequest regionConfigurationRequest, Context context);
/**
* This API provides configuration details specific to given region/location at Subscription level.
*
* @param location The location of the resource.
* @param regionConfigurationRequest Request body to get the configuration for the region.
- * @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 configuration response specific to a region.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response regionConfigurationWithResponse(
- String location, RegionConfigurationRequest regionConfigurationRequest, Context context);
+ RegionConfigurationResponseInner regionConfiguration(
+ String location, RegionConfigurationRequest regionConfigurationRequest);
/**
* This API provides configuration details specific to given region/location at Resource group level.
@@ -175,14 +175,18 @@ Response regionConfigurationWithResponse(
* @param resourceGroupName The Resource Group Name.
* @param location The location of the resource.
* @param regionConfigurationRequest Request body to get the configuration for the region at resource group level.
+ * @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 configuration response specific to a region.
+ * @return configuration response specific to a region along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- RegionConfigurationResponseInner regionConfigurationByResourceGroup(
- String resourceGroupName, String location, RegionConfigurationRequest regionConfigurationRequest);
+ Response regionConfigurationByResourceGroupWithResponse(
+ String resourceGroupName,
+ String location,
+ RegionConfigurationRequest regionConfigurationRequest,
+ Context context);
/**
* This API provides configuration details specific to given region/location at Resource group level.
@@ -190,16 +194,12 @@ RegionConfigurationResponseInner regionConfigurationByResourceGroup(
* @param resourceGroupName The Resource Group Name.
* @param location The location of the resource.
* @param regionConfigurationRequest Request body to get the configuration for the region at resource group level.
- * @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 configuration response specific to a region.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response regionConfigurationByResourceGroupWithResponse(
- String resourceGroupName,
- String location,
- RegionConfigurationRequest regionConfigurationRequest,
- Context context);
+ RegionConfigurationResponseInner regionConfigurationByResourceGroup(
+ String resourceGroupName, String location, RegionConfigurationRequest regionConfigurationRequest);
}
diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/AddressValidationOutputInner.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/AddressValidationOutputInner.java
index 7271be071285..9bc992af2658 100644
--- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/AddressValidationOutputInner.java
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/AddressValidationOutputInner.java
@@ -5,64 +5,29 @@
package com.azure.resourcemanager.databox.fluent.models;
import com.azure.core.annotation.Immutable;
-import com.azure.core.annotation.JsonFlatten;
-import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.databox.models.AddressValidationStatus;
-import com.azure.resourcemanager.databox.models.CloudError;
-import com.azure.resourcemanager.databox.models.ShippingAddress;
-import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.azure.resourcemanager.databox.models.AddressValidationProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.List;
/** Output of the address validation api. */
-@JsonFlatten
@Immutable
-public class AddressValidationOutputInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(AddressValidationOutputInner.class);
-
- /*
- * Error code and message of validation response.
- */
- @JsonProperty(value = "properties.error", access = JsonProperty.Access.WRITE_ONLY)
- private CloudError error;
-
+public final class AddressValidationOutputInner {
/*
- * The address validation status.
- */
- @JsonProperty(value = "properties.validationStatus", access = JsonProperty.Access.WRITE_ONLY)
- private AddressValidationStatus validationStatus;
-
- /*
- * List of alternate addresses.
- */
- @JsonProperty(value = "properties.alternateAddresses", access = JsonProperty.Access.WRITE_ONLY)
- private List alternateAddresses;
-
- /**
- * Get the error property: Error code and message of validation response.
- *
- * @return the error value.
+ * The address validation properties.
*/
- public CloudError error() {
- return this.error;
- }
+ @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY)
+ private AddressValidationProperties properties;
- /**
- * Get the validationStatus property: The address validation status.
- *
- * @return the validationStatus value.
- */
- public AddressValidationStatus validationStatus() {
- return this.validationStatus;
+ /** Creates an instance of AddressValidationOutputInner class. */
+ public AddressValidationOutputInner() {
}
/**
- * Get the alternateAddresses property: List of alternate addresses.
+ * Get the properties property: The address validation properties.
*
- * @return the alternateAddresses value.
+ * @return the properties value.
*/
- public List alternateAddresses() {
- return this.alternateAddresses;
+ public AddressValidationProperties properties() {
+ return this.properties;
}
/**
@@ -71,11 +36,8 @@ public List alternateAddresses() {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
- if (error() != null) {
- error().validate();
- }
- if (alternateAddresses() != null) {
- alternateAddresses().forEach(e -> e.validate());
+ if (properties() != null) {
+ properties().validate();
}
}
}
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
new file mode 100644
index 000000000000..66fad04c035c
--- /dev/null
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/JobProperties.java
@@ -0,0 +1,319 @@
+// 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.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.databox.models.CloudError;
+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;
+import java.time.OffsetDateTime;
+
+/** Job Properties. */
+@Fluent
+public final class JobProperties {
+ /*
+ * Type of the data transfer.
+ */
+ @JsonProperty(value = "transferType", required = true)
+ private TransferType transferType;
+
+ /*
+ * Describes whether the job is cancellable or not.
+ */
+ @JsonProperty(value = "isCancellable", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean isCancellable;
+
+ /*
+ * Describes whether the job is deletable or not.
+ */
+ @JsonProperty(value = "isDeletable", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean isDeletable;
+
+ /*
+ * Describes whether the shipping address is editable or not.
+ */
+ @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
+ */
+ @JsonProperty(value = "isPrepareToShipEnabled", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean isPrepareToShipEnabled;
+
+ /*
+ * Name of the stage which is in progress.
+ */
+ @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY)
+ private StageName status;
+
+ /*
+ * Time at which the job was started in UTC ISO 8601 format.
+ */
+ @JsonProperty(value = "startTime", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime startTime;
+
+ /*
+ * Top level error for the job.
+ */
+ @JsonProperty(value = "error", access = JsonProperty.Access.WRITE_ONLY)
+ private CloudError error;
+
+ /*
+ * Details of a job run. This field will only be sent for expand details filter.
+ */
+ @JsonProperty(value = "details")
+ private JobDetails details;
+
+ /*
+ * Reason for cancellation.
+ */
+ @JsonProperty(value = "cancellationReason", access = JsonProperty.Access.WRITE_ONLY)
+ private String cancellationReason;
+
+ /*
+ * Delivery type of Job.
+ */
+ @JsonProperty(value = "deliveryType")
+ private JobDeliveryType deliveryType;
+
+ /*
+ * Delivery Info of Job.
+ */
+ @JsonProperty(value = "deliveryInfo")
+ private JobDeliveryInfo deliveryInfo;
+
+ /*
+ * Flag to indicate cancellation of scheduled job.
+ */
+ @JsonProperty(value = "isCancellableWithoutFee", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean isCancellableWithoutFee;
+
+ /** Creates an instance of JobProperties class. */
+ public JobProperties() {
+ }
+
+ /**
+ * Get the transferType property: Type of the data transfer.
+ *
+ * @return the transferType value.
+ */
+ public TransferType transferType() {
+ return this.transferType;
+ }
+
+ /**
+ * Set the transferType property: Type of the data transfer.
+ *
+ * @param transferType the transferType value to set.
+ * @return the JobProperties object itself.
+ */
+ public JobProperties withTransferType(TransferType transferType) {
+ this.transferType = transferType;
+ return this;
+ }
+
+ /**
+ * Get the isCancellable property: Describes whether the job is cancellable or not.
+ *
+ * @return the isCancellable value.
+ */
+ public Boolean isCancellable() {
+ return this.isCancellable;
+ }
+
+ /**
+ * Get the isDeletable property: Describes whether the job is deletable or not.
+ *
+ * @return the isDeletable value.
+ */
+ public Boolean isDeletable() {
+ return this.isDeletable;
+ }
+
+ /**
+ * Get the isShippingAddressEditable property: Describes whether the shipping address is editable or not.
+ *
+ * @return the isShippingAddressEditable value.
+ */
+ 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.
+ *
+ * @return the isPrepareToShipEnabled value.
+ */
+ public Boolean isPrepareToShipEnabled() {
+ return this.isPrepareToShipEnabled;
+ }
+
+ /**
+ * Get the status property: Name of the stage which is in progress.
+ *
+ * @return the status value.
+ */
+ public StageName status() {
+ return this.status;
+ }
+
+ /**
+ * Get the startTime property: Time at which the job was started in UTC ISO 8601 format.
+ *
+ * @return the startTime value.
+ */
+ public OffsetDateTime startTime() {
+ return this.startTime;
+ }
+
+ /**
+ * Get the error property: Top level error for the job.
+ *
+ * @return the error value.
+ */
+ public CloudError error() {
+ return this.error;
+ }
+
+ /**
+ * Get the details property: Details of a job run. This field will only be sent for expand details filter.
+ *
+ * @return the details value.
+ */
+ public JobDetails details() {
+ return this.details;
+ }
+
+ /**
+ * Set the details property: Details of a job run. This field will only be sent for expand details filter.
+ *
+ * @param details the details value to set.
+ * @return the JobProperties object itself.
+ */
+ public JobProperties withDetails(JobDetails details) {
+ this.details = details;
+ return this;
+ }
+
+ /**
+ * Get the cancellationReason property: Reason for cancellation.
+ *
+ * @return the cancellationReason value.
+ */
+ public String cancellationReason() {
+ return this.cancellationReason;
+ }
+
+ /**
+ * Get the deliveryType property: Delivery type of Job.
+ *
+ * @return the deliveryType value.
+ */
+ public JobDeliveryType deliveryType() {
+ return this.deliveryType;
+ }
+
+ /**
+ * Set the deliveryType property: Delivery type of Job.
+ *
+ * @param deliveryType the deliveryType value to set.
+ * @return the JobProperties object itself.
+ */
+ public JobProperties withDeliveryType(JobDeliveryType deliveryType) {
+ this.deliveryType = deliveryType;
+ return this;
+ }
+
+ /**
+ * Get the deliveryInfo property: Delivery Info of Job.
+ *
+ * @return the deliveryInfo value.
+ */
+ public JobDeliveryInfo deliveryInfo() {
+ return this.deliveryInfo;
+ }
+
+ /**
+ * Set the deliveryInfo property: Delivery Info of Job.
+ *
+ * @param deliveryInfo the deliveryInfo value to set.
+ * @return the JobProperties object itself.
+ */
+ public JobProperties withDeliveryInfo(JobDeliveryInfo deliveryInfo) {
+ this.deliveryInfo = deliveryInfo;
+ return this;
+ }
+
+ /**
+ * Get the isCancellableWithoutFee property: Flag to indicate cancellation of scheduled job.
+ *
+ * @return the isCancellableWithoutFee value.
+ */
+ public Boolean isCancellableWithoutFee() {
+ return this.isCancellableWithoutFee;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (transferType() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property transferType in model JobProperties"));
+ }
+ if (error() != null) {
+ error().validate();
+ }
+ if (details() != null) {
+ details().validate();
+ }
+ if (deliveryInfo() != null) {
+ deliveryInfo().validate();
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(JobProperties.class);
+}
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 483ef43dcc65..af6ebfee2a99 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
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.databox.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.JsonFlatten;
import com.azure.core.management.Resource;
import com.azure.core.management.SystemData;
import com.azure.core.util.logging.ClientLogger;
@@ -14,19 +13,23 @@
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;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
import java.util.Map;
/** Job Resource. */
-@JsonFlatten
@Fluent
-public class JobResourceInner extends Resource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(JobResourceInner.class);
+public final class JobResourceInner extends Resource {
+ /*
+ * Properties of a job.
+ */
+ @JsonProperty(value = "properties", required = true)
+ private JobProperties innerProperties = new JobProperties();
/*
* Name of the object.
@@ -52,85 +55,6 @@ public class JobResourceInner extends Resource {
@JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
- /*
- * Type of the data transfer.
- */
- @JsonProperty(value = "properties.transferType", required = true)
- private TransferType transferType;
-
- /*
- * Describes whether the job is cancellable or not.
- */
- @JsonProperty(value = "properties.isCancellable", access = JsonProperty.Access.WRITE_ONLY)
- private Boolean isCancellable;
-
- /*
- * Describes whether the job is deletable or not.
- */
- @JsonProperty(value = "properties.isDeletable", access = JsonProperty.Access.WRITE_ONLY)
- private Boolean isDeletable;
-
- /*
- * Describes whether the shipping address is editable or not.
- */
- @JsonProperty(value = "properties.isShippingAddressEditable", access = JsonProperty.Access.WRITE_ONLY)
- private Boolean isShippingAddressEditable;
-
- /*
- * Is Prepare To Ship Enabled on this job
- */
- @JsonProperty(value = "properties.isPrepareToShipEnabled", access = JsonProperty.Access.WRITE_ONLY)
- private Boolean isPrepareToShipEnabled;
-
- /*
- * Name of the stage which is in progress.
- */
- @JsonProperty(value = "properties.status", access = JsonProperty.Access.WRITE_ONLY)
- private StageName status;
-
- /*
- * Time at which the job was started in UTC ISO 8601 format.
- */
- @JsonProperty(value = "properties.startTime", access = JsonProperty.Access.WRITE_ONLY)
- private OffsetDateTime startTime;
-
- /*
- * Top level error for the job.
- */
- @JsonProperty(value = "properties.error", access = JsonProperty.Access.WRITE_ONLY)
- private CloudError error;
-
- /*
- * Details of a job run. This field will only be sent for expand details
- * filter.
- */
- @JsonProperty(value = "properties.details")
- private JobDetails details;
-
- /*
- * Reason for cancellation.
- */
- @JsonProperty(value = "properties.cancellationReason", access = JsonProperty.Access.WRITE_ONLY)
- private String cancellationReason;
-
- /*
- * Delivery type of Job.
- */
- @JsonProperty(value = "properties.deliveryType")
- private JobDeliveryType deliveryType;
-
- /*
- * Delivery Info of Job.
- */
- @JsonProperty(value = "properties.deliveryInfo")
- private JobDeliveryInfo deliveryInfo;
-
- /*
- * Flag to indicate cancellation of scheduled job.
- */
- @JsonProperty(value = "properties.isCancellableWithoutFee", access = JsonProperty.Access.WRITE_ONLY)
- private Boolean isCancellableWithoutFee;
-
/*
* The sku type.
*/
@@ -143,6 +67,19 @@ public class JobResourceInner extends Resource {
@JsonProperty(value = "identity")
private ResourceIdentity identity;
+ /** Creates an instance of JobResourceInner class. */
+ public JobResourceInner() {
+ }
+
+ /**
+ * Get the innerProperties property: Properties of a job.
+ *
+ * @return the innerProperties value.
+ */
+ private JobProperties innerProperties() {
+ return this.innerProperties;
+ }
+
/**
* Get the name property: Name of the object.
*
@@ -179,13 +116,67 @@ public SystemData systemData() {
return this.systemData;
}
+ /**
+ * Get the sku property: The sku type.
+ *
+ * @return the sku value.
+ */
+ public Sku sku() {
+ return this.sku;
+ }
+
+ /**
+ * Set the sku property: The sku type.
+ *
+ * @param sku the sku value to set.
+ * @return the JobResourceInner object itself.
+ */
+ public JobResourceInner withSku(Sku sku) {
+ this.sku = sku;
+ return this;
+ }
+
+ /**
+ * Get the identity property: Msi identity of the resource.
+ *
+ * @return the identity value.
+ */
+ public ResourceIdentity identity() {
+ return this.identity;
+ }
+
+ /**
+ * Set the identity property: Msi identity of the resource.
+ *
+ * @param identity the identity value to set.
+ * @return the JobResourceInner object itself.
+ */
+ public JobResourceInner withIdentity(ResourceIdentity identity) {
+ this.identity = identity;
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public JobResourceInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public JobResourceInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
/**
* Get the transferType property: Type of the data transfer.
*
* @return the transferType value.
*/
public TransferType transferType() {
- return this.transferType;
+ return this.innerProperties() == null ? null : this.innerProperties().transferType();
}
/**
@@ -195,7 +186,10 @@ public TransferType transferType() {
* @return the JobResourceInner object itself.
*/
public JobResourceInner withTransferType(TransferType transferType) {
- this.transferType = transferType;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new JobProperties();
+ }
+ this.innerProperties().withTransferType(transferType);
return this;
}
@@ -205,7 +199,7 @@ public JobResourceInner withTransferType(TransferType transferType) {
* @return the isCancellable value.
*/
public Boolean isCancellable() {
- return this.isCancellable;
+ return this.innerProperties() == null ? null : this.innerProperties().isCancellable();
}
/**
@@ -214,7 +208,7 @@ public Boolean isCancellable() {
* @return the isDeletable value.
*/
public Boolean isDeletable() {
- return this.isDeletable;
+ return this.innerProperties() == null ? null : this.innerProperties().isDeletable();
}
/**
@@ -223,7 +217,25 @@ public Boolean isDeletable() {
* @return the isShippingAddressEditable value.
*/
public Boolean isShippingAddressEditable() {
- return this.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();
}
/**
@@ -232,7 +244,7 @@ public Boolean isShippingAddressEditable() {
* @return the isPrepareToShipEnabled value.
*/
public Boolean isPrepareToShipEnabled() {
- return this.isPrepareToShipEnabled;
+ return this.innerProperties() == null ? null : this.innerProperties().isPrepareToShipEnabled();
}
/**
@@ -241,7 +253,7 @@ public Boolean isPrepareToShipEnabled() {
* @return the status value.
*/
public StageName status() {
- return this.status;
+ return this.innerProperties() == null ? null : this.innerProperties().status();
}
/**
@@ -250,7 +262,7 @@ public StageName status() {
* @return the startTime value.
*/
public OffsetDateTime startTime() {
- return this.startTime;
+ return this.innerProperties() == null ? null : this.innerProperties().startTime();
}
/**
@@ -259,7 +271,7 @@ public OffsetDateTime startTime() {
* @return the error value.
*/
public CloudError error() {
- return this.error;
+ return this.innerProperties() == null ? null : this.innerProperties().error();
}
/**
@@ -268,7 +280,7 @@ public CloudError error() {
* @return the details value.
*/
public JobDetails details() {
- return this.details;
+ return this.innerProperties() == null ? null : this.innerProperties().details();
}
/**
@@ -278,7 +290,10 @@ public JobDetails details() {
* @return the JobResourceInner object itself.
*/
public JobResourceInner withDetails(JobDetails details) {
- this.details = details;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new JobProperties();
+ }
+ this.innerProperties().withDetails(details);
return this;
}
@@ -288,7 +303,7 @@ public JobResourceInner withDetails(JobDetails details) {
* @return the cancellationReason value.
*/
public String cancellationReason() {
- return this.cancellationReason;
+ return this.innerProperties() == null ? null : this.innerProperties().cancellationReason();
}
/**
@@ -297,7 +312,7 @@ public String cancellationReason() {
* @return the deliveryType value.
*/
public JobDeliveryType deliveryType() {
- return this.deliveryType;
+ return this.innerProperties() == null ? null : this.innerProperties().deliveryType();
}
/**
@@ -307,7 +322,10 @@ public JobDeliveryType deliveryType() {
* @return the JobResourceInner object itself.
*/
public JobResourceInner withDeliveryType(JobDeliveryType deliveryType) {
- this.deliveryType = deliveryType;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new JobProperties();
+ }
+ this.innerProperties().withDeliveryType(deliveryType);
return this;
}
@@ -317,7 +335,7 @@ public JobResourceInner withDeliveryType(JobDeliveryType deliveryType) {
* @return the deliveryInfo value.
*/
public JobDeliveryInfo deliveryInfo() {
- return this.deliveryInfo;
+ return this.innerProperties() == null ? null : this.innerProperties().deliveryInfo();
}
/**
@@ -327,7 +345,10 @@ public JobDeliveryInfo deliveryInfo() {
* @return the JobResourceInner object itself.
*/
public JobResourceInner withDeliveryInfo(JobDeliveryInfo deliveryInfo) {
- this.deliveryInfo = deliveryInfo;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new JobProperties();
+ }
+ this.innerProperties().withDeliveryInfo(deliveryInfo);
return this;
}
@@ -337,61 +358,7 @@ public JobResourceInner withDeliveryInfo(JobDeliveryInfo deliveryInfo) {
* @return the isCancellableWithoutFee value.
*/
public Boolean isCancellableWithoutFee() {
- return this.isCancellableWithoutFee;
- }
-
- /**
- * Get the sku property: The sku type.
- *
- * @return the sku value.
- */
- public Sku sku() {
- return this.sku;
- }
-
- /**
- * Set the sku property: The sku type.
- *
- * @param sku the sku value to set.
- * @return the JobResourceInner object itself.
- */
- public JobResourceInner withSku(Sku sku) {
- this.sku = sku;
- return this;
- }
-
- /**
- * Get the identity property: Msi identity of the resource.
- *
- * @return the identity value.
- */
- public ResourceIdentity identity() {
- return this.identity;
- }
-
- /**
- * Set the identity property: Msi identity of the resource.
- *
- * @param identity the identity value to set.
- * @return the JobResourceInner object itself.
- */
- public JobResourceInner withIdentity(ResourceIdentity identity) {
- this.identity = identity;
- return this;
- }
-
- /** {@inheritDoc} */
- @Override
- public JobResourceInner withLocation(String location) {
- super.withLocation(location);
- return this;
- }
-
- /** {@inheritDoc} */
- @Override
- public JobResourceInner withTags(Map tags) {
- super.withTags(tags);
- return this;
+ return this.innerProperties() == null ? null : this.innerProperties().isCancellableWithoutFee();
}
/**
@@ -400,22 +367,16 @@ public JobResourceInner withTags(Map tags) {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
- if (transferType() == null) {
- throw logger
+ if (innerProperties() == null) {
+ throw LOGGER
.logExceptionAsError(
- new IllegalArgumentException("Missing required property transferType in model JobResourceInner"));
- }
- if (error() != null) {
- error().validate();
- }
- if (details() != null) {
- details().validate();
- }
- if (deliveryInfo() != null) {
- deliveryInfo().validate();
+ new IllegalArgumentException(
+ "Missing required property innerProperties in model JobResourceInner"));
+ } else {
+ innerProperties().validate();
}
if (sku() == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException("Missing required property sku in model JobResourceInner"));
} else {
@@ -425,4 +386,6 @@ public void validate() {
identity().validate();
}
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(JobResourceInner.class);
}
diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/OperationInner.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/OperationInner.java
index 278520c221ad..cd020bbb40ce 100644
--- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/OperationInner.java
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/OperationInner.java
@@ -5,19 +5,14 @@
package com.azure.resourcemanager.databox.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.databox.models.OperationDisplay;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** Operation entity. */
@Fluent
public final class OperationInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationInner.class);
-
/*
- * Name of the operation. Format:
- * {resourceProviderNamespace}/{resourceType}/{read|write|delete|action}
+ * Name of the operation. Format: {resourceProviderNamespace}/{resourceType}/{read|write|delete|action}
*/
@JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
private String name;
@@ -46,6 +41,10 @@ public final class OperationInner {
@JsonProperty(value = "isDataAction")
private Boolean isDataAction;
+ /** Creates an instance of OperationInner class. */
+ public OperationInner() {
+ }
+
/**
* Get the name property: Name of the operation. Format:
* {resourceProviderNamespace}/{resourceType}/{read|write|delete|action}.
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 f6142529fe45..3edc15a865f3 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,17 +5,14 @@
package com.azure.resourcemanager.databox.fluent.models;
import com.azure.core.annotation.Immutable;
-import com.azure.core.util.logging.ClientLogger;
+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.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** Configuration response specific to a region. */
@Immutable
public final class RegionConfigurationResponseInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(RegionConfigurationResponseInner.class);
-
/*
* Schedule availability for given sku in a region.
*/
@@ -28,6 +25,16 @@ 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() {
+ }
+
/**
* Get the scheduleAvailabilityResponse property: Schedule availability for given sku in a region.
*
@@ -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/ShipmentPickUpResponseInner.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/ShipmentPickUpResponseInner.java
index b20b834df680..d433e51a82b7 100644
--- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/ShipmentPickUpResponseInner.java
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/ShipmentPickUpResponseInner.java
@@ -5,16 +5,12 @@
package com.azure.resourcemanager.databox.fluent.models;
import com.azure.core.annotation.Immutable;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
/** Shipment pick up response. */
@Immutable
public final class ShipmentPickUpResponseInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ShipmentPickUpResponseInner.class);
-
/*
* Confirmation number for the pick up request.
*/
@@ -22,12 +18,15 @@ public final class ShipmentPickUpResponseInner {
private String confirmationNumber;
/*
- * Time by which shipment should be ready for pick up, this is in local
- * time of pick up area.
+ * Time by which shipment should be ready for pick up, this is in local time of pick up area.
*/
@JsonProperty(value = "readyByTime", access = JsonProperty.Access.WRITE_ONLY)
private OffsetDateTime readyByTime;
+ /** Creates an instance of ShipmentPickUpResponseInner class. */
+ public ShipmentPickUpResponseInner() {
+ }
+
/**
* Get the confirmationNumber property: Confirmation number for the pick up request.
*
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 96fcf59e7722..5a2e7bee87b8 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
@@ -5,23 +5,17 @@
package com.azure.resourcemanager.databox.fluent.models;
import com.azure.core.annotation.Immutable;
-import com.azure.core.annotation.JsonFlatten;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.databox.models.DataLocationToServiceLocationMap;
import com.azure.resourcemanager.databox.models.Sku;
import com.azure.resourcemanager.databox.models.SkuCapacity;
import com.azure.resourcemanager.databox.models.SkuCost;
import com.azure.resourcemanager.databox.models.SkuDisabledReason;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/** Information of the sku. */
-@JsonFlatten
@Immutable
-public class SkuInformationInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(SkuInformationInner.class);
-
+public final class SkuInformationInner {
/*
* The Sku.
*/
@@ -35,46 +29,14 @@ public class SkuInformationInner {
private Boolean enabled;
/*
- * The map of data location to service location.
- */
- @JsonProperty(value = "properties.dataLocationToServiceLocationMap", access = JsonProperty.Access.WRITE_ONLY)
- private List dataLocationToServiceLocationMap;
-
- /*
- * Capacity of the Sku.
- */
- @JsonProperty(value = "properties.capacity", access = JsonProperty.Access.WRITE_ONLY)
- private SkuCapacity capacity;
-
- /*
- * Cost of the Sku.
- */
- @JsonProperty(value = "properties.costs", access = JsonProperty.Access.WRITE_ONLY)
- private List costs;
-
- /*
- * Api versions that support this Sku.
- */
- @JsonProperty(value = "properties.apiVersions", access = JsonProperty.Access.WRITE_ONLY)
- private List apiVersions;
-
- /*
- * Reason why the Sku is disabled.
- */
- @JsonProperty(value = "properties.disabledReason", access = JsonProperty.Access.WRITE_ONLY)
- private SkuDisabledReason disabledReason;
-
- /*
- * Message for why the Sku is disabled.
+ * Properties of the sku.
*/
- @JsonProperty(value = "properties.disabledReasonMessage", access = JsonProperty.Access.WRITE_ONLY)
- private String disabledReasonMessage;
+ @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY)
+ private SkuProperties innerProperties;
- /*
- * Required feature to access the sku.
- */
- @JsonProperty(value = "properties.requiredFeature", access = JsonProperty.Access.WRITE_ONLY)
- private String requiredFeature;
+ /** Creates an instance of SkuInformationInner class. */
+ public SkuInformationInner() {
+ }
/**
* Get the sku property: The Sku.
@@ -94,13 +56,22 @@ public Boolean enabled() {
return this.enabled;
}
+ /**
+ * Get the innerProperties property: Properties of the sku.
+ *
+ * @return the innerProperties value.
+ */
+ private SkuProperties innerProperties() {
+ return this.innerProperties;
+ }
+
/**
* Get the dataLocationToServiceLocationMap property: The map of data location to service location.
*
* @return the dataLocationToServiceLocationMap value.
*/
public List dataLocationToServiceLocationMap() {
- return this.dataLocationToServiceLocationMap;
+ return this.innerProperties() == null ? null : this.innerProperties().dataLocationToServiceLocationMap();
}
/**
@@ -109,7 +80,7 @@ public List dataLocationToServiceLocationMap()
* @return the capacity value.
*/
public SkuCapacity capacity() {
- return this.capacity;
+ return this.innerProperties() == null ? null : this.innerProperties().capacity();
}
/**
@@ -118,7 +89,7 @@ public SkuCapacity capacity() {
* @return the costs value.
*/
public List costs() {
- return this.costs;
+ return this.innerProperties() == null ? null : this.innerProperties().costs();
}
/**
@@ -127,7 +98,7 @@ public List costs() {
* @return the apiVersions value.
*/
public List apiVersions() {
- return this.apiVersions;
+ return this.innerProperties() == null ? null : this.innerProperties().apiVersions();
}
/**
@@ -136,7 +107,7 @@ public List apiVersions() {
* @return the disabledReason value.
*/
public SkuDisabledReason disabledReason() {
- return this.disabledReason;
+ return this.innerProperties() == null ? null : this.innerProperties().disabledReason();
}
/**
@@ -145,7 +116,7 @@ public SkuDisabledReason disabledReason() {
* @return the disabledReasonMessage value.
*/
public String disabledReasonMessage() {
- return this.disabledReasonMessage;
+ return this.innerProperties() == null ? null : this.innerProperties().disabledReasonMessage();
}
/**
@@ -154,7 +125,17 @@ public String disabledReasonMessage() {
* @return the requiredFeature value.
*/
public String requiredFeature() {
- return this.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();
}
/**
@@ -166,14 +147,8 @@ public void validate() {
if (sku() != null) {
sku().validate();
}
- if (dataLocationToServiceLocationMap() != null) {
- dataLocationToServiceLocationMap().forEach(e -> e.validate());
- }
- if (capacity() != null) {
- capacity().validate();
- }
- if (costs() != null) {
- costs().forEach(e -> e.validate());
+ if (innerProperties() != null) {
+ innerProperties().validate();
}
}
}
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
new file mode 100644
index 000000000000..814405d4f85c
--- /dev/null
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/SkuProperties.java
@@ -0,0 +1,159 @@
+// 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.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.resourcemanager.databox.models.DataLocationToServiceLocationMap;
+import com.azure.resourcemanager.databox.models.SkuCapacity;
+import com.azure.resourcemanager.databox.models.SkuCost;
+import com.azure.resourcemanager.databox.models.SkuDisabledReason;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Properties of the sku. */
+@Immutable
+public final class SkuProperties {
+ /*
+ * The map of data location to service location.
+ */
+ @JsonProperty(value = "dataLocationToServiceLocationMap", access = JsonProperty.Access.WRITE_ONLY)
+ private List dataLocationToServiceLocationMap;
+
+ /*
+ * Capacity of the Sku.
+ */
+ @JsonProperty(value = "capacity", access = JsonProperty.Access.WRITE_ONLY)
+ private SkuCapacity capacity;
+
+ /*
+ * Cost of the Sku.
+ */
+ @JsonProperty(value = "costs", access = JsonProperty.Access.WRITE_ONLY)
+ private List costs;
+
+ /*
+ * Api versions that support this Sku.
+ */
+ @JsonProperty(value = "apiVersions", access = JsonProperty.Access.WRITE_ONLY)
+ private List apiVersions;
+
+ /*
+ * Reason why the Sku is disabled.
+ */
+ @JsonProperty(value = "disabledReason", access = JsonProperty.Access.WRITE_ONLY)
+ private SkuDisabledReason disabledReason;
+
+ /*
+ * Message for why the Sku is disabled.
+ */
+ @JsonProperty(value = "disabledReasonMessage", access = JsonProperty.Access.WRITE_ONLY)
+ private String disabledReasonMessage;
+
+ /*
+ * Required feature to access the sku.
+ */
+ @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() {
+ }
+
+ /**
+ * Get the dataLocationToServiceLocationMap property: The map of data location to service location.
+ *
+ * @return the dataLocationToServiceLocationMap value.
+ */
+ public List dataLocationToServiceLocationMap() {
+ return this.dataLocationToServiceLocationMap;
+ }
+
+ /**
+ * Get the capacity property: Capacity of the Sku.
+ *
+ * @return the capacity value.
+ */
+ public SkuCapacity capacity() {
+ return this.capacity;
+ }
+
+ /**
+ * Get the costs property: Cost of the Sku.
+ *
+ * @return the costs value.
+ */
+ public List costs() {
+ return this.costs;
+ }
+
+ /**
+ * Get the apiVersions property: Api versions that support this Sku.
+ *
+ * @return the apiVersions value.
+ */
+ public List apiVersions() {
+ return this.apiVersions;
+ }
+
+ /**
+ * Get the disabledReason property: Reason why the Sku is disabled.
+ *
+ * @return the disabledReason value.
+ */
+ public SkuDisabledReason disabledReason() {
+ return this.disabledReason;
+ }
+
+ /**
+ * Get the disabledReasonMessage property: Message for why the Sku is disabled.
+ *
+ * @return the disabledReasonMessage value.
+ */
+ public String disabledReasonMessage() {
+ return this.disabledReasonMessage;
+ }
+
+ /**
+ * Get the requiredFeature property: Required feature to access the sku.
+ *
+ * @return the requiredFeature value.
+ */
+ 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.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (dataLocationToServiceLocationMap() != null) {
+ dataLocationToServiceLocationMap().forEach(e -> e.validate());
+ }
+ if (capacity() != null) {
+ capacity().validate();
+ }
+ if (costs() != null) {
+ costs().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/UnencryptedCredentialsInner.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/UnencryptedCredentialsInner.java
index a03f62932fbf..570398cc052a 100644
--- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/UnencryptedCredentialsInner.java
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/UnencryptedCredentialsInner.java
@@ -5,16 +5,12 @@
package com.azure.resourcemanager.databox.fluent.models;
import com.azure.core.annotation.Immutable;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.databox.models.JobSecrets;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** Unencrypted credentials for accessing device. */
@Immutable
public final class UnencryptedCredentialsInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(UnencryptedCredentialsInner.class);
-
/*
* Name of the job.
*/
@@ -27,6 +23,10 @@ public final class UnencryptedCredentialsInner {
@JsonProperty(value = "jobSecrets", access = JsonProperty.Access.WRITE_ONLY)
private JobSecrets jobSecrets;
+ /** Creates an instance of UnencryptedCredentialsInner class. */
+ public UnencryptedCredentialsInner() {
+ }
+
/**
* Get the jobName property: Name of the job.
*
diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/UpdateJobProperties.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/UpdateJobProperties.java
new file mode 100644
index 000000000000..7276a6f78a2c
--- /dev/null
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/UpdateJobProperties.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.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.databox.models.UpdateJobDetails;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Job Properties for update. */
+@Fluent
+public final class UpdateJobProperties {
+ /*
+ * Details of a job to be updated.
+ */
+ @JsonProperty(value = "details")
+ private UpdateJobDetails details;
+
+ /** Creates an instance of UpdateJobProperties class. */
+ public UpdateJobProperties() {
+ }
+
+ /**
+ * Get the details property: Details of a job to be updated.
+ *
+ * @return the details value.
+ */
+ public UpdateJobDetails details() {
+ return this.details;
+ }
+
+ /**
+ * Set the details property: Details of a job to be updated.
+ *
+ * @param details the details value to set.
+ * @return the UpdateJobProperties object itself.
+ */
+ public UpdateJobProperties withDetails(UpdateJobDetails details) {
+ this.details = details;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (details() != null) {
+ details().validate();
+ }
+ }
+}
diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/ValidationResponseInner.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/ValidationResponseInner.java
index 8bb1ab9e27ad..1dc392cce7cc 100644
--- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/ValidationResponseInner.java
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/ValidationResponseInner.java
@@ -5,32 +5,32 @@
package com.azure.resourcemanager.databox.fluent.models;
import com.azure.core.annotation.Immutable;
-import com.azure.core.annotation.JsonFlatten;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.databox.models.OverallValidationStatus;
import com.azure.resourcemanager.databox.models.ValidationInputResponse;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/** Response of pre job creation validations. */
-@JsonFlatten
@Immutable
-public class ValidationResponseInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ValidationResponseInner.class);
-
+public final class ValidationResponseInner {
/*
- * Overall validation status.
+ * Properties of pre job creation validation response.
*/
- @JsonProperty(value = "properties.status", access = JsonProperty.Access.WRITE_ONLY)
- private OverallValidationStatus status;
+ @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY)
+ private ValidationResponseProperties innerProperties;
- /*
- * List of response details contain validationType and its response as key
- * and value respectively.
+ /** Creates an instance of ValidationResponseInner class. */
+ public ValidationResponseInner() {
+ }
+
+ /**
+ * Get the innerProperties property: Properties of pre job creation validation response.
+ *
+ * @return the innerProperties value.
*/
- @JsonProperty(value = "properties.individualResponseDetails", access = JsonProperty.Access.WRITE_ONLY)
- private List individualResponseDetails;
+ private ValidationResponseProperties innerProperties() {
+ return this.innerProperties;
+ }
/**
* Get the status property: Overall validation status.
@@ -38,7 +38,7 @@ public class ValidationResponseInner {
* @return the status value.
*/
public OverallValidationStatus status() {
- return this.status;
+ return this.innerProperties() == null ? null : this.innerProperties().status();
}
/**
@@ -48,7 +48,7 @@ public OverallValidationStatus status() {
* @return the individualResponseDetails value.
*/
public List individualResponseDetails() {
- return this.individualResponseDetails;
+ return this.innerProperties() == null ? null : this.innerProperties().individualResponseDetails();
}
/**
@@ -57,8 +57,8 @@ public List individualResponseDetails() {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
- if (individualResponseDetails() != null) {
- individualResponseDetails().forEach(e -> e.validate());
+ if (innerProperties() != null) {
+ innerProperties().validate();
}
}
}
diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/ValidationResponseProperties.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/ValidationResponseProperties.java
new file mode 100644
index 000000000000..85282f2693c5
--- /dev/null
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/ValidationResponseProperties.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.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.resourcemanager.databox.models.OverallValidationStatus;
+import com.azure.resourcemanager.databox.models.ValidationInputResponse;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Properties of pre job creation validation response. */
+@Immutable
+public final class ValidationResponseProperties {
+ /*
+ * Overall validation status.
+ */
+ @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY)
+ private OverallValidationStatus status;
+
+ /*
+ * List of response details contain validationType and its response as key and value respectively.
+ */
+ @JsonProperty(value = "individualResponseDetails", access = JsonProperty.Access.WRITE_ONLY)
+ private List individualResponseDetails;
+
+ /** Creates an instance of ValidationResponseProperties class. */
+ public ValidationResponseProperties() {
+ }
+
+ /**
+ * Get the status property: Overall validation status.
+ *
+ * @return the status value.
+ */
+ public OverallValidationStatus status() {
+ return this.status;
+ }
+
+ /**
+ * Get the individualResponseDetails property: List of response details contain validationType and its response as
+ * key and value respectively.
+ *
+ * @return the individualResponseDetails value.
+ */
+ public List individualResponseDetails() {
+ return this.individualResponseDetails;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (individualResponseDetails() != null) {
+ individualResponseDetails().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/AddressValidationOutputImpl.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/AddressValidationOutputImpl.java
index fcfdd52da733..b49a3bb73754 100644
--- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/AddressValidationOutputImpl.java
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/AddressValidationOutputImpl.java
@@ -6,11 +6,7 @@
import com.azure.resourcemanager.databox.fluent.models.AddressValidationOutputInner;
import com.azure.resourcemanager.databox.models.AddressValidationOutput;
-import com.azure.resourcemanager.databox.models.AddressValidationStatus;
-import com.azure.resourcemanager.databox.models.CloudError;
-import com.azure.resourcemanager.databox.models.ShippingAddress;
-import java.util.Collections;
-import java.util.List;
+import com.azure.resourcemanager.databox.models.AddressValidationProperties;
public final class AddressValidationOutputImpl implements AddressValidationOutput {
private AddressValidationOutputInner innerObject;
@@ -23,21 +19,8 @@ public final class AddressValidationOutputImpl implements AddressValidationOutpu
this.serviceManager = serviceManager;
}
- public CloudError error() {
- return this.innerModel().error();
- }
-
- public AddressValidationStatus validationStatus() {
- return this.innerModel().validationStatus();
- }
-
- public List alternateAddresses() {
- List inner = this.innerModel().alternateAddresses();
- if (inner != null) {
- return Collections.unmodifiableList(inner);
- } else {
- return Collections.emptyList();
- }
+ public AddressValidationProperties properties() {
+ return this.innerModel().properties();
}
public AddressValidationOutputInner innerModel() {
diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/DataBoxManagementClientBuilder.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/DataBoxManagementClientBuilder.java
index bb86febc870b..12f16d3eeb31 100644
--- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/DataBoxManagementClientBuilder.java
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/DataBoxManagementClientBuilder.java
@@ -7,7 +7,6 @@
import com.azure.core.annotation.ServiceClientBuilder;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpPipelineBuilder;
-import com.azure.core.http.policy.CookiePolicy;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.management.AzureEnvironment;
@@ -67,34 +66,34 @@ public DataBoxManagementClientBuilder environment(AzureEnvironment environment)
}
/*
- * The default poll interval for long-running operation
+ * The HTTP pipeline to send requests through
*/
- private Duration defaultPollInterval;
+ private HttpPipeline pipeline;
/**
- * Sets The default poll interval for long-running operation.
+ * Sets The HTTP pipeline to send requests through.
*
- * @param defaultPollInterval the defaultPollInterval value.
+ * @param pipeline the pipeline value.
* @return the DataBoxManagementClientBuilder.
*/
- public DataBoxManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) {
- this.defaultPollInterval = defaultPollInterval;
+ public DataBoxManagementClientBuilder pipeline(HttpPipeline pipeline) {
+ this.pipeline = pipeline;
return this;
}
/*
- * The HTTP pipeline to send requests through
+ * The default poll interval for long-running operation
*/
- private HttpPipeline pipeline;
+ private Duration defaultPollInterval;
/**
- * Sets The HTTP pipeline to send requests through.
+ * Sets The default poll interval for long-running operation.
*
- * @param pipeline the pipeline value.
+ * @param defaultPollInterval the defaultPollInterval value.
* @return the DataBoxManagementClientBuilder.
*/
- public DataBoxManagementClientBuilder pipeline(HttpPipeline pipeline) {
- this.pipeline = pipeline;
+ public DataBoxManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) {
+ this.defaultPollInterval = defaultPollInterval;
return this;
}
@@ -120,27 +119,26 @@ public DataBoxManagementClientBuilder serializerAdapter(SerializerAdapter serial
* @return an instance of DataBoxManagementClientImpl.
*/
public DataBoxManagementClientImpl buildClient() {
- if (endpoint == null) {
- this.endpoint = "https://management.azure.com";
- }
- if (environment == null) {
- this.environment = AzureEnvironment.AZURE;
- }
- if (defaultPollInterval == null) {
- this.defaultPollInterval = Duration.ofSeconds(30);
- }
- if (pipeline == null) {
- this.pipeline =
- new HttpPipelineBuilder()
- .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy())
- .build();
- }
- if (serializerAdapter == null) {
- this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter();
- }
+ String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com";
+ AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE;
+ HttpPipeline localPipeline =
+ (pipeline != null)
+ ? pipeline
+ : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build();
+ Duration localDefaultPollInterval =
+ (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30);
+ SerializerAdapter localSerializerAdapter =
+ (serializerAdapter != null)
+ ? serializerAdapter
+ : SerializerFactory.createDefaultManagementSerializerAdapter();
DataBoxManagementClientImpl client =
new DataBoxManagementClientImpl(
- pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint);
+ localPipeline,
+ localSerializerAdapter,
+ localDefaultPollInterval,
+ localEnvironment,
+ subscriptionId,
+ localEndpoint);
return client;
}
}
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 906b858913c1..14334143e5e9 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
@@ -15,6 +15,7 @@
import com.azure.core.management.polling.PollResult;
import com.azure.core.management.polling.PollerFactory;
import com.azure.core.util.Context;
+import com.azure.core.util.CoreUtils;
import com.azure.core.util.logging.ClientLogger;
import com.azure.core.util.polling.AsyncPollResponse;
import com.azure.core.util.polling.LongRunningOperationStatus;
@@ -32,15 +33,12 @@
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.time.Duration;
-import java.util.Map;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
/** Initializes a new instance of the DataBoxManagementClientImpl type. */
@ServiceClient(builder = DataBoxManagementClientBuilder.class)
public final class DataBoxManagementClientImpl implements DataBoxManagementClient {
- private final ClientLogger logger = new ClientLogger(DataBoxManagementClientImpl.class);
-
/** The Subscription Id. */
private final String subscriptionId;
@@ -183,7 +181,7 @@ public ServicesClient getServices() {
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
- this.apiVersion = "2021-03-01";
+ this.apiVersion = "2022-10-01";
this.operations = new OperationsClientImpl(this);
this.jobs = new JobsClientImpl(this);
this.resourceProviders = new ResourceProvidersClientImpl(this);
@@ -206,10 +204,7 @@ public Context getContext() {
* @return the merged context.
*/
public Context mergeContext(Context context) {
- for (Map.Entry