diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt
index f64b70065d1d9..9c0d16ab06622 100644
--- a/eng/versioning/version_client.txt
+++ b/eng/versioning/version_client.txt
@@ -334,7 +334,7 @@ com.azure.resourcemanager:azure-resourcemanager-billing;1.0.0;1.1.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-signalr;1.0.0;1.1.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-cognitiveservices;1.5.0;1.6.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-customerinsights;1.0.0-beta.3;1.0.0-beta.4
-com.azure.resourcemanager:azure-resourcemanager-databox;1.1.0;1.2.0-beta.1
+com.azure.resourcemanager:azure-resourcemanager-databox;1.1.0;1.2.0
com.azure.resourcemanager:azure-resourcemanager-datamigration;1.2.0;1.3.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-devtestlabs;1.2.0;1.3.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-healthcareapis;1.2.0;1.3.0-beta.1
diff --git a/sdk/databox/azure-resourcemanager-databox/CHANGELOG.md b/sdk/databox/azure-resourcemanager-databox/CHANGELOG.md
index 5c7677224de5d..0bfa53844169d 100644
--- a/sdk/databox/azure-resourcemanager-databox/CHANGELOG.md
+++ b/sdk/databox/azure-resourcemanager-databox/CHANGELOG.md
@@ -1,14 +1,531 @@
# Release History
-## 1.2.0-beta.1 (Unreleased)
+## 1.2.0 (2026-10-12)
-### Features Added
+- Azure Resource Manager Data Box client library for Java. This package contains Microsoft Azure SDK for Data Box Management SDK. Package api-version 2025-07-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
### Breaking Changes
-### Bugs Fixed
+#### `models.UnencryptedCredentialsList` was removed
+
+#### `models.OperationList` was removed
+
+#### `models.JobResourceList` was removed
+
+#### `models.AvailableSkusResult` was removed
+
+#### `models.DataBoxAccountCopyLogDetails` was modified
+
+* `DataBoxAccountCopyLogDetails()` was changed to private access
+* `validate()` was removed
+
+#### `models.TransportAvailabilityRequest` was modified
+
+* `validate()` was removed
+
+#### `models.DataBoxDiskCopyProgress` was modified
+
+* `DataBoxDiskCopyProgress()` was changed to private access
+* `validate()` was removed
+
+#### `models.TransferConfiguration` was modified
+
+* `validate()` was removed
+
+#### `models.UserAssignedIdentity` was modified
+
+* `validate()` was removed
+
+#### `models.TransferConfigurationTransferAllDetails` was modified
+
+* `validate()` was removed
+
+#### `models.AccountCredentialDetails` was modified
+
+* `AccountCredentialDetails()` was changed to private access
+* `validate()` was removed
+
+#### `models.UpdateJobDetails` was modified
+
+* `validate()` was removed
+
+#### `models.DataBoxCustomerDiskCopyLogDetails` was modified
+
+* `DataBoxCustomerDiskCopyLogDetails()` was changed to private access
+* `validate()` was removed
+
+#### `models.DataBoxDiskGranularCopyProgress` was modified
+
+* `DataBoxDiskGranularCopyProgress()` was changed to private access
+* `validate()` was removed
+
+#### `models.DeviceCapabilityDetails` was modified
+
+* `DeviceCapabilityDetails()` was changed to private access
+* `validate()` was removed
+
+#### `models.DataboxJobSecrets` was modified
+
+* `DataboxJobSecrets()` was changed to private access
+* `withPodSecrets(java.util.List)` was removed
+* `validate()` was removed
+
+#### `models.DataBoxHeavyJobDetails` was modified
+
+* `validate()` was removed
+
+#### `models.JobResourceUpdateParameter` was modified
+
+* `validate()` was removed
+
+#### `models.JobDelayDetails` was modified
+
+* `JobDelayDetails()` was changed to private access
+* `validate()` was removed
+
+#### `models.JobDetails` was modified
+
+* `validate()` was removed
+
+#### `models.DataBoxHeavyAccountCopyLogDetails` was modified
+
+* `DataBoxHeavyAccountCopyLogDetails()` was changed to private access
+* `validate()` was removed
+
+#### `models.PackageShippingDetails` was modified
+
+* `PackageShippingDetails()` was changed to private access
+* `validate()` was removed
+
+#### `models.FilterFileDetails` was modified
+
+* `validate()` was removed
+
+#### `models.DataImportDetails` was modified
+
+* `validate()` was removed
+
+#### `models.DataBoxDiskJobSecrets` was modified
+
+* `DataBoxDiskJobSecrets()` was changed to private access
+* `validate()` was removed
+
+#### `models.IdentityProperties` was modified
+
+* `validate()` was removed
+
+#### `models.TransferConfigurationTransferFilterDetails` was modified
+
+* `validate()` was removed
+
+#### `models.JobSecrets` was modified
+
+* `validate()` was removed
+
+#### `models.SkuAvailabilityValidationRequest` was modified
+
+* `validate()` was removed
+
+#### `models.TransportAvailabilityDetails` was modified
+
+* `TransportAvailabilityDetails()` was changed to private access
+* `validate()` was removed
+
+#### `models.DataAccountDetails` was modified
+
+* `validate()` was removed
+
+#### `models.TransferFilterDetails` was modified
+
+* `validate()` was removed
+
+#### `models.DiskScheduleAvailabilityRequest` was modified
+
+* `validate()` was removed
+
+#### `models.PreferencesValidationResponseProperties` was modified
+
+* `PreferencesValidationResponseProperties()` was changed to private access
+* `validate()` was removed
+
+#### `models.DeviceCapabilityResponse` was modified
+
+* `DeviceCapabilityResponse()` was changed to private access
+* `validate()` was removed
+
+#### `models.ShareCredentialDetails` was modified
+
+* `ShareCredentialDetails()` was changed to private access
+* `validate()` was removed
+
+#### `models.ScheduleAvailabilityRequest` was modified
+
+* `validate()` was removed
+
+#### `models.ContactDetails` was modified
+
+* `validate()` was removed
+
+#### `models.StorageAccountDetails` was modified
+
+* `validate()` was removed
+
+#### `models.DataBoxJobDetails` was modified
+
+* `validate()` was removed
+
+#### `models.ResourceIdentity` was modified
+
+* `validate()` was removed
+
+#### `models.CancellationReason` was modified
+
+* `validate()` was removed
+
+#### `models.OperationDisplay` was modified
+
+* `OperationDisplay()` was changed to private access
+* `withDescription(java.lang.String)` was removed
+* `withOperation(java.lang.String)` was removed
+* `withResource(java.lang.String)` was removed
+* `validate()` was removed
+* `withProvider(java.lang.String)` was removed
+
+#### `models.AdditionalErrorInfo` was modified
+
+* `AdditionalErrorInfo()` was changed to private access
+* `withType(java.lang.String)` was removed
+* `withInfo(java.lang.Object)` was removed
+* `validate()` was removed
+
+#### `models.DcAccessSecurityCode` was modified
+
+* `DcAccessSecurityCode()` was changed to private access
+* `withForwardDCAccessCode(java.lang.String)` was removed
+* `validate()` was removed
+* `withReverseDCAccessCode(java.lang.String)` was removed
+
+#### `models.ManagedDiskDetails` was modified
+
+* `validate()` was removed
+
+#### `models.BlobFilterDetails` was modified
+
+* `validate()` was removed
+
+#### `models.DataBoxDiskJobDetails` was modified
+
+* `validate()` was removed
+
+#### `models.DataTransferDetailsValidationResponseProperties` was modified
+
+* `DataTransferDetailsValidationResponseProperties()` was changed to private access
+* `validate()` was removed
+
+#### `models.DataExportDetails` was modified
+
+* `validate()` was removed
+
+#### `models.CustomerDiskJobSecrets` was modified
+
+* `CustomerDiskJobSecrets()` was changed to private access
+* `validate()` was removed
+
+#### `models.HeavyScheduleAvailabilityRequest` was modified
+
+* `validate()` was removed
+
+#### `models.DeviceCapabilityRequest` was modified
+
+* `validate()` was removed
+
+#### `models.Preferences` was modified
+
+* `validate()` was removed
+
+#### `models.SubscriptionIsAllowedToCreateJobValidationRequest` was modified
+
+* `validate()` was removed
+
+#### `models.JobDeliveryInfo` was modified
+
+* `validate()` was removed
+
+#### `models.DataBoxCustomerDiskCopyProgress` was modified
+
+* `DataBoxCustomerDiskCopyProgress()` was changed to private access
+* `validate()` was removed
+
+#### `models.ValidationInputResponse` was modified
+
+* `validate()` was removed
+
+#### `models.PackageCarrierInfo` was modified
+
+* `validate()` was removed
+
+#### `models.PackageCarrierDetails` was modified
+
+* `validate()` was removed
+
+#### `models.ScheduleAvailabilityResponse` was modified
+
+* `ScheduleAvailabilityResponse()` was changed to private access
+* `validate()` was removed
+
+#### `models.ImportDiskDetails` was modified
+
+* `validate()` was removed
+
+#### `models.TransferAllDetails` was modified
+
+* `validate()` was removed
+
+#### `models.ExportDiskDetails` was modified
+
+* `ExportDiskDetails()` was changed to private access
+* `validate()` was removed
+
+#### `models.LastMitigationActionOnJob` was modified
+
+* `LastMitigationActionOnJob()` was changed to private access
+* `withActionDateTimeInUtc(java.time.OffsetDateTime)` was removed
+* `validate()` was removed
+* `withCustomerResolution(models.CustomerResolutionCode)` was removed
+* `withIsPerformedByCustomer(java.lang.Boolean)` was removed
+
+#### `models.RegionConfigurationRequest` was modified
+
+* `validate()` was removed
+
+#### `models.SkuCapacity` was modified
+
+* `SkuCapacity()` was changed to private access
+* `validate()` was removed
+
+#### `models.CloudError` was modified
+
+* `CloudError()` was changed to private access
+* `withMessage(java.lang.String)` was removed
+* `withTarget(java.lang.String)` was removed
+* `validate()` was removed
+* `withCode(java.lang.String)` was removed
+
+#### `models.MarkDevicesShippedRequest` was modified
+
+* `validate()` was removed
+
+#### `models.DatacenterAddressResponse` was modified
+
+* `validate()` was removed
+
+#### `models.JobStages` was modified
+
+* `JobStages()` was changed to private access
+* `validate()` was removed
+
+#### `models.EncryptionPreferences` was modified
+
+* `validate()` was removed
+
+#### `models.ApplianceNetworkConfiguration` was modified
+
+* `ApplianceNetworkConfiguration()` was changed to private access
+* `validate()` was removed
+
+#### `models.DataTransferDetailsValidationRequest` was modified
+
+* `validate()` was removed
+
+#### `models.ContactInfo` was modified
+
+* `validate()` was removed
+
+#### `models.DataBoxDiskCopyLogDetails` was modified
+
+* `DataBoxDiskCopyLogDetails()` was changed to private access
+* `validate()` was removed
+
+#### `models.SkuCost` was modified
+
+* `SkuCost()` was changed to private access
+* `validate()` was removed
+
+#### `models.DatacenterAddressLocationResponse` was modified
+
+* `DatacenterAddressLocationResponse()` was changed to private access
+* `validate()` was removed
+
+#### `models.CreateOrderLimitForSubscriptionValidationResponseProperties` was modified
+
+* `CreateOrderLimitForSubscriptionValidationResponseProperties()` was changed to private access
+* `validate()` was removed
+
+#### `models.DeviceErasureDetails` was modified
+
+* `DeviceErasureDetails()` was changed to private access
+* `validate()` was removed
+
+#### `models.AvailableSkuRequest` was modified
+
+* `validate()` was removed
+
+#### `models.DataBoxScheduleAvailabilityRequest` was modified
+
+* `validate()` was removed
+
+#### `models.DiskSecret` was modified
+
+* `DiskSecret()` was changed to private access
+* `validate()` was removed
+
+#### `models.SkuAvailabilityValidationResponseProperties` was modified
+
+* `SkuAvailabilityValidationResponseProperties()` was changed to private access
+* `validate()` was removed
+
+#### `models.CreateJobValidations` was modified
+
+* `validate()` was removed
+
+#### `models.TransportPreferences` was modified
+
+* `validate()` was removed
+
+#### `models.ValidationInputRequest` was modified
+
+* `validate()` was removed
+
+#### `models.ShippingAddress` was modified
+
+* `validate()` was removed
+
+#### `models.AddressValidationProperties` was modified
+
+* `AddressValidationProperties()` was changed to private access
+* `validate()` was removed
+
+#### `models.MitigateJobRequest` was modified
+
+* `validate()` was removed
+
+#### `models.NotificationPreference` was modified
+
+* `validate()` was removed
+
+#### `models.ShipmentPickUpRequest` was modified
+
+* `validate()` was removed
+
+#### `models.Operation` was modified
+
+* `properties()` was removed
+
+#### `models.DataBoxCustomerDiskJobDetails` was modified
+
+* `validate()` was removed
+
+#### `models.DatacenterAddressInstructionResponse` was modified
+
+* `DatacenterAddressInstructionResponse()` was changed to private access
+* `validate()` was removed
+
+#### `models.KeyEncryptionKey` was modified
+
+* `validate()` was removed
+
+#### `models.GranularCopyProgress` was modified
+
+* `validate()` was removed
+
+#### `models.ValidateAddress` was modified
+
+* `validate()` was removed
+
+#### `models.DataLocationToServiceLocationMap` was modified
+
+* `DataLocationToServiceLocationMap()` was changed to private access
+* `validate()` was removed
+
+#### `models.DatacenterAddressRequest` was modified
+
+* `validate()` was removed
+
+#### `models.ReverseShippingDetails` was modified
+
+* `validate()` was removed
+
+#### `models.SubscriptionIsAllowedToCreateJobValidationResponseProperties` was modified
+
+* `SubscriptionIsAllowedToCreateJobValidationResponseProperties()` was changed to private access
+* `validate()` was removed
+
+#### `models.CreateOrderLimitForSubscriptionValidationRequest` was modified
+
+* `validate()` was removed
+
+#### `models.GranularCopyLogDetails` was modified
+
+* `validate()` was removed
+
+#### `models.Sku` was modified
+
+* `validate()` was removed
+
+#### `models.ValidationRequest` was modified
+
+* `validate()` was removed
+
+#### `models.DataBoxSecret` was modified
+
+* `DataBoxSecret()` was changed to private access
+* `validate()` was removed
+
+#### `models.DataBoxHeavySecret` was modified
+
+* `DataBoxHeavySecret()` was changed to private access
+* `validate()` was removed
+
+#### `models.DataBoxHeavyJobSecrets` was modified
+
+* `DataBoxHeavyJobSecrets()` was changed to private access
+* `validate()` was removed
+
+#### `models.TransportAvailabilityResponse` was modified
+
+* `TransportAvailabilityResponse()` was changed to private access
+* `validate()` was removed
+
+#### `models.CopyProgress` was modified
+
+* `validate()` was removed
+
+#### `models.DataBoxDiskGranularCopyLogDetails` was modified
+
+* `DataBoxDiskGranularCopyLogDetails()` was changed to private access
+* `validate()` was removed
+
+#### `models.AzureFileFilterDetails` was modified
+
+* `validate()` was removed
+
+#### `models.PreferencesValidationRequest` was modified
+
+* `validate()` was removed
+
+#### `models.UserAssignedProperties` was modified
+
+* `validate()` was removed
+
+#### `models.CopyLogDetails` was modified
+
+* `validate()` was removed
+
+### Features Added
+
+#### `models.DeviceErasureDetails` was modified
-### Other Changes
+* `secureErasureCertificateSasKey()` was added
## 1.1.0 (2025-03-27)
diff --git a/sdk/databox/azure-resourcemanager-databox/README.md b/sdk/databox/azure-resourcemanager-databox/README.md
index 1d1cc6d8b98d9..3c99eb56a4ad1 100644
--- a/sdk/databox/azure-resourcemanager-databox/README.md
+++ b/sdk/databox/azure-resourcemanager-databox/README.md
@@ -1,8 +1,8 @@
-# Azure Resource Manager DataBox client library for Java
+# Azure Resource Manager Data Box client library for Java
-Azure Resource Manager DataBox client library for Java.
+Azure Resource Manager Data Box client library for Java.
-This package contains Microsoft Azure SDK for DataBox Management SDK. Package tag package-2025-02. 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 Data Box Management SDK. Package api-version 2025-07-01. 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.1.0
+ 1.2.0
```
[//]: # ({x-version-update-end})
diff --git a/sdk/databox/azure-resourcemanager-databox/SAMPLE.md b/sdk/databox/azure-resourcemanager-databox/SAMPLE.md
index 424da235d188d..f4e20351a4e31 100644
--- a/sdk/databox/azure-resourcemanager-databox/SAMPLE.md
+++ b/sdk/databox/azure-resourcemanager-databox/SAMPLE.md
@@ -41,8 +41,7 @@ import java.time.OffsetDateTime;
*/
public final class JobsBookShipmentPickUpSamples {
/*
- * x-ms-original-file:
- * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/BookShipmentPickupPost.json
+ * x-ms-original-file: 2025-07-01/BookShipmentPickupPost.json
*/
/**
* Sample code: BookShipmentPickupPost.
@@ -70,8 +69,7 @@ import com.azure.resourcemanager.databox.models.CancellationReason;
*/
public final class JobsCancelSamples {
/*
- * x-ms-original-file:
- * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsCancelPost.json
+ * x-ms-original-file: 2025-07-01/JobsCancelPost.json
*/
/**
* Sample code: JobsCancelPost.
@@ -119,8 +117,7 @@ import java.util.Map;
*/
public final class JobsCreateSamples {
/*
- * x-ms-original-file:
- * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsCreateDevicePassword.json
+ * x-ms-original-file: 2025-07-01/JobsCreateDevicePassword.json
*/
/**
* Sample code: JobsCreateDevicePassword.
@@ -156,8 +153,7 @@ public final class JobsCreateSamples {
}
/*
- * x-ms-original-file:
- * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsCreate.json
+ * x-ms-original-file: 2025-07-01/JobsCreate.json
*/
/**
* Sample code: JobsCreate.
@@ -191,9 +187,7 @@ public final class JobsCreateSamples {
}
/*
- * x-ms-original-file:
- * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsCreateDoubleEncryption.
- * json
+ * x-ms-original-file: 2025-07-01/JobsCreateDoubleEncryption.json
*/
/**
* Sample code: JobsCreateDoubleEncryption.
@@ -229,8 +223,7 @@ public final class JobsCreateSamples {
}
/*
- * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/
- * JobsCreateWithUserAssignedIdentity.json
+ * x-ms-original-file: 2025-07-01/JobsCreateWithUserAssignedIdentity.json
*/
/**
* Sample code: JobsCreateWithUserAssignedIdentity.
@@ -268,8 +261,7 @@ public final class JobsCreateSamples {
}
/*
- * x-ms-original-file:
- * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsCreateExport.json
+ * x-ms-original-file: 2025-07-01/JobsCreateExport.json
*/
/**
* Sample code: JobsCreateExport.
@@ -330,8 +322,7 @@ public final class JobsCreateSamples {
*/
public final class JobsDeleteSamples {
/*
- * x-ms-original-file:
- * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsDelete.json
+ * x-ms-original-file: 2025-07-01/JobsDelete.json
*/
/**
* Sample code: JobsDelete.
@@ -352,8 +343,7 @@ public final class JobsDeleteSamples {
*/
public final class JobsGetByResourceGroupSamples {
/*
- * x-ms-original-file:
- * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsGet.json
+ * x-ms-original-file: 2025-07-01/JobsGet.json
*/
/**
* Sample code: JobsGet.
@@ -367,8 +357,7 @@ public final class JobsGetByResourceGroupSamples {
}
/*
- * x-ms-original-file:
- * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsGetCmk.json
+ * x-ms-original-file: 2025-07-01/JobsGetCmk.json
*/
/**
* Sample code: JobsGetCmk.
@@ -382,8 +371,7 @@ public final class JobsGetByResourceGroupSamples {
}
/*
- * x-ms-original-file:
- * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsGetExport.json
+ * x-ms-original-file: 2025-07-01/JobsGetExport.json
*/
/**
* Sample code: JobsGetExport.
@@ -397,8 +385,7 @@ public final class JobsGetByResourceGroupSamples {
}
/*
- * x-ms-original-file:
- * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsGetCopyStuck.json
+ * x-ms-original-file: 2025-07-01/JobsGetCopyStuck.json
*/
/**
* Sample code: JobsGetCopyStuck.
@@ -412,8 +399,7 @@ public final class JobsGetByResourceGroupSamples {
}
/*
- * x-ms-original-file:
- * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsGetWaitingForAction.json
+ * x-ms-original-file: 2025-07-01/JobsGetWaitingForAction.json
*/
/**
* Sample code: JobsGetWaitingForAction.
@@ -436,8 +422,7 @@ public final class JobsGetByResourceGroupSamples {
*/
public final class JobsListSamples {
/*
- * x-ms-original-file:
- * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsList.json
+ * x-ms-original-file: 2025-07-01/JobsList.json
*/
/**
* Sample code: JobsList.
@@ -458,8 +443,7 @@ public final class JobsListSamples {
*/
public final class JobsListByResourceGroupSamples {
/*
- * x-ms-original-file:
- * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsListByResourceGroup.json
+ * x-ms-original-file: 2025-07-01/JobsListByResourceGroup.json
*/
/**
* Sample code: JobsListByResourceGroup.
@@ -480,8 +464,7 @@ public final class JobsListByResourceGroupSamples {
*/
public final class JobsListCredentialsSamples {
/*
- * x-ms-original-file:
- * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsListCredentials.json
+ * x-ms-original-file: 2025-07-01/JobsListCredentials.json
*/
/**
* Sample code: JobsListCredentials.
@@ -505,8 +488,7 @@ import com.azure.resourcemanager.databox.models.PackageCarrierInfo;
*/
public final class JobsMarkDevicesShippedSamples {
/*
- * x-ms-original-file:
- * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/MarkDevicesShipped.json
+ * x-ms-original-file: 2025-07-01/MarkDevicesShipped.json
*/
/**
* Sample code: MarkDevicesShipped.
@@ -546,8 +528,7 @@ import java.util.Map;
*/
public final class JobsUpdateSamples {
/*
- * x-ms-original-file:
- * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsPatchCmk.json
+ * x-ms-original-file: 2025-07-01/JobsPatchCmk.json
*/
/**
* Sample code: JobsPatchCmk.
@@ -569,8 +550,7 @@ public final class JobsUpdateSamples {
}
/*
- * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/
- * JobsPatchSystemAssignedToUserAssigned.json
+ * x-ms-original-file: 2025-07-01/JobsPatchSystemAssignedToUserAssigned.json
*/
/**
* Sample code: JobsPatchSystemAssignedToUserAssigned.
@@ -599,8 +579,7 @@ public final class JobsUpdateSamples {
}
/*
- * x-ms-original-file:
- * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobsPatch.json
+ * x-ms-original-file: 2025-07-01/JobsPatch.json
*/
/**
* Sample code: JobsPatch.
@@ -651,8 +630,7 @@ public final class JobsUpdateSamples {
*/
public final class OperationsListSamples {
/*
- * x-ms-original-file:
- * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/OperationsGet.json
+ * x-ms-original-file: 2025-07-01/OperationsGet.json
*/
/**
* Sample code: OperationsGet.
@@ -678,8 +656,7 @@ import java.util.Map;
*/
public final class ResourceProviderMitigateSamples {
/*
- * x-ms-original-file:
- * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/JobMitigate.json
+ * x-ms-original-file: 2025-07-01/JobMitigate.json
*/
/**
* Sample code: Mitigate.
@@ -719,8 +696,7 @@ import com.azure.resourcemanager.databox.models.TransferType;
*/
public final class ServiceListAvailableSkusByResourceGroupSamples {
/*
- * x-ms-original-file:
- * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/AvailableSkusPost.json
+ * x-ms-original-file: 2025-07-01/AvailableSkusPost.json
*/
/**
* Sample code: AvailableSkusPost.
@@ -752,8 +728,7 @@ import com.azure.resourcemanager.databox.models.SkuName;
*/
public final class ServiceRegionConfigurationSamples {
/*
- * x-ms-original-file:
- * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/RegionConfiguration.json
+ * x-ms-original-file: 2025-07-01/RegionConfiguration.json
*/
/**
* Sample code: RegionConfiguration.
@@ -786,8 +761,7 @@ import com.azure.resourcemanager.databox.models.SkuName;
*/
public final class ServiceRegionConfigurationByResourceGroupSamples {
/*
- * x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/
- * RegionConfigurationByResourceGroup.json
+ * x-ms-original-file: 2025-07-01/RegionConfigurationByResourceGroup.json
*/
/**
* Sample code: RegionConfigurationByResourceGroup.
@@ -822,8 +796,7 @@ import com.azure.resourcemanager.databox.models.ValidateAddress;
*/
public final class ServiceValidateAddressSamples {
/*
- * x-ms-original-file:
- * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/ValidateAddressPost.json
+ * x-ms-original-file: 2025-07-01/ValidateAddressPost.json
*/
/**
* Sample code: ValidateAddressPost.
@@ -876,8 +849,7 @@ import java.util.Arrays;
*/
public final class ServiceValidateInputsSamples {
/*
- * x-ms-original-file:
- * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/ValidateInputs.json
+ * x-ms-original-file: 2025-07-01/ValidateInputs.json
*/
/**
* Sample code: ValidateInputs.
@@ -951,9 +923,7 @@ import java.util.Arrays;
*/
public final class ServiceValidateInputsByResourceGroupSamples {
/*
- * x-ms-original-file:
- * specification/databox/resource-manager/Microsoft.DataBox/stable/2025-02-01/examples/ValidateInputsByResourceGroup
- * .json
+ * x-ms-original-file: 2025-07-01/ValidateInputsByResourceGroup.json
*/
/**
* Sample code: ValidateInputsByResourceGroup.
diff --git a/sdk/databox/azure-resourcemanager-databox/pom.xml b/sdk/databox/azure-resourcemanager-databox/pom.xml
index 8703c36ee4d3c..9a13632d82d54 100644
--- a/sdk/databox/azure-resourcemanager-databox/pom.xml
+++ b/sdk/databox/azure-resourcemanager-databox/pom.xml
@@ -1,9 +1,9 @@
-
+
4.0.0
com.azure
@@ -14,11 +14,11 @@
com.azure.resourcemanager
azure-resourcemanager-databox
- 1.2.0-beta.1
+ 1.2.0
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-2025-02.
+ Microsoft Azure SDK for Data Box Management
+ This package contains Microsoft Azure SDK for Data Box Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package api-version 2025-07-01.
https://github.com/Azure/azure-sdk-for-java
@@ -45,7 +45,7 @@
UTF-8
0
0
- false
+ true
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 e6080d8796c37..2b3aaef321b0e 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
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.databox;
@@ -46,12 +46,12 @@
* Entry point to DataBoxManager.
*/
public final class DataBoxManager {
+ private ResourceProviders resourceProviders;
+
private Operations operations;
private Jobs jobs;
- private ResourceProviders resourceProviders;
-
private Services services;
private final DataBoxManagementClient clientObject;
@@ -67,11 +67,11 @@ private DataBoxManager(HttpPipeline httpPipeline, AzureProfile profile, Duration
}
/**
- * Creates an instance of DataBox service API entry point.
+ * Creates an instance of Data Box service API entry point.
*
* @param credential the credential to use.
* @param profile the Azure profile for client.
- * @return the DataBox service API instance.
+ * @return the Data Box service API instance.
*/
public static DataBoxManager authenticate(TokenCredential credential, AzureProfile profile) {
Objects.requireNonNull(credential, "'credential' cannot be null.");
@@ -80,11 +80,11 @@ public static DataBoxManager authenticate(TokenCredential credential, AzureProfi
}
/**
- * Creates an instance of DataBox service API entry point.
+ * Creates an instance of Data Box service API entry point.
*
* @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential.
* @param profile the Azure profile for client.
- * @return the DataBox service API instance.
+ * @return the Data Box service API instance.
*/
public static DataBoxManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) {
Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
@@ -206,11 +206,11 @@ public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
}
/**
- * Creates an instance of DataBox service API entry point.
+ * Creates an instance of Data Box service API entry point.
*
* @param credential the credential to use.
* @param profile the Azure profile for client.
- * @return the DataBox service API instance.
+ * @return the Data Box service API instance.
*/
public DataBoxManager authenticate(TokenCredential credential, AzureProfile profile) {
Objects.requireNonNull(credential, "'credential' cannot be null.");
@@ -269,6 +269,18 @@ public DataBoxManager authenticate(TokenCredential credential, AzureProfile prof
}
}
+ /**
+ * Gets the resource collection API of ResourceProviders.
+ *
+ * @return Resource collection API of ResourceProviders.
+ */
+ public ResourceProviders resourceProviders() {
+ if (this.resourceProviders == null) {
+ this.resourceProviders = new ResourceProvidersImpl(clientObject.getResourceProviders(), this);
+ }
+ return resourceProviders;
+ }
+
/**
* Gets the resource collection API of Operations.
*
@@ -293,18 +305,6 @@ public Jobs jobs() {
return jobs;
}
- /**
- * Gets the resource collection API of ResourceProviders.
- *
- * @return Resource collection API of ResourceProviders.
- */
- public ResourceProviders resourceProviders() {
- if (this.resourceProviders == null) {
- this.resourceProviders = new ResourceProvidersImpl(clientObject.getResourceProviders(), this);
- }
- return resourceProviders;
- }
-
/**
* Gets the resource collection API of Services.
*
diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/DataBoxManagementClient.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/DataBoxManagementClient.java
index f9af015c17e5c..d7199d40d0332 100644
--- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/DataBoxManagementClient.java
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/DataBoxManagementClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.databox.fluent;
@@ -12,26 +12,26 @@
*/
public interface DataBoxManagementClient {
/**
- * Gets The Subscription Id.
- *
- * @return the subscriptionId value.
- */
- String getSubscriptionId();
-
- /**
- * Gets server parameter.
+ * Gets Service host.
*
* @return the endpoint value.
*/
String getEndpoint();
/**
- * Gets Api Version.
+ * Gets Version parameter.
*
* @return the apiVersion value.
*/
String getApiVersion();
+ /**
+ * Gets The ID of the target subscription. The value must be an UUID.
+ *
+ * @return the subscriptionId value.
+ */
+ String getSubscriptionId();
+
/**
* Gets The HTTP pipeline to send requests through.
*
@@ -46,6 +46,13 @@ public interface DataBoxManagementClient {
*/
Duration getDefaultPollInterval();
+ /**
+ * Gets the ResourceProvidersClient object to access its operations.
+ *
+ * @return the ResourceProvidersClient object.
+ */
+ ResourceProvidersClient getResourceProviders();
+
/**
* Gets the OperationsClient object to access its operations.
*
@@ -60,13 +67,6 @@ public interface DataBoxManagementClient {
*/
JobsClient getJobs();
- /**
- * Gets the ResourceProvidersClient object to access its operations.
- *
- * @return the ResourceProvidersClient object.
- */
- ResourceProvidersClient getResourceProviders();
-
/**
* Gets the ServicesClient object to access its operations.
*
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 72bf8053df4c4..3fc97e3e1bff9 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
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.databox.fluent;
@@ -24,142 +24,129 @@
*/
public interface JobsClient {
/**
- * Lists all the jobs available under the subscription.
- *
- * @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 as paginated response with {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list();
-
- /**
- * Lists all the jobs available under the subscription.
- *
- * @param skipToken $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs.
- * @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 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.
+ * Gets information about the specified job.
*
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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 expand $expand is supported on details parameter for job, which provides details on the job stages.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link Response}.
+ * @return information about the specified job along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response markDevicesShippedWithResponse(String jobName, String resourceGroupName,
- MarkDevicesShippedRequest markDevicesShippedRequest, Context context);
+ Response getByResourceGroupWithResponse(String resourceGroupName, String jobName, String expand,
+ Context context);
/**
- * Request to mark devices for a given job as shipped.
+ * Gets information about the specified job.
*
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
+ * @return information about the specified job.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- void markDevicesShipped(String jobName, String resourceGroupName,
- MarkDevicesShippedRequest markDevicesShippedRequest);
+ JobResourceInner getByResourceGroup(String resourceGroupName, String jobName);
/**
- * Lists all the jobs available under the given resource group.
+ * Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead
+ * be updated with the Update job API.
*
- * @param resourceGroupName The Resource Group Name.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 jobResource Job details from request body.
* @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 as paginated response with {@link PagedIterable}.
+ * @return the {@link SyncPoller} for polling of job Resource.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByResourceGroup(String resourceGroupName);
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, JobResourceInner> beginCreate(String resourceGroupName, String jobName,
+ JobResourceInner jobResource);
/**
- * Lists all the jobs available under the given resource group.
+ * Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead
+ * be updated with the Update job API.
*
- * @param resourceGroupName The Resource Group Name.
- * @param skipToken $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 jobResource Job details from request body.
* @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 job Resource Collection as paginated response with {@link PagedIterable}.
+ * @return the {@link SyncPoller} for polling of job Resource.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByResourceGroup(String resourceGroupName, String skipToken, Context context);
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, JobResourceInner> beginCreate(String resourceGroupName, String jobName,
+ JobResourceInner jobResource, Context context);
/**
- * Gets information about the specified job.
+ * Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead
+ * be updated with the Update job API.
*
- * @param resourceGroupName The Resource Group Name.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
* 24 characters in length and use any alphanumeric and underscore only.
- * @param expand $expand is supported on details parameter for job, which provides details on the job stages.
- * @param context The context to associate with this operation.
+ * @param jobResource Job details from request body.
* @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 along with {@link Response}.
+ * @return job Resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getByResourceGroupWithResponse(String resourceGroupName, String jobName, String expand,
- Context context);
+ JobResourceInner create(String resourceGroupName, String jobName, JobResourceInner jobResource);
/**
- * Gets information about the specified job.
+ * Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead
+ * be updated with the Update job API.
*
- * @param resourceGroupName The Resource Group Name.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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 jobResource Job details from request body.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return information about the specified job.
+ * @return job Resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- JobResourceInner getByResourceGroup(String resourceGroupName, String jobName);
+ JobResourceInner create(String resourceGroupName, String jobName, JobResourceInner jobResource, Context context);
/**
- * Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead
- * be updated with the Update job API.
+ * Updates the properties of an existing job.
*
- * @param resourceGroupName The Resource Group Name.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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 jobResource Job details from request body.
+ * @param jobResourceUpdateParameter Job update parameters from request body.
* @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 SyncPoller} for polling of job Resource.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, JobResourceInner> beginCreate(String resourceGroupName, String jobName,
- JobResourceInner jobResource);
+ SyncPoller, JobResourceInner> beginUpdate(String resourceGroupName, String jobName,
+ JobResourceUpdateParameter jobResourceUpdateParameter);
/**
- * Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead
- * be updated with the Update job API.
+ * Updates the properties of an existing job.
*
- * @param resourceGroupName The Resource Group Name.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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 jobResource Job details from request body.
+ * @param jobResourceUpdateParameter Job update parameters from request body.
+ * @param ifMatch Defines the If-Match condition. The patch will be performed only if the ETag of the job on the
+ * server matches this value.
* @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.
@@ -167,33 +154,34 @@ SyncPoller, JobResourceInner> beginCreate(String re
* @return the {@link SyncPoller} for polling of job Resource.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, JobResourceInner> beginCreate(String resourceGroupName, String jobName,
- JobResourceInner jobResource, Context context);
+ SyncPoller, JobResourceInner> beginUpdate(String resourceGroupName, String jobName,
+ JobResourceUpdateParameter jobResourceUpdateParameter, String ifMatch, Context context);
/**
- * Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead
- * be updated with the Update job API.
+ * Updates the properties of an existing job.
*
- * @param resourceGroupName The Resource Group Name.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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 jobResource Job details from request body.
+ * @param jobResourceUpdateParameter Job update parameters from request body.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return job Resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- JobResourceInner create(String resourceGroupName, String jobName, JobResourceInner jobResource);
+ JobResourceInner update(String resourceGroupName, String jobName,
+ JobResourceUpdateParameter jobResourceUpdateParameter);
/**
- * Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead
- * be updated with the Update job API.
+ * Updates the properties of an existing job.
*
- * @param resourceGroupName The Resource Group Name.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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 jobResource Job details from request body.
+ * @param jobResourceUpdateParameter Job update parameters from request body.
+ * @param ifMatch Defines the If-Match condition. The patch will be performed only if the ETag of the job on the
+ * server matches this value.
* @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.
@@ -201,12 +189,13 @@ SyncPoller, JobResourceInner> beginCreate(String re
* @return job Resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- JobResourceInner create(String resourceGroupName, String jobName, JobResourceInner jobResource, Context context);
+ JobResourceInner update(String resourceGroupName, String jobName,
+ JobResourceUpdateParameter jobResourceUpdateParameter, String ifMatch, Context context);
/**
* Deletes a job.
*
- * @param resourceGroupName The Resource Group Name.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -220,7 +209,7 @@ SyncPoller, JobResourceInner> beginCreate(String re
/**
* Deletes a job.
*
- * @param resourceGroupName The Resource Group Name.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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 context The context to associate with this operation.
@@ -235,7 +224,7 @@ SyncPoller, JobResourceInner> beginCreate(String re
/**
* Deletes a job.
*
- * @param resourceGroupName The Resource Group Name.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -248,7 +237,7 @@ SyncPoller, JobResourceInner> beginCreate(String re
/**
* Deletes a job.
*
- * @param resourceGroupName The Resource Group Name.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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 context The context to associate with this operation.
@@ -260,79 +249,58 @@ SyncPoller, JobResourceInner> beginCreate(String re
void delete(String resourceGroupName, String jobName, Context context);
/**
- * Updates the properties of an existing job.
+ * Lists all the jobs available under the given resource group.
*
- * @param resourceGroupName The Resource Group Name.
- * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
- * 24 characters in length and use any alphanumeric and underscore only.
- * @param jobResourceUpdateParameter Job update parameters from request body.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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 SyncPoller} for polling of job Resource.
+ * @return job Resource Collection as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, JobResourceInner> beginUpdate(String resourceGroupName, String jobName,
- JobResourceUpdateParameter jobResourceUpdateParameter);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
/**
- * Updates the properties of an existing job.
+ * Lists all the jobs available under the given resource group.
*
- * @param resourceGroupName The Resource Group Name.
- * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
- * 24 characters in length and use any alphanumeric and underscore only.
- * @param jobResourceUpdateParameter Job update parameters from request body.
- * @param ifMatch Defines the If-Match condition. The patch will be performed only if the ETag of the job on the
- * server matches this value.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param skipToken $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs.
* @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 SyncPoller} for polling of job Resource.
+ * @return job Resource Collection as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, JobResourceInner> beginUpdate(String resourceGroupName, String jobName,
- JobResourceUpdateParameter jobResourceUpdateParameter, String ifMatch, Context context);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, String skipToken, Context context);
/**
- * Updates the properties of an existing job.
+ * Lists all the jobs available under the subscription.
*
- * @param resourceGroupName The Resource Group Name.
- * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
- * 24 characters in length and use any alphanumeric and underscore only.
- * @param jobResourceUpdateParameter Job update parameters from request body.
- * @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 job Resource Collection as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- JobResourceInner update(String resourceGroupName, String jobName,
- JobResourceUpdateParameter jobResourceUpdateParameter);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
/**
- * Updates the properties of an existing job.
+ * Lists all the jobs available under the subscription.
*
- * @param resourceGroupName The Resource Group Name.
- * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
- * 24 characters in length and use any alphanumeric and underscore only.
- * @param jobResourceUpdateParameter Job update parameters from request body.
- * @param ifMatch Defines the If-Match condition. The patch will be performed only if the ETag of the job on the
- * server matches this value.
+ * @param skipToken $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs.
* @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 job Resource.
+ * @return job Resource Collection as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- JobResourceInner update(String resourceGroupName, String jobName,
- JobResourceUpdateParameter jobResourceUpdateParameter, String ifMatch, Context context);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String skipToken, Context context);
/**
* Book shipment pick up.
*
- * @param resourceGroupName The Resource Group Name.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
* 24 characters in length and use any alphanumeric and underscore only.
* @param shipmentPickUpRequest Details of shipment pick up request.
@@ -349,7 +317,7 @@ Response bookShipmentPickUpWithResponse(String reso
/**
* Book shipment pick up.
*
- * @param resourceGroupName The Resource Group Name.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
* 24 characters in length and use any alphanumeric and underscore only.
* @param shipmentPickUpRequest Details of shipment pick up request.
@@ -365,7 +333,7 @@ ShipmentPickUpResponseInner bookShipmentPickUp(String resourceGroupName, String
/**
* CancelJob.
*
- * @param resourceGroupName The Resource Group Name.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
* 24 characters in length and use any alphanumeric and underscore only.
* @param cancellationReason Reason for cancellation.
@@ -382,7 +350,7 @@ Response cancelWithResponse(String resourceGroupName, String jobName, Canc
/**
* CancelJob.
*
- * @param resourceGroupName The Resource Group Name.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
* 24 characters in length and use any alphanumeric and underscore only.
* @param cancellationReason Reason for cancellation.
@@ -396,7 +364,7 @@ Response cancelWithResponse(String resourceGroupName, String jobName, Canc
/**
* This method gets the unencrypted secrets related to the job.
*
- * @param resourceGroupName The Resource Group Name.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -410,7 +378,7 @@ Response cancelWithResponse(String resourceGroupName, String jobName, Canc
/**
* This method gets the unencrypted secrets related to the job.
*
- * @param resourceGroupName The Resource Group Name.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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 context The context to associate with this operation.
@@ -422,4 +390,36 @@ Response cancelWithResponse(String resourceGroupName, String jobName, Canc
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listCredentials(String resourceGroupName, String jobName,
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 name of the resource group. The name is case insensitive.
+ * @param markDevicesShippedRequest Mark Devices Shipped Request.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response markDevicesShippedWithResponse(String jobName, String resourceGroupName,
+ MarkDevicesShippedRequest markDevicesShippedRequest, Context context);
+
+ /**
+ * Request to mark devices for a given job as shipped.
+ *
+ * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
+ * 24 characters in length and use any alphanumeric and underscore only.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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);
}
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 d9c826d2bfde3..ce4470f1652fb 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
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.databox.fluent;
@@ -15,23 +15,23 @@
*/
public interface OperationsClient {
/**
- * This method gets all the operations.
+ * List the operations for the provider.
*
* @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 as paginated response with {@link PagedIterable}.
+ * @return the paginated list of connected cluster API operations as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
/**
- * This method gets all the operations.
+ * List the operations for the provider.
*
* @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 operation Collection as paginated response with {@link PagedIterable}.
+ * @return the paginated list of connected cluster API operations 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 218a8eb3749c1..114407fb907cd 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
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.databox.fluent;
@@ -19,7 +19,7 @@ public interface ResourceProvidersClient {
*
* @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 resourceGroupName The name of the resource group. The name is case insensitive.
* @param mitigateJobRequest Mitigation Request.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -36,7 +36,7 @@ Response mitigateWithResponse(String jobName, String resourceGroupName, Mi
*
* @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 resourceGroupName The name of the resource group. The name is case insensitive.
* @param mitigateJobRequest Mitigation Request.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
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 e86cfe44d1c43..432c4b7468354 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
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.databox.fluent;
@@ -23,42 +23,40 @@
*/
public interface ServicesClient {
/**
- * This method provides the list of available skus for the given subscription, resource group and location.
+ * This API provides configuration details specific to given region/location at Subscription level.
*
- * @param resourceGroupName The Resource Group Name.
- * @param location The location of the resource.
- * @param availableSkuRequest Filters for showing the available skus.
+ * @param location The name of the Azure region.
+ * @param regionConfigurationRequest The request body.
+ * @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 available skus operation response as paginated response with {@link PagedIterable}.
+ * @return configuration response specific to a region along with {@link Response}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listAvailableSkusByResourceGroup(String resourceGroupName, String location,
- AvailableSkuRequest availableSkuRequest);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response regionConfigurationWithResponse(String location,
+ RegionConfigurationRequest regionConfigurationRequest, Context context);
/**
- * This method provides the list of available skus for the given subscription, resource group and location.
+ * This API provides configuration details specific to given region/location at Subscription level.
*
- * @param resourceGroupName The Resource Group Name.
- * @param location The location of the resource.
- * @param availableSkuRequest Filters for showing the available skus.
- * @param context The context to associate with this operation.
+ * @param location The name of the Azure region.
+ * @param regionConfigurationRequest The request body.
* @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 as paginated response with {@link PagedIterable}.
+ * @return configuration response specific to a region.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listAvailableSkusByResourceGroup(String resourceGroupName, String location,
- AvailableSkuRequest availableSkuRequest, Context context);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ RegionConfigurationResponseInner regionConfiguration(String location,
+ RegionConfigurationRequest regionConfigurationRequest);
/**
* [DEPRECATED NOTICE: This operation will soon be removed]. This method validates the customer shipping address and
* provide alternate addresses if any.
*
- * @param location The location of the resource.
- * @param validateAddress Shipping address of the customer.
+ * @param location The name of the Azure region.
+ * @param validateAddress The request body.
* @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.
@@ -73,8 +71,8 @@ Response validateAddressWithResponse(String locati
* [DEPRECATED NOTICE: This operation will soon be removed]. This method validates the customer shipping address and
* provide alternate addresses if any.
*
- * @param location The location of the resource.
- * @param validateAddress Shipping address of the customer.
+ * @param location The name of the Azure region.
+ * @param validateAddress The request body.
* @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.
@@ -84,11 +82,10 @@ Response validateAddressWithResponse(String locati
AddressValidationOutputInner validateAddress(String location, ValidateAddress validateAddress);
/**
- * This method does all necessary pre-job creation validation under resource group.
+ * This method does all necessary pre-job creation validation under subscription.
*
- * @param resourceGroupName The Resource Group Name.
- * @param location The location of the resource.
- * @param validationRequest Inputs of the customer.
+ * @param location The name of the Azure region.
+ * @param validationRequest The request body.
* @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.
@@ -96,57 +93,59 @@ Response validateAddressWithResponse(String locati
* @return response of pre job creation validations along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response validateInputsByResourceGroupWithResponse(String resourceGroupName,
- String location, ValidationRequest validationRequest, Context context);
+ Response validateInputsWithResponse(String location, ValidationRequest validationRequest,
+ Context context);
/**
- * This method does all necessary pre-job creation validation under resource group.
+ * This method does all necessary pre-job creation validation under subscription.
*
- * @param resourceGroupName The Resource Group Name.
- * @param location The location of the resource.
- * @param validationRequest Inputs of the customer.
+ * @param location The name of the Azure region.
+ * @param validationRequest The request body.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return response of pre job creation validations.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- ValidationResponseInner validateInputsByResourceGroup(String resourceGroupName, String location,
- ValidationRequest validationRequest);
+ ValidationResponseInner validateInputs(String location, ValidationRequest validationRequest);
/**
- * This method does all necessary pre-job creation validation under subscription.
+ * This method provides the list of available skus for the given subscription, resource group and location.
*
- * @param location The location of the resource.
- * @param validationRequest Inputs of the customer.
- * @param context The context to associate with this operation.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param location The name of the Azure region.
+ * @param availableSkuRequest Filters for showing the available skus.
* @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 along with {@link Response}.
+ * @return the available skus operation response as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response validateInputsWithResponse(String location, ValidationRequest validationRequest,
- Context context);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listAvailableSkusByResourceGroup(String resourceGroupName, String location,
+ AvailableSkuRequest availableSkuRequest);
/**
- * This method does all necessary pre-job creation validation under subscription.
+ * This method provides the list of available skus for the given subscription, resource group and location.
*
- * @param location The location of the resource.
- * @param validationRequest Inputs of the customer.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param location The name of the Azure region.
+ * @param availableSkuRequest Filters for showing the available skus.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return response of pre job creation validations.
+ * @return the available skus operation response as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- ValidationResponseInner validateInputs(String location, ValidationRequest validationRequest);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listAvailableSkusByResourceGroup(String resourceGroupName, String location,
+ AvailableSkuRequest availableSkuRequest, Context context);
/**
- * This API provides configuration details specific to given region/location at Subscription level.
+ * This API provides configuration details specific to given region/location at Resource group level.
*
- * @param location The location of the resource.
- * @param regionConfigurationRequest Request body to get the configuration for the region.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param location The name of the Azure region.
+ * @param regionConfigurationRequest Request body to get the configuration for the region at resource group level.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
@@ -154,51 +153,52 @@ Response validateInputsWithResponse(String location, Va
* @return configuration response specific to a region along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response regionConfigurationWithResponse(String location,
- RegionConfigurationRequest regionConfigurationRequest, Context context);
+ Response regionConfigurationByResourceGroupWithResponse(String resourceGroupName,
+ String location, RegionConfigurationRequest regionConfigurationRequest, Context context);
/**
- * This API provides configuration details specific to given region/location at Subscription level.
+ * This API provides configuration details specific to given region/location at Resource group level.
*
- * @param location The location of the resource.
- * @param regionConfigurationRequest Request body to get the configuration for the region.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param location The name of the Azure region.
+ * @param regionConfigurationRequest Request body to get the configuration for the region at resource group level.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return configuration response specific to a region.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- RegionConfigurationResponseInner regionConfiguration(String location,
+ RegionConfigurationResponseInner regionConfigurationByResourceGroup(String resourceGroupName, String location,
RegionConfigurationRequest regionConfigurationRequest);
/**
- * This API provides configuration details specific to given region/location at Resource group level.
+ * This method does all necessary pre-job creation validation under resource group.
*
- * @param resourceGroupName The Resource Group Name.
- * @param location The location of the resource.
- * @param regionConfigurationRequest Request body to get the configuration for the region at resource group level.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param location The name of the Azure region.
+ * @param validationRequest Inputs of the customer.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return configuration response specific to a region along with {@link Response}.
+ * @return response of pre job creation validations along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response regionConfigurationByResourceGroupWithResponse(String resourceGroupName,
- String location, RegionConfigurationRequest regionConfigurationRequest, Context context);
+ Response validateInputsByResourceGroupWithResponse(String resourceGroupName,
+ String location, ValidationRequest validationRequest, Context context);
/**
- * This API provides configuration details specific to given region/location at Resource group level.
+ * This method does all necessary pre-job creation validation under resource group.
*
- * @param resourceGroupName The Resource Group Name.
- * @param location The location of the resource.
- * @param regionConfigurationRequest Request body to get the configuration for the region at resource group level.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param location The name of the Azure region.
+ * @param validationRequest Inputs of the customer.
* @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 response of pre job creation validations.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- RegionConfigurationResponseInner regionConfigurationByResourceGroup(String resourceGroupName, String location,
- RegionConfigurationRequest regionConfigurationRequest);
+ ValidationResponseInner validateInputsByResourceGroup(String resourceGroupName, String location,
+ ValidationRequest validationRequest);
}
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 f076c75f4df13..45d9a26558f13 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
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.databox.fluent.models;
@@ -25,7 +25,7 @@ public final class AddressValidationOutputInner implements JsonSerializable tags = reader.readMap(reader1 -> reader1.getString());
@@ -451,16 +430,10 @@ public static JobResourceInner fromJson(JsonReader jsonReader) throws IOExceptio
deserializedJobResourceInner.innerProperties = JobProperties.fromJson(reader);
} else if ("sku".equals(fieldName)) {
deserializedJobResourceInner.sku = Sku.fromJson(reader);
- } else if ("name".equals(fieldName)) {
- deserializedJobResourceInner.name = reader.getString();
- } else if ("id".equals(fieldName)) {
- deserializedJobResourceInner.id = reader.getString();
- } else if ("type".equals(fieldName)) {
- deserializedJobResourceInner.type = reader.getString();
- } else if ("systemData".equals(fieldName)) {
- deserializedJobResourceInner.systemData = SystemData.fromJson(reader);
} else if ("identity".equals(fieldName)) {
deserializedJobResourceInner.identity = ResourceIdentity.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedJobResourceInner.systemData = SystemData.fromJson(reader);
} else {
reader.skipChildren();
}
diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/OperationInner.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/OperationInner.java
index 0b5359c7644a4..55d0fa85f821c 100644
--- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/OperationInner.java
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/OperationInner.java
@@ -1,10 +1,10 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.databox.fluent.models;
-import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.Immutable;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
@@ -15,7 +15,7 @@
/**
* Operation entity.
*/
-@Fluent
+@Immutable
public final class OperationInner implements JsonSerializable {
/*
* Name of the operation. Format: {resourceProviderNamespace}/{resourceType}/{read|write|delete|action}
@@ -30,7 +30,7 @@ public final class OperationInner implements JsonSerializable {
/*
* Operation properties.
*/
- private Object properties;
+ private OperationProperties innerProperties;
/*
* Origin of the operation. Can be : user|system|user,system
@@ -45,7 +45,7 @@ public final class OperationInner implements JsonSerializable {
/**
* Creates an instance of OperationInner class.
*/
- public OperationInner() {
+ private OperationInner() {
}
/**
@@ -68,12 +68,12 @@ public OperationDisplay display() {
}
/**
- * Get the properties property: Operation properties.
+ * Get the innerProperties property: Operation properties.
*
- * @return the properties value.
+ * @return the innerProperties value.
*/
- public Object properties() {
- return this.properties;
+ private OperationProperties innerProperties() {
+ return this.innerProperties;
}
/**
@@ -94,28 +94,6 @@ public Boolean isDataAction() {
return this.isDataAction;
}
- /**
- * Set the isDataAction property: Indicates whether the operation is a data action.
- *
- * @param isDataAction the isDataAction value to set.
- * @return the OperationInner object itself.
- */
- public OperationInner withIsDataAction(Boolean isDataAction) {
- this.isDataAction = isDataAction;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (display() != null) {
- display().validate();
- }
- }
-
/**
* {@inheritDoc}
*/
@@ -146,7 +124,7 @@ public static OperationInner fromJson(JsonReader jsonReader) throws IOException
} else if ("display".equals(fieldName)) {
deserializedOperationInner.display = OperationDisplay.fromJson(reader);
} else if ("properties".equals(fieldName)) {
- deserializedOperationInner.properties = reader.readUntyped();
+ deserializedOperationInner.innerProperties = OperationProperties.fromJson(reader);
} else if ("origin".equals(fieldName)) {
deserializedOperationInner.origin = reader.getString();
} else if ("isDataAction".equals(fieldName)) {
diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/OperationProperties.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/OperationProperties.java
new file mode 100644
index 0000000000000..244a06ea50a09
--- /dev/null
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/OperationProperties.java
@@ -0,0 +1,55 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.databox.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * Operation properties.
+ */
+@Immutable
+public final class OperationProperties implements JsonSerializable {
+ /**
+ * Creates an instance of OperationProperties class.
+ */
+ private OperationProperties() {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of OperationProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of OperationProperties if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IOException If an error occurs while reading the OperationProperties.
+ */
+ public static OperationProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ OperationProperties deserializedOperationProperties = new OperationProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ reader.skipChildren();
+ }
+
+ return deserializedOperationProperties;
+ });
+ }
+}
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 9edb284add90e..fc78547b16207 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
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.databox.fluent.models;
@@ -43,7 +43,7 @@ public final class RegionConfigurationResponseInner implements JsonSerializable<
/**
* Creates an instance of RegionConfigurationResponseInner class.
*/
- public RegionConfigurationResponseInner() {
+ private RegionConfigurationResponseInner() {
}
/**
@@ -82,26 +82,6 @@ public DeviceCapabilityResponse deviceCapabilityResponse() {
return this.deviceCapabilityResponse;
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (scheduleAvailabilityResponse() != null) {
- scheduleAvailabilityResponse().validate();
- }
- if (transportAvailabilityResponse() != null) {
- transportAvailabilityResponse().validate();
- }
- if (datacenterAddressResponse() != null) {
- datacenterAddressResponse().validate();
- }
- if (deviceCapabilityResponse() != null) {
- deviceCapabilityResponse().validate();
- }
- }
-
/**
* {@inheritDoc}
*/
diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/ShipmentPickUpResponseInner.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/ShipmentPickUpResponseInner.java
index 32a2dde08b5e9..26bcb42ca0a4a 100644
--- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/ShipmentPickUpResponseInner.java
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/ShipmentPickUpResponseInner.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.databox.fluent.models;
@@ -31,7 +31,7 @@ public final class ShipmentPickUpResponseInner implements JsonSerializable countriesWithinCommerceBoundary() {
return this.innerProperties() == null ? null : this.innerProperties().countriesWithinCommerceBoundary();
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (sku() != null) {
- sku().validate();
- }
- if (innerProperties() != null) {
- innerProperties().validate();
- }
- }
-
/**
* {@inheritDoc}
*/
diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/SkuProperties.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/SkuProperties.java
index 592df53f405ca..c31152727e7d1 100644
--- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/SkuProperties.java
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/SkuProperties.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.databox.fluent.models;
@@ -64,7 +64,7 @@ public final class SkuProperties implements JsonSerializable {
/**
* Creates an instance of SkuProperties class.
*/
- public SkuProperties() {
+ private SkuProperties() {
}
/**
@@ -140,23 +140,6 @@ public List countriesWithinCommerceBoundary() {
return this.countriesWithinCommerceBoundary;
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (dataLocationToServiceLocationMap() != null) {
- dataLocationToServiceLocationMap().forEach(e -> e.validate());
- }
- if (capacity() != null) {
- capacity().validate();
- }
- if (costs() != null) {
- costs().forEach(e -> e.validate());
- }
- }
-
/**
* {@inheritDoc}
*/
diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/UnencryptedCredentialsInner.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/UnencryptedCredentialsInner.java
index 37dc682217371..cd8c91aa178b8 100644
--- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/UnencryptedCredentialsInner.java
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/UnencryptedCredentialsInner.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.databox.fluent.models;
@@ -30,7 +30,7 @@ public final class UnencryptedCredentialsInner implements JsonSerializable individualResponseDetails() {
return this.innerProperties() == null ? null : this.innerProperties().individualResponseDetails();
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (innerProperties() != null) {
- innerProperties().validate();
- }
- }
-
/**
* {@inheritDoc}
*/
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
index b33db6b77f932..979d7c35ef2bb 100644
--- 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
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.databox.fluent.models;
@@ -32,7 +32,7 @@ public final class ValidationResponseProperties implements JsonSerializable 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());
- }
- }
-
/**
* {@inheritDoc}
*/
diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/package-info.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/package-info.java
index 6622e3f1dd713..947c9c7122adc 100644
--- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/package-info.java
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/package-info.java
@@ -1,9 +1,8 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
/**
- * Package containing the inner data models for DataBoxManagementClient.
- * null.
+ * Package containing the inner data models for DataBox.
*/
package com.azure.resourcemanager.databox.fluent.models;
diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/package-info.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/package-info.java
index 38f4f4d0ec620..4d895107178cb 100644
--- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/package-info.java
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/package-info.java
@@ -1,9 +1,8 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
/**
- * Package containing the service clients for DataBoxManagementClient.
- * null.
+ * Package containing the service clients for DataBox.
*/
package com.azure.resourcemanager.databox.fluent;
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 766aaeb42e348..d0ccbb17a4cf0 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
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.databox.implementation;
diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/DataBoxManagementClientBuilder.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/DataBoxManagementClientBuilder.java
index 67c2964a39c67..8a31cd4ab9cfc 100644
--- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/DataBoxManagementClientBuilder.java
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/DataBoxManagementClientBuilder.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.databox.implementation;
@@ -20,34 +20,34 @@
@ServiceClientBuilder(serviceClients = { DataBoxManagementClientImpl.class })
public final class DataBoxManagementClientBuilder {
/*
- * The Subscription Id
+ * Service host
*/
- private String subscriptionId;
+ private String endpoint;
/**
- * Sets The Subscription Id.
+ * Sets Service host.
*
- * @param subscriptionId the subscriptionId value.
+ * @param endpoint the endpoint value.
* @return the DataBoxManagementClientBuilder.
*/
- public DataBoxManagementClientBuilder subscriptionId(String subscriptionId) {
- this.subscriptionId = subscriptionId;
+ public DataBoxManagementClientBuilder endpoint(String endpoint) {
+ this.endpoint = endpoint;
return this;
}
/*
- * server parameter
+ * The ID of the target subscription. The value must be an UUID.
*/
- private String endpoint;
+ private String subscriptionId;
/**
- * Sets server parameter.
+ * Sets The ID of the target subscription. The value must be an UUID.
*
- * @param endpoint the endpoint value.
+ * @param subscriptionId the subscriptionId value.
* @return the DataBoxManagementClientBuilder.
*/
- public DataBoxManagementClientBuilder endpoint(String endpoint) {
- this.endpoint = endpoint;
+ public DataBoxManagementClientBuilder subscriptionId(String subscriptionId) {
+ this.subscriptionId = subscriptionId;
return this;
}
@@ -132,7 +132,7 @@ public DataBoxManagementClientImpl buildClient() {
? serializerAdapter
: SerializerFactory.createDefaultManagementSerializerAdapter();
DataBoxManagementClientImpl client = new DataBoxManagementClientImpl(localPipeline, localSerializerAdapter,
- localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint);
+ localDefaultPollInterval, localEnvironment, localEndpoint, this.subscriptionId);
return client;
}
}
diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/DataBoxManagementClientImpl.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/DataBoxManagementClientImpl.java
index b70c81265c4ec..375004403e2b7 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
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.databox.implementation;
@@ -15,12 +15,16 @@
import com.azure.core.management.exception.ManagementException;
import com.azure.core.management.polling.PollResult;
import com.azure.core.management.polling.PollerFactory;
+import com.azure.core.management.polling.SyncPollerFactory;
+import com.azure.core.util.BinaryData;
import com.azure.core.util.Context;
import com.azure.core.util.CoreUtils;
import com.azure.core.util.logging.ClientLogger;
import com.azure.core.util.polling.AsyncPollResponse;
import com.azure.core.util.polling.LongRunningOperationStatus;
+import com.azure.core.util.polling.PollResponse;
import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
import com.azure.core.util.serializer.SerializerAdapter;
import com.azure.core.util.serializer.SerializerEncoding;
import com.azure.resourcemanager.databox.fluent.DataBoxManagementClient;
@@ -43,26 +47,12 @@
@ServiceClient(builder = DataBoxManagementClientBuilder.class)
public final class DataBoxManagementClientImpl implements DataBoxManagementClient {
/**
- * The Subscription Id.
- */
- private final String subscriptionId;
-
- /**
- * Gets The Subscription Id.
- *
- * @return the subscriptionId value.
- */
- public String getSubscriptionId() {
- return this.subscriptionId;
- }
-
- /**
- * server parameter.
+ * Service host.
*/
private final String endpoint;
/**
- * Gets server parameter.
+ * Gets Service host.
*
* @return the endpoint value.
*/
@@ -71,12 +61,12 @@ public String getEndpoint() {
}
/**
- * Api Version.
+ * Version parameter.
*/
private final String apiVersion;
/**
- * Gets Api Version.
+ * Gets Version parameter.
*
* @return the apiVersion value.
*/
@@ -84,6 +74,20 @@ public String getApiVersion() {
return this.apiVersion;
}
+ /**
+ * The ID of the target subscription. The value must be an UUID.
+ */
+ private final String subscriptionId;
+
+ /**
+ * Gets The ID of the target subscription. The value must be an UUID.
+ *
+ * @return the subscriptionId value.
+ */
+ public String getSubscriptionId() {
+ return this.subscriptionId;
+ }
+
/**
* The HTTP pipeline to send requests through.
*/
@@ -126,6 +130,20 @@ public Duration getDefaultPollInterval() {
return this.defaultPollInterval;
}
+ /**
+ * The ResourceProvidersClient object to access its operations.
+ */
+ private final ResourceProvidersClient resourceProviders;
+
+ /**
+ * Gets the ResourceProvidersClient object to access its operations.
+ *
+ * @return the ResourceProvidersClient object.
+ */
+ public ResourceProvidersClient getResourceProviders() {
+ return this.resourceProviders;
+ }
+
/**
* The OperationsClient object to access its operations.
*/
@@ -154,20 +172,6 @@ public JobsClient getJobs() {
return this.jobs;
}
- /**
- * The ResourceProvidersClient object to access its operations.
- */
- private final ResourceProvidersClient resourceProviders;
-
- /**
- * Gets the ResourceProvidersClient object to access its operations.
- *
- * @return the ResourceProvidersClient object.
- */
- public ResourceProvidersClient getResourceProviders() {
- return this.resourceProviders;
- }
-
/**
* The ServicesClient object to access its operations.
*/
@@ -189,20 +193,20 @@ public ServicesClient getServices() {
* @param serializerAdapter The serializer to serialize an object into a string.
* @param defaultPollInterval The default poll interval for long-running operation.
* @param environment The Azure environment.
- * @param subscriptionId The Subscription Id.
- * @param endpoint server parameter.
+ * @param endpoint Service host.
+ * @param subscriptionId The ID of the target subscription. The value must be an UUID.
*/
DataBoxManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter,
- Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) {
+ Duration defaultPollInterval, AzureEnvironment environment, String endpoint, String subscriptionId) {
this.httpPipeline = httpPipeline;
this.serializerAdapter = serializerAdapter;
this.defaultPollInterval = defaultPollInterval;
- this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
- this.apiVersion = "2025-02-01";
+ this.subscriptionId = subscriptionId;
+ this.apiVersion = "2025-07-01";
+ this.resourceProviders = new ResourceProvidersClientImpl(this);
this.operations = new OperationsClientImpl(this);
this.jobs = new JobsClientImpl(this);
- this.resourceProviders = new ResourceProvidersClientImpl(this);
this.services = new ServicesClientImpl(this);
}
@@ -243,6 +247,41 @@ public PollerFlux, U> getLroResult(Mono type of poll result.
+ * @param type of final result.
+ * @return SyncPoller for poll result and final result.
+ */
+ public SyncPoller, U> getLroResult(Response activationResponse,
+ Type pollResultType, Type finalResultType, Context context) {
+ return SyncPollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType,
+ defaultPollInterval, () -> activationResponse, context);
+ }
+
+ /**
+ * Waits for completion and gets the final result, or throws an error.
+ *
+ * @param poller the synchronous poller.
+ * @param type of poll result.
+ * @param type of final result.
+ * @return the final result.
+ * @throws ManagementException if the long running operation fails.
+ */
+ public U getLroFinalResultOrError(SyncPoller, U> poller) {
+ PollResponse> response = poller.waitForCompletion();
+ ManagementException exception = getLroException(response.getStatus(), response.getValue());
+ if (exception != null) {
+ throw exception;
+ }
+ return poller.getFinalResult();
+ }
+
/**
* Gets the final result, or an error, based on last async poll response.
*
@@ -252,17 +291,25 @@ public PollerFlux, U> getLroResult(Mono Mono getLroFinalResultOrError(AsyncPollResponse, U> response) {
- if (response.getStatus() != LongRunningOperationStatus.SUCCESSFULLY_COMPLETED) {
+ ManagementException exception = getLroException(response.getStatus(), response.getValue());
+ if (exception != null) {
+ return Mono.error(exception);
+ }
+ return response.getFinalResult();
+ }
+
+ private ManagementException getLroException(LongRunningOperationStatus status, PollResult> result) {
+ PollResult.Error lroError = result == null ? null : result.getError();
+ if (status != LongRunningOperationStatus.SUCCESSFULLY_COMPLETED || lroError != null) {
String errorMessage;
ManagementError managementError = null;
HttpResponse errorResponse = null;
- PollResult.Error lroError = response.getValue().getError();
if (lroError != null) {
errorResponse = new HttpResponseImpl(lroError.getResponseStatusCode(), lroError.getResponseHeaders(),
lroError.getResponseBody());
- errorMessage = response.getValue().getError().getMessage();
- String errorBody = response.getValue().getError().getResponseBody();
+ errorMessage = lroError.getMessage();
+ String errorBody = lroError.getResponseBody();
if (errorBody != null) {
// try to deserialize error body to ManagementError
try {
@@ -281,12 +328,11 @@ public Mono getLroFinalResultOrError(AsyncPollResponse,
}
if (managementError == null) {
// fallback to default ManagementError
- managementError = new ManagementError(response.getStatus().toString(), errorMessage);
+ managementError = new ManagementError(status.toString(), errorMessage);
}
- return Mono.error(new ManagementException(errorMessage, errorResponse, managementError));
- } else {
- return response.getFinalResult();
+ return new ManagementException(errorMessage, errorResponse, managementError);
}
+ return null;
}
private static final class HttpResponseImpl extends HttpResponse {
@@ -300,7 +346,7 @@ private static final class HttpResponseImpl extends HttpResponse {
super(null);
this.statusCode = statusCode;
this.httpHeaders = httpHeaders;
- this.responseBody = responseBody == null ? null : responseBody.getBytes(StandardCharsets.UTF_8);
+ this.responseBody = responseBody == null ? new byte[0] : responseBody.getBytes(StandardCharsets.UTF_8);
}
public int getStatusCode() {
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 d9380a12c5eb4..095b10de2a1f9 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
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.databox.implementation;
@@ -37,6 +37,18 @@ public final class JobResourceImpl implements JobResource, JobResource.Definitio
private final com.azure.resourcemanager.databox.DataBoxManager serviceManager;
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
public String location() {
return this.innerModel().location();
}
@@ -50,22 +62,6 @@ public Map tags() {
}
}
- public String name() {
- return this.innerModel().name();
- }
-
- public String id() {
- return this.innerModel().id();
- }
-
- public String type() {
- return this.innerModel().type();
- }
-
- public SystemData systemData() {
- return this.innerModel().systemData();
- }
-
public Sku sku() {
return this.innerModel().sku();
}
@@ -74,6 +70,10 @@ public ResourceIdentity identity() {
return this.innerModel().identity();
}
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
public TransferType transferType() {
return this.innerModel().transferType();
}
@@ -176,10 +176,7 @@ public JobResourceImpl withExistingResourceGroup(String resourceGroupName) {
}
public JobResource create() {
- this.innerObject = serviceManager.serviceClient()
- .getJobs()
- .create(resourceGroupName, jobName, this.innerModel(), Context.NONE);
- return this;
+ return this.create(Context.NONE);
}
public JobResource create(Context context) {
@@ -201,10 +198,7 @@ public JobResourceImpl update() {
}
public JobResource apply() {
- this.innerObject = serviceManager.serviceClient()
- .getJobs()
- .update(resourceGroupName, jobName, updateJobResourceUpdateParameter, updateIfMatch, Context.NONE);
- return this;
+ return this.apply(Context.NONE);
}
public JobResource apply(Context context) {
@@ -217,17 +211,16 @@ public JobResource apply(Context context) {
JobResourceImpl(JobResourceInner innerObject, com.azure.resourcemanager.databox.DataBoxManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
- this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups");
- this.jobName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "jobs");
+ this.resourceGroupName = ResourceManagerUtils.getValueFromIdByParameterName(innerObject.id(),
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}",
+ "resourceGroupName");
+ this.jobName = ResourceManagerUtils.getValueFromIdByParameterName(innerObject.id(),
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}",
+ "jobName");
}
public JobResource refresh() {
- String localExpand = null;
- this.innerObject = serviceManager.serviceClient()
- .getJobs()
- .getByResourceGroupWithResponse(resourceGroupName, jobName, localExpand, Context.NONE)
- .getValue();
- return this;
+ return this.refresh(Context.NONE);
}
public JobResource refresh(Context context) {
@@ -239,16 +232,6 @@ public JobResource refresh(Context context) {
return this;
}
- public Response markDevicesShippedWithResponse(MarkDevicesShippedRequest markDevicesShippedRequest,
- Context context) {
- return serviceManager.jobs()
- .markDevicesShippedWithResponse(jobName, resourceGroupName, markDevicesShippedRequest, context);
- }
-
- public void markDevicesShipped(MarkDevicesShippedRequest markDevicesShippedRequest) {
- serviceManager.jobs().markDevicesShipped(jobName, resourceGroupName, markDevicesShippedRequest);
- }
-
public Response bookShipmentPickUpWithResponse(ShipmentPickUpRequest shipmentPickUpRequest,
Context context) {
return serviceManager.jobs()
@@ -275,6 +258,16 @@ public PagedIterable listCredentials(Context context) {
return serviceManager.jobs().listCredentials(resourceGroupName, jobName, context);
}
+ public Response markDevicesShippedWithResponse(MarkDevicesShippedRequest markDevicesShippedRequest,
+ Context context) {
+ return serviceManager.jobs()
+ .markDevicesShippedWithResponse(jobName, resourceGroupName, markDevicesShippedRequest, context);
+ }
+
+ public void markDevicesShipped(MarkDevicesShippedRequest markDevicesShippedRequest) {
+ serviceManager.jobs().markDevicesShipped(jobName, resourceGroupName, markDevicesShippedRequest);
+ }
+
public JobResourceImpl withRegion(Region location) {
this.innerModel().withLocation(location.toString());
return this;
@@ -341,6 +334,6 @@ public JobResourceImpl withIfMatch(String ifMatch) {
}
private boolean isInCreateMode() {
- return this.innerModel().id() == null;
+ return this.innerModel() == null || this.innerModel().id() == null;
}
}
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 d3a0be22c9cbc..911f710b6699f 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
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.databox.implementation;
@@ -29,6 +29,7 @@
import com.azure.core.http.rest.RestProxy;
import com.azure.core.management.exception.ManagementException;
import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.BinaryData;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
import com.azure.core.util.polling.PollerFlux;
@@ -37,12 +38,12 @@
import com.azure.resourcemanager.databox.fluent.models.JobResourceInner;
import com.azure.resourcemanager.databox.fluent.models.ShipmentPickUpResponseInner;
import com.azure.resourcemanager.databox.fluent.models.UnencryptedCredentialsInner;
+import com.azure.resourcemanager.databox.implementation.models.JobResourceList;
+import com.azure.resourcemanager.databox.implementation.models.UnencryptedCredentialsList;
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;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
@@ -75,592 +76,247 @@ public final class JobsClientImpl implements JobsClient {
* The interface defining all the services for DataBoxManagementClientJobs to be used by the proxy service to
* perform REST calls.
*/
- @Host("{$host}")
- @ServiceInterface(name = "DataBoxManagementCli")
+ @Host("{endpoint}")
+ @ServiceInterface(name = "DataBoxManagementClientJobs")
public interface JobsService {
@Headers({ "Content-Type: application/json" })
- @Get("/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/jobs")
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> list(@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion,
- @QueryParam("$skipToken") String skipToken, @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);
+ Mono> getByResourceGroup(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("jobName") String jobName,
+ @QueryParam("$expand") String expand, @HeaderParam("Accept") String accept, Context context);
@Headers({ "Content-Type: application/json" })
- @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs")
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> listByResourceGroup(@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
- @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion,
- @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context);
+ Response getByResourceGroupSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("jobName") String jobName,
+ @QueryParam("$expand") String expand, @HeaderParam("Accept") String accept, Context context);
- @Headers({ "Content-Type: application/json" })
- @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}")
- @ExpectedResponses({ 200 })
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}")
+ @ExpectedResponses({ 200, 202 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> getByResourceGroup(@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
+ Mono>> create(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName, @PathParam("jobName") String jobName,
- @QueryParam("api-version") String apiVersion, @QueryParam("$expand") String expand,
- @HeaderParam("Accept") String accept, Context context);
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") JobResourceInner jobResource, Context context);
- @Headers({ "Content-Type: application/json" })
@Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}")
@ExpectedResponses({ 200, 202 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono>> create(@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
+ Response createSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName, @PathParam("jobName") String jobName,
- @QueryParam("api-version") String apiVersion, @BodyParam("application/json") JobResourceInner jobResource,
- @HeaderParam("Accept") String accept, Context context);
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") JobResourceInner jobResource, Context context);
- @Headers({ "Content-Type: application/json" })
- @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}")
- @ExpectedResponses({ 200, 202, 204 })
+ @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}")
+ @ExpectedResponses({ 200, 202 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono>> delete(@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
+ Mono>> update(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName, @PathParam("jobName") String jobName,
- @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
+ @HeaderParam("If-Match") String ifMatch, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") JobResourceUpdateParameter jobResourceUpdateParameter, Context context);
- @Headers({ "Content-Type: application/json" })
@Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}")
@ExpectedResponses({ 200, 202 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono>> update(@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
+ Response updateSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("jobName") String jobName,
+ @HeaderParam("If-Match") String ifMatch, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") JobResourceUpdateParameter jobResourceUpdateParameter, Context context);
+
+ @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}")
+ @ExpectedResponses({ 200, 202, 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("jobName") String jobName,
+ Context context);
+
+ @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}")
+ @ExpectedResponses({ 200, 202, 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response deleteSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName, @PathParam("jobName") String jobName,
- @QueryParam("api-version") String apiVersion, @HeaderParam("If-Match") String ifMatch,
- @BodyParam("application/json") JobResourceUpdateParameter jobResourceUpdateParameter,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroup(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$skipToken") String skipToken,
@HeaderParam("Accept") String accept, Context context);
@Headers({ "Content-Type: application/json" })
- @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/bookShipmentPickUp")
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> bookShipmentPickUp(@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
- @PathParam("resourceGroupName") String resourceGroupName, @PathParam("jobName") String jobName,
- @QueryParam("api-version") String apiVersion,
- @BodyParam("application/json") ShipmentPickUpRequest shipmentPickUpRequest,
+ Response listByResourceGroupSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$skipToken") String skipToken,
@HeaderParam("Accept") String accept, Context context);
@Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/jobs")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/jobs")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("$skipToken") String skipToken, @HeaderParam("Accept") String accept, Context context);
+
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/bookShipmentPickUp")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> bookShipmentPickUp(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("jobName") String jobName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") ShipmentPickUpRequest shipmentPickUpRequest, Context context);
+
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/bookShipmentPickUp")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response bookShipmentPickUpSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("jobName") String jobName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") ShipmentPickUpRequest shipmentPickUpRequest, Context context);
+
+ @Headers({ "Accept: application/json;q=0.9" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/cancel")
+ @ExpectedResponses({ 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> cancel(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("jobName") String jobName,
+ @HeaderParam("Content-Type") String contentType,
+ @BodyParam("application/json") CancellationReason cancellationReason, Context context);
+
+ @Headers({ "Accept: application/json;q=0.9" })
@Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/cancel")
@ExpectedResponses({ 204 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> cancel(@HostParam("$host") String endpoint,
+ Response cancelSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion,
@PathParam("subscriptionId") String subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName, @PathParam("jobName") String jobName,
- @QueryParam("api-version") String apiVersion,
- @BodyParam("application/json") CancellationReason cancellationReason, @HeaderParam("Accept") String accept,
- Context context);
+ @HeaderParam("Content-Type") String contentType,
+ @BodyParam("application/json") CancellationReason cancellationReason, Context context);
@Headers({ "Content-Type: application/json" })
@Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/listCredentials")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> listCredentials(@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
+ Mono> listCredentials(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName, @PathParam("jobName") String jobName,
- @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
+ @HeaderParam("Accept") String accept, Context context);
@Headers({ "Content-Type: application/json" })
- @Get("{nextLink}")
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/listCredentials")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink,
- @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context);
+ Response listCredentialsSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("jobName") String jobName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Accept: application/json;q=0.9" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/markDevicesShipped")
+ @ExpectedResponses({ 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> markDevicesShipped(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("jobName") String jobName,
+ @HeaderParam("Content-Type") String contentType,
+ @BodyParam("application/json") MarkDevicesShippedRequest markDevicesShippedRequest, Context context);
+
+ @Headers({ "Accept: application/json;q=0.9" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/markDevicesShipped")
+ @ExpectedResponses({ 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response markDevicesShippedSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("jobName") String jobName,
+ @HeaderParam("Content-Type") String contentType,
+ @BodyParam("application/json") MarkDevicesShippedRequest markDevicesShippedRequest, Context context);
@Headers({ "Content-Type: application/json" })
@Get("{nextLink}")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> listByResourceGroupNext(
- @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
@HeaderParam("Accept") String accept, Context context);
- }
-
- /**
- * Lists all the jobs available under the subscription.
- *
- * @param skipToken $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs.
- * @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 along with {@link PagedResponse} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listSinglePageAsync(String skipToken) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() 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."));
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(),
- this.client.getApiVersion(), skipToken, accept, context))
- .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
- res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Lists all the jobs available under the subscription.
- *
- * @param skipToken $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs.
- * @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 job Resource Collection along with {@link PagedResponse} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listSinglePageAsync(String skipToken, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() 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."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service
- .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), skipToken,
- accept, context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().value(), res.getValue().nextLink(), null));
- }
-
- /**
- * Lists all the jobs available under the subscription.
- *
- * @param skipToken $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs.
- * @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 as paginated response with {@link PagedFlux}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync(String skipToken) {
- return new PagedFlux<>(() -> listSinglePageAsync(skipToken), nextLink -> listNextSinglePageAsync(nextLink));
- }
-
- /**
- * Lists all the jobs available under the subscription.
- *
- * @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 as paginated response with {@link PagedFlux}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync() {
- final String skipToken = null;
- return new PagedFlux<>(() -> listSinglePageAsync(skipToken), nextLink -> listNextSinglePageAsync(nextLink));
- }
-
- /**
- * Lists all the jobs available under the subscription.
- *
- * @param skipToken $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs.
- * @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 job Resource Collection as paginated response with {@link PagedFlux}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync(String skipToken, Context context) {
- return new PagedFlux<>(() -> listSinglePageAsync(skipToken, context),
- nextLink -> listNextSinglePageAsync(nextLink, context));
- }
-
- /**
- * Lists all the jobs available under the subscription.
- *
- * @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 as paginated response with {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable list() {
- final String skipToken = null;
- return new PagedIterable<>(listAsync(skipToken));
- }
-
- /**
- * Lists all the jobs available under the subscription.
- *
- * @param skipToken $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs.
- * @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 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(ignored -> Mono.empty());
- }
-
- /**
- * Request to mark devices for a given job as shipped.
- *
- * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
- * 24 characters in length and use any alphanumeric and underscore only.
- * @param resourceGroupName The Resource Group Name.
- * @param markDevicesShippedRequest Mark Devices Shipped Request.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Response markDevicesShippedWithResponse(String jobName, String resourceGroupName,
- MarkDevicesShippedRequest markDevicesShippedRequest, Context context) {
- return markDevicesShippedWithResponseAsync(jobName, resourceGroupName, markDevicesShippedRequest, context)
- .block();
- }
-
- /**
- * Request to mark devices for a given job as shipped.
- *
- * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
- * 24 characters in length and use any alphanumeric and underscore only.
- * @param resourceGroupName The Resource Group Name.
- * @param markDevicesShippedRequest Mark Devices Shipped Request.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public void markDevicesShipped(String jobName, String resourceGroupName,
- MarkDevicesShippedRequest markDevicesShippedRequest) {
- markDevicesShippedWithResponse(jobName, resourceGroupName, markDevicesShippedRequest, Context.NONE);
- }
-
- /**
- * Lists all the jobs available under the given resource group.
- *
- * @param resourceGroupName The Resource Group Name.
- * @param skipToken $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs.
- * @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 along with {@link PagedResponse} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName,
- String skipToken) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() 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."));
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(
- context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(),
- resourceGroupName, this.client.getApiVersion(), skipToken, accept, context))
- .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
- res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Lists all the jobs available under the given resource group.
- *
- * @param resourceGroupName The Resource Group Name.
- * @param skipToken $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs.
- * @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 job Resource Collection along with {@link PagedResponse} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName,
- String skipToken, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() 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."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service
- .listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
- this.client.getApiVersion(), skipToken, accept, context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().value(), res.getValue().nextLink(), null));
- }
-
- /**
- * Lists all the jobs available under the given resource group.
- *
- * @param resourceGroupName The Resource Group Name.
- * @param skipToken $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs.
- * @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 as paginated response with {@link PagedFlux}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listByResourceGroupAsync(String resourceGroupName, String skipToken) {
- return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, skipToken),
- nextLink -> listByResourceGroupNextSinglePageAsync(nextLink));
- }
- /**
- * Lists all the jobs available under the given resource group.
- *
- * @param resourceGroupName The Resource Group Name.
- * @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 as paginated response with {@link PagedFlux}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
- final String skipToken = null;
- return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, skipToken),
- nextLink -> listByResourceGroupNextSinglePageAsync(nextLink));
- }
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listByResourceGroupNextSync(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
- /**
- * Lists all the jobs available under the given resource group.
- *
- * @param resourceGroupName The Resource Group Name.
- * @param skipToken $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs.
- * @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 job Resource Collection as paginated response with {@link PagedFlux}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listByResourceGroupAsync(String resourceGroupName, String skipToken,
- Context context) {
- return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, skipToken, context),
- nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context));
- }
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context);
- /**
- * Lists all the jobs available under the given resource group.
- *
- * @param resourceGroupName The Resource Group Name.
- * @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 as paginated response with {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable listByResourceGroup(String resourceGroupName) {
- final String skipToken = null;
- return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, skipToken));
- }
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context);
- /**
- * Lists all the jobs available under the given resource group.
- *
- * @param resourceGroupName The Resource Group Name.
- * @param skipToken $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs.
- * @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 job Resource Collection as paginated response with {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable listByResourceGroup(String resourceGroupName, String skipToken,
- Context context) {
- return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, skipToken, context));
- }
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listCredentialsNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
- /**
- * Gets information about the specified job.
- *
- * @param resourceGroupName The Resource Group Name.
- * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
- * 24 characters in length and use any alphanumeric and underscore only.
- * @param expand $expand is supported on details parameter for job, which provides details on the job stages.
- * @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 along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName,
- String jobName, String expand) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() 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 (jobName == null) {
- return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null."));
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(
- context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(),
- resourceGroupName, jobName, this.client.getApiVersion(), expand, accept, context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listCredentialsNextSync(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
}
/**
* Gets information about the specified job.
*
- * @param resourceGroupName The Resource Group Name.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
* 24 characters in length and use any alphanumeric and underscore only.
* @param expand $expand is supported on details parameter for job, which provides details on the job stages.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -668,32 +324,18 @@ private Mono> getByResourceGroupWithResponseAsync(Str
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName,
- String jobName, String expand, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() 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 (jobName == null) {
- return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null."));
- }
+ String jobName, String expand) {
final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
- jobName, this.client.getApiVersion(), expand, accept, context);
+ return FluxUtil
+ .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, jobName, expand, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
* Gets information about the specified job.
*
- * @param resourceGroupName The Resource Group Name.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -708,36 +350,16 @@ private Mono getByResourceGroupAsync(String resourceGroupName,
.flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
- /**
- * Gets information about the specified job.
- *
- * @param resourceGroupName The Resource Group Name.
- * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
- * 24 characters in length and use any alphanumeric and underscore only.
- * @param expand $expand is supported on details parameter for job, which provides details on the job stages.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws 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 along with {@link Response}.
- */
+ @Override
@ServiceMethod(returns = ReturnType.SINGLE)
public Response getByResourceGroupWithResponse(String resourceGroupName, String jobName,
String expand, Context context) {
- return getByResourceGroupWithResponseAsync(resourceGroupName, jobName, expand, context).block();
+ final String accept = "application/json";
+ return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, jobName, expand, accept, context);
}
- /**
- * Gets information about the specified job.
- *
- * @param resourceGroupName The Resource Group Name.
- * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
- * 24 characters in length and use any alphanumeric and underscore only.
- * @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.
- */
+ @Override
@ServiceMethod(returns = ReturnType.SINGLE)
public JobResourceInner getByResourceGroup(String resourceGroupName, String jobName) {
final String expand = null;
@@ -748,7 +370,7 @@ public JobResourceInner getByResourceGroup(String resourceGroupName, String jobN
* Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead
* be updated with the Update job API.
*
- * @param resourceGroupName The Resource Group Name.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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 jobResource Job details from request body.
@@ -760,30 +382,11 @@ public JobResourceInner getByResourceGroup(String resourceGroupName, String jobN
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> createWithResponseAsync(String resourceGroupName, String jobName,
JobResourceInner jobResource) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() 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 (jobName == null) {
- return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null."));
- }
- if (jobResource == null) {
- return Mono.error(new IllegalArgumentException("Parameter jobResource is required and cannot be null."));
- } else {
- jobResource.validate();
- }
+ final String contentType = "application/json";
final String accept = "application/json";
return FluxUtil
- .withContext(context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(),
- resourceGroupName, jobName, this.client.getApiVersion(), jobResource, accept, context))
+ .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, jobName, contentType, accept, jobResource, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
@@ -791,75 +394,52 @@ private Mono>> createWithResponseAsync(String resource
* Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead
* be updated with the Update job API.
*
- * @param resourceGroupName The Resource Group Name.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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 jobResource Job details from request body.
- * @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 job Resource along with {@link Response} on successful completion of {@link Mono}.
+ * @return job Resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> createWithResponseAsync(String resourceGroupName, String jobName,
- JobResourceInner jobResource, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() 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 (jobName == null) {
- return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null."));
- }
- if (jobResource == null) {
- return Mono.error(new IllegalArgumentException("Parameter jobResource is required and cannot be null."));
- } else {
- jobResource.validate();
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, jobName,
- this.client.getApiVersion(), jobResource, accept, context);
+ private Response createWithResponse(String resourceGroupName, String jobName,
+ JobResourceInner jobResource) {
+ return createWithResponse(resourceGroupName, jobName, jobResource, Context.NONE);
}
/**
* Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead
* be updated with the Update job API.
*
- * @param resourceGroupName The Resource Group Name.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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 jobResource Job details from request body.
+ * @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 PollerFlux} for polling of job Resource.
+ * @return job Resource along with {@link Response}.
*/
- @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, this.client.getContext());
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response createWithResponse(String resourceGroupName, String jobName,
+ JobResourceInner jobResource, Context context) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, jobName, contentType, accept, jobResource, context);
}
/**
* Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead
* be updated with the Update job API.
*
- * @param resourceGroupName The Resource Group Name.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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 jobResource Job details from request body.
- * @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.
@@ -867,58 +447,33 @@ private PollerFlux, JobResourceInner> beginCreateAs
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, JobResourceInner> beginCreateAsync(String resourceGroupName,
- String jobName, JobResourceInner jobResource, Context context) {
- context = this.client.mergeContext(context);
- Mono>> mono
- = createWithResponseAsync(resourceGroupName, jobName, jobResource, context);
+ String jobName, JobResourceInner jobResource) {
+ Mono>> mono = createWithResponseAsync(resourceGroupName, jobName, jobResource);
return this.client.getLroResult(mono, this.client.getHttpPipeline(),
- JobResourceInner.class, JobResourceInner.class, context);
+ JobResourceInner.class, JobResourceInner.class, this.client.getContext());
}
- /**
- * Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead
- * be updated with the Update job API.
- *
- * @param resourceGroupName The Resource Group Name.
- * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
- * 24 characters in length and use any alphanumeric and underscore only.
- * @param jobResource Job details from request body.
- * @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 SyncPoller} for polling of job Resource.
- */
+ @Override
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, JobResourceInner> beginCreate(String resourceGroupName,
String jobName, JobResourceInner jobResource) {
- return this.beginCreateAsync(resourceGroupName, jobName, jobResource).getSyncPoller();
+ return beginCreate(resourceGroupName, jobName, jobResource, Context.NONE);
}
- /**
- * Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead
- * be updated with the Update job API.
- *
- * @param resourceGroupName The Resource Group Name.
- * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
- * 24 characters in length and use any alphanumeric and underscore only.
- * @param jobResource Job details from request body.
- * @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 SyncPoller} for polling of job Resource.
- */
+ @Override
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, JobResourceInner> beginCreate(String resourceGroupName,
String jobName, JobResourceInner jobResource, Context context) {
- return this.beginCreateAsync(resourceGroupName, jobName, jobResource, context).getSyncPoller();
+ Response response = createWithResponse(resourceGroupName, jobName, jobResource, context);
+ return this.client.getLroResult(response, JobResourceInner.class,
+ JobResourceInner.class, context);
}
/**
* Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead
* be updated with the Update job API.
*
- * @param resourceGroupName The Resource Group Name.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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 jobResource Job details from request body.
@@ -933,277 +488,49 @@ private Mono createAsync(String resourceGroupName, String jobN
.flatMap(this.client::getLroFinalResultOrError);
}
- /**
- * Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead
- * be updated with the Update job API.
- *
- * @param resourceGroupName The Resource Group Name.
- * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
- * 24 characters in length and use any alphanumeric and underscore only.
- * @param jobResource Job details from request body.
- * @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 job Resource on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono createAsync(String resourceGroupName, String jobName, JobResourceInner jobResource,
- Context context) {
- return beginCreateAsync(resourceGroupName, jobName, jobResource, context).last()
- .flatMap(this.client::getLroFinalResultOrError);
- }
-
- /**
- * Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead
- * be updated with the Update job API.
- *
- * @param resourceGroupName The Resource Group Name.
- * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
- * 24 characters in length and use any alphanumeric and underscore only.
- * @param jobResource Job details from request body.
- * @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.
- */
+ @Override
@ServiceMethod(returns = ReturnType.SINGLE)
public JobResourceInner create(String resourceGroupName, String jobName, JobResourceInner jobResource) {
- return createAsync(resourceGroupName, jobName, jobResource).block();
+ return create(resourceGroupName, jobName, jobResource, Context.NONE);
}
- /**
- * Creates a new job with the specified parameters. Existing job cannot be updated with this API and should instead
- * be updated with the Update job API.
- *
- * @param resourceGroupName The Resource Group Name.
- * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
- * 24 characters in length and use any alphanumeric and underscore only.
- * @param jobResource Job details from request body.
- * @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 job Resource.
- */
+ @Override
@ServiceMethod(returns = ReturnType.SINGLE)
public JobResourceInner create(String resourceGroupName, String jobName, JobResourceInner jobResource,
Context context) {
- return createAsync(resourceGroupName, jobName, jobResource, context).block();
- }
-
- /**
- * Deletes a job.
- *
- * @param resourceGroupName The Resource Group Name.
- * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
- * 24 characters in length and use any alphanumeric and underscore only.
- * @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>> deleteWithResponseAsync(String resourceGroupName, String jobName) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() 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 (jobName == null) {
- return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null."));
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(),
- resourceGroupName, jobName, this.client.getApiVersion(), accept, context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Deletes a job.
- *
- * @param resourceGroupName The Resource Group Name.
- * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
- * 24 characters in length and use any alphanumeric and underscore only.
- * @param 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>> deleteWithResponseAsync(String resourceGroupName, String jobName,
- Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() 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 (jobName == null) {
- return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, jobName,
- this.client.getApiVersion(), accept, context);
- }
-
- /**
- * Deletes a job.
- *
- * @param resourceGroupName The Resource Group Name.
- * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
- * 24 characters in length and use any alphanumeric and underscore only.
- * @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 PollerFlux} for polling of long-running operation.
- */
- @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,
- this.client.getContext());
- }
-
- /**
- * Deletes a job.
- *
- * @param resourceGroupName The Resource Group Name.
- * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
- * 24 characters in length and use any alphanumeric and underscore only.
- * @param 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 PollerFlux} for polling of long-running operation.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String jobName,
- Context context) {
- context = this.client.mergeContext(context);
- Mono>> mono = deleteWithResponseAsync(resourceGroupName, jobName, context);
- return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
- context);
- }
-
- /**
- * Deletes a job.
- *
- * @param resourceGroupName The Resource Group Name.
- * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
- * 24 characters in length and use any alphanumeric and underscore only.
- * @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 SyncPoller} for polling of long-running operation.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, Void> beginDelete(String resourceGroupName, String jobName) {
- return this.beginDeleteAsync(resourceGroupName, jobName).getSyncPoller();
- }
-
- /**
- * Deletes a job.
- *
- * @param resourceGroupName The Resource Group Name.
- * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
- * 24 characters in length and use any alphanumeric and underscore only.
- * @param 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 SyncPoller} for polling of long-running operation.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, Void> beginDelete(String resourceGroupName, String jobName, Context context) {
- return this.beginDeleteAsync(resourceGroupName, jobName, context).getSyncPoller();
- }
-
- /**
- * Deletes a job.
- *
- * @param resourceGroupName The Resource Group Name.
- * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
- * 24 characters in length and use any alphanumeric and underscore only.
- * @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 deleteAsync(String resourceGroupName, String jobName) {
- return beginDeleteAsync(resourceGroupName, jobName).last().flatMap(this.client::getLroFinalResultOrError);
+ return this.client.getLroFinalResultOrError(beginCreate(resourceGroupName, jobName, jobResource, context));
}
/**
- * Deletes a job.
- *
- * @param resourceGroupName The Resource Group Name.
- * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
- * 24 characters in length and use any alphanumeric and underscore only.
- * @param 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 A {@link Mono} that completes when a successful response is received.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono deleteAsync(String resourceGroupName, String jobName, Context context) {
- return beginDeleteAsync(resourceGroupName, jobName, context).last()
- .flatMap(this.client::getLroFinalResultOrError);
- }
-
- /**
- * Deletes a job.
- *
- * @param resourceGroupName The Resource Group Name.
- * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
- * 24 characters in length and use any alphanumeric and underscore only.
- * @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 delete(String resourceGroupName, String jobName) {
- deleteAsync(resourceGroupName, jobName).block();
- }
-
- /**
- * Deletes a job.
+ * Updates the properties of an existing job.
*
- * @param resourceGroupName The Resource Group Name.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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 context The context to associate with this operation.
+ * @param jobResourceUpdateParameter Job update parameters from request body.
+ * @param ifMatch Defines the If-Match condition. The patch will be performed only if the ETag of the job on the
+ * server matches this value.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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 along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public void delete(String resourceGroupName, String jobName, Context context) {
- deleteAsync(resourceGroupName, jobName, context).block();
+ private Mono>> updateWithResponseAsync(String resourceGroupName, String jobName,
+ JobResourceUpdateParameter jobResourceUpdateParameter, String ifMatch) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, jobName, ifMatch, contentType, accept,
+ jobResourceUpdateParameter, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
* Updates the properties of an existing job.
*
- * @param resourceGroupName The Resource Group Name.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
* 24 characters in length and use any alphanumeric and underscore only.
* @param jobResourceUpdateParameter Job update parameters from request body.
@@ -1212,44 +539,18 @@ 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 along with {@link Response} on successful completion of {@link Mono}.
+ * @return job Resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> updateWithResponseAsync(String resourceGroupName, String jobName,
+ private Response updateWithResponse(String resourceGroupName, String jobName,
JobResourceUpdateParameter jobResourceUpdateParameter, String ifMatch) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() 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 (jobName == null) {
- return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null."));
- }
- if (jobResourceUpdateParameter == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter jobResourceUpdateParameter is required and cannot be null."));
- } else {
- jobResourceUpdateParameter.validate();
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(
- context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
- jobName, this.client.getApiVersion(), ifMatch, jobResourceUpdateParameter, accept, context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ return updateWithResponse(resourceGroupName, jobName, jobResourceUpdateParameter, ifMatch, Context.NONE);
}
/**
* Updates the properties of an existing job.
*
- * @param resourceGroupName The Resource Group Name.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
* 24 characters in length and use any alphanumeric and underscore only.
* @param jobResourceUpdateParameter Job update parameters from request body.
@@ -1259,42 +560,22 @@ private Mono>> updateWithResponseAsync(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 job Resource along with {@link Response} on successful completion of {@link Mono}.
+ * @return job Resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> updateWithResponseAsync(String resourceGroupName, String jobName,
+ private Response updateWithResponse(String resourceGroupName, String jobName,
JobResourceUpdateParameter jobResourceUpdateParameter, String ifMatch, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() 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 (jobName == null) {
- return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null."));
- }
- if (jobResourceUpdateParameter == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter jobResourceUpdateParameter is required and cannot be null."));
- } else {
- jobResourceUpdateParameter.validate();
- }
+ final String contentType = "application/json";
final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, jobName,
- this.client.getApiVersion(), ifMatch, jobResourceUpdateParameter, accept, context);
+ return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, jobName, ifMatch, contentType, accept,
+ jobResourceUpdateParameter, context);
}
/**
* Updates the properties of an existing job.
*
- * @param resourceGroupName The Resource Group Name.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
* 24 characters in length and use any alphanumeric and underscore only.
* @param jobResourceUpdateParameter Job update parameters from request body.
@@ -1317,7 +598,7 @@ private PollerFlux, JobResourceInner> beginUpdateAs
/**
* Updates the properties of an existing job.
*
- * @param resourceGroupName The Resource Group Name.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
* 24 characters in length and use any alphanumeric and underscore only.
* @param jobResourceUpdateParameter Job update parameters from request body.
@@ -1339,73 +620,45 @@ private PollerFlux, JobResourceInner> beginUpdateAs
/**
* Updates the properties of an existing job.
*
- * @param resourceGroupName The Resource Group Name.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
* 24 characters in length and use any alphanumeric and underscore only.
* @param jobResourceUpdateParameter Job update parameters from request body.
* @param ifMatch Defines the If-Match condition. The patch will be performed only if the ETag of the job on the
* server matches this value.
- * @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 PollerFlux} for polling of job Resource.
+ * @return the {@link SyncPoller} for polling of job Resource.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, JobResourceInner> beginUpdateAsync(String resourceGroupName,
- String jobName, JobResourceUpdateParameter jobResourceUpdateParameter, String ifMatch, Context context) {
- context = this.client.mergeContext(context);
- Mono>> mono
- = updateWithResponseAsync(resourceGroupName, jobName, jobResourceUpdateParameter, ifMatch, context);
- return this.client.getLroResult(mono, this.client.getHttpPipeline(),
- JobResourceInner.class, JobResourceInner.class, context);
+ private SyncPoller, JobResourceInner> beginUpdate(String resourceGroupName,
+ String jobName, JobResourceUpdateParameter jobResourceUpdateParameter, String ifMatch) {
+ return beginUpdate(resourceGroupName, jobName, jobResourceUpdateParameter, ifMatch, Context.NONE);
}
- /**
- * Updates the properties of an existing job.
- *
- * @param resourceGroupName The Resource Group Name.
- * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
- * 24 characters in length and use any alphanumeric and underscore only.
- * @param jobResourceUpdateParameter Job update parameters from request body.
- * @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 SyncPoller} for polling of job Resource.
- */
+ @Override
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, JobResourceInner> beginUpdate(String resourceGroupName,
String jobName, JobResourceUpdateParameter jobResourceUpdateParameter) {
final String ifMatch = null;
- return this.beginUpdateAsync(resourceGroupName, jobName, jobResourceUpdateParameter, ifMatch).getSyncPoller();
+ return beginUpdate(resourceGroupName, jobName, jobResourceUpdateParameter, ifMatch, Context.NONE);
}
- /**
- * Updates the properties of an existing job.
- *
- * @param resourceGroupName The Resource Group Name.
- * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
- * 24 characters in length and use any alphanumeric and underscore only.
- * @param jobResourceUpdateParameter Job update parameters from request body.
- * @param ifMatch Defines the If-Match condition. The patch will be performed only if the ETag of the job on the
- * server matches this value.
- * @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 SyncPoller} for polling of job Resource.
- */
+ @Override
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, JobResourceInner> beginUpdate(String resourceGroupName,
String jobName, JobResourceUpdateParameter jobResourceUpdateParameter, String ifMatch, Context context) {
- return this.beginUpdateAsync(resourceGroupName, jobName, jobResourceUpdateParameter, ifMatch, context)
- .getSyncPoller();
+ Response response
+ = updateWithResponse(resourceGroupName, jobName, jobResourceUpdateParameter, ifMatch, context);
+ return this.client.getLroResult(response, JobResourceInner.class,
+ JobResourceInner.class, context);
}
/**
* Updates the properties of an existing job.
*
- * @param resourceGroupName The Resource Group Name.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
* 24 characters in length and use any alphanumeric and underscore only.
* @param jobResourceUpdateParameter Job update parameters from request body.
@@ -1426,7 +679,7 @@ private Mono updateAsync(String resourceGroupName, String jobN
/**
* Updates the properties of an existing job.
*
- * @param resourceGroupName The Resource Group Name.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
* 24 characters in length and use any alphanumeric and underscore only.
* @param jobResourceUpdateParameter Job update parameters from request body.
@@ -1443,120 +696,341 @@ private Mono updateAsync(String resourceGroupName, String jobN
.flatMap(this.client::getLroFinalResultOrError);
}
+ @Override
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public JobResourceInner update(String resourceGroupName, String jobName,
+ JobResourceUpdateParameter jobResourceUpdateParameter) {
+ final String ifMatch = null;
+ return update(resourceGroupName, jobName, jobResourceUpdateParameter, ifMatch, Context.NONE);
+ }
+
+ @Override
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public JobResourceInner update(String resourceGroupName, String jobName,
+ JobResourceUpdateParameter jobResourceUpdateParameter, String ifMatch, Context context) {
+ return this.client.getLroFinalResultOrError(
+ beginUpdate(resourceGroupName, jobName, jobResourceUpdateParameter, ifMatch, context));
+ }
+
/**
- * Updates the properties of an existing job.
+ * Deletes a job.
*
- * @param resourceGroupName The Resource Group Name.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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.
+ * @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>> deleteWithResponseAsync(String resourceGroupName, String jobName) {
+ return FluxUtil
+ .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, jobName, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Deletes a job.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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.
+ * @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 body along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response deleteWithResponse(String resourceGroupName, String jobName) {
+ return deleteWithResponse(resourceGroupName, jobName, Context.NONE);
+ }
+
+ /**
+ * Deletes a job.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
* 24 characters in length and use any alphanumeric and underscore only.
- * @param jobResourceUpdateParameter Job update parameters from request body.
- * @param ifMatch Defines the If-Match condition. The patch will be performed only if the ETag of the job on the
- * server matches this value.
* @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 job Resource on successful completion of {@link Mono}.
+ * @return the response body along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono updateAsync(String resourceGroupName, String jobName,
- JobResourceUpdateParameter jobResourceUpdateParameter, String ifMatch, Context context) {
- return beginUpdateAsync(resourceGroupName, jobName, jobResourceUpdateParameter, ifMatch, context).last()
- .flatMap(this.client::getLroFinalResultOrError);
+ private Response deleteWithResponse(String resourceGroupName, String jobName, Context context) {
+ return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, jobName, context);
+ }
+
+ /**
+ * Deletes a job.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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.
+ * @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 PollerFlux} for polling of long-running operation.
+ */
+ @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,
+ this.client.getContext());
+ }
+
+ @Override
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(String resourceGroupName, String jobName) {
+ return beginDelete(resourceGroupName, jobName, Context.NONE);
+ }
+
+ @Override
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(String resourceGroupName, String jobName, Context context) {
+ Response response = deleteWithResponse(resourceGroupName, jobName, context);
+ return this.client.getLroResult(response, Void.class, Void.class, context);
+ }
+
+ /**
+ * Deletes a job.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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.
+ * @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 deleteAsync(String resourceGroupName, String jobName) {
+ return beginDeleteAsync(resourceGroupName, jobName).last().flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ @Override
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String jobName) {
+ delete(resourceGroupName, jobName, Context.NONE);
+ }
+
+ @Override
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String jobName, Context context) {
+ this.client.getLroFinalResultOrError(beginDelete(resourceGroupName, jobName, context));
+ }
+
+ /**
+ * Lists all the jobs available under the given resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param skipToken $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs.
+ * @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 along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName,
+ String skipToken) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, skipToken, accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
+ res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Lists all the jobs available under the given resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param skipToken $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs.
+ * @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 as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName, String skipToken) {
+ return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, skipToken),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists all the jobs available under the given resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
+ final String skipToken = null;
+ return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, skipToken),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists all the jobs available under the given resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param skipToken $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs.
+ * @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 along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, String skipToken) {
+ return listByResourceGroupSinglePage(resourceGroupName, skipToken, Context.NONE);
+ }
+
+ /**
+ * Lists all the jobs available under the given resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param skipToken $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs.
+ * @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 job Resource Collection along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, String skipToken,
+ Context context) {
+ final String accept = "application/json";
+ Response res
+ = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, skipToken, accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ @Override
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ final String skipToken = null;
+ return listByResourceGroup(resourceGroupName, skipToken, Context.NONE);
+ }
+
+ @Override
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName, String skipToken,
+ Context context) {
+ return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, skipToken, context),
+ nextLink -> listByResourceGroupNextSinglePage(nextLink, context));
+ }
+
+ /**
+ * Lists all the jobs available under the subscription.
+ *
+ * @param skipToken $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs.
+ * @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 along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(String skipToken) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), skipToken, accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
+ res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Lists all the jobs available under the subscription.
+ *
+ * @param skipToken $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs.
+ * @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 as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String skipToken) {
+ return new PagedFlux<>(() -> listSinglePageAsync(skipToken), nextLink -> listNextSinglePageAsync(nextLink));
}
/**
- * Updates the properties of an existing job.
+ * Lists all the jobs available under the subscription.
*
- * @param resourceGroupName The Resource Group Name.
- * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
- * 24 characters in length and use any alphanumeric and underscore only.
- * @param jobResourceUpdateParameter Job update parameters from request body.
- * @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 Collection as paginated response with {@link PagedFlux}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- public JobResourceInner update(String resourceGroupName, String jobName,
- JobResourceUpdateParameter jobResourceUpdateParameter) {
- final String ifMatch = null;
- return updateAsync(resourceGroupName, jobName, jobResourceUpdateParameter, ifMatch).block();
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ final String skipToken = null;
+ return new PagedFlux<>(() -> listSinglePageAsync(skipToken), nextLink -> listNextSinglePageAsync(nextLink));
}
/**
- * Updates the properties of an existing job.
+ * Lists all the jobs available under the subscription.
*
- * @param resourceGroupName The Resource Group Name.
- * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
- * 24 characters in length and use any alphanumeric and underscore only.
- * @param jobResourceUpdateParameter Job update parameters from request body.
- * @param ifMatch Defines the If-Match condition. The patch will be performed only if the ETag of the job on the
- * server matches this value.
- * @param context The context to associate with this operation.
+ * @param skipToken $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs.
* @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 Collection along with {@link PagedResponse}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public JobResourceInner update(String resourceGroupName, String jobName,
- JobResourceUpdateParameter jobResourceUpdateParameter, String ifMatch, Context context) {
- return updateAsync(resourceGroupName, jobName, jobResourceUpdateParameter, ifMatch, context).block();
+ private PagedResponse listSinglePage(String skipToken) {
+ return listSinglePage(skipToken, Context.NONE);
}
/**
- * Book shipment pick up.
+ * Lists all the jobs available under the subscription.
*
- * @param resourceGroupName The Resource Group Name.
- * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
- * 24 characters in length and use any alphanumeric and underscore only.
- * @param shipmentPickUpRequest Details of shipment pick up request.
+ * @param skipToken $skipToken is supported on Get list of jobs, which provides the next page in the list of jobs.
+ * @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 shipment pick up response along with {@link Response} on successful completion of {@link Mono}.
+ * @return job Resource Collection along with {@link PagedResponse}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> bookShipmentPickUpWithResponseAsync(String resourceGroupName,
- String jobName, ShipmentPickUpRequest shipmentPickUpRequest) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() 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 (jobName == null) {
- return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null."));
- }
- if (shipmentPickUpRequest == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter shipmentPickUpRequest is required and cannot be null."));
- } else {
- shipmentPickUpRequest.validate();
- }
+ private PagedResponse listSinglePage(String skipToken, Context context) {
final String accept = "application/json";
- return FluxUtil
- .withContext(
- context -> service.bookShipmentPickUp(this.client.getEndpoint(), this.client.getSubscriptionId(),
- resourceGroupName, jobName, this.client.getApiVersion(), shipmentPickUpRequest, accept, context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), skipToken, accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ @Override
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ final String skipToken = null;
+ return list(skipToken, Context.NONE);
+ }
+
+ @Override
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String skipToken, Context context) {
+ return new PagedIterable<>(() -> listSinglePage(skipToken, context),
+ nextLink -> listNextSinglePage(nextLink, context));
}
/**
* Book shipment pick up.
*
- * @param resourceGroupName The Resource Group Name.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
* 24 characters in length and use any alphanumeric and underscore only.
* @param shipmentPickUpRequest Details of shipment pick up request.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -1564,38 +1038,20 @@ private Mono> bookShipmentPickUpWithRespon
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> bookShipmentPickUpWithResponseAsync(String resourceGroupName,
- String jobName, ShipmentPickUpRequest shipmentPickUpRequest, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() 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 (jobName == null) {
- return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null."));
- }
- if (shipmentPickUpRequest == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter shipmentPickUpRequest is required and cannot be null."));
- } else {
- shipmentPickUpRequest.validate();
- }
+ String jobName, ShipmentPickUpRequest shipmentPickUpRequest) {
+ final String contentType = "application/json";
final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.bookShipmentPickUp(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
- jobName, this.client.getApiVersion(), shipmentPickUpRequest, accept, context);
+ return FluxUtil
+ .withContext(context -> service.bookShipmentPickUp(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, jobName, contentType, accept, shipmentPickUpRequest,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
* Book shipment pick up.
*
- * @param resourceGroupName The Resource Group Name.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
* 24 characters in length and use any alphanumeric and underscore only.
* @param shipmentPickUpRequest Details of shipment pick up request.
@@ -1611,37 +1067,18 @@ private Mono bookShipmentPickUpAsync(String resourc
.flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
- /**
- * Book shipment pick up.
- *
- * @param resourceGroupName The Resource Group Name.
- * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
- * 24 characters in length and use any alphanumeric and underscore only.
- * @param shipmentPickUpRequest Details of shipment pick up request.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws 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 along with {@link Response}.
- */
+ @Override
@ServiceMethod(returns = ReturnType.SINGLE)
public Response bookShipmentPickUpWithResponse(String resourceGroupName,
String jobName, ShipmentPickUpRequest shipmentPickUpRequest, Context context) {
- return bookShipmentPickUpWithResponseAsync(resourceGroupName, jobName, shipmentPickUpRequest, context).block();
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.bookShipmentPickUpSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, jobName, contentType, accept, shipmentPickUpRequest,
+ context);
}
- /**
- * Book shipment pick up.
- *
- * @param resourceGroupName The Resource Group Name.
- * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
- * 24 characters in length and use any alphanumeric and underscore only.
- * @param shipmentPickUpRequest Details of shipment pick up 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 shipment pick up response.
- */
+ @Override
@ServiceMethod(returns = ReturnType.SINGLE)
public ShipmentPickUpResponseInner bookShipmentPickUp(String resourceGroupName, String jobName,
ShipmentPickUpRequest shipmentPickUpRequest) {
@@ -1652,7 +1089,7 @@ public ShipmentPickUpResponseInner bookShipmentPickUp(String resourceGroupName,
/**
* CancelJob.
*
- * @param resourceGroupName The Resource Group Name.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
* 24 characters in length and use any alphanumeric and underscore only.
* @param cancellationReason Reason for cancellation.
@@ -1664,274 +1101,249 @@ public ShipmentPickUpResponseInner bookShipmentPickUp(String resourceGroupName,
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> cancelWithResponseAsync(String resourceGroupName, String jobName,
CancellationReason cancellationReason) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() 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 (jobName == null) {
- return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null."));
- }
- if (cancellationReason == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter cancellationReason is required and cannot be null."));
- } else {
- cancellationReason.validate();
- }
- final String accept = "application/json";
+ final String contentType = "application/json";
return FluxUtil
- .withContext(context -> service.cancel(this.client.getEndpoint(), this.client.getSubscriptionId(),
- resourceGroupName, jobName, this.client.getApiVersion(), cancellationReason, accept, context))
+ .withContext(context -> service.cancel(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, jobName, contentType, cancellationReason, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
* CancelJob.
*
- * @param resourceGroupName The Resource Group Name.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
* 24 characters in length and use any alphanumeric and underscore only.
* @param cancellationReason Reason for cancellation.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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}.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> cancelWithResponseAsync(String resourceGroupName, String jobName,
+ private Mono cancelAsync(String resourceGroupName, String jobName, CancellationReason cancellationReason) {
+ return cancelWithResponseAsync(resourceGroupName, jobName, cancellationReason).flatMap(ignored -> Mono.empty());
+ }
+
+ @Override
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response cancelWithResponse(String resourceGroupName, String jobName,
CancellationReason cancellationReason, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() 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 (jobName == null) {
- return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null."));
- }
- if (cancellationReason == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter cancellationReason is required and cannot be null."));
- } else {
- cancellationReason.validate();
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.cancel(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, jobName,
- this.client.getApiVersion(), cancellationReason, accept, context);
+ final String contentType = "application/json";
+ return service.cancelSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, jobName, contentType, cancellationReason, context);
+ }
+
+ @Override
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void cancel(String resourceGroupName, String jobName, CancellationReason cancellationReason) {
+ cancelWithResponse(resourceGroupName, jobName, cancellationReason, Context.NONE);
}
/**
- * CancelJob.
+ * This method gets the unencrypted secrets related to the job.
*
- * @param resourceGroupName The Resource Group Name.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
* 24 characters in length and use any alphanumeric and underscore only.
- * @param cancellationReason Reason for cancellation.
* @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.
+ * @return list of unencrypted credentials for accessing device along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono cancelAsync(String resourceGroupName, String jobName, CancellationReason cancellationReason) {
- return cancelWithResponseAsync(resourceGroupName, jobName, cancellationReason).flatMap(ignored -> Mono.empty());
+ private Mono> listCredentialsSinglePageAsync(String resourceGroupName,
+ String jobName) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listCredentials(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, jobName, accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(),
+ res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
- * CancelJob.
+ * This method gets the unencrypted secrets related to the job.
*
- * @param resourceGroupName The Resource Group Name.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
* 24 characters in length and use any alphanumeric and underscore only.
- * @param cancellationReason Reason for cancellation.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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}.
+ * @return list of unencrypted credentials for accessing device as paginated response with {@link PagedFlux}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Response cancelWithResponse(String resourceGroupName, String jobName,
- CancellationReason cancellationReason, Context context) {
- return cancelWithResponseAsync(resourceGroupName, jobName, cancellationReason, context).block();
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listCredentialsAsync(String resourceGroupName, String jobName) {
+ return new PagedFlux<>(() -> listCredentialsSinglePageAsync(resourceGroupName, jobName),
+ nextLink -> listCredentialsNextSinglePageAsync(nextLink));
}
/**
- * CancelJob.
+ * This method gets the unencrypted secrets related to the job.
*
- * @param resourceGroupName The Resource Group Name.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
* 24 characters in length and use any alphanumeric and underscore only.
- * @param cancellationReason Reason for cancellation.
* @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 along with {@link PagedResponse}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public void cancel(String resourceGroupName, String jobName, CancellationReason cancellationReason) {
- cancelWithResponse(resourceGroupName, jobName, cancellationReason, Context.NONE);
+ private PagedResponse listCredentialsSinglePage(String resourceGroupName,
+ String jobName) {
+ return listCredentialsSinglePage(resourceGroupName, jobName, Context.NONE);
}
/**
* This method gets the unencrypted secrets related to the job.
*
- * @param resourceGroupName The Resource Group Name.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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 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 list of unencrypted credentials for accessing device along with {@link PagedResponse} on successful
- * completion of {@link Mono}.
+ * @return list of unencrypted credentials for accessing device along with {@link PagedResponse}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listCredentialsSinglePageAsync(String resourceGroupName,
- String jobName) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() 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 (jobName == null) {
- return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null."));
- }
+ private PagedResponse listCredentialsSinglePage(String resourceGroupName,
+ String jobName, Context context) {
final String accept = "application/json";
- return FluxUtil
- .withContext(context -> service.listCredentials(this.client.getEndpoint(), this.client.getSubscriptionId(),
- resourceGroupName, jobName, this.client.getApiVersion(), accept, context))
- .>map(res -> new PagedResponseBase<>(res.getRequest(),
- res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ Response res = service.listCredentialsSync(this.client.getEndpoint(),
+ this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, jobName, accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ @Override
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listCredentials(String resourceGroupName, String jobName) {
+ return listCredentials(resourceGroupName, jobName, Context.NONE);
+ }
+
+ @Override
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listCredentials(String resourceGroupName, String jobName,
+ Context context) {
+ return new PagedIterable<>(() -> listCredentialsSinglePage(resourceGroupName, jobName, context),
+ nextLink -> listCredentialsNextSinglePage(nextLink, context));
}
/**
- * This method gets the unencrypted secrets related to the job.
+ * Request to mark devices for a given job as shipped.
*
- * @param resourceGroupName The Resource Group Name.
* @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
* 24 characters in length and use any alphanumeric and underscore only.
- * @param context The context to associate with this operation.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 list of unencrypted credentials for accessing device along with {@link PagedResponse} on successful
- * completion of {@link Mono}.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono