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 =
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..6106b3d2c146
--- /dev/null
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/JobProperties.java
@@ -0,0 +1,284 @@
+// 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..11dfcf956325 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,16 +5,12 @@
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}
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..26ccd2c67374 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.
*/
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..c752361ae27a
--- /dev/null
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/fluent/models/ValidationResponseProperties.java
@@ -0,0 +1,58 @@
+// 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..1d96d13616a3 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;
}
@@ -126,15 +125,12 @@ public DataBoxManagementClientImpl buildClient() {
if (environment == null) {
this.environment = AzureEnvironment.AZURE;
}
+ if (pipeline == null) {
+ this.pipeline = new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build();
+ }
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();
}
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..6a7d7f4d8728 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
@@ -39,8 +39,6 @@
/** 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);
@@ -273,7 +271,7 @@ public Mono getLroFinalResultOrError(AsyncPollResponse,
managementError = null;
}
} catch (IOException | RuntimeException ioe) {
- logger.logThrowableAsWarning(ioe);
+ LOGGER.logThrowableAsWarning(ioe);
}
}
} else {
@@ -332,4 +330,6 @@ public Mono getBodyAsString(Charset charset) {
return Mono.just(new String(responseBody, charset));
}
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(DataBoxManagementClientImpl.class);
}
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 0796988c8944..e37ef9c50296 100644
--- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobResourceImpl.java
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobResourceImpl.java
@@ -17,6 +17,7 @@
import com.azure.resourcemanager.databox.models.JobDetails;
import com.azure.resourcemanager.databox.models.JobResource;
import com.azure.resourcemanager.databox.models.JobResourceUpdateParameter;
+import com.azure.resourcemanager.databox.models.MarkDevicesShippedRequest;
import com.azure.resourcemanager.databox.models.ResourceIdentity;
import com.azure.resourcemanager.databox.models.ShipmentPickUpRequest;
import com.azure.resourcemanager.databox.models.ShipmentPickUpResponse;
@@ -63,6 +64,14 @@ public SystemData systemData() {
return this.innerModel().systemData();
}
+ public Sku sku() {
+ return this.innerModel().sku();
+ }
+
+ public ResourceIdentity identity() {
+ return this.innerModel().identity();
+ }
+
public TransferType transferType() {
return this.innerModel().transferType();
}
@@ -115,14 +124,6 @@ public Boolean isCancellableWithoutFee() {
return this.innerModel().isCancellableWithoutFee();
}
- public Sku sku() {
- return this.innerModel().sku();
- }
-
- public ResourceIdentity identity() {
- return this.innerModel().identity();
- }
-
public Region region() {
return Region.fromName(this.regionName());
}
@@ -226,6 +227,17 @@ public JobResource refresh(Context context) {
return this;
}
+ public void markDevicesShipped(MarkDevicesShippedRequest markDevicesShippedRequest) {
+ serviceManager.jobs().markDevicesShipped(jobName, resourceGroupName, markDevicesShippedRequest);
+ }
+
+ public Response markDevicesShippedWithResponse(
+ MarkDevicesShippedRequest markDevicesShippedRequest, Context context) {
+ return serviceManager
+ .jobs()
+ .markDevicesShippedWithResponse(jobName, resourceGroupName, markDevicesShippedRequest, context);
+ }
+
public ShipmentPickUpResponse bookShipmentPickUp(ShipmentPickUpRequest shipmentPickUpRequest) {
return serviceManager.jobs().bookShipmentPickUp(resourceGroupName, jobName, shipmentPickUpRequest);
}
@@ -263,13 +275,13 @@ public JobResourceImpl withRegion(String location) {
return this;
}
- public JobResourceImpl withTransferType(TransferType transferType) {
- this.innerModel().withTransferType(transferType);
+ public JobResourceImpl withSku(Sku sku) {
+ this.innerModel().withSku(sku);
return this;
}
- public JobResourceImpl withSku(Sku sku) {
- this.innerModel().withSku(sku);
+ public JobResourceImpl withTransferType(TransferType transferType) {
+ this.innerModel().withTransferType(transferType);
return this;
}
@@ -283,6 +295,16 @@ public JobResourceImpl withTags(Map tags) {
}
}
+ public JobResourceImpl withIdentity(ResourceIdentity identity) {
+ if (isInCreateMode()) {
+ this.innerModel().withIdentity(identity);
+ return this;
+ } else {
+ this.updateJobResourceUpdateParameter.withIdentity(identity);
+ return this;
+ }
+ }
+
public JobResourceImpl withDetails(JobDetails details) {
this.innerModel().withDetails(details);
return this;
@@ -298,16 +320,6 @@ public JobResourceImpl withDeliveryInfo(JobDeliveryInfo deliveryInfo) {
return this;
}
- public JobResourceImpl withIdentity(ResourceIdentity identity) {
- if (isInCreateMode()) {
- this.innerModel().withIdentity(identity);
- return this;
- } else {
- this.updateJobResourceUpdateParameter.withIdentity(identity);
- return this;
- }
- }
-
public JobResourceImpl withDetails(UpdateJobDetails details) {
this.updateJobResourceUpdateParameter.withDetails(details);
return this;
diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobsClientImpl.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobsClientImpl.java
index 8fa80fdd8093..100e3105fb63 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
@@ -31,7 +31,6 @@
import com.azure.core.management.polling.PollResult;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.core.util.polling.PollerFlux;
import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.databox.fluent.JobsClient;
@@ -41,6 +40,7 @@
import com.azure.resourcemanager.databox.models.CancellationReason;
import com.azure.resourcemanager.databox.models.JobResourceList;
import com.azure.resourcemanager.databox.models.JobResourceUpdateParameter;
+import com.azure.resourcemanager.databox.models.MarkDevicesShippedRequest;
import com.azure.resourcemanager.databox.models.ShipmentPickUpRequest;
import com.azure.resourcemanager.databox.models.UnencryptedCredentialsList;
import java.nio.ByteBuffer;
@@ -49,8 +49,6 @@
/** An instance of this class provides access to all the operations defined in JobsClient. */
public final class JobsClientImpl implements JobsClient {
- private final ClientLogger logger = new ClientLogger(JobsClientImpl.class);
-
/** The proxy service used to perform REST calls. */
private final JobsService service;
@@ -86,6 +84,22 @@ Mono> list(
@HeaderParam("Accept") String accept,
Context context);
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs"
+ + "/{jobName}/markDevicesShipped")
+ @ExpectedResponses({204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> markDevicesShipped(
+ @HostParam("$host") String endpoint,
+ @PathParam("jobName") String jobName,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") MarkDevicesShippedRequest markDevicesShippedRequest,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
@Headers({"Content-Type: application/json"})
@Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs")
@ExpectedResponses({200})
@@ -238,7 +252,7 @@ Mono> listByResourceGroupNext(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource Collection.
+ * @return job Resource Collection along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync(String skipToken) {
@@ -286,7 +300,7 @@ private Mono> listSinglePageAsync(String skipTok
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource Collection.
+ * @return job Resource Collection along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync(String skipToken, Context context) {
@@ -330,7 +344,7 @@ private Mono> listSinglePageAsync(String skipTok
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource Collection.
+ * @return job Resource Collection as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync(String skipToken) {
@@ -342,7 +356,7 @@ private PagedFlux listAsync(String skipToken) {
*
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource Collection.
+ * @return job Resource Collection as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync() {
@@ -358,7 +372,7 @@ private PagedFlux listAsync() {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource Collection.
+ * @return job Resource Collection as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync(String skipToken, Context context) {
@@ -371,7 +385,7 @@ private PagedFlux listAsync(String skipToken, Context context)
*
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource Collection.
+ * @return job Resource Collection as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list() {
@@ -387,13 +401,191 @@ public PagedIterable list() {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource Collection.
+ * @return job Resource Collection as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(String skipToken, Context context) {
return new PagedIterable<>(listAsync(skipToken, context));
}
+ /**
+ * Request to mark devices for a given job as shipped.
+ *
+ * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
+ * 24 characters in length and use any alphanumeric and underscore only.
+ * @param resourceGroupName The Resource Group Name.
+ * @param markDevicesShippedRequest Mark Devices Shipped Request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> markDevicesShippedWithResponseAsync(
+ String jobName, String resourceGroupName, MarkDevicesShippedRequest markDevicesShippedRequest) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (jobName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (markDevicesShippedRequest == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter markDevicesShippedRequest is required and cannot be null."));
+ } else {
+ markDevicesShippedRequest.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .markDevicesShipped(
+ this.client.getEndpoint(),
+ jobName,
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ this.client.getApiVersion(),
+ markDevicesShippedRequest,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Request to mark devices for a given job as shipped.
+ *
+ * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
+ * 24 characters in length and use any alphanumeric and underscore only.
+ * @param resourceGroupName The Resource Group Name.
+ * @param markDevicesShippedRequest Mark Devices Shipped Request.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> markDevicesShippedWithResponseAsync(
+ String jobName,
+ String resourceGroupName,
+ MarkDevicesShippedRequest markDevicesShippedRequest,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (jobName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (markDevicesShippedRequest == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter markDevicesShippedRequest is required and cannot be null."));
+ } else {
+ markDevicesShippedRequest.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .markDevicesShipped(
+ this.client.getEndpoint(),
+ jobName,
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ this.client.getApiVersion(),
+ markDevicesShippedRequest,
+ accept,
+ context);
+ }
+
+ /**
+ * Request to mark devices for a given job as shipped.
+ *
+ * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
+ * 24 characters in length and use any alphanumeric and underscore only.
+ * @param resourceGroupName The Resource Group Name.
+ * @param markDevicesShippedRequest Mark Devices Shipped Request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono markDevicesShippedAsync(
+ String jobName, String resourceGroupName, MarkDevicesShippedRequest markDevicesShippedRequest) {
+ return markDevicesShippedWithResponseAsync(jobName, resourceGroupName, markDevicesShippedRequest)
+ .flatMap((Response res) -> Mono.empty());
+ }
+
+ /**
+ * Request to mark devices for a given job as shipped.
+ *
+ * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
+ * 24 characters in length and use any alphanumeric and underscore only.
+ * @param resourceGroupName The Resource Group Name.
+ * @param markDevicesShippedRequest Mark Devices Shipped Request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void markDevicesShipped(
+ String jobName, String resourceGroupName, MarkDevicesShippedRequest markDevicesShippedRequest) {
+ markDevicesShippedAsync(jobName, resourceGroupName, markDevicesShippedRequest).block();
+ }
+
+ /**
+ * Request to mark devices for a given job as shipped.
+ *
+ * @param jobName The name of the job Resource within the specified resource group. job names must be between 3 and
+ * 24 characters in length and use any alphanumeric and underscore only.
+ * @param resourceGroupName The Resource Group Name.
+ * @param markDevicesShippedRequest Mark Devices Shipped Request.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response markDevicesShippedWithResponse(
+ String jobName,
+ String resourceGroupName,
+ MarkDevicesShippedRequest markDevicesShippedRequest,
+ Context context) {
+ return markDevicesShippedWithResponseAsync(jobName, resourceGroupName, markDevicesShippedRequest, context)
+ .block();
+ }
+
/**
* Lists all the jobs available under the given resource group.
*
@@ -402,7 +594,7 @@ public PagedIterable list(String skipToken, Context context) {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource Collection.
+ * @return job Resource Collection along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listByResourceGroupSinglePageAsync(
@@ -457,7 +649,7 @@ private Mono> listByResourceGroupSinglePageAsync
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource Collection.
+ * @return job Resource Collection along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listByResourceGroupSinglePageAsync(
@@ -508,7 +700,7 @@ private Mono> listByResourceGroupSinglePageAsync
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource Collection.
+ * @return job Resource Collection as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listByResourceGroupAsync(String resourceGroupName, String skipToken) {
@@ -524,7 +716,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGrou
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource Collection.
+ * @return job Resource Collection as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
@@ -543,7 +735,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGrou
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource Collection.
+ * @return job Resource Collection as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listByResourceGroupAsync(
@@ -560,7 +752,7 @@ private PagedFlux listByResourceGroupAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource Collection.
+ * @return job Resource Collection as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable listByResourceGroup(String resourceGroupName) {
@@ -577,7 +769,7 @@ public PagedIterable listByResourceGroup(String resourceGroupN
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource Collection.
+ * @return job Resource Collection as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable listByResourceGroup(
@@ -595,7 +787,7 @@ public PagedIterable listByResourceGroup(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return information about the specified job.
+ * @return information about the specified job along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getByResourceGroupWithResponseAsync(
@@ -647,7 +839,7 @@ private Mono> getByResourceGroupWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return information about the specified job.
+ * @return information about the specified job along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getByResourceGroupWithResponseAsync(
@@ -695,7 +887,7 @@ private Mono> getByResourceGroupWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return information about the specified job.
+ * @return information about the specified job on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono getByResourceGroupAsync(String resourceGroupName, String jobName, String expand) {
@@ -719,7 +911,7 @@ private Mono getByResourceGroupAsync(String resourceGroupName,
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return information about the specified job.
+ * @return information about the specified job on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono getByResourceGroupAsync(String resourceGroupName, String jobName) {
@@ -763,7 +955,7 @@ public JobResourceInner getByResourceGroup(String resourceGroupName, String jobN
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return information about the specified job.
+ * @return information about the specified job along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response getByResourceGroupWithResponse(
@@ -782,7 +974,7 @@ public Response getByResourceGroupWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource.
+ * @return job Resource along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> createWithResponseAsync(
@@ -840,7 +1032,7 @@ private Mono>> createWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource.
+ * @return job Resource along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> createWithResponseAsync(
@@ -894,16 +1086,20 @@ private Mono>> createWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource.
+ * @return the {@link PollerFlux} for polling of job Resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, JobResourceInner> beginCreateAsync(
String resourceGroupName, String jobName, JobResourceInner jobResource) {
Mono>> mono = createWithResponseAsync(resourceGroupName, jobName, jobResource);
return this
.client
.getLroResult(
- mono, this.client.getHttpPipeline(), JobResourceInner.class, JobResourceInner.class, Context.NONE);
+ mono,
+ this.client.getHttpPipeline(),
+ JobResourceInner.class,
+ JobResourceInner.class,
+ this.client.getContext());
}
/**
@@ -918,9 +1114,9 @@ private PollerFlux, JobResourceInner> beginCreateAs
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource.
+ * @return the {@link PollerFlux} for polling of job Resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, JobResourceInner> beginCreateAsync(
String resourceGroupName, String jobName, JobResourceInner jobResource, Context context) {
context = this.client.mergeContext(context);
@@ -943,9 +1139,9 @@ private PollerFlux, JobResourceInner> beginCreateAs
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource.
+ * @return the {@link SyncPoller} for polling of job Resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, JobResourceInner> beginCreate(
String resourceGroupName, String jobName, JobResourceInner jobResource) {
return beginCreateAsync(resourceGroupName, jobName, jobResource).getSyncPoller();
@@ -963,9 +1159,9 @@ public SyncPoller, JobResourceInner> beginCreate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource.
+ * @return the {@link SyncPoller} for polling of job Resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, JobResourceInner> beginCreate(
String resourceGroupName, String jobName, JobResourceInner jobResource, Context context) {
return beginCreateAsync(resourceGroupName, jobName, jobResource, context).getSyncPoller();
@@ -982,7 +1178,7 @@ public SyncPoller, JobResourceInner> beginCreate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource.
+ * @return job Resource on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono createAsync(String resourceGroupName, String jobName, JobResourceInner jobResource) {
@@ -1003,7 +1199,7 @@ private Mono createAsync(String resourceGroupName, String jobN
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource.
+ * @return job Resource on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono createAsync(
@@ -1060,7 +1256,7 @@ public JobResourceInner create(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> deleteWithResponseAsync(String resourceGroupName, String jobName) {
@@ -1109,7 +1305,7 @@ private Mono>> deleteWithResponseAsync(String resource
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> deleteWithResponseAsync(
@@ -1155,14 +1351,15 @@ private Mono>> deleteWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link PollerFlux} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String jobName) {
Mono>> mono = deleteWithResponseAsync(resourceGroupName, jobName);
return this
.client
- .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE);
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
}
/**
@@ -1175,9 +1372,9 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link PollerFlux} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginDeleteAsync(
String resourceGroupName, String jobName, Context context) {
context = this.client.mergeContext(context);
@@ -1196,9 +1393,9 @@ private PollerFlux, Void> beginDeleteAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginDelete(String resourceGroupName, String jobName) {
return beginDeleteAsync(resourceGroupName, jobName).getSyncPoller();
}
@@ -1213,9 +1410,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName,
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginDelete(String resourceGroupName, String jobName, Context context) {
return beginDeleteAsync(resourceGroupName, jobName, context).getSyncPoller();
}
@@ -1229,7 +1426,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName,
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono deleteAsync(String resourceGroupName, String jobName) {
@@ -1246,7 +1443,7 @@ private Mono deleteAsync(String resourceGroupName, String jobName) {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono deleteAsync(String resourceGroupName, String jobName, Context context) {
@@ -1298,7 +1495,7 @@ public void delete(String resourceGroupName, String jobName, Context context) {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource.
+ * @return job Resource along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> updateWithResponseAsync(
@@ -1364,7 +1561,7 @@ private Mono>> updateWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource.
+ * @return job Resource along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> updateWithResponseAsync(
@@ -1427,9 +1624,9 @@ private Mono>> updateWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource.
+ * @return the {@link PollerFlux} for polling of job Resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, JobResourceInner> beginUpdateAsync(
String resourceGroupName,
String jobName,
@@ -1440,7 +1637,11 @@ private PollerFlux, JobResourceInner> beginUpdateAs
return this
.client
.getLroResult(
- mono, this.client.getHttpPipeline(), JobResourceInner.class, JobResourceInner.class, Context.NONE);
+ mono,
+ this.client.getHttpPipeline(),
+ JobResourceInner.class,
+ JobResourceInner.class,
+ this.client.getContext());
}
/**
@@ -1456,9 +1657,9 @@ private PollerFlux, JobResourceInner> beginUpdateAs
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource.
+ * @return the {@link PollerFlux} for polling of job Resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, JobResourceInner> beginUpdateAsync(
String resourceGroupName,
String jobName,
@@ -1486,9 +1687,9 @@ private PollerFlux, JobResourceInner> beginUpdateAs
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource.
+ * @return the {@link SyncPoller} for polling of job Resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, JobResourceInner> beginUpdate(
String resourceGroupName,
String jobName,
@@ -1510,9 +1711,9 @@ public SyncPoller, JobResourceInner> beginUpdate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource.
+ * @return the {@link SyncPoller} for polling of job Resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, JobResourceInner> beginUpdate(
String resourceGroupName,
String jobName,
@@ -1535,7 +1736,7 @@ public SyncPoller, JobResourceInner> beginUpdate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource.
+ * @return job Resource on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono updateAsync(
@@ -1558,7 +1759,7 @@ private Mono updateAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource.
+ * @return job Resource on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono updateAsync(
@@ -1582,7 +1783,7 @@ private Mono updateAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource.
+ * @return job Resource on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono updateAsync(
@@ -1673,7 +1874,7 @@ public JobResourceInner update(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return shipment pick up response.
+ * @return shipment pick up response along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> bookShipmentPickUpWithResponseAsync(
@@ -1731,7 +1932,7 @@ private Mono> bookShipmentPickUpWithRespon
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return shipment pick up response.
+ * @return shipment pick up response along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> bookShipmentPickUpWithResponseAsync(
@@ -1785,7 +1986,7 @@ private Mono> bookShipmentPickUpWithRespon
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return shipment pick up response.
+ * @return shipment pick up response on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono bookShipmentPickUpAsync(
@@ -1830,7 +2031,7 @@ public ShipmentPickUpResponseInner bookShipmentPickUp(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return shipment pick up response.
+ * @return shipment pick up response along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response bookShipmentPickUpWithResponse(
@@ -1848,7 +2049,7 @@ public Response bookShipmentPickUpWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> cancelWithResponseAsync(
@@ -1906,7 +2107,7 @@ private Mono> cancelWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> cancelWithResponseAsync(
@@ -1960,7 +2161,7 @@ private Mono> cancelWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono cancelAsync(String resourceGroupName, String jobName, CancellationReason cancellationReason) {
@@ -1995,7 +2196,7 @@ public void cancel(String resourceGroupName, String jobName, CancellationReason
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response cancelWithResponse(
@@ -2012,7 +2213,8 @@ public Response cancelWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return list of unencrypted credentials for accessing device.
+ * @return list of unencrypted credentials for accessing device along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listCredentialsSinglePageAsync(
@@ -2066,7 +2268,8 @@ private Mono> listCredentialsSinglePa
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return list of unencrypted credentials for accessing device.
+ * @return list of unencrypted credentials for accessing device along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listCredentialsSinglePageAsync(
@@ -2116,7 +2319,7 @@ private Mono> listCredentialsSinglePa
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return list of unencrypted credentials for accessing device.
+ * @return list of unencrypted credentials for accessing device as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listCredentialsAsync(String resourceGroupName, String jobName) {
@@ -2133,7 +2336,7 @@ private PagedFlux listCredentialsAsync(String resou
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return list of unencrypted credentials for accessing device.
+ * @return list of unencrypted credentials for accessing device as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listCredentialsAsync(
@@ -2150,7 +2353,7 @@ private PagedFlux listCredentialsAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return list of unencrypted credentials for accessing device.
+ * @return list of unencrypted credentials for accessing device as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable listCredentials(String resourceGroupName, String jobName) {
@@ -2167,7 +2370,7 @@ public PagedIterable listCredentials(String resourc
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return list of unencrypted credentials for accessing device.
+ * @return list of unencrypted credentials for accessing device as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable listCredentials(
@@ -2182,7 +2385,7 @@ public PagedIterable listCredentials(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource Collection.
+ * @return job Resource Collection along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listNextSinglePageAsync(String nextLink) {
@@ -2218,7 +2421,7 @@ private Mono> listNextSinglePageAsync(String nex
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource Collection.
+ * @return job Resource Collection along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listNextSinglePageAsync(String nextLink, Context context) {
@@ -2253,7 +2456,7 @@ private Mono> listNextSinglePageAsync(String nex
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource Collection.
+ * @return job Resource Collection along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) {
@@ -2290,7 +2493,7 @@ private Mono> listByResourceGroupNextSinglePageA
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return job Resource Collection.
+ * @return job Resource Collection along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listByResourceGroupNextSinglePageAsync(
diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobsImpl.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobsImpl.java
index a1b270e846c8..f04d52c5d10c 100644
--- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobsImpl.java
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/JobsImpl.java
@@ -16,13 +16,13 @@
import com.azure.resourcemanager.databox.models.CancellationReason;
import com.azure.resourcemanager.databox.models.JobResource;
import com.azure.resourcemanager.databox.models.Jobs;
+import com.azure.resourcemanager.databox.models.MarkDevicesShippedRequest;
import com.azure.resourcemanager.databox.models.ShipmentPickUpRequest;
import com.azure.resourcemanager.databox.models.ShipmentPickUpResponse;
import com.azure.resourcemanager.databox.models.UnencryptedCredentials;
-import com.fasterxml.jackson.annotation.JsonIgnore;
public final class JobsImpl implements Jobs {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(JobsImpl.class);
+ private static final ClientLogger LOGGER = new ClientLogger(JobsImpl.class);
private final JobsClient innerClient;
@@ -43,6 +43,21 @@ public PagedIterable list(String skipToken, Context context) {
return Utils.mapPage(inner, inner1 -> new JobResourceImpl(inner1, this.manager()));
}
+ public void markDevicesShipped(
+ String jobName, String resourceGroupName, MarkDevicesShippedRequest markDevicesShippedRequest) {
+ this.serviceClient().markDevicesShipped(jobName, resourceGroupName, markDevicesShippedRequest);
+ }
+
+ public Response markDevicesShippedWithResponse(
+ String jobName,
+ String resourceGroupName,
+ MarkDevicesShippedRequest markDevicesShippedRequest,
+ Context context) {
+ return this
+ .serviceClient()
+ .markDevicesShippedWithResponse(jobName, resourceGroupName, markDevicesShippedRequest, context);
+ }
+
public PagedIterable listByResourceGroup(String resourceGroupName) {
PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName);
return Utils.mapPage(inner, inner1 -> new JobResourceImpl(inner1, this.manager()));
@@ -139,7 +154,7 @@ public PagedIterable listCredentials(
public JobResource getById(String id) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -147,7 +162,7 @@ public JobResource getById(String id) {
}
String jobName = Utils.getValueFromIdByName(id, "jobs");
if (jobName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id)));
@@ -159,7 +174,7 @@ public JobResource getById(String id) {
public Response getByIdWithResponse(String id, String expand, Context context) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -167,7 +182,7 @@ public Response getByIdWithResponse(String id, String expand, Conte
}
String jobName = Utils.getValueFromIdByName(id, "jobs");
if (jobName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id)));
@@ -178,7 +193,7 @@ public Response getByIdWithResponse(String id, String expand, Conte
public void deleteById(String id) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -186,7 +201,7 @@ public void deleteById(String id) {
}
String jobName = Utils.getValueFromIdByName(id, "jobs");
if (jobName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id)));
@@ -197,7 +212,7 @@ public void deleteById(String id) {
public void deleteByIdWithResponse(String id, Context context) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -205,7 +220,7 @@ public void deleteByIdWithResponse(String id, Context context) {
}
String jobName = Utils.getValueFromIdByName(id, "jobs");
if (jobName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id)));
diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/OperationsClientImpl.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/OperationsClientImpl.java
index dfcdbfb4e323..7f8be42a30db 100644
--- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/OperationsClientImpl.java
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/OperationsClientImpl.java
@@ -25,7 +25,6 @@
import com.azure.core.management.exception.ManagementException;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.databox.fluent.OperationsClient;
import com.azure.resourcemanager.databox.fluent.models.OperationInner;
import com.azure.resourcemanager.databox.models.OperationList;
@@ -33,8 +32,6 @@
/** An instance of this class provides access to all the operations defined in OperationsClient. */
public final class OperationsClientImpl implements OperationsClient {
- private final ClientLogger logger = new ClientLogger(OperationsClientImpl.class);
-
/** The proxy service used to perform REST calls. */
private final OperationsService service;
@@ -85,7 +82,7 @@ Mono> listNext(
*
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return operation Collection.
+ * @return operation Collection along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync() {
@@ -118,7 +115,7 @@ private Mono> listSinglePageAsync() {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return operation Collection.
+ * @return operation Collection along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync(Context context) {
@@ -148,7 +145,7 @@ private Mono> listSinglePageAsync(Context context)
*
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return operation Collection.
+ * @return operation Collection as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync() {
@@ -162,7 +159,7 @@ private PagedFlux listAsync() {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return operation Collection.
+ * @return operation Collection as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync(Context context) {
@@ -175,7 +172,7 @@ private PagedFlux listAsync(Context context) {
*
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return operation Collection.
+ * @return operation Collection as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list() {
@@ -189,7 +186,7 @@ public PagedIterable list() {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return operation Collection.
+ * @return operation Collection as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(Context context) {
@@ -203,7 +200,7 @@ public PagedIterable list(Context context) {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return operation Collection.
+ * @return operation Collection along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listNextSinglePageAsync(String nextLink) {
@@ -239,7 +236,7 @@ private Mono> listNextSinglePageAsync(String nextL
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return operation Collection.
+ * @return operation Collection along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listNextSinglePageAsync(String nextLink, Context context) {
diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/OperationsImpl.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/OperationsImpl.java
index 86f6c14ed924..cfbd77850792 100644
--- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/OperationsImpl.java
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/OperationsImpl.java
@@ -11,10 +11,9 @@
import com.azure.resourcemanager.databox.fluent.models.OperationInner;
import com.azure.resourcemanager.databox.models.Operation;
import com.azure.resourcemanager.databox.models.Operations;
-import com.fasterxml.jackson.annotation.JsonIgnore;
public final class OperationsImpl implements Operations {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationsImpl.class);
+ private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class);
private final OperationsClient innerClient;
diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/RegionConfigurationResponseImpl.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/RegionConfigurationResponseImpl.java
index c353222533c1..5b072243eaf9 100644
--- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/RegionConfigurationResponseImpl.java
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/RegionConfigurationResponseImpl.java
@@ -5,6 +5,7 @@
package com.azure.resourcemanager.databox.implementation;
import com.azure.resourcemanager.databox.fluent.models.RegionConfigurationResponseInner;
+import com.azure.resourcemanager.databox.models.DatacenterAddressResponse;
import com.azure.resourcemanager.databox.models.RegionConfigurationResponse;
import com.azure.resourcemanager.databox.models.ScheduleAvailabilityResponse;
import com.azure.resourcemanager.databox.models.TransportAvailabilityResponse;
@@ -28,6 +29,10 @@ public TransportAvailabilityResponse transportAvailabilityResponse() {
return this.innerModel().transportAvailabilityResponse();
}
+ public DatacenterAddressResponse datacenterAddressResponse() {
+ return this.innerModel().datacenterAddressResponse();
+ }
+
public RegionConfigurationResponseInner innerModel() {
return this.innerObject;
}
diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ResourceProvidersClientImpl.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ResourceProvidersClientImpl.java
index 216f5fc70d43..3dbfbb2fe411 100644
--- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ResourceProvidersClientImpl.java
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ResourceProvidersClientImpl.java
@@ -22,15 +22,12 @@
import com.azure.core.management.exception.ManagementException;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.databox.fluent.ResourceProvidersClient;
import com.azure.resourcemanager.databox.models.MitigateJobRequest;
import reactor.core.publisher.Mono;
/** An instance of this class provides access to all the operations defined in ResourceProvidersClient. */
public final class ResourceProvidersClientImpl implements ResourceProvidersClient {
- private final ClientLogger logger = new ClientLogger(ResourceProvidersClientImpl.class);
-
/** The proxy service used to perform REST calls. */
private final ResourceProvidersService service;
@@ -82,7 +79,7 @@ Mono> mitigate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> mitigateWithResponseAsync(
@@ -140,7 +137,7 @@ private Mono> mitigateWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> mitigateWithResponseAsync(
@@ -194,7 +191,7 @@ private Mono> mitigateWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono mitigateAsync(String jobName, String resourceGroupName, MitigateJobRequest mitigateJobRequest) {
@@ -229,7 +226,7 @@ public void mitigate(String jobName, String resourceGroupName, MitigateJobReques
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response mitigateWithResponse(
diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ResourceProvidersImpl.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ResourceProvidersImpl.java
index ef10b19e9cc3..f00385d24bec 100644
--- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ResourceProvidersImpl.java
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ResourceProvidersImpl.java
@@ -10,10 +10,9 @@
import com.azure.resourcemanager.databox.fluent.ResourceProvidersClient;
import com.azure.resourcemanager.databox.models.MitigateJobRequest;
import com.azure.resourcemanager.databox.models.ResourceProviders;
-import com.fasterxml.jackson.annotation.JsonIgnore;
public final class ResourceProvidersImpl implements ResourceProviders {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceProvidersImpl.class);
+ private static final ClientLogger LOGGER = new ClientLogger(ResourceProvidersImpl.class);
private final ResourceProvidersClient innerClient;
diff --git a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ServicesClientImpl.java b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ServicesClientImpl.java
index 3eda4a3f3eba..7dff0797dd35 100644
--- a/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ServicesClientImpl.java
+++ b/sdk/databox/azure-resourcemanager-databox/src/main/java/com/azure/resourcemanager/databox/implementation/ServicesClientImpl.java
@@ -27,7 +27,6 @@
import com.azure.core.management.exception.ManagementException;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.databox.fluent.ServicesClient;
import com.azure.resourcemanager.databox.fluent.models.AddressValidationOutputInner;
import com.azure.resourcemanager.databox.fluent.models.RegionConfigurationResponseInner;
@@ -42,8 +41,6 @@
/** An instance of this class provides access to all the operations defined in ServicesClient. */
public final class ServicesClientImpl implements ServicesClient {
- private final ClientLogger logger = new ClientLogger(ServicesClientImpl.class);
-
/** The proxy service used to perform REST calls. */
private final ServicesService service;
@@ -174,7 +171,8 @@ Mono> listAvailableSkusByResourceGroupNext(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the available skus operation response.
+ * @return the available skus operation response along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listAvailableSkusByResourceGroupSinglePageAsync(
@@ -240,7 +238,8 @@ private Mono> listAvailableSkusByResourceGrou
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the available skus operation response.
+ * @return the available skus operation response along with {@link PagedResponse} on successful completion of {@link
+ * Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listAvailableSkusByResourceGroupSinglePageAsync(
@@ -302,7 +301,7 @@ private Mono> listAvailableSkusByResourceGrou
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the available skus operation response.
+ * @return the available skus operation response as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAvailableSkusByResourceGroupAsync(
@@ -322,7 +321,7 @@ private PagedFlux listAvailableSkusByResourceGroupAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the available skus operation response.
+ * @return the available skus operation response as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAvailableSkusByResourceGroupAsync(
@@ -343,7 +342,7 @@ private PagedFlux