scopes = new ArrayList<>();
+ private RetryPolicy retryPolicy;
+ private RetryOptions retryOptions;
+ private Duration defaultPollInterval;
+
+ private Configurable() {
+ }
+
+ /**
+ * Sets the http client.
+ *
+ * @param httpClient the HTTP client.
+ * @return the configurable object itself.
+ */
+ public Configurable withHttpClient(HttpClient httpClient) {
+ this.httpClient = Objects.requireNonNull(httpClient, "'httpClient' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Sets the logging options to the HTTP pipeline.
+ *
+ * @param httpLogOptions the HTTP log options.
+ * @return the configurable object itself.
+ */
+ public Configurable withLogOptions(HttpLogOptions httpLogOptions) {
+ this.httpLogOptions = Objects.requireNonNull(httpLogOptions, "'httpLogOptions' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Adds the pipeline policy to the HTTP pipeline.
+ *
+ * @param policy the HTTP pipeline policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withPolicy(HttpPipelinePolicy policy) {
+ this.policies.add(Objects.requireNonNull(policy, "'policy' cannot be null."));
+ 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.
+ *
+ * @param retryPolicy the HTTP pipeline retry policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
+ this.retryPolicy = Objects.requireNonNull(retryPolicy, "'retryPolicy' cannot be null.");
+ 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.
+ *
+ * @param defaultPollInterval the default poll interval.
+ * @return the configurable object itself.
+ */
+ public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
+ this.defaultPollInterval =
+ Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
+ if (this.defaultPollInterval.isNegative()) {
+ throw LOGGER
+ .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative"));
+ }
+ return this;
+ }
+
+ /**
+ * Creates an instance of StorageMover service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the StorageMover service API instance.
+ */
+ public StorageMoverManager authenticate(TokenCredential credential, AzureProfile profile) {
+ Objects.requireNonNull(credential, "'credential' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+
+ StringBuilder userAgentBuilder = new StringBuilder();
+ userAgentBuilder
+ .append("azsdk-java")
+ .append("-")
+ .append("com.azure.resourcemanager.storagemover")
+ .append("/")
+ .append("1.0.0-beta.1");
+ if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
+ userAgentBuilder
+ .append(" (")
+ .append(Configuration.getGlobalConfiguration().get("java.version"))
+ .append("; ")
+ .append(Configuration.getGlobalConfiguration().get("os.name"))
+ .append("; ")
+ .append(Configuration.getGlobalConfiguration().get("os.version"))
+ .append("; auto-generated)");
+ } else {
+ userAgentBuilder.append(" (auto-generated)");
+ }
+
+ if (scopes.isEmpty()) {
+ scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
+ }
+ if (retryPolicy == null) {
+ 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
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
+ .collect(Collectors.toList()));
+ HttpPolicyProviders.addAfterRetryPolicies(policies);
+ policies.add(new HttpLoggingPolicy(httpLogOptions));
+ HttpPipeline httpPipeline =
+ new HttpPipelineBuilder()
+ .httpClient(httpClient)
+ .policies(policies.toArray(new HttpPipelinePolicy[0]))
+ .build();
+ return new StorageMoverManager(httpPipeline, profile, defaultPollInterval);
+ }
+ }
+
+ /**
+ * Gets the resource collection API of Operations.
+ *
+ * @return Resource collection API of Operations.
+ */
+ public Operations operations() {
+ if (this.operations == null) {
+ this.operations = new OperationsImpl(clientObject.getOperations(), this);
+ }
+ return operations;
+ }
+
+ /**
+ * Gets the resource collection API of StorageMovers. It manages StorageMover.
+ *
+ * @return Resource collection API of StorageMovers.
+ */
+ public StorageMovers storageMovers() {
+ if (this.storageMovers == null) {
+ this.storageMovers = new StorageMoversImpl(clientObject.getStorageMovers(), this);
+ }
+ return storageMovers;
+ }
+
+ /**
+ * Gets the resource collection API of Agents. It manages Agent.
+ *
+ * @return Resource collection API of Agents.
+ */
+ public Agents agents() {
+ if (this.agents == null) {
+ this.agents = new AgentsImpl(clientObject.getAgents(), this);
+ }
+ return agents;
+ }
+
+ /**
+ * Gets the resource collection API of Endpoints. It manages Endpoint.
+ *
+ * @return Resource collection API of Endpoints.
+ */
+ public Endpoints endpoints() {
+ if (this.endpoints == null) {
+ this.endpoints = new EndpointsImpl(clientObject.getEndpoints(), this);
+ }
+ return endpoints;
+ }
+
+ /**
+ * Gets the resource collection API of Projects. It manages Project.
+ *
+ * @return Resource collection API of Projects.
+ */
+ public Projects projects() {
+ if (this.projects == null) {
+ this.projects = new ProjectsImpl(clientObject.getProjects(), this);
+ }
+ return projects;
+ }
+
+ /**
+ * Gets the resource collection API of JobDefinitions. It manages JobDefinition.
+ *
+ * @return Resource collection API of JobDefinitions.
+ */
+ public JobDefinitions jobDefinitions() {
+ if (this.jobDefinitions == null) {
+ this.jobDefinitions = new JobDefinitionsImpl(clientObject.getJobDefinitions(), this);
+ }
+ return jobDefinitions;
+ }
+
+ /**
+ * Gets the resource collection API of JobRuns.
+ *
+ * @return Resource collection API of JobRuns.
+ */
+ public JobRuns jobRuns() {
+ if (this.jobRuns == null) {
+ this.jobRuns = new JobRunsImpl(clientObject.getJobRuns(), this);
+ }
+ return jobRuns;
+ }
+
+ /**
+ * @return Wrapped service client StorageMoverClient providing direct access to the underlying auto-generated API
+ * implementation, based on Azure REST API.
+ */
+ public StorageMoverClient serviceClient() {
+ return this.clientObject;
+ }
+}
diff --git a/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/AgentsClient.java b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/AgentsClient.java
new file mode 100644
index 0000000000000..c86aa6bbdd9d2
--- /dev/null
+++ b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/AgentsClient.java
@@ -0,0 +1,200 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagemover.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.storagemover.fluent.models.AgentInner;
+import com.azure.resourcemanager.storagemover.models.AgentUpdateParameters;
+
+/** An instance of this class provides access to all the operations defined in AgentsClient. */
+public interface AgentsClient {
+ /**
+ * Lists all agents in a Storage Mover.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @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 agents as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String storageMoverName);
+
+ /**
+ * Lists all agents in a Storage Mover.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @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 list of agents as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String storageMoverName, Context context);
+
+ /**
+ * Gets an agent resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param agentName The name of the agent resource.
+ * @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 an agent resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ AgentInner get(String resourceGroupName, String storageMoverName, String agentName);
+
+ /**
+ * Gets an agent resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param agentName The name of the agent resource.
+ * @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 an agent resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String storageMoverName, String agentName, Context context);
+
+ /**
+ * Creates or updates an agent resource, which references a hybrid compute machine that can run jobs.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param agentName The name of the agent resource.
+ * @param agent The agent resource.
+ * @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 agent resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ AgentInner createOrUpdate(String resourceGroupName, String storageMoverName, String agentName, AgentInner agent);
+
+ /**
+ * Creates or updates an agent resource, which references a hybrid compute machine that can run jobs.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param agentName The name of the agent resource.
+ * @param agent The agent resource.
+ * @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 agent resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(
+ String resourceGroupName, String storageMoverName, String agentName, AgentInner agent, Context context);
+
+ /**
+ * Creates or updates an agent resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param agentName The name of the agent resource.
+ * @param agent The agent resource.
+ * @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 agent resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ AgentInner update(String resourceGroupName, String storageMoverName, String agentName, AgentUpdateParameters agent);
+
+ /**
+ * Creates or updates an agent resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param agentName The name of the agent resource.
+ * @param agent The agent resource.
+ * @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 agent resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(
+ String resourceGroupName,
+ String storageMoverName,
+ String agentName,
+ AgentUpdateParameters agent,
+ Context context);
+
+ /**
+ * Deletes an agent resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param agentName The name of the agent resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String storageMoverName, String agentName);
+
+ /**
+ * Deletes an agent resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param agentName The name of the agent resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String storageMoverName, String agentName, Context context);
+
+ /**
+ * Deletes an agent resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param agentName The name of the agent resource.
+ * @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 delete(String resourceGroupName, String storageMoverName, String agentName);
+
+ /**
+ * Deletes an agent resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param agentName The name of the agent resource.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String storageMoverName, String agentName, Context context);
+}
diff --git a/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/EndpointsClient.java b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/EndpointsClient.java
new file mode 100644
index 0000000000000..af69a64d7cc05
--- /dev/null
+++ b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/EndpointsClient.java
@@ -0,0 +1,212 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagemover.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.storagemover.fluent.models.EndpointInner;
+import com.azure.resourcemanager.storagemover.models.EndpointBaseUpdateParameters;
+
+/** An instance of this class provides access to all the operations defined in EndpointsClient. */
+public interface EndpointsClient {
+ /**
+ * Lists all endpoints in a Storage Mover.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @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 endpoints as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String storageMoverName);
+
+ /**
+ * Lists all endpoints in a Storage Mover.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @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 list of endpoints as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String storageMoverName, Context context);
+
+ /**
+ * Gets an endpoint resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param endpointName The name of the endpoint resource.
+ * @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 an endpoint resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ EndpointInner get(String resourceGroupName, String storageMoverName, String endpointName);
+
+ /**
+ * Gets an endpoint resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param endpointName The name of the endpoint resource.
+ * @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 an endpoint resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String storageMoverName, String endpointName, Context context);
+
+ /**
+ * Creates or updates an endpoint resource, which represents a data transfer source or destination.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param endpointName The name of the endpoint resource.
+ * @param endpointParam The endpoint resource, which contains information about file sources and targets.
+ * @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 endpoint resource, which contains information about file sources and targets.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ EndpointInner createOrUpdate(
+ String resourceGroupName, String storageMoverName, String endpointName, EndpointInner endpointParam);
+
+ /**
+ * Creates or updates an endpoint resource, which represents a data transfer source or destination.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param endpointName The name of the endpoint resource.
+ * @param endpointParam The endpoint resource, which contains information about file sources and targets.
+ * @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 endpoint resource, which contains information about file sources and targets along with {@link
+ * Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(
+ String resourceGroupName,
+ String storageMoverName,
+ String endpointName,
+ EndpointInner endpointParam,
+ Context context);
+
+ /**
+ * Updates properties for an endpoint resource. Properties not specified in the request body will be unchanged.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param endpointName The name of the endpoint resource.
+ * @param endpointParam The endpoint resource.
+ * @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 endpoint resource, which contains information about file sources and targets.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ EndpointInner update(
+ String resourceGroupName,
+ String storageMoverName,
+ String endpointName,
+ EndpointBaseUpdateParameters endpointParam);
+
+ /**
+ * Updates properties for an endpoint resource. Properties not specified in the request body will be unchanged.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param endpointName The name of the endpoint resource.
+ * @param endpointParam The endpoint resource.
+ * @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 endpoint resource, which contains information about file sources and targets along with {@link
+ * Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(
+ String resourceGroupName,
+ String storageMoverName,
+ String endpointName,
+ EndpointBaseUpdateParameters endpointParam,
+ Context context);
+
+ /**
+ * Deletes an endpoint resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param endpointName The name of the endpoint resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String storageMoverName, String endpointName);
+
+ /**
+ * Deletes an endpoint resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param endpointName The name of the endpoint resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String storageMoverName, String endpointName, Context context);
+
+ /**
+ * Deletes an endpoint resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param endpointName The name of the endpoint resource.
+ * @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 delete(String resourceGroupName, String storageMoverName, String endpointName);
+
+ /**
+ * Deletes an endpoint resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param endpointName The name of the endpoint resource.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String storageMoverName, String endpointName, Context context);
+}
diff --git a/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/JobDefinitionsClient.java b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/JobDefinitionsClient.java
new file mode 100644
index 0000000000000..8dd7de0dc3472
--- /dev/null
+++ b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/JobDefinitionsClient.java
@@ -0,0 +1,321 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagemover.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.storagemover.fluent.models.JobDefinitionInner;
+import com.azure.resourcemanager.storagemover.fluent.models.JobRunResourceIdInner;
+import com.azure.resourcemanager.storagemover.models.JobDefinitionUpdateParameters;
+
+/** An instance of this class provides access to all the operations defined in JobDefinitionsClient. */
+public interface JobDefinitionsClient {
+ /**
+ * Lists all job definitions in a project.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @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 job definitions as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String storageMoverName, String projectName);
+
+ /**
+ * Lists all job definitions in a project.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @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 list of job definitions as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(
+ String resourceGroupName, String storageMoverName, String projectName, Context context);
+
+ /**
+ * Gets a job definition resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition resource.
+ * @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 a job definition resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ JobDefinitionInner get(
+ String resourceGroupName, String storageMoverName, String projectName, String jobDefinitionName);
+
+ /**
+ * Gets a job definition resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition resource.
+ * @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 a job definition resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName,
+ String storageMoverName,
+ String projectName,
+ String jobDefinitionName,
+ Context context);
+
+ /**
+ * Creates or updates a job definition resource, which contains configuration for a single unit of managed data
+ * transfer.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition resource.
+ * @param jobDefinition The job definition resource.
+ * @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 job definition resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ JobDefinitionInner createOrUpdate(
+ String resourceGroupName,
+ String storageMoverName,
+ String projectName,
+ String jobDefinitionName,
+ JobDefinitionInner jobDefinition);
+
+ /**
+ * Creates or updates a job definition resource, which contains configuration for a single unit of managed data
+ * transfer.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition resource.
+ * @param jobDefinition The job definition resource.
+ * @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 job definition resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(
+ String resourceGroupName,
+ String storageMoverName,
+ String projectName,
+ String jobDefinitionName,
+ JobDefinitionInner jobDefinition,
+ Context context);
+
+ /**
+ * Updates properties for a job definition resource. Properties not specified in the request body will be unchanged.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition resource.
+ * @param jobDefinition The job definition resource.
+ * @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 job definition resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ JobDefinitionInner update(
+ String resourceGroupName,
+ String storageMoverName,
+ String projectName,
+ String jobDefinitionName,
+ JobDefinitionUpdateParameters jobDefinition);
+
+ /**
+ * Updates properties for a job definition resource. Properties not specified in the request body will be unchanged.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition resource.
+ * @param jobDefinition The job definition resource.
+ * @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 job definition resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(
+ String resourceGroupName,
+ String storageMoverName,
+ String projectName,
+ String jobDefinitionName,
+ JobDefinitionUpdateParameters jobDefinition,
+ Context context);
+
+ /**
+ * Deletes a job definition resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String storageMoverName, String projectName, String jobDefinitionName);
+
+ /**
+ * Deletes a job definition resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName,
+ String storageMoverName,
+ String projectName,
+ String jobDefinitionName,
+ Context context);
+
+ /**
+ * Deletes a job definition resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition resource.
+ * @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 delete(String resourceGroupName, String storageMoverName, String projectName, String jobDefinitionName);
+
+ /**
+ * Deletes a job definition resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition resource.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(
+ String resourceGroupName,
+ String storageMoverName,
+ String projectName,
+ String jobDefinitionName,
+ Context context);
+
+ /**
+ * Requests an agent to start a new instance of this job definition, generating a new job run resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition resource.
+ * @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 that identifies a JobRun.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ JobRunResourceIdInner startJob(
+ String resourceGroupName, String storageMoverName, String projectName, String jobDefinitionName);
+
+ /**
+ * Requests an agent to start a new instance of this job definition, generating a new job run resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return response that identifies a JobRun along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response startJobWithResponse(
+ String resourceGroupName,
+ String storageMoverName,
+ String projectName,
+ String jobDefinitionName,
+ Context context);
+
+ /**
+ * Requests the agent of any active instance of this job definition to stop.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition resource.
+ * @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 that identifies a JobRun.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ JobRunResourceIdInner stopJob(
+ String resourceGroupName, String storageMoverName, String projectName, String jobDefinitionName);
+
+ /**
+ * Requests the agent of any active instance of this job definition to stop.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return response that identifies a JobRun along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response stopJobWithResponse(
+ String resourceGroupName,
+ String storageMoverName,
+ String projectName,
+ String jobDefinitionName,
+ Context context);
+}
diff --git a/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/JobRunsClient.java b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/JobRunsClient.java
new file mode 100644
index 0000000000000..f2cb08488e56a
--- /dev/null
+++ b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/JobRunsClient.java
@@ -0,0 +1,96 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagemover.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.storagemover.fluent.models.JobRunInner;
+
+/** An instance of this class provides access to all the operations defined in JobRunsClient. */
+public interface JobRunsClient {
+ /**
+ * Lists all job runs in a job definition.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition resource.
+ * @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 job runs as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(
+ String resourceGroupName, String storageMoverName, String projectName, String jobDefinitionName);
+
+ /**
+ * Lists all job runs in a job definition.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition resource.
+ * @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 list of job runs as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(
+ String resourceGroupName,
+ String storageMoverName,
+ String projectName,
+ String jobDefinitionName,
+ Context context);
+
+ /**
+ * Gets a job run resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition resource.
+ * @param jobRunName The name of the job run.
+ * @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 a job run resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ JobRunInner get(
+ String resourceGroupName,
+ String storageMoverName,
+ String projectName,
+ String jobDefinitionName,
+ String jobRunName);
+
+ /**
+ * Gets a job run resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition resource.
+ * @param jobRunName The name of the job run.
+ * @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 a job run resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName,
+ String storageMoverName,
+ String projectName,
+ String jobDefinitionName,
+ String jobRunName,
+ Context context);
+}
diff --git a/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/OperationsClient.java b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/OperationsClient.java
new file mode 100644
index 0000000000000..0e909ea35a0f4
--- /dev/null
+++ b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/OperationsClient.java
@@ -0,0 +1,38 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagemover.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.storagemover.fluent.models.OperationInner;
+
+/** An instance of this class provides access to all the operations defined in OperationsClient. */
+public interface OperationsClient {
+ /**
+ * Lists all the supported operations for the Azure Storage Mover REST API.
+ *
+ * @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 a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link
+ * PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Lists all the supported operations for the Azure Storage Mover REST API.
+ *
+ * @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 a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link
+ * PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+}
diff --git a/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/ProjectsClient.java b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/ProjectsClient.java
new file mode 100644
index 0000000000000..9a736d6c2eb4f
--- /dev/null
+++ b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/ProjectsClient.java
@@ -0,0 +1,203 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagemover.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.storagemover.fluent.models.ProjectInner;
+import com.azure.resourcemanager.storagemover.models.ProjectUpdateParameters;
+
+/** An instance of this class provides access to all the operations defined in ProjectsClient. */
+public interface ProjectsClient {
+ /**
+ * Lists all projects in a Storage Mover.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @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 project resources as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String storageMoverName);
+
+ /**
+ * Lists all projects in a Storage Mover.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @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 list of project resources as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String storageMoverName, Context context);
+
+ /**
+ * Gets a project resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @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 a project resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ProjectInner get(String resourceGroupName, String storageMoverName, String projectName);
+
+ /**
+ * Gets a project resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @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 a project resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String storageMoverName, String projectName, Context context);
+
+ /**
+ * Creates or updates a project resource, which is a logical grouping of related jobs.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param project The project resource.
+ * @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 project resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ProjectInner createOrUpdate(
+ String resourceGroupName, String storageMoverName, String projectName, ProjectInner project);
+
+ /**
+ * Creates or updates a project resource, which is a logical grouping of related jobs.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param project The project resource.
+ * @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 project resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(
+ String resourceGroupName, String storageMoverName, String projectName, ProjectInner project, Context context);
+
+ /**
+ * Updates properties for a project resource. Properties not specified in the request body will be unchanged.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param project The project resource.
+ * @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 project resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ProjectInner update(
+ String resourceGroupName, String storageMoverName, String projectName, ProjectUpdateParameters project);
+
+ /**
+ * Updates properties for a project resource. Properties not specified in the request body will be unchanged.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param project The project resource.
+ * @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 project resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(
+ String resourceGroupName,
+ String storageMoverName,
+ String projectName,
+ ProjectUpdateParameters project,
+ Context context);
+
+ /**
+ * Deletes a project resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String storageMoverName, String projectName);
+
+ /**
+ * Deletes a project resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String storageMoverName, String projectName, Context context);
+
+ /**
+ * Deletes a project resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @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 delete(String resourceGroupName, String storageMoverName, String projectName);
+
+ /**
+ * Deletes a project resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String storageMoverName, String projectName, Context context);
+}
diff --git a/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/StorageMoverClient.java b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/StorageMoverClient.java
new file mode 100644
index 0000000000000..369dec65da86d
--- /dev/null
+++ b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/StorageMoverClient.java
@@ -0,0 +1,95 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagemover.fluent;
+
+import com.azure.core.http.HttpPipeline;
+import java.time.Duration;
+
+/** The interface for StorageMoverClient class. */
+public interface StorageMoverClient {
+ /**
+ * Gets The ID of the target subscription.
+ *
+ * @return the subscriptionId value.
+ */
+ String getSubscriptionId();
+
+ /**
+ * Gets server parameter.
+ *
+ * @return the endpoint value.
+ */
+ String getEndpoint();
+
+ /**
+ * Gets Api Version.
+ *
+ * @return the apiVersion value.
+ */
+ String getApiVersion();
+
+ /**
+ * Gets The HTTP pipeline to send requests through.
+ *
+ * @return the httpPipeline value.
+ */
+ HttpPipeline getHttpPipeline();
+
+ /**
+ * Gets The default poll interval for long-running operation.
+ *
+ * @return the defaultPollInterval value.
+ */
+ Duration getDefaultPollInterval();
+
+ /**
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ OperationsClient getOperations();
+
+ /**
+ * Gets the StorageMoversClient object to access its operations.
+ *
+ * @return the StorageMoversClient object.
+ */
+ StorageMoversClient getStorageMovers();
+
+ /**
+ * Gets the AgentsClient object to access its operations.
+ *
+ * @return the AgentsClient object.
+ */
+ AgentsClient getAgents();
+
+ /**
+ * Gets the EndpointsClient object to access its operations.
+ *
+ * @return the EndpointsClient object.
+ */
+ EndpointsClient getEndpoints();
+
+ /**
+ * Gets the ProjectsClient object to access its operations.
+ *
+ * @return the ProjectsClient object.
+ */
+ ProjectsClient getProjects();
+
+ /**
+ * Gets the JobDefinitionsClient object to access its operations.
+ *
+ * @return the JobDefinitionsClient object.
+ */
+ JobDefinitionsClient getJobDefinitions();
+
+ /**
+ * Gets the JobRunsClient object to access its operations.
+ *
+ * @return the JobRunsClient object.
+ */
+ JobRunsClient getJobRuns();
+}
diff --git a/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/StorageMoversClient.java b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/StorageMoversClient.java
new file mode 100644
index 0000000000000..93873ecaef10b
--- /dev/null
+++ b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/StorageMoversClient.java
@@ -0,0 +1,210 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagemover.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.storagemover.fluent.models.StorageMoverInner;
+import com.azure.resourcemanager.storagemover.models.StorageMoverUpdateParameters;
+
+/** An instance of this class provides access to all the operations defined in StorageMoversClient. */
+public interface StorageMoversClient {
+ /**
+ * Lists all Storage Movers in a subscription.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of Storage Movers as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Lists all Storage Movers in a subscription.
+ *
+ * @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 list of Storage Movers as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+
+ /**
+ * Lists all Storage Movers in a resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of Storage Movers as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * Lists all Storage Movers in a resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 list of Storage Movers as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+
+ /**
+ * Gets a Storage Mover resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @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 a Storage Mover resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ StorageMoverInner getByResourceGroup(String resourceGroupName, String storageMoverName);
+
+ /**
+ * Gets a Storage Mover resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @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 a Storage Mover resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(
+ String resourceGroupName, String storageMoverName, Context context);
+
+ /**
+ * Creates or updates a top-level Storage Mover resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param storageMover The Storage Mover resource, which is a container for a group of Storage Mover agents and
+ * projects.
+ * @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 Storage Mover resource, which is a container for a group of Storage Mover agents and projects.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ StorageMoverInner createOrUpdate(String resourceGroupName, String storageMoverName, StorageMoverInner storageMover);
+
+ /**
+ * Creates or updates a top-level Storage Mover resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param storageMover The Storage Mover resource, which is a container for a group of Storage Mover agents and
+ * projects.
+ * @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 Storage Mover resource, which is a container for a group of Storage Mover agents and projects along
+ * with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(
+ String resourceGroupName, String storageMoverName, StorageMoverInner storageMover, Context context);
+
+ /**
+ * Updates properties for a Storage Mover resource. Properties not specified in the request body will be unchanged.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param storageMover The Storage Mover resource.
+ * @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 Storage Mover resource, which is a container for a group of Storage Mover agents and projects.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ StorageMoverInner update(
+ String resourceGroupName, String storageMoverName, StorageMoverUpdateParameters storageMover);
+
+ /**
+ * Updates properties for a Storage Mover resource. Properties not specified in the request body will be unchanged.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param storageMover The Storage Mover resource.
+ * @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 Storage Mover resource, which is a container for a group of Storage Mover agents and projects along
+ * with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(
+ String resourceGroupName, String storageMoverName, StorageMoverUpdateParameters storageMover, Context context);
+
+ /**
+ * Deletes a Storage Mover resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String storageMoverName);
+
+ /**
+ * Deletes a Storage Mover resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String storageMoverName, Context context);
+
+ /**
+ * Deletes a Storage Mover resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @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 delete(String resourceGroupName, String storageMoverName);
+
+ /**
+ * Deletes a Storage Mover resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String storageMoverName, Context context);
+}
diff --git a/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/models/AgentInner.java b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/models/AgentInner.java
new file mode 100644
index 0000000000000..7603a9f918952
--- /dev/null
+++ b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/models/AgentInner.java
@@ -0,0 +1,200 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagemover.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.storagemover.models.AgentPropertiesErrorDetails;
+import com.azure.resourcemanager.storagemover.models.AgentStatus;
+import com.azure.resourcemanager.storagemover.models.ProvisioningState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/** The agent resource. */
+@Fluent
+public final class AgentInner extends ProxyResource {
+ /*
+ * The properties property.
+ */
+ @JsonProperty(value = "properties")
+ private AgentProperties innerProperties;
+
+ /*
+ * Resource system metadata.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /**
+ * Get the innerProperties property: The properties property.
+ *
+ * @return the innerProperties value.
+ */
+ private AgentProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the systemData property: Resource system metadata.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the description property: A description for the agent.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.innerProperties() == null ? null : this.innerProperties().description();
+ }
+
+ /**
+ * Set the description property: A description for the agent.
+ *
+ * @param description the description value to set.
+ * @return the AgentInner object itself.
+ */
+ public AgentInner withDescription(String description) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new AgentProperties();
+ }
+ this.innerProperties().withDescription(description);
+ return this;
+ }
+
+ /**
+ * Get the agentVersion property: The agent version.
+ *
+ * @return the agentVersion value.
+ */
+ public String agentVersion() {
+ return this.innerProperties() == null ? null : this.innerProperties().agentVersion();
+ }
+
+ /**
+ * Get the arcResourceId property: The fully qualified resource ID of the hybrid compute resource for the agent.
+ *
+ * @return the arcResourceId value.
+ */
+ public String arcResourceId() {
+ return this.innerProperties() == null ? null : this.innerProperties().arcResourceId();
+ }
+
+ /**
+ * Set the arcResourceId property: The fully qualified resource ID of the hybrid compute resource for the agent.
+ *
+ * @param arcResourceId the arcResourceId value to set.
+ * @return the AgentInner object itself.
+ */
+ public AgentInner withArcResourceId(String arcResourceId) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new AgentProperties();
+ }
+ this.innerProperties().withArcResourceId(arcResourceId);
+ return this;
+ }
+
+ /**
+ * Get the arcVmUuid property: A GUID for this agent.
+ *
+ * @return the arcVmUuid value.
+ */
+ public String arcVmUuid() {
+ return this.innerProperties() == null ? null : this.innerProperties().arcVmUuid();
+ }
+
+ /**
+ * Set the arcVmUuid property: A GUID for this agent.
+ *
+ * @param arcVmUuid the arcVmUuid value to set.
+ * @return the AgentInner object itself.
+ */
+ public AgentInner withArcVmUuid(String arcVmUuid) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new AgentProperties();
+ }
+ this.innerProperties().withArcVmUuid(arcVmUuid);
+ return this;
+ }
+
+ /**
+ * Get the agentStatus property: The agent status.
+ *
+ * @return the agentStatus value.
+ */
+ public AgentStatus agentStatus() {
+ return this.innerProperties() == null ? null : this.innerProperties().agentStatus();
+ }
+
+ /**
+ * Get the lastStatusUpdate property: The last updated time of the agent status.
+ *
+ * @return the lastStatusUpdate value.
+ */
+ public OffsetDateTime lastStatusUpdate() {
+ return this.innerProperties() == null ? null : this.innerProperties().lastStatusUpdate();
+ }
+
+ /**
+ * Get the localIpAddress property: Local IP address reported by the agent.
+ *
+ * @return the localIpAddress value.
+ */
+ public String localIpAddress() {
+ return this.innerProperties() == null ? null : this.innerProperties().localIpAddress();
+ }
+
+ /**
+ * Get the memoryInMB property: Available memory reported by the agent, in MB.
+ *
+ * @return the memoryInMB value.
+ */
+ public Long memoryInMB() {
+ return this.innerProperties() == null ? null : this.innerProperties().memoryInMB();
+ }
+
+ /**
+ * Get the numberOfCores property: Available compute cores reported by the agent.
+ *
+ * @return the numberOfCores value.
+ */
+ public Long numberOfCores() {
+ return this.innerProperties() == null ? null : this.innerProperties().numberOfCores();
+ }
+
+ /**
+ * Get the errorDetails property: The errorDetails property.
+ *
+ * @return the errorDetails value.
+ */
+ public AgentPropertiesErrorDetails errorDetails() {
+ return this.innerProperties() == null ? null : this.innerProperties().errorDetails();
+ }
+
+ /**
+ * Get the provisioningState property: The provisioning state of this resource.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/models/AgentProperties.java b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/models/AgentProperties.java
new file mode 100644
index 0000000000000..368d5304c21e1
--- /dev/null
+++ b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/models/AgentProperties.java
@@ -0,0 +1,239 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagemover.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.storagemover.models.AgentPropertiesErrorDetails;
+import com.azure.resourcemanager.storagemover.models.AgentStatus;
+import com.azure.resourcemanager.storagemover.models.ProvisioningState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/** The AgentProperties model. */
+@Fluent
+public final class AgentProperties {
+ /*
+ * A description for the agent.
+ */
+ @JsonProperty(value = "description")
+ private String description;
+
+ /*
+ * The agent version.
+ */
+ @JsonProperty(value = "agentVersion", access = JsonProperty.Access.WRITE_ONLY)
+ private String agentVersion;
+
+ /*
+ * The fully qualified resource ID of the hybrid compute resource for the
+ * agent.
+ */
+ @JsonProperty(value = "arcResourceId", required = true)
+ private String arcResourceId;
+
+ /*
+ * A GUID for this agent.
+ */
+ @JsonProperty(value = "arcVmUuid", required = true)
+ private String arcVmUuid;
+
+ /*
+ * The agent status.
+ */
+ @JsonProperty(value = "agentStatus", access = JsonProperty.Access.WRITE_ONLY)
+ private AgentStatus agentStatus;
+
+ /*
+ * The last updated time of the agent status.
+ */
+ @JsonProperty(value = "lastStatusUpdate", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime lastStatusUpdate;
+
+ /*
+ * Local IP address reported by the agent.
+ */
+ @JsonProperty(value = "localIPAddress", access = JsonProperty.Access.WRITE_ONLY)
+ private String localIpAddress;
+
+ /*
+ * Available memory reported by the agent, in MB.
+ */
+ @JsonProperty(value = "memoryInMB", access = JsonProperty.Access.WRITE_ONLY)
+ private Long memoryInMB;
+
+ /*
+ * Available compute cores reported by the agent.
+ */
+ @JsonProperty(value = "numberOfCores", access = JsonProperty.Access.WRITE_ONLY)
+ private Long numberOfCores;
+
+ /*
+ * The errorDetails property.
+ */
+ @JsonProperty(value = "errorDetails", access = JsonProperty.Access.WRITE_ONLY)
+ private AgentPropertiesErrorDetails errorDetails;
+
+ /*
+ * The provisioning state of this resource.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningState provisioningState;
+
+ /**
+ * Get the description property: A description for the agent.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Set the description property: A description for the agent.
+ *
+ * @param description the description value to set.
+ * @return the AgentProperties object itself.
+ */
+ public AgentProperties withDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Get the agentVersion property: The agent version.
+ *
+ * @return the agentVersion value.
+ */
+ public String agentVersion() {
+ return this.agentVersion;
+ }
+
+ /**
+ * Get the arcResourceId property: The fully qualified resource ID of the hybrid compute resource for the agent.
+ *
+ * @return the arcResourceId value.
+ */
+ public String arcResourceId() {
+ return this.arcResourceId;
+ }
+
+ /**
+ * Set the arcResourceId property: The fully qualified resource ID of the hybrid compute resource for the agent.
+ *
+ * @param arcResourceId the arcResourceId value to set.
+ * @return the AgentProperties object itself.
+ */
+ public AgentProperties withArcResourceId(String arcResourceId) {
+ this.arcResourceId = arcResourceId;
+ return this;
+ }
+
+ /**
+ * Get the arcVmUuid property: A GUID for this agent.
+ *
+ * @return the arcVmUuid value.
+ */
+ public String arcVmUuid() {
+ return this.arcVmUuid;
+ }
+
+ /**
+ * Set the arcVmUuid property: A GUID for this agent.
+ *
+ * @param arcVmUuid the arcVmUuid value to set.
+ * @return the AgentProperties object itself.
+ */
+ public AgentProperties withArcVmUuid(String arcVmUuid) {
+ this.arcVmUuid = arcVmUuid;
+ return this;
+ }
+
+ /**
+ * Get the agentStatus property: The agent status.
+ *
+ * @return the agentStatus value.
+ */
+ public AgentStatus agentStatus() {
+ return this.agentStatus;
+ }
+
+ /**
+ * Get the lastStatusUpdate property: The last updated time of the agent status.
+ *
+ * @return the lastStatusUpdate value.
+ */
+ public OffsetDateTime lastStatusUpdate() {
+ return this.lastStatusUpdate;
+ }
+
+ /**
+ * Get the localIpAddress property: Local IP address reported by the agent.
+ *
+ * @return the localIpAddress value.
+ */
+ public String localIpAddress() {
+ return this.localIpAddress;
+ }
+
+ /**
+ * Get the memoryInMB property: Available memory reported by the agent, in MB.
+ *
+ * @return the memoryInMB value.
+ */
+ public Long memoryInMB() {
+ return this.memoryInMB;
+ }
+
+ /**
+ * Get the numberOfCores property: Available compute cores reported by the agent.
+ *
+ * @return the numberOfCores value.
+ */
+ public Long numberOfCores() {
+ return this.numberOfCores;
+ }
+
+ /**
+ * Get the errorDetails property: The errorDetails property.
+ *
+ * @return the errorDetails value.
+ */
+ public AgentPropertiesErrorDetails errorDetails() {
+ return this.errorDetails;
+ }
+
+ /**
+ * Get the provisioningState property: The provisioning state of this resource.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (arcResourceId() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property arcResourceId in model AgentProperties"));
+ }
+ if (arcVmUuid() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property arcVmUuid in model AgentProperties"));
+ }
+ if (errorDetails() != null) {
+ errorDetails().validate();
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(AgentProperties.class);
+}
diff --git a/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/models/AgentUpdateProperties.java b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/models/AgentUpdateProperties.java
new file mode 100644
index 0000000000000..db53acd5901b5
--- /dev/null
+++ b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/models/AgentUpdateProperties.java
@@ -0,0 +1,46 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagemover.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The AgentUpdateProperties model. */
+@Fluent
+public final class AgentUpdateProperties {
+ /*
+ * A description for the agent.
+ */
+ @JsonProperty(value = "description")
+ private String description;
+
+ /**
+ * Get the description property: A description for the agent.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Set the description property: A description for the agent.
+ *
+ * @param description the description value to set.
+ * @return the AgentUpdateProperties object itself.
+ */
+ public AgentUpdateProperties withDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/models/EndpointInner.java b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/models/EndpointInner.java
new file mode 100644
index 0000000000000..619409325708f
--- /dev/null
+++ b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/models/EndpointInner.java
@@ -0,0 +1,67 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagemover.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.storagemover.models.EndpointBaseProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The endpoint resource, which contains information about file sources and targets. */
+@Fluent
+public final class EndpointInner extends ProxyResource {
+ /*
+ * The resource specific properties for the Storage Mover resource.
+ */
+ @JsonProperty(value = "properties")
+ private EndpointBaseProperties properties;
+
+ /*
+ * Resource system metadata.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /**
+ * Get the properties property: The resource specific properties for the Storage Mover resource.
+ *
+ * @return the properties value.
+ */
+ public EndpointBaseProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: The resource specific properties for the Storage Mover resource.
+ *
+ * @param properties the properties value to set.
+ * @return the EndpointInner object itself.
+ */
+ public EndpointInner withProperties(EndpointBaseProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the systemData property: Resource system metadata.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() != null) {
+ properties().validate();
+ }
+ }
+}
diff --git a/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/models/JobDefinitionInner.java b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/models/JobDefinitionInner.java
new file mode 100644
index 0000000000000..89d8cd2974bc3
--- /dev/null
+++ b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/models/JobDefinitionInner.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.storagemover.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.storagemover.models.CopyMode;
+import com.azure.resourcemanager.storagemover.models.JobRunStatus;
+import com.azure.resourcemanager.storagemover.models.ProvisioningState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The job definition resource. */
+@Fluent
+public final class JobDefinitionInner extends ProxyResource {
+ /*
+ * Job definition properties.
+ */
+ @JsonProperty(value = "properties")
+ private JobDefinitionProperties innerProperties;
+
+ /*
+ * Resource system metadata.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /**
+ * Get the innerProperties property: Job definition properties.
+ *
+ * @return the innerProperties value.
+ */
+ private JobDefinitionProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the systemData property: Resource system metadata.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the description property: A description for the job definition.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.innerProperties() == null ? null : this.innerProperties().description();
+ }
+
+ /**
+ * Set the description property: A description for the job definition.
+ *
+ * @param description the description value to set.
+ * @return the JobDefinitionInner object itself.
+ */
+ public JobDefinitionInner withDescription(String description) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new JobDefinitionProperties();
+ }
+ this.innerProperties().withDescription(description);
+ return this;
+ }
+
+ /**
+ * Get the copyMode property: Strategy to use for copy.
+ *
+ * @return the copyMode value.
+ */
+ public CopyMode copyMode() {
+ return this.innerProperties() == null ? null : this.innerProperties().copyMode();
+ }
+
+ /**
+ * Set the copyMode property: Strategy to use for copy.
+ *
+ * @param copyMode the copyMode value to set.
+ * @return the JobDefinitionInner object itself.
+ */
+ public JobDefinitionInner withCopyMode(CopyMode copyMode) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new JobDefinitionProperties();
+ }
+ this.innerProperties().withCopyMode(copyMode);
+ return this;
+ }
+
+ /**
+ * Get the sourceName property: The name of the source endpoint.
+ *
+ * @return the sourceName value.
+ */
+ public String sourceName() {
+ return this.innerProperties() == null ? null : this.innerProperties().sourceName();
+ }
+
+ /**
+ * Set the sourceName property: The name of the source endpoint.
+ *
+ * @param sourceName the sourceName value to set.
+ * @return the JobDefinitionInner object itself.
+ */
+ public JobDefinitionInner withSourceName(String sourceName) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new JobDefinitionProperties();
+ }
+ this.innerProperties().withSourceName(sourceName);
+ return this;
+ }
+
+ /**
+ * Get the sourceResourceId property: Fully qualified resource ID of the source endpoint.
+ *
+ * @return the sourceResourceId value.
+ */
+ public String sourceResourceId() {
+ return this.innerProperties() == null ? null : this.innerProperties().sourceResourceId();
+ }
+
+ /**
+ * Get the sourceSubpath property: The subpath to use when reading from the source Endpoint.
+ *
+ * @return the sourceSubpath value.
+ */
+ public String sourceSubpath() {
+ return this.innerProperties() == null ? null : this.innerProperties().sourceSubpath();
+ }
+
+ /**
+ * Set the sourceSubpath property: The subpath to use when reading from the source Endpoint.
+ *
+ * @param sourceSubpath the sourceSubpath value to set.
+ * @return the JobDefinitionInner object itself.
+ */
+ public JobDefinitionInner withSourceSubpath(String sourceSubpath) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new JobDefinitionProperties();
+ }
+ this.innerProperties().withSourceSubpath(sourceSubpath);
+ return this;
+ }
+
+ /**
+ * Get the targetName property: The name of the target endpoint.
+ *
+ * @return the targetName value.
+ */
+ public String targetName() {
+ return this.innerProperties() == null ? null : this.innerProperties().targetName();
+ }
+
+ /**
+ * Set the targetName property: The name of the target endpoint.
+ *
+ * @param targetName the targetName value to set.
+ * @return the JobDefinitionInner object itself.
+ */
+ public JobDefinitionInner withTargetName(String targetName) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new JobDefinitionProperties();
+ }
+ this.innerProperties().withTargetName(targetName);
+ return this;
+ }
+
+ /**
+ * Get the targetResourceId property: Fully qualified resource ID of the target endpoint.
+ *
+ * @return the targetResourceId value.
+ */
+ public String targetResourceId() {
+ return this.innerProperties() == null ? null : this.innerProperties().targetResourceId();
+ }
+
+ /**
+ * Get the targetSubpath property: The subpath to use when writing to the target Endpoint.
+ *
+ * @return the targetSubpath value.
+ */
+ public String targetSubpath() {
+ return this.innerProperties() == null ? null : this.innerProperties().targetSubpath();
+ }
+
+ /**
+ * Set the targetSubpath property: The subpath to use when writing to the target Endpoint.
+ *
+ * @param targetSubpath the targetSubpath value to set.
+ * @return the JobDefinitionInner object itself.
+ */
+ public JobDefinitionInner withTargetSubpath(String targetSubpath) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new JobDefinitionProperties();
+ }
+ this.innerProperties().withTargetSubpath(targetSubpath);
+ return this;
+ }
+
+ /**
+ * Get the latestJobRunName property: The name of the job run in a non-terminal state, if exists.
+ *
+ * @return the latestJobRunName value.
+ */
+ public String latestJobRunName() {
+ return this.innerProperties() == null ? null : this.innerProperties().latestJobRunName();
+ }
+
+ /**
+ * Get the latestJobRunResourceId property: The fully qualified resource ID of the job run in a non-terminal state,
+ * if exists.
+ *
+ * @return the latestJobRunResourceId value.
+ */
+ public String latestJobRunResourceId() {
+ return this.innerProperties() == null ? null : this.innerProperties().latestJobRunResourceId();
+ }
+
+ /**
+ * Get the latestJobRunStatus property: The current status of the job run in a non-terminal state, if exists.
+ *
+ * @return the latestJobRunStatus value.
+ */
+ public JobRunStatus latestJobRunStatus() {
+ return this.innerProperties() == null ? null : this.innerProperties().latestJobRunStatus();
+ }
+
+ /**
+ * Get the agentName property: Name of the agent to assign for new job runs of this definition.
+ *
+ * @return the agentName value.
+ */
+ public String agentName() {
+ return this.innerProperties() == null ? null : this.innerProperties().agentName();
+ }
+
+ /**
+ * Set the agentName property: Name of the agent to assign for new job runs of this definition.
+ *
+ * @param agentName the agentName value to set.
+ * @return the JobDefinitionInner object itself.
+ */
+ public JobDefinitionInner withAgentName(String agentName) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new JobDefinitionProperties();
+ }
+ this.innerProperties().withAgentName(agentName);
+ return this;
+ }
+
+ /**
+ * Get the agentResourceId property: Fully qualified resource id of the agent to assign for new job runs of this
+ * definition.
+ *
+ * @return the agentResourceId value.
+ */
+ public String agentResourceId() {
+ return this.innerProperties() == null ? null : this.innerProperties().agentResourceId();
+ }
+
+ /**
+ * Get the provisioningState property: The provisioning state of this resource.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/models/JobDefinitionProperties.java b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/models/JobDefinitionProperties.java
new file mode 100644
index 0000000000000..faf7ff87ac45c
--- /dev/null
+++ b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/models/JobDefinitionProperties.java
@@ -0,0 +1,329 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagemover.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.storagemover.models.CopyMode;
+import com.azure.resourcemanager.storagemover.models.JobRunStatus;
+import com.azure.resourcemanager.storagemover.models.ProvisioningState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Job definition properties. */
+@Fluent
+public final class JobDefinitionProperties {
+ /*
+ * A description for the job definition.
+ */
+ @JsonProperty(value = "description")
+ private String description;
+
+ /*
+ * Strategy to use for copy.
+ */
+ @JsonProperty(value = "copyMode")
+ private CopyMode copyMode;
+
+ /*
+ * The name of the source endpoint.
+ */
+ @JsonProperty(value = "sourceName", required = true)
+ private String sourceName;
+
+ /*
+ * Fully qualified resource ID of the source endpoint.
+ */
+ @JsonProperty(value = "sourceResourceId", access = JsonProperty.Access.WRITE_ONLY)
+ private String sourceResourceId;
+
+ /*
+ * The subpath to use when reading from the source Endpoint.
+ */
+ @JsonProperty(value = "sourceSubpath")
+ private String sourceSubpath;
+
+ /*
+ * The name of the target endpoint.
+ */
+ @JsonProperty(value = "targetName", required = true)
+ private String targetName;
+
+ /*
+ * Fully qualified resource ID of the target endpoint.
+ */
+ @JsonProperty(value = "targetResourceId", access = JsonProperty.Access.WRITE_ONLY)
+ private String targetResourceId;
+
+ /*
+ * The subpath to use when writing to the target Endpoint.
+ */
+ @JsonProperty(value = "targetSubpath")
+ private String targetSubpath;
+
+ /*
+ * The name of the job run in a non-terminal state, if exists.
+ */
+ @JsonProperty(value = "latestJobRunName", access = JsonProperty.Access.WRITE_ONLY)
+ private String latestJobRunName;
+
+ /*
+ * The fully qualified resource ID of the job run in a non-terminal state,
+ * if exists.
+ */
+ @JsonProperty(value = "latestJobRunResourceId", access = JsonProperty.Access.WRITE_ONLY)
+ private String latestJobRunResourceId;
+
+ /*
+ * The current status of the job run in a non-terminal state, if exists.
+ */
+ @JsonProperty(value = "latestJobRunStatus", access = JsonProperty.Access.WRITE_ONLY)
+ private JobRunStatus latestJobRunStatus;
+
+ /*
+ * Name of the agent to assign for new job runs of this definition.
+ */
+ @JsonProperty(value = "agentName")
+ private String agentName;
+
+ /*
+ * Fully qualified resource id of the agent to assign for new job runs of
+ * this definition.
+ */
+ @JsonProperty(value = "agentResourceId", access = JsonProperty.Access.WRITE_ONLY)
+ private String agentResourceId;
+
+ /*
+ * The provisioning state of this resource.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningState provisioningState;
+
+ /**
+ * Get the description property: A description for the job definition.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Set the description property: A description for the job definition.
+ *
+ * @param description the description value to set.
+ * @return the JobDefinitionProperties object itself.
+ */
+ public JobDefinitionProperties withDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Get the copyMode property: Strategy to use for copy.
+ *
+ * @return the copyMode value.
+ */
+ public CopyMode copyMode() {
+ return this.copyMode;
+ }
+
+ /**
+ * Set the copyMode property: Strategy to use for copy.
+ *
+ * @param copyMode the copyMode value to set.
+ * @return the JobDefinitionProperties object itself.
+ */
+ public JobDefinitionProperties withCopyMode(CopyMode copyMode) {
+ this.copyMode = copyMode;
+ return this;
+ }
+
+ /**
+ * Get the sourceName property: The name of the source endpoint.
+ *
+ * @return the sourceName value.
+ */
+ public String sourceName() {
+ return this.sourceName;
+ }
+
+ /**
+ * Set the sourceName property: The name of the source endpoint.
+ *
+ * @param sourceName the sourceName value to set.
+ * @return the JobDefinitionProperties object itself.
+ */
+ public JobDefinitionProperties withSourceName(String sourceName) {
+ this.sourceName = sourceName;
+ return this;
+ }
+
+ /**
+ * Get the sourceResourceId property: Fully qualified resource ID of the source endpoint.
+ *
+ * @return the sourceResourceId value.
+ */
+ public String sourceResourceId() {
+ return this.sourceResourceId;
+ }
+
+ /**
+ * Get the sourceSubpath property: The subpath to use when reading from the source Endpoint.
+ *
+ * @return the sourceSubpath value.
+ */
+ public String sourceSubpath() {
+ return this.sourceSubpath;
+ }
+
+ /**
+ * Set the sourceSubpath property: The subpath to use when reading from the source Endpoint.
+ *
+ * @param sourceSubpath the sourceSubpath value to set.
+ * @return the JobDefinitionProperties object itself.
+ */
+ public JobDefinitionProperties withSourceSubpath(String sourceSubpath) {
+ this.sourceSubpath = sourceSubpath;
+ return this;
+ }
+
+ /**
+ * Get the targetName property: The name of the target endpoint.
+ *
+ * @return the targetName value.
+ */
+ public String targetName() {
+ return this.targetName;
+ }
+
+ /**
+ * Set the targetName property: The name of the target endpoint.
+ *
+ * @param targetName the targetName value to set.
+ * @return the JobDefinitionProperties object itself.
+ */
+ public JobDefinitionProperties withTargetName(String targetName) {
+ this.targetName = targetName;
+ return this;
+ }
+
+ /**
+ * Get the targetResourceId property: Fully qualified resource ID of the target endpoint.
+ *
+ * @return the targetResourceId value.
+ */
+ public String targetResourceId() {
+ return this.targetResourceId;
+ }
+
+ /**
+ * Get the targetSubpath property: The subpath to use when writing to the target Endpoint.
+ *
+ * @return the targetSubpath value.
+ */
+ public String targetSubpath() {
+ return this.targetSubpath;
+ }
+
+ /**
+ * Set the targetSubpath property: The subpath to use when writing to the target Endpoint.
+ *
+ * @param targetSubpath the targetSubpath value to set.
+ * @return the JobDefinitionProperties object itself.
+ */
+ public JobDefinitionProperties withTargetSubpath(String targetSubpath) {
+ this.targetSubpath = targetSubpath;
+ return this;
+ }
+
+ /**
+ * Get the latestJobRunName property: The name of the job run in a non-terminal state, if exists.
+ *
+ * @return the latestJobRunName value.
+ */
+ public String latestJobRunName() {
+ return this.latestJobRunName;
+ }
+
+ /**
+ * Get the latestJobRunResourceId property: The fully qualified resource ID of the job run in a non-terminal state,
+ * if exists.
+ *
+ * @return the latestJobRunResourceId value.
+ */
+ public String latestJobRunResourceId() {
+ return this.latestJobRunResourceId;
+ }
+
+ /**
+ * Get the latestJobRunStatus property: The current status of the job run in a non-terminal state, if exists.
+ *
+ * @return the latestJobRunStatus value.
+ */
+ public JobRunStatus latestJobRunStatus() {
+ return this.latestJobRunStatus;
+ }
+
+ /**
+ * Get the agentName property: Name of the agent to assign for new job runs of this definition.
+ *
+ * @return the agentName value.
+ */
+ public String agentName() {
+ return this.agentName;
+ }
+
+ /**
+ * Set the agentName property: Name of the agent to assign for new job runs of this definition.
+ *
+ * @param agentName the agentName value to set.
+ * @return the JobDefinitionProperties object itself.
+ */
+ public JobDefinitionProperties withAgentName(String agentName) {
+ this.agentName = agentName;
+ return this;
+ }
+
+ /**
+ * Get the agentResourceId property: Fully qualified resource id of the agent to assign for new job runs of this
+ * definition.
+ *
+ * @return the agentResourceId value.
+ */
+ public String agentResourceId() {
+ return this.agentResourceId;
+ }
+
+ /**
+ * Get the provisioningState property: The provisioning state of this resource.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (sourceName() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property sourceName in model JobDefinitionProperties"));
+ }
+ if (targetName() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property targetName in model JobDefinitionProperties"));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(JobDefinitionProperties.class);
+}
diff --git a/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/models/JobDefinitionUpdateProperties.java b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/models/JobDefinitionUpdateProperties.java
new file mode 100644
index 0000000000000..d5d188062601e
--- /dev/null
+++ b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/models/JobDefinitionUpdateProperties.java
@@ -0,0 +1,99 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagemover.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.storagemover.models.CopyMode;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Job definition properties. */
+@Fluent
+public final class JobDefinitionUpdateProperties {
+ /*
+ * A description for the job definition.
+ */
+ @JsonProperty(value = "description")
+ private String description;
+
+ /*
+ * Strategy to use for copy.
+ */
+ @JsonProperty(value = "copyMode")
+ private CopyMode copyMode;
+
+ /*
+ * Name of the agent to assign for new job runs of this definition.
+ */
+ @JsonProperty(value = "agentName")
+ private String agentName;
+
+ /**
+ * Get the description property: A description for the job definition.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Set the description property: A description for the job definition.
+ *
+ * @param description the description value to set.
+ * @return the JobDefinitionUpdateProperties object itself.
+ */
+ public JobDefinitionUpdateProperties withDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Get the copyMode property: Strategy to use for copy.
+ *
+ * @return the copyMode value.
+ */
+ public CopyMode copyMode() {
+ return this.copyMode;
+ }
+
+ /**
+ * Set the copyMode property: Strategy to use for copy.
+ *
+ * @param copyMode the copyMode value to set.
+ * @return the JobDefinitionUpdateProperties object itself.
+ */
+ public JobDefinitionUpdateProperties withCopyMode(CopyMode copyMode) {
+ this.copyMode = copyMode;
+ return this;
+ }
+
+ /**
+ * Get the agentName property: Name of the agent to assign for new job runs of this definition.
+ *
+ * @return the agentName value.
+ */
+ public String agentName() {
+ return this.agentName;
+ }
+
+ /**
+ * Set the agentName property: Name of the agent to assign for new job runs of this definition.
+ *
+ * @param agentName the agentName value to set.
+ * @return the JobDefinitionUpdateProperties object itself.
+ */
+ public JobDefinitionUpdateProperties withAgentName(String agentName) {
+ this.agentName = agentName;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/models/JobRunInner.java b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/models/JobRunInner.java
new file mode 100644
index 0000000000000..82f96e094ca2b
--- /dev/null
+++ b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/models/JobRunInner.java
@@ -0,0 +1,335 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagemover.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.storagemover.models.JobRunError;
+import com.azure.resourcemanager.storagemover.models.JobRunScanStatus;
+import com.azure.resourcemanager.storagemover.models.JobRunStatus;
+import com.azure.resourcemanager.storagemover.models.ProvisioningState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/** The job run resource. */
+@Fluent
+public final class JobRunInner extends ProxyResource {
+ /*
+ * Job run properties.
+ */
+ @JsonProperty(value = "properties")
+ private JobRunProperties innerProperties;
+
+ /*
+ * Resource system metadata.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /**
+ * Get the innerProperties property: Job run properties.
+ *
+ * @return the innerProperties value.
+ */
+ private JobRunProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the systemData property: Resource system metadata.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the status property: The state of the job execution.
+ *
+ * @return the status value.
+ */
+ public JobRunStatus status() {
+ return this.innerProperties() == null ? null : this.innerProperties().status();
+ }
+
+ /**
+ * Get the scanStatus property: The status of agent's scanning of source.
+ *
+ * @return the scanStatus value.
+ */
+ public JobRunScanStatus scanStatus() {
+ return this.innerProperties() == null ? null : this.innerProperties().scanStatus();
+ }
+
+ /**
+ * Get the agentName property: Name of the agent assigned to this run.
+ *
+ * @return the agentName value.
+ */
+ public String agentName() {
+ return this.innerProperties() == null ? null : this.innerProperties().agentName();
+ }
+
+ /**
+ * Get the agentResourceId property: Fully qualified resource id of the agent assigned to this run.
+ *
+ * @return the agentResourceId value.
+ */
+ public String agentResourceId() {
+ return this.innerProperties() == null ? null : this.innerProperties().agentResourceId();
+ }
+
+ /**
+ * Get the executionStartTime property: Start time of the run. Null if no agent reported that the job has started.
+ *
+ * @return the executionStartTime value.
+ */
+ public OffsetDateTime executionStartTime() {
+ return this.innerProperties() == null ? null : this.innerProperties().executionStartTime();
+ }
+
+ /**
+ * Get the executionEndTime property: End time of the run. Null if agent has not reported that the job has ended.
+ *
+ * @return the executionEndTime value.
+ */
+ public OffsetDateTime executionEndTime() {
+ return this.innerProperties() == null ? null : this.innerProperties().executionEndTime();
+ }
+
+ /**
+ * Get the lastUpdatedTime property: Last update time.
+ *
+ * @return the lastUpdatedTime value.
+ */
+ public OffsetDateTime lastUpdatedTime() {
+ return this.innerProperties() == null ? null : this.innerProperties().lastUpdatedTime();
+ }
+
+ /**
+ * Get the itemsScanned property: Number of items scanned so far in source.
+ *
+ * @return the itemsScanned value.
+ */
+ public Long itemsScanned() {
+ return this.innerProperties() == null ? null : this.innerProperties().itemsScanned();
+ }
+
+ /**
+ * Get the itemsExcluded property: Number of items that will not be transferred, as they are excluded by user
+ * configuration.
+ *
+ * @return the itemsExcluded value.
+ */
+ public Long itemsExcluded() {
+ return this.innerProperties() == null ? null : this.innerProperties().itemsExcluded();
+ }
+
+ /**
+ * Get the itemsUnsupported property: Number of items that will not be transferred, as they are unsupported on
+ * target.
+ *
+ * @return the itemsUnsupported value.
+ */
+ public Long itemsUnsupported() {
+ return this.innerProperties() == null ? null : this.innerProperties().itemsUnsupported();
+ }
+
+ /**
+ * Get the itemsNoTransferNeeded property: Number of items that will not be transferred, as they are already found
+ * on target (e.g. mirror mode).
+ *
+ * @return the itemsNoTransferNeeded value.
+ */
+ public Long itemsNoTransferNeeded() {
+ return this.innerProperties() == null ? null : this.innerProperties().itemsNoTransferNeeded();
+ }
+
+ /**
+ * Get the itemsDesignatedForTransfer property: Number of items identified for transferring so far in scan.
+ *
+ * @return the itemsDesignatedForTransfer value.
+ */
+ public Long itemsDesignatedForTransfer() {
+ return this.innerProperties() == null ? null : this.innerProperties().itemsDesignatedForTransfer();
+ }
+
+ /**
+ * Get the itemsFailed property: Number of items that were attempted to transfer and failed.
+ *
+ * @return the itemsFailed value.
+ */
+ public Long itemsFailed() {
+ return this.innerProperties() == null ? null : this.innerProperties().itemsFailed();
+ }
+
+ /**
+ * Get the itemsTransferred property: Number of items successfully transferred to target.
+ *
+ * @return the itemsTransferred value.
+ */
+ public Long itemsTransferred() {
+ return this.innerProperties() == null ? null : this.innerProperties().itemsTransferred();
+ }
+
+ /**
+ * Get the bytesScanned property: Bytes of data scanned so far in source.
+ *
+ * @return the bytesScanned value.
+ */
+ public Long bytesScanned() {
+ return this.innerProperties() == null ? null : this.innerProperties().bytesScanned();
+ }
+
+ /**
+ * Get the bytesExcluded property: Bytes of data that will not be transferred, as they are excluded by user
+ * configuration.
+ *
+ * @return the bytesExcluded value.
+ */
+ public Long bytesExcluded() {
+ return this.innerProperties() == null ? null : this.innerProperties().bytesExcluded();
+ }
+
+ /**
+ * Get the bytesUnsupported property: Bytes of data that will not be transferred, as they are unsupported on target.
+ *
+ * @return the bytesUnsupported value.
+ */
+ public Long bytesUnsupported() {
+ return this.innerProperties() == null ? null : this.innerProperties().bytesUnsupported();
+ }
+
+ /**
+ * Get the bytesNoTransferNeeded property: Bytes of data that will not be transferred, as they are already found on
+ * target (e.g. mirror mode).
+ *
+ * @return the bytesNoTransferNeeded value.
+ */
+ public Long bytesNoTransferNeeded() {
+ return this.innerProperties() == null ? null : this.innerProperties().bytesNoTransferNeeded();
+ }
+
+ /**
+ * Get the bytesDesignatedForTransfer property: Bytes of data identified for transferring so far in scan.
+ *
+ * @return the bytesDesignatedForTransfer value.
+ */
+ public Long bytesDesignatedForTransfer() {
+ return this.innerProperties() == null ? null : this.innerProperties().bytesDesignatedForTransfer();
+ }
+
+ /**
+ * Get the bytesFailed property: Bytes of data that were attempted to transfer and failed.
+ *
+ * @return the bytesFailed value.
+ */
+ public Long bytesFailed() {
+ return this.innerProperties() == null ? null : this.innerProperties().bytesFailed();
+ }
+
+ /**
+ * Get the bytesTransferred property: Bytes of data successfully transferred to target.
+ *
+ * @return the bytesTransferred value.
+ */
+ public Long bytesTransferred() {
+ return this.innerProperties() == null ? null : this.innerProperties().bytesTransferred();
+ }
+
+ /**
+ * Get the sourceName property: Name of source Endpoint resource. This resource may no longer exist.
+ *
+ * @return the sourceName value.
+ */
+ public String sourceName() {
+ return this.innerProperties() == null ? null : this.innerProperties().sourceName();
+ }
+
+ /**
+ * Get the sourceResourceId property: Fully qualified resource id of source Endpoint. This id may no longer exist.
+ *
+ * @return the sourceResourceId value.
+ */
+ public String sourceResourceId() {
+ return this.innerProperties() == null ? null : this.innerProperties().sourceResourceId();
+ }
+
+ /**
+ * Get the sourceProperties property: Copy of source Endpoint resource's properties at time of Job Run creation.
+ *
+ * @return the sourceProperties value.
+ */
+ public Object sourceProperties() {
+ return this.innerProperties() == null ? null : this.innerProperties().sourceProperties();
+ }
+
+ /**
+ * Get the targetName property: Name of target Endpoint resource. This resource may no longer exist.
+ *
+ * @return the targetName value.
+ */
+ public String targetName() {
+ return this.innerProperties() == null ? null : this.innerProperties().targetName();
+ }
+
+ /**
+ * Get the targetResourceId property: Fully qualified resource id of of Endpoint. This id may no longer exist.
+ *
+ * @return the targetResourceId value.
+ */
+ public String targetResourceId() {
+ return this.innerProperties() == null ? null : this.innerProperties().targetResourceId();
+ }
+
+ /**
+ * Get the targetProperties property: Copy of Endpoint resource's properties at time of Job Run creation.
+ *
+ * @return the targetProperties value.
+ */
+ public Object targetProperties() {
+ return this.innerProperties() == null ? null : this.innerProperties().targetProperties();
+ }
+
+ /**
+ * Get the jobDefinitionProperties property: Copy of parent Job Definition's properties at time of Job Run creation.
+ *
+ * @return the jobDefinitionProperties value.
+ */
+ public Object jobDefinitionProperties() {
+ return this.innerProperties() == null ? null : this.innerProperties().jobDefinitionProperties();
+ }
+
+ /**
+ * Get the error property: Error details.
+ *
+ * @return the error value.
+ */
+ public JobRunError error() {
+ return this.innerProperties() == null ? null : this.innerProperties().error();
+ }
+
+ /**
+ * Get the provisioningState property: The provisioning state of this resource.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/models/JobRunProperties.java b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/models/JobRunProperties.java
new file mode 100644
index 0000000000000..28cd56c47f749
--- /dev/null
+++ b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/models/JobRunProperties.java
@@ -0,0 +1,493 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagemover.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.resourcemanager.storagemover.models.JobRunError;
+import com.azure.resourcemanager.storagemover.models.JobRunScanStatus;
+import com.azure.resourcemanager.storagemover.models.JobRunStatus;
+import com.azure.resourcemanager.storagemover.models.ProvisioningState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/** Job run properties. */
+@Immutable
+public final class JobRunProperties {
+ /*
+ * The state of the job execution.
+ */
+ @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY)
+ private JobRunStatus status;
+
+ /*
+ * The status of agent's scanning of source.
+ */
+ @JsonProperty(value = "scanStatus", access = JsonProperty.Access.WRITE_ONLY)
+ private JobRunScanStatus scanStatus;
+
+ /*
+ * Name of the agent assigned to this run.
+ */
+ @JsonProperty(value = "agentName", access = JsonProperty.Access.WRITE_ONLY)
+ private String agentName;
+
+ /*
+ * Fully qualified resource id of the agent assigned to this run.
+ */
+ @JsonProperty(value = "agentResourceId", access = JsonProperty.Access.WRITE_ONLY)
+ private String agentResourceId;
+
+ /*
+ * Start time of the run. Null if no agent reported that the job has
+ * started.
+ */
+ @JsonProperty(value = "executionStartTime", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime executionStartTime;
+
+ /*
+ * End time of the run. Null if agent has not reported that the job has
+ * ended.
+ */
+ @JsonProperty(value = "executionEndTime", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime executionEndTime;
+
+ /*
+ * Last update time.
+ */
+ @JsonProperty(value = "lastUpdatedTime", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime lastUpdatedTime;
+
+ /*
+ * Number of items scanned so far in source.
+ */
+ @JsonProperty(value = "itemsScanned", access = JsonProperty.Access.WRITE_ONLY)
+ private Long itemsScanned;
+
+ /*
+ * Number of items that will not be transferred, as they are excluded by
+ * user configuration.
+ */
+ @JsonProperty(value = "itemsExcluded", access = JsonProperty.Access.WRITE_ONLY)
+ private Long itemsExcluded;
+
+ /*
+ * Number of items that will not be transferred, as they are unsupported on
+ * target.
+ */
+ @JsonProperty(value = "itemsUnsupported", access = JsonProperty.Access.WRITE_ONLY)
+ private Long itemsUnsupported;
+
+ /*
+ * Number of items that will not be transferred, as they are already found
+ * on target (e.g. mirror mode).
+ */
+ @JsonProperty(value = "itemsNoTransferNeeded", access = JsonProperty.Access.WRITE_ONLY)
+ private Long itemsNoTransferNeeded;
+
+ /*
+ * Number of items identified for transferring so far in scan.
+ */
+ @JsonProperty(value = "itemsDesignatedForTransfer", access = JsonProperty.Access.WRITE_ONLY)
+ private Long itemsDesignatedForTransfer;
+
+ /*
+ * Number of items that were attempted to transfer and failed.
+ */
+ @JsonProperty(value = "itemsFailed", access = JsonProperty.Access.WRITE_ONLY)
+ private Long itemsFailed;
+
+ /*
+ * Number of items successfully transferred to target.
+ */
+ @JsonProperty(value = "itemsTransferred", access = JsonProperty.Access.WRITE_ONLY)
+ private Long itemsTransferred;
+
+ /*
+ * Bytes of data scanned so far in source.
+ */
+ @JsonProperty(value = "bytesScanned", access = JsonProperty.Access.WRITE_ONLY)
+ private Long bytesScanned;
+
+ /*
+ * Bytes of data that will not be transferred, as they are excluded by user
+ * configuration.
+ */
+ @JsonProperty(value = "bytesExcluded", access = JsonProperty.Access.WRITE_ONLY)
+ private Long bytesExcluded;
+
+ /*
+ * Bytes of data that will not be transferred, as they are unsupported on
+ * target.
+ */
+ @JsonProperty(value = "bytesUnsupported", access = JsonProperty.Access.WRITE_ONLY)
+ private Long bytesUnsupported;
+
+ /*
+ * Bytes of data that will not be transferred, as they are already found on
+ * target (e.g. mirror mode).
+ */
+ @JsonProperty(value = "bytesNoTransferNeeded", access = JsonProperty.Access.WRITE_ONLY)
+ private Long bytesNoTransferNeeded;
+
+ /*
+ * Bytes of data identified for transferring so far in scan.
+ */
+ @JsonProperty(value = "bytesDesignatedForTransfer", access = JsonProperty.Access.WRITE_ONLY)
+ private Long bytesDesignatedForTransfer;
+
+ /*
+ * Bytes of data that were attempted to transfer and failed.
+ */
+ @JsonProperty(value = "bytesFailed", access = JsonProperty.Access.WRITE_ONLY)
+ private Long bytesFailed;
+
+ /*
+ * Bytes of data successfully transferred to target.
+ */
+ @JsonProperty(value = "bytesTransferred", access = JsonProperty.Access.WRITE_ONLY)
+ private Long bytesTransferred;
+
+ /*
+ * Name of source Endpoint resource. This resource may no longer exist.
+ */
+ @JsonProperty(value = "sourceName", access = JsonProperty.Access.WRITE_ONLY)
+ private String sourceName;
+
+ /*
+ * Fully qualified resource id of source Endpoint. This id may no longer
+ * exist.
+ */
+ @JsonProperty(value = "sourceResourceId", access = JsonProperty.Access.WRITE_ONLY)
+ private String sourceResourceId;
+
+ /*
+ * Copy of source Endpoint resource's properties at time of Job Run
+ * creation.
+ */
+ @JsonProperty(value = "sourceProperties", access = JsonProperty.Access.WRITE_ONLY)
+ private Object sourceProperties;
+
+ /*
+ * Name of target Endpoint resource. This resource may no longer exist.
+ */
+ @JsonProperty(value = "targetName", access = JsonProperty.Access.WRITE_ONLY)
+ private String targetName;
+
+ /*
+ * Fully qualified resource id of of Endpoint. This id may no longer exist.
+ */
+ @JsonProperty(value = "targetResourceId", access = JsonProperty.Access.WRITE_ONLY)
+ private String targetResourceId;
+
+ /*
+ * Copy of Endpoint resource's properties at time of Job Run creation.
+ */
+ @JsonProperty(value = "targetProperties", access = JsonProperty.Access.WRITE_ONLY)
+ private Object targetProperties;
+
+ /*
+ * Copy of parent Job Definition's properties at time of Job Run creation.
+ */
+ @JsonProperty(value = "jobDefinitionProperties", access = JsonProperty.Access.WRITE_ONLY)
+ private Object jobDefinitionProperties;
+
+ /*
+ * Error details.
+ */
+ @JsonProperty(value = "error", access = JsonProperty.Access.WRITE_ONLY)
+ private JobRunError error;
+
+ /*
+ * The provisioning state of this resource.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningState provisioningState;
+
+ /**
+ * Get the status property: The state of the job execution.
+ *
+ * @return the status value.
+ */
+ public JobRunStatus status() {
+ return this.status;
+ }
+
+ /**
+ * Get the scanStatus property: The status of agent's scanning of source.
+ *
+ * @return the scanStatus value.
+ */
+ public JobRunScanStatus scanStatus() {
+ return this.scanStatus;
+ }
+
+ /**
+ * Get the agentName property: Name of the agent assigned to this run.
+ *
+ * @return the agentName value.
+ */
+ public String agentName() {
+ return this.agentName;
+ }
+
+ /**
+ * Get the agentResourceId property: Fully qualified resource id of the agent assigned to this run.
+ *
+ * @return the agentResourceId value.
+ */
+ public String agentResourceId() {
+ return this.agentResourceId;
+ }
+
+ /**
+ * Get the executionStartTime property: Start time of the run. Null if no agent reported that the job has started.
+ *
+ * @return the executionStartTime value.
+ */
+ public OffsetDateTime executionStartTime() {
+ return this.executionStartTime;
+ }
+
+ /**
+ * Get the executionEndTime property: End time of the run. Null if agent has not reported that the job has ended.
+ *
+ * @return the executionEndTime value.
+ */
+ public OffsetDateTime executionEndTime() {
+ return this.executionEndTime;
+ }
+
+ /**
+ * Get the lastUpdatedTime property: Last update time.
+ *
+ * @return the lastUpdatedTime value.
+ */
+ public OffsetDateTime lastUpdatedTime() {
+ return this.lastUpdatedTime;
+ }
+
+ /**
+ * Get the itemsScanned property: Number of items scanned so far in source.
+ *
+ * @return the itemsScanned value.
+ */
+ public Long itemsScanned() {
+ return this.itemsScanned;
+ }
+
+ /**
+ * Get the itemsExcluded property: Number of items that will not be transferred, as they are excluded by user
+ * configuration.
+ *
+ * @return the itemsExcluded value.
+ */
+ public Long itemsExcluded() {
+ return this.itemsExcluded;
+ }
+
+ /**
+ * Get the itemsUnsupported property: Number of items that will not be transferred, as they are unsupported on
+ * target.
+ *
+ * @return the itemsUnsupported value.
+ */
+ public Long itemsUnsupported() {
+ return this.itemsUnsupported;
+ }
+
+ /**
+ * Get the itemsNoTransferNeeded property: Number of items that will not be transferred, as they are already found
+ * on target (e.g. mirror mode).
+ *
+ * @return the itemsNoTransferNeeded value.
+ */
+ public Long itemsNoTransferNeeded() {
+ return this.itemsNoTransferNeeded;
+ }
+
+ /**
+ * Get the itemsDesignatedForTransfer property: Number of items identified for transferring so far in scan.
+ *
+ * @return the itemsDesignatedForTransfer value.
+ */
+ public Long itemsDesignatedForTransfer() {
+ return this.itemsDesignatedForTransfer;
+ }
+
+ /**
+ * Get the itemsFailed property: Number of items that were attempted to transfer and failed.
+ *
+ * @return the itemsFailed value.
+ */
+ public Long itemsFailed() {
+ return this.itemsFailed;
+ }
+
+ /**
+ * Get the itemsTransferred property: Number of items successfully transferred to target.
+ *
+ * @return the itemsTransferred value.
+ */
+ public Long itemsTransferred() {
+ return this.itemsTransferred;
+ }
+
+ /**
+ * Get the bytesScanned property: Bytes of data scanned so far in source.
+ *
+ * @return the bytesScanned value.
+ */
+ public Long bytesScanned() {
+ return this.bytesScanned;
+ }
+
+ /**
+ * Get the bytesExcluded property: Bytes of data that will not be transferred, as they are excluded by user
+ * configuration.
+ *
+ * @return the bytesExcluded value.
+ */
+ public Long bytesExcluded() {
+ return this.bytesExcluded;
+ }
+
+ /**
+ * Get the bytesUnsupported property: Bytes of data that will not be transferred, as they are unsupported on target.
+ *
+ * @return the bytesUnsupported value.
+ */
+ public Long bytesUnsupported() {
+ return this.bytesUnsupported;
+ }
+
+ /**
+ * Get the bytesNoTransferNeeded property: Bytes of data that will not be transferred, as they are already found on
+ * target (e.g. mirror mode).
+ *
+ * @return the bytesNoTransferNeeded value.
+ */
+ public Long bytesNoTransferNeeded() {
+ return this.bytesNoTransferNeeded;
+ }
+
+ /**
+ * Get the bytesDesignatedForTransfer property: Bytes of data identified for transferring so far in scan.
+ *
+ * @return the bytesDesignatedForTransfer value.
+ */
+ public Long bytesDesignatedForTransfer() {
+ return this.bytesDesignatedForTransfer;
+ }
+
+ /**
+ * Get the bytesFailed property: Bytes of data that were attempted to transfer and failed.
+ *
+ * @return the bytesFailed value.
+ */
+ public Long bytesFailed() {
+ return this.bytesFailed;
+ }
+
+ /**
+ * Get the bytesTransferred property: Bytes of data successfully transferred to target.
+ *
+ * @return the bytesTransferred value.
+ */
+ public Long bytesTransferred() {
+ return this.bytesTransferred;
+ }
+
+ /**
+ * Get the sourceName property: Name of source Endpoint resource. This resource may no longer exist.
+ *
+ * @return the sourceName value.
+ */
+ public String sourceName() {
+ return this.sourceName;
+ }
+
+ /**
+ * Get the sourceResourceId property: Fully qualified resource id of source Endpoint. This id may no longer exist.
+ *
+ * @return the sourceResourceId value.
+ */
+ public String sourceResourceId() {
+ return this.sourceResourceId;
+ }
+
+ /**
+ * Get the sourceProperties property: Copy of source Endpoint resource's properties at time of Job Run creation.
+ *
+ * @return the sourceProperties value.
+ */
+ public Object sourceProperties() {
+ return this.sourceProperties;
+ }
+
+ /**
+ * Get the targetName property: Name of target Endpoint resource. This resource may no longer exist.
+ *
+ * @return the targetName value.
+ */
+ public String targetName() {
+ return this.targetName;
+ }
+
+ /**
+ * Get the targetResourceId property: Fully qualified resource id of of Endpoint. This id may no longer exist.
+ *
+ * @return the targetResourceId value.
+ */
+ public String targetResourceId() {
+ return this.targetResourceId;
+ }
+
+ /**
+ * Get the targetProperties property: Copy of Endpoint resource's properties at time of Job Run creation.
+ *
+ * @return the targetProperties value.
+ */
+ public Object targetProperties() {
+ return this.targetProperties;
+ }
+
+ /**
+ * Get the jobDefinitionProperties property: Copy of parent Job Definition's properties at time of Job Run creation.
+ *
+ * @return the jobDefinitionProperties value.
+ */
+ public Object jobDefinitionProperties() {
+ return this.jobDefinitionProperties;
+ }
+
+ /**
+ * Get the error property: Error details.
+ *
+ * @return the error value.
+ */
+ public JobRunError error() {
+ return this.error;
+ }
+
+ /**
+ * Get the provisioningState property: The provisioning state of this resource.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (error() != null) {
+ error().validate();
+ }
+ }
+}
diff --git a/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/models/JobRunResourceIdInner.java b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/models/JobRunResourceIdInner.java
new file mode 100644
index 0000000000000..17d023dc13c09
--- /dev/null
+++ b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/models/JobRunResourceIdInner.java
@@ -0,0 +1,35 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagemover.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Response that identifies a JobRun. */
+@Immutable
+public final class JobRunResourceIdInner {
+ /*
+ * Fully qualified resource id of the JobRun.
+ */
+ @JsonProperty(value = "jobRunResourceId", access = JsonProperty.Access.WRITE_ONLY)
+ private String jobRunResourceId;
+
+ /**
+ * Get the jobRunResourceId property: Fully qualified resource id of the JobRun.
+ *
+ * @return the jobRunResourceId value.
+ */
+ public String jobRunResourceId() {
+ return this.jobRunResourceId;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/models/OperationInner.java b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/models/OperationInner.java
new file mode 100644
index 0000000000000..daa20f8b8e772
--- /dev/null
+++ b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/models/OperationInner.java
@@ -0,0 +1,121 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagemover.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.storagemover.models.ActionType;
+import com.azure.resourcemanager.storagemover.models.OperationDisplay;
+import com.azure.resourcemanager.storagemover.models.Origin;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** REST API Operation Details of a REST API operation, returned from the Resource Provider Operations API. */
+@Fluent
+public final class OperationInner {
+ /*
+ * The name of the operation, as per Resource-Based Access Control (RBAC).
+ * Examples: "Microsoft.Compute/virtualMachines/write",
+ * "Microsoft.Compute/virtualMachines/capture/action"
+ */
+ @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
+ private String name;
+
+ /*
+ * Whether the operation applies to data-plane. This is "true" for
+ * data-plane operations and "false" for ARM/control-plane operations.
+ */
+ @JsonProperty(value = "isDataAction", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean isDataAction;
+
+ /*
+ * Localized display information for this particular operation.
+ */
+ @JsonProperty(value = "display")
+ private OperationDisplay display;
+
+ /*
+ * The intended executor of the operation; as in Resource Based Access
+ * Control (RBAC) and audit logs UX. Default value is "user,system"
+ */
+ @JsonProperty(value = "origin", access = JsonProperty.Access.WRITE_ONLY)
+ private Origin origin;
+
+ /*
+ * Enum. Indicates the action type. "Internal" refers to actions that are
+ * for internal only APIs.
+ */
+ @JsonProperty(value = "actionType", access = JsonProperty.Access.WRITE_ONLY)
+ private ActionType actionType;
+
+ /**
+ * Get the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples:
+ * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action".
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane
+ * operations and "false" for ARM/control-plane operations.
+ *
+ * @return the isDataAction value.
+ */
+ public Boolean isDataAction() {
+ return this.isDataAction;
+ }
+
+ /**
+ * Get the display property: Localized display information for this particular operation.
+ *
+ * @return the display value.
+ */
+ public OperationDisplay display() {
+ return this.display;
+ }
+
+ /**
+ * Set the display property: Localized display information for this particular operation.
+ *
+ * @param display the display value to set.
+ * @return the OperationInner object itself.
+ */
+ public OperationInner withDisplay(OperationDisplay display) {
+ this.display = display;
+ return this;
+ }
+
+ /**
+ * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and
+ * audit logs UX. Default value is "user,system".
+ *
+ * @return the origin value.
+ */
+ public Origin origin() {
+ return this.origin;
+ }
+
+ /**
+ * Get the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal
+ * only APIs.
+ *
+ * @return the actionType value.
+ */
+ public ActionType actionType() {
+ return this.actionType;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (display() != null) {
+ display().validate();
+ }
+ }
+}
diff --git a/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/models/ProjectInner.java b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/models/ProjectInner.java
new file mode 100644
index 0000000000000..b2a7209865412
--- /dev/null
+++ b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/models/ProjectInner.java
@@ -0,0 +1,88 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagemover.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.storagemover.models.ProvisioningState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The project resource. */
+@Fluent
+public final class ProjectInner extends ProxyResource {
+ /*
+ * Project properties.
+ */
+ @JsonProperty(value = "properties")
+ private ProjectProperties innerProperties;
+
+ /*
+ * Resource system metadata.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /**
+ * Get the innerProperties property: Project properties.
+ *
+ * @return the innerProperties value.
+ */
+ private ProjectProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the systemData property: Resource system metadata.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the description property: A description for the project.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.innerProperties() == null ? null : this.innerProperties().description();
+ }
+
+ /**
+ * Set the description property: A description for the project.
+ *
+ * @param description the description value to set.
+ * @return the ProjectInner object itself.
+ */
+ public ProjectInner withDescription(String description) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ProjectProperties();
+ }
+ this.innerProperties().withDescription(description);
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: The provisioning state of this resource.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/models/ProjectProperties.java b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/models/ProjectProperties.java
new file mode 100644
index 0000000000000..6c434d43a4199
--- /dev/null
+++ b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/models/ProjectProperties.java
@@ -0,0 +1,62 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagemover.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.storagemover.models.ProvisioningState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Project properties. */
+@Fluent
+public final class ProjectProperties {
+ /*
+ * A description for the project.
+ */
+ @JsonProperty(value = "description")
+ private String description;
+
+ /*
+ * The provisioning state of this resource.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningState provisioningState;
+
+ /**
+ * Get the description property: A description for the project.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Set the description property: A description for the project.
+ *
+ * @param description the description value to set.
+ * @return the ProjectProperties object itself.
+ */
+ public ProjectProperties withDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: The provisioning state of this resource.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/models/ProjectUpdateProperties.java b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/models/ProjectUpdateProperties.java
new file mode 100644
index 0000000000000..4273d1c1cb16b
--- /dev/null
+++ b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/models/ProjectUpdateProperties.java
@@ -0,0 +1,46 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagemover.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Project properties. */
+@Fluent
+public final class ProjectUpdateProperties {
+ /*
+ * A description for the project.
+ */
+ @JsonProperty(value = "description")
+ private String description;
+
+ /**
+ * Get the description property: A description for the project.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Set the description property: A description for the project.
+ *
+ * @param description the description value to set.
+ * @return the ProjectUpdateProperties object itself.
+ */
+ public ProjectUpdateProperties withDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/models/StorageMoverInner.java b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/models/StorageMoverInner.java
new file mode 100644
index 0000000000000..241282186d369
--- /dev/null
+++ b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/models/StorageMoverInner.java
@@ -0,0 +1,103 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagemover.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.Resource;
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.storagemover.models.ProvisioningState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+
+/** The Storage Mover resource, which is a container for a group of Storage Mover agents and projects. */
+@Fluent
+public final class StorageMoverInner extends Resource {
+ /*
+ * The resource specific properties for the Storage Mover resource.
+ */
+ @JsonProperty(value = "properties")
+ private StorageMoverProperties innerProperties;
+
+ /*
+ * Resource system metadata.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /**
+ * Get the innerProperties property: The resource specific properties for the Storage Mover resource.
+ *
+ * @return the innerProperties value.
+ */
+ private StorageMoverProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the systemData property: Resource system metadata.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public StorageMoverInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public StorageMoverInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Get the description property: A description for the Storage Mover.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.innerProperties() == null ? null : this.innerProperties().description();
+ }
+
+ /**
+ * Set the description property: A description for the Storage Mover.
+ *
+ * @param description the description value to set.
+ * @return the StorageMoverInner object itself.
+ */
+ public StorageMoverInner withDescription(String description) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new StorageMoverProperties();
+ }
+ this.innerProperties().withDescription(description);
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: The provisioning state of this resource.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/models/StorageMoverProperties.java b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/models/StorageMoverProperties.java
new file mode 100644
index 0000000000000..f45f113acb62e
--- /dev/null
+++ b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/models/StorageMoverProperties.java
@@ -0,0 +1,62 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagemover.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.storagemover.models.ProvisioningState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The resource specific properties for the Storage Mover resource. */
+@Fluent
+public final class StorageMoverProperties {
+ /*
+ * A description for the Storage Mover.
+ */
+ @JsonProperty(value = "description")
+ private String description;
+
+ /*
+ * The provisioning state of this resource.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningState provisioningState;
+
+ /**
+ * Get the description property: A description for the Storage Mover.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Set the description property: A description for the Storage Mover.
+ *
+ * @param description the description value to set.
+ * @return the StorageMoverProperties object itself.
+ */
+ public StorageMoverProperties withDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: The provisioning state of this resource.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/models/StorageMoverUpdateProperties.java b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/models/StorageMoverUpdateProperties.java
new file mode 100644
index 0000000000000..5b36218a69af8
--- /dev/null
+++ b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/models/StorageMoverUpdateProperties.java
@@ -0,0 +1,46 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagemover.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The resource specific properties for the Storage Mover resource. */
+@Fluent
+public final class StorageMoverUpdateProperties {
+ /*
+ * A description for the Storage Mover.
+ */
+ @JsonProperty(value = "description")
+ private String description;
+
+ /**
+ * Get the description property: A description for the Storage Mover.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Set the description property: A description for the Storage Mover.
+ *
+ * @param description the description value to set.
+ * @return the StorageMoverUpdateProperties object itself.
+ */
+ public StorageMoverUpdateProperties withDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/models/package-info.java b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/models/package-info.java
new file mode 100644
index 0000000000000..d6427e83ccee7
--- /dev/null
+++ b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/models/package-info.java
@@ -0,0 +1,6 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/** Package containing the inner data models for StorageMoverClient. The Azure Storage Mover REST API. */
+package com.azure.resourcemanager.storagemover.fluent.models;
diff --git a/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/package-info.java b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/package-info.java
new file mode 100644
index 0000000000000..8fa1b18d02bb1
--- /dev/null
+++ b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/fluent/package-info.java
@@ -0,0 +1,6 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/** Package containing the service clients for StorageMoverClient. The Azure Storage Mover REST API. */
+package com.azure.resourcemanager.storagemover.fluent;
diff --git a/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/implementation/AgentImpl.java b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/implementation/AgentImpl.java
new file mode 100644
index 0000000000000..58f20dc68f1f7
--- /dev/null
+++ b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/implementation/AgentImpl.java
@@ -0,0 +1,211 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagemover.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.storagemover.fluent.models.AgentInner;
+import com.azure.resourcemanager.storagemover.models.Agent;
+import com.azure.resourcemanager.storagemover.models.AgentPropertiesErrorDetails;
+import com.azure.resourcemanager.storagemover.models.AgentStatus;
+import com.azure.resourcemanager.storagemover.models.AgentUpdateParameters;
+import com.azure.resourcemanager.storagemover.models.ProvisioningState;
+import java.time.OffsetDateTime;
+
+public final class AgentImpl implements Agent, Agent.Definition, Agent.Update {
+ private AgentInner innerObject;
+
+ private final com.azure.resourcemanager.storagemover.StorageMoverManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public String description() {
+ return this.innerModel().description();
+ }
+
+ public String agentVersion() {
+ return this.innerModel().agentVersion();
+ }
+
+ public String arcResourceId() {
+ return this.innerModel().arcResourceId();
+ }
+
+ public String arcVmUuid() {
+ return this.innerModel().arcVmUuid();
+ }
+
+ public AgentStatus agentStatus() {
+ return this.innerModel().agentStatus();
+ }
+
+ public OffsetDateTime lastStatusUpdate() {
+ return this.innerModel().lastStatusUpdate();
+ }
+
+ public String localIpAddress() {
+ return this.innerModel().localIpAddress();
+ }
+
+ public Long memoryInMB() {
+ return this.innerModel().memoryInMB();
+ }
+
+ public Long numberOfCores() {
+ return this.innerModel().numberOfCores();
+ }
+
+ public AgentPropertiesErrorDetails errorDetails() {
+ return this.innerModel().errorDetails();
+ }
+
+ public ProvisioningState provisioningState() {
+ return this.innerModel().provisioningState();
+ }
+
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
+ public AgentInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.storagemover.StorageMoverManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String storageMoverName;
+
+ private String agentName;
+
+ private AgentUpdateParameters updateAgent;
+
+ public AgentImpl withExistingStorageMover(String resourceGroupName, String storageMoverName) {
+ this.resourceGroupName = resourceGroupName;
+ this.storageMoverName = storageMoverName;
+ return this;
+ }
+
+ public Agent create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getAgents()
+ .createOrUpdateWithResponse(
+ resourceGroupName, storageMoverName, agentName, this.innerModel(), Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public Agent create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getAgents()
+ .createOrUpdateWithResponse(resourceGroupName, storageMoverName, agentName, this.innerModel(), context)
+ .getValue();
+ return this;
+ }
+
+ AgentImpl(String name, com.azure.resourcemanager.storagemover.StorageMoverManager serviceManager) {
+ this.innerObject = new AgentInner();
+ this.serviceManager = serviceManager;
+ this.agentName = name;
+ }
+
+ public AgentImpl update() {
+ this.updateAgent = new AgentUpdateParameters();
+ return this;
+ }
+
+ public Agent apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getAgents()
+ .updateWithResponse(resourceGroupName, storageMoverName, agentName, updateAgent, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public Agent apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getAgents()
+ .updateWithResponse(resourceGroupName, storageMoverName, agentName, updateAgent, context)
+ .getValue();
+ return this;
+ }
+
+ AgentImpl(AgentInner innerObject, com.azure.resourcemanager.storagemover.StorageMoverManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.storageMoverName = Utils.getValueFromIdByName(innerObject.id(), "storageMovers");
+ this.agentName = Utils.getValueFromIdByName(innerObject.id(), "agents");
+ }
+
+ public Agent refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getAgents()
+ .getWithResponse(resourceGroupName, storageMoverName, agentName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public Agent refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getAgents()
+ .getWithResponse(resourceGroupName, storageMoverName, agentName, context)
+ .getValue();
+ return this;
+ }
+
+ public AgentImpl withDescription(String description) {
+ if (isInCreateMode()) {
+ this.innerModel().withDescription(description);
+ return this;
+ } else {
+ this.updateAgent.withDescription(description);
+ return this;
+ }
+ }
+
+ public AgentImpl withArcResourceId(String arcResourceId) {
+ this.innerModel().withArcResourceId(arcResourceId);
+ return this;
+ }
+
+ public AgentImpl withArcVmUuid(String arcVmUuid) {
+ this.innerModel().withArcVmUuid(arcVmUuid);
+ return this;
+ }
+
+ private boolean isInCreateMode() {
+ return this.innerModel().id() == null;
+ }
+}
diff --git a/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/implementation/AgentsClientImpl.java b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/implementation/AgentsClientImpl.java
new file mode 100644
index 0000000000000..72f5ac6d8f3e3
--- /dev/null
+++ b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/implementation/AgentsClientImpl.java
@@ -0,0 +1,1180 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagemover.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.Patch;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.storagemover.fluent.AgentsClient;
+import com.azure.resourcemanager.storagemover.fluent.models.AgentInner;
+import com.azure.resourcemanager.storagemover.models.AgentList;
+import com.azure.resourcemanager.storagemover.models.AgentUpdateParameters;
+import java.nio.ByteBuffer;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in AgentsClient. */
+public final class AgentsClientImpl implements AgentsClient {
+ /** The proxy service used to perform REST calls. */
+ private final AgentsService service;
+
+ /** The service client containing this operation class. */
+ private final StorageMoverClientImpl client;
+
+ /**
+ * Initializes an instance of AgentsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ AgentsClientImpl(StorageMoverClientImpl client) {
+ this.service = RestProxy.create(AgentsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for StorageMoverClientAgents to be used by the proxy service to perform
+ * REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "StorageMoverClientAg")
+ private interface AgentsService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover"
+ + "/storageMovers/{storageMoverName}/agents")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("storageMoverName") String storageMoverName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover"
+ + "/storageMovers/{storageMoverName}/agents/{agentName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("storageMoverName") String storageMoverName,
+ @PathParam("agentName") String agentName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover"
+ + "/storageMovers/{storageMoverName}/agents/{agentName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> createOrUpdate(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("storageMoverName") String storageMoverName,
+ @PathParam("agentName") String agentName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") AgentInner agent,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Patch(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover"
+ + "/storageMovers/{storageMoverName}/agents/{agentName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> update(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("storageMoverName") String storageMoverName,
+ @PathParam("agentName") String agentName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") AgentUpdateParameters agent,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover"
+ + "/storageMovers/{storageMoverName}/agents/{agentName}")
+ @ExpectedResponses({202, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("storageMoverName") String storageMoverName,
+ @PathParam("agentName") String agentName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Lists all agents in a Storage Mover.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover 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 list of agents along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(String resourceGroupName, String storageMoverName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (storageMoverName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter storageMoverName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ storageMoverName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Lists all agents in a Storage Mover.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of agents along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(
+ String resourceGroupName, String storageMoverName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (storageMoverName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter storageMoverName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ storageMoverName,
+ this.client.getApiVersion(),
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Lists all agents in a Storage Mover.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover 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 list of agents as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceGroupName, String storageMoverName) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(resourceGroupName, storageMoverName),
+ nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists all agents in a Storage Mover.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of agents as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceGroupName, String storageMoverName, Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(resourceGroupName, storageMoverName, context),
+ nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Lists all agents in a Storage Mover.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover 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 list of agents as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceGroupName, String storageMoverName) {
+ return new PagedIterable<>(listAsync(resourceGroupName, storageMoverName));
+ }
+
+ /**
+ * Lists all agents in a Storage Mover.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of agents as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceGroupName, String storageMoverName, Context context) {
+ return new PagedIterable<>(listAsync(resourceGroupName, storageMoverName, context));
+ }
+
+ /**
+ * Gets an agent resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param agentName The name of the agent 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 an agent resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String storageMoverName, String agentName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (storageMoverName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter storageMoverName is required and cannot be null."));
+ }
+ if (agentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter agentName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ storageMoverName,
+ agentName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets an agent resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param agentName The name of the agent resource.
+ * @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 an agent resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String storageMoverName, String agentName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (storageMoverName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter storageMoverName is required and cannot be null."));
+ }
+ if (agentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter agentName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ storageMoverName,
+ agentName,
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * Gets an agent resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param agentName The name of the agent 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 an agent resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String resourceGroupName, String storageMoverName, String agentName) {
+ return getWithResponseAsync(resourceGroupName, storageMoverName, agentName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Gets an agent resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param agentName The name of the agent 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 an agent resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public AgentInner get(String resourceGroupName, String storageMoverName, String agentName) {
+ return getAsync(resourceGroupName, storageMoverName, agentName).block();
+ }
+
+ /**
+ * Gets an agent resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param agentName The name of the agent resource.
+ * @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 an agent resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(
+ String resourceGroupName, String storageMoverName, String agentName, Context context) {
+ return getWithResponseAsync(resourceGroupName, storageMoverName, agentName, context).block();
+ }
+
+ /**
+ * Creates or updates an agent resource, which references a hybrid compute machine that can run jobs.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param agentName The name of the agent resource.
+ * @param agent The agent 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 agent resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createOrUpdateWithResponseAsync(
+ String resourceGroupName, String storageMoverName, String agentName, AgentInner agent) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (storageMoverName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter storageMoverName is required and cannot be null."));
+ }
+ if (agentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter agentName is required and cannot be null."));
+ }
+ if (agent == null) {
+ return Mono.error(new IllegalArgumentException("Parameter agent is required and cannot be null."));
+ } else {
+ agent.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ storageMoverName,
+ agentName,
+ this.client.getApiVersion(),
+ agent,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Creates or updates an agent resource, which references a hybrid compute machine that can run jobs.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param agentName The name of the agent resource.
+ * @param agent The agent resource.
+ * @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 agent resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createOrUpdateWithResponseAsync(
+ String resourceGroupName, String storageMoverName, String agentName, AgentInner agent, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (storageMoverName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter storageMoverName is required and cannot be null."));
+ }
+ if (agentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter agentName is required and cannot be null."));
+ }
+ if (agent == null) {
+ return Mono.error(new IllegalArgumentException("Parameter agent is required and cannot be null."));
+ } else {
+ agent.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ storageMoverName,
+ agentName,
+ this.client.getApiVersion(),
+ agent,
+ accept,
+ context);
+ }
+
+ /**
+ * Creates or updates an agent resource, which references a hybrid compute machine that can run jobs.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param agentName The name of the agent resource.
+ * @param agent The agent 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 agent resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName, String storageMoverName, String agentName, AgentInner agent) {
+ return createOrUpdateWithResponseAsync(resourceGroupName, storageMoverName, agentName, agent)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Creates or updates an agent resource, which references a hybrid compute machine that can run jobs.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param agentName The name of the agent resource.
+ * @param agent The agent 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 agent resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public AgentInner createOrUpdate(
+ String resourceGroupName, String storageMoverName, String agentName, AgentInner agent) {
+ return createOrUpdateAsync(resourceGroupName, storageMoverName, agentName, agent).block();
+ }
+
+ /**
+ * Creates or updates an agent resource, which references a hybrid compute machine that can run jobs.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param agentName The name of the agent resource.
+ * @param agent The agent resource.
+ * @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 agent resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response createOrUpdateWithResponse(
+ String resourceGroupName, String storageMoverName, String agentName, AgentInner agent, Context context) {
+ return createOrUpdateWithResponseAsync(resourceGroupName, storageMoverName, agentName, agent, context).block();
+ }
+
+ /**
+ * Creates or updates an agent resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param agentName The name of the agent resource.
+ * @param agent The agent 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 agent resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(
+ String resourceGroupName, String storageMoverName, String agentName, AgentUpdateParameters agent) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (storageMoverName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter storageMoverName is required and cannot be null."));
+ }
+ if (agentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter agentName is required and cannot be null."));
+ }
+ if (agent == null) {
+ return Mono.error(new IllegalArgumentException("Parameter agent is required and cannot be null."));
+ } else {
+ agent.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .update(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ storageMoverName,
+ agentName,
+ this.client.getApiVersion(),
+ agent,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Creates or updates an agent resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param agentName The name of the agent resource.
+ * @param agent The agent resource.
+ * @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 agent resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(
+ String resourceGroupName,
+ String storageMoverName,
+ String agentName,
+ AgentUpdateParameters agent,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (storageMoverName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter storageMoverName is required and cannot be null."));
+ }
+ if (agentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter agentName is required and cannot be null."));
+ }
+ if (agent == null) {
+ return Mono.error(new IllegalArgumentException("Parameter agent is required and cannot be null."));
+ } else {
+ agent.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .update(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ storageMoverName,
+ agentName,
+ this.client.getApiVersion(),
+ agent,
+ accept,
+ context);
+ }
+
+ /**
+ * Creates or updates an agent resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param agentName The name of the agent resource.
+ * @param agent The agent 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 agent resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(
+ String resourceGroupName, String storageMoverName, String agentName, AgentUpdateParameters agent) {
+ return updateWithResponseAsync(resourceGroupName, storageMoverName, agentName, agent)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Creates or updates an agent resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param agentName The name of the agent resource.
+ * @param agent The agent 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 agent resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public AgentInner update(
+ String resourceGroupName, String storageMoverName, String agentName, AgentUpdateParameters agent) {
+ return updateAsync(resourceGroupName, storageMoverName, agentName, agent).block();
+ }
+
+ /**
+ * Creates or updates an agent resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param agentName The name of the agent resource.
+ * @param agent The agent resource.
+ * @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 agent resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response updateWithResponse(
+ String resourceGroupName,
+ String storageMoverName,
+ String agentName,
+ AgentUpdateParameters agent,
+ Context context) {
+ return updateWithResponseAsync(resourceGroupName, storageMoverName, agentName, agent, context).block();
+ }
+
+ /**
+ * Deletes an agent resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param agentName The name of the agent 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 {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(
+ String resourceGroupName, String storageMoverName, String agentName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (storageMoverName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter storageMoverName is required and cannot be null."));
+ }
+ if (agentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter agentName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ storageMoverName,
+ agentName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Deletes an agent resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param agentName The name of the agent resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(
+ String resourceGroupName, String storageMoverName, String agentName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (storageMoverName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter storageMoverName is required and cannot be null."));
+ }
+ if (agentName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter agentName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ storageMoverName,
+ agentName,
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * Deletes an agent resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param agentName The name of the agent 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 {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(
+ String resourceGroupName, String storageMoverName, String agentName) {
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, storageMoverName, agentName);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
+ }
+
+ /**
+ * Deletes an agent resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param agentName The name of the agent resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(
+ String resourceGroupName, String storageMoverName, String agentName, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ deleteWithResponseAsync(resourceGroupName, storageMoverName, agentName, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * Deletes an agent resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param agentName The name of the agent 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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(
+ String resourceGroupName, String storageMoverName, String agentName) {
+ return beginDeleteAsync(resourceGroupName, storageMoverName, agentName).getSyncPoller();
+ }
+
+ /**
+ * Deletes an agent resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param agentName The name of the agent resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(
+ String resourceGroupName, String storageMoverName, String agentName, Context context) {
+ return beginDeleteAsync(resourceGroupName, storageMoverName, agentName, context).getSyncPoller();
+ }
+
+ /**
+ * Deletes an agent resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param agentName The name of the agent 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 A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String storageMoverName, String agentName) {
+ return beginDeleteAsync(resourceGroupName, storageMoverName, agentName)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Deletes an agent resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param agentName The name of the agent resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(
+ String resourceGroupName, String storageMoverName, String agentName, Context context) {
+ return beginDeleteAsync(resourceGroupName, storageMoverName, agentName, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Deletes an agent resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param agentName The name of the agent 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String storageMoverName, String agentName) {
+ deleteAsync(resourceGroupName, storageMoverName, agentName).block();
+ }
+
+ /**
+ * Deletes an agent resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param agentName The name of the agent resource.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String storageMoverName, String agentName, Context context) {
+ deleteAsync(resourceGroupName, storageMoverName, agentName, context).block();
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @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 agents along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of agents along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+}
diff --git a/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/implementation/AgentsImpl.java b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/implementation/AgentsImpl.java
new file mode 100644
index 0000000000000..199c01f4d9ede
--- /dev/null
+++ b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/implementation/AgentsImpl.java
@@ -0,0 +1,187 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagemover.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.storagemover.fluent.AgentsClient;
+import com.azure.resourcemanager.storagemover.fluent.models.AgentInner;
+import com.azure.resourcemanager.storagemover.models.Agent;
+import com.azure.resourcemanager.storagemover.models.Agents;
+
+public final class AgentsImpl implements Agents {
+ private static final ClientLogger LOGGER = new ClientLogger(AgentsImpl.class);
+
+ private final AgentsClient innerClient;
+
+ private final com.azure.resourcemanager.storagemover.StorageMoverManager serviceManager;
+
+ public AgentsImpl(
+ AgentsClient innerClient, com.azure.resourcemanager.storagemover.StorageMoverManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list(String resourceGroupName, String storageMoverName) {
+ PagedIterable inner = this.serviceClient().list(resourceGroupName, storageMoverName);
+ return Utils.mapPage(inner, inner1 -> new AgentImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(String resourceGroupName, String storageMoverName, Context context) {
+ PagedIterable inner = this.serviceClient().list(resourceGroupName, storageMoverName, context);
+ return Utils.mapPage(inner, inner1 -> new AgentImpl(inner1, this.manager()));
+ }
+
+ public Agent get(String resourceGroupName, String storageMoverName, String agentName) {
+ AgentInner inner = this.serviceClient().get(resourceGroupName, storageMoverName, agentName);
+ if (inner != null) {
+ return new AgentImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getWithResponse(
+ String resourceGroupName, String storageMoverName, String agentName, Context context) {
+ Response inner =
+ this.serviceClient().getWithResponse(resourceGroupName, storageMoverName, agentName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new AgentImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public void delete(String resourceGroupName, String storageMoverName, String agentName) {
+ this.serviceClient().delete(resourceGroupName, storageMoverName, agentName);
+ }
+
+ public void delete(String resourceGroupName, String storageMoverName, String agentName, Context context) {
+ this.serviceClient().delete(resourceGroupName, storageMoverName, agentName, context);
+ }
+
+ public Agent getById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String storageMoverName = Utils.getValueFromIdByName(id, "storageMovers");
+ if (storageMoverName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'storageMovers'.", id)));
+ }
+ String agentName = Utils.getValueFromIdByName(id, "agents");
+ if (agentName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'agents'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, storageMoverName, agentName, Context.NONE).getValue();
+ }
+
+ public Response getByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String storageMoverName = Utils.getValueFromIdByName(id, "storageMovers");
+ if (storageMoverName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'storageMovers'.", id)));
+ }
+ String agentName = Utils.getValueFromIdByName(id, "agents");
+ if (agentName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'agents'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, storageMoverName, agentName, context);
+ }
+
+ public void deleteById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String storageMoverName = Utils.getValueFromIdByName(id, "storageMovers");
+ if (storageMoverName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'storageMovers'.", id)));
+ }
+ String agentName = Utils.getValueFromIdByName(id, "agents");
+ if (agentName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'agents'.", id)));
+ }
+ this.delete(resourceGroupName, storageMoverName, agentName, Context.NONE);
+ }
+
+ public void deleteByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String storageMoverName = Utils.getValueFromIdByName(id, "storageMovers");
+ if (storageMoverName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'storageMovers'.", id)));
+ }
+ String agentName = Utils.getValueFromIdByName(id, "agents");
+ if (agentName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'agents'.", id)));
+ }
+ this.delete(resourceGroupName, storageMoverName, agentName, context);
+ }
+
+ private AgentsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.storagemover.StorageMoverManager manager() {
+ return this.serviceManager;
+ }
+
+ public AgentImpl define(String name) {
+ return new AgentImpl(name, this.manager());
+ }
+}
diff --git a/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/implementation/EndpointImpl.java b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/implementation/EndpointImpl.java
new file mode 100644
index 0000000000000..62b5ccfb075a7
--- /dev/null
+++ b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/implementation/EndpointImpl.java
@@ -0,0 +1,157 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagemover.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.storagemover.fluent.models.EndpointInner;
+import com.azure.resourcemanager.storagemover.models.Endpoint;
+import com.azure.resourcemanager.storagemover.models.EndpointBaseProperties;
+import com.azure.resourcemanager.storagemover.models.EndpointBaseUpdateParameters;
+import com.azure.resourcemanager.storagemover.models.EndpointBaseUpdateProperties;
+
+public final class EndpointImpl implements Endpoint, Endpoint.Definition, Endpoint.Update {
+ private EndpointInner innerObject;
+
+ private final com.azure.resourcemanager.storagemover.StorageMoverManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public EndpointBaseProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
+ public EndpointInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.storagemover.StorageMoverManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String storageMoverName;
+
+ private String endpointName;
+
+ private EndpointBaseUpdateParameters updateEndpointParam;
+
+ public EndpointImpl withExistingStorageMover(String resourceGroupName, String storageMoverName) {
+ this.resourceGroupName = resourceGroupName;
+ this.storageMoverName = storageMoverName;
+ return this;
+ }
+
+ public Endpoint create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getEndpoints()
+ .createOrUpdateWithResponse(
+ resourceGroupName, storageMoverName, endpointName, this.innerModel(), Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public Endpoint create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getEndpoints()
+ .createOrUpdateWithResponse(
+ resourceGroupName, storageMoverName, endpointName, this.innerModel(), context)
+ .getValue();
+ return this;
+ }
+
+ EndpointImpl(String name, com.azure.resourcemanager.storagemover.StorageMoverManager serviceManager) {
+ this.innerObject = new EndpointInner();
+ this.serviceManager = serviceManager;
+ this.endpointName = name;
+ }
+
+ public EndpointImpl update() {
+ this.updateEndpointParam = new EndpointBaseUpdateParameters();
+ return this;
+ }
+
+ public Endpoint apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getEndpoints()
+ .updateWithResponse(
+ resourceGroupName, storageMoverName, endpointName, updateEndpointParam, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public Endpoint apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getEndpoints()
+ .updateWithResponse(resourceGroupName, storageMoverName, endpointName, updateEndpointParam, context)
+ .getValue();
+ return this;
+ }
+
+ EndpointImpl(EndpointInner innerObject, com.azure.resourcemanager.storagemover.StorageMoverManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.storageMoverName = Utils.getValueFromIdByName(innerObject.id(), "storageMovers");
+ this.endpointName = Utils.getValueFromIdByName(innerObject.id(), "endpoints");
+ }
+
+ public Endpoint refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getEndpoints()
+ .getWithResponse(resourceGroupName, storageMoverName, endpointName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public Endpoint refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getEndpoints()
+ .getWithResponse(resourceGroupName, storageMoverName, endpointName, context)
+ .getValue();
+ return this;
+ }
+
+ public EndpointImpl withProperties(EndpointBaseProperties properties) {
+ this.innerModel().withProperties(properties);
+ return this;
+ }
+
+ public EndpointImpl withProperties(EndpointBaseUpdateProperties properties) {
+ this.updateEndpointParam.withProperties(properties);
+ return this;
+ }
+}
diff --git a/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/implementation/EndpointsClientImpl.java b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/implementation/EndpointsClientImpl.java
new file mode 100644
index 0000000000000..da54d1bb6384e
--- /dev/null
+++ b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/implementation/EndpointsClientImpl.java
@@ -0,0 +1,1210 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagemover.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.Patch;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.storagemover.fluent.EndpointsClient;
+import com.azure.resourcemanager.storagemover.fluent.models.EndpointInner;
+import com.azure.resourcemanager.storagemover.models.EndpointBaseUpdateParameters;
+import com.azure.resourcemanager.storagemover.models.EndpointList;
+import java.nio.ByteBuffer;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in EndpointsClient. */
+public final class EndpointsClientImpl implements EndpointsClient {
+ /** The proxy service used to perform REST calls. */
+ private final EndpointsService service;
+
+ /** The service client containing this operation class. */
+ private final StorageMoverClientImpl client;
+
+ /**
+ * Initializes an instance of EndpointsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ EndpointsClientImpl(StorageMoverClientImpl client) {
+ this.service =
+ RestProxy.create(EndpointsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for StorageMoverClientEndpoints to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "StorageMoverClientEn")
+ private interface EndpointsService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover"
+ + "/storageMovers/{storageMoverName}/endpoints")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("storageMoverName") String storageMoverName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover"
+ + "/storageMovers/{storageMoverName}/endpoints/{endpointName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("storageMoverName") String storageMoverName,
+ @PathParam("endpointName") String endpointName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover"
+ + "/storageMovers/{storageMoverName}/endpoints/{endpointName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> createOrUpdate(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("storageMoverName") String storageMoverName,
+ @PathParam("endpointName") String endpointName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") EndpointInner endpointParam,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Patch(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover"
+ + "/storageMovers/{storageMoverName}/endpoints/{endpointName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> update(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("storageMoverName") String storageMoverName,
+ @PathParam("endpointName") String endpointName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") EndpointBaseUpdateParameters endpointParam,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover"
+ + "/storageMovers/{storageMoverName}/endpoints/{endpointName}")
+ @ExpectedResponses({202, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("storageMoverName") String storageMoverName,
+ @PathParam("endpointName") String endpointName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Lists all endpoints in a Storage Mover.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover 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 list of endpoints along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(String resourceGroupName, String storageMoverName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (storageMoverName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter storageMoverName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ storageMoverName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Lists all endpoints in a Storage Mover.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of endpoints along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(
+ String resourceGroupName, String storageMoverName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (storageMoverName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter storageMoverName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ storageMoverName,
+ this.client.getApiVersion(),
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Lists all endpoints in a Storage Mover.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover 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 list of endpoints as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceGroupName, String storageMoverName) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(resourceGroupName, storageMoverName),
+ nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists all endpoints in a Storage Mover.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of endpoints as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceGroupName, String storageMoverName, Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(resourceGroupName, storageMoverName, context),
+ nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Lists all endpoints in a Storage Mover.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover 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 list of endpoints as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceGroupName, String storageMoverName) {
+ return new PagedIterable<>(listAsync(resourceGroupName, storageMoverName));
+ }
+
+ /**
+ * Lists all endpoints in a Storage Mover.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of endpoints as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceGroupName, String storageMoverName, Context context) {
+ return new PagedIterable<>(listAsync(resourceGroupName, storageMoverName, context));
+ }
+
+ /**
+ * Gets an endpoint resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param endpointName The name of the endpoint 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 an endpoint resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String storageMoverName, String endpointName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (storageMoverName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter storageMoverName is required and cannot be null."));
+ }
+ if (endpointName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ storageMoverName,
+ endpointName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets an endpoint resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param endpointName The name of the endpoint resource.
+ * @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 an endpoint resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String storageMoverName, String endpointName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (storageMoverName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter storageMoverName is required and cannot be null."));
+ }
+ if (endpointName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ storageMoverName,
+ endpointName,
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * Gets an endpoint resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param endpointName The name of the endpoint 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 an endpoint resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String resourceGroupName, String storageMoverName, String endpointName) {
+ return getWithResponseAsync(resourceGroupName, storageMoverName, endpointName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Gets an endpoint resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param endpointName The name of the endpoint 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 an endpoint resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public EndpointInner get(String resourceGroupName, String storageMoverName, String endpointName) {
+ return getAsync(resourceGroupName, storageMoverName, endpointName).block();
+ }
+
+ /**
+ * Gets an endpoint resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param endpointName The name of the endpoint resource.
+ * @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 an endpoint resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(
+ String resourceGroupName, String storageMoverName, String endpointName, Context context) {
+ return getWithResponseAsync(resourceGroupName, storageMoverName, endpointName, context).block();
+ }
+
+ /**
+ * Creates or updates an endpoint resource, which represents a data transfer source or destination.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param endpointName The name of the endpoint resource.
+ * @param endpointParam The endpoint resource, which contains information about file sources and targets.
+ * @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 endpoint resource, which contains information about file sources and targets along with {@link
+ * Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createOrUpdateWithResponseAsync(
+ String resourceGroupName, String storageMoverName, String endpointName, EndpointInner endpointParam) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (storageMoverName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter storageMoverName is required and cannot be null."));
+ }
+ if (endpointName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null."));
+ }
+ if (endpointParam == null) {
+ return Mono.error(new IllegalArgumentException("Parameter endpointParam is required and cannot be null."));
+ } else {
+ endpointParam.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ storageMoverName,
+ endpointName,
+ this.client.getApiVersion(),
+ endpointParam,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Creates or updates an endpoint resource, which represents a data transfer source or destination.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param endpointName The name of the endpoint resource.
+ * @param endpointParam The endpoint resource, which contains information about file sources and targets.
+ * @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 endpoint resource, which contains information about file sources and targets along with {@link
+ * Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createOrUpdateWithResponseAsync(
+ String resourceGroupName,
+ String storageMoverName,
+ String endpointName,
+ EndpointInner endpointParam,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (storageMoverName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter storageMoverName is required and cannot be null."));
+ }
+ if (endpointName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null."));
+ }
+ if (endpointParam == null) {
+ return Mono.error(new IllegalArgumentException("Parameter endpointParam is required and cannot be null."));
+ } else {
+ endpointParam.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ storageMoverName,
+ endpointName,
+ this.client.getApiVersion(),
+ endpointParam,
+ accept,
+ context);
+ }
+
+ /**
+ * Creates or updates an endpoint resource, which represents a data transfer source or destination.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param endpointName The name of the endpoint resource.
+ * @param endpointParam The endpoint resource, which contains information about file sources and targets.
+ * @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 endpoint resource, which contains information about file sources and targets on successful completion
+ * of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName, String storageMoverName, String endpointName, EndpointInner endpointParam) {
+ return createOrUpdateWithResponseAsync(resourceGroupName, storageMoverName, endpointName, endpointParam)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Creates or updates an endpoint resource, which represents a data transfer source or destination.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param endpointName The name of the endpoint resource.
+ * @param endpointParam The endpoint resource, which contains information about file sources and targets.
+ * @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 endpoint resource, which contains information about file sources and targets.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public EndpointInner createOrUpdate(
+ String resourceGroupName, String storageMoverName, String endpointName, EndpointInner endpointParam) {
+ return createOrUpdateAsync(resourceGroupName, storageMoverName, endpointName, endpointParam).block();
+ }
+
+ /**
+ * Creates or updates an endpoint resource, which represents a data transfer source or destination.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param endpointName The name of the endpoint resource.
+ * @param endpointParam The endpoint resource, which contains information about file sources and targets.
+ * @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 endpoint resource, which contains information about file sources and targets along with {@link
+ * Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response createOrUpdateWithResponse(
+ String resourceGroupName,
+ String storageMoverName,
+ String endpointName,
+ EndpointInner endpointParam,
+ Context context) {
+ return createOrUpdateWithResponseAsync(
+ resourceGroupName, storageMoverName, endpointName, endpointParam, context)
+ .block();
+ }
+
+ /**
+ * Updates properties for an endpoint resource. Properties not specified in the request body will be unchanged.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param endpointName The name of the endpoint resource.
+ * @param endpointParam The endpoint 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 endpoint resource, which contains information about file sources and targets along with {@link
+ * Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(
+ String resourceGroupName,
+ String storageMoverName,
+ String endpointName,
+ EndpointBaseUpdateParameters endpointParam) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (storageMoverName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter storageMoverName is required and cannot be null."));
+ }
+ if (endpointName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null."));
+ }
+ if (endpointParam == null) {
+ return Mono.error(new IllegalArgumentException("Parameter endpointParam is required and cannot be null."));
+ } else {
+ endpointParam.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .update(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ storageMoverName,
+ endpointName,
+ this.client.getApiVersion(),
+ endpointParam,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Updates properties for an endpoint resource. Properties not specified in the request body will be unchanged.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param endpointName The name of the endpoint resource.
+ * @param endpointParam The endpoint resource.
+ * @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 endpoint resource, which contains information about file sources and targets along with {@link
+ * Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(
+ String resourceGroupName,
+ String storageMoverName,
+ String endpointName,
+ EndpointBaseUpdateParameters endpointParam,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (storageMoverName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter storageMoverName is required and cannot be null."));
+ }
+ if (endpointName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null."));
+ }
+ if (endpointParam == null) {
+ return Mono.error(new IllegalArgumentException("Parameter endpointParam is required and cannot be null."));
+ } else {
+ endpointParam.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .update(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ storageMoverName,
+ endpointName,
+ this.client.getApiVersion(),
+ endpointParam,
+ accept,
+ context);
+ }
+
+ /**
+ * Updates properties for an endpoint resource. Properties not specified in the request body will be unchanged.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param endpointName The name of the endpoint resource.
+ * @param endpointParam The endpoint 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 endpoint resource, which contains information about file sources and targets on successful completion
+ * of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(
+ String resourceGroupName,
+ String storageMoverName,
+ String endpointName,
+ EndpointBaseUpdateParameters endpointParam) {
+ return updateWithResponseAsync(resourceGroupName, storageMoverName, endpointName, endpointParam)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Updates properties for an endpoint resource. Properties not specified in the request body will be unchanged.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param endpointName The name of the endpoint resource.
+ * @param endpointParam The endpoint 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 endpoint resource, which contains information about file sources and targets.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public EndpointInner update(
+ String resourceGroupName,
+ String storageMoverName,
+ String endpointName,
+ EndpointBaseUpdateParameters endpointParam) {
+ return updateAsync(resourceGroupName, storageMoverName, endpointName, endpointParam).block();
+ }
+
+ /**
+ * Updates properties for an endpoint resource. Properties not specified in the request body will be unchanged.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param endpointName The name of the endpoint resource.
+ * @param endpointParam The endpoint resource.
+ * @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 endpoint resource, which contains information about file sources and targets along with {@link
+ * Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response updateWithResponse(
+ String resourceGroupName,
+ String storageMoverName,
+ String endpointName,
+ EndpointBaseUpdateParameters endpointParam,
+ Context context) {
+ return updateWithResponseAsync(resourceGroupName, storageMoverName, endpointName, endpointParam, context)
+ .block();
+ }
+
+ /**
+ * Deletes an endpoint resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param endpointName The name of the endpoint 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 {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(
+ String resourceGroupName, String storageMoverName, String endpointName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (storageMoverName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter storageMoverName is required and cannot be null."));
+ }
+ if (endpointName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ storageMoverName,
+ endpointName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Deletes an endpoint resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param endpointName The name of the endpoint resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(
+ String resourceGroupName, String storageMoverName, String endpointName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (storageMoverName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter storageMoverName is required and cannot be null."));
+ }
+ if (endpointName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ storageMoverName,
+ endpointName,
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * Deletes an endpoint resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param endpointName The name of the endpoint 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 {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(
+ String resourceGroupName, String storageMoverName, String endpointName) {
+ Mono>> mono =
+ deleteWithResponseAsync(resourceGroupName, storageMoverName, endpointName);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
+ }
+
+ /**
+ * Deletes an endpoint resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param endpointName The name of the endpoint resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(
+ String resourceGroupName, String storageMoverName, String endpointName, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ deleteWithResponseAsync(resourceGroupName, storageMoverName, endpointName, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * Deletes an endpoint resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param endpointName The name of the endpoint 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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(
+ String resourceGroupName, String storageMoverName, String endpointName) {
+ return beginDeleteAsync(resourceGroupName, storageMoverName, endpointName).getSyncPoller();
+ }
+
+ /**
+ * Deletes an endpoint resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param endpointName The name of the endpoint resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(
+ String resourceGroupName, String storageMoverName, String endpointName, Context context) {
+ return beginDeleteAsync(resourceGroupName, storageMoverName, endpointName, context).getSyncPoller();
+ }
+
+ /**
+ * Deletes an endpoint resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param endpointName The name of the endpoint 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 A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String storageMoverName, String endpointName) {
+ return beginDeleteAsync(resourceGroupName, storageMoverName, endpointName)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Deletes an endpoint resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param endpointName The name of the endpoint resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(
+ String resourceGroupName, String storageMoverName, String endpointName, Context context) {
+ return beginDeleteAsync(resourceGroupName, storageMoverName, endpointName, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Deletes an endpoint resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param endpointName The name of the endpoint 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String storageMoverName, String endpointName) {
+ deleteAsync(resourceGroupName, storageMoverName, endpointName).block();
+ }
+
+ /**
+ * Deletes an endpoint resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param endpointName The name of the endpoint resource.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String storageMoverName, String endpointName, Context context) {
+ deleteAsync(resourceGroupName, storageMoverName, endpointName, context).block();
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @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 endpoints along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of endpoints along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+}
diff --git a/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/implementation/EndpointsImpl.java b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/implementation/EndpointsImpl.java
new file mode 100644
index 0000000000000..179c9cf3d864d
--- /dev/null
+++ b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/implementation/EndpointsImpl.java
@@ -0,0 +1,187 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagemover.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.storagemover.fluent.EndpointsClient;
+import com.azure.resourcemanager.storagemover.fluent.models.EndpointInner;
+import com.azure.resourcemanager.storagemover.models.Endpoint;
+import com.azure.resourcemanager.storagemover.models.Endpoints;
+
+public final class EndpointsImpl implements Endpoints {
+ private static final ClientLogger LOGGER = new ClientLogger(EndpointsImpl.class);
+
+ private final EndpointsClient innerClient;
+
+ private final com.azure.resourcemanager.storagemover.StorageMoverManager serviceManager;
+
+ public EndpointsImpl(
+ EndpointsClient innerClient, com.azure.resourcemanager.storagemover.StorageMoverManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list(String resourceGroupName, String storageMoverName) {
+ PagedIterable inner = this.serviceClient().list(resourceGroupName, storageMoverName);
+ return Utils.mapPage(inner, inner1 -> new EndpointImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(String resourceGroupName, String storageMoverName, Context context) {
+ PagedIterable inner = this.serviceClient().list(resourceGroupName, storageMoverName, context);
+ return Utils.mapPage(inner, inner1 -> new EndpointImpl(inner1, this.manager()));
+ }
+
+ public Endpoint get(String resourceGroupName, String storageMoverName, String endpointName) {
+ EndpointInner inner = this.serviceClient().get(resourceGroupName, storageMoverName, endpointName);
+ if (inner != null) {
+ return new EndpointImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getWithResponse(
+ String resourceGroupName, String storageMoverName, String endpointName, Context context) {
+ Response inner =
+ this.serviceClient().getWithResponse(resourceGroupName, storageMoverName, endpointName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new EndpointImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public void delete(String resourceGroupName, String storageMoverName, String endpointName) {
+ this.serviceClient().delete(resourceGroupName, storageMoverName, endpointName);
+ }
+
+ public void delete(String resourceGroupName, String storageMoverName, String endpointName, Context context) {
+ this.serviceClient().delete(resourceGroupName, storageMoverName, endpointName, context);
+ }
+
+ public Endpoint getById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String storageMoverName = Utils.getValueFromIdByName(id, "storageMovers");
+ if (storageMoverName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'storageMovers'.", id)));
+ }
+ String endpointName = Utils.getValueFromIdByName(id, "endpoints");
+ if (endpointName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'endpoints'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, storageMoverName, endpointName, Context.NONE).getValue();
+ }
+
+ public Response getByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String storageMoverName = Utils.getValueFromIdByName(id, "storageMovers");
+ if (storageMoverName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'storageMovers'.", id)));
+ }
+ String endpointName = Utils.getValueFromIdByName(id, "endpoints");
+ if (endpointName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'endpoints'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, storageMoverName, endpointName, context);
+ }
+
+ public void deleteById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String storageMoverName = Utils.getValueFromIdByName(id, "storageMovers");
+ if (storageMoverName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'storageMovers'.", id)));
+ }
+ String endpointName = Utils.getValueFromIdByName(id, "endpoints");
+ if (endpointName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'endpoints'.", id)));
+ }
+ this.delete(resourceGroupName, storageMoverName, endpointName, Context.NONE);
+ }
+
+ public void deleteByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String storageMoverName = Utils.getValueFromIdByName(id, "storageMovers");
+ if (storageMoverName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'storageMovers'.", id)));
+ }
+ String endpointName = Utils.getValueFromIdByName(id, "endpoints");
+ if (endpointName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'endpoints'.", id)));
+ }
+ this.delete(resourceGroupName, storageMoverName, endpointName, context);
+ }
+
+ private EndpointsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.storagemover.StorageMoverManager manager() {
+ return this.serviceManager;
+ }
+
+ public EndpointImpl define(String name) {
+ return new EndpointImpl(name, this.manager());
+ }
+}
diff --git a/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/implementation/JobDefinitionImpl.java b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/implementation/JobDefinitionImpl.java
new file mode 100644
index 0000000000000..19cddbe6ff428
--- /dev/null
+++ b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/implementation/JobDefinitionImpl.java
@@ -0,0 +1,297 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagemover.implementation;
+
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.storagemover.fluent.models.JobDefinitionInner;
+import com.azure.resourcemanager.storagemover.models.CopyMode;
+import com.azure.resourcemanager.storagemover.models.JobDefinition;
+import com.azure.resourcemanager.storagemover.models.JobDefinitionUpdateParameters;
+import com.azure.resourcemanager.storagemover.models.JobRunResourceId;
+import com.azure.resourcemanager.storagemover.models.JobRunStatus;
+import com.azure.resourcemanager.storagemover.models.ProvisioningState;
+
+public final class JobDefinitionImpl implements JobDefinition, JobDefinition.Definition, JobDefinition.Update {
+ private JobDefinitionInner innerObject;
+
+ private final com.azure.resourcemanager.storagemover.StorageMoverManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public String description() {
+ return this.innerModel().description();
+ }
+
+ public CopyMode copyMode() {
+ return this.innerModel().copyMode();
+ }
+
+ public String sourceName() {
+ return this.innerModel().sourceName();
+ }
+
+ public String sourceResourceId() {
+ return this.innerModel().sourceResourceId();
+ }
+
+ public String sourceSubpath() {
+ return this.innerModel().sourceSubpath();
+ }
+
+ public String targetName() {
+ return this.innerModel().targetName();
+ }
+
+ public String targetResourceId() {
+ return this.innerModel().targetResourceId();
+ }
+
+ public String targetSubpath() {
+ return this.innerModel().targetSubpath();
+ }
+
+ public String latestJobRunName() {
+ return this.innerModel().latestJobRunName();
+ }
+
+ public String latestJobRunResourceId() {
+ return this.innerModel().latestJobRunResourceId();
+ }
+
+ public JobRunStatus latestJobRunStatus() {
+ return this.innerModel().latestJobRunStatus();
+ }
+
+ public String agentName() {
+ return this.innerModel().agentName();
+ }
+
+ public String agentResourceId() {
+ return this.innerModel().agentResourceId();
+ }
+
+ public ProvisioningState provisioningState() {
+ return this.innerModel().provisioningState();
+ }
+
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
+ public JobDefinitionInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.storagemover.StorageMoverManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String storageMoverName;
+
+ private String projectName;
+
+ private String jobDefinitionName;
+
+ private JobDefinitionUpdateParameters updateJobDefinition;
+
+ public JobDefinitionImpl withExistingProject(
+ String resourceGroupName, String storageMoverName, String projectName) {
+ this.resourceGroupName = resourceGroupName;
+ this.storageMoverName = storageMoverName;
+ this.projectName = projectName;
+ return this;
+ }
+
+ public JobDefinition create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getJobDefinitions()
+ .createOrUpdateWithResponse(
+ resourceGroupName,
+ storageMoverName,
+ projectName,
+ jobDefinitionName,
+ this.innerModel(),
+ Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public JobDefinition create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getJobDefinitions()
+ .createOrUpdateWithResponse(
+ resourceGroupName, storageMoverName, projectName, jobDefinitionName, this.innerModel(), context)
+ .getValue();
+ return this;
+ }
+
+ JobDefinitionImpl(String name, com.azure.resourcemanager.storagemover.StorageMoverManager serviceManager) {
+ this.innerObject = new JobDefinitionInner();
+ this.serviceManager = serviceManager;
+ this.jobDefinitionName = name;
+ }
+
+ public JobDefinitionImpl update() {
+ this.updateJobDefinition = new JobDefinitionUpdateParameters();
+ return this;
+ }
+
+ public JobDefinition apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getJobDefinitions()
+ .updateWithResponse(
+ resourceGroupName,
+ storageMoverName,
+ projectName,
+ jobDefinitionName,
+ updateJobDefinition,
+ Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public JobDefinition apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getJobDefinitions()
+ .updateWithResponse(
+ resourceGroupName, storageMoverName, projectName, jobDefinitionName, updateJobDefinition, context)
+ .getValue();
+ return this;
+ }
+
+ JobDefinitionImpl(
+ JobDefinitionInner innerObject, com.azure.resourcemanager.storagemover.StorageMoverManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.storageMoverName = Utils.getValueFromIdByName(innerObject.id(), "storageMovers");
+ this.projectName = Utils.getValueFromIdByName(innerObject.id(), "projects");
+ this.jobDefinitionName = Utils.getValueFromIdByName(innerObject.id(), "jobDefinitions");
+ }
+
+ public JobDefinition refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getJobDefinitions()
+ .getWithResponse(resourceGroupName, storageMoverName, projectName, jobDefinitionName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public JobDefinition refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getJobDefinitions()
+ .getWithResponse(resourceGroupName, storageMoverName, projectName, jobDefinitionName, context)
+ .getValue();
+ return this;
+ }
+
+ public JobRunResourceId startJob() {
+ return serviceManager
+ .jobDefinitions()
+ .startJob(resourceGroupName, storageMoverName, projectName, jobDefinitionName);
+ }
+
+ public Response startJobWithResponse(Context context) {
+ return serviceManager
+ .jobDefinitions()
+ .startJobWithResponse(resourceGroupName, storageMoverName, projectName, jobDefinitionName, context);
+ }
+
+ public JobRunResourceId stopJob() {
+ return serviceManager
+ .jobDefinitions()
+ .stopJob(resourceGroupName, storageMoverName, projectName, jobDefinitionName);
+ }
+
+ public Response stopJobWithResponse(Context context) {
+ return serviceManager
+ .jobDefinitions()
+ .stopJobWithResponse(resourceGroupName, storageMoverName, projectName, jobDefinitionName, context);
+ }
+
+ public JobDefinitionImpl withDescription(String description) {
+ if (isInCreateMode()) {
+ this.innerModel().withDescription(description);
+ return this;
+ } else {
+ this.updateJobDefinition.withDescription(description);
+ return this;
+ }
+ }
+
+ public JobDefinitionImpl withCopyMode(CopyMode copyMode) {
+ if (isInCreateMode()) {
+ this.innerModel().withCopyMode(copyMode);
+ return this;
+ } else {
+ this.updateJobDefinition.withCopyMode(copyMode);
+ return this;
+ }
+ }
+
+ public JobDefinitionImpl withSourceName(String sourceName) {
+ this.innerModel().withSourceName(sourceName);
+ return this;
+ }
+
+ public JobDefinitionImpl withSourceSubpath(String sourceSubpath) {
+ this.innerModel().withSourceSubpath(sourceSubpath);
+ return this;
+ }
+
+ public JobDefinitionImpl withTargetName(String targetName) {
+ this.innerModel().withTargetName(targetName);
+ return this;
+ }
+
+ public JobDefinitionImpl withTargetSubpath(String targetSubpath) {
+ this.innerModel().withTargetSubpath(targetSubpath);
+ return this;
+ }
+
+ public JobDefinitionImpl withAgentName(String agentName) {
+ if (isInCreateMode()) {
+ this.innerModel().withAgentName(agentName);
+ return this;
+ } else {
+ this.updateJobDefinition.withAgentName(agentName);
+ return this;
+ }
+ }
+
+ private boolean isInCreateMode() {
+ return this.innerModel().id() == null;
+ }
+}
diff --git a/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/implementation/JobDefinitionsClientImpl.java b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/implementation/JobDefinitionsClientImpl.java
new file mode 100644
index 0000000000000..8846a63926010
--- /dev/null
+++ b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/implementation/JobDefinitionsClientImpl.java
@@ -0,0 +1,1757 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagemover.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.Patch;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Post;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.storagemover.fluent.JobDefinitionsClient;
+import com.azure.resourcemanager.storagemover.fluent.models.JobDefinitionInner;
+import com.azure.resourcemanager.storagemover.fluent.models.JobRunResourceIdInner;
+import com.azure.resourcemanager.storagemover.models.JobDefinitionList;
+import com.azure.resourcemanager.storagemover.models.JobDefinitionUpdateParameters;
+import java.nio.ByteBuffer;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in JobDefinitionsClient. */
+public final class JobDefinitionsClientImpl implements JobDefinitionsClient {
+ /** The proxy service used to perform REST calls. */
+ private final JobDefinitionsService service;
+
+ /** The service client containing this operation class. */
+ private final StorageMoverClientImpl client;
+
+ /**
+ * Initializes an instance of JobDefinitionsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ JobDefinitionsClientImpl(StorageMoverClientImpl client) {
+ this.service =
+ RestProxy.create(JobDefinitionsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for StorageMoverClientJobDefinitions to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "StorageMoverClientJo")
+ private interface JobDefinitionsService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover"
+ + "/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("storageMoverName") String storageMoverName,
+ @PathParam("projectName") String projectName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover"
+ + "/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("storageMoverName") String storageMoverName,
+ @PathParam("projectName") String projectName,
+ @PathParam("jobDefinitionName") String jobDefinitionName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover"
+ + "/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> createOrUpdate(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("storageMoverName") String storageMoverName,
+ @PathParam("projectName") String projectName,
+ @PathParam("jobDefinitionName") String jobDefinitionName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") JobDefinitionInner jobDefinition,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Patch(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover"
+ + "/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> update(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("storageMoverName") String storageMoverName,
+ @PathParam("projectName") String projectName,
+ @PathParam("jobDefinitionName") String jobDefinitionName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") JobDefinitionUpdateParameters jobDefinition,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover"
+ + "/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}")
+ @ExpectedResponses({202, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("storageMoverName") String storageMoverName,
+ @PathParam("projectName") String projectName,
+ @PathParam("jobDefinitionName") String jobDefinitionName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover"
+ + "/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}"
+ + "/startJob")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> startJob(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("storageMoverName") String storageMoverName,
+ @PathParam("projectName") String projectName,
+ @PathParam("jobDefinitionName") String jobDefinitionName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover"
+ + "/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}/stopJob")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> stopJob(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("storageMoverName") String storageMoverName,
+ @PathParam("projectName") String projectName,
+ @PathParam("jobDefinitionName") String jobDefinitionName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Lists all job definitions in a project.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project 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 list of job definitions along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(
+ String resourceGroupName, String storageMoverName, String projectName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (storageMoverName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter storageMoverName is required and cannot be null."));
+ }
+ if (projectName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ storageMoverName,
+ projectName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Lists all job definitions in a project.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of job definitions along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(
+ String resourceGroupName, String storageMoverName, String projectName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (storageMoverName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter storageMoverName is required and cannot be null."));
+ }
+ if (projectName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ storageMoverName,
+ projectName,
+ this.client.getApiVersion(),
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Lists all job definitions in a project.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project 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 list of job definitions as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(
+ String resourceGroupName, String storageMoverName, String projectName) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(resourceGroupName, storageMoverName, projectName),
+ nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists all job definitions in a project.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of job definitions as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(
+ String resourceGroupName, String storageMoverName, String projectName, Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(resourceGroupName, storageMoverName, projectName, context),
+ nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Lists all job definitions in a project.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project 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 list of job definitions as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(
+ String resourceGroupName, String storageMoverName, String projectName) {
+ return new PagedIterable<>(listAsync(resourceGroupName, storageMoverName, projectName));
+ }
+
+ /**
+ * Lists all job definitions in a project.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of job definitions as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(
+ String resourceGroupName, String storageMoverName, String projectName, Context context) {
+ return new PagedIterable<>(listAsync(resourceGroupName, storageMoverName, projectName, context));
+ }
+
+ /**
+ * Gets a job definition resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition 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 a job definition resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String storageMoverName, String projectName, String jobDefinitionName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (storageMoverName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter storageMoverName is required and cannot be null."));
+ }
+ if (projectName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null."));
+ }
+ if (jobDefinitionName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter jobDefinitionName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ storageMoverName,
+ projectName,
+ jobDefinitionName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets a job definition resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a job definition resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName,
+ String storageMoverName,
+ String projectName,
+ String jobDefinitionName,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (storageMoverName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter storageMoverName is required and cannot be null."));
+ }
+ if (projectName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null."));
+ }
+ if (jobDefinitionName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter jobDefinitionName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ storageMoverName,
+ projectName,
+ jobDefinitionName,
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * Gets a job definition resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition 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 a job definition resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(
+ String resourceGroupName, String storageMoverName, String projectName, String jobDefinitionName) {
+ return getWithResponseAsync(resourceGroupName, storageMoverName, projectName, jobDefinitionName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Gets a job definition resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition 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 a job definition resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public JobDefinitionInner get(
+ String resourceGroupName, String storageMoverName, String projectName, String jobDefinitionName) {
+ return getAsync(resourceGroupName, storageMoverName, projectName, jobDefinitionName).block();
+ }
+
+ /**
+ * Gets a job definition resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a job definition resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(
+ String resourceGroupName,
+ String storageMoverName,
+ String projectName,
+ String jobDefinitionName,
+ Context context) {
+ return getWithResponseAsync(resourceGroupName, storageMoverName, projectName, jobDefinitionName, context)
+ .block();
+ }
+
+ /**
+ * Creates or updates a job definition resource, which contains configuration for a single unit of managed data
+ * transfer.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition resource.
+ * @param jobDefinition The job definition 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 job definition resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createOrUpdateWithResponseAsync(
+ String resourceGroupName,
+ String storageMoverName,
+ String projectName,
+ String jobDefinitionName,
+ JobDefinitionInner jobDefinition) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (storageMoverName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter storageMoverName is required and cannot be null."));
+ }
+ if (projectName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null."));
+ }
+ if (jobDefinitionName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter jobDefinitionName is required and cannot be null."));
+ }
+ if (jobDefinition == null) {
+ return Mono.error(new IllegalArgumentException("Parameter jobDefinition is required and cannot be null."));
+ } else {
+ jobDefinition.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ storageMoverName,
+ projectName,
+ jobDefinitionName,
+ this.client.getApiVersion(),
+ jobDefinition,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Creates or updates a job definition resource, which contains configuration for a single unit of managed data
+ * transfer.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition resource.
+ * @param jobDefinition The job definition resource.
+ * @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 job definition resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createOrUpdateWithResponseAsync(
+ String resourceGroupName,
+ String storageMoverName,
+ String projectName,
+ String jobDefinitionName,
+ JobDefinitionInner jobDefinition,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (storageMoverName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter storageMoverName is required and cannot be null."));
+ }
+ if (projectName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null."));
+ }
+ if (jobDefinitionName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter jobDefinitionName is required and cannot be null."));
+ }
+ if (jobDefinition == null) {
+ return Mono.error(new IllegalArgumentException("Parameter jobDefinition is required and cannot be null."));
+ } else {
+ jobDefinition.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ storageMoverName,
+ projectName,
+ jobDefinitionName,
+ this.client.getApiVersion(),
+ jobDefinition,
+ accept,
+ context);
+ }
+
+ /**
+ * Creates or updates a job definition resource, which contains configuration for a single unit of managed data
+ * transfer.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition resource.
+ * @param jobDefinition The job definition 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 job definition resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName,
+ String storageMoverName,
+ String projectName,
+ String jobDefinitionName,
+ JobDefinitionInner jobDefinition) {
+ return createOrUpdateWithResponseAsync(
+ resourceGroupName, storageMoverName, projectName, jobDefinitionName, jobDefinition)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Creates or updates a job definition resource, which contains configuration for a single unit of managed data
+ * transfer.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition resource.
+ * @param jobDefinition The job definition 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 job definition resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public JobDefinitionInner createOrUpdate(
+ String resourceGroupName,
+ String storageMoverName,
+ String projectName,
+ String jobDefinitionName,
+ JobDefinitionInner jobDefinition) {
+ return createOrUpdateAsync(resourceGroupName, storageMoverName, projectName, jobDefinitionName, jobDefinition)
+ .block();
+ }
+
+ /**
+ * Creates or updates a job definition resource, which contains configuration for a single unit of managed data
+ * transfer.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition resource.
+ * @param jobDefinition The job definition resource.
+ * @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 job definition resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response createOrUpdateWithResponse(
+ String resourceGroupName,
+ String storageMoverName,
+ String projectName,
+ String jobDefinitionName,
+ JobDefinitionInner jobDefinition,
+ Context context) {
+ return createOrUpdateWithResponseAsync(
+ resourceGroupName, storageMoverName, projectName, jobDefinitionName, jobDefinition, context)
+ .block();
+ }
+
+ /**
+ * Updates properties for a job definition resource. Properties not specified in the request body will be unchanged.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition resource.
+ * @param jobDefinition The job definition 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 job definition resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(
+ String resourceGroupName,
+ String storageMoverName,
+ String projectName,
+ String jobDefinitionName,
+ JobDefinitionUpdateParameters jobDefinition) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (storageMoverName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter storageMoverName is required and cannot be null."));
+ }
+ if (projectName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null."));
+ }
+ if (jobDefinitionName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter jobDefinitionName is required and cannot be null."));
+ }
+ if (jobDefinition == null) {
+ return Mono.error(new IllegalArgumentException("Parameter jobDefinition is required and cannot be null."));
+ } else {
+ jobDefinition.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .update(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ storageMoverName,
+ projectName,
+ jobDefinitionName,
+ this.client.getApiVersion(),
+ jobDefinition,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Updates properties for a job definition resource. Properties not specified in the request body will be unchanged.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition resource.
+ * @param jobDefinition The job definition resource.
+ * @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 job definition resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(
+ String resourceGroupName,
+ String storageMoverName,
+ String projectName,
+ String jobDefinitionName,
+ JobDefinitionUpdateParameters jobDefinition,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (storageMoverName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter storageMoverName is required and cannot be null."));
+ }
+ if (projectName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null."));
+ }
+ if (jobDefinitionName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter jobDefinitionName is required and cannot be null."));
+ }
+ if (jobDefinition == null) {
+ return Mono.error(new IllegalArgumentException("Parameter jobDefinition is required and cannot be null."));
+ } else {
+ jobDefinition.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .update(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ storageMoverName,
+ projectName,
+ jobDefinitionName,
+ this.client.getApiVersion(),
+ jobDefinition,
+ accept,
+ context);
+ }
+
+ /**
+ * Updates properties for a job definition resource. Properties not specified in the request body will be unchanged.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition resource.
+ * @param jobDefinition The job definition 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 job definition resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(
+ String resourceGroupName,
+ String storageMoverName,
+ String projectName,
+ String jobDefinitionName,
+ JobDefinitionUpdateParameters jobDefinition) {
+ return updateWithResponseAsync(
+ resourceGroupName, storageMoverName, projectName, jobDefinitionName, jobDefinition)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Updates properties for a job definition resource. Properties not specified in the request body will be unchanged.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition resource.
+ * @param jobDefinition The job definition 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 job definition resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public JobDefinitionInner update(
+ String resourceGroupName,
+ String storageMoverName,
+ String projectName,
+ String jobDefinitionName,
+ JobDefinitionUpdateParameters jobDefinition) {
+ return updateAsync(resourceGroupName, storageMoverName, projectName, jobDefinitionName, jobDefinition).block();
+ }
+
+ /**
+ * Updates properties for a job definition resource. Properties not specified in the request body will be unchanged.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition resource.
+ * @param jobDefinition The job definition resource.
+ * @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 job definition resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response updateWithResponse(
+ String resourceGroupName,
+ String storageMoverName,
+ String projectName,
+ String jobDefinitionName,
+ JobDefinitionUpdateParameters jobDefinition,
+ Context context) {
+ return updateWithResponseAsync(
+ resourceGroupName, storageMoverName, projectName, jobDefinitionName, jobDefinition, context)
+ .block();
+ }
+
+ /**
+ * Deletes a job definition resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition 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 {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(
+ String resourceGroupName, String storageMoverName, String projectName, String jobDefinitionName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (storageMoverName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter storageMoverName is required and cannot be null."));
+ }
+ if (projectName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null."));
+ }
+ if (jobDefinitionName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter jobDefinitionName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ storageMoverName,
+ projectName,
+ jobDefinitionName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Deletes a job definition resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(
+ String resourceGroupName,
+ String storageMoverName,
+ String projectName,
+ String jobDefinitionName,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (storageMoverName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter storageMoverName is required and cannot be null."));
+ }
+ if (projectName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null."));
+ }
+ if (jobDefinitionName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter jobDefinitionName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ storageMoverName,
+ projectName,
+ jobDefinitionName,
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * Deletes a job definition resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition 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 {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(
+ String resourceGroupName, String storageMoverName, String projectName, String jobDefinitionName) {
+ Mono>> mono =
+ deleteWithResponseAsync(resourceGroupName, storageMoverName, projectName, jobDefinitionName);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
+ }
+
+ /**
+ * Deletes a job definition resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(
+ String resourceGroupName,
+ String storageMoverName,
+ String projectName,
+ String jobDefinitionName,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ deleteWithResponseAsync(resourceGroupName, storageMoverName, projectName, jobDefinitionName, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * Deletes a job definition resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition 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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(
+ String resourceGroupName, String storageMoverName, String projectName, String jobDefinitionName) {
+ return beginDeleteAsync(resourceGroupName, storageMoverName, projectName, jobDefinitionName).getSyncPoller();
+ }
+
+ /**
+ * Deletes a job definition resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(
+ String resourceGroupName,
+ String storageMoverName,
+ String projectName,
+ String jobDefinitionName,
+ Context context) {
+ return beginDeleteAsync(resourceGroupName, storageMoverName, projectName, jobDefinitionName, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * Deletes a job definition resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition 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 A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(
+ String resourceGroupName, String storageMoverName, String projectName, String jobDefinitionName) {
+ return beginDeleteAsync(resourceGroupName, storageMoverName, projectName, jobDefinitionName)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Deletes a job definition resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(
+ String resourceGroupName,
+ String storageMoverName,
+ String projectName,
+ String jobDefinitionName,
+ Context context) {
+ return beginDeleteAsync(resourceGroupName, storageMoverName, projectName, jobDefinitionName, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Deletes a job definition resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(
+ String resourceGroupName, String storageMoverName, String projectName, String jobDefinitionName) {
+ deleteAsync(resourceGroupName, storageMoverName, projectName, jobDefinitionName).block();
+ }
+
+ /**
+ * Deletes a job definition resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition resource.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(
+ String resourceGroupName,
+ String storageMoverName,
+ String projectName,
+ String jobDefinitionName,
+ Context context) {
+ deleteAsync(resourceGroupName, storageMoverName, projectName, jobDefinitionName, context).block();
+ }
+
+ /**
+ * Requests an agent to start a new instance of this job definition, generating a new job run resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition 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 response that identifies a JobRun along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> startJobWithResponseAsync(
+ String resourceGroupName, String storageMoverName, String projectName, String jobDefinitionName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (storageMoverName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter storageMoverName is required and cannot be null."));
+ }
+ if (projectName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null."));
+ }
+ if (jobDefinitionName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter jobDefinitionName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .startJob(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ storageMoverName,
+ projectName,
+ jobDefinitionName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Requests an agent to start a new instance of this job definition, generating a new job run resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition resource.
+ * @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 response that identifies a JobRun along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> startJobWithResponseAsync(
+ String resourceGroupName,
+ String storageMoverName,
+ String projectName,
+ String jobDefinitionName,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (storageMoverName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter storageMoverName is required and cannot be null."));
+ }
+ if (projectName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null."));
+ }
+ if (jobDefinitionName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter jobDefinitionName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .startJob(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ storageMoverName,
+ projectName,
+ jobDefinitionName,
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * Requests an agent to start a new instance of this job definition, generating a new job run resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition 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 response that identifies a JobRun on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono startJobAsync(
+ String resourceGroupName, String storageMoverName, String projectName, String jobDefinitionName) {
+ return startJobWithResponseAsync(resourceGroupName, storageMoverName, projectName, jobDefinitionName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Requests an agent to start a new instance of this job definition, generating a new job run resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition 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 response that identifies a JobRun.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public JobRunResourceIdInner startJob(
+ String resourceGroupName, String storageMoverName, String projectName, String jobDefinitionName) {
+ return startJobAsync(resourceGroupName, storageMoverName, projectName, jobDefinitionName).block();
+ }
+
+ /**
+ * Requests an agent to start a new instance of this job definition, generating a new job run resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition resource.
+ * @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 response that identifies a JobRun along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response startJobWithResponse(
+ String resourceGroupName,
+ String storageMoverName,
+ String projectName,
+ String jobDefinitionName,
+ Context context) {
+ return startJobWithResponseAsync(resourceGroupName, storageMoverName, projectName, jobDefinitionName, context)
+ .block();
+ }
+
+ /**
+ * Requests the agent of any active instance of this job definition to stop.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition 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 response that identifies a JobRun along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> stopJobWithResponseAsync(
+ String resourceGroupName, String storageMoverName, String projectName, String jobDefinitionName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (storageMoverName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter storageMoverName is required and cannot be null."));
+ }
+ if (projectName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null."));
+ }
+ if (jobDefinitionName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter jobDefinitionName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .stopJob(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ storageMoverName,
+ projectName,
+ jobDefinitionName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Requests the agent of any active instance of this job definition to stop.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition resource.
+ * @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 response that identifies a JobRun along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> stopJobWithResponseAsync(
+ String resourceGroupName,
+ String storageMoverName,
+ String projectName,
+ String jobDefinitionName,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (storageMoverName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter storageMoverName is required and cannot be null."));
+ }
+ if (projectName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null."));
+ }
+ if (jobDefinitionName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter jobDefinitionName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .stopJob(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ storageMoverName,
+ projectName,
+ jobDefinitionName,
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * Requests the agent of any active instance of this job definition to stop.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition 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 response that identifies a JobRun on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono stopJobAsync(
+ String resourceGroupName, String storageMoverName, String projectName, String jobDefinitionName) {
+ return stopJobWithResponseAsync(resourceGroupName, storageMoverName, projectName, jobDefinitionName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Requests the agent of any active instance of this job definition to stop.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition 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 response that identifies a JobRun.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public JobRunResourceIdInner stopJob(
+ String resourceGroupName, String storageMoverName, String projectName, String jobDefinitionName) {
+ return stopJobAsync(resourceGroupName, storageMoverName, projectName, jobDefinitionName).block();
+ }
+
+ /**
+ * Requests the agent of any active instance of this job definition to stop.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition resource.
+ * @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 response that identifies a JobRun along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response stopJobWithResponse(
+ String resourceGroupName,
+ String storageMoverName,
+ String projectName,
+ String jobDefinitionName,
+ Context context) {
+ return stopJobWithResponseAsync(resourceGroupName, storageMoverName, projectName, jobDefinitionName, context)
+ .block();
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @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 job definitions along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of job definitions along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+}
diff --git a/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/implementation/JobDefinitionsImpl.java b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/implementation/JobDefinitionsImpl.java
new file mode 100644
index 0000000000000..9624f2197c260
--- /dev/null
+++ b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/implementation/JobDefinitionsImpl.java
@@ -0,0 +1,304 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagemover.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.storagemover.fluent.JobDefinitionsClient;
+import com.azure.resourcemanager.storagemover.fluent.models.JobDefinitionInner;
+import com.azure.resourcemanager.storagemover.fluent.models.JobRunResourceIdInner;
+import com.azure.resourcemanager.storagemover.models.JobDefinition;
+import com.azure.resourcemanager.storagemover.models.JobDefinitions;
+import com.azure.resourcemanager.storagemover.models.JobRunResourceId;
+
+public final class JobDefinitionsImpl implements JobDefinitions {
+ private static final ClientLogger LOGGER = new ClientLogger(JobDefinitionsImpl.class);
+
+ private final JobDefinitionsClient innerClient;
+
+ private final com.azure.resourcemanager.storagemover.StorageMoverManager serviceManager;
+
+ public JobDefinitionsImpl(
+ JobDefinitionsClient innerClient, com.azure.resourcemanager.storagemover.StorageMoverManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list(String resourceGroupName, String storageMoverName, String projectName) {
+ PagedIterable inner =
+ this.serviceClient().list(resourceGroupName, storageMoverName, projectName);
+ return Utils.mapPage(inner, inner1 -> new JobDefinitionImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(
+ String resourceGroupName, String storageMoverName, String projectName, Context context) {
+ PagedIterable inner =
+ this.serviceClient().list(resourceGroupName, storageMoverName, projectName, context);
+ return Utils.mapPage(inner, inner1 -> new JobDefinitionImpl(inner1, this.manager()));
+ }
+
+ public JobDefinition get(
+ String resourceGroupName, String storageMoverName, String projectName, String jobDefinitionName) {
+ JobDefinitionInner inner =
+ this.serviceClient().get(resourceGroupName, storageMoverName, projectName, jobDefinitionName);
+ if (inner != null) {
+ return new JobDefinitionImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getWithResponse(
+ String resourceGroupName,
+ String storageMoverName,
+ String projectName,
+ String jobDefinitionName,
+ Context context) {
+ Response inner =
+ this
+ .serviceClient()
+ .getWithResponse(resourceGroupName, storageMoverName, projectName, jobDefinitionName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new JobDefinitionImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public void delete(
+ String resourceGroupName, String storageMoverName, String projectName, String jobDefinitionName) {
+ this.serviceClient().delete(resourceGroupName, storageMoverName, projectName, jobDefinitionName);
+ }
+
+ public void delete(
+ String resourceGroupName,
+ String storageMoverName,
+ String projectName,
+ String jobDefinitionName,
+ Context context) {
+ this.serviceClient().delete(resourceGroupName, storageMoverName, projectName, jobDefinitionName, context);
+ }
+
+ public JobRunResourceId startJob(
+ String resourceGroupName, String storageMoverName, String projectName, String jobDefinitionName) {
+ JobRunResourceIdInner inner =
+ this.serviceClient().startJob(resourceGroupName, storageMoverName, projectName, jobDefinitionName);
+ if (inner != null) {
+ return new JobRunResourceIdImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response startJobWithResponse(
+ String resourceGroupName,
+ String storageMoverName,
+ String projectName,
+ String jobDefinitionName,
+ Context context) {
+ Response inner =
+ this
+ .serviceClient()
+ .startJobWithResponse(resourceGroupName, storageMoverName, projectName, jobDefinitionName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new JobRunResourceIdImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public JobRunResourceId stopJob(
+ String resourceGroupName, String storageMoverName, String projectName, String jobDefinitionName) {
+ JobRunResourceIdInner inner =
+ this.serviceClient().stopJob(resourceGroupName, storageMoverName, projectName, jobDefinitionName);
+ if (inner != null) {
+ return new JobRunResourceIdImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response stopJobWithResponse(
+ String resourceGroupName,
+ String storageMoverName,
+ String projectName,
+ String jobDefinitionName,
+ Context context) {
+ Response inner =
+ this
+ .serviceClient()
+ .stopJobWithResponse(resourceGroupName, storageMoverName, projectName, jobDefinitionName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new JobRunResourceIdImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public JobDefinition getById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String storageMoverName = Utils.getValueFromIdByName(id, "storageMovers");
+ if (storageMoverName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'storageMovers'.", id)));
+ }
+ String projectName = Utils.getValueFromIdByName(id, "projects");
+ if (projectName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'projects'.", id)));
+ }
+ String jobDefinitionName = Utils.getValueFromIdByName(id, "jobDefinitions");
+ if (jobDefinitionName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'jobDefinitions'.", id)));
+ }
+ return this
+ .getWithResponse(resourceGroupName, storageMoverName, projectName, jobDefinitionName, Context.NONE)
+ .getValue();
+ }
+
+ public Response getByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String storageMoverName = Utils.getValueFromIdByName(id, "storageMovers");
+ if (storageMoverName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'storageMovers'.", id)));
+ }
+ String projectName = Utils.getValueFromIdByName(id, "projects");
+ if (projectName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'projects'.", id)));
+ }
+ String jobDefinitionName = Utils.getValueFromIdByName(id, "jobDefinitions");
+ if (jobDefinitionName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'jobDefinitions'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, storageMoverName, projectName, jobDefinitionName, context);
+ }
+
+ public void deleteById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String storageMoverName = Utils.getValueFromIdByName(id, "storageMovers");
+ if (storageMoverName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'storageMovers'.", id)));
+ }
+ String projectName = Utils.getValueFromIdByName(id, "projects");
+ if (projectName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'projects'.", id)));
+ }
+ String jobDefinitionName = Utils.getValueFromIdByName(id, "jobDefinitions");
+ if (jobDefinitionName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'jobDefinitions'.", id)));
+ }
+ this.delete(resourceGroupName, storageMoverName, projectName, jobDefinitionName, Context.NONE);
+ }
+
+ public void deleteByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String storageMoverName = Utils.getValueFromIdByName(id, "storageMovers");
+ if (storageMoverName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'storageMovers'.", id)));
+ }
+ String projectName = Utils.getValueFromIdByName(id, "projects");
+ if (projectName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'projects'.", id)));
+ }
+ String jobDefinitionName = Utils.getValueFromIdByName(id, "jobDefinitions");
+ if (jobDefinitionName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'jobDefinitions'.", id)));
+ }
+ this.delete(resourceGroupName, storageMoverName, projectName, jobDefinitionName, context);
+ }
+
+ private JobDefinitionsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.storagemover.StorageMoverManager manager() {
+ return this.serviceManager;
+ }
+
+ public JobDefinitionImpl define(String name) {
+ return new JobDefinitionImpl(name, this.manager());
+ }
+}
diff --git a/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/implementation/JobRunImpl.java b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/implementation/JobRunImpl.java
new file mode 100644
index 0000000000000..b3c7c21ad5325
--- /dev/null
+++ b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/implementation/JobRunImpl.java
@@ -0,0 +1,169 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagemover.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.storagemover.fluent.models.JobRunInner;
+import com.azure.resourcemanager.storagemover.models.JobRun;
+import com.azure.resourcemanager.storagemover.models.JobRunError;
+import com.azure.resourcemanager.storagemover.models.JobRunScanStatus;
+import com.azure.resourcemanager.storagemover.models.JobRunStatus;
+import com.azure.resourcemanager.storagemover.models.ProvisioningState;
+import java.time.OffsetDateTime;
+
+public final class JobRunImpl implements JobRun {
+ private JobRunInner innerObject;
+
+ private final com.azure.resourcemanager.storagemover.StorageMoverManager serviceManager;
+
+ JobRunImpl(JobRunInner innerObject, com.azure.resourcemanager.storagemover.StorageMoverManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public JobRunStatus status() {
+ return this.innerModel().status();
+ }
+
+ public JobRunScanStatus scanStatus() {
+ return this.innerModel().scanStatus();
+ }
+
+ public String agentName() {
+ return this.innerModel().agentName();
+ }
+
+ public String agentResourceId() {
+ return this.innerModel().agentResourceId();
+ }
+
+ public OffsetDateTime executionStartTime() {
+ return this.innerModel().executionStartTime();
+ }
+
+ public OffsetDateTime executionEndTime() {
+ return this.innerModel().executionEndTime();
+ }
+
+ public OffsetDateTime lastUpdatedTime() {
+ return this.innerModel().lastUpdatedTime();
+ }
+
+ public Long itemsScanned() {
+ return this.innerModel().itemsScanned();
+ }
+
+ public Long itemsExcluded() {
+ return this.innerModel().itemsExcluded();
+ }
+
+ public Long itemsUnsupported() {
+ return this.innerModel().itemsUnsupported();
+ }
+
+ public Long itemsNoTransferNeeded() {
+ return this.innerModel().itemsNoTransferNeeded();
+ }
+
+ public Long itemsDesignatedForTransfer() {
+ return this.innerModel().itemsDesignatedForTransfer();
+ }
+
+ public Long itemsFailed() {
+ return this.innerModel().itemsFailed();
+ }
+
+ public Long itemsTransferred() {
+ return this.innerModel().itemsTransferred();
+ }
+
+ public Long bytesScanned() {
+ return this.innerModel().bytesScanned();
+ }
+
+ public Long bytesExcluded() {
+ return this.innerModel().bytesExcluded();
+ }
+
+ public Long bytesUnsupported() {
+ return this.innerModel().bytesUnsupported();
+ }
+
+ public Long bytesNoTransferNeeded() {
+ return this.innerModel().bytesNoTransferNeeded();
+ }
+
+ public Long bytesDesignatedForTransfer() {
+ return this.innerModel().bytesDesignatedForTransfer();
+ }
+
+ public Long bytesFailed() {
+ return this.innerModel().bytesFailed();
+ }
+
+ public Long bytesTransferred() {
+ return this.innerModel().bytesTransferred();
+ }
+
+ public String sourceName() {
+ return this.innerModel().sourceName();
+ }
+
+ public String sourceResourceId() {
+ return this.innerModel().sourceResourceId();
+ }
+
+ public Object sourceProperties() {
+ return this.innerModel().sourceProperties();
+ }
+
+ public String targetName() {
+ return this.innerModel().targetName();
+ }
+
+ public String targetResourceId() {
+ return this.innerModel().targetResourceId();
+ }
+
+ public Object targetProperties() {
+ return this.innerModel().targetProperties();
+ }
+
+ public Object jobDefinitionProperties() {
+ return this.innerModel().jobDefinitionProperties();
+ }
+
+ public JobRunError error() {
+ return this.innerModel().error();
+ }
+
+ public ProvisioningState provisioningState() {
+ return this.innerModel().provisioningState();
+ }
+
+ public JobRunInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.storagemover.StorageMoverManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/implementation/JobRunResourceIdImpl.java b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/implementation/JobRunResourceIdImpl.java
new file mode 100644
index 0000000000000..c4c239df460cf
--- /dev/null
+++ b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/implementation/JobRunResourceIdImpl.java
@@ -0,0 +1,32 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagemover.implementation;
+
+import com.azure.resourcemanager.storagemover.fluent.models.JobRunResourceIdInner;
+import com.azure.resourcemanager.storagemover.models.JobRunResourceId;
+
+public final class JobRunResourceIdImpl implements JobRunResourceId {
+ private JobRunResourceIdInner innerObject;
+
+ private final com.azure.resourcemanager.storagemover.StorageMoverManager serviceManager;
+
+ JobRunResourceIdImpl(
+ JobRunResourceIdInner innerObject, com.azure.resourcemanager.storagemover.StorageMoverManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String jobRunResourceId() {
+ return this.innerModel().jobRunResourceId();
+ }
+
+ public JobRunResourceIdInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.storagemover.StorageMoverManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/implementation/JobRunsClientImpl.java b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/implementation/JobRunsClientImpl.java
new file mode 100644
index 0000000000000..bd870451f6c95
--- /dev/null
+++ b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/implementation/JobRunsClientImpl.java
@@ -0,0 +1,613 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagemover.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.resourcemanager.storagemover.fluent.JobRunsClient;
+import com.azure.resourcemanager.storagemover.fluent.models.JobRunInner;
+import com.azure.resourcemanager.storagemover.models.JobRunList;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in JobRunsClient. */
+public final class JobRunsClientImpl implements JobRunsClient {
+ /** The proxy service used to perform REST calls. */
+ private final JobRunsService service;
+
+ /** The service client containing this operation class. */
+ private final StorageMoverClientImpl client;
+
+ /**
+ * Initializes an instance of JobRunsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ JobRunsClientImpl(StorageMoverClientImpl client) {
+ this.service = RestProxy.create(JobRunsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for StorageMoverClientJobRuns to be used by the proxy service to perform
+ * REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "StorageMoverClientJo")
+ private interface JobRunsService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover"
+ + "/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}/jobRuns")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("storageMoverName") String storageMoverName,
+ @PathParam("projectName") String projectName,
+ @PathParam("jobDefinitionName") String jobDefinitionName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover"
+ + "/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}/jobRuns"
+ + "/{jobRunName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("storageMoverName") String storageMoverName,
+ @PathParam("projectName") String projectName,
+ @PathParam("jobDefinitionName") String jobDefinitionName,
+ @PathParam("jobRunName") String jobRunName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Lists all job runs in a job definition.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition 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 list of job runs along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(
+ String resourceGroupName, String storageMoverName, String projectName, String jobDefinitionName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (storageMoverName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter storageMoverName is required and cannot be null."));
+ }
+ if (projectName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null."));
+ }
+ if (jobDefinitionName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter jobDefinitionName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ storageMoverName,
+ projectName,
+ jobDefinitionName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Lists all job runs in a job definition.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of job runs along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(
+ String resourceGroupName,
+ String storageMoverName,
+ String projectName,
+ String jobDefinitionName,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (storageMoverName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter storageMoverName is required and cannot be null."));
+ }
+ if (projectName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null."));
+ }
+ if (jobDefinitionName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter jobDefinitionName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ storageMoverName,
+ projectName,
+ jobDefinitionName,
+ this.client.getApiVersion(),
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Lists all job runs in a job definition.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition 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 list of job runs as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(
+ String resourceGroupName, String storageMoverName, String projectName, String jobDefinitionName) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(resourceGroupName, storageMoverName, projectName, jobDefinitionName),
+ nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists all job runs in a job definition.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of job runs as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(
+ String resourceGroupName,
+ String storageMoverName,
+ String projectName,
+ String jobDefinitionName,
+ Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(resourceGroupName, storageMoverName, projectName, jobDefinitionName, context),
+ nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Lists all job runs in a job definition.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition 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 list of job runs as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(
+ String resourceGroupName, String storageMoverName, String projectName, String jobDefinitionName) {
+ return new PagedIterable<>(listAsync(resourceGroupName, storageMoverName, projectName, jobDefinitionName));
+ }
+
+ /**
+ * Lists all job runs in a job definition.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of job runs as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(
+ String resourceGroupName,
+ String storageMoverName,
+ String projectName,
+ String jobDefinitionName,
+ Context context) {
+ return new PagedIterable<>(
+ listAsync(resourceGroupName, storageMoverName, projectName, jobDefinitionName, context));
+ }
+
+ /**
+ * Gets a job run resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition resource.
+ * @param jobRunName The name of the job run.
+ * @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 job run resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName,
+ String storageMoverName,
+ String projectName,
+ String jobDefinitionName,
+ String jobRunName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (storageMoverName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter storageMoverName is required and cannot be null."));
+ }
+ if (projectName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null."));
+ }
+ if (jobDefinitionName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter jobDefinitionName is required and cannot be null."));
+ }
+ if (jobRunName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter jobRunName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ storageMoverName,
+ projectName,
+ jobDefinitionName,
+ jobRunName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets a job run resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition resource.
+ * @param jobRunName The name of the job run.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a job run resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName,
+ String storageMoverName,
+ String projectName,
+ String jobDefinitionName,
+ String jobRunName,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (storageMoverName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter storageMoverName is required and cannot be null."));
+ }
+ if (projectName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null."));
+ }
+ if (jobDefinitionName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter jobDefinitionName is required and cannot be null."));
+ }
+ if (jobRunName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter jobRunName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ storageMoverName,
+ projectName,
+ jobDefinitionName,
+ jobRunName,
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * Gets a job run resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition resource.
+ * @param jobRunName The name of the job run.
+ * @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 job run resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(
+ String resourceGroupName,
+ String storageMoverName,
+ String projectName,
+ String jobDefinitionName,
+ String jobRunName) {
+ return getWithResponseAsync(resourceGroupName, storageMoverName, projectName, jobDefinitionName, jobRunName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Gets a job run resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition resource.
+ * @param jobRunName The name of the job run.
+ * @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 job run resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public JobRunInner get(
+ String resourceGroupName,
+ String storageMoverName,
+ String projectName,
+ String jobDefinitionName,
+ String jobRunName) {
+ return getAsync(resourceGroupName, storageMoverName, projectName, jobDefinitionName, jobRunName).block();
+ }
+
+ /**
+ * Gets a job run resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover resource.
+ * @param projectName The name of the project resource.
+ * @param jobDefinitionName The name of the job definition resource.
+ * @param jobRunName The name of the job run.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a job run resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(
+ String resourceGroupName,
+ String storageMoverName,
+ String projectName,
+ String jobDefinitionName,
+ String jobRunName,
+ Context context) {
+ return getWithResponseAsync(
+ resourceGroupName, storageMoverName, projectName, jobDefinitionName, jobRunName, context)
+ .block();
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @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 job runs along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of job runs along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+}
diff --git a/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/implementation/JobRunsImpl.java b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/implementation/JobRunsImpl.java
new file mode 100644
index 0000000000000..685e20ef71044
--- /dev/null
+++ b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/implementation/JobRunsImpl.java
@@ -0,0 +1,93 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagemover.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.storagemover.fluent.JobRunsClient;
+import com.azure.resourcemanager.storagemover.fluent.models.JobRunInner;
+import com.azure.resourcemanager.storagemover.models.JobRun;
+import com.azure.resourcemanager.storagemover.models.JobRuns;
+
+public final class JobRunsImpl implements JobRuns {
+ private static final ClientLogger LOGGER = new ClientLogger(JobRunsImpl.class);
+
+ private final JobRunsClient innerClient;
+
+ private final com.azure.resourcemanager.storagemover.StorageMoverManager serviceManager;
+
+ public JobRunsImpl(
+ JobRunsClient innerClient, com.azure.resourcemanager.storagemover.StorageMoverManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list(
+ String resourceGroupName, String storageMoverName, String projectName, String jobDefinitionName) {
+ PagedIterable inner =
+ this.serviceClient().list(resourceGroupName, storageMoverName, projectName, jobDefinitionName);
+ return Utils.mapPage(inner, inner1 -> new JobRunImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(
+ String resourceGroupName,
+ String storageMoverName,
+ String projectName,
+ String jobDefinitionName,
+ Context context) {
+ PagedIterable inner =
+ this.serviceClient().list(resourceGroupName, storageMoverName, projectName, jobDefinitionName, context);
+ return Utils.mapPage(inner, inner1 -> new JobRunImpl(inner1, this.manager()));
+ }
+
+ public JobRun get(
+ String resourceGroupName,
+ String storageMoverName,
+ String projectName,
+ String jobDefinitionName,
+ String jobRunName) {
+ JobRunInner inner =
+ this.serviceClient().get(resourceGroupName, storageMoverName, projectName, jobDefinitionName, jobRunName);
+ if (inner != null) {
+ return new JobRunImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getWithResponse(
+ String resourceGroupName,
+ String storageMoverName,
+ String projectName,
+ String jobDefinitionName,
+ String jobRunName,
+ Context context) {
+ Response inner =
+ this
+ .serviceClient()
+ .getWithResponse(
+ resourceGroupName, storageMoverName, projectName, jobDefinitionName, jobRunName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new JobRunImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ private JobRunsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.storagemover.StorageMoverManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/implementation/OperationImpl.java b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/implementation/OperationImpl.java
new file mode 100644
index 0000000000000..dc9a76866edb8
--- /dev/null
+++ b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/implementation/OperationImpl.java
@@ -0,0 +1,51 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagemover.implementation;
+
+import com.azure.resourcemanager.storagemover.fluent.models.OperationInner;
+import com.azure.resourcemanager.storagemover.models.ActionType;
+import com.azure.resourcemanager.storagemover.models.Operation;
+import com.azure.resourcemanager.storagemover.models.OperationDisplay;
+import com.azure.resourcemanager.storagemover.models.Origin;
+
+public final class OperationImpl implements Operation {
+ private OperationInner innerObject;
+
+ private final com.azure.resourcemanager.storagemover.StorageMoverManager serviceManager;
+
+ OperationImpl(
+ OperationInner innerObject, com.azure.resourcemanager.storagemover.StorageMoverManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public Boolean isDataAction() {
+ return this.innerModel().isDataAction();
+ }
+
+ public OperationDisplay display() {
+ return this.innerModel().display();
+ }
+
+ public Origin origin() {
+ return this.innerModel().origin();
+ }
+
+ public ActionType actionType() {
+ return this.innerModel().actionType();
+ }
+
+ public OperationInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.storagemover.StorageMoverManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/implementation/OperationsClientImpl.java b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/implementation/OperationsClientImpl.java
new file mode 100644
index 0000000000000..f5d47b8588096
--- /dev/null
+++ b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/implementation/OperationsClientImpl.java
@@ -0,0 +1,274 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagemover.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.resourcemanager.storagemover.fluent.OperationsClient;
+import com.azure.resourcemanager.storagemover.fluent.models.OperationInner;
+import com.azure.resourcemanager.storagemover.models.OperationListResult;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in OperationsClient. */
+public final class OperationsClientImpl implements OperationsClient {
+ /** The proxy service used to perform REST calls. */
+ private final OperationsService service;
+
+ /** The service client containing this operation class. */
+ private final StorageMoverClientImpl client;
+
+ /**
+ * Initializes an instance of OperationsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ OperationsClientImpl(StorageMoverClientImpl client) {
+ this.service =
+ RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for StorageMoverClientOperations to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "StorageMoverClientOp")
+ private interface OperationsService {
+ @Headers({"Content-Type: application/json"})
+ @Get("/providers/Microsoft.StorageMover/operations")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Lists all the supported operations for the Azure Storage Mover REST API.
+ *
+ * @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 list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync() {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Lists all the supported operations for the Azure Storage Mover REST API.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Lists all the supported operations for the Azure Storage Mover REST API.
+ *
+ * @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 list of REST API operations supported by an Azure Resource Provider as paginated response with {@link
+ * PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists all the supported operations for the Azure Storage Mover REST API.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link
+ * PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Lists all the supported operations for the Azure Storage Mover REST API.
+ *
+ * @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 list of REST API operations supported by an Azure Resource Provider as paginated response with {@link
+ * PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ return new PagedIterable<>(listAsync());
+ }
+
+ /**
+ * Lists all the supported operations for the Azure Storage Mover REST API.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link
+ * PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(Context context) {
+ return new PagedIterable<>(listAsync(context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @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 list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+}
diff --git a/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/implementation/OperationsImpl.java b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/implementation/OperationsImpl.java
new file mode 100644
index 0000000000000..b3c92b15b184c
--- /dev/null
+++ b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/implementation/OperationsImpl.java
@@ -0,0 +1,45 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagemover.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.storagemover.fluent.OperationsClient;
+import com.azure.resourcemanager.storagemover.fluent.models.OperationInner;
+import com.azure.resourcemanager.storagemover.models.Operation;
+import com.azure.resourcemanager.storagemover.models.Operations;
+
+public final class OperationsImpl implements Operations {
+ private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class);
+
+ private final OperationsClient innerClient;
+
+ private final com.azure.resourcemanager.storagemover.StorageMoverManager serviceManager;
+
+ public OperationsImpl(
+ OperationsClient innerClient, com.azure.resourcemanager.storagemover.StorageMoverManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(Context context) {
+ PagedIterable inner = this.serviceClient().list(context);
+ return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager()));
+ }
+
+ private OperationsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.storagemover.StorageMoverManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/implementation/ProjectImpl.java b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/implementation/ProjectImpl.java
new file mode 100644
index 0000000000000..ad312e4131a67
--- /dev/null
+++ b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/implementation/ProjectImpl.java
@@ -0,0 +1,163 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagemover.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.storagemover.fluent.models.ProjectInner;
+import com.azure.resourcemanager.storagemover.models.Project;
+import com.azure.resourcemanager.storagemover.models.ProjectUpdateParameters;
+import com.azure.resourcemanager.storagemover.models.ProvisioningState;
+
+public final class ProjectImpl implements Project, Project.Definition, Project.Update {
+ private ProjectInner innerObject;
+
+ private final com.azure.resourcemanager.storagemover.StorageMoverManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public String description() {
+ return this.innerModel().description();
+ }
+
+ public ProvisioningState provisioningState() {
+ return this.innerModel().provisioningState();
+ }
+
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
+ public ProjectInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.storagemover.StorageMoverManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String storageMoverName;
+
+ private String projectName;
+
+ private ProjectUpdateParameters updateProject;
+
+ public ProjectImpl withExistingStorageMover(String resourceGroupName, String storageMoverName) {
+ this.resourceGroupName = resourceGroupName;
+ this.storageMoverName = storageMoverName;
+ return this;
+ }
+
+ public Project create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getProjects()
+ .createOrUpdateWithResponse(
+ resourceGroupName, storageMoverName, projectName, this.innerModel(), Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public Project create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getProjects()
+ .createOrUpdateWithResponse(
+ resourceGroupName, storageMoverName, projectName, this.innerModel(), context)
+ .getValue();
+ return this;
+ }
+
+ ProjectImpl(String name, com.azure.resourcemanager.storagemover.StorageMoverManager serviceManager) {
+ this.innerObject = new ProjectInner();
+ this.serviceManager = serviceManager;
+ this.projectName = name;
+ }
+
+ public ProjectImpl update() {
+ this.updateProject = new ProjectUpdateParameters();
+ return this;
+ }
+
+ public Project apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getProjects()
+ .updateWithResponse(resourceGroupName, storageMoverName, projectName, updateProject, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public Project apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getProjects()
+ .updateWithResponse(resourceGroupName, storageMoverName, projectName, updateProject, context)
+ .getValue();
+ return this;
+ }
+
+ ProjectImpl(ProjectInner innerObject, com.azure.resourcemanager.storagemover.StorageMoverManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.storageMoverName = Utils.getValueFromIdByName(innerObject.id(), "storageMovers");
+ this.projectName = Utils.getValueFromIdByName(innerObject.id(), "projects");
+ }
+
+ public Project refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getProjects()
+ .getWithResponse(resourceGroupName, storageMoverName, projectName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public Project refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getProjects()
+ .getWithResponse(resourceGroupName, storageMoverName, projectName, context)
+ .getValue();
+ return this;
+ }
+
+ public ProjectImpl withDescription(String description) {
+ if (isInCreateMode()) {
+ this.innerModel().withDescription(description);
+ return this;
+ } else {
+ this.updateProject.withDescription(description);
+ return this;
+ }
+ }
+
+ private boolean isInCreateMode() {
+ return this.innerModel().id() == null;
+ }
+}
diff --git a/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/implementation/ProjectsClientImpl.java b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/implementation/ProjectsClientImpl.java
new file mode 100644
index 0000000000000..f7cdaf49c42d7
--- /dev/null
+++ b/sdk/storagemover/azure-resourcemanager-storagemover/src/main/java/com/azure/resourcemanager/storagemover/implementation/ProjectsClientImpl.java
@@ -0,0 +1,1182 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.storagemover.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.Patch;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.storagemover.fluent.ProjectsClient;
+import com.azure.resourcemanager.storagemover.fluent.models.ProjectInner;
+import com.azure.resourcemanager.storagemover.models.ProjectList;
+import com.azure.resourcemanager.storagemover.models.ProjectUpdateParameters;
+import java.nio.ByteBuffer;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in ProjectsClient. */
+public final class ProjectsClientImpl implements ProjectsClient {
+ /** The proxy service used to perform REST calls. */
+ private final ProjectsService service;
+
+ /** The service client containing this operation class. */
+ private final StorageMoverClientImpl client;
+
+ /**
+ * Initializes an instance of ProjectsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ ProjectsClientImpl(StorageMoverClientImpl client) {
+ this.service = RestProxy.create(ProjectsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for StorageMoverClientProjects to be used by the proxy service to perform
+ * REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "StorageMoverClientPr")
+ private interface ProjectsService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover"
+ + "/storageMovers/{storageMoverName}/projects")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("storageMoverName") String storageMoverName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover"
+ + "/storageMovers/{storageMoverName}/projects/{projectName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("storageMoverName") String storageMoverName,
+ @PathParam("projectName") String projectName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover"
+ + "/storageMovers/{storageMoverName}/projects/{projectName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> createOrUpdate(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("storageMoverName") String storageMoverName,
+ @PathParam("projectName") String projectName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") ProjectInner project,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Patch(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover"
+ + "/storageMovers/{storageMoverName}/projects/{projectName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> update(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("storageMoverName") String storageMoverName,
+ @PathParam("projectName") String projectName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") ProjectUpdateParameters project,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover"
+ + "/storageMovers/{storageMoverName}/projects/{projectName}")
+ @ExpectedResponses({202, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("storageMoverName") String storageMoverName,
+ @PathParam("projectName") String projectName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Lists all projects in a Storage Mover.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param storageMoverName The name of the Storage Mover 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 list of project resources along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono