diff --git a/sdk/databox/azure-resourcemanager-databox/CHANGELOG.md b/sdk/databox/azure-resourcemanager-databox/CHANGELOG.md
index 95f9217c5a824..3e4095522d6c1 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-02-28)
+- Azure Resource Manager DataBox client library for Java. This package contains Microsoft Azure SDK for DataBox Management SDK. Package tag package-2021-12. 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 848c2965820bb..7c2a6610c2647 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-2021-12. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
## We'd love to hear your feedback
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
com.azure.resourcemanager
azure-resourcemanager-databox
- 1.0.0-beta.1
+ 1.0.0-beta.2
```
[//]: # ({x-version-update-end})
@@ -74,6 +74,9 @@ 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
diff --git a/sdk/databox/azure-resourcemanager-databox/SAMPLE.md b/sdk/databox/azure-resourcemanager-databox/SAMPLE.md
new file mode 100644
index 0000000000000..da3c795bde040
--- /dev/null
+++ b/sdk/databox/azure-resourcemanager-databox/SAMPLE.md
@@ -0,0 +1,1056 @@
+# 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/2021-12-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/2021-12-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/2021-12-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("94107")
+ .withCompanyName("Microsoft")
+ .withAddressType(AddressType.COMMERCIAL))
+ .withDataImportDetails(
+ Arrays
+ .asList(
+ new DataImportDetails()
+ .withAccountDetails(
+ new StorageAccountDetails()
+ .withSharePassword("")
+ .withStorageAccountId(
+ "/subscriptions/fa68082f-8ff7-4a25-95c7-ce9da541242f/resourceGroups/databoxbvt1/providers/Microsoft.Storage/storageAccounts/databoxbvttestaccount2"))))
+ .withDevicePassword(""))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2021-12-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("94107")
+ .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/2021-12-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("94107")
+ .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/2021-12-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("94107")
+ .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/2021-12-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("94107")
+ .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/2021-12-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/2021-12-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/2021-12-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/2021-12-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/2021-12-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/2021-12-01/examples/JobsGetWaitingForAction.json
+ */
+ /**
+ * Sample code: JobsGetWaitingForAction.
+ *
+ * @param manager Entry point to DataBoxManager.
+ */
+ public static void jobsGetWaitingForAction(com.azure.resourcemanager.databox.DataBoxManager manager) {
+ manager
+ .jobs()
+ .getByResourceGroupWithResponse("dmstestresource", "TJx-637505258985313014", "details", 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/2021-12-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/2021-12-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/2021-12-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/2021-12-01/examples/MarkDevicesShipped.json
+ */
+ /**
+ * Sample code: MarkDevicesShipped.
+ *
+ * @param manager Entry point to DataBoxManager.
+ */
+ public static void markDevicesShipped(com.azure.resourcemanager.databox.DataBoxManager manager) {
+ manager
+ .jobs()
+ .markDevicesShippedWithResponse(
+ "SdkJob8367",
+ "SdkRg9836",
+ new MarkDevicesShippedRequest()
+ .withDeliverToDcPackageDetails(
+ new PackageCarrierInfo().withCarrierName("DHL").withTrackingId("123456")),
+ 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/2021-12-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/2021-12-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/2021-12-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("94107")
+ .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/2021-12-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;
+
+/** Samples for ResourceProvider Mitigate. */
+public final class ResourceProviderMitigateSamples {
+ /*
+ * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2021-12-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().withCustomerResolutionCode(CustomerResolutionCode.MOVE_TO_CLEAN_UP_DEVICE),
+ Context.NONE);
+ }
+}
+```
+
+### 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/2021-12-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/2021-12-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/2021-12-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/2021-12-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("94107")
+ .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/2021-12-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("94107")
+ .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/2021-12-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("94107")
+ .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 0c7198757c93b..2286ef2a7e231 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-2021-12.
+ 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.25.0
-
-
- com.azure
- azure-core-management
- 1.5.2
-
-
+
+ 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.25.0
+
+
+ com.azure
+ azure-core-management
+ 1.5.2
+
+
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 dcc1eadb4a882..49b3f2d6d89b7 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,8 +8,8 @@
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.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
import com.azure.core.http.policy.HttpPipelinePolicy;
@@ -17,6 +17,7 @@
import com.azure.core.http.policy.RequestIdPolicy;
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 +36,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 {
@@ -89,6 +91,7 @@ public static final class Configurable {
private HttpClient httpClient;
private HttpLogOptions httpLogOptions;
private final List policies = new ArrayList<>();
+ private final List scopes = new ArrayList<>();
private RetryPolicy retryPolicy;
private Duration defaultPollInterval;
@@ -128,6 +131,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.
*
@@ -184,20 +198,33 @@ 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);
}
List policies = new ArrayList<>();
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
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 =
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 c7ea07334dc9f..b2018452e185f 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.
+ * @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);
+
+ /**
+ * 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);
+
/**
* 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);
@@ -94,7 +127,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 information about the specified job.
+ * @return information about the specified job along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getByResourceGroupWithResponse(
@@ -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);
/**
@@ -236,9 +269,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> beginUpdate(
String resourceGroupName,
String jobName,
@@ -258,9 +291,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,
@@ -355,7 +388,7 @@ ShipmentPickUpResponseInner bookShipmentPickUp(
* @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)
Response bookShipmentPickUpWithResponse(
@@ -386,7 +419,7 @@ Response bookShipmentPickUpWithResponse(
* @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.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response cancelWithResponse(
@@ -401,7 +434,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 +449,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 8c5ca0f8163eb..d969702bbcd66 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 7a3f79325b34e..57d897fd356ed 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
@@ -37,7 +37,7 @@ public interface ResourceProvidersClient {
* @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.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response mitigateWithResponse(
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 c71af55f903a9..b4dfcab484bcb 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(
@@ -75,7 +75,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 output of the address validation api.
+ * @return output of the address validation api along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response validateAddressWithResponse(
@@ -106,7 +106,7 @@ ValidationResponseInner validateInputsByResourceGroup(
* @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)
Response validateInputsByResourceGroupWithResponse(
@@ -134,7 +134,7 @@ Response validateInputsByResourceGroupWithResponse(
* @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)
Response validateInputsWithResponse(
@@ -163,7 +163,7 @@ RegionConfigurationResponseInner regionConfiguration(
* @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)
Response regionConfigurationWithResponse(
@@ -194,7 +194,7 @@ RegionConfigurationResponseInner regionConfigurationByResourceGroup(
* @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)
Response regionConfigurationByResourceGroupWithResponse(
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 7271be0712851..f9bb7a3b5e3a5 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,7 +5,6 @@
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;
@@ -15,36 +14,23 @@
import java.util.List;
/** Output of the address validation api. */
-@JsonFlatten
@Immutable
-public class AddressValidationOutputInner {
+public final class AddressValidationOutputInner {
@JsonIgnore private final ClientLogger logger = new ClientLogger(AddressValidationOutputInner.class);
/*
- * Error code and message of validation response.
+ * The address validation properties.
*/
- @JsonProperty(value = "properties.error", access = JsonProperty.Access.WRITE_ONLY)
- private CloudError error;
-
- /*
- * 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;
+ @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY)
+ private AddressValidationProperties innerProperties;
/**
- * Get the error property: Error code and message of validation response.
+ * Get the innerProperties property: The address validation properties.
*
- * @return the error value.
+ * @return the innerProperties value.
*/
- public CloudError error() {
- return this.error;
+ private AddressValidationProperties innerProperties() {
+ return this.innerProperties;
}
/**
@@ -53,7 +39,7 @@ public CloudError error() {
* @return the validationStatus value.
*/
public AddressValidationStatus validationStatus() {
- return this.validationStatus;
+ return this.innerProperties() == null ? null : this.innerProperties().validationStatus();
}
/**
@@ -62,7 +48,16 @@ public AddressValidationStatus validationStatus() {
* @return the alternateAddresses value.
*/
public List alternateAddresses() {
- return this.alternateAddresses;
+ return this.innerProperties() == null ? null : this.innerProperties().alternateAddresses();
+ }
+
+ /**
+ * Get the error property: Error code and message of validation response.
+ *
+ * @return the error value.
+ */
+ public CloudError error() {
+ return this.innerProperties() == null ? null : this.innerProperties().error();
}
/**
@@ -71,11 +66,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 (innerProperties() != null) {
+ innerProperties().validate();
}
}
}
diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AddressValidationProperties.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/AddressValidationProperties.java
similarity index 88%
rename from sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AddressValidationProperties.java
rename to sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/AddressValidationProperties.java
index a1af669a02f61..60837a70c81f2 100644
--- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AddressValidationProperties.java
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/AddressValidationProperties.java
@@ -2,10 +2,13 @@
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
-package com.azure.resourcemanager.databox.models;
+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.AddressValidationStatus;
+import com.azure.resourcemanager.databox.models.ShippingAddress;
+import com.azure.resourcemanager.databox.models.ValidationInputResponse;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
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 0000000000000..207fecccc4f2e
--- /dev/null
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/JobProperties.java
@@ -0,0 +1,285 @@
+// 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.StageName;
+import com.azure.resourcemanager.databox.models.TransferType;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/** Job Properties. */
+@Fluent
+public final class JobProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(JobProperties.class);
+
+ /*
+ * 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;
+
+ /*
+ * 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;
+
+ /**
+ * 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 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();
+ }
+ }
+}
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 483ef43dcc657..f77e0457bf017 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;
@@ -23,11 +22,16 @@
import java.util.Map;
/** Job Resource. */
-@JsonFlatten
@Fluent
-public class JobResourceInner extends Resource {
+public final class JobResourceInner extends Resource {
@JsonIgnore private final ClientLogger logger = new ClientLogger(JobResourceInner.class);
+ /*
+ * Properties of a job.
+ */
+ @JsonProperty(value = "properties", required = true)
+ private JobProperties innerProperties = new JobProperties();
+
/*
* Name of the object.
*/
@@ -52,85 +56,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 +68,15 @@ public class JobResourceInner extends Resource {
@JsonProperty(value = "identity")
private ResourceIdentity identity;
+ /**
+ * 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 +113,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 +183,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 +196,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 +205,7 @@ public Boolean isCancellable() {
* @return the isDeletable value.
*/
public Boolean isDeletable() {
- return this.isDeletable;
+ return this.innerProperties() == null ? null : this.innerProperties().isDeletable();
}
/**
@@ -223,7 +214,7 @@ public Boolean isDeletable() {
* @return the isShippingAddressEditable value.
*/
public Boolean isShippingAddressEditable() {
- return this.isShippingAddressEditable;
+ return this.innerProperties() == null ? null : this.innerProperties().isShippingAddressEditable();
}
/**
@@ -232,7 +223,7 @@ public Boolean isShippingAddressEditable() {
* @return the isPrepareToShipEnabled value.
*/
public Boolean isPrepareToShipEnabled() {
- return this.isPrepareToShipEnabled;
+ return this.innerProperties() == null ? null : this.innerProperties().isPrepareToShipEnabled();
}
/**
@@ -241,7 +232,7 @@ public Boolean isPrepareToShipEnabled() {
* @return the status value.
*/
public StageName status() {
- return this.status;
+ return this.innerProperties() == null ? null : this.innerProperties().status();
}
/**
@@ -250,7 +241,7 @@ public StageName status() {
* @return the startTime value.
*/
public OffsetDateTime startTime() {
- return this.startTime;
+ return this.innerProperties() == null ? null : this.innerProperties().startTime();
}
/**
@@ -259,7 +250,7 @@ public OffsetDateTime startTime() {
* @return the error value.
*/
public CloudError error() {
- return this.error;
+ return this.innerProperties() == null ? null : this.innerProperties().error();
}
/**
@@ -268,7 +259,7 @@ public CloudError error() {
* @return the details value.
*/
public JobDetails details() {
- return this.details;
+ return this.innerProperties() == null ? null : this.innerProperties().details();
}
/**
@@ -278,7 +269,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 +282,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 +291,7 @@ public String cancellationReason() {
* @return the deliveryType value.
*/
public JobDeliveryType deliveryType() {
- return this.deliveryType;
+ return this.innerProperties() == null ? null : this.innerProperties().deliveryType();
}
/**
@@ -307,7 +301,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 +314,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 +324,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 +337,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,19 +346,13 @@ public JobResourceInner withTags(Map tags) {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
- if (transferType() == null) {
+ 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
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 f6142529fe456..57d24300a0e33 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
@@ -6,6 +6,7 @@
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;
@@ -28,6 +29,12 @@ public final class RegionConfigurationResponseInner {
@JsonProperty(value = "transportAvailabilityResponse", access = JsonProperty.Access.WRITE_ONLY)
private TransportAvailabilityResponse transportAvailabilityResponse;
+ /*
+ * Datacenter address for given sku in a region.
+ */
+ @JsonProperty(value = "datacenterAddressResponse", access = JsonProperty.Access.WRITE_ONLY)
+ private DatacenterAddressResponse datacenterAddressResponse;
+
/**
* 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/SkuInformationInner.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/SkuInformationInner.java
index 96fcf59e7722e..3dadb455aabe8 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,7 +5,6 @@
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;
@@ -17,9 +16,8 @@
import java.util.List;
/** Information of the sku. */
-@JsonFlatten
@Immutable
-public class SkuInformationInner {
+public final class SkuInformationInner {
@JsonIgnore private final ClientLogger logger = new ClientLogger(SkuInformationInner.class);
/*
@@ -35,46 +33,10 @@ public class SkuInformationInner {
private Boolean enabled;
/*
- * The map of data location to service location.
+ * Properties of the sku.
*/
- @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.
- */
- @JsonProperty(value = "properties.disabledReasonMessage", access = JsonProperty.Access.WRITE_ONLY)
- private String disabledReasonMessage;
-
- /*
- * Required feature to access the sku.
- */
- @JsonProperty(value = "properties.requiredFeature", access = JsonProperty.Access.WRITE_ONLY)
- private String requiredFeature;
+ @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY)
+ private SkuProperties innerProperties;
/**
* 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,7 @@ public String disabledReasonMessage() {
* @return the requiredFeature value.
*/
public String requiredFeature() {
- return this.requiredFeature;
+ return this.innerProperties() == null ? null : this.innerProperties().requiredFeature();
}
/**
@@ -166,14 +137,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 0000000000000..a89b89a02a90e
--- /dev/null
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/SkuProperties.java
@@ -0,0 +1,143 @@
+// 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.core.util.logging.ClientLogger;
+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.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Properties of the sku. */
+@Immutable
+public final class SkuProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(SkuProperties.class);
+
+ /*
+ * 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;
+
+ /**
+ * 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;
+ }
+
+ /**
+ * 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/UpdateJobProperties.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/UpdateJobProperties.java
new file mode 100644
index 0000000000000..af9cb6a08ccf6
--- /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.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.databox.models.UpdateJobDetails;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Job Properties for update. */
+@Fluent
+public final class UpdateJobProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(UpdateJobProperties.class);
+
+ /*
+ * Details of a job to be updated.
+ */
+ @JsonProperty(value = "details")
+ private UpdateJobDetails details;
+
+ /**
+ * 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 8bb1ab9e27add..66807b1c07478 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,7 +5,6 @@
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;
@@ -14,23 +13,24 @@
import java.util.List;
/** Response of pre job creation validations. */
-@JsonFlatten
@Immutable
-public class ValidationResponseInner {
+public final class ValidationResponseInner {
@JsonIgnore private final ClientLogger logger = new ClientLogger(ValidationResponseInner.class);
/*
- * 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.
+ /**
+ * 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 0000000000000..f1a980544f07a
--- /dev/null
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/ValidationResponseProperties.java
@@ -0,0 +1,62 @@
+// 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.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;
+
+/** Properties of pre job creation validation response. */
+@Immutable
+public final class ValidationResponseProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ValidationResponseProperties.class);
+
+ /*
+ * 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;
+
+ /**
+ * 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 fcfdd52da7332..1c94805d6142d 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
@@ -23,10 +23,6 @@ public final class AddressValidationOutputImpl implements AddressValidationOutpu
this.serviceManager = serviceManager;
}
- public CloudError error() {
- return this.innerModel().error();
- }
-
public AddressValidationStatus validationStatus() {
return this.innerModel().validationStatus();
}
@@ -40,6 +36,10 @@ public List alternateAddresses() {
}
}
+ public CloudError error() {
+ return this.innerModel().error();
+ }
+
public AddressValidationOutputInner innerModel() {
return this.innerObject;
}
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 906b858913c12..52259de76ddfb 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
@@ -183,7 +183,7 @@ public ServicesClient getServices() {
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
- this.apiVersion = "2021-03-01";
+ this.apiVersion = "2021-12-01";
this.operations = new OperationsClientImpl(this);
this.jobs = new JobsClientImpl(this);
this.resourceProviders = new ResourceProvidersClientImpl(this);
diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobResourceImpl.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobResourceImpl.java
index 0796988c89448..e37ef9c502967 100644
--- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobResourceImpl.java
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobResourceImpl.java
@@ -17,6 +17,7 @@
import com.azure.resourcemanager.databox.models.JobDetails;
import com.azure.resourcemanager.databox.models.JobResource;
import com.azure.resourcemanager.databox.models.JobResourceUpdateParameter;
+import com.azure.resourcemanager.databox.models.MarkDevicesShippedRequest;
import com.azure.resourcemanager.databox.models.ResourceIdentity;
import com.azure.resourcemanager.databox.models.ShipmentPickUpRequest;
import com.azure.resourcemanager.databox.models.ShipmentPickUpResponse;
@@ -63,6 +64,14 @@ public SystemData systemData() {
return this.innerModel().systemData();
}
+ public Sku sku() {
+ return this.innerModel().sku();
+ }
+
+ public ResourceIdentity identity() {
+ return this.innerModel().identity();
+ }
+
public TransferType transferType() {
return this.innerModel().transferType();
}
@@ -115,14 +124,6 @@ public Boolean isCancellableWithoutFee() {
return this.innerModel().isCancellableWithoutFee();
}
- public Sku sku() {
- return this.innerModel().sku();
- }
-
- public ResourceIdentity identity() {
- return this.innerModel().identity();
- }
-
public Region region() {
return Region.fromName(this.regionName());
}
@@ -226,6 +227,17 @@ public JobResource refresh(Context context) {
return this;
}
+ public void markDevicesShipped(MarkDevicesShippedRequest markDevicesShippedRequest) {
+ serviceManager.jobs().markDevicesShipped(jobName, resourceGroupName, markDevicesShippedRequest);
+ }
+
+ public Response markDevicesShippedWithResponse(
+ MarkDevicesShippedRequest markDevicesShippedRequest, Context context) {
+ return serviceManager
+ .jobs()
+ .markDevicesShippedWithResponse(jobName, resourceGroupName, markDevicesShippedRequest, context);
+ }
+
public ShipmentPickUpResponse bookShipmentPickUp(ShipmentPickUpRequest shipmentPickUpRequest) {
return serviceManager.jobs().bookShipmentPickUp(resourceGroupName, jobName, shipmentPickUpRequest);
}
@@ -263,13 +275,13 @@ public JobResourceImpl withRegion(String location) {
return this;
}
- public JobResourceImpl withTransferType(TransferType transferType) {
- this.innerModel().withTransferType(transferType);
+ public JobResourceImpl withSku(Sku sku) {
+ this.innerModel().withSku(sku);
return this;
}
- public JobResourceImpl withSku(Sku sku) {
- this.innerModel().withSku(sku);
+ public JobResourceImpl withTransferType(TransferType transferType) {
+ this.innerModel().withTransferType(transferType);
return this;
}
@@ -283,6 +295,16 @@ public JobResourceImpl withTags(Map tags) {
}
}
+ public JobResourceImpl withIdentity(ResourceIdentity identity) {
+ if (isInCreateMode()) {
+ this.innerModel().withIdentity(identity);
+ return this;
+ } else {
+ this.updateJobResourceUpdateParameter.withIdentity(identity);
+ return this;
+ }
+ }
+
public JobResourceImpl withDetails(JobDetails details) {
this.innerModel().withDetails(details);
return this;
@@ -298,16 +320,6 @@ public JobResourceImpl withDeliveryInfo(JobDeliveryInfo deliveryInfo) {
return this;
}
- public JobResourceImpl withIdentity(ResourceIdentity identity) {
- if (isInCreateMode()) {
- this.innerModel().withIdentity(identity);
- return this;
- } else {
- this.updateJobResourceUpdateParameter.withIdentity(identity);
- return this;
- }
- }
-
public JobResourceImpl withDetails(UpdateJobDetails details) {
this.updateJobResourceUpdateParameter.withDetails(details);
return this;
diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobsClientImpl.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobsClientImpl.java
index 8fa80fdd80936..4721454c64b42 100644
--- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobsClientImpl.java
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobsClientImpl.java
@@ -41,6 +41,7 @@
import com.azure.resourcemanager.databox.models.CancellationReason;
import com.azure.resourcemanager.databox.models.JobResourceList;
import com.azure.resourcemanager.databox.models.JobResourceUpdateParameter;
+import com.azure.resourcemanager.databox.models.MarkDevicesShippedRequest;
import com.azure.resourcemanager.databox.models.ShipmentPickUpRequest;
import com.azure.resourcemanager.databox.models.UnencryptedCredentialsList;
import java.nio.ByteBuffer;
@@ -86,6 +87,22 @@ Mono> list(
@HeaderParam("Accept") String accept,
Context context);
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs"
+ + "/{jobName}/markDevicesShipped")
+ @ExpectedResponses({204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> markDevicesShipped(
+ @HostParam("$host") String endpoint,
+ @PathParam("jobName") String jobName,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") MarkDevicesShippedRequest markDevicesShippedRequest,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
@Headers({"Content-Type: application/json"})
@Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs")
@ExpectedResponses({200})
@@ -238,7 +255,7 @@ Mono> listByResourceGroupNext(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource Collection.
+ * @return job Resource Collection along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync(String skipToken) {
@@ -286,7 +303,7 @@ private Mono> listSinglePageAsync(String skipTok
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource Collection.
+ * @return job Resource Collection along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync(String skipToken, Context context) {
@@ -330,7 +347,7 @@ private Mono> listSinglePageAsync(String skipTok
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource Collection.
+ * @return job Resource Collection as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync(String skipToken) {
@@ -342,7 +359,7 @@ private PagedFlux listAsync(String skipToken) {
*
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource Collection.
+ * @return job Resource Collection as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync() {
@@ -358,7 +375,7 @@ private PagedFlux listAsync() {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource Collection.
+ * @return job Resource Collection as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync(String skipToken, Context context) {
@@ -371,7 +388,7 @@ private PagedFlux listAsync(String skipToken, Context context)
*
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource Collection.
+ * @return job Resource Collection as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list() {
@@ -387,13 +404,191 @@ public PagedIterable list() {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource Collection.
+ * @return job Resource Collection as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(String skipToken, Context context) {
return new PagedIterable<>(listAsync(skipToken, context));
}
+ /**
+ * Request to mark devices for a given job as shipped.
+ *
+ * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
+ * 24 characters in length and use any alphanumeric and underscore only.
+ * @param resourceGroupName The Resource Group Name.
+ * @param markDevicesShippedRequest Mark Devices Shipped Request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> markDevicesShippedWithResponseAsync(
+ String jobName, String resourceGroupName, MarkDevicesShippedRequest markDevicesShippedRequest) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (jobName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (markDevicesShippedRequest == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter markDevicesShippedRequest is required and cannot be null."));
+ } else {
+ markDevicesShippedRequest.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .markDevicesShipped(
+ this.client.getEndpoint(),
+ jobName,
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ this.client.getApiVersion(),
+ markDevicesShippedRequest,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Request to mark devices for a given job as shipped.
+ *
+ * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
+ * 24 characters in length and use any alphanumeric and underscore only.
+ * @param resourceGroupName The Resource Group Name.
+ * @param markDevicesShippedRequest Mark Devices Shipped Request.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> markDevicesShippedWithResponseAsync(
+ String jobName,
+ String resourceGroupName,
+ MarkDevicesShippedRequest markDevicesShippedRequest,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (jobName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (markDevicesShippedRequest == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter markDevicesShippedRequest is required and cannot be null."));
+ } else {
+ markDevicesShippedRequest.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .markDevicesShipped(
+ this.client.getEndpoint(),
+ jobName,
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ this.client.getApiVersion(),
+ markDevicesShippedRequest,
+ accept,
+ context);
+ }
+
+ /**
+ * Request to mark devices for a given job as shipped.
+ *
+ * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
+ * 24 characters in length and use any alphanumeric and underscore only.
+ * @param resourceGroupName The Resource Group Name.
+ * @param markDevicesShippedRequest Mark Devices Shipped Request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono markDevicesShippedAsync(
+ String jobName, String resourceGroupName, MarkDevicesShippedRequest markDevicesShippedRequest) {
+ return markDevicesShippedWithResponseAsync(jobName, resourceGroupName, markDevicesShippedRequest)
+ .flatMap((Response res) -> Mono.empty());
+ }
+
+ /**
+ * Request to mark devices for a given job as shipped.
+ *
+ * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
+ * 24 characters in length and use any alphanumeric and underscore only.
+ * @param resourceGroupName The Resource Group Name.
+ * @param markDevicesShippedRequest Mark Devices Shipped Request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void markDevicesShipped(
+ String jobName, String resourceGroupName, MarkDevicesShippedRequest markDevicesShippedRequest) {
+ markDevicesShippedAsync(jobName, resourceGroupName, markDevicesShippedRequest).block();
+ }
+
+ /**
+ * Request to mark devices for a given job as shipped.
+ *
+ * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
+ * 24 characters in length and use any alphanumeric and underscore only.
+ * @param resourceGroupName The Resource Group Name.
+ * @param markDevicesShippedRequest Mark Devices Shipped Request.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response markDevicesShippedWithResponse(
+ String jobName,
+ String resourceGroupName,
+ MarkDevicesShippedRequest markDevicesShippedRequest,
+ Context context) {
+ return markDevicesShippedWithResponseAsync(jobName, resourceGroupName, markDevicesShippedRequest, context)
+ .block();
+ }
+
/**
* Lists all the jobs available under the given resource group.
*
@@ -402,7 +597,7 @@ public PagedIterable list(String skipToken, Context context) {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource Collection.
+ * @return job Resource Collection along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listByResourceGroupSinglePageAsync(
@@ -457,7 +652,7 @@ private Mono> listByResourceGroupSinglePageAsync
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource Collection.
+ * @return job Resource Collection along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listByResourceGroupSinglePageAsync(
@@ -508,7 +703,7 @@ private Mono> listByResourceGroupSinglePageAsync
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource Collection.
+ * @return job Resource Collection as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listByResourceGroupAsync(String resourceGroupName, String skipToken) {
@@ -524,7 +719,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGrou
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource Collection.
+ * @return job Resource Collection as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
@@ -543,7 +738,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGrou
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource Collection.
+ * @return job Resource Collection as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listByResourceGroupAsync(
@@ -560,7 +755,7 @@ private PagedFlux listByResourceGroupAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource Collection.
+ * @return job Resource Collection as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable listByResourceGroup(String resourceGroupName) {
@@ -577,7 +772,7 @@ public PagedIterable listByResourceGroup(String resourceGroupN
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource Collection.
+ * @return job Resource Collection as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable listByResourceGroup(
@@ -595,7 +790,7 @@ public PagedIterable listByResourceGroup(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return information about the specified job.
+ * @return information about the specified job along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getByResourceGroupWithResponseAsync(
@@ -647,7 +842,7 @@ private Mono> getByResourceGroupWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return information about the specified job.
+ * @return information about the specified job along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getByResourceGroupWithResponseAsync(
@@ -695,7 +890,7 @@ private Mono> getByResourceGroupWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return information about the specified job.
+ * @return information about the specified job on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono getByResourceGroupAsync(String resourceGroupName, String jobName, String expand) {
@@ -719,7 +914,7 @@ private Mono getByResourceGroupAsync(String resourceGroupName,
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return information about the specified job.
+ * @return information about the specified job on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono getByResourceGroupAsync(String resourceGroupName, String jobName) {
@@ -763,7 +958,7 @@ public JobResourceInner getByResourceGroup(String resourceGroupName, String jobN
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return information about the specified job.
+ * @return information about the specified job along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response getByResourceGroupWithResponse(
@@ -782,7 +977,7 @@ public Response getByResourceGroupWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource.
+ * @return job Resource along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> createWithResponseAsync(
@@ -840,7 +1035,7 @@ private Mono>> createWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource.
+ * @return job Resource along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> createWithResponseAsync(
@@ -894,16 +1089,20 @@ private Mono>> createWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource.
+ * @return the {@link PollerFlux} for polling of job Resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, JobResourceInner> beginCreateAsync(
String resourceGroupName, String jobName, JobResourceInner jobResource) {
Mono>> mono = createWithResponseAsync(resourceGroupName, jobName, jobResource);
return this
.client
.getLroResult(
- mono, this.client.getHttpPipeline(), JobResourceInner.class, JobResourceInner.class, Context.NONE);
+ mono,
+ this.client.getHttpPipeline(),
+ JobResourceInner.class,
+ JobResourceInner.class,
+ this.client.getContext());
}
/**
@@ -918,9 +1117,9 @@ private PollerFlux, JobResourceInner> beginCreateAs
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource.
+ * @return the {@link PollerFlux} for polling of job Resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, JobResourceInner> beginCreateAsync(
String resourceGroupName, String jobName, JobResourceInner jobResource, Context context) {
context = this.client.mergeContext(context);
@@ -943,9 +1142,9 @@ private PollerFlux, JobResourceInner> beginCreateAs
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource.
+ * @return the {@link SyncPoller} for polling of job Resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, JobResourceInner> beginCreate(
String resourceGroupName, String jobName, JobResourceInner jobResource) {
return beginCreateAsync(resourceGroupName, jobName, jobResource).getSyncPoller();
@@ -963,9 +1162,9 @@ public SyncPoller, JobResourceInner> beginCreate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource.
+ * @return the {@link SyncPoller} for polling of job Resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, JobResourceInner> beginCreate(
String resourceGroupName, String jobName, JobResourceInner jobResource, Context context) {
return beginCreateAsync(resourceGroupName, jobName, jobResource, context).getSyncPoller();
@@ -982,7 +1181,7 @@ public SyncPoller, JobResourceInner> beginCreate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource.
+ * @return job Resource on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono createAsync(String resourceGroupName, String jobName, JobResourceInner jobResource) {
@@ -1003,7 +1202,7 @@ private Mono createAsync(String resourceGroupName, String jobN
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource.
+ * @return job Resource on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono createAsync(
@@ -1060,7 +1259,7 @@ public JobResourceInner create(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> deleteWithResponseAsync(String resourceGroupName, String jobName) {
@@ -1109,7 +1308,7 @@ private Mono>> deleteWithResponseAsync(String resource
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> deleteWithResponseAsync(
@@ -1155,14 +1354,15 @@ private Mono>> deleteWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link PollerFlux} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String jobName) {
Mono>> mono = deleteWithResponseAsync(resourceGroupName, jobName);
return this
.client
- .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE);
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
}
/**
@@ -1175,9 +1375,9 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link PollerFlux} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginDeleteAsync(
String resourceGroupName, String jobName, Context context) {
context = this.client.mergeContext(context);
@@ -1196,9 +1396,9 @@ private PollerFlux, Void> beginDeleteAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginDelete(String resourceGroupName, String jobName) {
return beginDeleteAsync(resourceGroupName, jobName).getSyncPoller();
}
@@ -1213,9 +1413,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName,
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginDelete(String resourceGroupName, String jobName, Context context) {
return beginDeleteAsync(resourceGroupName, jobName, context).getSyncPoller();
}
@@ -1229,7 +1429,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName,
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono deleteAsync(String resourceGroupName, String jobName) {
@@ -1246,7 +1446,7 @@ private Mono deleteAsync(String resourceGroupName, String jobName) {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono deleteAsync(String resourceGroupName, String jobName, Context context) {
@@ -1298,7 +1498,7 @@ public void delete(String resourceGroupName, String jobName, Context context) {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource.
+ * @return job Resource along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> updateWithResponseAsync(
@@ -1364,7 +1564,7 @@ private Mono>> updateWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource.
+ * @return job Resource along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> updateWithResponseAsync(
@@ -1427,9 +1627,9 @@ private Mono>> updateWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource.
+ * @return the {@link PollerFlux} for polling of job Resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, JobResourceInner> beginUpdateAsync(
String resourceGroupName,
String jobName,
@@ -1440,7 +1640,11 @@ private PollerFlux, JobResourceInner> beginUpdateAs
return this
.client
.getLroResult(
- mono, this.client.getHttpPipeline(), JobResourceInner.class, JobResourceInner.class, Context.NONE);
+ mono,
+ this.client.getHttpPipeline(),
+ JobResourceInner.class,
+ JobResourceInner.class,
+ this.client.getContext());
}
/**
@@ -1456,9 +1660,9 @@ private PollerFlux, JobResourceInner> beginUpdateAs
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource.
+ * @return the {@link PollerFlux} for polling of job Resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, JobResourceInner> beginUpdateAsync(
String resourceGroupName,
String jobName,
@@ -1486,9 +1690,9 @@ private PollerFlux, JobResourceInner> beginUpdateAs
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource.
+ * @return the {@link SyncPoller} for polling of job Resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, JobResourceInner> beginUpdate(
String resourceGroupName,
String jobName,
@@ -1510,9 +1714,9 @@ public SyncPoller, JobResourceInner> beginUpdate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource.
+ * @return the {@link SyncPoller} for polling of job Resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, JobResourceInner> beginUpdate(
String resourceGroupName,
String jobName,
@@ -1535,7 +1739,7 @@ public SyncPoller, JobResourceInner> beginUpdate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource.
+ * @return job Resource on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono updateAsync(
@@ -1558,7 +1762,7 @@ private Mono updateAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource.
+ * @return job Resource on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono updateAsync(
@@ -1582,7 +1786,7 @@ private Mono updateAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource.
+ * @return job Resource on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono updateAsync(
@@ -1673,7 +1877,7 @@ public JobResourceInner update(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return shipment pick up response.
+ * @return shipment pick up response along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> bookShipmentPickUpWithResponseAsync(
@@ -1731,7 +1935,7 @@ private Mono> bookShipmentPickUpWithRespon
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return shipment pick up response.
+ * @return shipment pick up response along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> bookShipmentPickUpWithResponseAsync(
@@ -1785,7 +1989,7 @@ private Mono> bookShipmentPickUpWithRespon
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return shipment pick up response.
+ * @return shipment pick up response on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono bookShipmentPickUpAsync(
@@ -1830,7 +2034,7 @@ public ShipmentPickUpResponseInner bookShipmentPickUp(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return shipment pick up response.
+ * @return shipment pick up response along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response bookShipmentPickUpWithResponse(
@@ -1848,7 +2052,7 @@ public Response bookShipmentPickUpWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> cancelWithResponseAsync(
@@ -1906,7 +2110,7 @@ private Mono> cancelWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> cancelWithResponseAsync(
@@ -1960,7 +2164,7 @@ private Mono> cancelWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono cancelAsync(String resourceGroupName, String jobName, CancellationReason cancellationReason) {
@@ -1995,7 +2199,7 @@ public void cancel(String resourceGroupName, String jobName, CancellationReason
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response cancelWithResponse(
@@ -2012,7 +2216,8 @@ public Response cancelWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return list of unencrypted credentials for accessing device.
+ * @return list of unencrypted credentials for accessing device along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listCredentialsSinglePageAsync(
@@ -2066,7 +2271,8 @@ private Mono> listCredentialsSinglePa
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return list of unencrypted credentials for accessing device.
+ * @return list of unencrypted credentials for accessing device along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listCredentialsSinglePageAsync(
@@ -2116,7 +2322,7 @@ private Mono> listCredentialsSinglePa
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return list of unencrypted credentials for accessing device.
+ * @return list of unencrypted credentials for accessing device as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listCredentialsAsync(String resourceGroupName, String jobName) {
@@ -2133,7 +2339,7 @@ private PagedFlux listCredentialsAsync(String resou
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return list of unencrypted credentials for accessing device.
+ * @return list of unencrypted credentials for accessing device as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listCredentialsAsync(
@@ -2150,7 +2356,7 @@ private PagedFlux listCredentialsAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return 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)
public PagedIterable listCredentials(String resourceGroupName, String jobName) {
@@ -2167,7 +2373,7 @@ public PagedIterable listCredentials(String resourc
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return 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)
public PagedIterable listCredentials(
@@ -2182,7 +2388,7 @@ public PagedIterable listCredentials(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource Collection.
+ * @return job Resource Collection along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listNextSinglePageAsync(String nextLink) {
@@ -2218,7 +2424,7 @@ private Mono> listNextSinglePageAsync(String nex
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource Collection.
+ * @return job Resource Collection along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listNextSinglePageAsync(String nextLink, Context context) {
@@ -2253,7 +2459,7 @@ private Mono> listNextSinglePageAsync(String nex
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource Collection.
+ * @return job Resource Collection along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) {
@@ -2290,7 +2496,7 @@ private Mono> listByResourceGroupNextSinglePageA
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource Collection.
+ * @return job Resource Collection along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listByResourceGroupNextSinglePageAsync(
diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobsImpl.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobsImpl.java
index a1b270e846c82..a3332d9a458fb 100644
--- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobsImpl.java
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobsImpl.java
@@ -16,6 +16,7 @@
import com.azure.resourcemanager.databox.models.CancellationReason;
import com.azure.resourcemanager.databox.models.JobResource;
import com.azure.resourcemanager.databox.models.Jobs;
+import com.azure.resourcemanager.databox.models.MarkDevicesShippedRequest;
import com.azure.resourcemanager.databox.models.ShipmentPickUpRequest;
import com.azure.resourcemanager.databox.models.ShipmentPickUpResponse;
import com.azure.resourcemanager.databox.models.UnencryptedCredentials;
@@ -43,6 +44,21 @@ public PagedIterable list(String skipToken, Context context) {
return Utils.mapPage(inner, inner1 -> new JobResourceImpl(inner1, this.manager()));
}
+ public void markDevicesShipped(
+ String jobName, String resourceGroupName, MarkDevicesShippedRequest markDevicesShippedRequest) {
+ this.serviceClient().markDevicesShipped(jobName, resourceGroupName, markDevicesShippedRequest);
+ }
+
+ public Response markDevicesShippedWithResponse(
+ String jobName,
+ String resourceGroupName,
+ MarkDevicesShippedRequest markDevicesShippedRequest,
+ Context context) {
+ return this
+ .serviceClient()
+ .markDevicesShippedWithResponse(jobName, resourceGroupName, markDevicesShippedRequest, context);
+ }
+
public PagedIterable listByResourceGroup(String resourceGroupName) {
PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName);
return Utils.mapPage(inner, inner1 -> new JobResourceImpl(inner1, this.manager()));
diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/OperationsClientImpl.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/OperationsClientImpl.java
index dfcdbfb4e3233..57bd5a8543bb4 100644
--- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/OperationsClientImpl.java
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/OperationsClientImpl.java
@@ -85,7 +85,7 @@ Mono> listNext(
*
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return operation Collection.
+ * @return operation Collection along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync() {
@@ -118,7 +118,7 @@ private Mono> listSinglePageAsync() {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return operation Collection.
+ * @return operation Collection along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync(Context context) {
@@ -148,7 +148,7 @@ private Mono> listSinglePageAsync(Context context)
*
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return operation Collection.
+ * @return operation Collection as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync() {
@@ -162,7 +162,7 @@ private PagedFlux listAsync() {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return operation Collection.
+ * @return operation Collection as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync(Context context) {
@@ -175,7 +175,7 @@ private PagedFlux listAsync(Context context) {
*
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return operation Collection.
+ * @return operation Collection as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list() {
@@ -189,7 +189,7 @@ public PagedIterable list() {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return operation Collection.
+ * @return operation Collection as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(Context context) {
@@ -203,7 +203,7 @@ public PagedIterable list(Context context) {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return operation Collection.
+ * @return operation Collection along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listNextSinglePageAsync(String nextLink) {
@@ -239,7 +239,7 @@ private Mono> listNextSinglePageAsync(String nextL
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return operation Collection.
+ * @return operation Collection along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listNextSinglePageAsync(String nextLink, Context context) {
diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/RegionConfigurationResponseImpl.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/RegionConfigurationResponseImpl.java
index c353222533c18..5b072243eaf9a 100644
--- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/RegionConfigurationResponseImpl.java
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/RegionConfigurationResponseImpl.java
@@ -5,6 +5,7 @@
package com.azure.resourcemanager.databox.implementation;
import com.azure.resourcemanager.databox.fluent.models.RegionConfigurationResponseInner;
+import com.azure.resourcemanager.databox.models.DatacenterAddressResponse;
import com.azure.resourcemanager.databox.models.RegionConfigurationResponse;
import com.azure.resourcemanager.databox.models.ScheduleAvailabilityResponse;
import com.azure.resourcemanager.databox.models.TransportAvailabilityResponse;
@@ -28,6 +29,10 @@ public TransportAvailabilityResponse transportAvailabilityResponse() {
return this.innerModel().transportAvailabilityResponse();
}
+ public DatacenterAddressResponse datacenterAddressResponse() {
+ return this.innerModel().datacenterAddressResponse();
+ }
+
public RegionConfigurationResponseInner innerModel() {
return this.innerObject;
}
diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ResourceProvidersClientImpl.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ResourceProvidersClientImpl.java
index 216f5fc70d430..22e99ccce6f80 100644
--- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ResourceProvidersClientImpl.java
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ResourceProvidersClientImpl.java
@@ -82,7 +82,7 @@ Mono> mitigate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> mitigateWithResponseAsync(
@@ -140,7 +140,7 @@ private Mono> mitigateWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> mitigateWithResponseAsync(
@@ -194,7 +194,7 @@ private Mono> mitigateWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono mitigateAsync(String jobName, String resourceGroupName, MitigateJobRequest mitigateJobRequest) {
@@ -229,7 +229,7 @@ public void mitigate(String jobName, String resourceGroupName, MitigateJobReques
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response mitigateWithResponse(
diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ServicesClientImpl.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ServicesClientImpl.java
index 3eda4a3f3ebad..a7bff922c7b8b 100644
--- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ServicesClientImpl.java
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ServicesClientImpl.java
@@ -174,7 +174,8 @@ Mono> listAvailableSkusByResourceGroupNext(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the available skus operation response.
+ * @return the available skus operation response along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listAvailableSkusByResourceGroupSinglePageAsync(
@@ -240,7 +241,8 @@ private Mono> listAvailableSkusByResourceGrou
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the available skus operation response.
+ * @return the available skus operation response along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listAvailableSkusByResourceGroupSinglePageAsync(
@@ -302,7 +304,7 @@ private Mono> listAvailableSkusByResourceGrou
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the available skus operation response.
+ * @return the available skus operation response as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAvailableSkusByResourceGroupAsync(
@@ -322,7 +324,7 @@ private PagedFlux listAvailableSkusByResourceGroupAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the available skus operation response.
+ * @return the available skus operation response as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAvailableSkusByResourceGroupAsync(
@@ -343,7 +345,7 @@ private PagedFlux listAvailableSkusByResourceGroupAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the available skus operation response.
+ * @return the available skus operation response as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable listAvailableSkusByResourceGroup(
@@ -362,7 +364,7 @@ public PagedIterable listAvailableSkusByResourceGroup(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the available skus operation response.
+ * @return the available skus operation response as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable listAvailableSkusByResourceGroup(
@@ -380,7 +382,8 @@ public PagedIterable listAvailableSkusByResourceGroup(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return output of the address validation api.
+ * @return output of the address validation api along with {@link Response} on successful completion of {@link
+ * Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> validateAddressWithResponseAsync(
@@ -432,7 +435,8 @@ private Mono> validateAddressWithResponse
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return output of the address validation api.
+ * @return output of the address validation api along with {@link Response} on successful completion of {@link
+ * Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> validateAddressWithResponseAsync(
@@ -480,7 +484,7 @@ private Mono> validateAddressWithResponse
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return output of the address validation api.
+ * @return output of the address validation api on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono