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 Compute Fleet service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the Compute Fleet service API instance.
+ */
+ public ComputeFleetManager 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.computefleet")
+ .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 ComputeFleetManager(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 Fleets. It manages Fleet.
+ *
+ * @return Resource collection API of Fleets.
+ */
+ public Fleets fleets() {
+ if (this.fleets == null) {
+ this.fleets = new FleetsImpl(clientObject.getFleets(), this);
+ }
+ return fleets;
+ }
+
+ /**
+ * Gets wrapped service client AzureFleetClient providing direct access to the underlying auto-generated API
+ * implementation, based on Azure REST API.
+ *
+ * @return Wrapped service client AzureFleetClient.
+ */
+ public AzureFleetClient serviceClient() {
+ return this.clientObject;
+ }
+}
diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/fluent/AzureFleetClient.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/fluent/AzureFleetClient.java
new file mode 100644
index 0000000000000..fe07fb794c180
--- /dev/null
+++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/fluent/AzureFleetClient.java
@@ -0,0 +1,62 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.computefleet.fluent;
+
+import com.azure.core.http.HttpPipeline;
+import java.time.Duration;
+
+/**
+ * The interface for AzureFleetClient class.
+ */
+public interface AzureFleetClient {
+ /**
+ * Gets Server parameter.
+ *
+ * @return the endpoint value.
+ */
+ String getEndpoint();
+
+ /**
+ * Gets Version parameter.
+ *
+ * @return the apiVersion value.
+ */
+ String getApiVersion();
+
+ /**
+ * Gets The ID of the target subscription. The value must be an UUID.
+ *
+ * @return the subscriptionId value.
+ */
+ String getSubscriptionId();
+
+ /**
+ * Gets The HTTP pipeline to send requests through.
+ *
+ * @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 FleetsClient object to access its operations.
+ *
+ * @return the FleetsClient object.
+ */
+ FleetsClient getFleets();
+}
diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/fluent/FleetsClient.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/fluent/FleetsClient.java
new file mode 100644
index 0000000000000..004a6f254d1e1
--- /dev/null
+++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/fluent/FleetsClient.java
@@ -0,0 +1,295 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.computefleet.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.computefleet.fluent.models.FleetInner;
+import com.azure.resourcemanager.computefleet.fluent.models.VirtualMachineScaleSetListResultInner;
+import com.azure.resourcemanager.computefleet.models.FleetUpdate;
+
+/**
+ * An instance of this class provides access to all the operations defined in FleetsClient.
+ */
+public interface FleetsClient {
+ /**
+ * Get a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Compute Fleet.
+ * @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 Fleet along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(String resourceGroupName, String fleetName, Context context);
+
+ /**
+ * Get a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Compute Fleet.
+ * @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 Fleet.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FleetInner getByResourceGroup(String resourceGroupName, String fleetName);
+
+ /**
+ * Create a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Compute Fleet.
+ * @param resource Resource create parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of an Compute Fleet resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, FleetInner> beginCreateOrUpdate(String resourceGroupName, String fleetName,
+ FleetInner resource);
+
+ /**
+ * Create a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Compute Fleet.
+ * @param resource Resource create parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of an Compute Fleet resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, FleetInner> beginCreateOrUpdate(String resourceGroupName, String fleetName,
+ FleetInner resource, Context context);
+
+ /**
+ * Create a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Compute Fleet.
+ * @param resource Resource create parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Compute Fleet resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FleetInner createOrUpdate(String resourceGroupName, String fleetName, FleetInner resource);
+
+ /**
+ * Create a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Compute Fleet.
+ * @param resource Resource create parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Compute Fleet resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FleetInner createOrUpdate(String resourceGroupName, String fleetName, FleetInner resource, Context context);
+
+ /**
+ * Update a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Compute Fleet.
+ * @param properties The resource properties to be updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of an Compute Fleet resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, FleetInner> beginUpdate(String resourceGroupName, String fleetName,
+ FleetUpdate properties);
+
+ /**
+ * Update a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Compute Fleet.
+ * @param properties The resource properties to be updated.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of an Compute Fleet resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, FleetInner> beginUpdate(String resourceGroupName, String fleetName,
+ FleetUpdate properties, Context context);
+
+ /**
+ * Update a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Compute Fleet.
+ * @param properties The resource properties to be updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Compute Fleet resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FleetInner update(String resourceGroupName, String fleetName, FleetUpdate properties);
+
+ /**
+ * Update a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Compute Fleet.
+ * @param properties The resource properties to be updated.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Compute Fleet resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FleetInner update(String resourceGroupName, String fleetName, FleetUpdate properties, Context context);
+
+ /**
+ * Delete a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Compute Fleet.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String fleetName);
+
+ /**
+ * Delete a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Compute Fleet.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String fleetName, Context context);
+
+ /**
+ * Delete a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Compute Fleet.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String fleetName);
+
+ /**
+ * Delete a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Compute Fleet.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String fleetName, Context context);
+
+ /**
+ * List Fleet resources by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Fleet list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * List Fleet resources by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Fleet list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+
+ /**
+ * List Fleet resources by subscription ID.
+ *
+ * @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 of a Fleet list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * List Fleet resources by subscription ID.
+ *
+ * @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 of a Fleet list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+
+ /**
+ * List VirtualMachineScaleSet resources by Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param name The name of the Fleet.
+ * @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 of a VirtualMachineScaleSet list operation along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response listVirtualMachineScaleSetsWithResponse(String resourceGroupName,
+ String name, Context context);
+
+ /**
+ * List VirtualMachineScaleSet resources by Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param name The name of the Fleet.
+ * @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 of a VirtualMachineScaleSet list operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ VirtualMachineScaleSetListResultInner listVirtualMachineScaleSets(String resourceGroupName, String name);
+}
diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/fluent/OperationsClient.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/fluent/OperationsClient.java
new file mode 100644
index 0000000000000..d246da6970e51
--- /dev/null
+++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/fluent/OperationsClient.java
@@ -0,0 +1,40 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.computefleet.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.computefleet.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/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/fluent/models/FleetInner.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/fluent/models/FleetInner.java
new file mode 100644
index 0000000000000..708158787a157
--- /dev/null
+++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/fluent/models/FleetInner.java
@@ -0,0 +1,286 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.computefleet.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.Resource;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.computefleet.models.FleetProperties;
+import com.azure.resourcemanager.computefleet.models.ManagedServiceIdentity;
+import com.azure.resourcemanager.computefleet.models.Plan;
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * An Compute Fleet resource.
+ */
+@Fluent
+public final class FleetInner extends Resource {
+ /*
+ * The resource-specific properties for this resource.
+ */
+ private FleetProperties properties;
+
+ /*
+ * Zones in which the Compute Fleet is available
+ */
+ private List zones;
+
+ /*
+ * The managed service identities assigned to this resource.
+ */
+ private ManagedServiceIdentity identity;
+
+ /*
+ * Details of the resource plan.
+ */
+ private Plan plan;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /**
+ * Creates an instance of FleetInner class.
+ */
+ public FleetInner() {
+ }
+
+ /**
+ * Get the properties property: The resource-specific properties for this resource.
+ *
+ * @return the properties value.
+ */
+ public FleetProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: The resource-specific properties for this resource.
+ *
+ * @param properties the properties value to set.
+ * @return the FleetInner object itself.
+ */
+ public FleetInner withProperties(FleetProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the zones property: Zones in which the Compute Fleet is available.
+ *
+ * @return the zones value.
+ */
+ public List zones() {
+ return this.zones;
+ }
+
+ /**
+ * Set the zones property: Zones in which the Compute Fleet is available.
+ *
+ * @param zones the zones value to set.
+ * @return the FleetInner object itself.
+ */
+ public FleetInner withZones(List zones) {
+ this.zones = zones;
+ return this;
+ }
+
+ /**
+ * Get the identity property: The managed service identities assigned to this resource.
+ *
+ * @return the identity value.
+ */
+ public ManagedServiceIdentity identity() {
+ return this.identity;
+ }
+
+ /**
+ * Set the identity property: The managed service identities assigned to this resource.
+ *
+ * @param identity the identity value to set.
+ * @return the FleetInner object itself.
+ */
+ public FleetInner withIdentity(ManagedServiceIdentity identity) {
+ this.identity = identity;
+ return this;
+ }
+
+ /**
+ * Get the plan property: Details of the resource plan.
+ *
+ * @return the plan value.
+ */
+ public Plan plan() {
+ return this.plan;
+ }
+
+ /**
+ * Set the plan property: Details of the resource plan.
+ *
+ * @param plan the plan value to set.
+ * @return the FleetInner object itself.
+ */
+ public FleetInner withPlan(Plan plan) {
+ this.plan = plan;
+ return this;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public FleetInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public FleetInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() != null) {
+ properties().validate();
+ }
+ if (identity() != null) {
+ identity().validate();
+ }
+ if (plan() != null) {
+ plan().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("location", location());
+ jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element));
+ jsonWriter.writeJsonField("properties", this.properties);
+ jsonWriter.writeArrayField("zones", this.zones, (writer, element) -> writer.writeString(element));
+ jsonWriter.writeJsonField("identity", this.identity);
+ jsonWriter.writeJsonField("plan", this.plan);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of FleetInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of FleetInner 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 FleetInner.
+ */
+ public static FleetInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ FleetInner deserializedFleetInner = new FleetInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedFleetInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedFleetInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedFleetInner.type = reader.getString();
+ } else if ("location".equals(fieldName)) {
+ deserializedFleetInner.withLocation(reader.getString());
+ } else if ("tags".equals(fieldName)) {
+ Map tags = reader.readMap(reader1 -> reader1.getString());
+ deserializedFleetInner.withTags(tags);
+ } else if ("properties".equals(fieldName)) {
+ deserializedFleetInner.properties = FleetProperties.fromJson(reader);
+ } else if ("zones".equals(fieldName)) {
+ List zones = reader.readArray(reader1 -> reader1.getString());
+ deserializedFleetInner.zones = zones;
+ } else if ("identity".equals(fieldName)) {
+ deserializedFleetInner.identity = ManagedServiceIdentity.fromJson(reader);
+ } else if ("plan".equals(fieldName)) {
+ deserializedFleetInner.plan = Plan.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedFleetInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedFleetInner;
+ });
+ }
+}
diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/fluent/models/OperationInner.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/fluent/models/OperationInner.java
new file mode 100644
index 0000000000000..708872b353238
--- /dev/null
+++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/fluent/models/OperationInner.java
@@ -0,0 +1,160 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.computefleet.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.computefleet.models.ActionType;
+import com.azure.resourcemanager.computefleet.models.OperationDisplay;
+import com.azure.resourcemanager.computefleet.models.Origin;
+import java.io.IOException;
+
+/**
+ * Details of a REST API operation, returned from the Resource Provider Operations API.
+ */
+@Immutable
+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 Azure
+ * Resource Manager/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;
+
+ /*
+ * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
+ */
+ private ActionType actionType;
+
+ /**
+ * Creates an instance of OperationInner class.
+ */
+ private 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 Azure Resource Manager/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;
+ }
+
+ /**
+ * 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: Extensible 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);
+ jsonWriter.writeStringField("actionType", this.actionType == null ? null : this.actionType.toString());
+ 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/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/fluent/models/VirtualMachineScaleSetListResultInner.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/fluent/models/VirtualMachineScaleSetListResultInner.java
new file mode 100644
index 0000000000000..926fd9f06ef24
--- /dev/null
+++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/fluent/models/VirtualMachineScaleSetListResultInner.java
@@ -0,0 +1,116 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.computefleet.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+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.computefleet.models.VirtualMachineScaleSet;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * The response of a VirtualMachineScaleSet list operation.
+ */
+@Immutable
+public final class VirtualMachineScaleSetListResultInner
+ implements JsonSerializable {
+ /*
+ * The VirtualMachineScaleSet items on this page
+ */
+ private List value;
+
+ /*
+ * The link to the next page of items
+ */
+ private String nextLink;
+
+ /**
+ * Creates an instance of VirtualMachineScaleSetListResultInner class.
+ */
+ private VirtualMachineScaleSetListResultInner() {
+ }
+
+ /**
+ * Get the value property: The VirtualMachineScaleSet items on this page.
+ *
+ * @return the value value.
+ */
+ public List value() {
+ return this.value;
+ }
+
+ /**
+ * Get the nextLink property: The link to the next page of items.
+ *
+ * @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) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property value in model VirtualMachineScaleSetListResultInner"));
+ } else {
+ value().forEach(e -> e.validate());
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(VirtualMachineScaleSetListResultInner.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeStringField("nextLink", this.nextLink);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of VirtualMachineScaleSetListResultInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of VirtualMachineScaleSetListResultInner 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 VirtualMachineScaleSetListResultInner.
+ */
+ public static VirtualMachineScaleSetListResultInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ VirtualMachineScaleSetListResultInner deserializedVirtualMachineScaleSetListResultInner
+ = new VirtualMachineScaleSetListResultInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("value".equals(fieldName)) {
+ List value
+ = reader.readArray(reader1 -> VirtualMachineScaleSet.fromJson(reader1));
+ deserializedVirtualMachineScaleSetListResultInner.value = value;
+ } else if ("nextLink".equals(fieldName)) {
+ deserializedVirtualMachineScaleSetListResultInner.nextLink = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedVirtualMachineScaleSetListResultInner;
+ });
+ }
+}
diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/fluent/models/package-info.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/fluent/models/package-info.java
new file mode 100644
index 0000000000000..3964e665c73a9
--- /dev/null
+++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/fluent/models/package-info.java
@@ -0,0 +1,8 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+/**
+ * Package containing the inner data models for ComputeFleet.
+ */
+package com.azure.resourcemanager.computefleet.fluent.models;
diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/fluent/package-info.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/fluent/package-info.java
new file mode 100644
index 0000000000000..05f4ab839fd83
--- /dev/null
+++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/fluent/package-info.java
@@ -0,0 +1,8 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+/**
+ * Package containing the service clients for ComputeFleet.
+ */
+package com.azure.resourcemanager.computefleet.fluent;
diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/implementation/AzureFleetClientBuilder.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/implementation/AzureFleetClientBuilder.java
new file mode 100644
index 0000000000000..533a8e59a3c82
--- /dev/null
+++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/implementation/AzureFleetClientBuilder.java
@@ -0,0 +1,137 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.computefleet.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 AzureFleetClientImpl type.
+ */
+@ServiceClientBuilder(serviceClients = { AzureFleetClientImpl.class })
+public final class AzureFleetClientBuilder {
+ /*
+ * Server parameter
+ */
+ private String endpoint;
+
+ /**
+ * Sets Server parameter.
+ *
+ * @param endpoint the endpoint value.
+ * @return the AzureFleetClientBuilder.
+ */
+ public AzureFleetClientBuilder endpoint(String endpoint) {
+ this.endpoint = endpoint;
+ return this;
+ }
+
+ /*
+ * 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 AzureFleetClientBuilder.
+ */
+ public AzureFleetClientBuilder subscriptionId(String subscriptionId) {
+ this.subscriptionId = subscriptionId;
+ return this;
+ }
+
+ /*
+ * The environment to connect to
+ */
+ private AzureEnvironment environment;
+
+ /**
+ * Sets The environment to connect to.
+ *
+ * @param environment the environment value.
+ * @return the AzureFleetClientBuilder.
+ */
+ public AzureFleetClientBuilder 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 AzureFleetClientBuilder.
+ */
+ public AzureFleetClientBuilder 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 AzureFleetClientBuilder.
+ */
+ public AzureFleetClientBuilder 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 AzureFleetClientBuilder.
+ */
+ public AzureFleetClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) {
+ this.serializerAdapter = serializerAdapter;
+ return this;
+ }
+
+ /**
+ * Builds an instance of AzureFleetClientImpl with the provided parameters.
+ *
+ * @return an instance of AzureFleetClientImpl.
+ */
+ public AzureFleetClientImpl buildClient() {
+ 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();
+ AzureFleetClientImpl client = new AzureFleetClientImpl(localPipeline, localSerializerAdapter,
+ localDefaultPollInterval, localEnvironment, this.endpoint, this.subscriptionId);
+ return client;
+ }
+}
diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/implementation/AzureFleetClientImpl.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/implementation/AzureFleetClientImpl.java
new file mode 100644
index 0000000000000..1c6069e318974
--- /dev/null
+++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/implementation/AzureFleetClientImpl.java
@@ -0,0 +1,304 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.computefleet.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.computefleet.fluent.AzureFleetClient;
+import com.azure.resourcemanager.computefleet.fluent.FleetsClient;
+import com.azure.resourcemanager.computefleet.fluent.OperationsClient;
+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 AzureFleetClientImpl type.
+ */
+@ServiceClient(builder = AzureFleetClientBuilder.class)
+public final class AzureFleetClientImpl implements AzureFleetClient {
+ /**
+ * Server parameter.
+ */
+ private final String endpoint;
+
+ /**
+ * Gets Server parameter.
+ *
+ * @return the endpoint value.
+ */
+ public String getEndpoint() {
+ return this.endpoint;
+ }
+
+ /**
+ * Version parameter.
+ */
+ private final String apiVersion;
+
+ /**
+ * Gets Version parameter.
+ *
+ * @return the apiVersion value.
+ */
+ public String getApiVersion() {
+ return this.apiVersion;
+ }
+
+ /**
+ * The ID of the target subscription. The value must be an UUID.
+ */
+ private final String subscriptionId;
+
+ /**
+ * Gets The ID of the target subscription. The value must be an UUID.
+ *
+ * @return the subscriptionId value.
+ */
+ public String getSubscriptionId() {
+ return this.subscriptionId;
+ }
+
+ /**
+ * The HTTP pipeline to send requests through.
+ */
+ 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 FleetsClient object to access its operations.
+ */
+ private final FleetsClient fleets;
+
+ /**
+ * Gets the FleetsClient object to access its operations.
+ *
+ * @return the FleetsClient object.
+ */
+ public FleetsClient getFleets() {
+ return this.fleets;
+ }
+
+ /**
+ * Initializes an instance of AzureFleetClient 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 endpoint Server parameter.
+ * @param subscriptionId The ID of the target subscription. The value must be an UUID.
+ */
+ AzureFleetClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, Duration defaultPollInterval,
+ AzureEnvironment environment, String endpoint, String subscriptionId) {
+ this.httpPipeline = httpPipeline;
+ this.serializerAdapter = serializerAdapter;
+ this.defaultPollInterval = defaultPollInterval;
+ this.endpoint = endpoint;
+ this.subscriptionId = subscriptionId;
+ this.apiVersion = "2024-05-01-preview";
+ this.operations = new OperationsClientImpl(this);
+ this.fleets = new FleetsClientImpl(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(AzureFleetClientImpl.class);
+}
diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/implementation/FleetImpl.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/implementation/FleetImpl.java
new file mode 100644
index 0000000000000..e0904e6d0ff96
--- /dev/null
+++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/implementation/FleetImpl.java
@@ -0,0 +1,228 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.computefleet.implementation;
+
+import com.azure.core.management.Region;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.computefleet.fluent.models.FleetInner;
+import com.azure.resourcemanager.computefleet.models.Fleet;
+import com.azure.resourcemanager.computefleet.models.FleetProperties;
+import com.azure.resourcemanager.computefleet.models.FleetUpdate;
+import com.azure.resourcemanager.computefleet.models.ManagedServiceIdentity;
+import com.azure.resourcemanager.computefleet.models.ManagedServiceIdentityUpdate;
+import com.azure.resourcemanager.computefleet.models.Plan;
+import com.azure.resourcemanager.computefleet.models.ResourcePlanUpdate;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+public final class FleetImpl implements Fleet, Fleet.Definition, Fleet.Update {
+ private FleetInner innerObject;
+
+ private final com.azure.resourcemanager.computefleet.ComputeFleetManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public String location() {
+ return this.innerModel().location();
+ }
+
+ public Map tags() {
+ Map inner = this.innerModel().tags();
+ if (inner != null) {
+ return Collections.unmodifiableMap(inner);
+ } else {
+ return Collections.emptyMap();
+ }
+ }
+
+ public FleetProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public List zones() {
+ List inner = this.innerModel().zones();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public ManagedServiceIdentity identity() {
+ return this.innerModel().identity();
+ }
+
+ public Plan plan() {
+ return this.innerModel().plan();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public Region region() {
+ return Region.fromName(this.regionName());
+ }
+
+ public String regionName() {
+ return this.location();
+ }
+
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
+ public FleetInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.computefleet.ComputeFleetManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String fleetName;
+
+ private FleetUpdate updateProperties;
+
+ public FleetImpl withExistingResourceGroup(String resourceGroupName) {
+ this.resourceGroupName = resourceGroupName;
+ return this;
+ }
+
+ public Fleet create() {
+ this.innerObject = serviceManager.serviceClient()
+ .getFleets()
+ .createOrUpdate(resourceGroupName, fleetName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public Fleet create(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getFleets()
+ .createOrUpdate(resourceGroupName, fleetName, this.innerModel(), context);
+ return this;
+ }
+
+ FleetImpl(String name, com.azure.resourcemanager.computefleet.ComputeFleetManager serviceManager) {
+ this.innerObject = new FleetInner();
+ this.serviceManager = serviceManager;
+ this.fleetName = name;
+ }
+
+ public FleetImpl update() {
+ this.updateProperties = new FleetUpdate();
+ return this;
+ }
+
+ public Fleet apply() {
+ this.innerObject = serviceManager.serviceClient()
+ .getFleets()
+ .update(resourceGroupName, fleetName, updateProperties, Context.NONE);
+ return this;
+ }
+
+ public Fleet apply(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getFleets()
+ .update(resourceGroupName, fleetName, updateProperties, context);
+ return this;
+ }
+
+ FleetImpl(FleetInner innerObject, com.azure.resourcemanager.computefleet.ComputeFleetManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.fleetName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "fleets");
+ }
+
+ public Fleet refresh() {
+ this.innerObject = serviceManager.serviceClient()
+ .getFleets()
+ .getByResourceGroupWithResponse(resourceGroupName, fleetName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public Fleet refresh(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getFleets()
+ .getByResourceGroupWithResponse(resourceGroupName, fleetName, context)
+ .getValue();
+ return this;
+ }
+
+ public FleetImpl withRegion(Region location) {
+ this.innerModel().withLocation(location.toString());
+ return this;
+ }
+
+ public FleetImpl withRegion(String location) {
+ this.innerModel().withLocation(location);
+ return this;
+ }
+
+ public FleetImpl withTags(Map tags) {
+ if (isInCreateMode()) {
+ this.innerModel().withTags(tags);
+ return this;
+ } else {
+ this.updateProperties.withTags(tags);
+ return this;
+ }
+ }
+
+ public FleetImpl withProperties(FleetProperties properties) {
+ if (isInCreateMode()) {
+ this.innerModel().withProperties(properties);
+ return this;
+ } else {
+ this.updateProperties.withProperties(properties);
+ return this;
+ }
+ }
+
+ public FleetImpl withZones(List zones) {
+ this.innerModel().withZones(zones);
+ return this;
+ }
+
+ public FleetImpl withIdentity(ManagedServiceIdentity identity) {
+ this.innerModel().withIdentity(identity);
+ return this;
+ }
+
+ public FleetImpl withPlan(Plan plan) {
+ this.innerModel().withPlan(plan);
+ return this;
+ }
+
+ public FleetImpl withIdentity(ManagedServiceIdentityUpdate identity) {
+ this.updateProperties.withIdentity(identity);
+ return this;
+ }
+
+ public FleetImpl withPlan(ResourcePlanUpdate plan) {
+ this.updateProperties.withPlan(plan);
+ return this;
+ }
+
+ private boolean isInCreateMode() {
+ return this.innerModel().id() == null;
+ }
+}
diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/implementation/FleetsClientImpl.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/implementation/FleetsClientImpl.java
new file mode 100644
index 0000000000000..86f6606cca790
--- /dev/null
+++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/implementation/FleetsClientImpl.java
@@ -0,0 +1,1393 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.computefleet.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.Patch;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.computefleet.fluent.FleetsClient;
+import com.azure.resourcemanager.computefleet.fluent.models.FleetInner;
+import com.azure.resourcemanager.computefleet.fluent.models.VirtualMachineScaleSetListResultInner;
+import com.azure.resourcemanager.computefleet.implementation.models.FleetListResult;
+import com.azure.resourcemanager.computefleet.models.FleetUpdate;
+import java.nio.ByteBuffer;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in FleetsClient.
+ */
+public final class FleetsClientImpl implements FleetsClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final FleetsService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final AzureFleetClientImpl client;
+
+ /**
+ * Initializes an instance of FleetsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ FleetsClientImpl(AzureFleetClientImpl client) {
+ this.service = RestProxy.create(FleetsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for AzureFleetClientFleets to be used by the proxy service to perform
+ * REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "AzureFleetClientFlee")
+ public interface FleetsService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets/{fleetName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getByResourceGroup(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("fleetName") String fleetName,
+ @HeaderParam("accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets/{fleetName}")
+ @ExpectedResponses({ 200, 201 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> createOrUpdate(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("fleetName") String fleetName,
+ @HeaderParam("accept") String accept, @BodyParam("application/json") FleetInner resource, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets/{fleetName}")
+ @ExpectedResponses({ 200, 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> update(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("fleetName") String fleetName,
+ @HeaderParam("accept") String accept, @BodyParam("application/json") FleetUpdate properties,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets/{fleetName}")
+ @ExpectedResponses({ 202, 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("fleetName") String fleetName,
+ @HeaderParam("accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroup(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AzureFleet/fleets")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets/{name}/virtualMachineScaleSets")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listVirtualMachineScaleSets(
+ @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("name") String name,
+ @HeaderParam("accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroupNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listBySubscriptionNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("accept") String accept, Context context);
+ }
+
+ /**
+ * Get a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Compute Fleet.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 Fleet along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String fleetName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (fleetName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, fleetName, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Compute Fleet.
+ * @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 Fleet along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String fleetName,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (fleetName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, fleetName, accept, context);
+ }
+
+ /**
+ * Get a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Compute Fleet.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 Fleet on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getByResourceGroupAsync(String resourceGroupName, String fleetName) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, fleetName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Compute Fleet.
+ * @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 Fleet along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getByResourceGroupWithResponse(String resourceGroupName, String fleetName,
+ Context context) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, fleetName, context).block();
+ }
+
+ /**
+ * Get a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Compute Fleet.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 Fleet.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public FleetInner getByResourceGroup(String resourceGroupName, String fleetName) {
+ return getByResourceGroupWithResponse(resourceGroupName, fleetName, Context.NONE).getValue();
+ }
+
+ /**
+ * Create a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Compute Fleet.
+ * @param resource Resource create parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Compute Fleet resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String fleetName,
+ FleetInner resource) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (fleetName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null."));
+ }
+ if (resource == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null."));
+ } else {
+ resource.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, fleetName, accept, resource, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Create a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Compute Fleet.
+ * @param resource Resource create parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Compute Fleet resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String fleetName,
+ FleetInner resource, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (fleetName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null."));
+ }
+ if (resource == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null."));
+ } else {
+ resource.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, fleetName, accept, resource, context);
+ }
+
+ /**
+ * Create a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Compute Fleet.
+ * @param resource Resource create parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of an Compute Fleet resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, FleetInner> beginCreateOrUpdateAsync(String resourceGroupName,
+ String fleetName, FleetInner resource) {
+ Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, fleetName, resource);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(), FleetInner.class,
+ FleetInner.class, this.client.getContext());
+ }
+
+ /**
+ * Create a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Compute Fleet.
+ * @param resource Resource create parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of an Compute Fleet resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, FleetInner> beginCreateOrUpdateAsync(String resourceGroupName,
+ String fleetName, FleetInner resource, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono
+ = createOrUpdateWithResponseAsync(resourceGroupName, fleetName, resource, context);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(), FleetInner.class,
+ FleetInner.class, context);
+ }
+
+ /**
+ * Create a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Compute Fleet.
+ * @param resource Resource create parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of an Compute Fleet resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, FleetInner> beginCreateOrUpdate(String resourceGroupName,
+ String fleetName, FleetInner resource) {
+ return this.beginCreateOrUpdateAsync(resourceGroupName, fleetName, resource).getSyncPoller();
+ }
+
+ /**
+ * Create a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Compute Fleet.
+ * @param resource Resource create parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of an Compute Fleet resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, FleetInner> beginCreateOrUpdate(String resourceGroupName,
+ String fleetName, FleetInner resource, Context context) {
+ return this.beginCreateOrUpdateAsync(resourceGroupName, fleetName, resource, context).getSyncPoller();
+ }
+
+ /**
+ * Create a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Compute Fleet.
+ * @param resource Resource create parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Compute Fleet resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(String resourceGroupName, String fleetName, FleetInner resource) {
+ return beginCreateOrUpdateAsync(resourceGroupName, fleetName, resource).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Compute Fleet.
+ * @param resource Resource create parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Compute Fleet resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(String resourceGroupName, String fleetName, FleetInner resource,
+ Context context) {
+ return beginCreateOrUpdateAsync(resourceGroupName, fleetName, resource, context).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Compute Fleet.
+ * @param resource Resource create parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Compute Fleet resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public FleetInner createOrUpdate(String resourceGroupName, String fleetName, FleetInner resource) {
+ return createOrUpdateAsync(resourceGroupName, fleetName, resource).block();
+ }
+
+ /**
+ * Create a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Compute Fleet.
+ * @param resource Resource create parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Compute Fleet resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public FleetInner createOrUpdate(String resourceGroupName, String fleetName, FleetInner resource, Context context) {
+ return createOrUpdateAsync(resourceGroupName, fleetName, resource, context).block();
+ }
+
+ /**
+ * Update a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Compute Fleet.
+ * @param properties The resource properties to be updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Compute Fleet resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> updateWithResponseAsync(String resourceGroupName, String fleetName,
+ FleetUpdate properties) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (fleetName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null."));
+ }
+ if (properties == null) {
+ return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null."));
+ } else {
+ properties.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, fleetName, accept, properties, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Update a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Compute Fleet.
+ * @param properties The resource properties to be updated.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Compute Fleet resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> updateWithResponseAsync(String resourceGroupName, String fleetName,
+ FleetUpdate properties, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (fleetName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null."));
+ }
+ if (properties == null) {
+ return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null."));
+ } else {
+ properties.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, fleetName, accept, properties, context);
+ }
+
+ /**
+ * Update a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Compute Fleet.
+ * @param properties The resource properties to be updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of an Compute Fleet resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, FleetInner> beginUpdateAsync(String resourceGroupName, String fleetName,
+ FleetUpdate properties) {
+ Mono>> mono = updateWithResponseAsync(resourceGroupName, fleetName, properties);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(), FleetInner.class,
+ FleetInner.class, this.client.getContext());
+ }
+
+ /**
+ * Update a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Compute Fleet.
+ * @param properties The resource properties to be updated.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of an Compute Fleet resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, FleetInner> beginUpdateAsync(String resourceGroupName, String fleetName,
+ FleetUpdate properties, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono
+ = updateWithResponseAsync(resourceGroupName, fleetName, properties, context);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(), FleetInner.class,
+ FleetInner.class, context);
+ }
+
+ /**
+ * Update a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Compute Fleet.
+ * @param properties The resource properties to be updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of an Compute Fleet resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, FleetInner> beginUpdate(String resourceGroupName, String fleetName,
+ FleetUpdate properties) {
+ return this.beginUpdateAsync(resourceGroupName, fleetName, properties).getSyncPoller();
+ }
+
+ /**
+ * Update a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Compute Fleet.
+ * @param properties The resource properties to be updated.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of an Compute Fleet resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, FleetInner> beginUpdate(String resourceGroupName, String fleetName,
+ FleetUpdate properties, Context context) {
+ return this.beginUpdateAsync(resourceGroupName, fleetName, properties, context).getSyncPoller();
+ }
+
+ /**
+ * Update a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Compute Fleet.
+ * @param properties The resource properties to be updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Compute Fleet resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(String resourceGroupName, String fleetName, FleetUpdate properties) {
+ return beginUpdateAsync(resourceGroupName, fleetName, properties).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Update a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Compute Fleet.
+ * @param properties The resource properties to be updated.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Compute Fleet resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(String resourceGroupName, String fleetName, FleetUpdate properties,
+ Context context) {
+ return beginUpdateAsync(resourceGroupName, fleetName, properties, context).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Update a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Compute Fleet.
+ * @param properties The resource properties to be updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Compute Fleet resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public FleetInner update(String resourceGroupName, String fleetName, FleetUpdate properties) {
+ return updateAsync(resourceGroupName, fleetName, properties).block();
+ }
+
+ /**
+ * Update a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Compute Fleet.
+ * @param properties The resource properties to be updated.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Compute Fleet resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public FleetInner update(String resourceGroupName, String fleetName, FleetUpdate properties, Context context) {
+ return updateAsync(resourceGroupName, fleetName, properties, context).block();
+ }
+
+ /**
+ * Delete a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Compute Fleet.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(String resourceGroupName, String fleetName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (fleetName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, fleetName, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Delete a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Compute Fleet.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(String resourceGroupName, String fleetName,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (fleetName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter fleetName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, fleetName, accept, context);
+ }
+
+ /**
+ * Delete a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Compute Fleet.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String fleetName) {
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, fleetName);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Delete a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Compute Fleet.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String fleetName,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, fleetName, context);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
+ context);
+ }
+
+ /**
+ * Delete a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Compute Fleet.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(String resourceGroupName, String fleetName) {
+ return this.beginDeleteAsync(resourceGroupName, fleetName).getSyncPoller();
+ }
+
+ /**
+ * Delete a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Compute Fleet.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(String resourceGroupName, String fleetName, Context context) {
+ return this.beginDeleteAsync(resourceGroupName, fleetName, context).getSyncPoller();
+ }
+
+ /**
+ * Delete a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Compute Fleet.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String fleetName) {
+ return beginDeleteAsync(resourceGroupName, fleetName).last().flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Delete a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Compute Fleet.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String fleetName, Context context) {
+ return beginDeleteAsync(resourceGroupName, fleetName, context).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Delete a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Compute Fleet.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String fleetName) {
+ deleteAsync(resourceGroupName, fleetName).block();
+ }
+
+ /**
+ * Delete a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Compute Fleet.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String fleetName, Context context) {
+ deleteAsync(resourceGroupName, fleetName, context).block();
+ }
+
+ /**
+ * List Fleet resources by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Fleet list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, 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 Fleet resources by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 of a Fleet list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+
+ /**
+ * List Fleet resources by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Fleet list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
+ return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List Fleet resources by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 of a Fleet list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) {
+ return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List Fleet resources by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Fleet list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName));
+ }
+
+ /**
+ * List Fleet resources by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 of a Fleet list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context));
+ }
+
+ /**
+ * List Fleet resources by subscription ID.
+ *
+ * @throws 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 of a Fleet list operation 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."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), 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 Fleet resources by subscription ID.
+ *
+ * @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 of a Fleet list operation 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."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept,
+ context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+
+ /**
+ * List Fleet resources by subscription ID.
+ *
+ * @throws 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 of a Fleet list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(() -> listSinglePageAsync(),
+ nextLink -> listBySubscriptionNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List Fleet resources by subscription ID.
+ *
+ * @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 of a Fleet list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(Context context) {
+ return new PagedFlux<>(() -> listSinglePageAsync(context),
+ nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List Fleet resources by subscription ID.
+ *
+ * @throws 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 of a Fleet list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ return new PagedIterable<>(listAsync());
+ }
+
+ /**
+ * List Fleet resources by subscription ID.
+ *
+ * @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 of a Fleet list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(Context context) {
+ return new PagedIterable<>(listAsync(context));
+ }
+
+ /**
+ * List VirtualMachineScaleSet resources by Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param name The name of the Fleet.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 of a VirtualMachineScaleSet list operation along with {@link Response} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>
+ listVirtualMachineScaleSetsWithResponseAsync(String resourceGroupName, String name) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (name == null) {
+ return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listVirtualMachineScaleSets(this.client.getEndpoint(),
+ this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, name, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * List VirtualMachineScaleSet resources by Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param name The name of the Fleet.
+ * @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 of a VirtualMachineScaleSet list operation along with {@link Response} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>
+ listVirtualMachineScaleSetsWithResponseAsync(String resourceGroupName, String name, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (name == null) {
+ return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.listVirtualMachineScaleSets(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, name, accept, context);
+ }
+
+ /**
+ * List VirtualMachineScaleSet resources by Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param name The name of the Fleet.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 of a VirtualMachineScaleSet list operation on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono listVirtualMachineScaleSetsAsync(String resourceGroupName,
+ String name) {
+ return listVirtualMachineScaleSetsWithResponseAsync(resourceGroupName, name)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * List VirtualMachineScaleSet resources by Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param name The name of the Fleet.
+ * @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 of a VirtualMachineScaleSet list operation along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response
+ listVirtualMachineScaleSetsWithResponse(String resourceGroupName, String name, Context context) {
+ return listVirtualMachineScaleSetsWithResponseAsync(resourceGroupName, name, context).block();
+ }
+
+ /**
+ * List VirtualMachineScaleSet resources by Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param name The name of the Fleet.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 of a VirtualMachineScaleSet list operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public VirtualMachineScaleSetListResultInner listVirtualMachineScaleSets(String resourceGroupName, String name) {
+ return listVirtualMachineScaleSetsWithResponse(resourceGroupName, name, Context.NONE).getValue();
+ }
+
+ /**
+ * 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 the response of a Fleet list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupNextSinglePageAsync(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.listByResourceGroupNext(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 the response of a Fleet list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupNextSinglePageAsync(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.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+
+ /**
+ * 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 the response of a Fleet list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySubscriptionNextSinglePageAsync(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.listBySubscriptionNext(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 the response of a Fleet list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySubscriptionNextSinglePageAsync(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.listBySubscriptionNext(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/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/implementation/FleetsImpl.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/implementation/FleetsImpl.java
new file mode 100644
index 0000000000000..6e6beb9a79dd1
--- /dev/null
+++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/implementation/FleetsImpl.java
@@ -0,0 +1,169 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.computefleet.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.computefleet.fluent.FleetsClient;
+import com.azure.resourcemanager.computefleet.fluent.models.FleetInner;
+import com.azure.resourcemanager.computefleet.fluent.models.VirtualMachineScaleSetListResultInner;
+import com.azure.resourcemanager.computefleet.models.Fleet;
+import com.azure.resourcemanager.computefleet.models.Fleets;
+import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetListResult;
+
+public final class FleetsImpl implements Fleets {
+ private static final ClientLogger LOGGER = new ClientLogger(FleetsImpl.class);
+
+ private final FleetsClient innerClient;
+
+ private final com.azure.resourcemanager.computefleet.ComputeFleetManager serviceManager;
+
+ public FleetsImpl(FleetsClient innerClient,
+ com.azure.resourcemanager.computefleet.ComputeFleetManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response getByResourceGroupWithResponse(String resourceGroupName, String fleetName, Context context) {
+ Response inner
+ = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, fleetName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new FleetImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public Fleet getByResourceGroup(String resourceGroupName, String fleetName) {
+ FleetInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, fleetName);
+ if (inner != null) {
+ return new FleetImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public void deleteByResourceGroup(String resourceGroupName, String fleetName) {
+ this.serviceClient().delete(resourceGroupName, fleetName);
+ }
+
+ public void delete(String resourceGroupName, String fleetName, Context context) {
+ this.serviceClient().delete(resourceGroupName, fleetName, context);
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new FleetImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new FleetImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new FleetImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(Context context) {
+ PagedIterable inner = this.serviceClient().list(context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new FleetImpl(inner1, this.manager()));
+ }
+
+ public Response listVirtualMachineScaleSetsWithResponse(String resourceGroupName,
+ String name, Context context) {
+ Response inner
+ = this.serviceClient().listVirtualMachineScaleSetsWithResponse(resourceGroupName, name, context);
+ if (inner != null) {
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new VirtualMachineScaleSetListResultImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public VirtualMachineScaleSetListResult listVirtualMachineScaleSets(String resourceGroupName, String name) {
+ VirtualMachineScaleSetListResultInner inner
+ = this.serviceClient().listVirtualMachineScaleSets(resourceGroupName, name);
+ if (inner != null) {
+ return new VirtualMachineScaleSetListResultImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Fleet getById(String id) {
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String fleetName = ResourceManagerUtils.getValueFromIdByName(id, "fleets");
+ if (fleetName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'fleets'.", id)));
+ }
+ return this.getByResourceGroupWithResponse(resourceGroupName, fleetName, Context.NONE).getValue();
+ }
+
+ public Response getByIdWithResponse(String id, Context context) {
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String fleetName = ResourceManagerUtils.getValueFromIdByName(id, "fleets");
+ if (fleetName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'fleets'.", id)));
+ }
+ return this.getByResourceGroupWithResponse(resourceGroupName, fleetName, context);
+ }
+
+ public void deleteById(String id) {
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String fleetName = ResourceManagerUtils.getValueFromIdByName(id, "fleets");
+ if (fleetName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'fleets'.", id)));
+ }
+ this.delete(resourceGroupName, fleetName, Context.NONE);
+ }
+
+ public void deleteByIdWithResponse(String id, Context context) {
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String fleetName = ResourceManagerUtils.getValueFromIdByName(id, "fleets");
+ if (fleetName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'fleets'.", id)));
+ }
+ this.delete(resourceGroupName, fleetName, context);
+ }
+
+ private FleetsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.computefleet.ComputeFleetManager manager() {
+ return this.serviceManager;
+ }
+
+ public FleetImpl define(String name) {
+ return new FleetImpl(name, this.manager());
+ }
+}
diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/implementation/OperationImpl.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/implementation/OperationImpl.java
new file mode 100644
index 0000000000000..32190c6d2aec3
--- /dev/null
+++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/implementation/OperationImpl.java
@@ -0,0 +1,51 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.computefleet.implementation;
+
+import com.azure.resourcemanager.computefleet.fluent.models.OperationInner;
+import com.azure.resourcemanager.computefleet.models.ActionType;
+import com.azure.resourcemanager.computefleet.models.Operation;
+import com.azure.resourcemanager.computefleet.models.OperationDisplay;
+import com.azure.resourcemanager.computefleet.models.Origin;
+
+public final class OperationImpl implements Operation {
+ private OperationInner innerObject;
+
+ private final com.azure.resourcemanager.computefleet.ComputeFleetManager serviceManager;
+
+ OperationImpl(OperationInner innerObject,
+ com.azure.resourcemanager.computefleet.ComputeFleetManager 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.computefleet.ComputeFleetManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/implementation/OperationsClientImpl.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/implementation/OperationsClientImpl.java
new file mode 100644
index 0000000000000..3d80ee86d3361
--- /dev/null
+++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/implementation/OperationsClientImpl.java
@@ -0,0 +1,235 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.computefleet.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.computefleet.fluent.OperationsClient;
+import com.azure.resourcemanager.computefleet.fluent.models.OperationInner;
+import com.azure.resourcemanager.computefleet.implementation.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 AzureFleetClientImpl client;
+
+ /**
+ * Initializes an instance of OperationsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ OperationsClientImpl(AzureFleetClientImpl client) {
+ this.service
+ = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for AzureFleetClientOperations to be used by the proxy service to perform
+ * REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "AzureFleetClientOper")
+ public interface OperationsService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/providers/Microsoft.AzureFleet/operations")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(@HostParam("endpoint") 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("endpoint") 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/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/implementation/OperationsImpl.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/implementation/OperationsImpl.java
new file mode 100644
index 0000000000000..24cf2c1b5c387
--- /dev/null
+++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/implementation/OperationsImpl.java
@@ -0,0 +1,45 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.computefleet.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.computefleet.fluent.OperationsClient;
+import com.azure.resourcemanager.computefleet.fluent.models.OperationInner;
+import com.azure.resourcemanager.computefleet.models.Operation;
+import com.azure.resourcemanager.computefleet.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.computefleet.ComputeFleetManager serviceManager;
+
+ public OperationsImpl(OperationsClient innerClient,
+ com.azure.resourcemanager.computefleet.ComputeFleetManager 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.computefleet.ComputeFleetManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/implementation/ResourceManagerUtils.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/implementation/ResourceManagerUtils.java
new file mode 100644
index 0000000000000..c39912a5f0865
--- /dev/null
+++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/implementation/ResourceManagerUtils.java
@@ -0,0 +1,195 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.computefleet.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/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/implementation/VirtualMachineScaleSetListResultImpl.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/implementation/VirtualMachineScaleSetListResultImpl.java
new file mode 100644
index 0000000000000..cf2af2831c15a
--- /dev/null
+++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/implementation/VirtualMachineScaleSetListResultImpl.java
@@ -0,0 +1,44 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.computefleet.implementation;
+
+import com.azure.resourcemanager.computefleet.fluent.models.VirtualMachineScaleSetListResultInner;
+import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSet;
+import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetListResult;
+import java.util.Collections;
+import java.util.List;
+
+public final class VirtualMachineScaleSetListResultImpl implements VirtualMachineScaleSetListResult {
+ private VirtualMachineScaleSetListResultInner innerObject;
+
+ private final com.azure.resourcemanager.computefleet.ComputeFleetManager serviceManager;
+
+ VirtualMachineScaleSetListResultImpl(VirtualMachineScaleSetListResultInner innerObject,
+ com.azure.resourcemanager.computefleet.ComputeFleetManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public List value() {
+ List inner = this.innerModel().value();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public String nextLink() {
+ return this.innerModel().nextLink();
+ }
+
+ public VirtualMachineScaleSetListResultInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.computefleet.ComputeFleetManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/implementation/models/FleetListResult.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/implementation/models/FleetListResult.java
new file mode 100644
index 0000000000000..fdf20fa4ef1ba
--- /dev/null
+++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/implementation/models/FleetListResult.java
@@ -0,0 +1,112 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.computefleet.implementation.models;
+
+import com.azure.core.annotation.Immutable;
+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.computefleet.fluent.models.FleetInner;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * The response of a Fleet list operation.
+ */
+@Immutable
+public final class FleetListResult implements JsonSerializable {
+ /*
+ * The Fleet items on this page
+ */
+ private List value;
+
+ /*
+ * The link to the next page of items
+ */
+ private String nextLink;
+
+ /**
+ * Creates an instance of FleetListResult class.
+ */
+ private FleetListResult() {
+ }
+
+ /**
+ * Get the value property: The Fleet items on this page.
+ *
+ * @return the value value.
+ */
+ public List value() {
+ return this.value;
+ }
+
+ /**
+ * Get the nextLink property: The link to the next page of items.
+ *
+ * @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) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Missing required property value in model FleetListResult"));
+ } else {
+ value().forEach(e -> e.validate());
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(FleetListResult.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeStringField("nextLink", this.nextLink);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of FleetListResult from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of FleetListResult 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 FleetListResult.
+ */
+ public static FleetListResult fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ FleetListResult deserializedFleetListResult = new FleetListResult();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("value".equals(fieldName)) {
+ List value = reader.readArray(reader1 -> FleetInner.fromJson(reader1));
+ deserializedFleetListResult.value = value;
+ } else if ("nextLink".equals(fieldName)) {
+ deserializedFleetListResult.nextLink = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedFleetListResult;
+ });
+ }
+}
diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/implementation/models/OperationListResult.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/implementation/models/OperationListResult.java
new file mode 100644
index 0000000000000..dbb0c9a5a9dc6
--- /dev/null
+++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/implementation/models/OperationListResult.java
@@ -0,0 +1,113 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.computefleet.implementation.models;
+
+import com.azure.core.annotation.Immutable;
+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.computefleet.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 {
+ /*
+ * The Operation items on this page
+ */
+ private List value;
+
+ /*
+ * The link to the next page of items
+ */
+ private String nextLink;
+
+ /**
+ * Creates an instance of OperationListResult class.
+ */
+ private OperationListResult() {
+ }
+
+ /**
+ * Get the value property: The Operation items on this page.
+ *
+ * @return the value value.
+ */
+ public List value() {
+ return this.value;
+ }
+
+ /**
+ * Get the nextLink property: The link to the next page of items.
+ *
+ * @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) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Missing required property value in model OperationListResult"));
+ } else {
+ value().forEach(e -> e.validate());
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(OperationListResult.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeStringField("nextLink", this.nextLink);
+ 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 IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @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/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/implementation/package-info.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/implementation/package-info.java
new file mode 100644
index 0000000000000..ff2f1862d8c98
--- /dev/null
+++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/implementation/package-info.java
@@ -0,0 +1,8 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+/**
+ * Package containing the implementations for ComputeFleet.
+ */
+package com.azure.resourcemanager.computefleet.implementation;
diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/models/ActionType.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/models/ActionType.java
new file mode 100644
index 0000000000000..f6791ec490e14
--- /dev/null
+++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/models/ActionType.java
@@ -0,0 +1,46 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.computefleet.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import java.util.Collection;
+
+/**
+ * Extensible 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/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/models/ComputeProfile.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/models/ComputeProfile.java
new file mode 100644
index 0000000000000..973d53e2260a8
--- /dev/null
+++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/models/ComputeProfile.java
@@ -0,0 +1,181 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.computefleet.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;
+
+/**
+ * Compute Profile to use for running user's workloads.
+ */
+@Fluent
+public final class ComputeProfile implements JsonSerializable {
+ /*
+ * Base Virtual Machine Profile Properties to be specified according to
+ * "specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/{computeApiVersion}/virtualMachineScaleSet.json#/definitions/VirtualMachineScaleSetVMProfile"
+ */
+ private Object baseVirtualMachineProfile;
+
+ /*
+ * Specifies the Microsoft.Compute API version to use when creating underlying Virtual Machine scale sets and
+ * Virtual Machines.
+ * The default value will be the latest supported computeApiVersion by Compute Fleet.
+ */
+ private String computeApiVersion;
+
+ /*
+ * Specifies the number of fault domains to use when creating the underlying VMSS.
+ * A fault domain is a logical group of hardware within an Azure datacenter.
+ * VMs in the same fault domain share a common power source and network switch.
+ * If not specified, defaults to 1, which represents "Max Spreading" (using as many fault domains as possible).
+ * This property cannot be updated.
+ */
+ private Integer platformFaultDomainCount;
+
+ /**
+ * Creates an instance of ComputeProfile class.
+ */
+ public ComputeProfile() {
+ }
+
+ /**
+ * Get the baseVirtualMachineProfile property: Base Virtual Machine Profile Properties to be specified according to
+ * "specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/{computeApiVersion}/virtualMachineScaleSet.json#/definitions/VirtualMachineScaleSetVMProfile".
+ *
+ * @return the baseVirtualMachineProfile value.
+ */
+ public Object baseVirtualMachineProfile() {
+ return this.baseVirtualMachineProfile;
+ }
+
+ /**
+ * Set the baseVirtualMachineProfile property: Base Virtual Machine Profile Properties to be specified according to
+ * "specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/{computeApiVersion}/virtualMachineScaleSet.json#/definitions/VirtualMachineScaleSetVMProfile".
+ *
+ * @param baseVirtualMachineProfile the baseVirtualMachineProfile value to set.
+ * @return the ComputeProfile object itself.
+ */
+ public ComputeProfile withBaseVirtualMachineProfile(Object baseVirtualMachineProfile) {
+ this.baseVirtualMachineProfile = baseVirtualMachineProfile;
+ return this;
+ }
+
+ /**
+ * Get the computeApiVersion property: Specifies the Microsoft.Compute API version to use when creating underlying
+ * Virtual Machine scale sets and Virtual Machines.
+ * The default value will be the latest supported computeApiVersion by Compute Fleet.
+ *
+ * @return the computeApiVersion value.
+ */
+ public String computeApiVersion() {
+ return this.computeApiVersion;
+ }
+
+ /**
+ * Set the computeApiVersion property: Specifies the Microsoft.Compute API version to use when creating underlying
+ * Virtual Machine scale sets and Virtual Machines.
+ * The default value will be the latest supported computeApiVersion by Compute Fleet.
+ *
+ * @param computeApiVersion the computeApiVersion value to set.
+ * @return the ComputeProfile object itself.
+ */
+ public ComputeProfile withComputeApiVersion(String computeApiVersion) {
+ this.computeApiVersion = computeApiVersion;
+ return this;
+ }
+
+ /**
+ * Get the platformFaultDomainCount property: Specifies the number of fault domains to use when creating the
+ * underlying VMSS.
+ * A fault domain is a logical group of hardware within an Azure datacenter.
+ * VMs in the same fault domain share a common power source and network switch.
+ * If not specified, defaults to 1, which represents "Max Spreading" (using as many fault domains as possible).
+ * This property cannot be updated.
+ *
+ * @return the platformFaultDomainCount value.
+ */
+ public Integer platformFaultDomainCount() {
+ return this.platformFaultDomainCount;
+ }
+
+ /**
+ * Set the platformFaultDomainCount property: Specifies the number of fault domains to use when creating the
+ * underlying VMSS.
+ * A fault domain is a logical group of hardware within an Azure datacenter.
+ * VMs in the same fault domain share a common power source and network switch.
+ * If not specified, defaults to 1, which represents "Max Spreading" (using as many fault domains as possible).
+ * This property cannot be updated.
+ *
+ * @param platformFaultDomainCount the platformFaultDomainCount value to set.
+ * @return the ComputeProfile object itself.
+ */
+ public ComputeProfile withPlatformFaultDomainCount(Integer platformFaultDomainCount) {
+ this.platformFaultDomainCount = platformFaultDomainCount;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (baseVirtualMachineProfile() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property baseVirtualMachineProfile in model ComputeProfile"));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(ComputeProfile.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeUntypedField("baseVirtualMachineProfile", this.baseVirtualMachineProfile);
+ jsonWriter.writeStringField("computeApiVersion", this.computeApiVersion);
+ jsonWriter.writeNumberField("platformFaultDomainCount", this.platformFaultDomainCount);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ComputeProfile from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ComputeProfile 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 ComputeProfile.
+ */
+ public static ComputeProfile fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ComputeProfile deserializedComputeProfile = new ComputeProfile();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("baseVirtualMachineProfile".equals(fieldName)) {
+ deserializedComputeProfile.baseVirtualMachineProfile = reader.readUntyped();
+ } else if ("computeApiVersion".equals(fieldName)) {
+ deserializedComputeProfile.computeApiVersion = reader.getString();
+ } else if ("platformFaultDomainCount".equals(fieldName)) {
+ deserializedComputeProfile.platformFaultDomainCount = reader.getNullable(JsonReader::getInt);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedComputeProfile;
+ });
+ }
+}
diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/models/EvictionPolicy.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/models/EvictionPolicy.java
new file mode 100644
index 0000000000000..146928fa6f8da
--- /dev/null
+++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/models/EvictionPolicy.java
@@ -0,0 +1,51 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.computefleet.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import java.util.Collection;
+
+/**
+ * Different kind of eviction policies.
+ */
+public final class EvictionPolicy extends ExpandableStringEnum {
+ /**
+ * Static value Delete for EvictionPolicy.
+ */
+ public static final EvictionPolicy DELETE = fromString("Delete");
+
+ /**
+ * Static value Deallocate for EvictionPolicy.
+ */
+ public static final EvictionPolicy DEALLOCATE = fromString("Deallocate");
+
+ /**
+ * Creates a new instance of EvictionPolicy value.
+ *
+ * @deprecated Use the {@link #fromString(String)} factory method.
+ */
+ @Deprecated
+ public EvictionPolicy() {
+ }
+
+ /**
+ * Creates or finds a EvictionPolicy from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding EvictionPolicy.
+ */
+ public static EvictionPolicy fromString(String name) {
+ return fromString(name, EvictionPolicy.class);
+ }
+
+ /**
+ * Gets known EvictionPolicy values.
+ *
+ * @return known EvictionPolicy values.
+ */
+ public static Collection values() {
+ return values(EvictionPolicy.class);
+ }
+}
diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/models/Fleet.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/models/Fleet.java
new file mode 100644
index 0000000000000..f52ef89a2d126
--- /dev/null
+++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/models/Fleet.java
@@ -0,0 +1,354 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.computefleet.models;
+
+import com.azure.core.management.Region;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.computefleet.fluent.models.FleetInner;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * An immutable client-side representation of Fleet.
+ */
+public interface Fleet {
+ /**
+ * Gets the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * Gets the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * Gets the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * Gets the location property: The geo-location where the resource lives.
+ *
+ * @return the location value.
+ */
+ String location();
+
+ /**
+ * Gets the tags property: Resource tags.
+ *
+ * @return the tags value.
+ */
+ Map tags();
+
+ /**
+ * Gets the properties property: The resource-specific properties for this resource.
+ *
+ * @return the properties value.
+ */
+ FleetProperties properties();
+
+ /**
+ * Gets the zones property: Zones in which the Compute Fleet is available.
+ *
+ * @return the zones value.
+ */
+ List zones();
+
+ /**
+ * Gets the identity property: The managed service identities assigned to this resource.
+ *
+ * @return the identity value.
+ */
+ ManagedServiceIdentity identity();
+
+ /**
+ * Gets the plan property: Details of the resource plan.
+ *
+ * @return the plan value.
+ */
+ Plan plan();
+
+ /**
+ * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ SystemData systemData();
+
+ /**
+ * Gets the region of the resource.
+ *
+ * @return the region of the resource.
+ */
+ Region region();
+
+ /**
+ * Gets the name of the resource region.
+ *
+ * @return the name of the resource region.
+ */
+ String regionName();
+
+ /**
+ * Gets the name of the resource group.
+ *
+ * @return the name of the resource group.
+ */
+ String resourceGroupName();
+
+ /**
+ * Gets the inner com.azure.resourcemanager.computefleet.fluent.models.FleetInner object.
+ *
+ * @return the inner object.
+ */
+ FleetInner innerModel();
+
+ /**
+ * The entirety of the Fleet definition.
+ */
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation,
+ DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * The Fleet definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of the Fleet definition.
+ */
+ interface Blank extends WithLocation {
+ }
+
+ /**
+ * The stage of the Fleet definition allowing to specify location.
+ */
+ interface WithLocation {
+ /**
+ * Specifies the region for the resource.
+ *
+ * @param location The geo-location where the resource lives.
+ * @return the next definition stage.
+ */
+ WithResourceGroup withRegion(Region location);
+
+ /**
+ * Specifies the region for the resource.
+ *
+ * @param location The geo-location where the resource lives.
+ * @return the next definition stage.
+ */
+ WithResourceGroup withRegion(String location);
+ }
+
+ /**
+ * The stage of the Fleet definition allowing to specify parent resource.
+ */
+ interface WithResourceGroup {
+ /**
+ * Specifies resourceGroupName.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @return the next definition stage.
+ */
+ WithCreate withExistingResourceGroup(String resourceGroupName);
+ }
+
+ /**
+ * The stage of the Fleet definition which contains all the minimum required properties for the resource to be
+ * created, but also allows for any other optional properties to be specified.
+ */
+ interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithProperties,
+ DefinitionStages.WithZones, DefinitionStages.WithIdentity, DefinitionStages.WithPlan {
+ /**
+ * Executes the create request.
+ *
+ * @return the created resource.
+ */
+ Fleet create();
+
+ /**
+ * Executes the create request.
+ *
+ * @param context The context to associate with this operation.
+ * @return the created resource.
+ */
+ Fleet create(Context context);
+ }
+
+ /**
+ * The stage of the Fleet definition allowing to specify tags.
+ */
+ interface WithTags {
+ /**
+ * Specifies the tags property: Resource tags..
+ *
+ * @param tags Resource tags.
+ * @return the next definition stage.
+ */
+ WithCreate withTags(Map tags);
+ }
+
+ /**
+ * The stage of the Fleet definition allowing to specify properties.
+ */
+ interface WithProperties {
+ /**
+ * Specifies the properties property: The resource-specific properties for this resource..
+ *
+ * @param properties The resource-specific properties for this resource.
+ * @return the next definition stage.
+ */
+ WithCreate withProperties(FleetProperties properties);
+ }
+
+ /**
+ * The stage of the Fleet definition allowing to specify zones.
+ */
+ interface WithZones {
+ /**
+ * Specifies the zones property: Zones in which the Compute Fleet is available.
+ *
+ * @param zones Zones in which the Compute Fleet is available.
+ * @return the next definition stage.
+ */
+ WithCreate withZones(List zones);
+ }
+
+ /**
+ * The stage of the Fleet definition allowing to specify identity.
+ */
+ interface WithIdentity {
+ /**
+ * Specifies the identity property: The managed service identities assigned to this resource..
+ *
+ * @param identity The managed service identities assigned to this resource.
+ * @return the next definition stage.
+ */
+ WithCreate withIdentity(ManagedServiceIdentity identity);
+ }
+
+ /**
+ * The stage of the Fleet definition allowing to specify plan.
+ */
+ interface WithPlan {
+ /**
+ * Specifies the plan property: Details of the resource plan..
+ *
+ * @param plan Details of the resource plan.
+ * @return the next definition stage.
+ */
+ WithCreate withPlan(Plan plan);
+ }
+ }
+
+ /**
+ * Begins update for the Fleet resource.
+ *
+ * @return the stage of resource update.
+ */
+ Fleet.Update update();
+
+ /**
+ * The template for Fleet update.
+ */
+ interface Update
+ extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithPlan, UpdateStages.WithProperties {
+ /**
+ * Executes the update request.
+ *
+ * @return the updated resource.
+ */
+ Fleet apply();
+
+ /**
+ * Executes the update request.
+ *
+ * @param context The context to associate with this operation.
+ * @return the updated resource.
+ */
+ Fleet apply(Context context);
+ }
+
+ /**
+ * The Fleet update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the Fleet update allowing to specify tags.
+ */
+ interface WithTags {
+ /**
+ * Specifies the tags property: Resource tags..
+ *
+ * @param tags Resource tags.
+ * @return the next definition stage.
+ */
+ Update withTags(Map tags);
+ }
+
+ /**
+ * The stage of the Fleet update allowing to specify identity.
+ */
+ interface WithIdentity {
+ /**
+ * Specifies the identity property: Updatable managed service identity.
+ *
+ * @param identity Updatable managed service identity.
+ * @return the next definition stage.
+ */
+ Update withIdentity(ManagedServiceIdentityUpdate identity);
+ }
+
+ /**
+ * The stage of the Fleet update allowing to specify plan.
+ */
+ interface WithPlan {
+ /**
+ * Specifies the plan property: Updatable resource plan.
+ *
+ * @param plan Updatable resource plan.
+ * @return the next definition stage.
+ */
+ Update withPlan(ResourcePlanUpdate plan);
+ }
+
+ /**
+ * The stage of the Fleet update allowing to specify properties.
+ */
+ interface WithProperties {
+ /**
+ * Specifies the properties property: RP-specific updatable properties.
+ *
+ * @param properties RP-specific updatable properties.
+ * @return the next definition stage.
+ */
+ Update withProperties(FleetProperties properties);
+ }
+ }
+
+ /**
+ * Refreshes the resource to sync with Azure.
+ *
+ * @return the refreshed resource.
+ */
+ Fleet refresh();
+
+ /**
+ * Refreshes the resource to sync with Azure.
+ *
+ * @param context The context to associate with this operation.
+ * @return the refreshed resource.
+ */
+ Fleet refresh(Context context);
+}
diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/models/FleetProperties.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/models/FleetProperties.java
new file mode 100644
index 0000000000000..f90dd4745a16d
--- /dev/null
+++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/models/FleetProperties.java
@@ -0,0 +1,218 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.computefleet.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;
+
+/**
+ * Details of the Compute Fleet.
+ */
+@Fluent
+public final class FleetProperties implements JsonSerializable {
+ /*
+ * The status of the last operation.
+ */
+ private ProvisioningState provisioningState;
+
+ /*
+ * Configuration Options for Spot instances in Compute Fleet.
+ */
+ private SpotPriorityProfile spotPriorityProfile;
+
+ /*
+ * Configuration Options for Regular instances in Compute Fleet.
+ */
+ private RegularPriorityProfile regularPriorityProfile;
+
+ /*
+ * List of VM sizes supported for Compute Fleet
+ */
+ private List vmSizesProfile;
+
+ /*
+ * Compute Profile to use for running user's workloads.
+ */
+ private ComputeProfile computeProfile;
+
+ /**
+ * Creates an instance of FleetProperties class.
+ */
+ public FleetProperties() {
+ }
+
+ /**
+ * Get the provisioningState property: The status of the last operation.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Get the spotPriorityProfile property: Configuration Options for Spot instances in Compute Fleet.
+ *
+ * @return the spotPriorityProfile value.
+ */
+ public SpotPriorityProfile spotPriorityProfile() {
+ return this.spotPriorityProfile;
+ }
+
+ /**
+ * Set the spotPriorityProfile property: Configuration Options for Spot instances in Compute Fleet.
+ *
+ * @param spotPriorityProfile the spotPriorityProfile value to set.
+ * @return the FleetProperties object itself.
+ */
+ public FleetProperties withSpotPriorityProfile(SpotPriorityProfile spotPriorityProfile) {
+ this.spotPriorityProfile = spotPriorityProfile;
+ return this;
+ }
+
+ /**
+ * Get the regularPriorityProfile property: Configuration Options for Regular instances in Compute Fleet.
+ *
+ * @return the regularPriorityProfile value.
+ */
+ public RegularPriorityProfile regularPriorityProfile() {
+ return this.regularPriorityProfile;
+ }
+
+ /**
+ * Set the regularPriorityProfile property: Configuration Options for Regular instances in Compute Fleet.
+ *
+ * @param regularPriorityProfile the regularPriorityProfile value to set.
+ * @return the FleetProperties object itself.
+ */
+ public FleetProperties withRegularPriorityProfile(RegularPriorityProfile regularPriorityProfile) {
+ this.regularPriorityProfile = regularPriorityProfile;
+ return this;
+ }
+
+ /**
+ * Get the vmSizesProfile property: List of VM sizes supported for Compute Fleet.
+ *
+ * @return the vmSizesProfile value.
+ */
+ public List vmSizesProfile() {
+ return this.vmSizesProfile;
+ }
+
+ /**
+ * Set the vmSizesProfile property: List of VM sizes supported for Compute Fleet.
+ *
+ * @param vmSizesProfile the vmSizesProfile value to set.
+ * @return the FleetProperties object itself.
+ */
+ public FleetProperties withVmSizesProfile(List vmSizesProfile) {
+ this.vmSizesProfile = vmSizesProfile;
+ return this;
+ }
+
+ /**
+ * Get the computeProfile property: Compute Profile to use for running user's workloads.
+ *
+ * @return the computeProfile value.
+ */
+ public ComputeProfile computeProfile() {
+ return this.computeProfile;
+ }
+
+ /**
+ * Set the computeProfile property: Compute Profile to use for running user's workloads.
+ *
+ * @param computeProfile the computeProfile value to set.
+ * @return the FleetProperties object itself.
+ */
+ public FleetProperties withComputeProfile(ComputeProfile computeProfile) {
+ this.computeProfile = computeProfile;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (spotPriorityProfile() != null) {
+ spotPriorityProfile().validate();
+ }
+ if (regularPriorityProfile() != null) {
+ regularPriorityProfile().validate();
+ }
+ if (vmSizesProfile() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Missing required property vmSizesProfile in model FleetProperties"));
+ } else {
+ vmSizesProfile().forEach(e -> e.validate());
+ }
+ if (computeProfile() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Missing required property computeProfile in model FleetProperties"));
+ } else {
+ computeProfile().validate();
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(FleetProperties.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeArrayField("vmSizesProfile", this.vmSizesProfile,
+ (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeJsonField("computeProfile", this.computeProfile);
+ jsonWriter.writeJsonField("spotPriorityProfile", this.spotPriorityProfile);
+ jsonWriter.writeJsonField("regularPriorityProfile", this.regularPriorityProfile);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of FleetProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of FleetProperties 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 FleetProperties.
+ */
+ public static FleetProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ FleetProperties deserializedFleetProperties = new FleetProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("vmSizesProfile".equals(fieldName)) {
+ List vmSizesProfile = reader.readArray(reader1 -> VmSizeProfile.fromJson(reader1));
+ deserializedFleetProperties.vmSizesProfile = vmSizesProfile;
+ } else if ("computeProfile".equals(fieldName)) {
+ deserializedFleetProperties.computeProfile = ComputeProfile.fromJson(reader);
+ } else if ("provisioningState".equals(fieldName)) {
+ deserializedFleetProperties.provisioningState = ProvisioningState.fromString(reader.getString());
+ } else if ("spotPriorityProfile".equals(fieldName)) {
+ deserializedFleetProperties.spotPriorityProfile = SpotPriorityProfile.fromJson(reader);
+ } else if ("regularPriorityProfile".equals(fieldName)) {
+ deserializedFleetProperties.regularPriorityProfile = RegularPriorityProfile.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedFleetProperties;
+ });
+ }
+}
diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/models/FleetUpdate.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/models/FleetUpdate.java
new file mode 100644
index 0000000000000..fc76009182c30
--- /dev/null
+++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/models/FleetUpdate.java
@@ -0,0 +1,188 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.computefleet.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;
+import java.util.Map;
+
+/**
+ * Fleet Update Model.
+ */
+@Fluent
+public final class FleetUpdate implements JsonSerializable {
+ /*
+ * Resource tags.
+ */
+ private Map tags;
+
+ /*
+ * Updatable managed service identity
+ */
+ private ManagedServiceIdentityUpdate identity;
+
+ /*
+ * Updatable resource plan
+ */
+ private ResourcePlanUpdate plan;
+
+ /*
+ * RP-specific updatable properties
+ */
+ private FleetProperties properties;
+
+ /**
+ * Creates an instance of FleetUpdate class.
+ */
+ public FleetUpdate() {
+ }
+
+ /**
+ * Get the tags property: Resource tags.
+ *
+ * @return the tags value.
+ */
+ public Map tags() {
+ return this.tags;
+ }
+
+ /**
+ * Set the tags property: Resource tags.
+ *
+ * @param tags the tags value to set.
+ * @return the FleetUpdate object itself.
+ */
+ public FleetUpdate withTags(Map tags) {
+ this.tags = tags;
+ return this;
+ }
+
+ /**
+ * Get the identity property: Updatable managed service identity.
+ *
+ * @return the identity value.
+ */
+ public ManagedServiceIdentityUpdate identity() {
+ return this.identity;
+ }
+
+ /**
+ * Set the identity property: Updatable managed service identity.
+ *
+ * @param identity the identity value to set.
+ * @return the FleetUpdate object itself.
+ */
+ public FleetUpdate withIdentity(ManagedServiceIdentityUpdate identity) {
+ this.identity = identity;
+ return this;
+ }
+
+ /**
+ * Get the plan property: Updatable resource plan.
+ *
+ * @return the plan value.
+ */
+ public ResourcePlanUpdate plan() {
+ return this.plan;
+ }
+
+ /**
+ * Set the plan property: Updatable resource plan.
+ *
+ * @param plan the plan value to set.
+ * @return the FleetUpdate object itself.
+ */
+ public FleetUpdate withPlan(ResourcePlanUpdate plan) {
+ this.plan = plan;
+ return this;
+ }
+
+ /**
+ * Get the properties property: RP-specific updatable properties.
+ *
+ * @return the properties value.
+ */
+ public FleetProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: RP-specific updatable properties.
+ *
+ * @param properties the properties value to set.
+ * @return the FleetUpdate object itself.
+ */
+ public FleetUpdate withProperties(FleetProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (identity() != null) {
+ identity().validate();
+ }
+ if (plan() != null) {
+ plan().validate();
+ }
+ if (properties() != null) {
+ properties().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element));
+ jsonWriter.writeJsonField("identity", this.identity);
+ jsonWriter.writeJsonField("plan", this.plan);
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of FleetUpdate from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of FleetUpdate 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 FleetUpdate.
+ */
+ public static FleetUpdate fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ FleetUpdate deserializedFleetUpdate = new FleetUpdate();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("tags".equals(fieldName)) {
+ Map tags = reader.readMap(reader1 -> reader1.getString());
+ deserializedFleetUpdate.tags = tags;
+ } else if ("identity".equals(fieldName)) {
+ deserializedFleetUpdate.identity = ManagedServiceIdentityUpdate.fromJson(reader);
+ } else if ("plan".equals(fieldName)) {
+ deserializedFleetUpdate.plan = ResourcePlanUpdate.fromJson(reader);
+ } else if ("properties".equals(fieldName)) {
+ deserializedFleetUpdate.properties = FleetProperties.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedFleetUpdate;
+ });
+ }
+}
diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/models/Fleets.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/models/Fleets.java
new file mode 100644
index 0000000000000..743ef9709c591
--- /dev/null
+++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/models/Fleets.java
@@ -0,0 +1,183 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.computefleet.models;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+
+/**
+ * Resource collection API of Fleets.
+ */
+public interface Fleets {
+ /**
+ * Get a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Compute Fleet.
+ * @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 Fleet along with {@link Response}.
+ */
+ Response getByResourceGroupWithResponse(String resourceGroupName, String fleetName, Context context);
+
+ /**
+ * Get a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Compute Fleet.
+ * @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 Fleet.
+ */
+ Fleet getByResourceGroup(String resourceGroupName, String fleetName);
+
+ /**
+ * Delete a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Compute Fleet.
+ * @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.
+ */
+ void deleteByResourceGroup(String resourceGroupName, String fleetName);
+
+ /**
+ * Delete a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Compute Fleet.
+ * @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.
+ */
+ void delete(String resourceGroupName, String fleetName, Context context);
+
+ /**
+ * List Fleet resources by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Fleet list operation as paginated response with {@link PagedIterable}.
+ */
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * List Fleet resources by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Fleet list operation as paginated response with {@link PagedIterable}.
+ */
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+
+ /**
+ * List Fleet resources by subscription ID.
+ *
+ * @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 of a Fleet list operation as paginated response with {@link PagedIterable}.
+ */
+ PagedIterable list();
+
+ /**
+ * List Fleet resources by subscription ID.
+ *
+ * @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 of a Fleet list operation as paginated response with {@link PagedIterable}.
+ */
+ PagedIterable list(Context context);
+
+ /**
+ * List VirtualMachineScaleSet resources by Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param name The name of the Fleet.
+ * @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 of a VirtualMachineScaleSet list operation along with {@link Response}.
+ */
+ Response listVirtualMachineScaleSetsWithResponse(String resourceGroupName,
+ String name, Context context);
+
+ /**
+ * List VirtualMachineScaleSet resources by Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param name The name of the Fleet.
+ * @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 of a VirtualMachineScaleSet list operation.
+ */
+ VirtualMachineScaleSetListResult listVirtualMachineScaleSets(String resourceGroupName, String name);
+
+ /**
+ * Get a Fleet.
+ *
+ * @param id the resource ID.
+ * @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 Fleet along with {@link Response}.
+ */
+ Fleet getById(String id);
+
+ /**
+ * Get a Fleet.
+ *
+ * @param id the resource ID.
+ * @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 Fleet along with {@link Response}.
+ */
+ Response getByIdWithResponse(String id, Context context);
+
+ /**
+ * Delete a Fleet.
+ *
+ * @param id the resource ID.
+ * @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.
+ */
+ void deleteById(String id);
+
+ /**
+ * Delete a Fleet.
+ *
+ * @param id the resource ID.
+ * @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.
+ */
+ void deleteByIdWithResponse(String id, Context context);
+
+ /**
+ * Begins definition for a new Fleet resource.
+ *
+ * @param name resource name.
+ * @return the first stage of the new Fleet definition.
+ */
+ Fleet.DefinitionStages.Blank define(String name);
+}
diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/models/ManagedServiceIdentity.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/models/ManagedServiceIdentity.java
new file mode 100644
index 0000000000000..6bd83069982c7
--- /dev/null
+++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/models/ManagedServiceIdentity.java
@@ -0,0 +1,176 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.computefleet.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.Map;
+
+/**
+ * Managed service identity (system assigned and/or user assigned identities).
+ */
+@Fluent
+public final class ManagedServiceIdentity implements JsonSerializable {
+ /*
+ * The service principal ID of the system assigned identity. This property will only be provided for a system
+ * assigned identity.
+ */
+ private String principalId;
+
+ /*
+ * The tenant ID of the system assigned identity. This property will only be provided for a system assigned
+ * identity.
+ */
+ private String tenantId;
+
+ /*
+ * The type of managed identity assigned to this resource.
+ */
+ private ManagedServiceIdentityType type;
+
+ /*
+ * The identities assigned to this resource by the user.
+ */
+ private Map userAssignedIdentities;
+
+ /**
+ * Creates an instance of ManagedServiceIdentity class.
+ */
+ public ManagedServiceIdentity() {
+ }
+
+ /**
+ * Get the principalId property: The service principal ID of the system assigned identity. This property will only
+ * be provided for a system assigned identity.
+ *
+ * @return the principalId value.
+ */
+ public String principalId() {
+ return this.principalId;
+ }
+
+ /**
+ * Get the tenantId property: The tenant ID of the system assigned identity. This property will only be provided for
+ * a system assigned identity.
+ *
+ * @return the tenantId value.
+ */
+ public String tenantId() {
+ return this.tenantId;
+ }
+
+ /**
+ * Get the type property: The type of managed identity assigned to this resource.
+ *
+ * @return the type value.
+ */
+ public ManagedServiceIdentityType type() {
+ return this.type;
+ }
+
+ /**
+ * Set the type property: The type of managed identity assigned to this resource.
+ *
+ * @param type the type value to set.
+ * @return the ManagedServiceIdentity object itself.
+ */
+ public ManagedServiceIdentity withType(ManagedServiceIdentityType type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * Get the userAssignedIdentities property: The identities assigned to this resource by the user.
+ *
+ * @return the userAssignedIdentities value.
+ */
+ public Map userAssignedIdentities() {
+ return this.userAssignedIdentities;
+ }
+
+ /**
+ * Set the userAssignedIdentities property: The identities assigned to this resource by the user.
+ *
+ * @param userAssignedIdentities the userAssignedIdentities value to set.
+ * @return the ManagedServiceIdentity object itself.
+ */
+ public ManagedServiceIdentity withUserAssignedIdentities(Map userAssignedIdentities) {
+ this.userAssignedIdentities = userAssignedIdentities;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (type() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Missing required property type in model ManagedServiceIdentity"));
+ }
+ if (userAssignedIdentities() != null) {
+ userAssignedIdentities().values().forEach(e -> {
+ if (e != null) {
+ e.validate();
+ }
+ });
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(ManagedServiceIdentity.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString());
+ jsonWriter.writeMapField("userAssignedIdentities", this.userAssignedIdentities,
+ (writer, element) -> writer.writeJson(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ManagedServiceIdentity from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ManagedServiceIdentity 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 ManagedServiceIdentity.
+ */
+ public static ManagedServiceIdentity fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ManagedServiceIdentity deserializedManagedServiceIdentity = new ManagedServiceIdentity();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("type".equals(fieldName)) {
+ deserializedManagedServiceIdentity.type = ManagedServiceIdentityType.fromString(reader.getString());
+ } else if ("principalId".equals(fieldName)) {
+ deserializedManagedServiceIdentity.principalId = reader.getString();
+ } else if ("tenantId".equals(fieldName)) {
+ deserializedManagedServiceIdentity.tenantId = reader.getString();
+ } else if ("userAssignedIdentities".equals(fieldName)) {
+ Map userAssignedIdentities
+ = reader.readMap(reader1 -> UserAssignedIdentity.fromJson(reader1));
+ deserializedManagedServiceIdentity.userAssignedIdentities = userAssignedIdentities;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedManagedServiceIdentity;
+ });
+ }
+}
diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/models/ManagedServiceIdentityType.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/models/ManagedServiceIdentityType.java
new file mode 100644
index 0000000000000..a2f772284143f
--- /dev/null
+++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/models/ManagedServiceIdentityType.java
@@ -0,0 +1,62 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.computefleet.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import java.util.Collection;
+
+/**
+ * Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).
+ */
+public final class ManagedServiceIdentityType extends ExpandableStringEnum {
+ /**
+ * Static value None for ManagedServiceIdentityType.
+ */
+ public static final ManagedServiceIdentityType NONE = fromString("None");
+
+ /**
+ * Static value SystemAssigned for ManagedServiceIdentityType.
+ */
+ public static final ManagedServiceIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned");
+
+ /**
+ * Static value UserAssigned for ManagedServiceIdentityType.
+ */
+ public static final ManagedServiceIdentityType USER_ASSIGNED = fromString("UserAssigned");
+
+ /**
+ * Static value SystemAssigned,UserAssigned for ManagedServiceIdentityType.
+ */
+ public static final ManagedServiceIdentityType SYSTEM_ASSIGNED_USER_ASSIGNED
+ = fromString("SystemAssigned,UserAssigned");
+
+ /**
+ * Creates a new instance of ManagedServiceIdentityType value.
+ *
+ * @deprecated Use the {@link #fromString(String)} factory method.
+ */
+ @Deprecated
+ public ManagedServiceIdentityType() {
+ }
+
+ /**
+ * Creates or finds a ManagedServiceIdentityType from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding ManagedServiceIdentityType.
+ */
+ public static ManagedServiceIdentityType fromString(String name) {
+ return fromString(name, ManagedServiceIdentityType.class);
+ }
+
+ /**
+ * Gets known ManagedServiceIdentityType values.
+ *
+ * @return known ManagedServiceIdentityType values.
+ */
+ public static Collection values() {
+ return values(ManagedServiceIdentityType.class);
+ }
+}
diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/models/ManagedServiceIdentityUpdate.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/models/ManagedServiceIdentityUpdate.java
new file mode 100644
index 0000000000000..f66d0e528b296
--- /dev/null
+++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/models/ManagedServiceIdentityUpdate.java
@@ -0,0 +1,134 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.computefleet.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;
+import java.util.Map;
+
+/**
+ * The template for adding optional properties.
+ */
+@Fluent
+public final class ManagedServiceIdentityUpdate implements JsonSerializable {
+ /*
+ * The type of managed identity assigned to this resource.
+ */
+ private ManagedServiceIdentityType type;
+
+ /*
+ * The identities assigned to this resource by the user.
+ */
+ private Map userAssignedIdentities;
+
+ /**
+ * Creates an instance of ManagedServiceIdentityUpdate class.
+ */
+ public ManagedServiceIdentityUpdate() {
+ }
+
+ /**
+ * Get the type property: The type of managed identity assigned to this resource.
+ *
+ * @return the type value.
+ */
+ public ManagedServiceIdentityType type() {
+ return this.type;
+ }
+
+ /**
+ * Set the type property: The type of managed identity assigned to this resource.
+ *
+ * @param type the type value to set.
+ * @return the ManagedServiceIdentityUpdate object itself.
+ */
+ public ManagedServiceIdentityUpdate withType(ManagedServiceIdentityType type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * Get the userAssignedIdentities property: The identities assigned to this resource by the user.
+ *
+ * @return the userAssignedIdentities value.
+ */
+ public Map userAssignedIdentities() {
+ return this.userAssignedIdentities;
+ }
+
+ /**
+ * Set the userAssignedIdentities property: The identities assigned to this resource by the user.
+ *
+ * @param userAssignedIdentities the userAssignedIdentities value to set.
+ * @return the ManagedServiceIdentityUpdate object itself.
+ */
+ public ManagedServiceIdentityUpdate
+ withUserAssignedIdentities(Map userAssignedIdentities) {
+ this.userAssignedIdentities = userAssignedIdentities;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (userAssignedIdentities() != null) {
+ userAssignedIdentities().values().forEach(e -> {
+ if (e != null) {
+ e.validate();
+ }
+ });
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString());
+ jsonWriter.writeMapField("userAssignedIdentities", this.userAssignedIdentities,
+ (writer, element) -> writer.writeJson(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ManagedServiceIdentityUpdate from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ManagedServiceIdentityUpdate 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 ManagedServiceIdentityUpdate.
+ */
+ public static ManagedServiceIdentityUpdate fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ManagedServiceIdentityUpdate deserializedManagedServiceIdentityUpdate = new ManagedServiceIdentityUpdate();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("type".equals(fieldName)) {
+ deserializedManagedServiceIdentityUpdate.type
+ = ManagedServiceIdentityType.fromString(reader.getString());
+ } else if ("userAssignedIdentities".equals(fieldName)) {
+ Map userAssignedIdentities
+ = reader.readMap(reader1 -> UserAssignedIdentity.fromJson(reader1));
+ deserializedManagedServiceIdentityUpdate.userAssignedIdentities = userAssignedIdentities;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedManagedServiceIdentityUpdate;
+ });
+ }
+}
diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/models/Operation.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/models/Operation.java
new file mode 100644
index 0000000000000..7aa5d577017d0
--- /dev/null
+++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/models/Operation.java
@@ -0,0 +1,58 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.computefleet.models;
+
+import com.azure.resourcemanager.computefleet.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 Azure Resource Manager/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: Extensible 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.computefleet.fluent.models.OperationInner object.
+ *
+ * @return the inner object.
+ */
+ OperationInner innerModel();
+}
diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/models/OperationDisplay.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/models/OperationDisplay.java
new file mode 100644
index 0000000000000..f3fda147c45b2
--- /dev/null
+++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/models/OperationDisplay.java
@@ -0,0 +1,140 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.computefleet.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 and 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.
+ */
+ private 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();
+ jsonWriter.writeStringField("provider", this.provider);
+ jsonWriter.writeStringField("resource", this.resource);
+ jsonWriter.writeStringField("operation", this.operation);
+ jsonWriter.writeStringField("description", this.description);
+ 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/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/models/Operations.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/models/Operations.java
new file mode 100644
index 0000000000000..5bbdabc2beee7
--- /dev/null
+++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/models/Operations.java
@@ -0,0 +1,35 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.computefleet.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