scopes = new ArrayList<>();
private RetryPolicy retryPolicy;
+ private RetryOptions retryOptions;
private Duration defaultPollInterval;
private Configurable() {
@@ -128,6 +147,17 @@ public Configurable withPolicy(HttpPipelinePolicy policy) {
return this;
}
+ /**
+ * Adds the scope to permission sets.
+ *
+ * @param scope the scope.
+ * @return the configurable object itself.
+ */
+ public Configurable withScope(String scope) {
+ this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null."));
+ return this;
+ }
+
/**
* Sets the retry policy to the HTTP pipeline.
*
@@ -139,6 +169,19 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
return this;
}
+ /**
+ * Sets the retry options for the HTTP pipeline retry policy.
+ *
+ * This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}.
+ *
+ * @param retryOptions the retry options for the HTTP pipeline retry policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withRetryOptions(RetryOptions retryOptions) {
+ this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null.");
+ return this;
+ }
+
/**
* Sets the default poll interval, used when service does not provide "Retry-After" header.
*
@@ -146,9 +189,11 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
* @return the configurable object itself.
*/
public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
- this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null.");
+ this.defaultPollInterval =
+ Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
if (this.defaultPollInterval.isNegative()) {
- throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative"));
+ throw LOGGER
+ .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative"));
}
return this;
}
@@ -184,20 +229,38 @@ public DataBoxManager authenticate(TokenCredential credential, AzureProfile prof
userAgentBuilder.append(" (auto-generated)");
}
+ if (scopes.isEmpty()) {
+ scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
+ }
if (retryPolicy == null) {
- retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ if (retryOptions != null) {
+ retryPolicy = new RetryPolicy(retryOptions);
+ } else {
+ retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ }
}
List policies = new ArrayList<>();
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
+ policies.add(new AddHeadersFromContextPolicy());
policies.add(new RequestIdPolicy());
+ policies
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
+ .collect(Collectors.toList()));
HttpPolicyProviders.addBeforeRetryPolicies(policies);
policies.add(retryPolicy);
policies.add(new AddDatePolicy());
+ policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
policies
- .add(
- new BearerTokenAuthenticationPolicy(
- credential, profile.getEnvironment().getManagementEndpoint() + "/.default"));
- policies.addAll(this.policies);
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
+ .collect(Collectors.toList()));
HttpPolicyProviders.addAfterRetryPolicies(policies);
policies.add(new HttpLoggingPolicy(httpLogOptions));
HttpPipeline httpPipeline =
@@ -209,7 +272,11 @@ public DataBoxManager authenticate(TokenCredential credential, AzureProfile prof
}
}
- /** @return Resource collection API of Operations. */
+ /**
+ * Gets the resource collection API of Operations.
+ *
+ * @return Resource collection API of Operations.
+ */
public Operations operations() {
if (this.operations == null) {
this.operations = new OperationsImpl(clientObject.getOperations(), this);
@@ -217,7 +284,11 @@ public Operations operations() {
return operations;
}
- /** @return Resource collection API of Jobs. */
+ /**
+ * Gets the resource collection API of Jobs. It manages JobResource.
+ *
+ * @return Resource collection API of Jobs.
+ */
public Jobs jobs() {
if (this.jobs == null) {
this.jobs = new JobsImpl(clientObject.getJobs(), this);
@@ -225,7 +296,11 @@ public Jobs jobs() {
return jobs;
}
- /** @return Resource collection API of ResourceProviders. */
+ /**
+ * Gets the resource collection API of ResourceProviders.
+ *
+ * @return Resource collection API of ResourceProviders.
+ */
public ResourceProviders resourceProviders() {
if (this.resourceProviders == null) {
this.resourceProviders = new ResourceProvidersImpl(clientObject.getResourceProviders(), this);
@@ -233,7 +308,11 @@ public ResourceProviders resourceProviders() {
return resourceProviders;
}
- /** @return Resource collection API of Services. */
+ /**
+ * Gets the resource collection API of Services.
+ *
+ * @return Resource collection API of Services.
+ */
public Services services() {
if (this.services == null) {
this.services = new ServicesImpl(clientObject.getServices(), this);
diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/JobsClient.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/JobsClient.java
index c7ea07334dc9..b2018452e185 100644
--- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/JobsClient.java
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/JobsClient.java
@@ -16,6 +16,7 @@
import com.azure.resourcemanager.databox.fluent.models.UnencryptedCredentialsInner;
import com.azure.resourcemanager.databox.models.CancellationReason;
import com.azure.resourcemanager.databox.models.JobResourceUpdateParameter;
+import com.azure.resourcemanager.databox.models.MarkDevicesShippedRequest;
import com.azure.resourcemanager.databox.models.ShipmentPickUpRequest;
/** An instance of this class provides access to all the operations defined in JobsClient. */
@@ -25,7 +26,7 @@ public interface JobsClient {
*
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource Collection.
+ * @return job Resource Collection as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -38,11 +39,43 @@ public interface JobsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource Collection.
+ * @return job Resource Collection as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(String skipToken, Context context);
+ /**
+ * Request to mark devices for a given job as shipped.
+ *
+ * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
+ * 24 characters in length and use any alphanumeric and underscore only.
+ * @param resourceGroupName The Resource Group Name.
+ * @param markDevicesShippedRequest Mark Devices Shipped Request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void markDevicesShipped(
+ String jobName, String resourceGroupName, MarkDevicesShippedRequest markDevicesShippedRequest);
+
+ /**
+ * Request to mark devices for a given job as shipped.
+ *
+ * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
+ * 24 characters in length and use any alphanumeric and underscore only.
+ * @param resourceGroupName The Resource Group Name.
+ * @param markDevicesShippedRequest Mark Devices Shipped Request.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response markDevicesShippedWithResponse(
+ String jobName, String resourceGroupName, MarkDevicesShippedRequest markDevicesShippedRequest, Context context);
+
/**
* Lists all the jobs available under the given resource group.
*
@@ -50,7 +83,7 @@ public interface JobsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource Collection.
+ * @return job Resource Collection as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName);
@@ -64,7 +97,7 @@ public interface JobsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource Collection.
+ * @return job Resource Collection as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName, String skipToken, Context context);
@@ -94,7 +127,7 @@ public interface JobsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return information about the specified job.
+ * @return information about the specified job along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getByResourceGroupWithResponse(
@@ -111,9 +144,9 @@ Response getByResourceGroupWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource.
+ * @return the {@link SyncPoller} for polling of job Resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, JobResourceInner> beginCreate(
String resourceGroupName, String jobName, JobResourceInner jobResource);
@@ -129,9 +162,9 @@ SyncPoller, JobResourceInner> beginCreate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource.
+ * @return the {@link SyncPoller} for polling of job Resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, JobResourceInner> beginCreate(
String resourceGroupName, String jobName, JobResourceInner jobResource, Context context);
@@ -177,9 +210,9 @@ SyncPoller, JobResourceInner> beginCreate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(String resourceGroupName, String jobName);
/**
@@ -192,9 +225,9 @@ SyncPoller, JobResourceInner> beginCreate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(String resourceGroupName, String jobName, Context context);
/**
@@ -236,9 +269,9 @@ SyncPoller, JobResourceInner> beginCreate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource.
+ * @return the {@link SyncPoller} for polling of job Resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, JobResourceInner> beginUpdate(
String resourceGroupName,
String jobName,
@@ -258,9 +291,9 @@ SyncPoller, JobResourceInner> beginUpdate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource.
+ * @return the {@link SyncPoller} for polling of job Resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, JobResourceInner> beginUpdate(
String resourceGroupName,
String jobName,
@@ -355,7 +388,7 @@ ShipmentPickUpResponseInner bookShipmentPickUp(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return shipment pick up response.
+ * @return shipment pick up response along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response bookShipmentPickUpWithResponse(
@@ -386,7 +419,7 @@ Response bookShipmentPickUpWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response cancelWithResponse(
@@ -401,7 +434,7 @@ Response cancelWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return list of unencrypted credentials for accessing device.
+ * @return list of unencrypted credentials for accessing device as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listCredentials(String resourceGroupName, String jobName);
@@ -416,7 +449,7 @@ Response cancelWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return list of unencrypted credentials for accessing device.
+ * @return list of unencrypted credentials for accessing device as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listCredentials(
diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/OperationsClient.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/OperationsClient.java
index 8c5ca0f8163e..d969702bbcd6 100644
--- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/OperationsClient.java
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/OperationsClient.java
@@ -17,7 +17,7 @@ public interface OperationsClient {
*
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return operation Collection.
+ * @return operation Collection as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -29,7 +29,7 @@ public interface OperationsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return operation Collection.
+ * @return operation Collection as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/ResourceProvidersClient.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/ResourceProvidersClient.java
index 7a3f79325b34..57d897fd356e 100644
--- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/ResourceProvidersClient.java
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/ResourceProvidersClient.java
@@ -37,7 +37,7 @@ public interface ResourceProvidersClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response mitigateWithResponse(
diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/ServicesClient.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/ServicesClient.java
index c71af55f903a..b4dfcab484bc 100644
--- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/ServicesClient.java
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/ServicesClient.java
@@ -29,7 +29,7 @@ public interface ServicesClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the available skus operation response.
+ * @return the available skus operation response as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listAvailableSkusByResourceGroup(
@@ -45,7 +45,7 @@ PagedIterable listAvailableSkusByResourceGroup(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the available skus operation response.
+ * @return the available skus operation response as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listAvailableSkusByResourceGroup(
@@ -75,7 +75,7 @@ PagedIterable listAvailableSkusByResourceGroup(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return output of the address validation api.
+ * @return output of the address validation api along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response validateAddressWithResponse(
@@ -106,7 +106,7 @@ ValidationResponseInner validateInputsByResourceGroup(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return response of pre job creation validations.
+ * @return response of pre job creation validations along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response validateInputsByResourceGroupWithResponse(
@@ -134,7 +134,7 @@ Response validateInputsByResourceGroupWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return response of pre job creation validations.
+ * @return response of pre job creation validations along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response validateInputsWithResponse(
@@ -163,7 +163,7 @@ RegionConfigurationResponseInner regionConfiguration(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return configuration response specific to a region.
+ * @return configuration response specific to a region along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response regionConfigurationWithResponse(
@@ -194,7 +194,7 @@ RegionConfigurationResponseInner regionConfigurationByResourceGroup(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return configuration response specific to a region.
+ * @return configuration response specific to a region along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response regionConfigurationByResourceGroupWithResponse(
diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/AddressValidationOutputInner.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/AddressValidationOutputInner.java
index 7271be071285..ce081211f3c5 100644
--- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/AddressValidationOutputInner.java
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/AddressValidationOutputInner.java
@@ -5,46 +5,28 @@
package com.azure.resourcemanager.databox.fluent.models;
import com.azure.core.annotation.Immutable;
-import com.azure.core.annotation.JsonFlatten;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.databox.models.AddressValidationStatus;
import com.azure.resourcemanager.databox.models.CloudError;
import com.azure.resourcemanager.databox.models.ShippingAddress;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/** Output of the address validation api. */
-@JsonFlatten
@Immutable
-public class AddressValidationOutputInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(AddressValidationOutputInner.class);
-
- /*
- * Error code and message of validation response.
- */
- @JsonProperty(value = "properties.error", access = JsonProperty.Access.WRITE_ONLY)
- private CloudError error;
-
- /*
- * The address validation status.
- */
- @JsonProperty(value = "properties.validationStatus", access = JsonProperty.Access.WRITE_ONLY)
- private AddressValidationStatus validationStatus;
-
+public final class AddressValidationOutputInner {
/*
- * List of alternate addresses.
+ * The address validation properties.
*/
- @JsonProperty(value = "properties.alternateAddresses", access = JsonProperty.Access.WRITE_ONLY)
- private List alternateAddresses;
+ @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY)
+ private AddressValidationProperties innerProperties;
/**
- * Get the error property: Error code and message of validation response.
+ * Get the innerProperties property: The address validation properties.
*
- * @return the error value.
+ * @return the innerProperties value.
*/
- public CloudError error() {
- return this.error;
+ private AddressValidationProperties innerProperties() {
+ return this.innerProperties;
}
/**
@@ -53,7 +35,7 @@ public CloudError error() {
* @return the validationStatus value.
*/
public AddressValidationStatus validationStatus() {
- return this.validationStatus;
+ return this.innerProperties() == null ? null : this.innerProperties().validationStatus();
}
/**
@@ -62,7 +44,16 @@ public AddressValidationStatus validationStatus() {
* @return the alternateAddresses value.
*/
public List alternateAddresses() {
- return this.alternateAddresses;
+ return this.innerProperties() == null ? null : this.innerProperties().alternateAddresses();
+ }
+
+ /**
+ * Get the error property: Error code and message of validation response.
+ *
+ * @return the error value.
+ */
+ public CloudError error() {
+ return this.innerProperties() == null ? null : this.innerProperties().error();
}
/**
@@ -71,11 +62,8 @@ public List alternateAddresses() {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
- if (error() != null) {
- error().validate();
- }
- if (alternateAddresses() != null) {
- alternateAddresses().forEach(e -> e.validate());
+ if (innerProperties() != null) {
+ innerProperties().validate();
}
}
}
diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AddressValidationProperties.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/AddressValidationProperties.java
similarity index 87%
rename from sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AddressValidationProperties.java
rename to sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/AddressValidationProperties.java
index a1af669a02f6..7364d2a2f710 100644
--- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/models/AddressValidationProperties.java
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/AddressValidationProperties.java
@@ -2,11 +2,12 @@
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
-package com.azure.resourcemanager.databox.models;
+package com.azure.resourcemanager.databox.fluent.models;
import com.azure.core.annotation.Immutable;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.azure.resourcemanager.databox.models.AddressValidationStatus;
+import com.azure.resourcemanager.databox.models.ShippingAddress;
+import com.azure.resourcemanager.databox.models.ValidationInputResponse;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
@@ -17,8 +18,6 @@
@JsonTypeName("ValidateAddress")
@Immutable
public final class AddressValidationProperties extends ValidationInputResponse {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(AddressValidationProperties.class);
-
/*
* The address validation status.
*/
diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/JobProperties.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/JobProperties.java
new file mode 100644
index 000000000000..9d5f17cdb110
--- /dev/null
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/JobProperties.java
@@ -0,0 +1,283 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.databox.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.databox.models.CloudError;
+import com.azure.resourcemanager.databox.models.JobDeliveryInfo;
+import com.azure.resourcemanager.databox.models.JobDeliveryType;
+import com.azure.resourcemanager.databox.models.JobDetails;
+import com.azure.resourcemanager.databox.models.StageName;
+import com.azure.resourcemanager.databox.models.TransferType;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/** Job Properties. */
+@Fluent
+public final class JobProperties {
+ /*
+ * Type of the data transfer.
+ */
+ @JsonProperty(value = "transferType", required = true)
+ private TransferType transferType;
+
+ /*
+ * Describes whether the job is cancellable or not.
+ */
+ @JsonProperty(value = "isCancellable", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean isCancellable;
+
+ /*
+ * Describes whether the job is deletable or not.
+ */
+ @JsonProperty(value = "isDeletable", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean isDeletable;
+
+ /*
+ * Describes whether the shipping address is editable or not.
+ */
+ @JsonProperty(value = "isShippingAddressEditable", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean isShippingAddressEditable;
+
+ /*
+ * Is Prepare To Ship Enabled on this job
+ */
+ @JsonProperty(value = "isPrepareToShipEnabled", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean isPrepareToShipEnabled;
+
+ /*
+ * Name of the stage which is in progress.
+ */
+ @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY)
+ private StageName status;
+
+ /*
+ * Time at which the job was started in UTC ISO 8601 format.
+ */
+ @JsonProperty(value = "startTime", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime startTime;
+
+ /*
+ * Top level error for the job.
+ */
+ @JsonProperty(value = "error", access = JsonProperty.Access.WRITE_ONLY)
+ private CloudError error;
+
+ /*
+ * Details of a job run. This field will only be sent for expand details filter.
+ */
+ @JsonProperty(value = "details")
+ private JobDetails details;
+
+ /*
+ * Reason for cancellation.
+ */
+ @JsonProperty(value = "cancellationReason", access = JsonProperty.Access.WRITE_ONLY)
+ private String cancellationReason;
+
+ /*
+ * Delivery type of Job.
+ */
+ @JsonProperty(value = "deliveryType")
+ private JobDeliveryType deliveryType;
+
+ /*
+ * Delivery Info of Job.
+ */
+ @JsonProperty(value = "deliveryInfo")
+ private JobDeliveryInfo deliveryInfo;
+
+ /*
+ * Flag to indicate cancellation of scheduled job.
+ */
+ @JsonProperty(value = "isCancellableWithoutFee", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean isCancellableWithoutFee;
+
+ /**
+ * Get the transferType property: Type of the data transfer.
+ *
+ * @return the transferType value.
+ */
+ public TransferType transferType() {
+ return this.transferType;
+ }
+
+ /**
+ * Set the transferType property: Type of the data transfer.
+ *
+ * @param transferType the transferType value to set.
+ * @return the JobProperties object itself.
+ */
+ public JobProperties withTransferType(TransferType transferType) {
+ this.transferType = transferType;
+ return this;
+ }
+
+ /**
+ * Get the isCancellable property: Describes whether the job is cancellable or not.
+ *
+ * @return the isCancellable value.
+ */
+ public Boolean isCancellable() {
+ return this.isCancellable;
+ }
+
+ /**
+ * Get the isDeletable property: Describes whether the job is deletable or not.
+ *
+ * @return the isDeletable value.
+ */
+ public Boolean isDeletable() {
+ return this.isDeletable;
+ }
+
+ /**
+ * Get the isShippingAddressEditable property: Describes whether the shipping address is editable or not.
+ *
+ * @return the isShippingAddressEditable value.
+ */
+ public Boolean isShippingAddressEditable() {
+ return this.isShippingAddressEditable;
+ }
+
+ /**
+ * Get the isPrepareToShipEnabled property: Is Prepare To Ship Enabled on this job.
+ *
+ * @return the isPrepareToShipEnabled value.
+ */
+ public Boolean isPrepareToShipEnabled() {
+ return this.isPrepareToShipEnabled;
+ }
+
+ /**
+ * Get the status property: Name of the stage which is in progress.
+ *
+ * @return the status value.
+ */
+ public StageName status() {
+ return this.status;
+ }
+
+ /**
+ * Get the startTime property: Time at which the job was started in UTC ISO 8601 format.
+ *
+ * @return the startTime value.
+ */
+ public OffsetDateTime startTime() {
+ return this.startTime;
+ }
+
+ /**
+ * Get the error property: Top level error for the job.
+ *
+ * @return the error value.
+ */
+ public CloudError error() {
+ return this.error;
+ }
+
+ /**
+ * Get the details property: Details of a job run. This field will only be sent for expand details filter.
+ *
+ * @return the details value.
+ */
+ public JobDetails details() {
+ return this.details;
+ }
+
+ /**
+ * Set the details property: Details of a job run. This field will only be sent for expand details filter.
+ *
+ * @param details the details value to set.
+ * @return the JobProperties object itself.
+ */
+ public JobProperties withDetails(JobDetails details) {
+ this.details = details;
+ return this;
+ }
+
+ /**
+ * Get the cancellationReason property: Reason for cancellation.
+ *
+ * @return the cancellationReason value.
+ */
+ public String cancellationReason() {
+ return this.cancellationReason;
+ }
+
+ /**
+ * Get the deliveryType property: Delivery type of Job.
+ *
+ * @return the deliveryType value.
+ */
+ public JobDeliveryType deliveryType() {
+ return this.deliveryType;
+ }
+
+ /**
+ * Set the deliveryType property: Delivery type of Job.
+ *
+ * @param deliveryType the deliveryType value to set.
+ * @return the JobProperties object itself.
+ */
+ public JobProperties withDeliveryType(JobDeliveryType deliveryType) {
+ this.deliveryType = deliveryType;
+ return this;
+ }
+
+ /**
+ * Get the deliveryInfo property: Delivery Info of Job.
+ *
+ * @return the deliveryInfo value.
+ */
+ public JobDeliveryInfo deliveryInfo() {
+ return this.deliveryInfo;
+ }
+
+ /**
+ * Set the deliveryInfo property: Delivery Info of Job.
+ *
+ * @param deliveryInfo the deliveryInfo value to set.
+ * @return the JobProperties object itself.
+ */
+ public JobProperties withDeliveryInfo(JobDeliveryInfo deliveryInfo) {
+ this.deliveryInfo = deliveryInfo;
+ return this;
+ }
+
+ /**
+ * Get the isCancellableWithoutFee property: Flag to indicate cancellation of scheduled job.
+ *
+ * @return the isCancellableWithoutFee value.
+ */
+ public Boolean isCancellableWithoutFee() {
+ return this.isCancellableWithoutFee;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (transferType() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property transferType in model JobProperties"));
+ }
+ if (error() != null) {
+ error().validate();
+ }
+ if (details() != null) {
+ details().validate();
+ }
+ if (deliveryInfo() != null) {
+ deliveryInfo().validate();
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(JobProperties.class);
+}
diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/JobResourceInner.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/JobResourceInner.java
index 483ef43dcc65..9bcd8354c50c 100644
--- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/JobResourceInner.java
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/JobResourceInner.java
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.databox.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.JsonFlatten;
import com.azure.core.management.Resource;
import com.azure.core.management.SystemData;
import com.azure.core.util.logging.ClientLogger;
@@ -17,16 +16,18 @@
import com.azure.resourcemanager.databox.models.Sku;
import com.azure.resourcemanager.databox.models.StageName;
import com.azure.resourcemanager.databox.models.TransferType;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
import java.util.Map;
/** Job Resource. */
-@JsonFlatten
@Fluent
-public class JobResourceInner extends Resource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(JobResourceInner.class);
+public final class JobResourceInner extends Resource {
+ /*
+ * Properties of a job.
+ */
+ @JsonProperty(value = "properties", required = true)
+ private JobProperties innerProperties = new JobProperties();
/*
* Name of the object.
@@ -52,85 +53,6 @@ public class JobResourceInner extends Resource {
@JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
- /*
- * Type of the data transfer.
- */
- @JsonProperty(value = "properties.transferType", required = true)
- private TransferType transferType;
-
- /*
- * Describes whether the job is cancellable or not.
- */
- @JsonProperty(value = "properties.isCancellable", access = JsonProperty.Access.WRITE_ONLY)
- private Boolean isCancellable;
-
- /*
- * Describes whether the job is deletable or not.
- */
- @JsonProperty(value = "properties.isDeletable", access = JsonProperty.Access.WRITE_ONLY)
- private Boolean isDeletable;
-
- /*
- * Describes whether the shipping address is editable or not.
- */
- @JsonProperty(value = "properties.isShippingAddressEditable", access = JsonProperty.Access.WRITE_ONLY)
- private Boolean isShippingAddressEditable;
-
- /*
- * Is Prepare To Ship Enabled on this job
- */
- @JsonProperty(value = "properties.isPrepareToShipEnabled", access = JsonProperty.Access.WRITE_ONLY)
- private Boolean isPrepareToShipEnabled;
-
- /*
- * Name of the stage which is in progress.
- */
- @JsonProperty(value = "properties.status", access = JsonProperty.Access.WRITE_ONLY)
- private StageName status;
-
- /*
- * Time at which the job was started in UTC ISO 8601 format.
- */
- @JsonProperty(value = "properties.startTime", access = JsonProperty.Access.WRITE_ONLY)
- private OffsetDateTime startTime;
-
- /*
- * Top level error for the job.
- */
- @JsonProperty(value = "properties.error", access = JsonProperty.Access.WRITE_ONLY)
- private CloudError error;
-
- /*
- * Details of a job run. This field will only be sent for expand details
- * filter.
- */
- @JsonProperty(value = "properties.details")
- private JobDetails details;
-
- /*
- * Reason for cancellation.
- */
- @JsonProperty(value = "properties.cancellationReason", access = JsonProperty.Access.WRITE_ONLY)
- private String cancellationReason;
-
- /*
- * Delivery type of Job.
- */
- @JsonProperty(value = "properties.deliveryType")
- private JobDeliveryType deliveryType;
-
- /*
- * Delivery Info of Job.
- */
- @JsonProperty(value = "properties.deliveryInfo")
- private JobDeliveryInfo deliveryInfo;
-
- /*
- * Flag to indicate cancellation of scheduled job.
- */
- @JsonProperty(value = "properties.isCancellableWithoutFee", access = JsonProperty.Access.WRITE_ONLY)
- private Boolean isCancellableWithoutFee;
-
/*
* The sku type.
*/
@@ -143,6 +65,15 @@ public class JobResourceInner extends Resource {
@JsonProperty(value = "identity")
private ResourceIdentity identity;
+ /**
+ * Get the innerProperties property: Properties of a job.
+ *
+ * @return the innerProperties value.
+ */
+ private JobProperties innerProperties() {
+ return this.innerProperties;
+ }
+
/**
* Get the name property: Name of the object.
*
@@ -179,13 +110,67 @@ public SystemData systemData() {
return this.systemData;
}
+ /**
+ * Get the sku property: The sku type.
+ *
+ * @return the sku value.
+ */
+ public Sku sku() {
+ return this.sku;
+ }
+
+ /**
+ * Set the sku property: The sku type.
+ *
+ * @param sku the sku value to set.
+ * @return the JobResourceInner object itself.
+ */
+ public JobResourceInner withSku(Sku sku) {
+ this.sku = sku;
+ return this;
+ }
+
+ /**
+ * Get the identity property: Msi identity of the resource.
+ *
+ * @return the identity value.
+ */
+ public ResourceIdentity identity() {
+ return this.identity;
+ }
+
+ /**
+ * Set the identity property: Msi identity of the resource.
+ *
+ * @param identity the identity value to set.
+ * @return the JobResourceInner object itself.
+ */
+ public JobResourceInner withIdentity(ResourceIdentity identity) {
+ this.identity = identity;
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public JobResourceInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public JobResourceInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
/**
* Get the transferType property: Type of the data transfer.
*
* @return the transferType value.
*/
public TransferType transferType() {
- return this.transferType;
+ return this.innerProperties() == null ? null : this.innerProperties().transferType();
}
/**
@@ -195,7 +180,10 @@ public TransferType transferType() {
* @return the JobResourceInner object itself.
*/
public JobResourceInner withTransferType(TransferType transferType) {
- this.transferType = transferType;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new JobProperties();
+ }
+ this.innerProperties().withTransferType(transferType);
return this;
}
@@ -205,7 +193,7 @@ public JobResourceInner withTransferType(TransferType transferType) {
* @return the isCancellable value.
*/
public Boolean isCancellable() {
- return this.isCancellable;
+ return this.innerProperties() == null ? null : this.innerProperties().isCancellable();
}
/**
@@ -214,7 +202,7 @@ public Boolean isCancellable() {
* @return the isDeletable value.
*/
public Boolean isDeletable() {
- return this.isDeletable;
+ return this.innerProperties() == null ? null : this.innerProperties().isDeletable();
}
/**
@@ -223,7 +211,7 @@ public Boolean isDeletable() {
* @return the isShippingAddressEditable value.
*/
public Boolean isShippingAddressEditable() {
- return this.isShippingAddressEditable;
+ return this.innerProperties() == null ? null : this.innerProperties().isShippingAddressEditable();
}
/**
@@ -232,7 +220,7 @@ public Boolean isShippingAddressEditable() {
* @return the isPrepareToShipEnabled value.
*/
public Boolean isPrepareToShipEnabled() {
- return this.isPrepareToShipEnabled;
+ return this.innerProperties() == null ? null : this.innerProperties().isPrepareToShipEnabled();
}
/**
@@ -241,7 +229,7 @@ public Boolean isPrepareToShipEnabled() {
* @return the status value.
*/
public StageName status() {
- return this.status;
+ return this.innerProperties() == null ? null : this.innerProperties().status();
}
/**
@@ -250,7 +238,7 @@ public StageName status() {
* @return the startTime value.
*/
public OffsetDateTime startTime() {
- return this.startTime;
+ return this.innerProperties() == null ? null : this.innerProperties().startTime();
}
/**
@@ -259,7 +247,7 @@ public OffsetDateTime startTime() {
* @return the error value.
*/
public CloudError error() {
- return this.error;
+ return this.innerProperties() == null ? null : this.innerProperties().error();
}
/**
@@ -268,7 +256,7 @@ public CloudError error() {
* @return the details value.
*/
public JobDetails details() {
- return this.details;
+ return this.innerProperties() == null ? null : this.innerProperties().details();
}
/**
@@ -278,7 +266,10 @@ public JobDetails details() {
* @return the JobResourceInner object itself.
*/
public JobResourceInner withDetails(JobDetails details) {
- this.details = details;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new JobProperties();
+ }
+ this.innerProperties().withDetails(details);
return this;
}
@@ -288,7 +279,7 @@ public JobResourceInner withDetails(JobDetails details) {
* @return the cancellationReason value.
*/
public String cancellationReason() {
- return this.cancellationReason;
+ return this.innerProperties() == null ? null : this.innerProperties().cancellationReason();
}
/**
@@ -297,7 +288,7 @@ public String cancellationReason() {
* @return the deliveryType value.
*/
public JobDeliveryType deliveryType() {
- return this.deliveryType;
+ return this.innerProperties() == null ? null : this.innerProperties().deliveryType();
}
/**
@@ -307,7 +298,10 @@ public JobDeliveryType deliveryType() {
* @return the JobResourceInner object itself.
*/
public JobResourceInner withDeliveryType(JobDeliveryType deliveryType) {
- this.deliveryType = deliveryType;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new JobProperties();
+ }
+ this.innerProperties().withDeliveryType(deliveryType);
return this;
}
@@ -317,7 +311,7 @@ public JobResourceInner withDeliveryType(JobDeliveryType deliveryType) {
* @return the deliveryInfo value.
*/
public JobDeliveryInfo deliveryInfo() {
- return this.deliveryInfo;
+ return this.innerProperties() == null ? null : this.innerProperties().deliveryInfo();
}
/**
@@ -327,7 +321,10 @@ public JobDeliveryInfo deliveryInfo() {
* @return the JobResourceInner object itself.
*/
public JobResourceInner withDeliveryInfo(JobDeliveryInfo deliveryInfo) {
- this.deliveryInfo = deliveryInfo;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new JobProperties();
+ }
+ this.innerProperties().withDeliveryInfo(deliveryInfo);
return this;
}
@@ -337,61 +334,7 @@ public JobResourceInner withDeliveryInfo(JobDeliveryInfo deliveryInfo) {
* @return the isCancellableWithoutFee value.
*/
public Boolean isCancellableWithoutFee() {
- return this.isCancellableWithoutFee;
- }
-
- /**
- * Get the sku property: The sku type.
- *
- * @return the sku value.
- */
- public Sku sku() {
- return this.sku;
- }
-
- /**
- * Set the sku property: The sku type.
- *
- * @param sku the sku value to set.
- * @return the JobResourceInner object itself.
- */
- public JobResourceInner withSku(Sku sku) {
- this.sku = sku;
- return this;
- }
-
- /**
- * Get the identity property: Msi identity of the resource.
- *
- * @return the identity value.
- */
- public ResourceIdentity identity() {
- return this.identity;
- }
-
- /**
- * Set the identity property: Msi identity of the resource.
- *
- * @param identity the identity value to set.
- * @return the JobResourceInner object itself.
- */
- public JobResourceInner withIdentity(ResourceIdentity identity) {
- this.identity = identity;
- return this;
- }
-
- /** {@inheritDoc} */
- @Override
- public JobResourceInner withLocation(String location) {
- super.withLocation(location);
- return this;
- }
-
- /** {@inheritDoc} */
- @Override
- public JobResourceInner withTags(Map tags) {
- super.withTags(tags);
- return this;
+ return this.innerProperties() == null ? null : this.innerProperties().isCancellableWithoutFee();
}
/**
@@ -400,22 +343,16 @@ public JobResourceInner withTags(Map tags) {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
- if (transferType() == null) {
- throw logger
+ if (innerProperties() == null) {
+ throw LOGGER
.logExceptionAsError(
- new IllegalArgumentException("Missing required property transferType in model JobResourceInner"));
- }
- if (error() != null) {
- error().validate();
- }
- if (details() != null) {
- details().validate();
- }
- if (deliveryInfo() != null) {
- deliveryInfo().validate();
+ new IllegalArgumentException(
+ "Missing required property innerProperties in model JobResourceInner"));
+ } else {
+ innerProperties().validate();
}
if (sku() == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException("Missing required property sku in model JobResourceInner"));
} else {
@@ -425,4 +362,6 @@ public void validate() {
identity().validate();
}
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(JobResourceInner.class);
}
diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/OperationInner.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/OperationInner.java
index 278520c221ad..269373b7d55f 100644
--- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/OperationInner.java
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/OperationInner.java
@@ -5,19 +5,14 @@
package com.azure.resourcemanager.databox.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.databox.models.OperationDisplay;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** Operation entity. */
@Fluent
public final class OperationInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationInner.class);
-
/*
- * Name of the operation. Format:
- * {resourceProviderNamespace}/{resourceType}/{read|write|delete|action}
+ * Name of the operation. Format: {resourceProviderNamespace}/{resourceType}/{read|write|delete|action}
*/
@JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
private String name;
diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/RegionConfigurationResponseInner.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/RegionConfigurationResponseInner.java
index f6142529fe45..58b66fbd1da0 100644
--- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/RegionConfigurationResponseInner.java
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/RegionConfigurationResponseInner.java
@@ -5,17 +5,14 @@
package com.azure.resourcemanager.databox.fluent.models;
import com.azure.core.annotation.Immutable;
-import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.databox.models.DatacenterAddressResponse;
import com.azure.resourcemanager.databox.models.ScheduleAvailabilityResponse;
import com.azure.resourcemanager.databox.models.TransportAvailabilityResponse;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** Configuration response specific to a region. */
@Immutable
public final class RegionConfigurationResponseInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(RegionConfigurationResponseInner.class);
-
/*
* Schedule availability for given sku in a region.
*/
@@ -28,6 +25,12 @@ public final class RegionConfigurationResponseInner {
@JsonProperty(value = "transportAvailabilityResponse", access = JsonProperty.Access.WRITE_ONLY)
private TransportAvailabilityResponse transportAvailabilityResponse;
+ /*
+ * Datacenter address for given sku in a region.
+ */
+ @JsonProperty(value = "datacenterAddressResponse", access = JsonProperty.Access.WRITE_ONLY)
+ private DatacenterAddressResponse datacenterAddressResponse;
+
/**
* Get the scheduleAvailabilityResponse property: Schedule availability for given sku in a region.
*
@@ -46,6 +49,15 @@ public TransportAvailabilityResponse transportAvailabilityResponse() {
return this.transportAvailabilityResponse;
}
+ /**
+ * Get the datacenterAddressResponse property: Datacenter address for given sku in a region.
+ *
+ * @return the datacenterAddressResponse value.
+ */
+ public DatacenterAddressResponse datacenterAddressResponse() {
+ return this.datacenterAddressResponse;
+ }
+
/**
* Validates the instance.
*
@@ -58,5 +70,8 @@ public void validate() {
if (transportAvailabilityResponse() != null) {
transportAvailabilityResponse().validate();
}
+ if (datacenterAddressResponse() != null) {
+ datacenterAddressResponse().validate();
+ }
}
}
diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/ShipmentPickUpResponseInner.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/ShipmentPickUpResponseInner.java
index b20b834df680..9cfa1a247120 100644
--- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/ShipmentPickUpResponseInner.java
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/ShipmentPickUpResponseInner.java
@@ -5,16 +5,12 @@
package com.azure.resourcemanager.databox.fluent.models;
import com.azure.core.annotation.Immutable;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
/** Shipment pick up response. */
@Immutable
public final class ShipmentPickUpResponseInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ShipmentPickUpResponseInner.class);
-
/*
* Confirmation number for the pick up request.
*/
@@ -22,8 +18,7 @@ public final class ShipmentPickUpResponseInner {
private String confirmationNumber;
/*
- * Time by which shipment should be ready for pick up, this is in local
- * time of pick up area.
+ * Time by which shipment should be ready for pick up, this is in local time of pick up area.
*/
@JsonProperty(value = "readyByTime", access = JsonProperty.Access.WRITE_ONLY)
private OffsetDateTime readyByTime;
diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/SkuInformationInner.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/SkuInformationInner.java
index 96fcf59e7722..250ac6e811a2 100644
--- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/SkuInformationInner.java
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/SkuInformationInner.java
@@ -5,23 +5,17 @@
package com.azure.resourcemanager.databox.fluent.models;
import com.azure.core.annotation.Immutable;
-import com.azure.core.annotation.JsonFlatten;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.databox.models.DataLocationToServiceLocationMap;
import com.azure.resourcemanager.databox.models.Sku;
import com.azure.resourcemanager.databox.models.SkuCapacity;
import com.azure.resourcemanager.databox.models.SkuCost;
import com.azure.resourcemanager.databox.models.SkuDisabledReason;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/** Information of the sku. */
-@JsonFlatten
@Immutable
-public class SkuInformationInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(SkuInformationInner.class);
-
+public final class SkuInformationInner {
/*
* The Sku.
*/
@@ -35,46 +29,10 @@ public class SkuInformationInner {
private Boolean enabled;
/*
- * The map of data location to service location.
- */
- @JsonProperty(value = "properties.dataLocationToServiceLocationMap", access = JsonProperty.Access.WRITE_ONLY)
- private List dataLocationToServiceLocationMap;
-
- /*
- * Capacity of the Sku.
- */
- @JsonProperty(value = "properties.capacity", access = JsonProperty.Access.WRITE_ONLY)
- private SkuCapacity capacity;
-
- /*
- * Cost of the Sku.
- */
- @JsonProperty(value = "properties.costs", access = JsonProperty.Access.WRITE_ONLY)
- private List costs;
-
- /*
- * Api versions that support this Sku.
- */
- @JsonProperty(value = "properties.apiVersions", access = JsonProperty.Access.WRITE_ONLY)
- private List apiVersions;
-
- /*
- * Reason why the Sku is disabled.
+ * Properties of the sku.
*/
- @JsonProperty(value = "properties.disabledReason", access = JsonProperty.Access.WRITE_ONLY)
- private SkuDisabledReason disabledReason;
-
- /*
- * Message for why the Sku is disabled.
- */
- @JsonProperty(value = "properties.disabledReasonMessage", access = JsonProperty.Access.WRITE_ONLY)
- private String disabledReasonMessage;
-
- /*
- * Required feature to access the sku.
- */
- @JsonProperty(value = "properties.requiredFeature", access = JsonProperty.Access.WRITE_ONLY)
- private String requiredFeature;
+ @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY)
+ private SkuProperties innerProperties;
/**
* Get the sku property: The Sku.
@@ -94,13 +52,22 @@ public Boolean enabled() {
return this.enabled;
}
+ /**
+ * Get the innerProperties property: Properties of the sku.
+ *
+ * @return the innerProperties value.
+ */
+ private SkuProperties innerProperties() {
+ return this.innerProperties;
+ }
+
/**
* Get the dataLocationToServiceLocationMap property: The map of data location to service location.
*
* @return the dataLocationToServiceLocationMap value.
*/
public List dataLocationToServiceLocationMap() {
- return this.dataLocationToServiceLocationMap;
+ return this.innerProperties() == null ? null : this.innerProperties().dataLocationToServiceLocationMap();
}
/**
@@ -109,7 +76,7 @@ public List dataLocationToServiceLocationMap()
* @return the capacity value.
*/
public SkuCapacity capacity() {
- return this.capacity;
+ return this.innerProperties() == null ? null : this.innerProperties().capacity();
}
/**
@@ -118,7 +85,7 @@ public SkuCapacity capacity() {
* @return the costs value.
*/
public List costs() {
- return this.costs;
+ return this.innerProperties() == null ? null : this.innerProperties().costs();
}
/**
@@ -127,7 +94,7 @@ public List costs() {
* @return the apiVersions value.
*/
public List apiVersions() {
- return this.apiVersions;
+ return this.innerProperties() == null ? null : this.innerProperties().apiVersions();
}
/**
@@ -136,7 +103,7 @@ public List apiVersions() {
* @return the disabledReason value.
*/
public SkuDisabledReason disabledReason() {
- return this.disabledReason;
+ return this.innerProperties() == null ? null : this.innerProperties().disabledReason();
}
/**
@@ -145,7 +112,7 @@ public SkuDisabledReason disabledReason() {
* @return the disabledReasonMessage value.
*/
public String disabledReasonMessage() {
- return this.disabledReasonMessage;
+ return this.innerProperties() == null ? null : this.innerProperties().disabledReasonMessage();
}
/**
@@ -154,7 +121,7 @@ public String disabledReasonMessage() {
* @return the requiredFeature value.
*/
public String requiredFeature() {
- return this.requiredFeature;
+ return this.innerProperties() == null ? null : this.innerProperties().requiredFeature();
}
/**
@@ -166,14 +133,8 @@ public void validate() {
if (sku() != null) {
sku().validate();
}
- if (dataLocationToServiceLocationMap() != null) {
- dataLocationToServiceLocationMap().forEach(e -> e.validate());
- }
- if (capacity() != null) {
- capacity().validate();
- }
- if (costs() != null) {
- costs().forEach(e -> e.validate());
+ if (innerProperties() != null) {
+ innerProperties().validate();
}
}
}
diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/SkuProperties.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/SkuProperties.java
new file mode 100644
index 000000000000..98933452325d
--- /dev/null
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/SkuProperties.java
@@ -0,0 +1,139 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.databox.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.resourcemanager.databox.models.DataLocationToServiceLocationMap;
+import com.azure.resourcemanager.databox.models.SkuCapacity;
+import com.azure.resourcemanager.databox.models.SkuCost;
+import com.azure.resourcemanager.databox.models.SkuDisabledReason;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Properties of the sku. */
+@Immutable
+public final class SkuProperties {
+ /*
+ * The map of data location to service location.
+ */
+ @JsonProperty(value = "dataLocationToServiceLocationMap", access = JsonProperty.Access.WRITE_ONLY)
+ private List dataLocationToServiceLocationMap;
+
+ /*
+ * Capacity of the Sku.
+ */
+ @JsonProperty(value = "capacity", access = JsonProperty.Access.WRITE_ONLY)
+ private SkuCapacity capacity;
+
+ /*
+ * Cost of the Sku.
+ */
+ @JsonProperty(value = "costs", access = JsonProperty.Access.WRITE_ONLY)
+ private List costs;
+
+ /*
+ * Api versions that support this Sku.
+ */
+ @JsonProperty(value = "apiVersions", access = JsonProperty.Access.WRITE_ONLY)
+ private List apiVersions;
+
+ /*
+ * Reason why the Sku is disabled.
+ */
+ @JsonProperty(value = "disabledReason", access = JsonProperty.Access.WRITE_ONLY)
+ private SkuDisabledReason disabledReason;
+
+ /*
+ * Message for why the Sku is disabled.
+ */
+ @JsonProperty(value = "disabledReasonMessage", access = JsonProperty.Access.WRITE_ONLY)
+ private String disabledReasonMessage;
+
+ /*
+ * Required feature to access the sku.
+ */
+ @JsonProperty(value = "requiredFeature", access = JsonProperty.Access.WRITE_ONLY)
+ private String requiredFeature;
+
+ /**
+ * Get the dataLocationToServiceLocationMap property: The map of data location to service location.
+ *
+ * @return the dataLocationToServiceLocationMap value.
+ */
+ public List dataLocationToServiceLocationMap() {
+ return this.dataLocationToServiceLocationMap;
+ }
+
+ /**
+ * Get the capacity property: Capacity of the Sku.
+ *
+ * @return the capacity value.
+ */
+ public SkuCapacity capacity() {
+ return this.capacity;
+ }
+
+ /**
+ * Get the costs property: Cost of the Sku.
+ *
+ * @return the costs value.
+ */
+ public List costs() {
+ return this.costs;
+ }
+
+ /**
+ * Get the apiVersions property: Api versions that support this Sku.
+ *
+ * @return the apiVersions value.
+ */
+ public List apiVersions() {
+ return this.apiVersions;
+ }
+
+ /**
+ * Get the disabledReason property: Reason why the Sku is disabled.
+ *
+ * @return the disabledReason value.
+ */
+ public SkuDisabledReason disabledReason() {
+ return this.disabledReason;
+ }
+
+ /**
+ * Get the disabledReasonMessage property: Message for why the Sku is disabled.
+ *
+ * @return the disabledReasonMessage value.
+ */
+ public String disabledReasonMessage() {
+ return this.disabledReasonMessage;
+ }
+
+ /**
+ * Get the requiredFeature property: Required feature to access the sku.
+ *
+ * @return the requiredFeature value.
+ */
+ public String requiredFeature() {
+ return this.requiredFeature;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (dataLocationToServiceLocationMap() != null) {
+ dataLocationToServiceLocationMap().forEach(e -> e.validate());
+ }
+ if (capacity() != null) {
+ capacity().validate();
+ }
+ if (costs() != null) {
+ costs().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/UnencryptedCredentialsInner.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/UnencryptedCredentialsInner.java
index a03f62932fbf..a4c8dfd54091 100644
--- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/UnencryptedCredentialsInner.java
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/UnencryptedCredentialsInner.java
@@ -5,16 +5,12 @@
package com.azure.resourcemanager.databox.fluent.models;
import com.azure.core.annotation.Immutable;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.databox.models.JobSecrets;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** Unencrypted credentials for accessing device. */
@Immutable
public final class UnencryptedCredentialsInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(UnencryptedCredentialsInner.class);
-
/*
* Name of the job.
*/
diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/UpdateJobProperties.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/UpdateJobProperties.java
new file mode 100644
index 000000000000..2cd7142ba156
--- /dev/null
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/UpdateJobProperties.java
@@ -0,0 +1,50 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.databox.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.databox.models.UpdateJobDetails;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Job Properties for update. */
+@Fluent
+public final class UpdateJobProperties {
+ /*
+ * Details of a job to be updated.
+ */
+ @JsonProperty(value = "details")
+ private UpdateJobDetails details;
+
+ /**
+ * Get the details property: Details of a job to be updated.
+ *
+ * @return the details value.
+ */
+ public UpdateJobDetails details() {
+ return this.details;
+ }
+
+ /**
+ * Set the details property: Details of a job to be updated.
+ *
+ * @param details the details value to set.
+ * @return the UpdateJobProperties object itself.
+ */
+ public UpdateJobProperties withDetails(UpdateJobDetails details) {
+ this.details = details;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (details() != null) {
+ details().validate();
+ }
+ }
+}
diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/ValidationResponseInner.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/ValidationResponseInner.java
index 8bb1ab9e27ad..400ba314e631 100644
--- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/ValidationResponseInner.java
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/ValidationResponseInner.java
@@ -5,32 +5,28 @@
package com.azure.resourcemanager.databox.fluent.models;
import com.azure.core.annotation.Immutable;
-import com.azure.core.annotation.JsonFlatten;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.databox.models.OverallValidationStatus;
import com.azure.resourcemanager.databox.models.ValidationInputResponse;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/** Response of pre job creation validations. */
-@JsonFlatten
@Immutable
-public class ValidationResponseInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ValidationResponseInner.class);
-
+public final class ValidationResponseInner {
/*
- * Overall validation status.
+ * Properties of pre job creation validation response.
*/
- @JsonProperty(value = "properties.status", access = JsonProperty.Access.WRITE_ONLY)
- private OverallValidationStatus status;
+ @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY)
+ private ValidationResponseProperties innerProperties;
- /*
- * List of response details contain validationType and its response as key
- * and value respectively.
+ /**
+ * Get the innerProperties property: Properties of pre job creation validation response.
+ *
+ * @return the innerProperties value.
*/
- @JsonProperty(value = "properties.individualResponseDetails", access = JsonProperty.Access.WRITE_ONLY)
- private List individualResponseDetails;
+ private ValidationResponseProperties innerProperties() {
+ return this.innerProperties;
+ }
/**
* Get the status property: Overall validation status.
@@ -38,7 +34,7 @@ public class ValidationResponseInner {
* @return the status value.
*/
public OverallValidationStatus status() {
- return this.status;
+ return this.innerProperties() == null ? null : this.innerProperties().status();
}
/**
@@ -48,7 +44,7 @@ public OverallValidationStatus status() {
* @return the individualResponseDetails value.
*/
public List individualResponseDetails() {
- return this.individualResponseDetails;
+ return this.innerProperties() == null ? null : this.innerProperties().individualResponseDetails();
}
/**
@@ -57,8 +53,8 @@ public List individualResponseDetails() {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
- if (individualResponseDetails() != null) {
- individualResponseDetails().forEach(e -> e.validate());
+ if (innerProperties() != null) {
+ innerProperties().validate();
}
}
}
diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/ValidationResponseProperties.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/ValidationResponseProperties.java
new file mode 100644
index 000000000000..51375c834939
--- /dev/null
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/ValidationResponseProperties.java
@@ -0,0 +1,57 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.databox.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.resourcemanager.databox.models.OverallValidationStatus;
+import com.azure.resourcemanager.databox.models.ValidationInputResponse;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Properties of pre job creation validation response. */
+@Immutable
+public final class ValidationResponseProperties {
+ /*
+ * Overall validation status.
+ */
+ @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY)
+ private OverallValidationStatus status;
+
+ /*
+ * List of response details contain validationType and its response as key and value respectively.
+ */
+ @JsonProperty(value = "individualResponseDetails", access = JsonProperty.Access.WRITE_ONLY)
+ private List individualResponseDetails;
+
+ /**
+ * Get the status property: Overall validation status.
+ *
+ * @return the status value.
+ */
+ public OverallValidationStatus status() {
+ return this.status;
+ }
+
+ /**
+ * Get the individualResponseDetails property: List of response details contain validationType and its response as
+ * key and value respectively.
+ *
+ * @return the individualResponseDetails value.
+ */
+ public List individualResponseDetails() {
+ return this.individualResponseDetails;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (individualResponseDetails() != null) {
+ individualResponseDetails().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/AddressValidationOutputImpl.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/AddressValidationOutputImpl.java
index fcfdd52da733..1c94805d6142 100644
--- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/AddressValidationOutputImpl.java
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/AddressValidationOutputImpl.java
@@ -23,10 +23,6 @@ public final class AddressValidationOutputImpl implements AddressValidationOutpu
this.serviceManager = serviceManager;
}
- public CloudError error() {
- return this.innerModel().error();
- }
-
public AddressValidationStatus validationStatus() {
return this.innerModel().validationStatus();
}
@@ -40,6 +36,10 @@ public List alternateAddresses() {
}
}
+ public CloudError error() {
+ return this.innerModel().error();
+ }
+
public AddressValidationOutputInner innerModel() {
return this.innerObject;
}
diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/DataBoxManagementClientBuilder.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/DataBoxManagementClientBuilder.java
index bb86febc870b..12f16d3eeb31 100644
--- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/DataBoxManagementClientBuilder.java
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/DataBoxManagementClientBuilder.java
@@ -7,7 +7,6 @@
import com.azure.core.annotation.ServiceClientBuilder;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpPipelineBuilder;
-import com.azure.core.http.policy.CookiePolicy;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.management.AzureEnvironment;
@@ -67,34 +66,34 @@ public DataBoxManagementClientBuilder environment(AzureEnvironment environment)
}
/*
- * The default poll interval for long-running operation
+ * The HTTP pipeline to send requests through
*/
- private Duration defaultPollInterval;
+ private HttpPipeline pipeline;
/**
- * Sets The default poll interval for long-running operation.
+ * Sets The HTTP pipeline to send requests through.
*
- * @param defaultPollInterval the defaultPollInterval value.
+ * @param pipeline the pipeline value.
* @return the DataBoxManagementClientBuilder.
*/
- public DataBoxManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) {
- this.defaultPollInterval = defaultPollInterval;
+ public DataBoxManagementClientBuilder pipeline(HttpPipeline pipeline) {
+ this.pipeline = pipeline;
return this;
}
/*
- * The HTTP pipeline to send requests through
+ * The default poll interval for long-running operation
*/
- private HttpPipeline pipeline;
+ private Duration defaultPollInterval;
/**
- * Sets The HTTP pipeline to send requests through.
+ * Sets The default poll interval for long-running operation.
*
- * @param pipeline the pipeline value.
+ * @param defaultPollInterval the defaultPollInterval value.
* @return the DataBoxManagementClientBuilder.
*/
- public DataBoxManagementClientBuilder pipeline(HttpPipeline pipeline) {
- this.pipeline = pipeline;
+ public DataBoxManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) {
+ this.defaultPollInterval = defaultPollInterval;
return this;
}
@@ -120,27 +119,26 @@ public DataBoxManagementClientBuilder serializerAdapter(SerializerAdapter serial
* @return an instance of DataBoxManagementClientImpl.
*/
public DataBoxManagementClientImpl buildClient() {
- if (endpoint == null) {
- this.endpoint = "https://management.azure.com";
- }
- if (environment == null) {
- this.environment = AzureEnvironment.AZURE;
- }
- if (defaultPollInterval == null) {
- this.defaultPollInterval = Duration.ofSeconds(30);
- }
- if (pipeline == null) {
- this.pipeline =
- new HttpPipelineBuilder()
- .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy())
- .build();
- }
- if (serializerAdapter == null) {
- this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter();
- }
+ String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com";
+ AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE;
+ HttpPipeline localPipeline =
+ (pipeline != null)
+ ? pipeline
+ : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build();
+ Duration localDefaultPollInterval =
+ (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30);
+ SerializerAdapter localSerializerAdapter =
+ (serializerAdapter != null)
+ ? serializerAdapter
+ : SerializerFactory.createDefaultManagementSerializerAdapter();
DataBoxManagementClientImpl client =
new DataBoxManagementClientImpl(
- pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint);
+ localPipeline,
+ localSerializerAdapter,
+ localDefaultPollInterval,
+ localEnvironment,
+ subscriptionId,
+ localEndpoint);
return client;
}
}
diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/DataBoxManagementClientImpl.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/DataBoxManagementClientImpl.java
index 906b858913c1..0373c6197f39 100644
--- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/DataBoxManagementClientImpl.java
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/DataBoxManagementClientImpl.java
@@ -15,6 +15,7 @@
import com.azure.core.management.polling.PollResult;
import com.azure.core.management.polling.PollerFactory;
import com.azure.core.util.Context;
+import com.azure.core.util.CoreUtils;
import com.azure.core.util.logging.ClientLogger;
import com.azure.core.util.polling.AsyncPollResponse;
import com.azure.core.util.polling.LongRunningOperationStatus;
@@ -32,15 +33,12 @@
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.time.Duration;
-import java.util.Map;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
/** Initializes a new instance of the DataBoxManagementClientImpl type. */
@ServiceClient(builder = DataBoxManagementClientBuilder.class)
public final class DataBoxManagementClientImpl implements DataBoxManagementClient {
- private final ClientLogger logger = new ClientLogger(DataBoxManagementClientImpl.class);
-
/** The Subscription Id. */
private final String subscriptionId;
@@ -183,7 +181,7 @@ public ServicesClient getServices() {
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
- this.apiVersion = "2021-03-01";
+ this.apiVersion = "2022-02-01";
this.operations = new OperationsClientImpl(this);
this.jobs = new JobsClientImpl(this);
this.resourceProviders = new ResourceProvidersClientImpl(this);
@@ -206,10 +204,7 @@ public Context getContext() {
* @return the merged context.
*/
public Context mergeContext(Context context) {
- for (Map.Entry