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 computeschedule service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the computeschedule service API instance.
+ */
+ public ComputescheduleManager 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.computeschedule")
+ .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 ComputescheduleManager(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 ScheduledActions.
+ *
+ * @return Resource collection API of ScheduledActions.
+ */
+ public ScheduledActions scheduledActions() {
+ if (this.scheduledActions == null) {
+ this.scheduledActions = new ScheduledActionsImpl(clientObject.getScheduledActions(), this);
+ }
+ return scheduledActions;
+ }
+
+ /**
+ * Gets wrapped service client MicrosoftComputeSchedule providing direct access to the underlying auto-generated API
+ * implementation, based on Azure REST API.
+ *
+ * @return Wrapped service client MicrosoftComputeSchedule.
+ */
+ public MicrosoftComputeSchedule serviceClient() {
+ return this.clientObject;
+ }
+}
diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/fluent/MicrosoftComputeSchedule.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/fluent/MicrosoftComputeSchedule.java
new file mode 100644
index 000000000000..b60e93b332b8
--- /dev/null
+++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/fluent/MicrosoftComputeSchedule.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.computeschedule.fluent;
+
+import com.azure.core.http.HttpPipeline;
+import java.time.Duration;
+
+/**
+ * The interface for MicrosoftComputeSchedule class.
+ */
+public interface MicrosoftComputeSchedule {
+ /**
+ * Gets The ID of the target subscription. The value must be an UUID.
+ *
+ * @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 ScheduledActionsClient object to access its operations.
+ *
+ * @return the ScheduledActionsClient object.
+ */
+ ScheduledActionsClient getScheduledActions();
+}
diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/fluent/OperationsClient.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/fluent/OperationsClient.java
new file mode 100644
index 000000000000..89e1e59df1e2
--- /dev/null
+++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/fluent/OperationsClient.java
@@ -0,0 +1,40 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.computeschedule.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.computeschedule.fluent.models.OperationInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in OperationsClient.
+ */
+public interface OperationsClient {
+ /**
+ * List the operations for the provider.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * List the operations for the provider.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return 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/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/fluent/ScheduledActionsClient.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/fluent/ScheduledActionsClient.java
new file mode 100644
index 000000000000..5b2a2b409111
--- /dev/null
+++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/fluent/ScheduledActionsClient.java
@@ -0,0 +1,291 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.computeschedule.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.computeschedule.fluent.models.CancelOperationsResponseInner;
+import com.azure.resourcemanager.computeschedule.fluent.models.DeallocateResourceOperationResponseInner;
+import com.azure.resourcemanager.computeschedule.fluent.models.GetOperationErrorsResponseInner;
+import com.azure.resourcemanager.computeschedule.fluent.models.GetOperationStatusResponseInner;
+import com.azure.resourcemanager.computeschedule.fluent.models.HibernateResourceOperationResponseInner;
+import com.azure.resourcemanager.computeschedule.fluent.models.StartResourceOperationResponseInner;
+import com.azure.resourcemanager.computeschedule.models.CancelOperationsRequest;
+import com.azure.resourcemanager.computeschedule.models.ExecuteDeallocateRequest;
+import com.azure.resourcemanager.computeschedule.models.ExecuteHibernateRequest;
+import com.azure.resourcemanager.computeschedule.models.ExecuteStartRequest;
+import com.azure.resourcemanager.computeschedule.models.GetOperationErrorsRequest;
+import com.azure.resourcemanager.computeschedule.models.GetOperationStatusRequest;
+import com.azure.resourcemanager.computeschedule.models.SubmitDeallocateRequest;
+import com.azure.resourcemanager.computeschedule.models.SubmitHibernateRequest;
+import com.azure.resourcemanager.computeschedule.models.SubmitStartRequest;
+
+/**
+ * An instance of this class provides access to all the operations defined in ScheduledActionsClient.
+ */
+public interface ScheduledActionsClient {
+ /**
+ * virtualMachinesCancelOperations: cancelOperations for a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return this is the response from a cancel operations request along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response virtualMachinesCancelOperationsWithResponse(String locationparameter,
+ CancelOperationsRequest requestBody, Context context);
+
+ /**
+ * virtualMachinesCancelOperations: cancelOperations for a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return this is the response from a cancel operations request.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CancelOperationsResponseInner virtualMachinesCancelOperations(String locationparameter,
+ CancelOperationsRequest requestBody);
+
+ /**
+ * virtualMachinesExecuteDeallocate: executeDeallocate for a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response from a deallocate request along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response virtualMachinesExecuteDeallocateWithResponse(
+ String locationparameter, ExecuteDeallocateRequest requestBody, Context context);
+
+ /**
+ * virtualMachinesExecuteDeallocate: executeDeallocate for a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response from a deallocate request.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DeallocateResourceOperationResponseInner virtualMachinesExecuteDeallocate(String locationparameter,
+ ExecuteDeallocateRequest requestBody);
+
+ /**
+ * virtualMachinesExecuteHibernate: executeHibernate for a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response from a Hibernate request along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response virtualMachinesExecuteHibernateWithResponse(
+ String locationparameter, ExecuteHibernateRequest requestBody, Context context);
+
+ /**
+ * virtualMachinesExecuteHibernate: executeHibernate for a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response from a Hibernate request.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ HibernateResourceOperationResponseInner virtualMachinesExecuteHibernate(String locationparameter,
+ ExecuteHibernateRequest requestBody);
+
+ /**
+ * virtualMachinesExecuteStart: executeStart for a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response from a start request along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response virtualMachinesExecuteStartWithResponse(String locationparameter,
+ ExecuteStartRequest requestBody, Context context);
+
+ /**
+ * virtualMachinesExecuteStart: executeStart for a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response from a start request.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ StartResourceOperationResponseInner virtualMachinesExecuteStart(String locationparameter,
+ ExecuteStartRequest requestBody);
+
+ /**
+ * virtualMachinesGetOperationErrors: getOperationErrors associated with an operation on a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return this is the response from a get operations errors request along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response virtualMachinesGetOperationErrorsWithResponse(String locationparameter,
+ GetOperationErrorsRequest requestBody, Context context);
+
+ /**
+ * virtualMachinesGetOperationErrors: getOperationErrors associated with an operation on a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return this is the response from a get operations errors request.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ GetOperationErrorsResponseInner virtualMachinesGetOperationErrors(String locationparameter,
+ GetOperationErrorsRequest requestBody);
+
+ /**
+ * virtualMachinesGetOperationStatus: getOperationStatus for a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return this is the response from a get operations status request along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response virtualMachinesGetOperationStatusWithResponse(String locationparameter,
+ GetOperationStatusRequest requestBody, Context context);
+
+ /**
+ * virtualMachinesGetOperationStatus: getOperationStatus for a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return this is the response from a get operations status request.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ GetOperationStatusResponseInner virtualMachinesGetOperationStatus(String locationparameter,
+ GetOperationStatusRequest requestBody);
+
+ /**
+ * virtualMachinesSubmitDeallocate: submitDeallocate for a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response from a deallocate request along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response virtualMachinesSubmitDeallocateWithResponse(
+ String locationparameter, SubmitDeallocateRequest requestBody, Context context);
+
+ /**
+ * virtualMachinesSubmitDeallocate: submitDeallocate for a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response from a deallocate request.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DeallocateResourceOperationResponseInner virtualMachinesSubmitDeallocate(String locationparameter,
+ SubmitDeallocateRequest requestBody);
+
+ /**
+ * virtualMachinesSubmitHibernate: submitHibernate for a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response from a Hibernate request along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response virtualMachinesSubmitHibernateWithResponse(
+ String locationparameter, SubmitHibernateRequest requestBody, Context context);
+
+ /**
+ * virtualMachinesSubmitHibernate: submitHibernate for a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response from a Hibernate request.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ HibernateResourceOperationResponseInner virtualMachinesSubmitHibernate(String locationparameter,
+ SubmitHibernateRequest requestBody);
+
+ /**
+ * virtualMachinesSubmitStart: submitStart for a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response from a start request along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response virtualMachinesSubmitStartWithResponse(String locationparameter,
+ SubmitStartRequest requestBody, Context context);
+
+ /**
+ * virtualMachinesSubmitStart: submitStart for a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response from a start request.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ StartResourceOperationResponseInner virtualMachinesSubmitStart(String locationparameter,
+ SubmitStartRequest requestBody);
+}
diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/CancelOperationsResponseInner.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/CancelOperationsResponseInner.java
new file mode 100644
index 000000000000..d7d4b3f94bcd
--- /dev/null
+++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/CancelOperationsResponseInner.java
@@ -0,0 +1,108 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.computeschedule.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.computeschedule.models.ResourceOperation;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * This is the response from a cancel operations request.
+ */
+@Fluent
+public final class CancelOperationsResponseInner implements JsonSerializable {
+ /*
+ * An array of resource operations that were successfully cancelled
+ */
+ private List results;
+
+ /**
+ * Creates an instance of CancelOperationsResponseInner class.
+ */
+ public CancelOperationsResponseInner() {
+ }
+
+ /**
+ * Get the results property: An array of resource operations that were successfully cancelled.
+ *
+ * @return the results value.
+ */
+ public List results() {
+ return this.results;
+ }
+
+ /**
+ * Set the results property: An array of resource operations that were successfully cancelled.
+ *
+ * @param results the results value to set.
+ * @return the CancelOperationsResponseInner object itself.
+ */
+ public CancelOperationsResponseInner withResults(List results) {
+ this.results = results;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (results() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property results in model CancelOperationsResponseInner"));
+ } else {
+ results().forEach(e -> e.validate());
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(CancelOperationsResponseInner.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeArrayField("results", this.results, (writer, element) -> writer.writeJson(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of CancelOperationsResponseInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of CancelOperationsResponseInner if the JsonReader was pointing to an instance of it, or null
+ * if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the CancelOperationsResponseInner.
+ */
+ public static CancelOperationsResponseInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ CancelOperationsResponseInner deserializedCancelOperationsResponseInner
+ = new CancelOperationsResponseInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("results".equals(fieldName)) {
+ List results = reader.readArray(reader1 -> ResourceOperation.fromJson(reader1));
+ deserializedCancelOperationsResponseInner.results = results;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedCancelOperationsResponseInner;
+ });
+ }
+}
diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/DeallocateResourceOperationResponseInner.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/DeallocateResourceOperationResponseInner.java
new file mode 100644
index 000000000000..141fa9cce426
--- /dev/null
+++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/DeallocateResourceOperationResponseInner.java
@@ -0,0 +1,204 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.computeschedule.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.computeschedule.models.ResourceOperation;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * The response from a deallocate request.
+ */
+@Fluent
+public final class DeallocateResourceOperationResponseInner
+ implements JsonSerializable {
+ /*
+ * The description of the operation response
+ */
+ private String description;
+
+ /*
+ * The type of resources used in the deallocate request eg virtual machines
+ */
+ private String type;
+
+ /*
+ * The location of the deallocate request eg westus
+ */
+ private String location;
+
+ /*
+ * The results from the deallocate request if no errors exist
+ */
+ private List results;
+
+ /**
+ * Creates an instance of DeallocateResourceOperationResponseInner class.
+ */
+ public DeallocateResourceOperationResponseInner() {
+ }
+
+ /**
+ * Get the description property: The description of the operation response.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Set the description property: The description of the operation response.
+ *
+ * @param description the description value to set.
+ * @return the DeallocateResourceOperationResponseInner object itself.
+ */
+ public DeallocateResourceOperationResponseInner withDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Get the type property: The type of resources used in the deallocate request eg virtual machines.
+ *
+ * @return the type value.
+ */
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Set the type property: The type of resources used in the deallocate request eg virtual machines.
+ *
+ * @param type the type value to set.
+ * @return the DeallocateResourceOperationResponseInner object itself.
+ */
+ public DeallocateResourceOperationResponseInner withType(String type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * Get the location property: The location of the deallocate request eg westus.
+ *
+ * @return the location value.
+ */
+ public String location() {
+ return this.location;
+ }
+
+ /**
+ * Set the location property: The location of the deallocate request eg westus.
+ *
+ * @param location the location value to set.
+ * @return the DeallocateResourceOperationResponseInner object itself.
+ */
+ public DeallocateResourceOperationResponseInner withLocation(String location) {
+ this.location = location;
+ return this;
+ }
+
+ /**
+ * Get the results property: The results from the deallocate request if no errors exist.
+ *
+ * @return the results value.
+ */
+ public List results() {
+ return this.results;
+ }
+
+ /**
+ * Set the results property: The results from the deallocate request if no errors exist.
+ *
+ * @param results the results value to set.
+ * @return the DeallocateResourceOperationResponseInner object itself.
+ */
+ public DeallocateResourceOperationResponseInner withResults(List results) {
+ this.results = results;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (description() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property description in model DeallocateResourceOperationResponseInner"));
+ }
+ if (type() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property type in model DeallocateResourceOperationResponseInner"));
+ }
+ if (location() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property location in model DeallocateResourceOperationResponseInner"));
+ }
+ if (results() != null) {
+ results().forEach(e -> e.validate());
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(DeallocateResourceOperationResponseInner.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("description", this.description);
+ jsonWriter.writeStringField("type", this.type);
+ jsonWriter.writeStringField("location", this.location);
+ jsonWriter.writeArrayField("results", this.results, (writer, element) -> writer.writeJson(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of DeallocateResourceOperationResponseInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of DeallocateResourceOperationResponseInner if the JsonReader was pointing to an instance of
+ * it, or null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the DeallocateResourceOperationResponseInner.
+ */
+ public static DeallocateResourceOperationResponseInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ DeallocateResourceOperationResponseInner deserializedDeallocateResourceOperationResponseInner
+ = new DeallocateResourceOperationResponseInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("description".equals(fieldName)) {
+ deserializedDeallocateResourceOperationResponseInner.description = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedDeallocateResourceOperationResponseInner.type = reader.getString();
+ } else if ("location".equals(fieldName)) {
+ deserializedDeallocateResourceOperationResponseInner.location = reader.getString();
+ } else if ("results".equals(fieldName)) {
+ List results = reader.readArray(reader1 -> ResourceOperation.fromJson(reader1));
+ deserializedDeallocateResourceOperationResponseInner.results = results;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedDeallocateResourceOperationResponseInner;
+ });
+ }
+}
diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/GetOperationErrorsResponseInner.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/GetOperationErrorsResponseInner.java
new file mode 100644
index 000000000000..a6163822965f
--- /dev/null
+++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/GetOperationErrorsResponseInner.java
@@ -0,0 +1,109 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.computeschedule.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.computeschedule.models.OperationErrorsResult;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * This is the response from a get operations errors request.
+ */
+@Fluent
+public final class GetOperationErrorsResponseInner implements JsonSerializable {
+ /*
+ * An array of operationids and their corresponding errors if any
+ */
+ private List results;
+
+ /**
+ * Creates an instance of GetOperationErrorsResponseInner class.
+ */
+ public GetOperationErrorsResponseInner() {
+ }
+
+ /**
+ * Get the results property: An array of operationids and their corresponding errors if any.
+ *
+ * @return the results value.
+ */
+ public List results() {
+ return this.results;
+ }
+
+ /**
+ * Set the results property: An array of operationids and their corresponding errors if any.
+ *
+ * @param results the results value to set.
+ * @return the GetOperationErrorsResponseInner object itself.
+ */
+ public GetOperationErrorsResponseInner withResults(List results) {
+ this.results = results;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (results() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property results in model GetOperationErrorsResponseInner"));
+ } else {
+ results().forEach(e -> e.validate());
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(GetOperationErrorsResponseInner.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeArrayField("results", this.results, (writer, element) -> writer.writeJson(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of GetOperationErrorsResponseInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of GetOperationErrorsResponseInner if the JsonReader was pointing to an instance of it, or
+ * null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the GetOperationErrorsResponseInner.
+ */
+ public static GetOperationErrorsResponseInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ GetOperationErrorsResponseInner deserializedGetOperationErrorsResponseInner
+ = new GetOperationErrorsResponseInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("results".equals(fieldName)) {
+ List results
+ = reader.readArray(reader1 -> OperationErrorsResult.fromJson(reader1));
+ deserializedGetOperationErrorsResponseInner.results = results;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedGetOperationErrorsResponseInner;
+ });
+ }
+}
diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/GetOperationStatusResponseInner.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/GetOperationStatusResponseInner.java
new file mode 100644
index 000000000000..58febebed4d9
--- /dev/null
+++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/GetOperationStatusResponseInner.java
@@ -0,0 +1,108 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.computeschedule.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.computeschedule.models.ResourceOperation;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * This is the response from a get operations status request.
+ */
+@Fluent
+public final class GetOperationStatusResponseInner implements JsonSerializable {
+ /*
+ * An array of resource operations based on their operation ids
+ */
+ private List results;
+
+ /**
+ * Creates an instance of GetOperationStatusResponseInner class.
+ */
+ public GetOperationStatusResponseInner() {
+ }
+
+ /**
+ * Get the results property: An array of resource operations based on their operation ids.
+ *
+ * @return the results value.
+ */
+ public List results() {
+ return this.results;
+ }
+
+ /**
+ * Set the results property: An array of resource operations based on their operation ids.
+ *
+ * @param results the results value to set.
+ * @return the GetOperationStatusResponseInner object itself.
+ */
+ public GetOperationStatusResponseInner withResults(List results) {
+ this.results = results;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (results() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property results in model GetOperationStatusResponseInner"));
+ } else {
+ results().forEach(e -> e.validate());
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(GetOperationStatusResponseInner.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeArrayField("results", this.results, (writer, element) -> writer.writeJson(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of GetOperationStatusResponseInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of GetOperationStatusResponseInner if the JsonReader was pointing to an instance of it, or
+ * null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the GetOperationStatusResponseInner.
+ */
+ public static GetOperationStatusResponseInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ GetOperationStatusResponseInner deserializedGetOperationStatusResponseInner
+ = new GetOperationStatusResponseInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("results".equals(fieldName)) {
+ List results = reader.readArray(reader1 -> ResourceOperation.fromJson(reader1));
+ deserializedGetOperationStatusResponseInner.results = results;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedGetOperationStatusResponseInner;
+ });
+ }
+}
diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/HibernateResourceOperationResponseInner.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/HibernateResourceOperationResponseInner.java
new file mode 100644
index 000000000000..f3820ba2a3c2
--- /dev/null
+++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/HibernateResourceOperationResponseInner.java
@@ -0,0 +1,204 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.computeschedule.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.computeschedule.models.ResourceOperation;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * The response from a Hibernate request.
+ */
+@Fluent
+public final class HibernateResourceOperationResponseInner
+ implements JsonSerializable {
+ /*
+ * The description of the operation response
+ */
+ private String description;
+
+ /*
+ * The type of resources used in the Hibernate request eg virtual machines
+ */
+ private String type;
+
+ /*
+ * The location of the Hibernate request eg westus
+ */
+ private String location;
+
+ /*
+ * The results from the Hibernate request if no errors exist
+ */
+ private List results;
+
+ /**
+ * Creates an instance of HibernateResourceOperationResponseInner class.
+ */
+ public HibernateResourceOperationResponseInner() {
+ }
+
+ /**
+ * Get the description property: The description of the operation response.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Set the description property: The description of the operation response.
+ *
+ * @param description the description value to set.
+ * @return the HibernateResourceOperationResponseInner object itself.
+ */
+ public HibernateResourceOperationResponseInner withDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Get the type property: The type of resources used in the Hibernate request eg virtual machines.
+ *
+ * @return the type value.
+ */
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Set the type property: The type of resources used in the Hibernate request eg virtual machines.
+ *
+ * @param type the type value to set.
+ * @return the HibernateResourceOperationResponseInner object itself.
+ */
+ public HibernateResourceOperationResponseInner withType(String type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * Get the location property: The location of the Hibernate request eg westus.
+ *
+ * @return the location value.
+ */
+ public String location() {
+ return this.location;
+ }
+
+ /**
+ * Set the location property: The location of the Hibernate request eg westus.
+ *
+ * @param location the location value to set.
+ * @return the HibernateResourceOperationResponseInner object itself.
+ */
+ public HibernateResourceOperationResponseInner withLocation(String location) {
+ this.location = location;
+ return this;
+ }
+
+ /**
+ * Get the results property: The results from the Hibernate request if no errors exist.
+ *
+ * @return the results value.
+ */
+ public List results() {
+ return this.results;
+ }
+
+ /**
+ * Set the results property: The results from the Hibernate request if no errors exist.
+ *
+ * @param results the results value to set.
+ * @return the HibernateResourceOperationResponseInner object itself.
+ */
+ public HibernateResourceOperationResponseInner withResults(List results) {
+ this.results = results;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (description() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property description in model HibernateResourceOperationResponseInner"));
+ }
+ if (type() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property type in model HibernateResourceOperationResponseInner"));
+ }
+ if (location() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property location in model HibernateResourceOperationResponseInner"));
+ }
+ if (results() != null) {
+ results().forEach(e -> e.validate());
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(HibernateResourceOperationResponseInner.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("description", this.description);
+ jsonWriter.writeStringField("type", this.type);
+ jsonWriter.writeStringField("location", this.location);
+ jsonWriter.writeArrayField("results", this.results, (writer, element) -> writer.writeJson(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of HibernateResourceOperationResponseInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of HibernateResourceOperationResponseInner if the JsonReader was pointing to an instance of
+ * it, or null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the HibernateResourceOperationResponseInner.
+ */
+ public static HibernateResourceOperationResponseInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ HibernateResourceOperationResponseInner deserializedHibernateResourceOperationResponseInner
+ = new HibernateResourceOperationResponseInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("description".equals(fieldName)) {
+ deserializedHibernateResourceOperationResponseInner.description = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedHibernateResourceOperationResponseInner.type = reader.getString();
+ } else if ("location".equals(fieldName)) {
+ deserializedHibernateResourceOperationResponseInner.location = reader.getString();
+ } else if ("results".equals(fieldName)) {
+ List results = reader.readArray(reader1 -> ResourceOperation.fromJson(reader1));
+ deserializedHibernateResourceOperationResponseInner.results = results;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedHibernateResourceOperationResponseInner;
+ });
+ }
+}
diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/OperationInner.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/OperationInner.java
new file mode 100644
index 000000000000..6a58d063a268
--- /dev/null
+++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/OperationInner.java
@@ -0,0 +1,172 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.computeschedule.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.computeschedule.models.ActionType;
+import com.azure.resourcemanager.computeschedule.models.OperationDisplay;
+import com.azure.resourcemanager.computeschedule.models.Origin;
+import java.io.IOException;
+
+/**
+ * REST API Operation
+ *
+ * Details of a REST API operation, returned from the Resource Provider Operations API.
+ */
+@Fluent
+public final class OperationInner implements JsonSerializable {
+ /*
+ * The name of the operation, as per Resource-Based Access Control (RBAC). Examples:
+ * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action"
+ */
+ private String name;
+
+ /*
+ * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for
+ * ARM/control-plane operations.
+ */
+ private Boolean isDataAction;
+
+ /*
+ * Localized display information for this particular operation.
+ */
+ 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"
+ */
+ private Origin origin;
+
+ /*
+ * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
+ */
+ private ActionType actionType;
+
+ /**
+ * Creates an instance of OperationInner class.
+ */
+ public OperationInner() {
+ }
+
+ /**
+ * 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();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("display", this.display);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of OperationInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of OperationInner if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IOException If an error occurs while reading the OperationInner.
+ */
+ public static OperationInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ OperationInner deserializedOperationInner = new OperationInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("name".equals(fieldName)) {
+ deserializedOperationInner.name = reader.getString();
+ } else if ("isDataAction".equals(fieldName)) {
+ deserializedOperationInner.isDataAction = reader.getNullable(JsonReader::getBoolean);
+ } else if ("display".equals(fieldName)) {
+ deserializedOperationInner.display = OperationDisplay.fromJson(reader);
+ } else if ("origin".equals(fieldName)) {
+ deserializedOperationInner.origin = Origin.fromString(reader.getString());
+ } else if ("actionType".equals(fieldName)) {
+ deserializedOperationInner.actionType = ActionType.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedOperationInner;
+ });
+ }
+}
diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/StartResourceOperationResponseInner.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/StartResourceOperationResponseInner.java
new file mode 100644
index 000000000000..229584f8c511
--- /dev/null
+++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/StartResourceOperationResponseInner.java
@@ -0,0 +1,204 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.computeschedule.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.computeschedule.models.ResourceOperation;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * The response from a start request.
+ */
+@Fluent
+public final class StartResourceOperationResponseInner
+ implements JsonSerializable {
+ /*
+ * The description of the operation response
+ */
+ private String description;
+
+ /*
+ * The type of resources used in the start request eg virtual machines
+ */
+ private String type;
+
+ /*
+ * The location of the start request eg westus
+ */
+ private String location;
+
+ /*
+ * The results from the start request if no errors exist
+ */
+ private List results;
+
+ /**
+ * Creates an instance of StartResourceOperationResponseInner class.
+ */
+ public StartResourceOperationResponseInner() {
+ }
+
+ /**
+ * Get the description property: The description of the operation response.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Set the description property: The description of the operation response.
+ *
+ * @param description the description value to set.
+ * @return the StartResourceOperationResponseInner object itself.
+ */
+ public StartResourceOperationResponseInner withDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Get the type property: The type of resources used in the start request eg virtual machines.
+ *
+ * @return the type value.
+ */
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Set the type property: The type of resources used in the start request eg virtual machines.
+ *
+ * @param type the type value to set.
+ * @return the StartResourceOperationResponseInner object itself.
+ */
+ public StartResourceOperationResponseInner withType(String type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * Get the location property: The location of the start request eg westus.
+ *
+ * @return the location value.
+ */
+ public String location() {
+ return this.location;
+ }
+
+ /**
+ * Set the location property: The location of the start request eg westus.
+ *
+ * @param location the location value to set.
+ * @return the StartResourceOperationResponseInner object itself.
+ */
+ public StartResourceOperationResponseInner withLocation(String location) {
+ this.location = location;
+ return this;
+ }
+
+ /**
+ * Get the results property: The results from the start request if no errors exist.
+ *
+ * @return the results value.
+ */
+ public List results() {
+ return this.results;
+ }
+
+ /**
+ * Set the results property: The results from the start request if no errors exist.
+ *
+ * @param results the results value to set.
+ * @return the StartResourceOperationResponseInner object itself.
+ */
+ public StartResourceOperationResponseInner withResults(List results) {
+ this.results = results;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (description() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property description in model StartResourceOperationResponseInner"));
+ }
+ if (type() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property type in model StartResourceOperationResponseInner"));
+ }
+ if (location() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property location in model StartResourceOperationResponseInner"));
+ }
+ if (results() != null) {
+ results().forEach(e -> e.validate());
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(StartResourceOperationResponseInner.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("description", this.description);
+ jsonWriter.writeStringField("type", this.type);
+ jsonWriter.writeStringField("location", this.location);
+ jsonWriter.writeArrayField("results", this.results, (writer, element) -> writer.writeJson(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of StartResourceOperationResponseInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of StartResourceOperationResponseInner if the JsonReader was pointing to an instance of it,
+ * or null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the StartResourceOperationResponseInner.
+ */
+ public static StartResourceOperationResponseInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ StartResourceOperationResponseInner deserializedStartResourceOperationResponseInner
+ = new StartResourceOperationResponseInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("description".equals(fieldName)) {
+ deserializedStartResourceOperationResponseInner.description = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedStartResourceOperationResponseInner.type = reader.getString();
+ } else if ("location".equals(fieldName)) {
+ deserializedStartResourceOperationResponseInner.location = reader.getString();
+ } else if ("results".equals(fieldName)) {
+ List results = reader.readArray(reader1 -> ResourceOperation.fromJson(reader1));
+ deserializedStartResourceOperationResponseInner.results = results;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedStartResourceOperationResponseInner;
+ });
+ }
+}
diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/package-info.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/package-info.java
new file mode 100644
index 000000000000..2244ad2daff7
--- /dev/null
+++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/fluent/models/package-info.java
@@ -0,0 +1,9 @@
+// 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 MicrosoftComputeSchedule.
+ * Microsoft.ComputeSchedule Resource Provider management API.
+ */
+package com.azure.resourcemanager.computeschedule.fluent.models;
diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/fluent/package-info.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/fluent/package-info.java
new file mode 100644
index 000000000000..ef8e8ddc36e7
--- /dev/null
+++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/fluent/package-info.java
@@ -0,0 +1,9 @@
+// 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 MicrosoftComputeSchedule.
+ * Microsoft.ComputeSchedule Resource Provider management API.
+ */
+package com.azure.resourcemanager.computeschedule.fluent;
diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/CancelOperationsResponseImpl.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/CancelOperationsResponseImpl.java
new file mode 100644
index 000000000000..e17c8766deda
--- /dev/null
+++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/CancelOperationsResponseImpl.java
@@ -0,0 +1,40 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.computeschedule.implementation;
+
+import com.azure.resourcemanager.computeschedule.fluent.models.CancelOperationsResponseInner;
+import com.azure.resourcemanager.computeschedule.models.CancelOperationsResponse;
+import com.azure.resourcemanager.computeschedule.models.ResourceOperation;
+import java.util.Collections;
+import java.util.List;
+
+public final class CancelOperationsResponseImpl implements CancelOperationsResponse {
+ private CancelOperationsResponseInner innerObject;
+
+ private final com.azure.resourcemanager.computeschedule.ComputescheduleManager serviceManager;
+
+ CancelOperationsResponseImpl(CancelOperationsResponseInner innerObject,
+ com.azure.resourcemanager.computeschedule.ComputescheduleManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public List results() {
+ List inner = this.innerModel().results();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public CancelOperationsResponseInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.computeschedule.ComputescheduleManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/DeallocateResourceOperationResponseImpl.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/DeallocateResourceOperationResponseImpl.java
new file mode 100644
index 000000000000..e60efe6cafc5
--- /dev/null
+++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/DeallocateResourceOperationResponseImpl.java
@@ -0,0 +1,52 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.computeschedule.implementation;
+
+import com.azure.resourcemanager.computeschedule.fluent.models.DeallocateResourceOperationResponseInner;
+import com.azure.resourcemanager.computeschedule.models.DeallocateResourceOperationResponse;
+import com.azure.resourcemanager.computeschedule.models.ResourceOperation;
+import java.util.Collections;
+import java.util.List;
+
+public final class DeallocateResourceOperationResponseImpl implements DeallocateResourceOperationResponse {
+ private DeallocateResourceOperationResponseInner innerObject;
+
+ private final com.azure.resourcemanager.computeschedule.ComputescheduleManager serviceManager;
+
+ DeallocateResourceOperationResponseImpl(DeallocateResourceOperationResponseInner innerObject,
+ com.azure.resourcemanager.computeschedule.ComputescheduleManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String description() {
+ return this.innerModel().description();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public String location() {
+ return this.innerModel().location();
+ }
+
+ public List results() {
+ List inner = this.innerModel().results();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public DeallocateResourceOperationResponseInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.computeschedule.ComputescheduleManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/GetOperationErrorsResponseImpl.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/GetOperationErrorsResponseImpl.java
new file mode 100644
index 000000000000..25cc3bf32e41
--- /dev/null
+++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/GetOperationErrorsResponseImpl.java
@@ -0,0 +1,40 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.computeschedule.implementation;
+
+import com.azure.resourcemanager.computeschedule.fluent.models.GetOperationErrorsResponseInner;
+import com.azure.resourcemanager.computeschedule.models.GetOperationErrorsResponse;
+import com.azure.resourcemanager.computeschedule.models.OperationErrorsResult;
+import java.util.Collections;
+import java.util.List;
+
+public final class GetOperationErrorsResponseImpl implements GetOperationErrorsResponse {
+ private GetOperationErrorsResponseInner innerObject;
+
+ private final com.azure.resourcemanager.computeschedule.ComputescheduleManager serviceManager;
+
+ GetOperationErrorsResponseImpl(GetOperationErrorsResponseInner innerObject,
+ com.azure.resourcemanager.computeschedule.ComputescheduleManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public List results() {
+ List inner = this.innerModel().results();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public GetOperationErrorsResponseInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.computeschedule.ComputescheduleManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/GetOperationStatusResponseImpl.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/GetOperationStatusResponseImpl.java
new file mode 100644
index 000000000000..435f7b8b77fe
--- /dev/null
+++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/GetOperationStatusResponseImpl.java
@@ -0,0 +1,40 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.computeschedule.implementation;
+
+import com.azure.resourcemanager.computeschedule.fluent.models.GetOperationStatusResponseInner;
+import com.azure.resourcemanager.computeschedule.models.GetOperationStatusResponse;
+import com.azure.resourcemanager.computeschedule.models.ResourceOperation;
+import java.util.Collections;
+import java.util.List;
+
+public final class GetOperationStatusResponseImpl implements GetOperationStatusResponse {
+ private GetOperationStatusResponseInner innerObject;
+
+ private final com.azure.resourcemanager.computeschedule.ComputescheduleManager serviceManager;
+
+ GetOperationStatusResponseImpl(GetOperationStatusResponseInner innerObject,
+ com.azure.resourcemanager.computeschedule.ComputescheduleManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public List results() {
+ List inner = this.innerModel().results();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public GetOperationStatusResponseInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.computeschedule.ComputescheduleManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/HibernateResourceOperationResponseImpl.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/HibernateResourceOperationResponseImpl.java
new file mode 100644
index 000000000000..b742dd2b3d0b
--- /dev/null
+++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/HibernateResourceOperationResponseImpl.java
@@ -0,0 +1,52 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.computeschedule.implementation;
+
+import com.azure.resourcemanager.computeschedule.fluent.models.HibernateResourceOperationResponseInner;
+import com.azure.resourcemanager.computeschedule.models.HibernateResourceOperationResponse;
+import com.azure.resourcemanager.computeschedule.models.ResourceOperation;
+import java.util.Collections;
+import java.util.List;
+
+public final class HibernateResourceOperationResponseImpl implements HibernateResourceOperationResponse {
+ private HibernateResourceOperationResponseInner innerObject;
+
+ private final com.azure.resourcemanager.computeschedule.ComputescheduleManager serviceManager;
+
+ HibernateResourceOperationResponseImpl(HibernateResourceOperationResponseInner innerObject,
+ com.azure.resourcemanager.computeschedule.ComputescheduleManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String description() {
+ return this.innerModel().description();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public String location() {
+ return this.innerModel().location();
+ }
+
+ public List results() {
+ List inner = this.innerModel().results();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public HibernateResourceOperationResponseInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.computeschedule.ComputescheduleManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/MicrosoftComputeScheduleBuilder.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/MicrosoftComputeScheduleBuilder.java
new file mode 100644
index 000000000000..d2d75fd7b044
--- /dev/null
+++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/MicrosoftComputeScheduleBuilder.java
@@ -0,0 +1,138 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.computeschedule.implementation;
+
+import com.azure.core.annotation.ServiceClientBuilder;
+import com.azure.core.http.HttpPipeline;
+import com.azure.core.http.HttpPipelineBuilder;
+import com.azure.core.http.policy.RetryPolicy;
+import com.azure.core.http.policy.UserAgentPolicy;
+import com.azure.core.management.AzureEnvironment;
+import com.azure.core.management.serializer.SerializerFactory;
+import com.azure.core.util.serializer.SerializerAdapter;
+import java.time.Duration;
+
+/**
+ * A builder for creating a new instance of the MicrosoftComputeScheduleImpl type.
+ */
+@ServiceClientBuilder(serviceClients = { MicrosoftComputeScheduleImpl.class })
+public final class MicrosoftComputeScheduleBuilder {
+ /*
+ * The ID of the target subscription. The value must be an UUID.
+ */
+ private String subscriptionId;
+
+ /**
+ * Sets The ID of the target subscription. The value must be an UUID.
+ *
+ * @param subscriptionId the subscriptionId value.
+ * @return the MicrosoftComputeScheduleBuilder.
+ */
+ public MicrosoftComputeScheduleBuilder subscriptionId(String subscriptionId) {
+ this.subscriptionId = subscriptionId;
+ return this;
+ }
+
+ /*
+ * server parameter
+ */
+ private String endpoint;
+
+ /**
+ * Sets server parameter.
+ *
+ * @param endpoint the endpoint value.
+ * @return the MicrosoftComputeScheduleBuilder.
+ */
+ public MicrosoftComputeScheduleBuilder endpoint(String endpoint) {
+ this.endpoint = endpoint;
+ return this;
+ }
+
+ /*
+ * The environment to connect to
+ */
+ private AzureEnvironment environment;
+
+ /**
+ * Sets The environment to connect to.
+ *
+ * @param environment the environment value.
+ * @return the MicrosoftComputeScheduleBuilder.
+ */
+ public MicrosoftComputeScheduleBuilder environment(AzureEnvironment environment) {
+ this.environment = environment;
+ return this;
+ }
+
+ /*
+ * The HTTP pipeline to send requests through
+ */
+ private HttpPipeline pipeline;
+
+ /**
+ * Sets The HTTP pipeline to send requests through.
+ *
+ * @param pipeline the pipeline value.
+ * @return the MicrosoftComputeScheduleBuilder.
+ */
+ public MicrosoftComputeScheduleBuilder pipeline(HttpPipeline pipeline) {
+ this.pipeline = pipeline;
+ return this;
+ }
+
+ /*
+ * The default poll interval for long-running operation
+ */
+ private Duration defaultPollInterval;
+
+ /**
+ * Sets The default poll interval for long-running operation.
+ *
+ * @param defaultPollInterval the defaultPollInterval value.
+ * @return the MicrosoftComputeScheduleBuilder.
+ */
+ public MicrosoftComputeScheduleBuilder defaultPollInterval(Duration defaultPollInterval) {
+ this.defaultPollInterval = defaultPollInterval;
+ return this;
+ }
+
+ /*
+ * The serializer to serialize an object into a string
+ */
+ private SerializerAdapter serializerAdapter;
+
+ /**
+ * Sets The serializer to serialize an object into a string.
+ *
+ * @param serializerAdapter the serializerAdapter value.
+ * @return the MicrosoftComputeScheduleBuilder.
+ */
+ public MicrosoftComputeScheduleBuilder serializerAdapter(SerializerAdapter serializerAdapter) {
+ this.serializerAdapter = serializerAdapter;
+ return this;
+ }
+
+ /**
+ * Builds an instance of MicrosoftComputeScheduleImpl with the provided parameters.
+ *
+ * @return an instance of MicrosoftComputeScheduleImpl.
+ */
+ public MicrosoftComputeScheduleImpl buildClient() {
+ String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com";
+ AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE;
+ HttpPipeline localPipeline = (pipeline != null)
+ ? pipeline
+ : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build();
+ Duration localDefaultPollInterval
+ = (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30);
+ SerializerAdapter localSerializerAdapter = (serializerAdapter != null)
+ ? serializerAdapter
+ : SerializerFactory.createDefaultManagementSerializerAdapter();
+ MicrosoftComputeScheduleImpl client = new MicrosoftComputeScheduleImpl(localPipeline, localSerializerAdapter,
+ localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint);
+ return client;
+ }
+}
diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/MicrosoftComputeScheduleImpl.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/MicrosoftComputeScheduleImpl.java
new file mode 100644
index 000000000000..f75e9f38e348
--- /dev/null
+++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/MicrosoftComputeScheduleImpl.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.computeschedule.implementation;
+
+import com.azure.core.annotation.ServiceClient;
+import com.azure.core.http.HttpHeaderName;
+import com.azure.core.http.HttpHeaders;
+import com.azure.core.http.HttpPipeline;
+import com.azure.core.http.HttpResponse;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.AzureEnvironment;
+import com.azure.core.management.exception.ManagementError;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollerFactory;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.CoreUtils;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.core.util.polling.AsyncPollResponse;
+import com.azure.core.util.polling.LongRunningOperationStatus;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.serializer.SerializerAdapter;
+import com.azure.core.util.serializer.SerializerEncoding;
+import com.azure.resourcemanager.computeschedule.fluent.MicrosoftComputeSchedule;
+import com.azure.resourcemanager.computeschedule.fluent.OperationsClient;
+import com.azure.resourcemanager.computeschedule.fluent.ScheduledActionsClient;
+import java.io.IOException;
+import java.lang.reflect.Type;
+import java.nio.ByteBuffer;
+import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
+import java.time.Duration;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/**
+ * Initializes a new instance of the MicrosoftComputeScheduleImpl type.
+ */
+@ServiceClient(builder = MicrosoftComputeScheduleBuilder.class)
+public final class MicrosoftComputeScheduleImpl implements MicrosoftComputeSchedule {
+ /**
+ * The ID of the target subscription. The value must be an UUID.
+ */
+ private final String subscriptionId;
+
+ /**
+ * Gets The ID of the target subscription. The value must be an UUID.
+ *
+ * @return the subscriptionId value.
+ */
+ public String getSubscriptionId() {
+ return this.subscriptionId;
+ }
+
+ /**
+ * server parameter.
+ */
+ private final String endpoint;
+
+ /**
+ * Gets server parameter.
+ *
+ * @return the endpoint value.
+ */
+ public String getEndpoint() {
+ return this.endpoint;
+ }
+
+ /**
+ * Api Version.
+ */
+ private final String apiVersion;
+
+ /**
+ * Gets Api Version.
+ *
+ * @return the apiVersion value.
+ */
+ public String getApiVersion() {
+ return this.apiVersion;
+ }
+
+ /**
+ * The HTTP pipeline to send requests through.
+ */
+ private final HttpPipeline httpPipeline;
+
+ /**
+ * Gets The HTTP pipeline to send requests through.
+ *
+ * @return the httpPipeline value.
+ */
+ public HttpPipeline getHttpPipeline() {
+ return this.httpPipeline;
+ }
+
+ /**
+ * The serializer to serialize an object into a string.
+ */
+ private final SerializerAdapter serializerAdapter;
+
+ /**
+ * Gets The serializer to serialize an object into a string.
+ *
+ * @return the serializerAdapter value.
+ */
+ SerializerAdapter getSerializerAdapter() {
+ return this.serializerAdapter;
+ }
+
+ /**
+ * The default poll interval for long-running operation.
+ */
+ private final Duration defaultPollInterval;
+
+ /**
+ * Gets The default poll interval for long-running operation.
+ *
+ * @return the defaultPollInterval value.
+ */
+ public Duration getDefaultPollInterval() {
+ return this.defaultPollInterval;
+ }
+
+ /**
+ * The OperationsClient object to access its operations.
+ */
+ private final OperationsClient operations;
+
+ /**
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ public OperationsClient getOperations() {
+ return this.operations;
+ }
+
+ /**
+ * The ScheduledActionsClient object to access its operations.
+ */
+ private final ScheduledActionsClient scheduledActions;
+
+ /**
+ * Gets the ScheduledActionsClient object to access its operations.
+ *
+ * @return the ScheduledActionsClient object.
+ */
+ public ScheduledActionsClient getScheduledActions() {
+ return this.scheduledActions;
+ }
+
+ /**
+ * Initializes an instance of MicrosoftComputeSchedule client.
+ *
+ * @param httpPipeline The HTTP pipeline to send requests through.
+ * @param serializerAdapter The serializer to serialize an object into a string.
+ * @param defaultPollInterval The default poll interval for long-running operation.
+ * @param environment The Azure environment.
+ * @param subscriptionId The ID of the target subscription. The value must be an UUID.
+ * @param endpoint server parameter.
+ */
+ MicrosoftComputeScheduleImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter,
+ Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) {
+ this.httpPipeline = httpPipeline;
+ this.serializerAdapter = serializerAdapter;
+ this.defaultPollInterval = defaultPollInterval;
+ this.subscriptionId = subscriptionId;
+ this.endpoint = endpoint;
+ this.apiVersion = "2024-08-15-preview";
+ this.operations = new OperationsClientImpl(this);
+ this.scheduledActions = new ScheduledActionsClientImpl(this);
+ }
+
+ /**
+ * Gets default client context.
+ *
+ * @return the default client context.
+ */
+ public Context getContext() {
+ return Context.NONE;
+ }
+
+ /**
+ * Merges default client context with provided context.
+ *
+ * @param context the context to be merged with default client context.
+ * @return the merged context.
+ */
+ public Context mergeContext(Context context) {
+ return CoreUtils.mergeContexts(this.getContext(), context);
+ }
+
+ /**
+ * Gets long running operation result.
+ *
+ * @param activationResponse the response of activation operation.
+ * @param httpPipeline the http pipeline.
+ * @param pollResultType type of poll result.
+ * @param finalResultType type of final result.
+ * @param context the context shared by all requests.
+ * @param type of poll result.
+ * @param type of final result.
+ * @return poller flux for poll result and final result.
+ */
+ public PollerFlux, U> getLroResult(Mono>> activationResponse,
+ HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Context context) {
+ return PollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType,
+ defaultPollInterval, activationResponse, context);
+ }
+
+ /**
+ * Gets the final result, or an error, based on last async poll response.
+ *
+ * @param response the last async poll response.
+ * @param type of poll result.
+ * @param type of final result.
+ * @return the final result, or an error.
+ */
+ public Mono getLroFinalResultOrError(AsyncPollResponse, U> response) {
+ if (response.getStatus() != LongRunningOperationStatus.SUCCESSFULLY_COMPLETED) {
+ String errorMessage;
+ ManagementError managementError = null;
+ HttpResponse errorResponse = null;
+ PollResult.Error lroError = response.getValue().getError();
+ if (lroError != null) {
+ errorResponse = new HttpResponseImpl(lroError.getResponseStatusCode(), lroError.getResponseHeaders(),
+ lroError.getResponseBody());
+
+ errorMessage = response.getValue().getError().getMessage();
+ String errorBody = response.getValue().getError().getResponseBody();
+ if (errorBody != null) {
+ // try to deserialize error body to ManagementError
+ try {
+ managementError = this.getSerializerAdapter()
+ .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON);
+ if (managementError.getCode() == null || managementError.getMessage() == null) {
+ managementError = null;
+ }
+ } catch (IOException | RuntimeException ioe) {
+ LOGGER.logThrowableAsWarning(ioe);
+ }
+ }
+ } else {
+ // fallback to default error message
+ errorMessage = "Long running operation failed.";
+ }
+ if (managementError == null) {
+ // fallback to default ManagementError
+ managementError = new ManagementError(response.getStatus().toString(), errorMessage);
+ }
+ return Mono.error(new ManagementException(errorMessage, errorResponse, managementError));
+ } else {
+ return response.getFinalResult();
+ }
+ }
+
+ private static final class HttpResponseImpl extends HttpResponse {
+ private final int statusCode;
+
+ private final byte[] responseBody;
+
+ private final HttpHeaders httpHeaders;
+
+ HttpResponseImpl(int statusCode, HttpHeaders httpHeaders, String responseBody) {
+ super(null);
+ this.statusCode = statusCode;
+ this.httpHeaders = httpHeaders;
+ this.responseBody = responseBody == null ? null : responseBody.getBytes(StandardCharsets.UTF_8);
+ }
+
+ public int getStatusCode() {
+ return statusCode;
+ }
+
+ public String getHeaderValue(String s) {
+ return httpHeaders.getValue(HttpHeaderName.fromString(s));
+ }
+
+ public HttpHeaders getHeaders() {
+ return httpHeaders;
+ }
+
+ public Flux getBody() {
+ return Flux.just(ByteBuffer.wrap(responseBody));
+ }
+
+ public Mono getBodyAsByteArray() {
+ return Mono.just(responseBody);
+ }
+
+ public Mono getBodyAsString() {
+ return Mono.just(new String(responseBody, StandardCharsets.UTF_8));
+ }
+
+ public Mono getBodyAsString(Charset charset) {
+ return Mono.just(new String(responseBody, charset));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(MicrosoftComputeScheduleImpl.class);
+}
diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/OperationImpl.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/OperationImpl.java
new file mode 100644
index 000000000000..4be2ae2fa289
--- /dev/null
+++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/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.computeschedule.implementation;
+
+import com.azure.resourcemanager.computeschedule.fluent.models.OperationInner;
+import com.azure.resourcemanager.computeschedule.models.ActionType;
+import com.azure.resourcemanager.computeschedule.models.Operation;
+import com.azure.resourcemanager.computeschedule.models.OperationDisplay;
+import com.azure.resourcemanager.computeschedule.models.Origin;
+
+public final class OperationImpl implements Operation {
+ private OperationInner innerObject;
+
+ private final com.azure.resourcemanager.computeschedule.ComputescheduleManager serviceManager;
+
+ OperationImpl(OperationInner innerObject,
+ com.azure.resourcemanager.computeschedule.ComputescheduleManager 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.computeschedule.ComputescheduleManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/OperationsClientImpl.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/OperationsClientImpl.java
new file mode 100644
index 000000000000..21db1ddddff8
--- /dev/null
+++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/OperationsClientImpl.java
@@ -0,0 +1,235 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.computeschedule.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.computeschedule.fluent.OperationsClient;
+import com.azure.resourcemanager.computeschedule.fluent.models.OperationInner;
+import com.azure.resourcemanager.computeschedule.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 MicrosoftComputeScheduleImpl client;
+
+ /**
+ * Initializes an instance of OperationsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ OperationsClientImpl(MicrosoftComputeScheduleImpl client) {
+ this.service
+ = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for MicrosoftComputeScheduleOperations to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "MicrosoftComputeSche")
+ public interface OperationsService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/providers/Microsoft.ComputeSchedule/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);
+ }
+
+ /**
+ * List the operations for the provider.
+ *
+ * @throws 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()));
+ }
+
+ /**
+ * List the operations for the provider.
+ *
+ * @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));
+ }
+
+ /**
+ * List the operations for the provider.
+ *
+ * @throws 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));
+ }
+
+ /**
+ * List the operations for the provider.
+ *
+ * @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));
+ }
+
+ /**
+ * List the operations for the provider.
+ *
+ * @throws 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());
+ }
+
+ /**
+ * List the operations for the provider.
+ *
+ * @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 URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 URL to get the next list of items.
+ * @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/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/OperationsImpl.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/OperationsImpl.java
new file mode 100644
index 000000000000..29900c298d31
--- /dev/null
+++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/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.computeschedule.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.computeschedule.fluent.OperationsClient;
+import com.azure.resourcemanager.computeschedule.fluent.models.OperationInner;
+import com.azure.resourcemanager.computeschedule.models.Operation;
+import com.azure.resourcemanager.computeschedule.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.computeschedule.ComputescheduleManager serviceManager;
+
+ public OperationsImpl(OperationsClient innerClient,
+ com.azure.resourcemanager.computeschedule.ComputescheduleManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(Context context) {
+ PagedIterable inner = this.serviceClient().list(context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager()));
+ }
+
+ private OperationsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.computeschedule.ComputescheduleManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/ResourceManagerUtils.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/ResourceManagerUtils.java
new file mode 100644
index 000000000000..af8c57b834a8
--- /dev/null
+++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/ResourceManagerUtils.java
@@ -0,0 +1,195 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.computeschedule.implementation;
+
+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.util.CoreUtils;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+import reactor.core.publisher.Flux;
+
+final class ResourceManagerUtils {
+ private ResourceManagerUtils() {
+ }
+
+ static String getValueFromIdByName(String id, String name) {
+ if (id == null) {
+ return null;
+ }
+ Iterator itr = Arrays.stream(id.split("/")).iterator();
+ while (itr.hasNext()) {
+ String part = itr.next();
+ if (part != null && !part.trim().isEmpty()) {
+ if (part.equalsIgnoreCase(name)) {
+ if (itr.hasNext()) {
+ return itr.next();
+ } else {
+ return null;
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+ static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) {
+ if (id == null || pathTemplate == null) {
+ return null;
+ }
+ String parameterNameParentheses = "{" + parameterName + "}";
+ List idSegmentsReverted = Arrays.asList(id.split("/"));
+ List pathSegments = Arrays.asList(pathTemplate.split("/"));
+ Collections.reverse(idSegmentsReverted);
+ Iterator idItrReverted = idSegmentsReverted.iterator();
+ int pathIndex = pathSegments.size();
+ while (idItrReverted.hasNext() && pathIndex > 0) {
+ String idSegment = idItrReverted.next();
+ String pathSegment = pathSegments.get(--pathIndex);
+ if (!CoreUtils.isNullOrEmpty(idSegment) && !CoreUtils.isNullOrEmpty(pathSegment)) {
+ if (pathSegment.equalsIgnoreCase(parameterNameParentheses)) {
+ if (pathIndex == 0 || (pathIndex == 1 && pathSegments.get(0).isEmpty())) {
+ List segments = new ArrayList<>();
+ segments.add(idSegment);
+ idItrReverted.forEachRemaining(segments::add);
+ Collections.reverse(segments);
+ if (!segments.isEmpty() && segments.get(0).isEmpty()) {
+ segments.remove(0);
+ }
+ return String.join("/", segments);
+ } else {
+ return idSegment;
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+ static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) {
+ return new PagedIterableImpl<>(pageIterable, mapper);
+ }
+
+ private static final class PagedIterableImpl extends PagedIterable {
+
+ private final PagedIterable pagedIterable;
+ private final Function mapper;
+ private final Function, PagedResponse> pageMapper;
+
+ private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) {
+ super(PagedFlux.create(() -> (continuationToken, pageSize) -> Flux
+ .fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper)))));
+ this.pagedIterable = pagedIterable;
+ this.mapper = mapper;
+ this.pageMapper = getPageMapper(mapper);
+ }
+
+ private static Function, PagedResponse> getPageMapper(Function mapper) {
+ return page -> new PagedResponseBase(page.getRequest(), page.getStatusCode(), page.getHeaders(),
+ page.getElements().stream().map(mapper).collect(Collectors.toList()), page.getContinuationToken(),
+ null);
+ }
+
+ @Override
+ public Stream stream() {
+ return pagedIterable.stream().map(mapper);
+ }
+
+ @Override
+ public Stream> streamByPage() {
+ return pagedIterable.streamByPage().map(pageMapper);
+ }
+
+ @Override
+ public Stream> streamByPage(String continuationToken) {
+ return pagedIterable.streamByPage(continuationToken).map(pageMapper);
+ }
+
+ @Override
+ public Stream> streamByPage(int preferredPageSize) {
+ return pagedIterable.streamByPage(preferredPageSize).map(pageMapper);
+ }
+
+ @Override
+ public Stream> streamByPage(String continuationToken, int preferredPageSize) {
+ return pagedIterable.streamByPage(continuationToken, preferredPageSize).map(pageMapper);
+ }
+
+ @Override
+ public Iterator iterator() {
+ return new IteratorImpl<>(pagedIterable.iterator(), mapper);
+ }
+
+ @Override
+ public Iterable> iterableByPage() {
+ return new IterableImpl<>(pagedIterable.iterableByPage(), pageMapper);
+ }
+
+ @Override
+ public Iterable> iterableByPage(String continuationToken) {
+ return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken), pageMapper);
+ }
+
+ @Override
+ public Iterable> iterableByPage(int preferredPageSize) {
+ return new IterableImpl<>(pagedIterable.iterableByPage(preferredPageSize), pageMapper);
+ }
+
+ @Override
+ public Iterable> iterableByPage(String continuationToken, int preferredPageSize) {
+ return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper);
+ }
+ }
+
+ private static final class IteratorImpl implements Iterator {
+
+ private final Iterator iterator;
+ private final Function mapper;
+
+ private IteratorImpl(Iterator iterator, Function mapper) {
+ this.iterator = iterator;
+ this.mapper = mapper;
+ }
+
+ @Override
+ public boolean hasNext() {
+ return iterator.hasNext();
+ }
+
+ @Override
+ public S next() {
+ return mapper.apply(iterator.next());
+ }
+
+ @Override
+ public void remove() {
+ iterator.remove();
+ }
+ }
+
+ private static final class IterableImpl implements Iterable {
+
+ private final Iterable iterable;
+ private final Function mapper;
+
+ private IterableImpl(Iterable iterable, Function mapper) {
+ this.iterable = iterable;
+ this.mapper = mapper;
+ }
+
+ @Override
+ public Iterator iterator() {
+ return new IteratorImpl<>(iterable.iterator(), mapper);
+ }
+ }
+}
diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/ScheduledActionsClientImpl.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/ScheduledActionsClientImpl.java
new file mode 100644
index 000000000000..2c5502243e84
--- /dev/null
+++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/ScheduledActionsClientImpl.java
@@ -0,0 +1,1313 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.computeschedule.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.ExpectedResponses;
+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.Post;
+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.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.computeschedule.fluent.ScheduledActionsClient;
+import com.azure.resourcemanager.computeschedule.fluent.models.CancelOperationsResponseInner;
+import com.azure.resourcemanager.computeschedule.fluent.models.DeallocateResourceOperationResponseInner;
+import com.azure.resourcemanager.computeschedule.fluent.models.GetOperationErrorsResponseInner;
+import com.azure.resourcemanager.computeschedule.fluent.models.GetOperationStatusResponseInner;
+import com.azure.resourcemanager.computeschedule.fluent.models.HibernateResourceOperationResponseInner;
+import com.azure.resourcemanager.computeschedule.fluent.models.StartResourceOperationResponseInner;
+import com.azure.resourcemanager.computeschedule.models.CancelOperationsRequest;
+import com.azure.resourcemanager.computeschedule.models.ExecuteDeallocateRequest;
+import com.azure.resourcemanager.computeschedule.models.ExecuteHibernateRequest;
+import com.azure.resourcemanager.computeschedule.models.ExecuteStartRequest;
+import com.azure.resourcemanager.computeschedule.models.GetOperationErrorsRequest;
+import com.azure.resourcemanager.computeschedule.models.GetOperationStatusRequest;
+import com.azure.resourcemanager.computeschedule.models.SubmitDeallocateRequest;
+import com.azure.resourcemanager.computeschedule.models.SubmitHibernateRequest;
+import com.azure.resourcemanager.computeschedule.models.SubmitStartRequest;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in ScheduledActionsClient.
+ */
+public final class ScheduledActionsClientImpl implements ScheduledActionsClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final ScheduledActionsService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final MicrosoftComputeScheduleImpl client;
+
+ /**
+ * Initializes an instance of ScheduledActionsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ ScheduledActionsClientImpl(MicrosoftComputeScheduleImpl client) {
+ this.service
+ = RestProxy.create(ScheduledActionsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for MicrosoftComputeScheduleScheduledActions to be used by the proxy
+ * service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "MicrosoftComputeSche")
+ public interface ScheduledActionsService {
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesCancelOperations")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> virtualMachinesCancelOperations(
+ @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("locationparameter") String locationparameter,
+ @BodyParam("application/json") CancelOperationsRequest requestBody, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesExecuteDeallocate")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> virtualMachinesExecuteDeallocate(
+ @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("locationparameter") String locationparameter,
+ @BodyParam("application/json") ExecuteDeallocateRequest requestBody, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesExecuteHibernate")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> virtualMachinesExecuteHibernate(
+ @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("locationparameter") String locationparameter,
+ @BodyParam("application/json") ExecuteHibernateRequest requestBody, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesExecuteStart")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> virtualMachinesExecuteStart(
+ @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("locationparameter") String locationparameter,
+ @BodyParam("application/json") ExecuteStartRequest requestBody, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesGetOperationErrors")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> virtualMachinesGetOperationErrors(
+ @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("locationparameter") String locationparameter,
+ @BodyParam("application/json") GetOperationErrorsRequest requestBody, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesGetOperationStatus")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> virtualMachinesGetOperationStatus(
+ @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("locationparameter") String locationparameter,
+ @BodyParam("application/json") GetOperationStatusRequest requestBody, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesSubmitDeallocate")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> virtualMachinesSubmitDeallocate(
+ @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("locationparameter") String locationparameter,
+ @BodyParam("application/json") SubmitDeallocateRequest requestBody, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesSubmitHibernate")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> virtualMachinesSubmitHibernate(
+ @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("locationparameter") String locationparameter,
+ @BodyParam("application/json") SubmitHibernateRequest requestBody, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesSubmitStart")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> virtualMachinesSubmitStart(
+ @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("locationparameter") String locationparameter,
+ @BodyParam("application/json") SubmitStartRequest requestBody, @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * virtualMachinesCancelOperations: cancelOperations for a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return this is the response from a cancel operations request along with {@link Response} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> virtualMachinesCancelOperationsWithResponseAsync(
+ String locationparameter, CancelOperationsRequest requestBody) {
+ 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 (locationparameter == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter locationparameter is required and cannot be null."));
+ }
+ if (requestBody == null) {
+ return Mono.error(new IllegalArgumentException("Parameter requestBody is required and cannot be null."));
+ } else {
+ requestBody.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.virtualMachinesCancelOperations(this.client.getEndpoint(),
+ this.client.getApiVersion(), this.client.getSubscriptionId(), locationparameter, requestBody, accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * virtualMachinesCancelOperations: cancelOperations for a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return this is the response from a cancel operations request along with {@link Response} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> virtualMachinesCancelOperationsWithResponseAsync(
+ String locationparameter, CancelOperationsRequest requestBody, 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 (locationparameter == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter locationparameter is required and cannot be null."));
+ }
+ if (requestBody == null) {
+ return Mono.error(new IllegalArgumentException("Parameter requestBody is required and cannot be null."));
+ } else {
+ requestBody.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.virtualMachinesCancelOperations(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), locationparameter, requestBody, accept, context);
+ }
+
+ /**
+ * virtualMachinesCancelOperations: cancelOperations for a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return this is the response from a cancel operations request on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono virtualMachinesCancelOperationsAsync(String locationparameter,
+ CancelOperationsRequest requestBody) {
+ return virtualMachinesCancelOperationsWithResponseAsync(locationparameter, requestBody)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * virtualMachinesCancelOperations: cancelOperations for a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return this is the response from a cancel operations request along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response virtualMachinesCancelOperationsWithResponse(String locationparameter,
+ CancelOperationsRequest requestBody, Context context) {
+ return virtualMachinesCancelOperationsWithResponseAsync(locationparameter, requestBody, context).block();
+ }
+
+ /**
+ * virtualMachinesCancelOperations: cancelOperations for a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return this is the response from a cancel operations request.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public CancelOperationsResponseInner virtualMachinesCancelOperations(String locationparameter,
+ CancelOperationsRequest requestBody) {
+ return virtualMachinesCancelOperationsWithResponse(locationparameter, requestBody, Context.NONE).getValue();
+ }
+
+ /**
+ * virtualMachinesExecuteDeallocate: executeDeallocate for a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response from a deallocate request along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> virtualMachinesExecuteDeallocateWithResponseAsync(
+ String locationparameter, ExecuteDeallocateRequest requestBody) {
+ 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 (locationparameter == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter locationparameter is required and cannot be null."));
+ }
+ if (requestBody == null) {
+ return Mono.error(new IllegalArgumentException("Parameter requestBody is required and cannot be null."));
+ } else {
+ requestBody.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.virtualMachinesExecuteDeallocate(this.client.getEndpoint(),
+ this.client.getApiVersion(), this.client.getSubscriptionId(), locationparameter, requestBody, accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * virtualMachinesExecuteDeallocate: executeDeallocate for a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response from a deallocate request along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> virtualMachinesExecuteDeallocateWithResponseAsync(
+ String locationparameter, ExecuteDeallocateRequest requestBody, 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 (locationparameter == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter locationparameter is required and cannot be null."));
+ }
+ if (requestBody == null) {
+ return Mono.error(new IllegalArgumentException("Parameter requestBody is required and cannot be null."));
+ } else {
+ requestBody.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.virtualMachinesExecuteDeallocate(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), locationparameter, requestBody, accept, context);
+ }
+
+ /**
+ * virtualMachinesExecuteDeallocate: executeDeallocate for a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response from a deallocate request on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono
+ virtualMachinesExecuteDeallocateAsync(String locationparameter, ExecuteDeallocateRequest requestBody) {
+ return virtualMachinesExecuteDeallocateWithResponseAsync(locationparameter, requestBody)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * virtualMachinesExecuteDeallocate: executeDeallocate for a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response from a deallocate request along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response virtualMachinesExecuteDeallocateWithResponse(
+ String locationparameter, ExecuteDeallocateRequest requestBody, Context context) {
+ return virtualMachinesExecuteDeallocateWithResponseAsync(locationparameter, requestBody, context).block();
+ }
+
+ /**
+ * virtualMachinesExecuteDeallocate: executeDeallocate for a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response from a deallocate request.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DeallocateResourceOperationResponseInner virtualMachinesExecuteDeallocate(String locationparameter,
+ ExecuteDeallocateRequest requestBody) {
+ return virtualMachinesExecuteDeallocateWithResponse(locationparameter, requestBody, Context.NONE).getValue();
+ }
+
+ /**
+ * virtualMachinesExecuteHibernate: executeHibernate for a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response from a Hibernate request along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> virtualMachinesExecuteHibernateWithResponseAsync(
+ String locationparameter, ExecuteHibernateRequest requestBody) {
+ 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 (locationparameter == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter locationparameter is required and cannot be null."));
+ }
+ if (requestBody == null) {
+ return Mono.error(new IllegalArgumentException("Parameter requestBody is required and cannot be null."));
+ } else {
+ requestBody.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.virtualMachinesExecuteHibernate(this.client.getEndpoint(),
+ this.client.getApiVersion(), this.client.getSubscriptionId(), locationparameter, requestBody, accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * virtualMachinesExecuteHibernate: executeHibernate for a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response from a Hibernate request along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> virtualMachinesExecuteHibernateWithResponseAsync(
+ String locationparameter, ExecuteHibernateRequest requestBody, 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 (locationparameter == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter locationparameter is required and cannot be null."));
+ }
+ if (requestBody == null) {
+ return Mono.error(new IllegalArgumentException("Parameter requestBody is required and cannot be null."));
+ } else {
+ requestBody.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.virtualMachinesExecuteHibernate(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), locationparameter, requestBody, accept, context);
+ }
+
+ /**
+ * virtualMachinesExecuteHibernate: executeHibernate for a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response from a Hibernate request on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono virtualMachinesExecuteHibernateAsync(String locationparameter,
+ ExecuteHibernateRequest requestBody) {
+ return virtualMachinesExecuteHibernateWithResponseAsync(locationparameter, requestBody)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * virtualMachinesExecuteHibernate: executeHibernate for a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response from a Hibernate request along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response virtualMachinesExecuteHibernateWithResponse(
+ String locationparameter, ExecuteHibernateRequest requestBody, Context context) {
+ return virtualMachinesExecuteHibernateWithResponseAsync(locationparameter, requestBody, context).block();
+ }
+
+ /**
+ * virtualMachinesExecuteHibernate: executeHibernate for a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response from a Hibernate request.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public HibernateResourceOperationResponseInner virtualMachinesExecuteHibernate(String locationparameter,
+ ExecuteHibernateRequest requestBody) {
+ return virtualMachinesExecuteHibernateWithResponse(locationparameter, requestBody, Context.NONE).getValue();
+ }
+
+ /**
+ * virtualMachinesExecuteStart: executeStart for a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response from a start request along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>
+ virtualMachinesExecuteStartWithResponseAsync(String locationparameter, ExecuteStartRequest requestBody) {
+ 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 (locationparameter == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter locationparameter is required and cannot be null."));
+ }
+ if (requestBody == null) {
+ return Mono.error(new IllegalArgumentException("Parameter requestBody is required and cannot be null."));
+ } else {
+ requestBody.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.virtualMachinesExecuteStart(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), locationparameter, requestBody, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * virtualMachinesExecuteStart: executeStart for a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response from a start request along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> virtualMachinesExecuteStartWithResponseAsync(
+ String locationparameter, ExecuteStartRequest requestBody, 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 (locationparameter == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter locationparameter is required and cannot be null."));
+ }
+ if (requestBody == null) {
+ return Mono.error(new IllegalArgumentException("Parameter requestBody is required and cannot be null."));
+ } else {
+ requestBody.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.virtualMachinesExecuteStart(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), locationparameter, requestBody, accept, context);
+ }
+
+ /**
+ * virtualMachinesExecuteStart: executeStart for a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response from a start request on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono virtualMachinesExecuteStartAsync(String locationparameter,
+ ExecuteStartRequest requestBody) {
+ return virtualMachinesExecuteStartWithResponseAsync(locationparameter, requestBody)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * virtualMachinesExecuteStart: executeStart for a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response from a start request along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response virtualMachinesExecuteStartWithResponse(
+ String locationparameter, ExecuteStartRequest requestBody, Context context) {
+ return virtualMachinesExecuteStartWithResponseAsync(locationparameter, requestBody, context).block();
+ }
+
+ /**
+ * virtualMachinesExecuteStart: executeStart for a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response from a start request.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public StartResourceOperationResponseInner virtualMachinesExecuteStart(String locationparameter,
+ ExecuteStartRequest requestBody) {
+ return virtualMachinesExecuteStartWithResponse(locationparameter, requestBody, Context.NONE).getValue();
+ }
+
+ /**
+ * virtualMachinesGetOperationErrors: getOperationErrors associated with an operation on a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return this is the response from a get operations errors request along with {@link Response} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> virtualMachinesGetOperationErrorsWithResponseAsync(
+ String locationparameter, GetOperationErrorsRequest requestBody) {
+ 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 (locationparameter == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter locationparameter is required and cannot be null."));
+ }
+ if (requestBody == null) {
+ return Mono.error(new IllegalArgumentException("Parameter requestBody is required and cannot be null."));
+ } else {
+ requestBody.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.virtualMachinesGetOperationErrors(this.client.getEndpoint(),
+ this.client.getApiVersion(), this.client.getSubscriptionId(), locationparameter, requestBody, accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * virtualMachinesGetOperationErrors: getOperationErrors associated with an operation on a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return this is the response from a get operations errors request along with {@link Response} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> virtualMachinesGetOperationErrorsWithResponseAsync(
+ String locationparameter, GetOperationErrorsRequest requestBody, 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 (locationparameter == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter locationparameter is required and cannot be null."));
+ }
+ if (requestBody == null) {
+ return Mono.error(new IllegalArgumentException("Parameter requestBody is required and cannot be null."));
+ } else {
+ requestBody.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.virtualMachinesGetOperationErrors(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), locationparameter, requestBody, accept, context);
+ }
+
+ /**
+ * virtualMachinesGetOperationErrors: getOperationErrors associated with an operation on a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return this is the response from a get operations errors request on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono virtualMachinesGetOperationErrorsAsync(String locationparameter,
+ GetOperationErrorsRequest requestBody) {
+ return virtualMachinesGetOperationErrorsWithResponseAsync(locationparameter, requestBody)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * virtualMachinesGetOperationErrors: getOperationErrors associated with an operation on a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return this is the response from a get operations errors request along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response virtualMachinesGetOperationErrorsWithResponse(
+ String locationparameter, GetOperationErrorsRequest requestBody, Context context) {
+ return virtualMachinesGetOperationErrorsWithResponseAsync(locationparameter, requestBody, context).block();
+ }
+
+ /**
+ * virtualMachinesGetOperationErrors: getOperationErrors associated with an operation on a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return this is the response from a get operations errors request.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public GetOperationErrorsResponseInner virtualMachinesGetOperationErrors(String locationparameter,
+ GetOperationErrorsRequest requestBody) {
+ return virtualMachinesGetOperationErrorsWithResponse(locationparameter, requestBody, Context.NONE).getValue();
+ }
+
+ /**
+ * virtualMachinesGetOperationStatus: getOperationStatus for a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return this is the response from a get operations status request along with {@link Response} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> virtualMachinesGetOperationStatusWithResponseAsync(
+ String locationparameter, GetOperationStatusRequest requestBody) {
+ 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 (locationparameter == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter locationparameter is required and cannot be null."));
+ }
+ if (requestBody == null) {
+ return Mono.error(new IllegalArgumentException("Parameter requestBody is required and cannot be null."));
+ } else {
+ requestBody.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.virtualMachinesGetOperationStatus(this.client.getEndpoint(),
+ this.client.getApiVersion(), this.client.getSubscriptionId(), locationparameter, requestBody, accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * virtualMachinesGetOperationStatus: getOperationStatus for a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return this is the response from a get operations status request along with {@link Response} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> virtualMachinesGetOperationStatusWithResponseAsync(
+ String locationparameter, GetOperationStatusRequest requestBody, 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 (locationparameter == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter locationparameter is required and cannot be null."));
+ }
+ if (requestBody == null) {
+ return Mono.error(new IllegalArgumentException("Parameter requestBody is required and cannot be null."));
+ } else {
+ requestBody.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.virtualMachinesGetOperationStatus(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), locationparameter, requestBody, accept, context);
+ }
+
+ /**
+ * virtualMachinesGetOperationStatus: getOperationStatus for a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return this is the response from a get operations status request on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono virtualMachinesGetOperationStatusAsync(String locationparameter,
+ GetOperationStatusRequest requestBody) {
+ return virtualMachinesGetOperationStatusWithResponseAsync(locationparameter, requestBody)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * virtualMachinesGetOperationStatus: getOperationStatus for a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return this is the response from a get operations status request along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response virtualMachinesGetOperationStatusWithResponse(
+ String locationparameter, GetOperationStatusRequest requestBody, Context context) {
+ return virtualMachinesGetOperationStatusWithResponseAsync(locationparameter, requestBody, context).block();
+ }
+
+ /**
+ * virtualMachinesGetOperationStatus: getOperationStatus for a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return this is the response from a get operations status request.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public GetOperationStatusResponseInner virtualMachinesGetOperationStatus(String locationparameter,
+ GetOperationStatusRequest requestBody) {
+ return virtualMachinesGetOperationStatusWithResponse(locationparameter, requestBody, Context.NONE).getValue();
+ }
+
+ /**
+ * virtualMachinesSubmitDeallocate: submitDeallocate for a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response from a deallocate request along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> virtualMachinesSubmitDeallocateWithResponseAsync(
+ String locationparameter, SubmitDeallocateRequest requestBody) {
+ 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 (locationparameter == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter locationparameter is required and cannot be null."));
+ }
+ if (requestBody == null) {
+ return Mono.error(new IllegalArgumentException("Parameter requestBody is required and cannot be null."));
+ } else {
+ requestBody.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.virtualMachinesSubmitDeallocate(this.client.getEndpoint(),
+ this.client.getApiVersion(), this.client.getSubscriptionId(), locationparameter, requestBody, accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * virtualMachinesSubmitDeallocate: submitDeallocate for a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response from a deallocate request along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> virtualMachinesSubmitDeallocateWithResponseAsync(
+ String locationparameter, SubmitDeallocateRequest requestBody, 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 (locationparameter == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter locationparameter is required and cannot be null."));
+ }
+ if (requestBody == null) {
+ return Mono.error(new IllegalArgumentException("Parameter requestBody is required and cannot be null."));
+ } else {
+ requestBody.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.virtualMachinesSubmitDeallocate(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), locationparameter, requestBody, accept, context);
+ }
+
+ /**
+ * virtualMachinesSubmitDeallocate: submitDeallocate for a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response from a deallocate request on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono
+ virtualMachinesSubmitDeallocateAsync(String locationparameter, SubmitDeallocateRequest requestBody) {
+ return virtualMachinesSubmitDeallocateWithResponseAsync(locationparameter, requestBody)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * virtualMachinesSubmitDeallocate: submitDeallocate for a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response from a deallocate request along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response virtualMachinesSubmitDeallocateWithResponse(
+ String locationparameter, SubmitDeallocateRequest requestBody, Context context) {
+ return virtualMachinesSubmitDeallocateWithResponseAsync(locationparameter, requestBody, context).block();
+ }
+
+ /**
+ * virtualMachinesSubmitDeallocate: submitDeallocate for a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response from a deallocate request.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DeallocateResourceOperationResponseInner virtualMachinesSubmitDeallocate(String locationparameter,
+ SubmitDeallocateRequest requestBody) {
+ return virtualMachinesSubmitDeallocateWithResponse(locationparameter, requestBody, Context.NONE).getValue();
+ }
+
+ /**
+ * virtualMachinesSubmitHibernate: submitHibernate for a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response from a Hibernate request along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>
+ virtualMachinesSubmitHibernateWithResponseAsync(String locationparameter, SubmitHibernateRequest requestBody) {
+ 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 (locationparameter == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter locationparameter is required and cannot be null."));
+ }
+ if (requestBody == null) {
+ return Mono.error(new IllegalArgumentException("Parameter requestBody is required and cannot be null."));
+ } else {
+ requestBody.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.virtualMachinesSubmitHibernate(this.client.getEndpoint(),
+ this.client.getApiVersion(), this.client.getSubscriptionId(), locationparameter, requestBody, accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * virtualMachinesSubmitHibernate: submitHibernate for a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response from a Hibernate request along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> virtualMachinesSubmitHibernateWithResponseAsync(
+ String locationparameter, SubmitHibernateRequest requestBody, 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 (locationparameter == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter locationparameter is required and cannot be null."));
+ }
+ if (requestBody == null) {
+ return Mono.error(new IllegalArgumentException("Parameter requestBody is required and cannot be null."));
+ } else {
+ requestBody.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.virtualMachinesSubmitHibernate(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), locationparameter, requestBody, accept, context);
+ }
+
+ /**
+ * virtualMachinesSubmitHibernate: submitHibernate for a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response from a Hibernate request on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono virtualMachinesSubmitHibernateAsync(String locationparameter,
+ SubmitHibernateRequest requestBody) {
+ return virtualMachinesSubmitHibernateWithResponseAsync(locationparameter, requestBody)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * virtualMachinesSubmitHibernate: submitHibernate for a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response from a Hibernate request along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response virtualMachinesSubmitHibernateWithResponse(
+ String locationparameter, SubmitHibernateRequest requestBody, Context context) {
+ return virtualMachinesSubmitHibernateWithResponseAsync(locationparameter, requestBody, context).block();
+ }
+
+ /**
+ * virtualMachinesSubmitHibernate: submitHibernate for a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response from a Hibernate request.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public HibernateResourceOperationResponseInner virtualMachinesSubmitHibernate(String locationparameter,
+ SubmitHibernateRequest requestBody) {
+ return virtualMachinesSubmitHibernateWithResponse(locationparameter, requestBody, Context.NONE).getValue();
+ }
+
+ /**
+ * virtualMachinesSubmitStart: submitStart for a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response from a start request along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>
+ virtualMachinesSubmitStartWithResponseAsync(String locationparameter, SubmitStartRequest requestBody) {
+ 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 (locationparameter == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter locationparameter is required and cannot be null."));
+ }
+ if (requestBody == null) {
+ return Mono.error(new IllegalArgumentException("Parameter requestBody is required and cannot be null."));
+ } else {
+ requestBody.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.virtualMachinesSubmitStart(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), locationparameter, requestBody, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * virtualMachinesSubmitStart: submitStart for a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response from a start request along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> virtualMachinesSubmitStartWithResponseAsync(
+ String locationparameter, SubmitStartRequest requestBody, 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 (locationparameter == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter locationparameter is required and cannot be null."));
+ }
+ if (requestBody == null) {
+ return Mono.error(new IllegalArgumentException("Parameter requestBody is required and cannot be null."));
+ } else {
+ requestBody.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.virtualMachinesSubmitStart(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), locationparameter, requestBody, accept, context);
+ }
+
+ /**
+ * virtualMachinesSubmitStart: submitStart for a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response from a start request on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono virtualMachinesSubmitStartAsync(String locationparameter,
+ SubmitStartRequest requestBody) {
+ return virtualMachinesSubmitStartWithResponseAsync(locationparameter, requestBody)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * virtualMachinesSubmitStart: submitStart for a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response from a start request along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response virtualMachinesSubmitStartWithResponse(
+ String locationparameter, SubmitStartRequest requestBody, Context context) {
+ return virtualMachinesSubmitStartWithResponseAsync(locationparameter, requestBody, context).block();
+ }
+
+ /**
+ * virtualMachinesSubmitStart: submitStart for a virtual machine.
+ *
+ * @param locationparameter The location name.
+ * @param requestBody The request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response from a start request.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public StartResourceOperationResponseInner virtualMachinesSubmitStart(String locationparameter,
+ SubmitStartRequest requestBody) {
+ return virtualMachinesSubmitStartWithResponse(locationparameter, requestBody, Context.NONE).getValue();
+ }
+}
diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/ScheduledActionsImpl.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/ScheduledActionsImpl.java
new file mode 100644
index 000000000000..e0ce1cc71e9d
--- /dev/null
+++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/ScheduledActionsImpl.java
@@ -0,0 +1,262 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.computeschedule.implementation;
+
+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.computeschedule.fluent.ScheduledActionsClient;
+import com.azure.resourcemanager.computeschedule.fluent.models.CancelOperationsResponseInner;
+import com.azure.resourcemanager.computeschedule.fluent.models.DeallocateResourceOperationResponseInner;
+import com.azure.resourcemanager.computeschedule.fluent.models.GetOperationErrorsResponseInner;
+import com.azure.resourcemanager.computeschedule.fluent.models.GetOperationStatusResponseInner;
+import com.azure.resourcemanager.computeschedule.fluent.models.HibernateResourceOperationResponseInner;
+import com.azure.resourcemanager.computeschedule.fluent.models.StartResourceOperationResponseInner;
+import com.azure.resourcemanager.computeschedule.models.CancelOperationsRequest;
+import com.azure.resourcemanager.computeschedule.models.CancelOperationsResponse;
+import com.azure.resourcemanager.computeschedule.models.DeallocateResourceOperationResponse;
+import com.azure.resourcemanager.computeschedule.models.ExecuteDeallocateRequest;
+import com.azure.resourcemanager.computeschedule.models.ExecuteHibernateRequest;
+import com.azure.resourcemanager.computeschedule.models.ExecuteStartRequest;
+import com.azure.resourcemanager.computeschedule.models.GetOperationErrorsRequest;
+import com.azure.resourcemanager.computeschedule.models.GetOperationErrorsResponse;
+import com.azure.resourcemanager.computeschedule.models.GetOperationStatusRequest;
+import com.azure.resourcemanager.computeschedule.models.GetOperationStatusResponse;
+import com.azure.resourcemanager.computeschedule.models.HibernateResourceOperationResponse;
+import com.azure.resourcemanager.computeschedule.models.ScheduledActions;
+import com.azure.resourcemanager.computeschedule.models.StartResourceOperationResponse;
+import com.azure.resourcemanager.computeschedule.models.SubmitDeallocateRequest;
+import com.azure.resourcemanager.computeschedule.models.SubmitHibernateRequest;
+import com.azure.resourcemanager.computeschedule.models.SubmitStartRequest;
+
+public final class ScheduledActionsImpl implements ScheduledActions {
+ private static final ClientLogger LOGGER = new ClientLogger(ScheduledActionsImpl.class);
+
+ private final ScheduledActionsClient innerClient;
+
+ private final com.azure.resourcemanager.computeschedule.ComputescheduleManager serviceManager;
+
+ public ScheduledActionsImpl(ScheduledActionsClient innerClient,
+ com.azure.resourcemanager.computeschedule.ComputescheduleManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response virtualMachinesCancelOperationsWithResponse(String locationparameter,
+ CancelOperationsRequest requestBody, Context context) {
+ Response inner
+ = this.serviceClient().virtualMachinesCancelOperationsWithResponse(locationparameter, requestBody, context);
+ if (inner != null) {
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new CancelOperationsResponseImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public CancelOperationsResponse virtualMachinesCancelOperations(String locationparameter,
+ CancelOperationsRequest requestBody) {
+ CancelOperationsResponseInner inner
+ = this.serviceClient().virtualMachinesCancelOperations(locationparameter, requestBody);
+ if (inner != null) {
+ return new CancelOperationsResponseImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response virtualMachinesExecuteDeallocateWithResponse(
+ String locationparameter, ExecuteDeallocateRequest requestBody, Context context) {
+ Response inner = this.serviceClient()
+ .virtualMachinesExecuteDeallocateWithResponse(locationparameter, requestBody, context);
+ if (inner != null) {
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new DeallocateResourceOperationResponseImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public DeallocateResourceOperationResponse virtualMachinesExecuteDeallocate(String locationparameter,
+ ExecuteDeallocateRequest requestBody) {
+ DeallocateResourceOperationResponseInner inner
+ = this.serviceClient().virtualMachinesExecuteDeallocate(locationparameter, requestBody);
+ if (inner != null) {
+ return new DeallocateResourceOperationResponseImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response virtualMachinesExecuteHibernateWithResponse(
+ String locationparameter, ExecuteHibernateRequest requestBody, Context context) {
+ Response inner
+ = this.serviceClient().virtualMachinesExecuteHibernateWithResponse(locationparameter, requestBody, context);
+ if (inner != null) {
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new HibernateResourceOperationResponseImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public HibernateResourceOperationResponse virtualMachinesExecuteHibernate(String locationparameter,
+ ExecuteHibernateRequest requestBody) {
+ HibernateResourceOperationResponseInner inner
+ = this.serviceClient().virtualMachinesExecuteHibernate(locationparameter, requestBody);
+ if (inner != null) {
+ return new HibernateResourceOperationResponseImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response virtualMachinesExecuteStartWithResponse(String locationparameter,
+ ExecuteStartRequest requestBody, Context context) {
+ Response inner
+ = this.serviceClient().virtualMachinesExecuteStartWithResponse(locationparameter, requestBody, context);
+ if (inner != null) {
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new StartResourceOperationResponseImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public StartResourceOperationResponse virtualMachinesExecuteStart(String locationparameter,
+ ExecuteStartRequest requestBody) {
+ StartResourceOperationResponseInner inner
+ = this.serviceClient().virtualMachinesExecuteStart(locationparameter, requestBody);
+ if (inner != null) {
+ return new StartResourceOperationResponseImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response virtualMachinesGetOperationErrorsWithResponse(String locationparameter,
+ GetOperationErrorsRequest requestBody, Context context) {
+ Response inner = this.serviceClient()
+ .virtualMachinesGetOperationErrorsWithResponse(locationparameter, requestBody, context);
+ if (inner != null) {
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new GetOperationErrorsResponseImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public GetOperationErrorsResponse virtualMachinesGetOperationErrors(String locationparameter,
+ GetOperationErrorsRequest requestBody) {
+ GetOperationErrorsResponseInner inner
+ = this.serviceClient().virtualMachinesGetOperationErrors(locationparameter, requestBody);
+ if (inner != null) {
+ return new GetOperationErrorsResponseImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response virtualMachinesGetOperationStatusWithResponse(String locationparameter,
+ GetOperationStatusRequest requestBody, Context context) {
+ Response inner = this.serviceClient()
+ .virtualMachinesGetOperationStatusWithResponse(locationparameter, requestBody, context);
+ if (inner != null) {
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new GetOperationStatusResponseImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public GetOperationStatusResponse virtualMachinesGetOperationStatus(String locationparameter,
+ GetOperationStatusRequest requestBody) {
+ GetOperationStatusResponseInner inner
+ = this.serviceClient().virtualMachinesGetOperationStatus(locationparameter, requestBody);
+ if (inner != null) {
+ return new GetOperationStatusResponseImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response virtualMachinesSubmitDeallocateWithResponse(
+ String locationparameter, SubmitDeallocateRequest requestBody, Context context) {
+ Response inner
+ = this.serviceClient().virtualMachinesSubmitDeallocateWithResponse(locationparameter, requestBody, context);
+ if (inner != null) {
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new DeallocateResourceOperationResponseImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public DeallocateResourceOperationResponse virtualMachinesSubmitDeallocate(String locationparameter,
+ SubmitDeallocateRequest requestBody) {
+ DeallocateResourceOperationResponseInner inner
+ = this.serviceClient().virtualMachinesSubmitDeallocate(locationparameter, requestBody);
+ if (inner != null) {
+ return new DeallocateResourceOperationResponseImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response virtualMachinesSubmitHibernateWithResponse(
+ String locationparameter, SubmitHibernateRequest requestBody, Context context) {
+ Response inner
+ = this.serviceClient().virtualMachinesSubmitHibernateWithResponse(locationparameter, requestBody, context);
+ if (inner != null) {
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new HibernateResourceOperationResponseImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public HibernateResourceOperationResponse virtualMachinesSubmitHibernate(String locationparameter,
+ SubmitHibernateRequest requestBody) {
+ HibernateResourceOperationResponseInner inner
+ = this.serviceClient().virtualMachinesSubmitHibernate(locationparameter, requestBody);
+ if (inner != null) {
+ return new HibernateResourceOperationResponseImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response virtualMachinesSubmitStartWithResponse(String locationparameter,
+ SubmitStartRequest requestBody, Context context) {
+ Response inner
+ = this.serviceClient().virtualMachinesSubmitStartWithResponse(locationparameter, requestBody, context);
+ if (inner != null) {
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new StartResourceOperationResponseImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public StartResourceOperationResponse virtualMachinesSubmitStart(String locationparameter,
+ SubmitStartRequest requestBody) {
+ StartResourceOperationResponseInner inner
+ = this.serviceClient().virtualMachinesSubmitStart(locationparameter, requestBody);
+ if (inner != null) {
+ return new StartResourceOperationResponseImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ private ScheduledActionsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.computeschedule.ComputescheduleManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/StartResourceOperationResponseImpl.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/StartResourceOperationResponseImpl.java
new file mode 100644
index 000000000000..cab53c5f9370
--- /dev/null
+++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/StartResourceOperationResponseImpl.java
@@ -0,0 +1,52 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.computeschedule.implementation;
+
+import com.azure.resourcemanager.computeschedule.fluent.models.StartResourceOperationResponseInner;
+import com.azure.resourcemanager.computeschedule.models.ResourceOperation;
+import com.azure.resourcemanager.computeschedule.models.StartResourceOperationResponse;
+import java.util.Collections;
+import java.util.List;
+
+public final class StartResourceOperationResponseImpl implements StartResourceOperationResponse {
+ private StartResourceOperationResponseInner innerObject;
+
+ private final com.azure.resourcemanager.computeschedule.ComputescheduleManager serviceManager;
+
+ StartResourceOperationResponseImpl(StartResourceOperationResponseInner innerObject,
+ com.azure.resourcemanager.computeschedule.ComputescheduleManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String description() {
+ return this.innerModel().description();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public String location() {
+ return this.innerModel().location();
+ }
+
+ public List results() {
+ List inner = this.innerModel().results();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public StartResourceOperationResponseInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.computeschedule.ComputescheduleManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/package-info.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/package-info.java
new file mode 100644
index 000000000000..16a9d9c30e40
--- /dev/null
+++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/implementation/package-info.java
@@ -0,0 +1,9 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/**
+ * Package containing the implementations for MicrosoftComputeSchedule.
+ * Microsoft.ComputeSchedule Resource Provider management API.
+ */
+package com.azure.resourcemanager.computeschedule.implementation;
diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ActionType.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ActionType.java
new file mode 100644
index 000000000000..c871ae61f436
--- /dev/null
+++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ActionType.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.computeschedule.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import java.util.Collection;
+
+/**
+ * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
+ */
+public final class ActionType extends ExpandableStringEnum {
+ /**
+ * Static value Internal for ActionType.
+ */
+ public static final ActionType INTERNAL = fromString("Internal");
+
+ /**
+ * Creates a new instance of ActionType value.
+ *
+ * @deprecated Use the {@link #fromString(String)} factory method.
+ */
+ @Deprecated
+ public ActionType() {
+ }
+
+ /**
+ * Creates or finds a ActionType from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding ActionType.
+ */
+ public static ActionType fromString(String name) {
+ return fromString(name, ActionType.class);
+ }
+
+ /**
+ * Gets known ActionType values.
+ *
+ * @return known ActionType values.
+ */
+ public static Collection values() {
+ return values(ActionType.class);
+ }
+}
diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/CancelOperationsRequest.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/CancelOperationsRequest.java
new file mode 100644
index 000000000000..04683cdd5c10
--- /dev/null
+++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/CancelOperationsRequest.java
@@ -0,0 +1,137 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.computeschedule.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * This is the request to cancel running operations in scheduled actions using the operation ids.
+ */
+@Fluent
+public final class CancelOperationsRequest implements JsonSerializable {
+ /*
+ * The list of operation ids to cancel operations on
+ */
+ private List operationIds;
+
+ /*
+ * Correlationid item
+ */
+ private String correlationid;
+
+ /**
+ * Creates an instance of CancelOperationsRequest class.
+ */
+ public CancelOperationsRequest() {
+ }
+
+ /**
+ * Get the operationIds property: The list of operation ids to cancel operations on.
+ *
+ * @return the operationIds value.
+ */
+ public List operationIds() {
+ return this.operationIds;
+ }
+
+ /**
+ * Set the operationIds property: The list of operation ids to cancel operations on.
+ *
+ * @param operationIds the operationIds value to set.
+ * @return the CancelOperationsRequest object itself.
+ */
+ public CancelOperationsRequest withOperationIds(List operationIds) {
+ this.operationIds = operationIds;
+ return this;
+ }
+
+ /**
+ * Get the correlationid property: Correlationid item.
+ *
+ * @return the correlationid value.
+ */
+ public String correlationid() {
+ return this.correlationid;
+ }
+
+ /**
+ * Set the correlationid property: Correlationid item.
+ *
+ * @param correlationid the correlationid value to set.
+ * @return the CancelOperationsRequest object itself.
+ */
+ public CancelOperationsRequest withCorrelationid(String correlationid) {
+ this.correlationid = correlationid;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (operationIds() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property operationIds in model CancelOperationsRequest"));
+ }
+ if (correlationid() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property correlationid in model CancelOperationsRequest"));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(CancelOperationsRequest.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeArrayField("operationIds", this.operationIds, (writer, element) -> writer.writeString(element));
+ jsonWriter.writeStringField("correlationid", this.correlationid);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of CancelOperationsRequest from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of CancelOperationsRequest if the JsonReader was pointing to an instance of it, or null if it
+ * was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the CancelOperationsRequest.
+ */
+ public static CancelOperationsRequest fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ CancelOperationsRequest deserializedCancelOperationsRequest = new CancelOperationsRequest();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("operationIds".equals(fieldName)) {
+ List operationIds = reader.readArray(reader1 -> reader1.getString());
+ deserializedCancelOperationsRequest.operationIds = operationIds;
+ } else if ("correlationid".equals(fieldName)) {
+ deserializedCancelOperationsRequest.correlationid = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedCancelOperationsRequest;
+ });
+ }
+}
diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/CancelOperationsResponse.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/CancelOperationsResponse.java
new file mode 100644
index 000000000000..658b5cf6ad89
--- /dev/null
+++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/CancelOperationsResponse.java
@@ -0,0 +1,27 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.computeschedule.models;
+
+import com.azure.resourcemanager.computeschedule.fluent.models.CancelOperationsResponseInner;
+import java.util.List;
+
+/**
+ * An immutable client-side representation of CancelOperationsResponse.
+ */
+public interface CancelOperationsResponse {
+ /**
+ * Gets the results property: An array of resource operations that were successfully cancelled.
+ *
+ * @return the results value.
+ */
+ List results();
+
+ /**
+ * Gets the inner com.azure.resourcemanager.computeschedule.fluent.models.CancelOperationsResponseInner object.
+ *
+ * @return the inner object.
+ */
+ CancelOperationsResponseInner innerModel();
+}
diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DeadlineType.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DeadlineType.java
new file mode 100644
index 000000000000..8e699f802950
--- /dev/null
+++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DeadlineType.java
@@ -0,0 +1,56 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.computeschedule.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import java.util.Collection;
+
+/**
+ * The types of deadlines supported by ScheduledActions.
+ */
+public final class DeadlineType extends ExpandableStringEnum {
+ /**
+ * Static value Unknown for DeadlineType.
+ */
+ public static final DeadlineType UNKNOWN = fromString("Unknown");
+
+ /**
+ * Static value InitiateAt for DeadlineType.
+ */
+ public static final DeadlineType INITIATE_AT = fromString("InitiateAt");
+
+ /**
+ * Static value CompleteBy for DeadlineType.
+ */
+ public static final DeadlineType COMPLETE_BY = fromString("CompleteBy");
+
+ /**
+ * Creates a new instance of DeadlineType value.
+ *
+ * @deprecated Use the {@link #fromString(String)} factory method.
+ */
+ @Deprecated
+ public DeadlineType() {
+ }
+
+ /**
+ * Creates or finds a DeadlineType from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding DeadlineType.
+ */
+ public static DeadlineType fromString(String name) {
+ return fromString(name, DeadlineType.class);
+ }
+
+ /**
+ * Gets known DeadlineType values.
+ *
+ * @return known DeadlineType values.
+ */
+ public static Collection values() {
+ return values(DeadlineType.class);
+ }
+}
diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DeallocateResourceOperationResponse.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DeallocateResourceOperationResponse.java
new file mode 100644
index 000000000000..9b44ed3b56e4
--- /dev/null
+++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/DeallocateResourceOperationResponse.java
@@ -0,0 +1,49 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.computeschedule.models;
+
+import com.azure.resourcemanager.computeschedule.fluent.models.DeallocateResourceOperationResponseInner;
+import java.util.List;
+
+/**
+ * An immutable client-side representation of DeallocateResourceOperationResponse.
+ */
+public interface DeallocateResourceOperationResponse {
+ /**
+ * Gets the description property: The description of the operation response.
+ *
+ * @return the description value.
+ */
+ String description();
+
+ /**
+ * Gets the type property: The type of resources used in the deallocate request eg virtual machines.
+ *
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * Gets the location property: The location of the deallocate request eg westus.
+ *
+ * @return the location value.
+ */
+ String location();
+
+ /**
+ * Gets the results property: The results from the deallocate request if no errors exist.
+ *
+ * @return the results value.
+ */
+ List results();
+
+ /**
+ * Gets the inner com.azure.resourcemanager.computeschedule.fluent.models.DeallocateResourceOperationResponseInner
+ * object.
+ *
+ * @return the inner object.
+ */
+ DeallocateResourceOperationResponseInner innerModel();
+}
diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteDeallocateRequest.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteDeallocateRequest.java
new file mode 100644
index 000000000000..a3c1ce0cc5ec
--- /dev/null
+++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteDeallocateRequest.java
@@ -0,0 +1,172 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.computeschedule.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * The ExecuteDeallocateRequest request for executeDeallocate operations.
+ */
+@Fluent
+public final class ExecuteDeallocateRequest implements JsonSerializable {
+ /*
+ * The execution parameters for the request
+ */
+ private ExecutionParameters executionParameters;
+
+ /*
+ * The resources for the request
+ */
+ private Resources resources;
+
+ /*
+ * Correlationid item
+ */
+ private String correlationid;
+
+ /**
+ * Creates an instance of ExecuteDeallocateRequest class.
+ */
+ public ExecuteDeallocateRequest() {
+ }
+
+ /**
+ * Get the executionParameters property: The execution parameters for the request.
+ *
+ * @return the executionParameters value.
+ */
+ public ExecutionParameters executionParameters() {
+ return this.executionParameters;
+ }
+
+ /**
+ * Set the executionParameters property: The execution parameters for the request.
+ *
+ * @param executionParameters the executionParameters value to set.
+ * @return the ExecuteDeallocateRequest object itself.
+ */
+ public ExecuteDeallocateRequest withExecutionParameters(ExecutionParameters executionParameters) {
+ this.executionParameters = executionParameters;
+ return this;
+ }
+
+ /**
+ * Get the resources property: The resources for the request.
+ *
+ * @return the resources value.
+ */
+ public Resources resources() {
+ return this.resources;
+ }
+
+ /**
+ * Set the resources property: The resources for the request.
+ *
+ * @param resources the resources value to set.
+ * @return the ExecuteDeallocateRequest object itself.
+ */
+ public ExecuteDeallocateRequest withResources(Resources resources) {
+ this.resources = resources;
+ return this;
+ }
+
+ /**
+ * Get the correlationid property: Correlationid item.
+ *
+ * @return the correlationid value.
+ */
+ public String correlationid() {
+ return this.correlationid;
+ }
+
+ /**
+ * Set the correlationid property: Correlationid item.
+ *
+ * @param correlationid the correlationid value to set.
+ * @return the ExecuteDeallocateRequest object itself.
+ */
+ public ExecuteDeallocateRequest withCorrelationid(String correlationid) {
+ this.correlationid = correlationid;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (executionParameters() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property executionParameters in model ExecuteDeallocateRequest"));
+ } else {
+ executionParameters().validate();
+ }
+ if (resources() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property resources in model ExecuteDeallocateRequest"));
+ } else {
+ resources().validate();
+ }
+ if (correlationid() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property correlationid in model ExecuteDeallocateRequest"));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(ExecuteDeallocateRequest.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("executionParameters", this.executionParameters);
+ jsonWriter.writeJsonField("resources", this.resources);
+ jsonWriter.writeStringField("correlationid", this.correlationid);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ExecuteDeallocateRequest from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ExecuteDeallocateRequest if the JsonReader was pointing to an instance of it, or null if
+ * it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ExecuteDeallocateRequest.
+ */
+ public static ExecuteDeallocateRequest fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ExecuteDeallocateRequest deserializedExecuteDeallocateRequest = new ExecuteDeallocateRequest();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("executionParameters".equals(fieldName)) {
+ deserializedExecuteDeallocateRequest.executionParameters = ExecutionParameters.fromJson(reader);
+ } else if ("resources".equals(fieldName)) {
+ deserializedExecuteDeallocateRequest.resources = Resources.fromJson(reader);
+ } else if ("correlationid".equals(fieldName)) {
+ deserializedExecuteDeallocateRequest.correlationid = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedExecuteDeallocateRequest;
+ });
+ }
+}
diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteHibernateRequest.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteHibernateRequest.java
new file mode 100644
index 000000000000..5686a7f39d02
--- /dev/null
+++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteHibernateRequest.java
@@ -0,0 +1,172 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.computeschedule.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * The ExecuteHibernateRequest request for executeHibernate operations.
+ */
+@Fluent
+public final class ExecuteHibernateRequest implements JsonSerializable {
+ /*
+ * The execution parameters for the request
+ */
+ private ExecutionParameters executionParameters;
+
+ /*
+ * The resources for the request
+ */
+ private Resources resources;
+
+ /*
+ * Correlationid item
+ */
+ private String correlationid;
+
+ /**
+ * Creates an instance of ExecuteHibernateRequest class.
+ */
+ public ExecuteHibernateRequest() {
+ }
+
+ /**
+ * Get the executionParameters property: The execution parameters for the request.
+ *
+ * @return the executionParameters value.
+ */
+ public ExecutionParameters executionParameters() {
+ return this.executionParameters;
+ }
+
+ /**
+ * Set the executionParameters property: The execution parameters for the request.
+ *
+ * @param executionParameters the executionParameters value to set.
+ * @return the ExecuteHibernateRequest object itself.
+ */
+ public ExecuteHibernateRequest withExecutionParameters(ExecutionParameters executionParameters) {
+ this.executionParameters = executionParameters;
+ return this;
+ }
+
+ /**
+ * Get the resources property: The resources for the request.
+ *
+ * @return the resources value.
+ */
+ public Resources resources() {
+ return this.resources;
+ }
+
+ /**
+ * Set the resources property: The resources for the request.
+ *
+ * @param resources the resources value to set.
+ * @return the ExecuteHibernateRequest object itself.
+ */
+ public ExecuteHibernateRequest withResources(Resources resources) {
+ this.resources = resources;
+ return this;
+ }
+
+ /**
+ * Get the correlationid property: Correlationid item.
+ *
+ * @return the correlationid value.
+ */
+ public String correlationid() {
+ return this.correlationid;
+ }
+
+ /**
+ * Set the correlationid property: Correlationid item.
+ *
+ * @param correlationid the correlationid value to set.
+ * @return the ExecuteHibernateRequest object itself.
+ */
+ public ExecuteHibernateRequest withCorrelationid(String correlationid) {
+ this.correlationid = correlationid;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (executionParameters() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property executionParameters in model ExecuteHibernateRequest"));
+ } else {
+ executionParameters().validate();
+ }
+ if (resources() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property resources in model ExecuteHibernateRequest"));
+ } else {
+ resources().validate();
+ }
+ if (correlationid() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property correlationid in model ExecuteHibernateRequest"));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(ExecuteHibernateRequest.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("executionParameters", this.executionParameters);
+ jsonWriter.writeJsonField("resources", this.resources);
+ jsonWriter.writeStringField("correlationid", this.correlationid);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ExecuteHibernateRequest from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ExecuteHibernateRequest if the JsonReader was pointing to an instance of it, or null if it
+ * was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ExecuteHibernateRequest.
+ */
+ public static ExecuteHibernateRequest fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ExecuteHibernateRequest deserializedExecuteHibernateRequest = new ExecuteHibernateRequest();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("executionParameters".equals(fieldName)) {
+ deserializedExecuteHibernateRequest.executionParameters = ExecutionParameters.fromJson(reader);
+ } else if ("resources".equals(fieldName)) {
+ deserializedExecuteHibernateRequest.resources = Resources.fromJson(reader);
+ } else if ("correlationid".equals(fieldName)) {
+ deserializedExecuteHibernateRequest.correlationid = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedExecuteHibernateRequest;
+ });
+ }
+}
diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteStartRequest.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteStartRequest.java
new file mode 100644
index 000000000000..065b5e497070
--- /dev/null
+++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExecuteStartRequest.java
@@ -0,0 +1,171 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.computeschedule.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * The ExecuteStartRequest request for executeStart operations.
+ */
+@Fluent
+public final class ExecuteStartRequest implements JsonSerializable {
+ /*
+ * The execution parameters for the request
+ */
+ private ExecutionParameters executionParameters;
+
+ /*
+ * The resources for the request
+ */
+ private Resources resources;
+
+ /*
+ * Correlationid item
+ */
+ private String correlationid;
+
+ /**
+ * Creates an instance of ExecuteStartRequest class.
+ */
+ public ExecuteStartRequest() {
+ }
+
+ /**
+ * Get the executionParameters property: The execution parameters for the request.
+ *
+ * @return the executionParameters value.
+ */
+ public ExecutionParameters executionParameters() {
+ return this.executionParameters;
+ }
+
+ /**
+ * Set the executionParameters property: The execution parameters for the request.
+ *
+ * @param executionParameters the executionParameters value to set.
+ * @return the ExecuteStartRequest object itself.
+ */
+ public ExecuteStartRequest withExecutionParameters(ExecutionParameters executionParameters) {
+ this.executionParameters = executionParameters;
+ return this;
+ }
+
+ /**
+ * Get the resources property: The resources for the request.
+ *
+ * @return the resources value.
+ */
+ public Resources resources() {
+ return this.resources;
+ }
+
+ /**
+ * Set the resources property: The resources for the request.
+ *
+ * @param resources the resources value to set.
+ * @return the ExecuteStartRequest object itself.
+ */
+ public ExecuteStartRequest withResources(Resources resources) {
+ this.resources = resources;
+ return this;
+ }
+
+ /**
+ * Get the correlationid property: Correlationid item.
+ *
+ * @return the correlationid value.
+ */
+ public String correlationid() {
+ return this.correlationid;
+ }
+
+ /**
+ * Set the correlationid property: Correlationid item.
+ *
+ * @param correlationid the correlationid value to set.
+ * @return the ExecuteStartRequest object itself.
+ */
+ public ExecuteStartRequest withCorrelationid(String correlationid) {
+ this.correlationid = correlationid;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (executionParameters() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property executionParameters in model ExecuteStartRequest"));
+ } else {
+ executionParameters().validate();
+ }
+ if (resources() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Missing required property resources in model ExecuteStartRequest"));
+ } else {
+ resources().validate();
+ }
+ if (correlationid() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property correlationid in model ExecuteStartRequest"));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(ExecuteStartRequest.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("executionParameters", this.executionParameters);
+ jsonWriter.writeJsonField("resources", this.resources);
+ jsonWriter.writeStringField("correlationid", this.correlationid);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ExecuteStartRequest from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ExecuteStartRequest if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ExecuteStartRequest.
+ */
+ public static ExecuteStartRequest fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ExecuteStartRequest deserializedExecuteStartRequest = new ExecuteStartRequest();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("executionParameters".equals(fieldName)) {
+ deserializedExecuteStartRequest.executionParameters = ExecutionParameters.fromJson(reader);
+ } else if ("resources".equals(fieldName)) {
+ deserializedExecuteStartRequest.resources = Resources.fromJson(reader);
+ } else if ("correlationid".equals(fieldName)) {
+ deserializedExecuteStartRequest.correlationid = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedExecuteStartRequest;
+ });
+ }
+}
diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExecutionParameters.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExecutionParameters.java
new file mode 100644
index 000000000000..02700d07aa01
--- /dev/null
+++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ExecutionParameters.java
@@ -0,0 +1,126 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.computeschedule.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * Extra details needed to run the user's request.
+ */
+@Fluent
+public final class ExecutionParameters implements JsonSerializable {
+ /*
+ * Details that could optimize the user's request
+ */
+ private OptimizationPreference optimizationPreference;
+
+ /*
+ * Retry policy the user can pass
+ */
+ private RetryPolicy retryPolicy;
+
+ /**
+ * Creates an instance of ExecutionParameters class.
+ */
+ public ExecutionParameters() {
+ }
+
+ /**
+ * Get the optimizationPreference property: Details that could optimize the user's request.
+ *
+ * @return the optimizationPreference value.
+ */
+ public OptimizationPreference optimizationPreference() {
+ return this.optimizationPreference;
+ }
+
+ /**
+ * Set the optimizationPreference property: Details that could optimize the user's request.
+ *
+ * @param optimizationPreference the optimizationPreference value to set.
+ * @return the ExecutionParameters object itself.
+ */
+ public ExecutionParameters withOptimizationPreference(OptimizationPreference optimizationPreference) {
+ this.optimizationPreference = optimizationPreference;
+ return this;
+ }
+
+ /**
+ * Get the retryPolicy property: Retry policy the user can pass.
+ *
+ * @return the retryPolicy value.
+ */
+ public RetryPolicy retryPolicy() {
+ return this.retryPolicy;
+ }
+
+ /**
+ * Set the retryPolicy property: Retry policy the user can pass.
+ *
+ * @param retryPolicy the retryPolicy value to set.
+ * @return the ExecutionParameters object itself.
+ */
+ public ExecutionParameters withRetryPolicy(RetryPolicy retryPolicy) {
+ this.retryPolicy = retryPolicy;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (retryPolicy() != null) {
+ retryPolicy().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("optimizationPreference",
+ this.optimizationPreference == null ? null : this.optimizationPreference.toString());
+ jsonWriter.writeJsonField("retryPolicy", this.retryPolicy);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ExecutionParameters from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ExecutionParameters if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IOException If an error occurs while reading the ExecutionParameters.
+ */
+ public static ExecutionParameters fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ExecutionParameters deserializedExecutionParameters = new ExecutionParameters();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("optimizationPreference".equals(fieldName)) {
+ deserializedExecutionParameters.optimizationPreference
+ = OptimizationPreference.fromString(reader.getString());
+ } else if ("retryPolicy".equals(fieldName)) {
+ deserializedExecutionParameters.retryPolicy = RetryPolicy.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedExecutionParameters;
+ });
+ }
+}
diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/GetOperationErrorsRequest.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/GetOperationErrorsRequest.java
new file mode 100644
index 000000000000..1e4012c20d14
--- /dev/null
+++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/GetOperationErrorsRequest.java
@@ -0,0 +1,104 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.computeschedule.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * This is the request to get errors per vm operations.
+ */
+@Fluent
+public final class GetOperationErrorsRequest implements JsonSerializable {
+ /*
+ * The list of operation ids to query errors of
+ */
+ private List operationIds;
+
+ /**
+ * Creates an instance of GetOperationErrorsRequest class.
+ */
+ public GetOperationErrorsRequest() {
+ }
+
+ /**
+ * Get the operationIds property: The list of operation ids to query errors of.
+ *
+ * @return the operationIds value.
+ */
+ public List operationIds() {
+ return this.operationIds;
+ }
+
+ /**
+ * Set the operationIds property: The list of operation ids to query errors of.
+ *
+ * @param operationIds the operationIds value to set.
+ * @return the GetOperationErrorsRequest object itself.
+ */
+ public GetOperationErrorsRequest withOperationIds(List operationIds) {
+ this.operationIds = operationIds;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (operationIds() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property operationIds in model GetOperationErrorsRequest"));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(GetOperationErrorsRequest.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeArrayField("operationIds", this.operationIds, (writer, element) -> writer.writeString(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of GetOperationErrorsRequest from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of GetOperationErrorsRequest if the JsonReader was pointing to an instance of it, or null if
+ * it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the GetOperationErrorsRequest.
+ */
+ public static GetOperationErrorsRequest fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ GetOperationErrorsRequest deserializedGetOperationErrorsRequest = new GetOperationErrorsRequest();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("operationIds".equals(fieldName)) {
+ List operationIds = reader.readArray(reader1 -> reader1.getString());
+ deserializedGetOperationErrorsRequest.operationIds = operationIds;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedGetOperationErrorsRequest;
+ });
+ }
+}
diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/GetOperationErrorsResponse.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/GetOperationErrorsResponse.java
new file mode 100644
index 000000000000..be797c6e11f0
--- /dev/null
+++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/GetOperationErrorsResponse.java
@@ -0,0 +1,27 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.computeschedule.models;
+
+import com.azure.resourcemanager.computeschedule.fluent.models.GetOperationErrorsResponseInner;
+import java.util.List;
+
+/**
+ * An immutable client-side representation of GetOperationErrorsResponse.
+ */
+public interface GetOperationErrorsResponse {
+ /**
+ * Gets the results property: An array of operationids and their corresponding errors if any.
+ *
+ * @return the results value.
+ */
+ List results();
+
+ /**
+ * Gets the inner com.azure.resourcemanager.computeschedule.fluent.models.GetOperationErrorsResponseInner object.
+ *
+ * @return the inner object.
+ */
+ GetOperationErrorsResponseInner innerModel();
+}
diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/GetOperationStatusRequest.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/GetOperationStatusRequest.java
new file mode 100644
index 000000000000..6d6f41f14dda
--- /dev/null
+++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/GetOperationStatusRequest.java
@@ -0,0 +1,137 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.computeschedule.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * This is the request to get operation status using operationids.
+ */
+@Fluent
+public final class GetOperationStatusRequest implements JsonSerializable {
+ /*
+ * The list of operation ids to get the status of
+ */
+ private List operationIds;
+
+ /*
+ * Correlationid item
+ */
+ private String correlationid;
+
+ /**
+ * Creates an instance of GetOperationStatusRequest class.
+ */
+ public GetOperationStatusRequest() {
+ }
+
+ /**
+ * Get the operationIds property: The list of operation ids to get the status of.
+ *
+ * @return the operationIds value.
+ */
+ public List operationIds() {
+ return this.operationIds;
+ }
+
+ /**
+ * Set the operationIds property: The list of operation ids to get the status of.
+ *
+ * @param operationIds the operationIds value to set.
+ * @return the GetOperationStatusRequest object itself.
+ */
+ public GetOperationStatusRequest withOperationIds(List operationIds) {
+ this.operationIds = operationIds;
+ return this;
+ }
+
+ /**
+ * Get the correlationid property: Correlationid item.
+ *
+ * @return the correlationid value.
+ */
+ public String correlationid() {
+ return this.correlationid;
+ }
+
+ /**
+ * Set the correlationid property: Correlationid item.
+ *
+ * @param correlationid the correlationid value to set.
+ * @return the GetOperationStatusRequest object itself.
+ */
+ public GetOperationStatusRequest withCorrelationid(String correlationid) {
+ this.correlationid = correlationid;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (operationIds() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property operationIds in model GetOperationStatusRequest"));
+ }
+ if (correlationid() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property correlationid in model GetOperationStatusRequest"));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(GetOperationStatusRequest.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeArrayField("operationIds", this.operationIds, (writer, element) -> writer.writeString(element));
+ jsonWriter.writeStringField("correlationid", this.correlationid);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of GetOperationStatusRequest from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of GetOperationStatusRequest if the JsonReader was pointing to an instance of it, or null if
+ * it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the GetOperationStatusRequest.
+ */
+ public static GetOperationStatusRequest fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ GetOperationStatusRequest deserializedGetOperationStatusRequest = new GetOperationStatusRequest();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("operationIds".equals(fieldName)) {
+ List operationIds = reader.readArray(reader1 -> reader1.getString());
+ deserializedGetOperationStatusRequest.operationIds = operationIds;
+ } else if ("correlationid".equals(fieldName)) {
+ deserializedGetOperationStatusRequest.correlationid = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedGetOperationStatusRequest;
+ });
+ }
+}
diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/GetOperationStatusResponse.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/GetOperationStatusResponse.java
new file mode 100644
index 000000000000..cf35dd53d703
--- /dev/null
+++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/GetOperationStatusResponse.java
@@ -0,0 +1,27 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.computeschedule.models;
+
+import com.azure.resourcemanager.computeschedule.fluent.models.GetOperationStatusResponseInner;
+import java.util.List;
+
+/**
+ * An immutable client-side representation of GetOperationStatusResponse.
+ */
+public interface GetOperationStatusResponse {
+ /**
+ * Gets the results property: An array of resource operations based on their operation ids.
+ *
+ * @return the results value.
+ */
+ List results();
+
+ /**
+ * Gets the inner com.azure.resourcemanager.computeschedule.fluent.models.GetOperationStatusResponseInner object.
+ *
+ * @return the inner object.
+ */
+ GetOperationStatusResponseInner innerModel();
+}
diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/HibernateResourceOperationResponse.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/HibernateResourceOperationResponse.java
new file mode 100644
index 000000000000..ef6a149eb26d
--- /dev/null
+++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/HibernateResourceOperationResponse.java
@@ -0,0 +1,49 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.computeschedule.models;
+
+import com.azure.resourcemanager.computeschedule.fluent.models.HibernateResourceOperationResponseInner;
+import java.util.List;
+
+/**
+ * An immutable client-side representation of HibernateResourceOperationResponse.
+ */
+public interface HibernateResourceOperationResponse {
+ /**
+ * Gets the description property: The description of the operation response.
+ *
+ * @return the description value.
+ */
+ String description();
+
+ /**
+ * Gets the type property: The type of resources used in the Hibernate request eg virtual machines.
+ *
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * Gets the location property: The location of the Hibernate request eg westus.
+ *
+ * @return the location value.
+ */
+ String location();
+
+ /**
+ * Gets the results property: The results from the Hibernate request if no errors exist.
+ *
+ * @return the results value.
+ */
+ List results();
+
+ /**
+ * Gets the inner com.azure.resourcemanager.computeschedule.fluent.models.HibernateResourceOperationResponseInner
+ * object.
+ *
+ * @return the inner object.
+ */
+ HibernateResourceOperationResponseInner innerModel();
+}
diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/Operation.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/Operation.java
new file mode 100644
index 000000000000..2af05a549413
--- /dev/null
+++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/Operation.java
@@ -0,0 +1,58 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.computeschedule.models;
+
+import com.azure.resourcemanager.computeschedule.fluent.models.OperationInner;
+
+/**
+ * An immutable client-side representation of Operation.
+ */
+public interface Operation {
+ /**
+ * Gets 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.
+ */
+ String name();
+
+ /**
+ * Gets 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.
+ */
+ Boolean isDataAction();
+
+ /**
+ * Gets the display property: Localized display information for this particular operation.
+ *
+ * @return the display value.
+ */
+ OperationDisplay display();
+
+ /**
+ * Gets 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.
+ */
+ Origin origin();
+
+ /**
+ * Gets the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal
+ * only APIs.
+ *
+ * @return the actionType value.
+ */
+ ActionType actionType();
+
+ /**
+ * Gets the inner com.azure.resourcemanager.computeschedule.fluent.models.OperationInner object.
+ *
+ * @return the inner object.
+ */
+ OperationInner innerModel();
+}
diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/OperationDisplay.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/OperationDisplay.java
new file mode 100644
index 000000000000..ba060185c343
--- /dev/null
+++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/OperationDisplay.java
@@ -0,0 +1,136 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.computeschedule.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * Localized display information for this particular operation.
+ */
+@Immutable
+public final class OperationDisplay implements JsonSerializable {
+ /*
+ * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or
+ * "Microsoft Compute".
+ */
+ private String provider;
+
+ /*
+ * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or
+ * "Job Schedule Collections".
+ */
+ private String resource;
+
+ /*
+ * The concise, localized friendly name for the operation; suitable for dropdowns. E.g.
+ * "Create or Update Virtual Machine", "Restart Virtual Machine".
+ */
+ private String operation;
+
+ /*
+ * The short, localized friendly description of the operation; suitable for tool tips and detailed views.
+ */
+ private String description;
+
+ /**
+ * Creates an instance of OperationDisplay class.
+ */
+ public OperationDisplay() {
+ }
+
+ /**
+ * Get the provider property: The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring
+ * Insights" or "Microsoft Compute".
+ *
+ * @return the provider value.
+ */
+ public String provider() {
+ return this.provider;
+ }
+
+ /**
+ * Get the resource property: The localized friendly name of the resource type related to this operation. E.g.
+ * "Virtual Machines" or "Job Schedule Collections".
+ *
+ * @return the resource value.
+ */
+ public String resource() {
+ return this.resource;
+ }
+
+ /**
+ * Get the operation property: The concise, localized friendly name for the operation; suitable for dropdowns. E.g.
+ * "Create or Update Virtual Machine", "Restart Virtual Machine".
+ *
+ * @return the operation value.
+ */
+ public String operation() {
+ return this.operation;
+ }
+
+ /**
+ * Get the description property: The short, localized friendly description of the operation; suitable for tool tips
+ * and detailed views.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of OperationDisplay from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of OperationDisplay if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IOException If an error occurs while reading the OperationDisplay.
+ */
+ public static OperationDisplay fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ OperationDisplay deserializedOperationDisplay = new OperationDisplay();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("provider".equals(fieldName)) {
+ deserializedOperationDisplay.provider = reader.getString();
+ } else if ("resource".equals(fieldName)) {
+ deserializedOperationDisplay.resource = reader.getString();
+ } else if ("operation".equals(fieldName)) {
+ deserializedOperationDisplay.operation = reader.getString();
+ } else if ("description".equals(fieldName)) {
+ deserializedOperationDisplay.description = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedOperationDisplay;
+ });
+ }
+}
diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/OperationErrorDetails.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/OperationErrorDetails.java
new file mode 100644
index 000000000000..750b62912ca2
--- /dev/null
+++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/OperationErrorDetails.java
@@ -0,0 +1,208 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.computeschedule.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.CoreUtils;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+import java.time.OffsetDateTime;
+import java.time.format.DateTimeFormatter;
+
+/**
+ * This defines a list of operation errors associated with a unique operationId.
+ */
+@Fluent
+public final class OperationErrorDetails implements JsonSerializable {
+ /*
+ * The error code of the operation
+ */
+ private String errorCode;
+
+ /*
+ * The error details of the operation
+ */
+ private OffsetDateTime errorDetails;
+
+ /*
+ * The timestamp of the error occurence
+ */
+ private OffsetDateTime timestamp;
+
+ /*
+ * CRP operationid of the operation for deeper analysis
+ */
+ private String crpOperationId;
+
+ /**
+ * Creates an instance of OperationErrorDetails class.
+ */
+ public OperationErrorDetails() {
+ }
+
+ /**
+ * Get the errorCode property: The error code of the operation.
+ *
+ * @return the errorCode value.
+ */
+ public String errorCode() {
+ return this.errorCode;
+ }
+
+ /**
+ * Set the errorCode property: The error code of the operation.
+ *
+ * @param errorCode the errorCode value to set.
+ * @return the OperationErrorDetails object itself.
+ */
+ public OperationErrorDetails withErrorCode(String errorCode) {
+ this.errorCode = errorCode;
+ return this;
+ }
+
+ /**
+ * Get the errorDetails property: The error details of the operation.
+ *
+ * @return the errorDetails value.
+ */
+ public OffsetDateTime errorDetails() {
+ return this.errorDetails;
+ }
+
+ /**
+ * Set the errorDetails property: The error details of the operation.
+ *
+ * @param errorDetails the errorDetails value to set.
+ * @return the OperationErrorDetails object itself.
+ */
+ public OperationErrorDetails withErrorDetails(OffsetDateTime errorDetails) {
+ this.errorDetails = errorDetails;
+ return this;
+ }
+
+ /**
+ * Get the timestamp property: The timestamp of the error occurence.
+ *
+ * @return the timestamp value.
+ */
+ public OffsetDateTime timestamp() {
+ return this.timestamp;
+ }
+
+ /**
+ * Set the timestamp property: The timestamp of the error occurence.
+ *
+ * @param timestamp the timestamp value to set.
+ * @return the OperationErrorDetails object itself.
+ */
+ public OperationErrorDetails withTimestamp(OffsetDateTime timestamp) {
+ this.timestamp = timestamp;
+ return this;
+ }
+
+ /**
+ * Get the crpOperationId property: CRP operationid of the operation for deeper analysis.
+ *
+ * @return the crpOperationId value.
+ */
+ public String crpOperationId() {
+ return this.crpOperationId;
+ }
+
+ /**
+ * Set the crpOperationId property: CRP operationid of the operation for deeper analysis.
+ *
+ * @param crpOperationId the crpOperationId value to set.
+ * @return the OperationErrorDetails object itself.
+ */
+ public OperationErrorDetails withCrpOperationId(String crpOperationId) {
+ this.crpOperationId = crpOperationId;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (errorCode() == null) {
+ throw LOGGER.atError()
+ .log(
+ new IllegalArgumentException("Missing required property errorCode in model OperationErrorDetails"));
+ }
+ if (errorDetails() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property errorDetails in model OperationErrorDetails"));
+ }
+ if (timestamp() == null) {
+ throw LOGGER.atError()
+ .log(
+ new IllegalArgumentException("Missing required property timestamp in model OperationErrorDetails"));
+ }
+ if (crpOperationId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property crpOperationId in model OperationErrorDetails"));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(OperationErrorDetails.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("errorCode", this.errorCode);
+ jsonWriter.writeStringField("errorDetails",
+ this.errorDetails == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.errorDetails));
+ jsonWriter.writeStringField("timeStamp",
+ this.timestamp == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.timestamp));
+ jsonWriter.writeStringField("crpOperationId", this.crpOperationId);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of OperationErrorDetails from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of OperationErrorDetails if the JsonReader was pointing to an instance of it, or null if it
+ * was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the OperationErrorDetails.
+ */
+ public static OperationErrorDetails fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ OperationErrorDetails deserializedOperationErrorDetails = new OperationErrorDetails();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("errorCode".equals(fieldName)) {
+ deserializedOperationErrorDetails.errorCode = reader.getString();
+ } else if ("errorDetails".equals(fieldName)) {
+ deserializedOperationErrorDetails.errorDetails = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else if ("timeStamp".equals(fieldName)) {
+ deserializedOperationErrorDetails.timestamp = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else if ("crpOperationId".equals(fieldName)) {
+ deserializedOperationErrorDetails.crpOperationId = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedOperationErrorDetails;
+ });
+ }
+}
diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/OperationErrorsResult.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/OperationErrorsResult.java
new file mode 100644
index 000000000000..44409e52dc74
--- /dev/null
+++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/OperationErrorsResult.java
@@ -0,0 +1,277 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.computeschedule.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.CoreUtils;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+import java.time.OffsetDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.List;
+
+/**
+ * This is the first level of operation errors from the request when clients get errors per vm operation.
+ */
+@Fluent
+public final class OperationErrorsResult implements JsonSerializable {
+ /*
+ * The operationId identifying a vm operation
+ */
+ private String operationId;
+
+ /*
+ * The creation time of the error result
+ */
+ private OffsetDateTime creationTime;
+
+ /*
+ * The activation time of a vm operation
+ */
+ private OffsetDateTime activationTime;
+
+ /*
+ * The completion time of the operation if the operation was completed
+ */
+ private OffsetDateTime completedAt;
+
+ /*
+ * A list of errors associated with the operationid
+ */
+ private List operationErrors;
+
+ /*
+ * Request level error code
+ */
+ private String requestErrorCode;
+
+ /*
+ * Request level error details
+ */
+ private String requestErrorDetails;
+
+ /**
+ * Creates an instance of OperationErrorsResult class.
+ */
+ public OperationErrorsResult() {
+ }
+
+ /**
+ * Get the operationId property: The operationId identifying a vm operation.
+ *
+ * @return the operationId value.
+ */
+ public String operationId() {
+ return this.operationId;
+ }
+
+ /**
+ * Set the operationId property: The operationId identifying a vm operation.
+ *
+ * @param operationId the operationId value to set.
+ * @return the OperationErrorsResult object itself.
+ */
+ public OperationErrorsResult withOperationId(String operationId) {
+ this.operationId = operationId;
+ return this;
+ }
+
+ /**
+ * Get the creationTime property: The creation time of the error result.
+ *
+ * @return the creationTime value.
+ */
+ public OffsetDateTime creationTime() {
+ return this.creationTime;
+ }
+
+ /**
+ * Set the creationTime property: The creation time of the error result.
+ *
+ * @param creationTime the creationTime value to set.
+ * @return the OperationErrorsResult object itself.
+ */
+ public OperationErrorsResult withCreationTime(OffsetDateTime creationTime) {
+ this.creationTime = creationTime;
+ return this;
+ }
+
+ /**
+ * Get the activationTime property: The activation time of a vm operation.
+ *
+ * @return the activationTime value.
+ */
+ public OffsetDateTime activationTime() {
+ return this.activationTime;
+ }
+
+ /**
+ * Set the activationTime property: The activation time of a vm operation.
+ *
+ * @param activationTime the activationTime value to set.
+ * @return the OperationErrorsResult object itself.
+ */
+ public OperationErrorsResult withActivationTime(OffsetDateTime activationTime) {
+ this.activationTime = activationTime;
+ return this;
+ }
+
+ /**
+ * Get the completedAt property: The completion time of the operation if the operation was completed.
+ *
+ * @return the completedAt value.
+ */
+ public OffsetDateTime completedAt() {
+ return this.completedAt;
+ }
+
+ /**
+ * Set the completedAt property: The completion time of the operation if the operation was completed.
+ *
+ * @param completedAt the completedAt value to set.
+ * @return the OperationErrorsResult object itself.
+ */
+ public OperationErrorsResult withCompletedAt(OffsetDateTime completedAt) {
+ this.completedAt = completedAt;
+ return this;
+ }
+
+ /**
+ * Get the operationErrors property: A list of errors associated with the operationid.
+ *
+ * @return the operationErrors value.
+ */
+ public List operationErrors() {
+ return this.operationErrors;
+ }
+
+ /**
+ * Set the operationErrors property: A list of errors associated with the operationid.
+ *
+ * @param operationErrors the operationErrors value to set.
+ * @return the OperationErrorsResult object itself.
+ */
+ public OperationErrorsResult withOperationErrors(List operationErrors) {
+ this.operationErrors = operationErrors;
+ return this;
+ }
+
+ /**
+ * Get the requestErrorCode property: Request level error code.
+ *
+ * @return the requestErrorCode value.
+ */
+ public String requestErrorCode() {
+ return this.requestErrorCode;
+ }
+
+ /**
+ * Set the requestErrorCode property: Request level error code.
+ *
+ * @param requestErrorCode the requestErrorCode value to set.
+ * @return the OperationErrorsResult object itself.
+ */
+ public OperationErrorsResult withRequestErrorCode(String requestErrorCode) {
+ this.requestErrorCode = requestErrorCode;
+ return this;
+ }
+
+ /**
+ * Get the requestErrorDetails property: Request level error details.
+ *
+ * @return the requestErrorDetails value.
+ */
+ public String requestErrorDetails() {
+ return this.requestErrorDetails;
+ }
+
+ /**
+ * Set the requestErrorDetails property: Request level error details.
+ *
+ * @param requestErrorDetails the requestErrorDetails value to set.
+ * @return the OperationErrorsResult object itself.
+ */
+ public OperationErrorsResult withRequestErrorDetails(String requestErrorDetails) {
+ this.requestErrorDetails = requestErrorDetails;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (operationErrors() != null) {
+ operationErrors().forEach(e -> e.validate());
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("operationId", this.operationId);
+ jsonWriter.writeStringField("creationTime",
+ this.creationTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.creationTime));
+ jsonWriter.writeStringField("activationTime",
+ this.activationTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.activationTime));
+ jsonWriter.writeStringField("completedAt",
+ this.completedAt == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.completedAt));
+ jsonWriter.writeArrayField("operationErrors", this.operationErrors,
+ (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeStringField("requestErrorCode", this.requestErrorCode);
+ jsonWriter.writeStringField("requestErrorDetails", this.requestErrorDetails);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of OperationErrorsResult from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of OperationErrorsResult if the JsonReader was pointing to an instance of it, or null if it
+ * was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the OperationErrorsResult.
+ */
+ public static OperationErrorsResult fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ OperationErrorsResult deserializedOperationErrorsResult = new OperationErrorsResult();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("operationId".equals(fieldName)) {
+ deserializedOperationErrorsResult.operationId = reader.getString();
+ } else if ("creationTime".equals(fieldName)) {
+ deserializedOperationErrorsResult.creationTime = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else if ("activationTime".equals(fieldName)) {
+ deserializedOperationErrorsResult.activationTime = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else if ("completedAt".equals(fieldName)) {
+ deserializedOperationErrorsResult.completedAt = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else if ("operationErrors".equals(fieldName)) {
+ List operationErrors
+ = reader.readArray(reader1 -> OperationErrorDetails.fromJson(reader1));
+ deserializedOperationErrorsResult.operationErrors = operationErrors;
+ } else if ("requestErrorCode".equals(fieldName)) {
+ deserializedOperationErrorsResult.requestErrorCode = reader.getString();
+ } else if ("requestErrorDetails".equals(fieldName)) {
+ deserializedOperationErrorsResult.requestErrorDetails = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedOperationErrorsResult;
+ });
+ }
+}
diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/OperationListResult.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/OperationListResult.java
new file mode 100644
index 000000000000..95b6cf3a7351
--- /dev/null
+++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/OperationListResult.java
@@ -0,0 +1,104 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.computeschedule.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.computeschedule.fluent.models.OperationInner;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of
+ * results.
+ */
+@Immutable
+public final class OperationListResult implements JsonSerializable {
+ /*
+ * List of operations supported by the resource provider
+ */
+ private List value;
+
+ /*
+ * URL to get the next set of operation list results (if there are any).
+ */
+ private String nextLink;
+
+ /**
+ * Creates an instance of OperationListResult class.
+ */
+ public OperationListResult() {
+ }
+
+ /**
+ * Get the value property: List of operations supported by the resource provider.
+ *
+ * @return the value value.
+ */
+ public List value() {
+ return this.value;
+ }
+
+ /**
+ * Get the nextLink property: URL to get the next set of operation list results (if there are any).
+ *
+ * @return the nextLink value.
+ */
+ public String nextLink() {
+ return this.nextLink;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (value() != null) {
+ value().forEach(e -> e.validate());
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of OperationListResult from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of OperationListResult if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IOException If an error occurs while reading the OperationListResult.
+ */
+ public static OperationListResult fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ OperationListResult deserializedOperationListResult = new OperationListResult();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("value".equals(fieldName)) {
+ List value = reader.readArray(reader1 -> OperationInner.fromJson(reader1));
+ deserializedOperationListResult.value = value;
+ } else if ("nextLink".equals(fieldName)) {
+ deserializedOperationListResult.nextLink = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedOperationListResult;
+ });
+ }
+}
diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/OperationState.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/OperationState.java
new file mode 100644
index 000000000000..d7fcc531db95
--- /dev/null
+++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/OperationState.java
@@ -0,0 +1,86 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.computeschedule.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import java.util.Collection;
+
+/**
+ * Values that define the states of operations in Scheduled Actions.
+ */
+public final class OperationState extends ExpandableStringEnum {
+ /**
+ * Static value Unknown for OperationState.
+ */
+ public static final OperationState UNKNOWN = fromString("Unknown");
+
+ /**
+ * Static value PendingScheduling for OperationState.
+ */
+ public static final OperationState PENDING_SCHEDULING = fromString("PendingScheduling");
+
+ /**
+ * Static value Scheduled for OperationState.
+ */
+ public static final OperationState SCHEDULED = fromString("Scheduled");
+
+ /**
+ * Static value PendingExecution for OperationState.
+ */
+ public static final OperationState PENDING_EXECUTION = fromString("PendingExecution");
+
+ /**
+ * Static value Executing for OperationState.
+ */
+ public static final OperationState EXECUTING = fromString("Executing");
+
+ /**
+ * Static value Succeeded for OperationState.
+ */
+ public static final OperationState SUCCEEDED = fromString("Succeeded");
+
+ /**
+ * Static value Failed for OperationState.
+ */
+ public static final OperationState FAILED = fromString("Failed");
+
+ /**
+ * Static value Cancelled for OperationState.
+ */
+ public static final OperationState CANCELLED = fromString("Cancelled");
+
+ /**
+ * Static value Blocked for OperationState.
+ */
+ public static final OperationState BLOCKED = fromString("Blocked");
+
+ /**
+ * Creates a new instance of OperationState value.
+ *
+ * @deprecated Use the {@link #fromString(String)} factory method.
+ */
+ @Deprecated
+ public OperationState() {
+ }
+
+ /**
+ * Creates or finds a OperationState from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding OperationState.
+ */
+ public static OperationState fromString(String name) {
+ return fromString(name, OperationState.class);
+ }
+
+ /**
+ * Gets known OperationState values.
+ *
+ * @return known OperationState values.
+ */
+ public static Collection values() {
+ return values(OperationState.class);
+ }
+}
diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/Operations.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/Operations.java
new file mode 100644
index 000000000000..170a145a244c
--- /dev/null
+++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/Operations.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.computeschedule.models;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+
+/**
+ * Resource collection API of Operations.
+ */
+public interface Operations {
+ /**
+ * List the operations for the provider.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with
+ * {@link PagedIterable}.
+ */
+ PagedIterable list();
+
+ /**
+ * List the operations for the provider.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with
+ * {@link PagedIterable}.
+ */
+ PagedIterable list(Context context);
+}
diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/OptimizationPreference.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/OptimizationPreference.java
new file mode 100644
index 000000000000..37bef359f54e
--- /dev/null
+++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/OptimizationPreference.java
@@ -0,0 +1,56 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.computeschedule.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import java.util.Collection;
+
+/**
+ * The preferences customers can select to optimize their requests to ScheduledActions.
+ */
+public final class OptimizationPreference extends ExpandableStringEnum {
+ /**
+ * Static value Cost for OptimizationPreference.
+ */
+ public static final OptimizationPreference COST = fromString("Cost");
+
+ /**
+ * Static value Availability for OptimizationPreference.
+ */
+ public static final OptimizationPreference AVAILABILITY = fromString("Availability");
+
+ /**
+ * Static value CostAvailabilityBalanced for OptimizationPreference.
+ */
+ public static final OptimizationPreference COST_AVAILABILITY_BALANCED = fromString("CostAvailabilityBalanced");
+
+ /**
+ * Creates a new instance of OptimizationPreference value.
+ *
+ * @deprecated Use the {@link #fromString(String)} factory method.
+ */
+ @Deprecated
+ public OptimizationPreference() {
+ }
+
+ /**
+ * Creates or finds a OptimizationPreference from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding OptimizationPreference.
+ */
+ public static OptimizationPreference fromString(String name) {
+ return fromString(name, OptimizationPreference.class);
+ }
+
+ /**
+ * Gets known OptimizationPreference values.
+ *
+ * @return known OptimizationPreference values.
+ */
+ public static Collection values() {
+ return values(OptimizationPreference.class);
+ }
+}
diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/Origin.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/Origin.java
new file mode 100644
index 000000000000..f8383501a9f9
--- /dev/null
+++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/Origin.java
@@ -0,0 +1,57 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.computeschedule.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import java.util.Collection;
+
+/**
+ * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value
+ * is "user,system".
+ */
+public final class Origin extends ExpandableStringEnum {
+ /**
+ * Static value user for Origin.
+ */
+ public static final Origin USER = fromString("user");
+
+ /**
+ * Static value system for Origin.
+ */
+ public static final Origin SYSTEM = fromString("system");
+
+ /**
+ * Static value user,system for Origin.
+ */
+ public static final Origin USER_SYSTEM = fromString("user,system");
+
+ /**
+ * Creates a new instance of Origin value.
+ *
+ * @deprecated Use the {@link #fromString(String)} factory method.
+ */
+ @Deprecated
+ public Origin() {
+ }
+
+ /**
+ * Creates or finds a Origin from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding Origin.
+ */
+ public static Origin fromString(String name) {
+ return fromString(name, Origin.class);
+ }
+
+ /**
+ * Gets known Origin values.
+ *
+ * @return known Origin values.
+ */
+ public static Collection values() {
+ return values(Origin.class);
+ }
+}
diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceOperation.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceOperation.java
new file mode 100644
index 000000000000..7420efabc17a
--- /dev/null
+++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceOperation.java
@@ -0,0 +1,180 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.computeschedule.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * High level response from an operation on a resource.
+ */
+@Fluent
+public final class ResourceOperation implements JsonSerializable {
+ /*
+ * Unique identifier for the resource involved in the operation, eg ArmId
+ */
+ private String resourceId;
+
+ /*
+ * Resource level error code if it exists
+ */
+ private String errorCode;
+
+ /*
+ * Resource level error details if they exist
+ */
+ private String errorDetails;
+
+ /*
+ * Details of the operation performed on a resource
+ */
+ private ResourceOperationDetails operation;
+
+ /**
+ * Creates an instance of ResourceOperation class.
+ */
+ public ResourceOperation() {
+ }
+
+ /**
+ * Get the resourceId property: Unique identifier for the resource involved in the operation, eg ArmId.
+ *
+ * @return the resourceId value.
+ */
+ public String resourceId() {
+ return this.resourceId;
+ }
+
+ /**
+ * Set the resourceId property: Unique identifier for the resource involved in the operation, eg ArmId.
+ *
+ * @param resourceId the resourceId value to set.
+ * @return the ResourceOperation object itself.
+ */
+ public ResourceOperation withResourceId(String resourceId) {
+ this.resourceId = resourceId;
+ return this;
+ }
+
+ /**
+ * Get the errorCode property: Resource level error code if it exists.
+ *
+ * @return the errorCode value.
+ */
+ public String errorCode() {
+ return this.errorCode;
+ }
+
+ /**
+ * Set the errorCode property: Resource level error code if it exists.
+ *
+ * @param errorCode the errorCode value to set.
+ * @return the ResourceOperation object itself.
+ */
+ public ResourceOperation withErrorCode(String errorCode) {
+ this.errorCode = errorCode;
+ return this;
+ }
+
+ /**
+ * Get the errorDetails property: Resource level error details if they exist.
+ *
+ * @return the errorDetails value.
+ */
+ public String errorDetails() {
+ return this.errorDetails;
+ }
+
+ /**
+ * Set the errorDetails property: Resource level error details if they exist.
+ *
+ * @param errorDetails the errorDetails value to set.
+ * @return the ResourceOperation object itself.
+ */
+ public ResourceOperation withErrorDetails(String errorDetails) {
+ this.errorDetails = errorDetails;
+ return this;
+ }
+
+ /**
+ * Get the operation property: Details of the operation performed on a resource.
+ *
+ * @return the operation value.
+ */
+ public ResourceOperationDetails operation() {
+ return this.operation;
+ }
+
+ /**
+ * Set the operation property: Details of the operation performed on a resource.
+ *
+ * @param operation the operation value to set.
+ * @return the ResourceOperation object itself.
+ */
+ public ResourceOperation withOperation(ResourceOperationDetails operation) {
+ this.operation = operation;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (operation() != null) {
+ operation().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("resourceId", this.resourceId);
+ jsonWriter.writeStringField("errorCode", this.errorCode);
+ jsonWriter.writeStringField("errorDetails", this.errorDetails);
+ jsonWriter.writeJsonField("operation", this.operation);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ResourceOperation from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ResourceOperation if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IOException If an error occurs while reading the ResourceOperation.
+ */
+ public static ResourceOperation fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ResourceOperation deserializedResourceOperation = new ResourceOperation();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("resourceId".equals(fieldName)) {
+ deserializedResourceOperation.resourceId = reader.getString();
+ } else if ("errorCode".equals(fieldName)) {
+ deserializedResourceOperation.errorCode = reader.getString();
+ } else if ("errorDetails".equals(fieldName)) {
+ deserializedResourceOperation.errorDetails = reader.getString();
+ } else if ("operation".equals(fieldName)) {
+ deserializedResourceOperation.operation = ResourceOperationDetails.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedResourceOperation;
+ });
+ }
+}
diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceOperationDetails.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceOperationDetails.java
new file mode 100644
index 000000000000..e6f95a003034
--- /dev/null
+++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceOperationDetails.java
@@ -0,0 +1,425 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.computeschedule.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.CoreUtils;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+import java.time.OffsetDateTime;
+import java.time.format.DateTimeFormatter;
+
+/**
+ * The details of a response from an operation on a resource.
+ */
+@Fluent
+public final class ResourceOperationDetails implements JsonSerializable {
+ /*
+ * Operation identifier for the unique operation
+ */
+ private String operationId;
+
+ /*
+ * Unique identifier for the resource involved in the operation, eg ArmId
+ */
+ private String resourceId;
+
+ /*
+ * Type of operation performed on the resources
+ */
+ private ResourceOperationType opType;
+
+ /*
+ * Subscription id attached to the request
+ */
+ private String subscriptionId;
+
+ /*
+ * Deadline for the operation
+ */
+ private OffsetDateTime deadline;
+
+ /*
+ * Type of deadline of the operation
+ */
+ private DeadlineType deadlineType;
+
+ /*
+ * Current state of the operation
+ */
+ private OperationState state;
+
+ /*
+ * Timezone for the operation
+ */
+ private String timeZone;
+
+ /*
+ * Operation level errors if they exist
+ */
+ private ResourceOperationError resourceOperationError;
+
+ /*
+ * Time the operation was complete if errors are null
+ */
+ private OffsetDateTime completedAt;
+
+ /*
+ * Retry policy the user can pass
+ */
+ private RetryPolicy retryPolicy;
+
+ /**
+ * Creates an instance of ResourceOperationDetails class.
+ */
+ public ResourceOperationDetails() {
+ }
+
+ /**
+ * Get the operationId property: Operation identifier for the unique operation.
+ *
+ * @return the operationId value.
+ */
+ public String operationId() {
+ return this.operationId;
+ }
+
+ /**
+ * Set the operationId property: Operation identifier for the unique operation.
+ *
+ * @param operationId the operationId value to set.
+ * @return the ResourceOperationDetails object itself.
+ */
+ public ResourceOperationDetails withOperationId(String operationId) {
+ this.operationId = operationId;
+ return this;
+ }
+
+ /**
+ * Get the resourceId property: Unique identifier for the resource involved in the operation, eg ArmId.
+ *
+ * @return the resourceId value.
+ */
+ public String resourceId() {
+ return this.resourceId;
+ }
+
+ /**
+ * Set the resourceId property: Unique identifier for the resource involved in the operation, eg ArmId.
+ *
+ * @param resourceId the resourceId value to set.
+ * @return the ResourceOperationDetails object itself.
+ */
+ public ResourceOperationDetails withResourceId(String resourceId) {
+ this.resourceId = resourceId;
+ return this;
+ }
+
+ /**
+ * Get the opType property: Type of operation performed on the resources.
+ *
+ * @return the opType value.
+ */
+ public ResourceOperationType opType() {
+ return this.opType;
+ }
+
+ /**
+ * Set the opType property: Type of operation performed on the resources.
+ *
+ * @param opType the opType value to set.
+ * @return the ResourceOperationDetails object itself.
+ */
+ public ResourceOperationDetails withOpType(ResourceOperationType opType) {
+ this.opType = opType;
+ return this;
+ }
+
+ /**
+ * Get the subscriptionId property: Subscription id attached to the request.
+ *
+ * @return the subscriptionId value.
+ */
+ public String subscriptionId() {
+ return this.subscriptionId;
+ }
+
+ /**
+ * Set the subscriptionId property: Subscription id attached to the request.
+ *
+ * @param subscriptionId the subscriptionId value to set.
+ * @return the ResourceOperationDetails object itself.
+ */
+ public ResourceOperationDetails withSubscriptionId(String subscriptionId) {
+ this.subscriptionId = subscriptionId;
+ return this;
+ }
+
+ /**
+ * Get the deadline property: Deadline for the operation.
+ *
+ * @return the deadline value.
+ */
+ public OffsetDateTime deadline() {
+ return this.deadline;
+ }
+
+ /**
+ * Set the deadline property: Deadline for the operation.
+ *
+ * @param deadline the deadline value to set.
+ * @return the ResourceOperationDetails object itself.
+ */
+ public ResourceOperationDetails withDeadline(OffsetDateTime deadline) {
+ this.deadline = deadline;
+ return this;
+ }
+
+ /**
+ * Get the deadlineType property: Type of deadline of the operation.
+ *
+ * @return the deadlineType value.
+ */
+ public DeadlineType deadlineType() {
+ return this.deadlineType;
+ }
+
+ /**
+ * Set the deadlineType property: Type of deadline of the operation.
+ *
+ * @param deadlineType the deadlineType value to set.
+ * @return the ResourceOperationDetails object itself.
+ */
+ public ResourceOperationDetails withDeadlineType(DeadlineType deadlineType) {
+ this.deadlineType = deadlineType;
+ return this;
+ }
+
+ /**
+ * Get the state property: Current state of the operation.
+ *
+ * @return the state value.
+ */
+ public OperationState state() {
+ return this.state;
+ }
+
+ /**
+ * Set the state property: Current state of the operation.
+ *
+ * @param state the state value to set.
+ * @return the ResourceOperationDetails object itself.
+ */
+ public ResourceOperationDetails withState(OperationState state) {
+ this.state = state;
+ return this;
+ }
+
+ /**
+ * Get the timeZone property: Timezone for the operation.
+ *
+ * @return the timeZone value.
+ */
+ public String timeZone() {
+ return this.timeZone;
+ }
+
+ /**
+ * Set the timeZone property: Timezone for the operation.
+ *
+ * @param timeZone the timeZone value to set.
+ * @return the ResourceOperationDetails object itself.
+ */
+ public ResourceOperationDetails withTimeZone(String timeZone) {
+ this.timeZone = timeZone;
+ return this;
+ }
+
+ /**
+ * Get the resourceOperationError property: Operation level errors if they exist.
+ *
+ * @return the resourceOperationError value.
+ */
+ public ResourceOperationError resourceOperationError() {
+ return this.resourceOperationError;
+ }
+
+ /**
+ * Set the resourceOperationError property: Operation level errors if they exist.
+ *
+ * @param resourceOperationError the resourceOperationError value to set.
+ * @return the ResourceOperationDetails object itself.
+ */
+ public ResourceOperationDetails withResourceOperationError(ResourceOperationError resourceOperationError) {
+ this.resourceOperationError = resourceOperationError;
+ return this;
+ }
+
+ /**
+ * Get the completedAt property: Time the operation was complete if errors are null.
+ *
+ * @return the completedAt value.
+ */
+ public OffsetDateTime completedAt() {
+ return this.completedAt;
+ }
+
+ /**
+ * Set the completedAt property: Time the operation was complete if errors are null.
+ *
+ * @param completedAt the completedAt value to set.
+ * @return the ResourceOperationDetails object itself.
+ */
+ public ResourceOperationDetails withCompletedAt(OffsetDateTime completedAt) {
+ this.completedAt = completedAt;
+ return this;
+ }
+
+ /**
+ * Get the retryPolicy property: Retry policy the user can pass.
+ *
+ * @return the retryPolicy value.
+ */
+ public RetryPolicy retryPolicy() {
+ return this.retryPolicy;
+ }
+
+ /**
+ * Set the retryPolicy property: Retry policy the user can pass.
+ *
+ * @param retryPolicy the retryPolicy value to set.
+ * @return the ResourceOperationDetails object itself.
+ */
+ public ResourceOperationDetails withRetryPolicy(RetryPolicy retryPolicy) {
+ this.retryPolicy = retryPolicy;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (operationId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property operationId in model ResourceOperationDetails"));
+ }
+ if (resourceId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property resourceId in model ResourceOperationDetails"));
+ }
+ if (opType() == null) {
+ throw LOGGER.atError()
+ .log(
+ new IllegalArgumentException("Missing required property opType in model ResourceOperationDetails"));
+ }
+ if (subscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property subscriptionId in model ResourceOperationDetails"));
+ }
+ if (deadline() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property deadline in model ResourceOperationDetails"));
+ }
+ if (deadlineType() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property deadlineType in model ResourceOperationDetails"));
+ }
+ if (state() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Missing required property state in model ResourceOperationDetails"));
+ }
+ if (resourceOperationError() != null) {
+ resourceOperationError().validate();
+ }
+ if (retryPolicy() != null) {
+ retryPolicy().validate();
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(ResourceOperationDetails.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("operationId", this.operationId);
+ jsonWriter.writeStringField("resourceId", this.resourceId);
+ jsonWriter.writeStringField("opType", this.opType == null ? null : this.opType.toString());
+ jsonWriter.writeStringField("subscriptionId", this.subscriptionId);
+ jsonWriter.writeStringField("deadline",
+ this.deadline == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.deadline));
+ jsonWriter.writeStringField("deadlineType", this.deadlineType == null ? null : this.deadlineType.toString());
+ jsonWriter.writeStringField("state", this.state == null ? null : this.state.toString());
+ jsonWriter.writeStringField("timeZone", this.timeZone);
+ jsonWriter.writeJsonField("resourceOperationError", this.resourceOperationError);
+ jsonWriter.writeStringField("completedAt",
+ this.completedAt == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.completedAt));
+ jsonWriter.writeJsonField("retryPolicy", this.retryPolicy);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ResourceOperationDetails from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ResourceOperationDetails if the JsonReader was pointing to an instance of it, or null if
+ * it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ResourceOperationDetails.
+ */
+ public static ResourceOperationDetails fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ResourceOperationDetails deserializedResourceOperationDetails = new ResourceOperationDetails();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("operationId".equals(fieldName)) {
+ deserializedResourceOperationDetails.operationId = reader.getString();
+ } else if ("resourceId".equals(fieldName)) {
+ deserializedResourceOperationDetails.resourceId = reader.getString();
+ } else if ("opType".equals(fieldName)) {
+ deserializedResourceOperationDetails.opType = ResourceOperationType.fromString(reader.getString());
+ } else if ("subscriptionId".equals(fieldName)) {
+ deserializedResourceOperationDetails.subscriptionId = reader.getString();
+ } else if ("deadline".equals(fieldName)) {
+ deserializedResourceOperationDetails.deadline = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else if ("deadlineType".equals(fieldName)) {
+ deserializedResourceOperationDetails.deadlineType = DeadlineType.fromString(reader.getString());
+ } else if ("state".equals(fieldName)) {
+ deserializedResourceOperationDetails.state = OperationState.fromString(reader.getString());
+ } else if ("timeZone".equals(fieldName)) {
+ deserializedResourceOperationDetails.timeZone = reader.getString();
+ } else if ("resourceOperationError".equals(fieldName)) {
+ deserializedResourceOperationDetails.resourceOperationError
+ = ResourceOperationError.fromJson(reader);
+ } else if ("completedAt".equals(fieldName)) {
+ deserializedResourceOperationDetails.completedAt = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else if ("retryPolicy".equals(fieldName)) {
+ deserializedResourceOperationDetails.retryPolicy = RetryPolicy.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedResourceOperationDetails;
+ });
+ }
+}
diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceOperationError.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceOperationError.java
new file mode 100644
index 000000000000..f9e933db1393
--- /dev/null
+++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceOperationError.java
@@ -0,0 +1,135 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.computeschedule.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * These describe errors that occur at the resource level.
+ */
+@Fluent
+public final class ResourceOperationError implements JsonSerializable {
+ /*
+ * Code for the error eg 404, 500
+ */
+ private String errorCode;
+
+ /*
+ * Detailed message about the error
+ */
+ private String errorDetails;
+
+ /**
+ * Creates an instance of ResourceOperationError class.
+ */
+ public ResourceOperationError() {
+ }
+
+ /**
+ * Get the errorCode property: Code for the error eg 404, 500.
+ *
+ * @return the errorCode value.
+ */
+ public String errorCode() {
+ return this.errorCode;
+ }
+
+ /**
+ * Set the errorCode property: Code for the error eg 404, 500.
+ *
+ * @param errorCode the errorCode value to set.
+ * @return the ResourceOperationError object itself.
+ */
+ public ResourceOperationError withErrorCode(String errorCode) {
+ this.errorCode = errorCode;
+ return this;
+ }
+
+ /**
+ * Get the errorDetails property: Detailed message about the error.
+ *
+ * @return the errorDetails value.
+ */
+ public String errorDetails() {
+ return this.errorDetails;
+ }
+
+ /**
+ * Set the errorDetails property: Detailed message about the error.
+ *
+ * @param errorDetails the errorDetails value to set.
+ * @return the ResourceOperationError object itself.
+ */
+ public ResourceOperationError withErrorDetails(String errorDetails) {
+ this.errorDetails = errorDetails;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (errorCode() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property errorCode in model ResourceOperationError"));
+ }
+ if (errorDetails() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property errorDetails in model ResourceOperationError"));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(ResourceOperationError.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("errorCode", this.errorCode);
+ jsonWriter.writeStringField("errorDetails", this.errorDetails);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ResourceOperationError from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ResourceOperationError if the JsonReader was pointing to an instance of it, or null if it
+ * was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ResourceOperationError.
+ */
+ public static ResourceOperationError fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ResourceOperationError deserializedResourceOperationError = new ResourceOperationError();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("errorCode".equals(fieldName)) {
+ deserializedResourceOperationError.errorCode = reader.getString();
+ } else if ("errorDetails".equals(fieldName)) {
+ deserializedResourceOperationError.errorDetails = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedResourceOperationError;
+ });
+ }
+}
diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceOperationType.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceOperationType.java
new file mode 100644
index 000000000000..f95c9a574b40
--- /dev/null
+++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/ResourceOperationType.java
@@ -0,0 +1,61 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.computeschedule.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import java.util.Collection;
+
+/**
+ * Type of operation performed on the resources.
+ */
+public final class ResourceOperationType extends ExpandableStringEnum {
+ /**
+ * Static value Unknown for ResourceOperationType.
+ */
+ public static final ResourceOperationType UNKNOWN = fromString("Unknown");
+
+ /**
+ * Static value Start for ResourceOperationType.
+ */
+ public static final ResourceOperationType START = fromString("Start");
+
+ /**
+ * Static value Deallocate for ResourceOperationType.
+ */
+ public static final ResourceOperationType DEALLOCATE = fromString("Deallocate");
+
+ /**
+ * Static value Hibernate for ResourceOperationType.
+ */
+ public static final ResourceOperationType HIBERNATE = fromString("Hibernate");
+
+ /**
+ * Creates a new instance of ResourceOperationType value.
+ *
+ * @deprecated Use the {@link #fromString(String)} factory method.
+ */
+ @Deprecated
+ public ResourceOperationType() {
+ }
+
+ /**
+ * Creates or finds a ResourceOperationType from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding ResourceOperationType.
+ */
+ public static ResourceOperationType fromString(String name) {
+ return fromString(name, ResourceOperationType.class);
+ }
+
+ /**
+ * Gets known ResourceOperationType values.
+ *
+ * @return known ResourceOperationType values.
+ */
+ public static Collection values() {
+ return values(ResourceOperationType.class);
+ }
+}
diff --git a/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/Resources.java b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/Resources.java
new file mode 100644
index 000000000000..dec59e62140e
--- /dev/null
+++ b/sdk/computeschedule/azure-resourcemanager-computeschedule/src/main/java/com/azure/resourcemanager/computeschedule/models/Resources.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.computeschedule.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * The resources needed for the user request.
+ */
+@Fluent
+public final class Resources implements JsonSerializable {
+ /*
+ * The resource ids used for the request
+ */
+ private List ids;
+
+ /**
+ * Creates an instance of Resources class.
+ */
+ public Resources() {
+ }
+
+ /**
+ * Get the ids property: The resource ids used for the request.
+ *
+ * @return the ids value.
+ */
+ public List ids() {
+ return this.ids;
+ }
+
+ /**
+ * Set the ids property: The resource ids used for the request.
+ *
+ * @param ids the ids value to set.
+ * @return the Resources object itself.
+ */
+ public Resources withIds(List ids) {
+ this.ids = ids;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (ids() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Missing required property ids in model Resources"));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(Resources.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeArrayField("ids", this.ids, (writer, element) -> writer.writeString(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of Resources from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of Resources if the JsonReader was pointing to an instance of it, or null if it was pointing
+ * to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the Resources.
+ */
+ public static Resources fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ Resources deserializedResources = new Resources();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("ids".equals(fieldName)) {
+ List