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 azurefleet service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the azurefleet service API instance.
+ */
+ public AzurefleetManager 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.azurefleet")
+ .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 AzurefleetManager(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 the resource collection API of VirtualMachineScaleSets.
+ *
+ * @return Resource collection API of VirtualMachineScaleSets.
+ */
+ public VirtualMachineScaleSets virtualMachineScaleSets() {
+ if (this.virtualMachineScaleSets == null) {
+ this.virtualMachineScaleSets
+ = new VirtualMachineScaleSetsImpl(clientObject.getVirtualMachineScaleSets(), this);
+ }
+ return virtualMachineScaleSets;
+ }
+
+ /**
+ * Gets wrapped service client MicrosoftAzureFleet providing direct access to the underlying auto-generated API
+ * implementation, based on Azure REST API.
+ *
+ * @return Wrapped service client MicrosoftAzureFleet.
+ */
+ public MicrosoftAzureFleet serviceClient() {
+ return this.clientObject;
+ }
+}
diff --git a/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/fluent/FleetsClient.java b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/fluent/FleetsClient.java
new file mode 100644
index 000000000000..b258455d9501
--- /dev/null
+++ b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/fluent/FleetsClient.java
@@ -0,0 +1,266 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurefleet.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.azurefleet.fluent.models.FleetInner;
+import com.azure.resourcemanager.azurefleet.models.FleetUpdate;
+
+/**
+ * An instance of this class provides access to all the operations defined in FleetsClient.
+ */
+public interface FleetsClient {
+ /**
+ * 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 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);
+
+ /**
+ * 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);
+}
diff --git a/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/fluent/MicrosoftAzureFleet.java b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/fluent/MicrosoftAzureFleet.java
new file mode 100644
index 000000000000..aa0e094d9d75
--- /dev/null
+++ b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/fluent/MicrosoftAzureFleet.java
@@ -0,0 +1,69 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurefleet.fluent;
+
+import com.azure.core.http.HttpPipeline;
+import java.time.Duration;
+
+/**
+ * The interface for MicrosoftAzureFleet class.
+ */
+public interface MicrosoftAzureFleet {
+ /**
+ * Gets The ID of the target subscription. The value must be an UUID.
+ *
+ * @return the subscriptionId value.
+ */
+ String getSubscriptionId();
+
+ /**
+ * Gets server parameter.
+ *
+ * @return the endpoint value.
+ */
+ String getEndpoint();
+
+ /**
+ * Gets Api Version.
+ *
+ * @return the apiVersion value.
+ */
+ String getApiVersion();
+
+ /**
+ * Gets The HTTP pipeline to send requests through.
+ *
+ * @return the httpPipeline value.
+ */
+ HttpPipeline getHttpPipeline();
+
+ /**
+ * Gets The default poll interval for long-running operation.
+ *
+ * @return the defaultPollInterval value.
+ */
+ Duration getDefaultPollInterval();
+
+ /**
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ OperationsClient getOperations();
+
+ /**
+ * Gets the FleetsClient object to access its operations.
+ *
+ * @return the FleetsClient object.
+ */
+ FleetsClient getFleets();
+
+ /**
+ * Gets the VirtualMachineScaleSetsClient object to access its operations.
+ *
+ * @return the VirtualMachineScaleSetsClient object.
+ */
+ VirtualMachineScaleSetsClient getVirtualMachineScaleSets();
+}
diff --git a/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/fluent/OperationsClient.java b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/fluent/OperationsClient.java
new file mode 100644
index 000000000000..286f74f260ac
--- /dev/null
+++ b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/fluent/OperationsClient.java
@@ -0,0 +1,40 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurefleet.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.azurefleet.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/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/fluent/VirtualMachineScaleSetsClient.java b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/fluent/VirtualMachineScaleSetsClient.java
new file mode 100644
index 000000000000..ae7c54e69ea2
--- /dev/null
+++ b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/fluent/VirtualMachineScaleSetsClient.java
@@ -0,0 +1,43 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurefleet.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.azurefleet.fluent.models.VirtualMachineScaleSetInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in VirtualMachineScaleSetsClient.
+ */
+public interface VirtualMachineScaleSetsClient {
+ /**
+ * 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 as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByFleet(String resourceGroupName, String name);
+
+ /**
+ * 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 as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByFleet(String resourceGroupName, String name, Context context);
+}
diff --git a/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/fluent/models/FleetInner.java b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/fluent/models/FleetInner.java
new file mode 100644
index 000000000000..674221fbc82f
--- /dev/null
+++ b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/fluent/models/FleetInner.java
@@ -0,0 +1,275 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurefleet.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.Resource;
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.azurefleet.models.ComputeProfile;
+import com.azure.resourcemanager.azurefleet.models.ManagedServiceIdentity;
+import com.azure.resourcemanager.azurefleet.models.Plan;
+import com.azure.resourcemanager.azurefleet.models.ProvisioningState;
+import com.azure.resourcemanager.azurefleet.models.RegularPriorityProfile;
+import com.azure.resourcemanager.azurefleet.models.SpotPriorityProfile;
+import com.azure.resourcemanager.azurefleet.models.VmSizeProfile;
+import com.fasterxml.jackson.annotation.JsonProperty;
+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.
+ */
+ @JsonProperty(value = "properties")
+ private FleetProperties innerProperties;
+
+ /*
+ * Zones in which the Compute Fleet is available
+ */
+ @JsonProperty(value = "zones")
+ private List zones;
+
+ /*
+ * The managed service identities assigned to this resource.
+ */
+ @JsonProperty(value = "identity")
+ private ManagedServiceIdentity identity;
+
+ /*
+ * Details of the resource plan.
+ */
+ @JsonProperty(value = "plan")
+ private Plan plan;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /**
+ * Creates an instance of FleetInner class.
+ */
+ public FleetInner() {
+ }
+
+ /**
+ * Get the innerProperties property: The resource-specific properties for this resource.
+ *
+ * @return the innerProperties value.
+ */
+ private FleetProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * 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;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public FleetInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public FleetInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: The status of the last operation.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * Get the spotPriorityProfile property: Configuration Options for Spot instances in Compute Fleet.
+ *
+ * @return the spotPriorityProfile value.
+ */
+ public SpotPriorityProfile spotPriorityProfile() {
+ return this.innerProperties() == null ? null : this.innerProperties().spotPriorityProfile();
+ }
+
+ /**
+ * Set the spotPriorityProfile property: Configuration Options for Spot instances in Compute Fleet.
+ *
+ * @param spotPriorityProfile the spotPriorityProfile value to set.
+ * @return the FleetInner object itself.
+ */
+ public FleetInner withSpotPriorityProfile(SpotPriorityProfile spotPriorityProfile) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new FleetProperties();
+ }
+ this.innerProperties().withSpotPriorityProfile(spotPriorityProfile);
+ return this;
+ }
+
+ /**
+ * Get the regularPriorityProfile property: Configuration Options for Regular instances in Compute Fleet.
+ *
+ * @return the regularPriorityProfile value.
+ */
+ public RegularPriorityProfile regularPriorityProfile() {
+ return this.innerProperties() == null ? null : this.innerProperties().regularPriorityProfile();
+ }
+
+ /**
+ * Set the regularPriorityProfile property: Configuration Options for Regular instances in Compute Fleet.
+ *
+ * @param regularPriorityProfile the regularPriorityProfile value to set.
+ * @return the FleetInner object itself.
+ */
+ public FleetInner withRegularPriorityProfile(RegularPriorityProfile regularPriorityProfile) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new FleetProperties();
+ }
+ this.innerProperties().withRegularPriorityProfile(regularPriorityProfile);
+ return this;
+ }
+
+ /**
+ * Get the vmSizesProfile property: List of VM sizes supported for Compute Fleet.
+ *
+ * @return the vmSizesProfile value.
+ */
+ public List vmSizesProfile() {
+ return this.innerProperties() == null ? null : this.innerProperties().vmSizesProfile();
+ }
+
+ /**
+ * Set the vmSizesProfile property: List of VM sizes supported for Compute Fleet.
+ *
+ * @param vmSizesProfile the vmSizesProfile value to set.
+ * @return the FleetInner object itself.
+ */
+ public FleetInner withVmSizesProfile(List vmSizesProfile) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new FleetProperties();
+ }
+ this.innerProperties().withVmSizesProfile(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.innerProperties() == null ? null : this.innerProperties().computeProfile();
+ }
+
+ /**
+ * Set the computeProfile property: Compute Profile to use for running user's workloads.
+ *
+ * @param computeProfile the computeProfile value to set.
+ * @return the FleetInner object itself.
+ */
+ public FleetInner withComputeProfile(ComputeProfile computeProfile) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new FleetProperties();
+ }
+ this.innerProperties().withComputeProfile(computeProfile);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ if (identity() != null) {
+ identity().validate();
+ }
+ if (plan() != null) {
+ plan().validate();
+ }
+ }
+}
diff --git a/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/fluent/models/FleetProperties.java b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/fluent/models/FleetProperties.java
new file mode 100644
index 000000000000..426bd5cbd532
--- /dev/null
+++ b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/fluent/models/FleetProperties.java
@@ -0,0 +1,174 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurefleet.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.azurefleet.models.ComputeProfile;
+import com.azure.resourcemanager.azurefleet.models.ProvisioningState;
+import com.azure.resourcemanager.azurefleet.models.RegularPriorityProfile;
+import com.azure.resourcemanager.azurefleet.models.SpotPriorityProfile;
+import com.azure.resourcemanager.azurefleet.models.VmSizeProfile;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/**
+ * Details of the Compute Fleet.
+ */
+@Fluent
+public final class FleetProperties {
+ /*
+ * The status of the last operation.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningState provisioningState;
+
+ /*
+ * Configuration Options for Spot instances in Compute Fleet.
+ */
+ @JsonProperty(value = "spotPriorityProfile")
+ private SpotPriorityProfile spotPriorityProfile;
+
+ /*
+ * Configuration Options for Regular instances in Compute Fleet.
+ */
+ @JsonProperty(value = "regularPriorityProfile")
+ private RegularPriorityProfile regularPriorityProfile;
+
+ /*
+ * List of VM sizes supported for Compute Fleet
+ */
+ @JsonProperty(value = "vmSizesProfile", required = true)
+ private List vmSizesProfile;
+
+ /*
+ * Compute Profile to use for running user's workloads.
+ */
+ @JsonProperty(value = "computeProfile", required = true)
+ 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);
+}
diff --git a/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/fluent/models/OperationInner.java b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/fluent/models/OperationInner.java
new file mode 100644
index 000000000000..1dd72ee37baa
--- /dev/null
+++ b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/fluent/models/OperationInner.java
@@ -0,0 +1,126 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurefleet.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.azurefleet.models.ActionType;
+import com.azure.resourcemanager.azurefleet.models.OperationDisplay;
+import com.azure.resourcemanager.azurefleet.models.Origin;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * REST API Operation
+ *
+ * Details of a REST API operation, returned from the Resource Provider Operations API.
+ */
+@Fluent
+public final class OperationInner {
+ /*
+ * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action"
+ */
+ @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
+ private String name;
+
+ /*
+ * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane operations.
+ */
+ @JsonProperty(value = "isDataAction", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean isDataAction;
+
+ /*
+ * Localized display information for this particular operation.
+ */
+ @JsonProperty(value = "display")
+ private OperationDisplay display;
+
+ /*
+ * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system"
+ */
+ @JsonProperty(value = "origin", access = JsonProperty.Access.WRITE_ONLY)
+ private Origin origin;
+
+ /*
+ * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
+ */
+ @JsonProperty(value = "actionType", access = JsonProperty.Access.WRITE_ONLY)
+ private ActionType actionType;
+
+ /**
+ * Creates an instance of OperationInner class.
+ */
+ public OperationInner() {
+ }
+
+ /**
+ * Get the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples:
+ * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action".
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane
+ * operations and "false" for ARM/control-plane operations.
+ *
+ * @return the isDataAction value.
+ */
+ public Boolean isDataAction() {
+ return this.isDataAction;
+ }
+
+ /**
+ * Get the display property: Localized display information for this particular operation.
+ *
+ * @return the display value.
+ */
+ public OperationDisplay display() {
+ return this.display;
+ }
+
+ /**
+ * Set the display property: Localized display information for this particular operation.
+ *
+ * @param display the display value to set.
+ * @return the OperationInner object itself.
+ */
+ public OperationInner withDisplay(OperationDisplay display) {
+ this.display = display;
+ return this;
+ }
+
+ /**
+ * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and
+ * audit logs UX. Default value is "user,system".
+ *
+ * @return the origin value.
+ */
+ public Origin origin() {
+ return this.origin;
+ }
+
+ /**
+ * Get the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal
+ * only APIs.
+ *
+ * @return the actionType value.
+ */
+ public ActionType actionType() {
+ return this.actionType;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (display() != null) {
+ display().validate();
+ }
+ }
+}
diff --git a/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/fluent/models/VirtualMachineExtensionProperties.java b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/fluent/models/VirtualMachineExtensionProperties.java
new file mode 100644
index 000000000000..0a0dd9db986a
--- /dev/null
+++ b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/fluent/models/VirtualMachineExtensionProperties.java
@@ -0,0 +1,383 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurefleet.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.azurefleet.models.KeyVaultSecretReference;
+import com.azure.resourcemanager.azurefleet.models.VirtualMachineExtensionInstanceView;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/**
+ * Describes the properties of a Virtual Machine Extension.
+ */
+@Fluent
+public final class VirtualMachineExtensionProperties {
+ /*
+ * How the extension handler should be forced to update even if the extension configuration has not changed.
+ */
+ @JsonProperty(value = "forceUpdateTag")
+ private String forceUpdateTag;
+
+ /*
+ * The name of the extension handler publisher.
+ */
+ @JsonProperty(value = "publisher")
+ private String publisher;
+
+ /*
+ * Specifies the type of the extension; an example is "CustomScriptExtension".
+ */
+ @JsonProperty(value = "type")
+ private String type;
+
+ /*
+ * Specifies the version of the script handler.
+ */
+ @JsonProperty(value = "typeHandlerVersion")
+ private String typeHandlerVersion;
+
+ /*
+ * Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true.
+ */
+ @JsonProperty(value = "autoUpgradeMinorVersion")
+ private Boolean autoUpgradeMinorVersion;
+
+ /*
+ * Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available.
+ */
+ @JsonProperty(value = "enableAutomaticUpgrade")
+ private Boolean enableAutomaticUpgrade;
+
+ /*
+ * Json formatted public settings for the extension.
+ */
+ @JsonProperty(value = "settings")
+ private Object settings;
+
+ /*
+ * The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.
+ */
+ @JsonProperty(value = "protectedSettings")
+ private Object protectedSettings;
+
+ /*
+ * The provisioning state, which only appears in the response.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private String provisioningState;
+
+ /*
+ * The virtual machine extension instance view.
+ */
+ @JsonProperty(value = "instanceView")
+ private VirtualMachineExtensionInstanceView instanceView;
+
+ /*
+ * Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false.
+ */
+ @JsonProperty(value = "suppressFailures")
+ private Boolean suppressFailures;
+
+ /*
+ * The extensions protected settings that are passed by reference, and consumed from key vault
+ */
+ @JsonProperty(value = "protectedSettingsFromKeyVault")
+ private KeyVaultSecretReference protectedSettingsFromKeyVault;
+
+ /*
+ * Collection of extension names after which this extension needs to be provisioned.
+ */
+ @JsonProperty(value = "provisionAfterExtensions")
+ private List provisionAfterExtensions;
+
+ /**
+ * Creates an instance of VirtualMachineExtensionProperties class.
+ */
+ public VirtualMachineExtensionProperties() {
+ }
+
+ /**
+ * Get the forceUpdateTag property: How the extension handler should be forced to update even if the extension
+ * configuration has not changed.
+ *
+ * @return the forceUpdateTag value.
+ */
+ public String forceUpdateTag() {
+ return this.forceUpdateTag;
+ }
+
+ /**
+ * Set the forceUpdateTag property: How the extension handler should be forced to update even if the extension
+ * configuration has not changed.
+ *
+ * @param forceUpdateTag the forceUpdateTag value to set.
+ * @return the VirtualMachineExtensionProperties object itself.
+ */
+ public VirtualMachineExtensionProperties withForceUpdateTag(String forceUpdateTag) {
+ this.forceUpdateTag = forceUpdateTag;
+ return this;
+ }
+
+ /**
+ * Get the publisher property: The name of the extension handler publisher.
+ *
+ * @return the publisher value.
+ */
+ public String publisher() {
+ return this.publisher;
+ }
+
+ /**
+ * Set the publisher property: The name of the extension handler publisher.
+ *
+ * @param publisher the publisher value to set.
+ * @return the VirtualMachineExtensionProperties object itself.
+ */
+ public VirtualMachineExtensionProperties withPublisher(String publisher) {
+ this.publisher = publisher;
+ return this;
+ }
+
+ /**
+ * Get the type property: Specifies the type of the extension; an example is "CustomScriptExtension".
+ *
+ * @return the type value.
+ */
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Set the type property: Specifies the type of the extension; an example is "CustomScriptExtension".
+ *
+ * @param type the type value to set.
+ * @return the VirtualMachineExtensionProperties object itself.
+ */
+ public VirtualMachineExtensionProperties withType(String type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * Get the typeHandlerVersion property: Specifies the version of the script handler.
+ *
+ * @return the typeHandlerVersion value.
+ */
+ public String typeHandlerVersion() {
+ return this.typeHandlerVersion;
+ }
+
+ /**
+ * Set the typeHandlerVersion property: Specifies the version of the script handler.
+ *
+ * @param typeHandlerVersion the typeHandlerVersion value to set.
+ * @return the VirtualMachineExtensionProperties object itself.
+ */
+ public VirtualMachineExtensionProperties withTypeHandlerVersion(String typeHandlerVersion) {
+ this.typeHandlerVersion = typeHandlerVersion;
+ return this;
+ }
+
+ /**
+ * Get the autoUpgradeMinorVersion property: Indicates whether the extension should use a newer minor version if one
+ * is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless
+ * redeployed, even with this property set to true.
+ *
+ * @return the autoUpgradeMinorVersion value.
+ */
+ public Boolean autoUpgradeMinorVersion() {
+ return this.autoUpgradeMinorVersion;
+ }
+
+ /**
+ * Set the autoUpgradeMinorVersion property: Indicates whether the extension should use a newer minor version if one
+ * is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless
+ * redeployed, even with this property set to true.
+ *
+ * @param autoUpgradeMinorVersion the autoUpgradeMinorVersion value to set.
+ * @return the VirtualMachineExtensionProperties object itself.
+ */
+ public VirtualMachineExtensionProperties withAutoUpgradeMinorVersion(Boolean autoUpgradeMinorVersion) {
+ this.autoUpgradeMinorVersion = autoUpgradeMinorVersion;
+ return this;
+ }
+
+ /**
+ * Get the enableAutomaticUpgrade property: Indicates whether the extension should be automatically upgraded by the
+ * platform if there is a newer version of the extension available.
+ *
+ * @return the enableAutomaticUpgrade value.
+ */
+ public Boolean enableAutomaticUpgrade() {
+ return this.enableAutomaticUpgrade;
+ }
+
+ /**
+ * Set the enableAutomaticUpgrade property: Indicates whether the extension should be automatically upgraded by the
+ * platform if there is a newer version of the extension available.
+ *
+ * @param enableAutomaticUpgrade the enableAutomaticUpgrade value to set.
+ * @return the VirtualMachineExtensionProperties object itself.
+ */
+ public VirtualMachineExtensionProperties withEnableAutomaticUpgrade(Boolean enableAutomaticUpgrade) {
+ this.enableAutomaticUpgrade = enableAutomaticUpgrade;
+ return this;
+ }
+
+ /**
+ * Get the settings property: Json formatted public settings for the extension.
+ *
+ * @return the settings value.
+ */
+ public Object settings() {
+ return this.settings;
+ }
+
+ /**
+ * Set the settings property: Json formatted public settings for the extension.
+ *
+ * @param settings the settings value to set.
+ * @return the VirtualMachineExtensionProperties object itself.
+ */
+ public VirtualMachineExtensionProperties withSettings(Object settings) {
+ this.settings = settings;
+ return this;
+ }
+
+ /**
+ * Get the protectedSettings property: The extension can contain either protectedSettings or
+ * protectedSettingsFromKeyVault or no protected settings at all.
+ *
+ * @return the protectedSettings value.
+ */
+ public Object protectedSettings() {
+ return this.protectedSettings;
+ }
+
+ /**
+ * Set the protectedSettings property: The extension can contain either protectedSettings or
+ * protectedSettingsFromKeyVault or no protected settings at all.
+ *
+ * @param protectedSettings the protectedSettings value to set.
+ * @return the VirtualMachineExtensionProperties object itself.
+ */
+ public VirtualMachineExtensionProperties withProtectedSettings(Object protectedSettings) {
+ this.protectedSettings = protectedSettings;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: The provisioning state, which only appears in the response.
+ *
+ * @return the provisioningState value.
+ */
+ public String provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Get the instanceView property: The virtual machine extension instance view.
+ *
+ * @return the instanceView value.
+ */
+ public VirtualMachineExtensionInstanceView instanceView() {
+ return this.instanceView;
+ }
+
+ /**
+ * Set the instanceView property: The virtual machine extension instance view.
+ *
+ * @param instanceView the instanceView value to set.
+ * @return the VirtualMachineExtensionProperties object itself.
+ */
+ public VirtualMachineExtensionProperties withInstanceView(VirtualMachineExtensionInstanceView instanceView) {
+ this.instanceView = instanceView;
+ return this;
+ }
+
+ /**
+ * Get the suppressFailures property: Indicates whether failures stemming from the extension will be suppressed
+ * (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The
+ * default is false.
+ *
+ * @return the suppressFailures value.
+ */
+ public Boolean suppressFailures() {
+ return this.suppressFailures;
+ }
+
+ /**
+ * Set the suppressFailures property: Indicates whether failures stemming from the extension will be suppressed
+ * (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The
+ * default is false.
+ *
+ * @param suppressFailures the suppressFailures value to set.
+ * @return the VirtualMachineExtensionProperties object itself.
+ */
+ public VirtualMachineExtensionProperties withSuppressFailures(Boolean suppressFailures) {
+ this.suppressFailures = suppressFailures;
+ return this;
+ }
+
+ /**
+ * Get the protectedSettingsFromKeyVault property: The extensions protected settings that are passed by reference,
+ * and consumed from key vault.
+ *
+ * @return the protectedSettingsFromKeyVault value.
+ */
+ public KeyVaultSecretReference protectedSettingsFromKeyVault() {
+ return this.protectedSettingsFromKeyVault;
+ }
+
+ /**
+ * Set the protectedSettingsFromKeyVault property: The extensions protected settings that are passed by reference,
+ * and consumed from key vault.
+ *
+ * @param protectedSettingsFromKeyVault the protectedSettingsFromKeyVault value to set.
+ * @return the VirtualMachineExtensionProperties object itself.
+ */
+ public VirtualMachineExtensionProperties
+ withProtectedSettingsFromKeyVault(KeyVaultSecretReference protectedSettingsFromKeyVault) {
+ this.protectedSettingsFromKeyVault = protectedSettingsFromKeyVault;
+ return this;
+ }
+
+ /**
+ * Get the provisionAfterExtensions property: Collection of extension names after which this extension needs to be
+ * provisioned.
+ *
+ * @return the provisionAfterExtensions value.
+ */
+ public List provisionAfterExtensions() {
+ return this.provisionAfterExtensions;
+ }
+
+ /**
+ * Set the provisionAfterExtensions property: Collection of extension names after which this extension needs to be
+ * provisioned.
+ *
+ * @param provisionAfterExtensions the provisionAfterExtensions value to set.
+ * @return the VirtualMachineExtensionProperties object itself.
+ */
+ public VirtualMachineExtensionProperties withProvisionAfterExtensions(List provisionAfterExtensions) {
+ this.provisionAfterExtensions = provisionAfterExtensions;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (instanceView() != null) {
+ instanceView().validate();
+ }
+ if (protectedSettingsFromKeyVault() != null) {
+ protectedSettingsFromKeyVault().validate();
+ }
+ }
+}
diff --git a/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/fluent/models/VirtualMachineScaleSetExtensionProperties.java b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/fluent/models/VirtualMachineScaleSetExtensionProperties.java
new file mode 100644
index 000000000000..31b762b6b06c
--- /dev/null
+++ b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/fluent/models/VirtualMachineScaleSetExtensionProperties.java
@@ -0,0 +1,354 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurefleet.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.azurefleet.models.KeyVaultSecretReference;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/**
+ * Describes the properties of a Virtual Machine Scale Set Extension.
+ */
+@Fluent
+public final class VirtualMachineScaleSetExtensionProperties {
+ /*
+ * If a value is provided and is different from the previous value, the extension handler will be forced to update even if the extension configuration has not changed.
+ */
+ @JsonProperty(value = "forceUpdateTag")
+ private String forceUpdateTag;
+
+ /*
+ * The name of the extension handler publisher.
+ */
+ @JsonProperty(value = "publisher")
+ private String publisher;
+
+ /*
+ * Specifies the type of the extension; an example is "CustomScriptExtension".
+ */
+ @JsonProperty(value = "type")
+ private String type;
+
+ /*
+ * Specifies the version of the script handler.
+ */
+ @JsonProperty(value = "typeHandlerVersion")
+ private String typeHandlerVersion;
+
+ /*
+ * Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true.
+ */
+ @JsonProperty(value = "autoUpgradeMinorVersion")
+ private Boolean autoUpgradeMinorVersion;
+
+ /*
+ * Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available.
+ */
+ @JsonProperty(value = "enableAutomaticUpgrade")
+ private Boolean enableAutomaticUpgrade;
+
+ /*
+ * Json formatted public settings for the extension.
+ */
+ @JsonProperty(value = "settings")
+ private Object settings;
+
+ /*
+ * The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.
+ */
+ @JsonProperty(value = "protectedSettings")
+ private Object protectedSettings;
+
+ /*
+ * The provisioning state, which only appears in the response.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private String provisioningState;
+
+ /*
+ * Collection of extension names after which this extension needs to be provisioned.
+ */
+ @JsonProperty(value = "provisionAfterExtensions")
+ private List provisionAfterExtensions;
+
+ /*
+ * Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false.
+ */
+ @JsonProperty(value = "suppressFailures")
+ private Boolean suppressFailures;
+
+ /*
+ * The extensions protected settings that are passed by reference, and consumed from key vault
+ */
+ @JsonProperty(value = "protectedSettingsFromKeyVault")
+ private KeyVaultSecretReference protectedSettingsFromKeyVault;
+
+ /**
+ * Creates an instance of VirtualMachineScaleSetExtensionProperties class.
+ */
+ public VirtualMachineScaleSetExtensionProperties() {
+ }
+
+ /**
+ * Get the forceUpdateTag property: If a value is provided and is different from the previous value, the extension
+ * handler will be forced to update even if the extension configuration has not changed.
+ *
+ * @return the forceUpdateTag value.
+ */
+ public String forceUpdateTag() {
+ return this.forceUpdateTag;
+ }
+
+ /**
+ * Set the forceUpdateTag property: If a value is provided and is different from the previous value, the extension
+ * handler will be forced to update even if the extension configuration has not changed.
+ *
+ * @param forceUpdateTag the forceUpdateTag value to set.
+ * @return the VirtualMachineScaleSetExtensionProperties object itself.
+ */
+ public VirtualMachineScaleSetExtensionProperties withForceUpdateTag(String forceUpdateTag) {
+ this.forceUpdateTag = forceUpdateTag;
+ return this;
+ }
+
+ /**
+ * Get the publisher property: The name of the extension handler publisher.
+ *
+ * @return the publisher value.
+ */
+ public String publisher() {
+ return this.publisher;
+ }
+
+ /**
+ * Set the publisher property: The name of the extension handler publisher.
+ *
+ * @param publisher the publisher value to set.
+ * @return the VirtualMachineScaleSetExtensionProperties object itself.
+ */
+ public VirtualMachineScaleSetExtensionProperties withPublisher(String publisher) {
+ this.publisher = publisher;
+ return this;
+ }
+
+ /**
+ * Get the type property: Specifies the type of the extension; an example is "CustomScriptExtension".
+ *
+ * @return the type value.
+ */
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Set the type property: Specifies the type of the extension; an example is "CustomScriptExtension".
+ *
+ * @param type the type value to set.
+ * @return the VirtualMachineScaleSetExtensionProperties object itself.
+ */
+ public VirtualMachineScaleSetExtensionProperties withType(String type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * Get the typeHandlerVersion property: Specifies the version of the script handler.
+ *
+ * @return the typeHandlerVersion value.
+ */
+ public String typeHandlerVersion() {
+ return this.typeHandlerVersion;
+ }
+
+ /**
+ * Set the typeHandlerVersion property: Specifies the version of the script handler.
+ *
+ * @param typeHandlerVersion the typeHandlerVersion value to set.
+ * @return the VirtualMachineScaleSetExtensionProperties object itself.
+ */
+ public VirtualMachineScaleSetExtensionProperties withTypeHandlerVersion(String typeHandlerVersion) {
+ this.typeHandlerVersion = typeHandlerVersion;
+ return this;
+ }
+
+ /**
+ * Get the autoUpgradeMinorVersion property: Indicates whether the extension should use a newer minor version if one
+ * is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless
+ * redeployed, even with this property set to true.
+ *
+ * @return the autoUpgradeMinorVersion value.
+ */
+ public Boolean autoUpgradeMinorVersion() {
+ return this.autoUpgradeMinorVersion;
+ }
+
+ /**
+ * Set the autoUpgradeMinorVersion property: Indicates whether the extension should use a newer minor version if one
+ * is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless
+ * redeployed, even with this property set to true.
+ *
+ * @param autoUpgradeMinorVersion the autoUpgradeMinorVersion value to set.
+ * @return the VirtualMachineScaleSetExtensionProperties object itself.
+ */
+ public VirtualMachineScaleSetExtensionProperties withAutoUpgradeMinorVersion(Boolean autoUpgradeMinorVersion) {
+ this.autoUpgradeMinorVersion = autoUpgradeMinorVersion;
+ return this;
+ }
+
+ /**
+ * Get the enableAutomaticUpgrade property: Indicates whether the extension should be automatically upgraded by the
+ * platform if there is a newer version of the extension available.
+ *
+ * @return the enableAutomaticUpgrade value.
+ */
+ public Boolean enableAutomaticUpgrade() {
+ return this.enableAutomaticUpgrade;
+ }
+
+ /**
+ * Set the enableAutomaticUpgrade property: Indicates whether the extension should be automatically upgraded by the
+ * platform if there is a newer version of the extension available.
+ *
+ * @param enableAutomaticUpgrade the enableAutomaticUpgrade value to set.
+ * @return the VirtualMachineScaleSetExtensionProperties object itself.
+ */
+ public VirtualMachineScaleSetExtensionProperties withEnableAutomaticUpgrade(Boolean enableAutomaticUpgrade) {
+ this.enableAutomaticUpgrade = enableAutomaticUpgrade;
+ return this;
+ }
+
+ /**
+ * Get the settings property: Json formatted public settings for the extension.
+ *
+ * @return the settings value.
+ */
+ public Object settings() {
+ return this.settings;
+ }
+
+ /**
+ * Set the settings property: Json formatted public settings for the extension.
+ *
+ * @param settings the settings value to set.
+ * @return the VirtualMachineScaleSetExtensionProperties object itself.
+ */
+ public VirtualMachineScaleSetExtensionProperties withSettings(Object settings) {
+ this.settings = settings;
+ return this;
+ }
+
+ /**
+ * Get the protectedSettings property: The extension can contain either protectedSettings or
+ * protectedSettingsFromKeyVault or no protected settings at all.
+ *
+ * @return the protectedSettings value.
+ */
+ public Object protectedSettings() {
+ return this.protectedSettings;
+ }
+
+ /**
+ * Set the protectedSettings property: The extension can contain either protectedSettings or
+ * protectedSettingsFromKeyVault or no protected settings at all.
+ *
+ * @param protectedSettings the protectedSettings value to set.
+ * @return the VirtualMachineScaleSetExtensionProperties object itself.
+ */
+ public VirtualMachineScaleSetExtensionProperties withProtectedSettings(Object protectedSettings) {
+ this.protectedSettings = protectedSettings;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: The provisioning state, which only appears in the response.
+ *
+ * @return the provisioningState value.
+ */
+ public String provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Get the provisionAfterExtensions property: Collection of extension names after which this extension needs to be
+ * provisioned.
+ *
+ * @return the provisionAfterExtensions value.
+ */
+ public List provisionAfterExtensions() {
+ return this.provisionAfterExtensions;
+ }
+
+ /**
+ * Set the provisionAfterExtensions property: Collection of extension names after which this extension needs to be
+ * provisioned.
+ *
+ * @param provisionAfterExtensions the provisionAfterExtensions value to set.
+ * @return the VirtualMachineScaleSetExtensionProperties object itself.
+ */
+ public VirtualMachineScaleSetExtensionProperties
+ withProvisionAfterExtensions(List provisionAfterExtensions) {
+ this.provisionAfterExtensions = provisionAfterExtensions;
+ return this;
+ }
+
+ /**
+ * Get the suppressFailures property: Indicates whether failures stemming from the extension will be suppressed
+ * (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The
+ * default is false.
+ *
+ * @return the suppressFailures value.
+ */
+ public Boolean suppressFailures() {
+ return this.suppressFailures;
+ }
+
+ /**
+ * Set the suppressFailures property: Indicates whether failures stemming from the extension will be suppressed
+ * (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The
+ * default is false.
+ *
+ * @param suppressFailures the suppressFailures value to set.
+ * @return the VirtualMachineScaleSetExtensionProperties object itself.
+ */
+ public VirtualMachineScaleSetExtensionProperties withSuppressFailures(Boolean suppressFailures) {
+ this.suppressFailures = suppressFailures;
+ return this;
+ }
+
+ /**
+ * Get the protectedSettingsFromKeyVault property: The extensions protected settings that are passed by reference,
+ * and consumed from key vault.
+ *
+ * @return the protectedSettingsFromKeyVault value.
+ */
+ public KeyVaultSecretReference protectedSettingsFromKeyVault() {
+ return this.protectedSettingsFromKeyVault;
+ }
+
+ /**
+ * Set the protectedSettingsFromKeyVault property: The extensions protected settings that are passed by reference,
+ * and consumed from key vault.
+ *
+ * @param protectedSettingsFromKeyVault the protectedSettingsFromKeyVault value to set.
+ * @return the VirtualMachineScaleSetExtensionProperties object itself.
+ */
+ public VirtualMachineScaleSetExtensionProperties
+ withProtectedSettingsFromKeyVault(KeyVaultSecretReference protectedSettingsFromKeyVault) {
+ this.protectedSettingsFromKeyVault = protectedSettingsFromKeyVault;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (protectedSettingsFromKeyVault() != null) {
+ protectedSettingsFromKeyVault().validate();
+ }
+ }
+}
diff --git a/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/fluent/models/VirtualMachineScaleSetInner.java b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/fluent/models/VirtualMachineScaleSetInner.java
new file mode 100644
index 000000000000..fe347281459b
--- /dev/null
+++ b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/fluent/models/VirtualMachineScaleSetInner.java
@@ -0,0 +1,111 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurefleet.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.resourcemanager.azurefleet.models.ApiError;
+import com.azure.resourcemanager.azurefleet.models.ProvisioningState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * An AzureFleet's virtualMachineScaleSet.
+ */
+@Immutable
+public final class VirtualMachineScaleSetInner {
+ /*
+ * The name of the virtualMachineScaleSet
+ */
+ @JsonProperty(value = "name", required = true, access = JsonProperty.Access.WRITE_ONLY)
+ private String name;
+
+ /*
+ * The compute RP resource id of the virtualMachineScaleSet
+ * "subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmssName}"
+ */
+ @JsonProperty(value = "id", required = true, access = JsonProperty.Access.WRITE_ONLY)
+ private String id;
+
+ /*
+ * Type of the virtualMachineScaleSet
+ */
+ @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY)
+ private String type;
+
+ /*
+ * This represents the operationStatus of the VMSS in response to the last operation that was performed on it by Azure Fleet resource.
+ */
+ @JsonProperty(value = "operationStatus", required = true, access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningState operationStatus;
+
+ /*
+ * Error Information when `operationStatus` is `Failed`
+ */
+ @JsonProperty(value = "error", access = JsonProperty.Access.WRITE_ONLY)
+ private ApiError error;
+
+ /**
+ * Creates an instance of VirtualMachineScaleSetInner class.
+ */
+ public VirtualMachineScaleSetInner() {
+ }
+
+ /**
+ * Get the name property: The name of the virtualMachineScaleSet.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: The compute RP resource id of the virtualMachineScaleSet
+ * "subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmssName}".
+ *
+ * @return the id value.
+ */
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Get the type property: Type of the virtualMachineScaleSet.
+ *
+ * @return the type value.
+ */
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the operationStatus property: This represents the operationStatus of the VMSS in response to the last
+ * operation that was performed on it by Azure Fleet resource.
+ *
+ * @return the operationStatus value.
+ */
+ public ProvisioningState operationStatus() {
+ return this.operationStatus;
+ }
+
+ /**
+ * Get the error property: Error Information when `operationStatus` is `Failed`.
+ *
+ * @return the error value.
+ */
+ public ApiError error() {
+ return this.error;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (error() != null) {
+ error().validate();
+ }
+ }
+}
diff --git a/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/fluent/models/VirtualMachineScaleSetIpConfigurationProperties.java b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/fluent/models/VirtualMachineScaleSetIpConfigurationProperties.java
new file mode 100644
index 000000000000..2cb322914e42
--- /dev/null
+++ b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/fluent/models/VirtualMachineScaleSetIpConfigurationProperties.java
@@ -0,0 +1,269 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurefleet.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.SubResource;
+import com.azure.resourcemanager.azurefleet.models.ApiEntityReference;
+import com.azure.resourcemanager.azurefleet.models.IpVersion;
+import com.azure.resourcemanager.azurefleet.models.VirtualMachineScaleSetPublicIpAddressConfiguration;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/**
+ * Describes a virtual machine scale set network profile's IP configuration properties.
+ */
+@Fluent
+public final class VirtualMachineScaleSetIpConfigurationProperties {
+ /*
+ * Specifies the identifier of the subnet.
+ */
+ @JsonProperty(value = "subnet")
+ private ApiEntityReference subnet;
+
+ /*
+ * Specifies the primary network interface in case the virtual machine has more than 1 network interface.
+ */
+ @JsonProperty(value = "primary")
+ private Boolean primary;
+
+ /*
+ * The publicIPAddressConfiguration.
+ */
+ @JsonProperty(value = "publicIPAddressConfiguration")
+ private VirtualMachineScaleSetPublicIpAddressConfiguration publicIpAddressConfiguration;
+
+ /*
+ * Available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'.
+ */
+ @JsonProperty(value = "privateIPAddressVersion")
+ private IpVersion privateIpAddressVersion;
+
+ /*
+ * Specifies an array of references to backend address pools of application gateways. A scale set can reference backend address pools of multiple application gateways. Multiple scale sets cannot use the same application gateway.
+ */
+ @JsonProperty(value = "applicationGatewayBackendAddressPools")
+ private List applicationGatewayBackendAddressPools;
+
+ /*
+ * Specifies an array of references to application security group.
+ */
+ @JsonProperty(value = "applicationSecurityGroups")
+ private List applicationSecurityGroups;
+
+ /*
+ * Specifies an array of references to backend address pools of load balancers. A scale set can reference backend address pools of one public and one internal load balancer. Multiple scale sets cannot use the same basic sku load balancer.
+ */
+ @JsonProperty(value = "loadBalancerBackendAddressPools")
+ private List loadBalancerBackendAddressPools;
+
+ /*
+ * Specifies an array of references to inbound Nat pools of the load balancers. A scale set can reference inbound nat pools of one public and one internal load balancer. Multiple scale sets cannot use the same basic sku load balancer.
+ */
+ @JsonProperty(value = "loadBalancerInboundNatPools")
+ private List loadBalancerInboundNatPools;
+
+ /**
+ * Creates an instance of VirtualMachineScaleSetIpConfigurationProperties class.
+ */
+ public VirtualMachineScaleSetIpConfigurationProperties() {
+ }
+
+ /**
+ * Get the subnet property: Specifies the identifier of the subnet.
+ *
+ * @return the subnet value.
+ */
+ public ApiEntityReference subnet() {
+ return this.subnet;
+ }
+
+ /**
+ * Set the subnet property: Specifies the identifier of the subnet.
+ *
+ * @param subnet the subnet value to set.
+ * @return the VirtualMachineScaleSetIpConfigurationProperties object itself.
+ */
+ public VirtualMachineScaleSetIpConfigurationProperties withSubnet(ApiEntityReference subnet) {
+ this.subnet = subnet;
+ return this;
+ }
+
+ /**
+ * Get the primary property: Specifies the primary network interface in case the virtual machine has more than 1
+ * network interface.
+ *
+ * @return the primary value.
+ */
+ public Boolean primary() {
+ return this.primary;
+ }
+
+ /**
+ * Set the primary property: Specifies the primary network interface in case the virtual machine has more than 1
+ * network interface.
+ *
+ * @param primary the primary value to set.
+ * @return the VirtualMachineScaleSetIpConfigurationProperties object itself.
+ */
+ public VirtualMachineScaleSetIpConfigurationProperties withPrimary(Boolean primary) {
+ this.primary = primary;
+ return this;
+ }
+
+ /**
+ * Get the publicIpAddressConfiguration property: The publicIPAddressConfiguration.
+ *
+ * @return the publicIpAddressConfiguration value.
+ */
+ public VirtualMachineScaleSetPublicIpAddressConfiguration publicIpAddressConfiguration() {
+ return this.publicIpAddressConfiguration;
+ }
+
+ /**
+ * Set the publicIpAddressConfiguration property: The publicIPAddressConfiguration.
+ *
+ * @param publicIpAddressConfiguration the publicIpAddressConfiguration value to set.
+ * @return the VirtualMachineScaleSetIpConfigurationProperties object itself.
+ */
+ public VirtualMachineScaleSetIpConfigurationProperties withPublicIpAddressConfiguration(
+ VirtualMachineScaleSetPublicIpAddressConfiguration publicIpAddressConfiguration) {
+ this.publicIpAddressConfiguration = publicIpAddressConfiguration;
+ return this;
+ }
+
+ /**
+ * Get the privateIpAddressVersion property: Available from Api-Version 2017-03-30 onwards, it represents whether
+ * the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'.
+ *
+ * @return the privateIpAddressVersion value.
+ */
+ public IpVersion privateIpAddressVersion() {
+ return this.privateIpAddressVersion;
+ }
+
+ /**
+ * Set the privateIpAddressVersion property: Available from Api-Version 2017-03-30 onwards, it represents whether
+ * the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'.
+ *
+ * @param privateIpAddressVersion the privateIpAddressVersion value to set.
+ * @return the VirtualMachineScaleSetIpConfigurationProperties object itself.
+ */
+ public VirtualMachineScaleSetIpConfigurationProperties
+ withPrivateIpAddressVersion(IpVersion privateIpAddressVersion) {
+ this.privateIpAddressVersion = privateIpAddressVersion;
+ return this;
+ }
+
+ /**
+ * Get the applicationGatewayBackendAddressPools property: Specifies an array of references to backend address pools
+ * of application gateways. A scale set can reference backend address pools of multiple application gateways.
+ * Multiple scale sets cannot use the same application gateway.
+ *
+ * @return the applicationGatewayBackendAddressPools value.
+ */
+ public List applicationGatewayBackendAddressPools() {
+ return this.applicationGatewayBackendAddressPools;
+ }
+
+ /**
+ * Set the applicationGatewayBackendAddressPools property: Specifies an array of references to backend address pools
+ * of application gateways. A scale set can reference backend address pools of multiple application gateways.
+ * Multiple scale sets cannot use the same application gateway.
+ *
+ * @param applicationGatewayBackendAddressPools the applicationGatewayBackendAddressPools value to set.
+ * @return the VirtualMachineScaleSetIpConfigurationProperties object itself.
+ */
+ public VirtualMachineScaleSetIpConfigurationProperties
+ withApplicationGatewayBackendAddressPools(List applicationGatewayBackendAddressPools) {
+ this.applicationGatewayBackendAddressPools = applicationGatewayBackendAddressPools;
+ return this;
+ }
+
+ /**
+ * Get the applicationSecurityGroups property: Specifies an array of references to application security group.
+ *
+ * @return the applicationSecurityGroups value.
+ */
+ public List applicationSecurityGroups() {
+ return this.applicationSecurityGroups;
+ }
+
+ /**
+ * Set the applicationSecurityGroups property: Specifies an array of references to application security group.
+ *
+ * @param applicationSecurityGroups the applicationSecurityGroups value to set.
+ * @return the VirtualMachineScaleSetIpConfigurationProperties object itself.
+ */
+ public VirtualMachineScaleSetIpConfigurationProperties
+ withApplicationSecurityGroups(List applicationSecurityGroups) {
+ this.applicationSecurityGroups = applicationSecurityGroups;
+ return this;
+ }
+
+ /**
+ * Get the loadBalancerBackendAddressPools property: Specifies an array of references to backend address pools of
+ * load balancers. A scale set can reference backend address pools of one public and one internal load balancer.
+ * Multiple scale sets cannot use the same basic sku load balancer.
+ *
+ * @return the loadBalancerBackendAddressPools value.
+ */
+ public List loadBalancerBackendAddressPools() {
+ return this.loadBalancerBackendAddressPools;
+ }
+
+ /**
+ * Set the loadBalancerBackendAddressPools property: Specifies an array of references to backend address pools of
+ * load balancers. A scale set can reference backend address pools of one public and one internal load balancer.
+ * Multiple scale sets cannot use the same basic sku load balancer.
+ *
+ * @param loadBalancerBackendAddressPools the loadBalancerBackendAddressPools value to set.
+ * @return the VirtualMachineScaleSetIpConfigurationProperties object itself.
+ */
+ public VirtualMachineScaleSetIpConfigurationProperties
+ withLoadBalancerBackendAddressPools(List loadBalancerBackendAddressPools) {
+ this.loadBalancerBackendAddressPools = loadBalancerBackendAddressPools;
+ return this;
+ }
+
+ /**
+ * Get the loadBalancerInboundNatPools property: Specifies an array of references to inbound Nat pools of the load
+ * balancers. A scale set can reference inbound nat pools of one public and one internal load balancer. Multiple
+ * scale sets cannot use the same basic sku load balancer.
+ *
+ * @return the loadBalancerInboundNatPools value.
+ */
+ public List loadBalancerInboundNatPools() {
+ return this.loadBalancerInboundNatPools;
+ }
+
+ /**
+ * Set the loadBalancerInboundNatPools property: Specifies an array of references to inbound Nat pools of the load
+ * balancers. A scale set can reference inbound nat pools of one public and one internal load balancer. Multiple
+ * scale sets cannot use the same basic sku load balancer.
+ *
+ * @param loadBalancerInboundNatPools the loadBalancerInboundNatPools value to set.
+ * @return the VirtualMachineScaleSetIpConfigurationProperties object itself.
+ */
+ public VirtualMachineScaleSetIpConfigurationProperties
+ withLoadBalancerInboundNatPools(List loadBalancerInboundNatPools) {
+ this.loadBalancerInboundNatPools = loadBalancerInboundNatPools;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (subnet() != null) {
+ subnet().validate();
+ }
+ if (publicIpAddressConfiguration() != null) {
+ publicIpAddressConfiguration().validate();
+ }
+ }
+}
diff --git a/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/fluent/models/VirtualMachineScaleSetNetworkConfigurationProperties.java b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/fluent/models/VirtualMachineScaleSetNetworkConfigurationProperties.java
new file mode 100644
index 000000000000..e4a04f75c0d2
--- /dev/null
+++ b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/fluent/models/VirtualMachineScaleSetNetworkConfigurationProperties.java
@@ -0,0 +1,350 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurefleet.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.SubResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.azurefleet.models.DeleteOptions;
+import com.azure.resourcemanager.azurefleet.models.NetworkInterfaceAuxiliaryMode;
+import com.azure.resourcemanager.azurefleet.models.NetworkInterfaceAuxiliarySku;
+import com.azure.resourcemanager.azurefleet.models.VirtualMachineScaleSetIpConfiguration;
+import com.azure.resourcemanager.azurefleet.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/**
+ * Describes a virtual machine scale set network profile's IP configuration.
+ */
+@Fluent
+public final class VirtualMachineScaleSetNetworkConfigurationProperties {
+ /*
+ * Specifies the primary network interface in case the virtual machine has more than 1 network interface.
+ */
+ @JsonProperty(value = "primary")
+ private Boolean primary;
+
+ /*
+ * Specifies whether the network interface is accelerated networking-enabled.
+ */
+ @JsonProperty(value = "enableAcceleratedNetworking")
+ private Boolean enableAcceleratedNetworking;
+
+ /*
+ * Specifies whether the network interface is disabled for tcp state tracking.
+ */
+ @JsonProperty(value = "disableTcpStateTracking")
+ private Boolean disableTcpStateTracking;
+
+ /*
+ * Specifies whether the network interface is FPGA networking-enabled.
+ */
+ @JsonProperty(value = "enableFpga")
+ private Boolean enableFpga;
+
+ /*
+ * The network security group.
+ */
+ @JsonProperty(value = "networkSecurityGroup")
+ private SubResource networkSecurityGroup;
+
+ /*
+ * The dns settings to be applied on the network interfaces.
+ */
+ @JsonProperty(value = "dnsSettings")
+ private VirtualMachineScaleSetNetworkConfigurationDnsSettings dnsSettings;
+
+ /*
+ * Specifies the IP configurations of the network interface.
+ */
+ @JsonProperty(value = "ipConfigurations", required = true)
+ private List ipConfigurations;
+
+ /*
+ * Whether IP forwarding enabled on this NIC.
+ */
+ @JsonProperty(value = "enableIPForwarding")
+ private Boolean enableIpForwarding;
+
+ /*
+ * Specify what happens to the network interface when the VM is deleted
+ */
+ @JsonProperty(value = "deleteOption")
+ private DeleteOptions deleteOption;
+
+ /*
+ * Specifies whether the Auxiliary mode is enabled for the Network Interface resource.
+ */
+ @JsonProperty(value = "auxiliaryMode")
+ private NetworkInterfaceAuxiliaryMode auxiliaryMode;
+
+ /*
+ * Specifies whether the Auxiliary sku is enabled for the Network Interface resource.
+ */
+ @JsonProperty(value = "auxiliarySku")
+ private NetworkInterfaceAuxiliarySku auxiliarySku;
+
+ /**
+ * Creates an instance of VirtualMachineScaleSetNetworkConfigurationProperties class.
+ */
+ public VirtualMachineScaleSetNetworkConfigurationProperties() {
+ }
+
+ /**
+ * Get the primary property: Specifies the primary network interface in case the virtual machine has more than 1
+ * network interface.
+ *
+ * @return the primary value.
+ */
+ public Boolean primary() {
+ return this.primary;
+ }
+
+ /**
+ * Set the primary property: Specifies the primary network interface in case the virtual machine has more than 1
+ * network interface.
+ *
+ * @param primary the primary value to set.
+ * @return the VirtualMachineScaleSetNetworkConfigurationProperties object itself.
+ */
+ public VirtualMachineScaleSetNetworkConfigurationProperties withPrimary(Boolean primary) {
+ this.primary = primary;
+ return this;
+ }
+
+ /**
+ * Get the enableAcceleratedNetworking property: Specifies whether the network interface is accelerated
+ * networking-enabled.
+ *
+ * @return the enableAcceleratedNetworking value.
+ */
+ public Boolean enableAcceleratedNetworking() {
+ return this.enableAcceleratedNetworking;
+ }
+
+ /**
+ * Set the enableAcceleratedNetworking property: Specifies whether the network interface is accelerated
+ * networking-enabled.
+ *
+ * @param enableAcceleratedNetworking the enableAcceleratedNetworking value to set.
+ * @return the VirtualMachineScaleSetNetworkConfigurationProperties object itself.
+ */
+ public VirtualMachineScaleSetNetworkConfigurationProperties
+ withEnableAcceleratedNetworking(Boolean enableAcceleratedNetworking) {
+ this.enableAcceleratedNetworking = enableAcceleratedNetworking;
+ return this;
+ }
+
+ /**
+ * Get the disableTcpStateTracking property: Specifies whether the network interface is disabled for tcp state
+ * tracking.
+ *
+ * @return the disableTcpStateTracking value.
+ */
+ public Boolean disableTcpStateTracking() {
+ return this.disableTcpStateTracking;
+ }
+
+ /**
+ * Set the disableTcpStateTracking property: Specifies whether the network interface is disabled for tcp state
+ * tracking.
+ *
+ * @param disableTcpStateTracking the disableTcpStateTracking value to set.
+ * @return the VirtualMachineScaleSetNetworkConfigurationProperties object itself.
+ */
+ public VirtualMachineScaleSetNetworkConfigurationProperties
+ withDisableTcpStateTracking(Boolean disableTcpStateTracking) {
+ this.disableTcpStateTracking = disableTcpStateTracking;
+ return this;
+ }
+
+ /**
+ * Get the enableFpga property: Specifies whether the network interface is FPGA networking-enabled.
+ *
+ * @return the enableFpga value.
+ */
+ public Boolean enableFpga() {
+ return this.enableFpga;
+ }
+
+ /**
+ * Set the enableFpga property: Specifies whether the network interface is FPGA networking-enabled.
+ *
+ * @param enableFpga the enableFpga value to set.
+ * @return the VirtualMachineScaleSetNetworkConfigurationProperties object itself.
+ */
+ public VirtualMachineScaleSetNetworkConfigurationProperties withEnableFpga(Boolean enableFpga) {
+ this.enableFpga = enableFpga;
+ return this;
+ }
+
+ /**
+ * Get the networkSecurityGroup property: The network security group.
+ *
+ * @return the networkSecurityGroup value.
+ */
+ public SubResource networkSecurityGroup() {
+ return this.networkSecurityGroup;
+ }
+
+ /**
+ * Set the networkSecurityGroup property: The network security group.
+ *
+ * @param networkSecurityGroup the networkSecurityGroup value to set.
+ * @return the VirtualMachineScaleSetNetworkConfigurationProperties object itself.
+ */
+ public VirtualMachineScaleSetNetworkConfigurationProperties
+ withNetworkSecurityGroup(SubResource networkSecurityGroup) {
+ this.networkSecurityGroup = networkSecurityGroup;
+ return this;
+ }
+
+ /**
+ * Get the dnsSettings property: The dns settings to be applied on the network interfaces.
+ *
+ * @return the dnsSettings value.
+ */
+ public VirtualMachineScaleSetNetworkConfigurationDnsSettings dnsSettings() {
+ return this.dnsSettings;
+ }
+
+ /**
+ * Set the dnsSettings property: The dns settings to be applied on the network interfaces.
+ *
+ * @param dnsSettings the dnsSettings value to set.
+ * @return the VirtualMachineScaleSetNetworkConfigurationProperties object itself.
+ */
+ public VirtualMachineScaleSetNetworkConfigurationProperties
+ withDnsSettings(VirtualMachineScaleSetNetworkConfigurationDnsSettings dnsSettings) {
+ this.dnsSettings = dnsSettings;
+ return this;
+ }
+
+ /**
+ * Get the ipConfigurations property: Specifies the IP configurations of the network interface.
+ *
+ * @return the ipConfigurations value.
+ */
+ public List ipConfigurations() {
+ return this.ipConfigurations;
+ }
+
+ /**
+ * Set the ipConfigurations property: Specifies the IP configurations of the network interface.
+ *
+ * @param ipConfigurations the ipConfigurations value to set.
+ * @return the VirtualMachineScaleSetNetworkConfigurationProperties object itself.
+ */
+ public VirtualMachineScaleSetNetworkConfigurationProperties
+ withIpConfigurations(List ipConfigurations) {
+ this.ipConfigurations = ipConfigurations;
+ return this;
+ }
+
+ /**
+ * Get the enableIpForwarding property: Whether IP forwarding enabled on this NIC.
+ *
+ * @return the enableIpForwarding value.
+ */
+ public Boolean enableIpForwarding() {
+ return this.enableIpForwarding;
+ }
+
+ /**
+ * Set the enableIpForwarding property: Whether IP forwarding enabled on this NIC.
+ *
+ * @param enableIpForwarding the enableIpForwarding value to set.
+ * @return the VirtualMachineScaleSetNetworkConfigurationProperties object itself.
+ */
+ public VirtualMachineScaleSetNetworkConfigurationProperties withEnableIpForwarding(Boolean enableIpForwarding) {
+ this.enableIpForwarding = enableIpForwarding;
+ return this;
+ }
+
+ /**
+ * Get the deleteOption property: Specify what happens to the network interface when the VM is deleted.
+ *
+ * @return the deleteOption value.
+ */
+ public DeleteOptions deleteOption() {
+ return this.deleteOption;
+ }
+
+ /**
+ * Set the deleteOption property: Specify what happens to the network interface when the VM is deleted.
+ *
+ * @param deleteOption the deleteOption value to set.
+ * @return the VirtualMachineScaleSetNetworkConfigurationProperties object itself.
+ */
+ public VirtualMachineScaleSetNetworkConfigurationProperties withDeleteOption(DeleteOptions deleteOption) {
+ this.deleteOption = deleteOption;
+ return this;
+ }
+
+ /**
+ * Get the auxiliaryMode property: Specifies whether the Auxiliary mode is enabled for the Network Interface
+ * resource.
+ *
+ * @return the auxiliaryMode value.
+ */
+ public NetworkInterfaceAuxiliaryMode auxiliaryMode() {
+ return this.auxiliaryMode;
+ }
+
+ /**
+ * Set the auxiliaryMode property: Specifies whether the Auxiliary mode is enabled for the Network Interface
+ * resource.
+ *
+ * @param auxiliaryMode the auxiliaryMode value to set.
+ * @return the VirtualMachineScaleSetNetworkConfigurationProperties object itself.
+ */
+ public VirtualMachineScaleSetNetworkConfigurationProperties
+ withAuxiliaryMode(NetworkInterfaceAuxiliaryMode auxiliaryMode) {
+ this.auxiliaryMode = auxiliaryMode;
+ return this;
+ }
+
+ /**
+ * Get the auxiliarySku property: Specifies whether the Auxiliary sku is enabled for the Network Interface resource.
+ *
+ * @return the auxiliarySku value.
+ */
+ public NetworkInterfaceAuxiliarySku auxiliarySku() {
+ return this.auxiliarySku;
+ }
+
+ /**
+ * Set the auxiliarySku property: Specifies whether the Auxiliary sku is enabled for the Network Interface resource.
+ *
+ * @param auxiliarySku the auxiliarySku value to set.
+ * @return the VirtualMachineScaleSetNetworkConfigurationProperties object itself.
+ */
+ public VirtualMachineScaleSetNetworkConfigurationProperties
+ withAuxiliarySku(NetworkInterfaceAuxiliarySku auxiliarySku) {
+ this.auxiliarySku = auxiliarySku;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (dnsSettings() != null) {
+ dnsSettings().validate();
+ }
+ if (ipConfigurations() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property ipConfigurations in model VirtualMachineScaleSetNetworkConfigurationProperties"));
+ } else {
+ ipConfigurations().forEach(e -> e.validate());
+ }
+ }
+
+ private static final ClientLogger LOGGER
+ = new ClientLogger(VirtualMachineScaleSetNetworkConfigurationProperties.class);
+}
diff --git a/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/fluent/models/VirtualMachineScaleSetPublicIpAddressConfigurationProperties.java b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/fluent/models/VirtualMachineScaleSetPublicIpAddressConfigurationProperties.java
new file mode 100644
index 000000000000..3d75aff21384
--- /dev/null
+++ b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/fluent/models/VirtualMachineScaleSetPublicIpAddressConfigurationProperties.java
@@ -0,0 +1,202 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurefleet.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.SubResource;
+import com.azure.resourcemanager.azurefleet.models.DeleteOptions;
+import com.azure.resourcemanager.azurefleet.models.IpVersion;
+import com.azure.resourcemanager.azurefleet.models.VirtualMachineScaleSetIpTag;
+import com.azure.resourcemanager.azurefleet.models.VirtualMachineScaleSetPublicIpAddressConfigurationDnsSettings;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/**
+ * Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration.
+ */
+@Fluent
+public final class VirtualMachineScaleSetPublicIpAddressConfigurationProperties {
+ /*
+ * The idle timeout of the public IP address.
+ */
+ @JsonProperty(value = "idleTimeoutInMinutes")
+ private Integer idleTimeoutInMinutes;
+
+ /*
+ * The dns settings to be applied on the publicIP addresses .
+ */
+ @JsonProperty(value = "dnsSettings")
+ private VirtualMachineScaleSetPublicIpAddressConfigurationDnsSettings dnsSettings;
+
+ /*
+ * The list of IP tags associated with the public IP address.
+ */
+ @JsonProperty(value = "ipTags")
+ private List ipTags;
+
+ /*
+ * The PublicIPPrefix from which to allocate publicIP addresses.
+ */
+ @JsonProperty(value = "publicIPPrefix")
+ private SubResource publicIpPrefix;
+
+ /*
+ * Available from Api-Version 2019-07-01 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'.
+ */
+ @JsonProperty(value = "publicIPAddressVersion")
+ private IpVersion publicIpAddressVersion;
+
+ /*
+ * Specify what happens to the public IP when the VM is deleted
+ */
+ @JsonProperty(value = "deleteOption")
+ private DeleteOptions deleteOption;
+
+ /**
+ * Creates an instance of VirtualMachineScaleSetPublicIpAddressConfigurationProperties class.
+ */
+ public VirtualMachineScaleSetPublicIpAddressConfigurationProperties() {
+ }
+
+ /**
+ * Get the idleTimeoutInMinutes property: The idle timeout of the public IP address.
+ *
+ * @return the idleTimeoutInMinutes value.
+ */
+ public Integer idleTimeoutInMinutes() {
+ return this.idleTimeoutInMinutes;
+ }
+
+ /**
+ * Set the idleTimeoutInMinutes property: The idle timeout of the public IP address.
+ *
+ * @param idleTimeoutInMinutes the idleTimeoutInMinutes value to set.
+ * @return the VirtualMachineScaleSetPublicIpAddressConfigurationProperties object itself.
+ */
+ public VirtualMachineScaleSetPublicIpAddressConfigurationProperties
+ withIdleTimeoutInMinutes(Integer idleTimeoutInMinutes) {
+ this.idleTimeoutInMinutes = idleTimeoutInMinutes;
+ return this;
+ }
+
+ /**
+ * Get the dnsSettings property: The dns settings to be applied on the publicIP addresses .
+ *
+ * @return the dnsSettings value.
+ */
+ public VirtualMachineScaleSetPublicIpAddressConfigurationDnsSettings dnsSettings() {
+ return this.dnsSettings;
+ }
+
+ /**
+ * Set the dnsSettings property: The dns settings to be applied on the publicIP addresses .
+ *
+ * @param dnsSettings the dnsSettings value to set.
+ * @return the VirtualMachineScaleSetPublicIpAddressConfigurationProperties object itself.
+ */
+ public VirtualMachineScaleSetPublicIpAddressConfigurationProperties
+ withDnsSettings(VirtualMachineScaleSetPublicIpAddressConfigurationDnsSettings dnsSettings) {
+ this.dnsSettings = dnsSettings;
+ return this;
+ }
+
+ /**
+ * Get the ipTags property: The list of IP tags associated with the public IP address.
+ *
+ * @return the ipTags value.
+ */
+ public List ipTags() {
+ return this.ipTags;
+ }
+
+ /**
+ * Set the ipTags property: The list of IP tags associated with the public IP address.
+ *
+ * @param ipTags the ipTags value to set.
+ * @return the VirtualMachineScaleSetPublicIpAddressConfigurationProperties object itself.
+ */
+ public VirtualMachineScaleSetPublicIpAddressConfigurationProperties
+ withIpTags(List ipTags) {
+ this.ipTags = ipTags;
+ return this;
+ }
+
+ /**
+ * Get the publicIpPrefix property: The PublicIPPrefix from which to allocate publicIP addresses.
+ *
+ * @return the publicIpPrefix value.
+ */
+ public SubResource publicIpPrefix() {
+ return this.publicIpPrefix;
+ }
+
+ /**
+ * Set the publicIpPrefix property: The PublicIPPrefix from which to allocate publicIP addresses.
+ *
+ * @param publicIpPrefix the publicIpPrefix value to set.
+ * @return the VirtualMachineScaleSetPublicIpAddressConfigurationProperties object itself.
+ */
+ public VirtualMachineScaleSetPublicIpAddressConfigurationProperties withPublicIpPrefix(SubResource publicIpPrefix) {
+ this.publicIpPrefix = publicIpPrefix;
+ return this;
+ }
+
+ /**
+ * Get the publicIpAddressVersion property: Available from Api-Version 2019-07-01 onwards, it represents whether the
+ * specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'.
+ *
+ * @return the publicIpAddressVersion value.
+ */
+ public IpVersion publicIpAddressVersion() {
+ return this.publicIpAddressVersion;
+ }
+
+ /**
+ * Set the publicIpAddressVersion property: Available from Api-Version 2019-07-01 onwards, it represents whether the
+ * specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'.
+ *
+ * @param publicIpAddressVersion the publicIpAddressVersion value to set.
+ * @return the VirtualMachineScaleSetPublicIpAddressConfigurationProperties object itself.
+ */
+ public VirtualMachineScaleSetPublicIpAddressConfigurationProperties
+ withPublicIpAddressVersion(IpVersion publicIpAddressVersion) {
+ this.publicIpAddressVersion = publicIpAddressVersion;
+ return this;
+ }
+
+ /**
+ * Get the deleteOption property: Specify what happens to the public IP when the VM is deleted.
+ *
+ * @return the deleteOption value.
+ */
+ public DeleteOptions deleteOption() {
+ return this.deleteOption;
+ }
+
+ /**
+ * Set the deleteOption property: Specify what happens to the public IP when the VM is deleted.
+ *
+ * @param deleteOption the deleteOption value to set.
+ * @return the VirtualMachineScaleSetPublicIpAddressConfigurationProperties object itself.
+ */
+ public VirtualMachineScaleSetPublicIpAddressConfigurationProperties withDeleteOption(DeleteOptions deleteOption) {
+ this.deleteOption = deleteOption;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (dnsSettings() != null) {
+ dnsSettings().validate();
+ }
+ if (ipTags() != null) {
+ ipTags().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/fluent/models/package-info.java b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/fluent/models/package-info.java
new file mode 100644
index 000000000000..34ccfc630ff3
--- /dev/null
+++ b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/fluent/models/package-info.java
@@ -0,0 +1,9 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/**
+ * Package containing the inner data models for MicrosoftAzureFleet.
+ * null.
+ */
+package com.azure.resourcemanager.azurefleet.fluent.models;
diff --git a/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/fluent/package-info.java b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/fluent/package-info.java
new file mode 100644
index 000000000000..2b1da72465e8
--- /dev/null
+++ b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/fluent/package-info.java
@@ -0,0 +1,9 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/**
+ * Package containing the service clients for MicrosoftAzureFleet.
+ * null.
+ */
+package com.azure.resourcemanager.azurefleet.fluent;
diff --git a/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/implementation/FleetImpl.java b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/implementation/FleetImpl.java
new file mode 100644
index 000000000000..0737d49527a2
--- /dev/null
+++ b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/implementation/FleetImpl.java
@@ -0,0 +1,269 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurefleet.implementation;
+
+import com.azure.core.management.Region;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.azurefleet.fluent.models.FleetInner;
+import com.azure.resourcemanager.azurefleet.models.ComputeProfile;
+import com.azure.resourcemanager.azurefleet.models.Fleet;
+import com.azure.resourcemanager.azurefleet.models.FleetPropertiesUpdate;
+import com.azure.resourcemanager.azurefleet.models.FleetUpdate;
+import com.azure.resourcemanager.azurefleet.models.ManagedServiceIdentity;
+import com.azure.resourcemanager.azurefleet.models.ManagedServiceIdentityUpdate;
+import com.azure.resourcemanager.azurefleet.models.Plan;
+import com.azure.resourcemanager.azurefleet.models.ProvisioningState;
+import com.azure.resourcemanager.azurefleet.models.RegularPriorityProfile;
+import com.azure.resourcemanager.azurefleet.models.ResourcePlanUpdate;
+import com.azure.resourcemanager.azurefleet.models.SpotPriorityProfile;
+import com.azure.resourcemanager.azurefleet.models.VmSizeProfile;
+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.azurefleet.AzurefleetManager 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 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 ProvisioningState provisioningState() {
+ return this.innerModel().provisioningState();
+ }
+
+ public SpotPriorityProfile spotPriorityProfile() {
+ return this.innerModel().spotPriorityProfile();
+ }
+
+ public RegularPriorityProfile regularPriorityProfile() {
+ return this.innerModel().regularPriorityProfile();
+ }
+
+ public List vmSizesProfile() {
+ List inner = this.innerModel().vmSizesProfile();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public ComputeProfile computeProfile() {
+ return this.innerModel().computeProfile();
+ }
+
+ 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.azurefleet.AzurefleetManager 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.azurefleet.AzurefleetManager 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.azurefleet.AzurefleetManager 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 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 withSpotPriorityProfile(SpotPriorityProfile spotPriorityProfile) {
+ this.innerModel().withSpotPriorityProfile(spotPriorityProfile);
+ return this;
+ }
+
+ public FleetImpl withRegularPriorityProfile(RegularPriorityProfile regularPriorityProfile) {
+ this.innerModel().withRegularPriorityProfile(regularPriorityProfile);
+ return this;
+ }
+
+ public FleetImpl withVmSizesProfile(List vmSizesProfile) {
+ this.innerModel().withVmSizesProfile(vmSizesProfile);
+ return this;
+ }
+
+ public FleetImpl withComputeProfile(ComputeProfile computeProfile) {
+ this.innerModel().withComputeProfile(computeProfile);
+ return this;
+ }
+
+ public FleetImpl withIdentity(ManagedServiceIdentityUpdate identity) {
+ this.updateProperties.withIdentity(identity);
+ return this;
+ }
+
+ public FleetImpl withPlan(ResourcePlanUpdate plan) {
+ this.updateProperties.withPlan(plan);
+ return this;
+ }
+
+ public FleetImpl withProperties(FleetPropertiesUpdate properties) {
+ this.updateProperties.withProperties(properties);
+ return this;
+ }
+
+ private boolean isInCreateMode() {
+ return this.innerModel().id() == null;
+ }
+}
diff --git a/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/implementation/FleetsClientImpl.java b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/implementation/FleetsClientImpl.java
new file mode 100644
index 000000000000..5f422b208ac7
--- /dev/null
+++ b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/implementation/FleetsClientImpl.java
@@ -0,0 +1,1269 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurefleet.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.azurefleet.fluent.FleetsClient;
+import com.azure.resourcemanager.azurefleet.fluent.models.FleetInner;
+import com.azure.resourcemanager.azurefleet.models.FleetListResult;
+import com.azure.resourcemanager.azurefleet.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 MicrosoftAzureFleetImpl client;
+
+ /**
+ * Initializes an instance of FleetsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ FleetsClientImpl(MicrosoftAzureFleetImpl client) {
+ this.service = RestProxy.create(FleetsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for MicrosoftAzureFleetFleets to be used by the proxy service to perform
+ * REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "MicrosoftAzureFleetF")
+ public interface FleetsService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AzureFleet/fleets")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(@HostParam("$host") 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")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroup(@HostParam("$host") 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}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets/{fleetName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getByResourceGroup(@HostParam("$host") 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("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("fleetName") String fleetName,
+ @BodyParam("application/json") FleetInner resource, @HeaderParam("Accept") String accept, 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("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("fleetName") String fleetName,
+ @BodyParam("application/json") FleetUpdate properties, @HeaderParam("Accept") String accept,
+ 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("$host") 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("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listBySubscriptionNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
+ @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("$host") String endpoint,
+ @HeaderParam("Accept") String accept, Context 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 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));
+ }
+
+ /**
+ * 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, resource, accept, 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, resource, accept, 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, properties, accept, 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, properties, accept, 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();
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ *
+ * The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return 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
+ *
+ * The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return 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));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ *
+ * The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return 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
+ *
+ * The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return 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));
+ }
+}
diff --git a/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/implementation/FleetsImpl.java b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/implementation/FleetsImpl.java
new file mode 100644
index 000000000000..5fc8a408f6ea
--- /dev/null
+++ b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/implementation/FleetsImpl.java
@@ -0,0 +1,144 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurefleet.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.azurefleet.fluent.FleetsClient;
+import com.azure.resourcemanager.azurefleet.fluent.models.FleetInner;
+import com.azure.resourcemanager.azurefleet.models.Fleet;
+import com.azure.resourcemanager.azurefleet.models.Fleets;
+
+public final class FleetsImpl implements Fleets {
+ private static final ClientLogger LOGGER = new ClientLogger(FleetsImpl.class);
+
+ private final FleetsClient innerClient;
+
+ private final com.azure.resourcemanager.azurefleet.AzurefleetManager serviceManager;
+
+ public FleetsImpl(FleetsClient innerClient, com.azure.resourcemanager.azurefleet.AzurefleetManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ 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 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 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 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.azurefleet.AzurefleetManager manager() {
+ return this.serviceManager;
+ }
+
+ public FleetImpl define(String name) {
+ return new FleetImpl(name, this.manager());
+ }
+}
diff --git a/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/implementation/MicrosoftAzureFleetBuilder.java b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/implementation/MicrosoftAzureFleetBuilder.java
new file mode 100644
index 000000000000..95626582663e
--- /dev/null
+++ b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/implementation/MicrosoftAzureFleetBuilder.java
@@ -0,0 +1,138 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurefleet.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 MicrosoftAzureFleetImpl type.
+ */
+@ServiceClientBuilder(serviceClients = { MicrosoftAzureFleetImpl.class })
+public final class MicrosoftAzureFleetBuilder {
+ /*
+ * 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 MicrosoftAzureFleetBuilder.
+ */
+ public MicrosoftAzureFleetBuilder subscriptionId(String subscriptionId) {
+ this.subscriptionId = subscriptionId;
+ return this;
+ }
+
+ /*
+ * server parameter
+ */
+ private String endpoint;
+
+ /**
+ * Sets server parameter.
+ *
+ * @param endpoint the endpoint value.
+ * @return the MicrosoftAzureFleetBuilder.
+ */
+ public MicrosoftAzureFleetBuilder endpoint(String endpoint) {
+ this.endpoint = endpoint;
+ return this;
+ }
+
+ /*
+ * The environment to connect to
+ */
+ private AzureEnvironment environment;
+
+ /**
+ * Sets The environment to connect to.
+ *
+ * @param environment the environment value.
+ * @return the MicrosoftAzureFleetBuilder.
+ */
+ public MicrosoftAzureFleetBuilder 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 MicrosoftAzureFleetBuilder.
+ */
+ public MicrosoftAzureFleetBuilder 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 MicrosoftAzureFleetBuilder.
+ */
+ public MicrosoftAzureFleetBuilder 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 MicrosoftAzureFleetBuilder.
+ */
+ public MicrosoftAzureFleetBuilder serializerAdapter(SerializerAdapter serializerAdapter) {
+ this.serializerAdapter = serializerAdapter;
+ return this;
+ }
+
+ /**
+ * Builds an instance of MicrosoftAzureFleetImpl with the provided parameters.
+ *
+ * @return an instance of MicrosoftAzureFleetImpl.
+ */
+ public MicrosoftAzureFleetImpl buildClient() {
+ String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com";
+ AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE;
+ HttpPipeline localPipeline = (pipeline != null)
+ ? pipeline
+ : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build();
+ Duration localDefaultPollInterval
+ = (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30);
+ SerializerAdapter localSerializerAdapter = (serializerAdapter != null)
+ ? serializerAdapter
+ : SerializerFactory.createDefaultManagementSerializerAdapter();
+ MicrosoftAzureFleetImpl client = new MicrosoftAzureFleetImpl(localPipeline, localSerializerAdapter,
+ localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint);
+ return client;
+ }
+}
diff --git a/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/implementation/MicrosoftAzureFleetImpl.java b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/implementation/MicrosoftAzureFleetImpl.java
new file mode 100644
index 000000000000..9e6e8036d536
--- /dev/null
+++ b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/implementation/MicrosoftAzureFleetImpl.java
@@ -0,0 +1,320 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurefleet.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.azurefleet.fluent.FleetsClient;
+import com.azure.resourcemanager.azurefleet.fluent.MicrosoftAzureFleet;
+import com.azure.resourcemanager.azurefleet.fluent.OperationsClient;
+import com.azure.resourcemanager.azurefleet.fluent.VirtualMachineScaleSetsClient;
+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 MicrosoftAzureFleetImpl type.
+ */
+@ServiceClient(builder = MicrosoftAzureFleetBuilder.class)
+public final class MicrosoftAzureFleetImpl implements MicrosoftAzureFleet {
+ /**
+ * The ID of the target subscription. The value must be an UUID.
+ */
+ private final String subscriptionId;
+
+ /**
+ * Gets The ID of the target subscription. The value must be an UUID.
+ *
+ * @return the subscriptionId value.
+ */
+ public String getSubscriptionId() {
+ return this.subscriptionId;
+ }
+
+ /**
+ * server parameter.
+ */
+ private final String endpoint;
+
+ /**
+ * Gets server parameter.
+ *
+ * @return the endpoint value.
+ */
+ public String getEndpoint() {
+ return this.endpoint;
+ }
+
+ /**
+ * Api Version.
+ */
+ private final String apiVersion;
+
+ /**
+ * Gets Api Version.
+ *
+ * @return the apiVersion value.
+ */
+ public String getApiVersion() {
+ return this.apiVersion;
+ }
+
+ /**
+ * The HTTP pipeline to send requests through.
+ */
+ private final HttpPipeline httpPipeline;
+
+ /**
+ * Gets The HTTP pipeline to send requests through.
+ *
+ * @return the httpPipeline value.
+ */
+ public HttpPipeline getHttpPipeline() {
+ return this.httpPipeline;
+ }
+
+ /**
+ * The serializer to serialize an object into a string.
+ */
+ private final SerializerAdapter serializerAdapter;
+
+ /**
+ * Gets The serializer to serialize an object into a string.
+ *
+ * @return the serializerAdapter value.
+ */
+ SerializerAdapter getSerializerAdapter() {
+ return this.serializerAdapter;
+ }
+
+ /**
+ * The default poll interval for long-running operation.
+ */
+ private final Duration defaultPollInterval;
+
+ /**
+ * Gets The default poll interval for long-running operation.
+ *
+ * @return the defaultPollInterval value.
+ */
+ public Duration getDefaultPollInterval() {
+ return this.defaultPollInterval;
+ }
+
+ /**
+ * The OperationsClient object to access its operations.
+ */
+ private final OperationsClient operations;
+
+ /**
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ public OperationsClient getOperations() {
+ return this.operations;
+ }
+
+ /**
+ * The 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;
+ }
+
+ /**
+ * The VirtualMachineScaleSetsClient object to access its operations.
+ */
+ private final VirtualMachineScaleSetsClient virtualMachineScaleSets;
+
+ /**
+ * Gets the VirtualMachineScaleSetsClient object to access its operations.
+ *
+ * @return the VirtualMachineScaleSetsClient object.
+ */
+ public VirtualMachineScaleSetsClient getVirtualMachineScaleSets() {
+ return this.virtualMachineScaleSets;
+ }
+
+ /**
+ * Initializes an instance of MicrosoftAzureFleet client.
+ *
+ * @param httpPipeline The HTTP pipeline to send requests through.
+ * @param serializerAdapter The serializer to serialize an object into a string.
+ * @param defaultPollInterval The default poll interval for long-running operation.
+ * @param environment The Azure environment.
+ * @param subscriptionId The ID of the target subscription. The value must be an UUID.
+ * @param endpoint server parameter.
+ */
+ MicrosoftAzureFleetImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter,
+ Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) {
+ this.httpPipeline = httpPipeline;
+ this.serializerAdapter = serializerAdapter;
+ this.defaultPollInterval = defaultPollInterval;
+ this.subscriptionId = subscriptionId;
+ this.endpoint = endpoint;
+ this.apiVersion = "2024-05-01-preview";
+ this.operations = new OperationsClientImpl(this);
+ this.fleets = new FleetsClientImpl(this);
+ this.virtualMachineScaleSets = new VirtualMachineScaleSetsClientImpl(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(MicrosoftAzureFleetImpl.class);
+}
diff --git a/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/implementation/OperationImpl.java b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/implementation/OperationImpl.java
new file mode 100644
index 000000000000..4662a3a72548
--- /dev/null
+++ b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/implementation/OperationImpl.java
@@ -0,0 +1,50 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurefleet.implementation;
+
+import com.azure.resourcemanager.azurefleet.fluent.models.OperationInner;
+import com.azure.resourcemanager.azurefleet.models.ActionType;
+import com.azure.resourcemanager.azurefleet.models.Operation;
+import com.azure.resourcemanager.azurefleet.models.OperationDisplay;
+import com.azure.resourcemanager.azurefleet.models.Origin;
+
+public final class OperationImpl implements Operation {
+ private OperationInner innerObject;
+
+ private final com.azure.resourcemanager.azurefleet.AzurefleetManager serviceManager;
+
+ OperationImpl(OperationInner innerObject, com.azure.resourcemanager.azurefleet.AzurefleetManager 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.azurefleet.AzurefleetManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/implementation/OperationsClientImpl.java b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/implementation/OperationsClientImpl.java
new file mode 100644
index 000000000000..740eb1ef655c
--- /dev/null
+++ b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/implementation/OperationsClientImpl.java
@@ -0,0 +1,239 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurefleet.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.azurefleet.fluent.OperationsClient;
+import com.azure.resourcemanager.azurefleet.fluent.models.OperationInner;
+import com.azure.resourcemanager.azurefleet.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 MicrosoftAzureFleetImpl client;
+
+ /**
+ * Initializes an instance of OperationsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ OperationsClientImpl(MicrosoftAzureFleetImpl client) {
+ this.service
+ = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for MicrosoftAzureFleetOperations to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "MicrosoftAzureFleetO")
+ public interface OperationsService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/providers/Microsoft.AzureFleet/operations")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * List the operations for the provider.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync() {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
+ res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * List the operations for the provider.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+
+ /**
+ * List the operations for the provider.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with
+ * {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List the operations for the provider.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with
+ * {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(Context context) {
+ return new PagedFlux<>(() -> listSinglePageAsync(context),
+ nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List the operations for the provider.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ return new PagedIterable<>(listAsync());
+ }
+
+ /**
+ * List the operations for the provider.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(Context context) {
+ return new PagedIterable<>(listAsync(context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ *
+ * The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
+ res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ *
+ * The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.listNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+}
diff --git a/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/implementation/OperationsImpl.java b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/implementation/OperationsImpl.java
new file mode 100644
index 000000000000..37b1cbc23f99
--- /dev/null
+++ b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/implementation/OperationsImpl.java
@@ -0,0 +1,45 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurefleet.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.azurefleet.fluent.OperationsClient;
+import com.azure.resourcemanager.azurefleet.fluent.models.OperationInner;
+import com.azure.resourcemanager.azurefleet.models.Operation;
+import com.azure.resourcemanager.azurefleet.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.azurefleet.AzurefleetManager serviceManager;
+
+ public OperationsImpl(OperationsClient innerClient,
+ com.azure.resourcemanager.azurefleet.AzurefleetManager 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.azurefleet.AzurefleetManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/implementation/ResourceManagerUtils.java b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/implementation/ResourceManagerUtils.java
new file mode 100644
index 000000000000..26ff8f2a7e79
--- /dev/null
+++ b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/implementation/ResourceManagerUtils.java
@@ -0,0 +1,195 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurefleet.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/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/implementation/VirtualMachineScaleSetImpl.java b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/implementation/VirtualMachineScaleSetImpl.java
new file mode 100644
index 000000000000..875a339a2be6
--- /dev/null
+++ b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/implementation/VirtualMachineScaleSetImpl.java
@@ -0,0 +1,50 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurefleet.implementation;
+
+import com.azure.resourcemanager.azurefleet.fluent.models.VirtualMachineScaleSetInner;
+import com.azure.resourcemanager.azurefleet.models.ApiError;
+import com.azure.resourcemanager.azurefleet.models.ProvisioningState;
+import com.azure.resourcemanager.azurefleet.models.VirtualMachineScaleSet;
+
+public final class VirtualMachineScaleSetImpl implements VirtualMachineScaleSet {
+ private VirtualMachineScaleSetInner innerObject;
+
+ private final com.azure.resourcemanager.azurefleet.AzurefleetManager serviceManager;
+
+ VirtualMachineScaleSetImpl(VirtualMachineScaleSetInner innerObject,
+ com.azure.resourcemanager.azurefleet.AzurefleetManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public ProvisioningState operationStatus() {
+ return this.innerModel().operationStatus();
+ }
+
+ public ApiError error() {
+ return this.innerModel().error();
+ }
+
+ public VirtualMachineScaleSetInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.azurefleet.AzurefleetManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/implementation/VirtualMachineScaleSetsClientImpl.java b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/implementation/VirtualMachineScaleSetsClientImpl.java
new file mode 100644
index 000000000000..a99c6a9a3bb8
--- /dev/null
+++ b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/implementation/VirtualMachineScaleSetsClientImpl.java
@@ -0,0 +1,284 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurefleet.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.azurefleet.fluent.VirtualMachineScaleSetsClient;
+import com.azure.resourcemanager.azurefleet.fluent.models.VirtualMachineScaleSetInner;
+import com.azure.resourcemanager.azurefleet.models.VirtualMachineScaleSetListResult;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in VirtualMachineScaleSetsClient.
+ */
+public final class VirtualMachineScaleSetsClientImpl implements VirtualMachineScaleSetsClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final VirtualMachineScaleSetsService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final MicrosoftAzureFleetImpl client;
+
+ /**
+ * Initializes an instance of VirtualMachineScaleSetsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ VirtualMachineScaleSetsClientImpl(MicrosoftAzureFleetImpl client) {
+ this.service = RestProxy.create(VirtualMachineScaleSetsService.class, client.getHttpPipeline(),
+ client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for MicrosoftAzureFleetVirtualMachineScaleSets to be used by the proxy
+ * service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "MicrosoftAzureFleetV")
+ public interface VirtualMachineScaleSetsService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets/{name}/virtualMachineScaleSets")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByFleet(@HostParam("$host") 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> listByFleetNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept, 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 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 PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByFleetSinglePageAsync(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.listByFleet(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, name, 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 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 PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByFleetSinglePageAsync(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
+ .listByFleet(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, name, accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+
+ /**
+ * 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 as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByFleetAsync(String resourceGroupName, String name) {
+ return new PagedFlux<>(() -> listByFleetSinglePageAsync(resourceGroupName, name),
+ nextLink -> listByFleetNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * 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 as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByFleetAsync(String resourceGroupName, String name,
+ Context context) {
+ return new PagedFlux<>(() -> listByFleetSinglePageAsync(resourceGroupName, name, context),
+ nextLink -> listByFleetNextSinglePageAsync(nextLink, 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 as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByFleet(String resourceGroupName, String name) {
+ return new PagedIterable<>(listByFleetAsync(resourceGroupName, name));
+ }
+
+ /**
+ * 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 as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByFleet(String resourceGroupName, String name,
+ Context context) {
+ return new PagedIterable<>(listByFleetAsync(resourceGroupName, name, context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ *
+ * The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a VirtualMachineScaleSet list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByFleetNextSinglePageAsync(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.listByFleetNext(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
+ *
+ * The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a VirtualMachineScaleSet list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByFleetNextSinglePageAsync(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.listByFleetNext(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/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/implementation/VirtualMachineScaleSetsImpl.java b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/implementation/VirtualMachineScaleSetsImpl.java
new file mode 100644
index 000000000000..903424bc2d01
--- /dev/null
+++ b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/implementation/VirtualMachineScaleSetsImpl.java
@@ -0,0 +1,46 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurefleet.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.azurefleet.fluent.VirtualMachineScaleSetsClient;
+import com.azure.resourcemanager.azurefleet.fluent.models.VirtualMachineScaleSetInner;
+import com.azure.resourcemanager.azurefleet.models.VirtualMachineScaleSet;
+import com.azure.resourcemanager.azurefleet.models.VirtualMachineScaleSets;
+
+public final class VirtualMachineScaleSetsImpl implements VirtualMachineScaleSets {
+ private static final ClientLogger LOGGER = new ClientLogger(VirtualMachineScaleSetsImpl.class);
+
+ private final VirtualMachineScaleSetsClient innerClient;
+
+ private final com.azure.resourcemanager.azurefleet.AzurefleetManager serviceManager;
+
+ public VirtualMachineScaleSetsImpl(VirtualMachineScaleSetsClient innerClient,
+ com.azure.resourcemanager.azurefleet.AzurefleetManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable listByFleet(String resourceGroupName, String name) {
+ PagedIterable inner = this.serviceClient().listByFleet(resourceGroupName, name);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualMachineScaleSetImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByFleet(String resourceGroupName, String name, Context context) {
+ PagedIterable inner
+ = this.serviceClient().listByFleet(resourceGroupName, name, context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualMachineScaleSetImpl(inner1, this.manager()));
+ }
+
+ private VirtualMachineScaleSetsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.azurefleet.AzurefleetManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/implementation/package-info.java b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/implementation/package-info.java
new file mode 100644
index 000000000000..c545dd343536
--- /dev/null
+++ b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/implementation/package-info.java
@@ -0,0 +1,9 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/**
+ * Package containing the implementations for MicrosoftAzureFleet.
+ * null.
+ */
+package com.azure.resourcemanager.azurefleet.implementation;
diff --git a/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/models/ActionType.java b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/models/ActionType.java
new file mode 100644
index 000000000000..f9a0731d0bfe
--- /dev/null
+++ b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/models/ActionType.java
@@ -0,0 +1,48 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurefleet.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.Collection;
+
+/**
+ * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
+ */
+public final class ActionType extends ExpandableStringEnum {
+ /**
+ * Static value Internal for ActionType.
+ */
+ public static final ActionType INTERNAL = fromString("Internal");
+
+ /**
+ * Creates a new instance of ActionType value.
+ *
+ * @deprecated Use the {@link #fromString(String)} factory method.
+ */
+ @Deprecated
+ public ActionType() {
+ }
+
+ /**
+ * Creates or finds a ActionType from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding ActionType.
+ */
+ @JsonCreator
+ 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/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/models/AdditionalUnattendContent.java b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/models/AdditionalUnattendContent.java
new file mode 100644
index 000000000000..b419b4cd1c94
--- /dev/null
+++ b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/models/AdditionalUnattendContent.java
@@ -0,0 +1,141 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurefleet.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Specifies additional XML formatted information that can be included in the Unattend.xml file, which is used by
+ * Windows Setup. Contents are defined by setting name, component name, and the pass in which the content is applied.
+ */
+@Fluent
+public final class AdditionalUnattendContent {
+ /*
+ * The pass name. Currently, the only allowable value is OobeSystem.
+ */
+ @JsonProperty(value = "passName")
+ private PassNames passName;
+
+ /*
+ * The component name. Currently, the only allowable value is Microsoft-Windows-Shell-Setup.
+ */
+ @JsonProperty(value = "componentName")
+ private ComponentNames componentName;
+
+ /*
+ * Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon.
+ */
+ @JsonProperty(value = "settingName")
+ private SettingNames settingName;
+
+ /*
+ * Specifies the XML formatted content that is added to the unattend.xml file for the specified path and component. The XML must be less than 4KB and must include the root element for the setting or feature that is being inserted.
+ */
+ @JsonProperty(value = "content")
+ private String content;
+
+ /**
+ * Creates an instance of AdditionalUnattendContent class.
+ */
+ public AdditionalUnattendContent() {
+ }
+
+ /**
+ * Get the passName property: The pass name. Currently, the only allowable value is OobeSystem.
+ *
+ * @return the passName value.
+ */
+ public PassNames passName() {
+ return this.passName;
+ }
+
+ /**
+ * Set the passName property: The pass name. Currently, the only allowable value is OobeSystem.
+ *
+ * @param passName the passName value to set.
+ * @return the AdditionalUnattendContent object itself.
+ */
+ public AdditionalUnattendContent withPassName(PassNames passName) {
+ this.passName = passName;
+ return this;
+ }
+
+ /**
+ * Get the componentName property: The component name. Currently, the only allowable value is
+ * Microsoft-Windows-Shell-Setup.
+ *
+ * @return the componentName value.
+ */
+ public ComponentNames componentName() {
+ return this.componentName;
+ }
+
+ /**
+ * Set the componentName property: The component name. Currently, the only allowable value is
+ * Microsoft-Windows-Shell-Setup.
+ *
+ * @param componentName the componentName value to set.
+ * @return the AdditionalUnattendContent object itself.
+ */
+ public AdditionalUnattendContent withComponentName(ComponentNames componentName) {
+ this.componentName = componentName;
+ return this;
+ }
+
+ /**
+ * Get the settingName property: Specifies the name of the setting to which the content applies. Possible values
+ * are: FirstLogonCommands and AutoLogon.
+ *
+ * @return the settingName value.
+ */
+ public SettingNames settingName() {
+ return this.settingName;
+ }
+
+ /**
+ * Set the settingName property: Specifies the name of the setting to which the content applies. Possible values
+ * are: FirstLogonCommands and AutoLogon.
+ *
+ * @param settingName the settingName value to set.
+ * @return the AdditionalUnattendContent object itself.
+ */
+ public AdditionalUnattendContent withSettingName(SettingNames settingName) {
+ this.settingName = settingName;
+ return this;
+ }
+
+ /**
+ * Get the content property: Specifies the XML formatted content that is added to the unattend.xml file for the
+ * specified path and component. The XML must be less than 4KB and must include the root element for the setting or
+ * feature that is being inserted.
+ *
+ * @return the content value.
+ */
+ public String content() {
+ return this.content;
+ }
+
+ /**
+ * Set the content property: Specifies the XML formatted content that is added to the unattend.xml file for the
+ * specified path and component. The XML must be less than 4KB and must include the root element for the setting or
+ * feature that is being inserted.
+ *
+ * @param content the content value to set.
+ * @return the AdditionalUnattendContent object itself.
+ */
+ public AdditionalUnattendContent withContent(String content) {
+ this.content = content;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/models/ApiEntityReference.java b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/models/ApiEntityReference.java
new file mode 100644
index 000000000000..13cb5774096b
--- /dev/null
+++ b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/models/ApiEntityReference.java
@@ -0,0 +1,56 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurefleet.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The API entity reference.
+ */
+@Fluent
+public final class ApiEntityReference {
+ /*
+ * The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/...
+ */
+ @JsonProperty(value = "id")
+ private String id;
+
+ /**
+ * Creates an instance of ApiEntityReference class.
+ */
+ public ApiEntityReference() {
+ }
+
+ /**
+ * Get the id property: The ARM resource id in the form of
+ * /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/...
+ *
+ * @return the id value.
+ */
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Set the id property: The ARM resource id in the form of
+ * /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/...
+ *
+ * @param id the id value to set.
+ * @return the ApiEntityReference object itself.
+ */
+ public ApiEntityReference withId(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/models/ApiError.java b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/models/ApiError.java
new file mode 100644
index 000000000000..de437ccabda8
--- /dev/null
+++ b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/models/ApiError.java
@@ -0,0 +1,165 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurefleet.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/**
+ * Api error.
+ */
+@Fluent
+public final class ApiError {
+ /*
+ * The Api error details
+ */
+ @JsonProperty(value = "details")
+ private List details;
+
+ /*
+ * The Api inner error
+ */
+ @JsonProperty(value = "innererror")
+ private InnerError innererror;
+
+ /*
+ * The error code.
+ */
+ @JsonProperty(value = "code")
+ private String code;
+
+ /*
+ * The target of the particular error.
+ */
+ @JsonProperty(value = "target")
+ private String target;
+
+ /*
+ * The error message.
+ */
+ @JsonProperty(value = "message")
+ private String message;
+
+ /**
+ * Creates an instance of ApiError class.
+ */
+ public ApiError() {
+ }
+
+ /**
+ * Get the details property: The Api error details.
+ *
+ * @return the details value.
+ */
+ public List details() {
+ return this.details;
+ }
+
+ /**
+ * Set the details property: The Api error details.
+ *
+ * @param details the details value to set.
+ * @return the ApiError object itself.
+ */
+ public ApiError withDetails(List details) {
+ this.details = details;
+ return this;
+ }
+
+ /**
+ * Get the innererror property: The Api inner error.
+ *
+ * @return the innererror value.
+ */
+ public InnerError innererror() {
+ return this.innererror;
+ }
+
+ /**
+ * Set the innererror property: The Api inner error.
+ *
+ * @param innererror the innererror value to set.
+ * @return the ApiError object itself.
+ */
+ public ApiError withInnererror(InnerError innererror) {
+ this.innererror = innererror;
+ return this;
+ }
+
+ /**
+ * Get the code property: The error code.
+ *
+ * @return the code value.
+ */
+ public String code() {
+ return this.code;
+ }
+
+ /**
+ * Set the code property: The error code.
+ *
+ * @param code the code value to set.
+ * @return the ApiError object itself.
+ */
+ public ApiError withCode(String code) {
+ this.code = code;
+ return this;
+ }
+
+ /**
+ * Get the target property: The target of the particular error.
+ *
+ * @return the target value.
+ */
+ public String target() {
+ return this.target;
+ }
+
+ /**
+ * Set the target property: The target of the particular error.
+ *
+ * @param target the target value to set.
+ * @return the ApiError object itself.
+ */
+ public ApiError withTarget(String target) {
+ this.target = target;
+ return this;
+ }
+
+ /**
+ * Get the message property: The error message.
+ *
+ * @return the message value.
+ */
+ public String message() {
+ return this.message;
+ }
+
+ /**
+ * Set the message property: The error message.
+ *
+ * @param message the message value to set.
+ * @return the ApiError object itself.
+ */
+ public ApiError withMessage(String message) {
+ this.message = message;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (details() != null) {
+ details().forEach(e -> e.validate());
+ }
+ if (innererror() != null) {
+ innererror().validate();
+ }
+ }
+}
diff --git a/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/models/ApiErrorBase.java b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/models/ApiErrorBase.java
new file mode 100644
index 000000000000..6db3b669ad22
--- /dev/null
+++ b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/models/ApiErrorBase.java
@@ -0,0 +1,106 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurefleet.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Api error base.
+ */
+@Fluent
+public final class ApiErrorBase {
+ /*
+ * The error code.
+ */
+ @JsonProperty(value = "code")
+ private String code;
+
+ /*
+ * The target of the particular error.
+ */
+ @JsonProperty(value = "target")
+ private String target;
+
+ /*
+ * The error message.
+ */
+ @JsonProperty(value = "message")
+ private String message;
+
+ /**
+ * Creates an instance of ApiErrorBase class.
+ */
+ public ApiErrorBase() {
+ }
+
+ /**
+ * Get the code property: The error code.
+ *
+ * @return the code value.
+ */
+ public String code() {
+ return this.code;
+ }
+
+ /**
+ * Set the code property: The error code.
+ *
+ * @param code the code value to set.
+ * @return the ApiErrorBase object itself.
+ */
+ public ApiErrorBase withCode(String code) {
+ this.code = code;
+ return this;
+ }
+
+ /**
+ * Get the target property: The target of the particular error.
+ *
+ * @return the target value.
+ */
+ public String target() {
+ return this.target;
+ }
+
+ /**
+ * Set the target property: The target of the particular error.
+ *
+ * @param target the target value to set.
+ * @return the ApiErrorBase object itself.
+ */
+ public ApiErrorBase withTarget(String target) {
+ this.target = target;
+ return this;
+ }
+
+ /**
+ * Get the message property: The error message.
+ *
+ * @return the message value.
+ */
+ public String message() {
+ return this.message;
+ }
+
+ /**
+ * Set the message property: The error message.
+ *
+ * @param message the message value to set.
+ * @return the ApiErrorBase object itself.
+ */
+ public ApiErrorBase withMessage(String message) {
+ this.message = message;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/models/ApplicationProfile.java b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/models/ApplicationProfile.java
new file mode 100644
index 000000000000..b818918f2005
--- /dev/null
+++ b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/models/ApplicationProfile.java
@@ -0,0 +1,60 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurefleet.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/**
+ * Contains the list of gallery applications that should be made available to the VM/VMSS.
+ */
+@Fluent
+public final class ApplicationProfile {
+ /*
+ * Specifies the gallery applications that should be made available to the VM/VMSS
+ */
+ @JsonProperty(value = "galleryApplications")
+ private List galleryApplications;
+
+ /**
+ * Creates an instance of ApplicationProfile class.
+ */
+ public ApplicationProfile() {
+ }
+
+ /**
+ * Get the galleryApplications property: Specifies the gallery applications that should be made available to the
+ * VM/VMSS.
+ *
+ * @return the galleryApplications value.
+ */
+ public List galleryApplications() {
+ return this.galleryApplications;
+ }
+
+ /**
+ * Set the galleryApplications property: Specifies the gallery applications that should be made available to the
+ * VM/VMSS.
+ *
+ * @param galleryApplications the galleryApplications value to set.
+ * @return the ApplicationProfile object itself.
+ */
+ public ApplicationProfile withGalleryApplications(List galleryApplications) {
+ this.galleryApplications = galleryApplications;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (galleryApplications() != null) {
+ galleryApplications().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/models/BillingProfile.java b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/models/BillingProfile.java
new file mode 100644
index 000000000000..566dc747c3c6
--- /dev/null
+++ b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/models/BillingProfile.java
@@ -0,0 +1,72 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurefleet.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Specifies the billing related details of a Azure Spot VM or VMSS. Minimum api-version: 2019-03-01.
+ */
+@Fluent
+public final class BillingProfile {
+ /*
+ * Specifies the maximum price you are willing to pay for a Azure Spot VM/VMSS. This price is in US Dollars.
This price will be compared with the current Azure Spot price for the VM size. Also, the prices are compared at the time of create/update of Azure Spot VM/VMSS and the operation will only succeed if the maxPrice is greater than the current Azure Spot price.
The maxPrice will also be used for evicting a Azure Spot VM/VMSS if the current Azure Spot price goes beyond the maxPrice after creation of VM/VMSS.
Possible values are:
- Any decimal value greater than zero. Example: 0.01538
-1 – indicates default price to be up-to on-demand.
You can set the maxPrice to -1 to indicate that the Azure Spot VM/VMSS should not be evicted for price reasons. Also, the default max price is -1 if it is not provided by you.
Minimum api-version: 2019-03-01.
+ */
+ @JsonProperty(value = "maxPrice")
+ private Double maxPrice;
+
+ /**
+ * Creates an instance of BillingProfile class.
+ */
+ public BillingProfile() {
+ }
+
+ /**
+ * Get the maxPrice property: Specifies the maximum price you are willing to pay for a Azure Spot VM/VMSS. This
+ * price is in US Dollars. <br><br> This price will be compared with the current Azure Spot price for
+ * the VM size. Also, the prices are compared at the time of create/update of Azure Spot VM/VMSS and the operation
+ * will only succeed if the maxPrice is greater than the current Azure Spot price. <br><br> The maxPrice
+ * will also be used for evicting a Azure Spot VM/VMSS if the current Azure Spot price goes beyond the maxPrice
+ * after creation of VM/VMSS. <br><br> Possible values are: <br><br> - Any decimal value
+ * greater than zero. Example: 0.01538 <br><br> -1 – indicates default price to be up-to on-demand.
+ * <br><br> You can set the maxPrice to -1 to indicate that the Azure Spot VM/VMSS should not be evicted
+ * for price reasons. Also, the default max price is -1 if it is not provided by you. <br><br>Minimum
+ * api-version: 2019-03-01.
+ *
+ * @return the maxPrice value.
+ */
+ public Double maxPrice() {
+ return this.maxPrice;
+ }
+
+ /**
+ * Set the maxPrice property: Specifies the maximum price you are willing to pay for a Azure Spot VM/VMSS. This
+ * price is in US Dollars. <br><br> This price will be compared with the current Azure Spot price for
+ * the VM size. Also, the prices are compared at the time of create/update of Azure Spot VM/VMSS and the operation
+ * will only succeed if the maxPrice is greater than the current Azure Spot price. <br><br> The maxPrice
+ * will also be used for evicting a Azure Spot VM/VMSS if the current Azure Spot price goes beyond the maxPrice
+ * after creation of VM/VMSS. <br><br> Possible values are: <br><br> - Any decimal value
+ * greater than zero. Example: 0.01538 <br><br> -1 – indicates default price to be up-to on-demand.
+ * <br><br> You can set the maxPrice to -1 to indicate that the Azure Spot VM/VMSS should not be evicted
+ * for price reasons. Also, the default max price is -1 if it is not provided by you. <br><br>Minimum
+ * api-version: 2019-03-01.
+ *
+ * @param maxPrice the maxPrice value to set.
+ * @return the BillingProfile object itself.
+ */
+ public BillingProfile withMaxPrice(Double maxPrice) {
+ this.maxPrice = maxPrice;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/models/BootDiagnostics.java b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/models/BootDiagnostics.java
new file mode 100644
index 000000000000..1fec114b2c96
--- /dev/null
+++ b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/models/BootDiagnostics.java
@@ -0,0 +1,84 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurefleet.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
+ * You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the
+ * hypervisor.
+ */
+@Fluent
+public final class BootDiagnostics {
+ /*
+ * Whether boot diagnostics should be enabled on the Virtual Machine.
+ */
+ @JsonProperty(value = "enabled")
+ private Boolean enabled;
+
+ /*
+ * Uri of the storage account to use for placing the console output and screenshot. If storageUri is not specified while enabling boot diagnostics, managed storage will be used.
+ */
+ @JsonProperty(value = "storageUri")
+ private String storageUri;
+
+ /**
+ * Creates an instance of BootDiagnostics class.
+ */
+ public BootDiagnostics() {
+ }
+
+ /**
+ * Get the enabled property: Whether boot diagnostics should be enabled on the Virtual Machine.
+ *
+ * @return the enabled value.
+ */
+ public Boolean enabled() {
+ return this.enabled;
+ }
+
+ /**
+ * Set the enabled property: Whether boot diagnostics should be enabled on the Virtual Machine.
+ *
+ * @param enabled the enabled value to set.
+ * @return the BootDiagnostics object itself.
+ */
+ public BootDiagnostics withEnabled(Boolean enabled) {
+ this.enabled = enabled;
+ return this;
+ }
+
+ /**
+ * Get the storageUri property: Uri of the storage account to use for placing the console output and screenshot. If
+ * storageUri is not specified while enabling boot diagnostics, managed storage will be used.
+ *
+ * @return the storageUri value.
+ */
+ public String storageUri() {
+ return this.storageUri;
+ }
+
+ /**
+ * Set the storageUri property: Uri of the storage account to use for placing the console output and screenshot. If
+ * storageUri is not specified while enabling boot diagnostics, managed storage will be used.
+ *
+ * @param storageUri the storageUri value to set.
+ * @return the BootDiagnostics object itself.
+ */
+ public BootDiagnostics withStorageUri(String storageUri) {
+ this.storageUri = storageUri;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/models/CachingTypes.java b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/models/CachingTypes.java
new file mode 100644
index 000000000000..d3cb81d47ce8
--- /dev/null
+++ b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/models/CachingTypes.java
@@ -0,0 +1,67 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurefleet.models;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The default values
+ * are: **None for Standard storage. ReadOnly for Premium storage**.
+ */
+public enum CachingTypes {
+ /**
+ * Enum value None.
+ */
+ NONE("None"),
+
+ /**
+ * Enum value ReadOnly.
+ */
+ READ_ONLY("ReadOnly"),
+
+ /**
+ * Enum value ReadWrite.
+ */
+ READ_WRITE("ReadWrite");
+
+ /**
+ * The actual serialized value for a CachingTypes instance.
+ */
+ private final String value;
+
+ CachingTypes(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Parses a serialized value to a CachingTypes instance.
+ *
+ * @param value the serialized value to parse.
+ * @return the parsed CachingTypes object, or null if unable to parse.
+ */
+ @JsonCreator
+ public static CachingTypes fromString(String value) {
+ if (value == null) {
+ return null;
+ }
+ CachingTypes[] items = CachingTypes.values();
+ for (CachingTypes item : items) {
+ if (item.toString().equalsIgnoreCase(value)) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @JsonValue
+ @Override
+ public String toString() {
+ return this.value;
+ }
+}
diff --git a/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/models/CapacityReservationProfile.java b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/models/CapacityReservationProfile.java
new file mode 100644
index 000000000000..91a8a24b77d6
--- /dev/null
+++ b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/models/CapacityReservationProfile.java
@@ -0,0 +1,59 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurefleet.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.SubResource;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The parameters of a capacity reservation Profile.
+ */
+@Fluent
+public final class CapacityReservationProfile {
+ /*
+ * Specifies the capacity reservation group resource id that should be used for allocating the virtual machine or scaleset vm instances provided enough capacity has been reserved. Please refer to https://aka.ms/CapacityReservation for more details.
+ */
+ @JsonProperty(value = "capacityReservationGroup")
+ private SubResource capacityReservationGroup;
+
+ /**
+ * Creates an instance of CapacityReservationProfile class.
+ */
+ public CapacityReservationProfile() {
+ }
+
+ /**
+ * Get the capacityReservationGroup property: Specifies the capacity reservation group resource id that should be
+ * used for allocating the virtual machine or scaleset vm instances provided enough capacity has been reserved.
+ * Please refer to https://aka.ms/CapacityReservation for more details.
+ *
+ * @return the capacityReservationGroup value.
+ */
+ public SubResource capacityReservationGroup() {
+ return this.capacityReservationGroup;
+ }
+
+ /**
+ * Set the capacityReservationGroup property: Specifies the capacity reservation group resource id that should be
+ * used for allocating the virtual machine or scaleset vm instances provided enough capacity has been reserved.
+ * Please refer to https://aka.ms/CapacityReservation for more details.
+ *
+ * @param capacityReservationGroup the capacityReservationGroup value to set.
+ * @return the CapacityReservationProfile object itself.
+ */
+ public CapacityReservationProfile withCapacityReservationGroup(SubResource capacityReservationGroup) {
+ this.capacityReservationGroup = capacityReservationGroup;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/models/ComponentNames.java b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/models/ComponentNames.java
new file mode 100644
index 000000000000..ddd0cbe9033f
--- /dev/null
+++ b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/models/ComponentNames.java
@@ -0,0 +1,56 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurefleet.models;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * The component name. Currently, the only allowable value is Microsoft-Windows-Shell-Setup.
+ */
+public enum ComponentNames {
+ /**
+ * Enum value Microsoft-Windows-Shell-Setup.
+ */
+ MICROSOFT_WINDOWS_SHELL_SETUP("Microsoft-Windows-Shell-Setup");
+
+ /**
+ * The actual serialized value for a ComponentNames instance.
+ */
+ private final String value;
+
+ ComponentNames(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Parses a serialized value to a ComponentNames instance.
+ *
+ * @param value the serialized value to parse.
+ * @return the parsed ComponentNames object, or null if unable to parse.
+ */
+ @JsonCreator
+ public static ComponentNames fromString(String value) {
+ if (value == null) {
+ return null;
+ }
+ ComponentNames[] items = ComponentNames.values();
+ for (ComponentNames item : items) {
+ if (item.toString().equalsIgnoreCase(value)) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @JsonValue
+ @Override
+ public String toString() {
+ return this.value;
+ }
+}
diff --git a/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/models/ComputeProfile.java b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/models/ComputeProfile.java
new file mode 100644
index 000000000000..167a2d0b3ab1
--- /dev/null
+++ b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/models/ComputeProfile.java
@@ -0,0 +1,137 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurefleet.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Compute Profile to use for running user's workloads.
+ */
+@Fluent
+public final class ComputeProfile {
+ /*
+ * Base Virtual Machine Profile Properties to be specified according to "specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/{computeApiVersion}/virtualMachineScaleSet.json#/definitions/VirtualMachineScaleSetVMProfile"
+ */
+ @JsonProperty(value = "baseVirtualMachineProfile", required = true)
+ private VirtualMachineScaleSetVMProfile 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.
+ */
+ @JsonProperty(value = "computeApiVersion")
+ 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.
+ */
+ @JsonProperty(value = "platformFaultDomainCount")
+ 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 VirtualMachineScaleSetVMProfile 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(VirtualMachineScaleSetVMProfile 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"));
+ } else {
+ baseVirtualMachineProfile().validate();
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(ComputeProfile.class);
+}
diff --git a/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/models/ComputeProfileUpdate.java b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/models/ComputeProfileUpdate.java
new file mode 100644
index 000000000000..25b6eab95e64
--- /dev/null
+++ b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/models/ComputeProfileUpdate.java
@@ -0,0 +1,131 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurefleet.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Compute Profile to use for running user's workloads.
+ */
+@Fluent
+public final class ComputeProfileUpdate {
+ /*
+ * Base Virtual Machine Profile Properties to be specified according to "specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/{computeApiVersion}/virtualMachineScaleSet.json#/definitions/VirtualMachineScaleSetVMProfile"
+ */
+ @JsonProperty(value = "baseVirtualMachineProfile")
+ private VirtualMachineScaleSetVMProfile 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.
+ */
+ @JsonProperty(value = "computeApiVersion")
+ 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.
+ */
+ @JsonProperty(value = "platformFaultDomainCount")
+ private Integer platformFaultDomainCount;
+
+ /**
+ * Creates an instance of ComputeProfileUpdate class.
+ */
+ public ComputeProfileUpdate() {
+ }
+
+ /**
+ * 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 VirtualMachineScaleSetVMProfile 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 ComputeProfileUpdate object itself.
+ */
+ public ComputeProfileUpdate
+ withBaseVirtualMachineProfile(VirtualMachineScaleSetVMProfile 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 ComputeProfileUpdate object itself.
+ */
+ public ComputeProfileUpdate 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 ComputeProfileUpdate object itself.
+ */
+ public ComputeProfileUpdate 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) {
+ baseVirtualMachineProfile().validate();
+ }
+ }
+}
diff --git a/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/models/DeleteOptions.java b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/models/DeleteOptions.java
new file mode 100644
index 000000000000..061d97ebee28
--- /dev/null
+++ b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/models/DeleteOptions.java
@@ -0,0 +1,53 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurefleet.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.Collection;
+
+/**
+ * Specify what happens to the network interface when the VM is deleted.
+ */
+public final class DeleteOptions extends ExpandableStringEnum {
+ /**
+ * Static value Delete for DeleteOptions.
+ */
+ public static final DeleteOptions DELETE = fromString("Delete");
+
+ /**
+ * Static value Detach for DeleteOptions.
+ */
+ public static final DeleteOptions DETACH = fromString("Detach");
+
+ /**
+ * Creates a new instance of DeleteOptions value.
+ *
+ * @deprecated Use the {@link #fromString(String)} factory method.
+ */
+ @Deprecated
+ public DeleteOptions() {
+ }
+
+ /**
+ * Creates or finds a DeleteOptions from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding DeleteOptions.
+ */
+ @JsonCreator
+ public static DeleteOptions fromString(String name) {
+ return fromString(name, DeleteOptions.class);
+ }
+
+ /**
+ * Gets known DeleteOptions values.
+ *
+ * @return known DeleteOptions values.
+ */
+ public static Collection values() {
+ return values(DeleteOptions.class);
+ }
+}
diff --git a/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/models/DiagnosticsProfile.java b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/models/DiagnosticsProfile.java
new file mode 100644
index 000000000000..4b7d1f920523
--- /dev/null
+++ b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/models/DiagnosticsProfile.java
@@ -0,0 +1,63 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurefleet.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15.
+ */
+@Fluent
+public final class DiagnosticsProfile {
+ /*
+ * Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. **NOTE**: If storageUri is being specified then ensure that the storage account is in the same region and subscription as the VM. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor.
+ */
+ @JsonProperty(value = "bootDiagnostics")
+ private BootDiagnostics bootDiagnostics;
+
+ /**
+ * Creates an instance of DiagnosticsProfile class.
+ */
+ public DiagnosticsProfile() {
+ }
+
+ /**
+ * Get the bootDiagnostics property: Boot Diagnostics is a debugging feature which allows you to view Console Output
+ * and Screenshot to diagnose VM status. **NOTE**: If storageUri is being specified then ensure that the storage
+ * account is in the same region and subscription as the VM. You can easily view the output of your console log.
+ * Azure also enables you to see a screenshot of the VM from the hypervisor.
+ *
+ * @return the bootDiagnostics value.
+ */
+ public BootDiagnostics bootDiagnostics() {
+ return this.bootDiagnostics;
+ }
+
+ /**
+ * Set the bootDiagnostics property: Boot Diagnostics is a debugging feature which allows you to view Console Output
+ * and Screenshot to diagnose VM status. **NOTE**: If storageUri is being specified then ensure that the storage
+ * account is in the same region and subscription as the VM. You can easily view the output of your console log.
+ * Azure also enables you to see a screenshot of the VM from the hypervisor.
+ *
+ * @param bootDiagnostics the bootDiagnostics value to set.
+ * @return the DiagnosticsProfile object itself.
+ */
+ public DiagnosticsProfile withBootDiagnostics(BootDiagnostics bootDiagnostics) {
+ this.bootDiagnostics = bootDiagnostics;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (bootDiagnostics() != null) {
+ bootDiagnostics().validate();
+ }
+ }
+}
diff --git a/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/models/DiffDiskOptions.java b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/models/DiffDiskOptions.java
new file mode 100644
index 000000000000..8165836d904a
--- /dev/null
+++ b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/models/DiffDiskOptions.java
@@ -0,0 +1,48 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurefleet.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.Collection;
+
+/**
+ * Specifies the ephemeral disk option for operating system disk.
+ */
+public final class DiffDiskOptions extends ExpandableStringEnum {
+ /**
+ * Static value Local for DiffDiskOptions.
+ */
+ public static final DiffDiskOptions LOCAL = fromString("Local");
+
+ /**
+ * Creates a new instance of DiffDiskOptions value.
+ *
+ * @deprecated Use the {@link #fromString(String)} factory method.
+ */
+ @Deprecated
+ public DiffDiskOptions() {
+ }
+
+ /**
+ * Creates or finds a DiffDiskOptions from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding DiffDiskOptions.
+ */
+ @JsonCreator
+ public static DiffDiskOptions fromString(String name) {
+ return fromString(name, DiffDiskOptions.class);
+ }
+
+ /**
+ * Gets known DiffDiskOptions values.
+ *
+ * @return known DiffDiskOptions values.
+ */
+ public static Collection values() {
+ return values(DiffDiskOptions.class);
+ }
+}
diff --git a/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/models/DiffDiskPlacement.java b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/models/DiffDiskPlacement.java
new file mode 100644
index 000000000000..7d3211f3e704
--- /dev/null
+++ b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/models/DiffDiskPlacement.java
@@ -0,0 +1,57 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurefleet.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.Collection;
+
+/**
+ * Specifies the ephemeral disk placement for operating system disk. This property can be used by user in the request to
+ * choose the location i.e, cache disk or resource disk space for Ephemeral OS disk provisioning. For more information
+ * on Ephemeral OS disk size requirements, please refer Ephemeral OS disk size requirements for Windows VM at
+ * https://docs.microsoft.com/azure/virtual-machines/windows/ephemeral-os-disks#size-requirements and Linux VM at
+ * https://docs.microsoft.com/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements.
+ */
+public final class DiffDiskPlacement extends ExpandableStringEnum {
+ /**
+ * Static value CacheDisk for DiffDiskPlacement.
+ */
+ public static final DiffDiskPlacement CACHE_DISK = fromString("CacheDisk");
+
+ /**
+ * Static value ResourceDisk for DiffDiskPlacement.
+ */
+ public static final DiffDiskPlacement RESOURCE_DISK = fromString("ResourceDisk");
+
+ /**
+ * Creates a new instance of DiffDiskPlacement value.
+ *
+ * @deprecated Use the {@link #fromString(String)} factory method.
+ */
+ @Deprecated
+ public DiffDiskPlacement() {
+ }
+
+ /**
+ * Creates or finds a DiffDiskPlacement from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding DiffDiskPlacement.
+ */
+ @JsonCreator
+ public static DiffDiskPlacement fromString(String name) {
+ return fromString(name, DiffDiskPlacement.class);
+ }
+
+ /**
+ * Gets known DiffDiskPlacement values.
+ *
+ * @return known DiffDiskPlacement values.
+ */
+ public static Collection values() {
+ return values(DiffDiskPlacement.class);
+ }
+}
diff --git a/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/models/DiffDiskSettings.java b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/models/DiffDiskSettings.java
new file mode 100644
index 000000000000..c7b0f2e9c81a
--- /dev/null
+++ b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/models/DiffDiskSettings.java
@@ -0,0 +1,89 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurefleet.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Describes the parameters of ephemeral disk settings that can be specified for operating system disk. **Note:** The
+ * ephemeral disk settings can only be specified for managed disk.
+ */
+@Fluent
+public final class DiffDiskSettings {
+ /*
+ * Specifies the ephemeral disk settings for operating system disk.
+ */
+ @JsonProperty(value = "option")
+ private DiffDiskOptions option;
+
+ /*
+ * Specifies the ephemeral disk placement for operating system disk. Possible values are: **CacheDisk,** **ResourceDisk.** The defaulting behavior is: **CacheDisk** if one is configured for the VM size otherwise **ResourceDisk** is used. Refer to the VM size documentation for Windows VM at https://docs.microsoft.com/azure/virtual-machines/windows/sizes and Linux VM at https://docs.microsoft.com/azure/virtual-machines/linux/sizes to check which VM sizes exposes a cache disk.
+ */
+ @JsonProperty(value = "placement")
+ private DiffDiskPlacement placement;
+
+ /**
+ * Creates an instance of DiffDiskSettings class.
+ */
+ public DiffDiskSettings() {
+ }
+
+ /**
+ * Get the option property: Specifies the ephemeral disk settings for operating system disk.
+ *
+ * @return the option value.
+ */
+ public DiffDiskOptions option() {
+ return this.option;
+ }
+
+ /**
+ * Set the option property: Specifies the ephemeral disk settings for operating system disk.
+ *
+ * @param option the option value to set.
+ * @return the DiffDiskSettings object itself.
+ */
+ public DiffDiskSettings withOption(DiffDiskOptions option) {
+ this.option = option;
+ return this;
+ }
+
+ /**
+ * Get the placement property: Specifies the ephemeral disk placement for operating system disk. Possible values
+ * are: **CacheDisk,** **ResourceDisk.** The defaulting behavior is: **CacheDisk** if one is configured for the VM
+ * size otherwise **ResourceDisk** is used. Refer to the VM size documentation for Windows VM at
+ * https://docs.microsoft.com/azure/virtual-machines/windows/sizes and Linux VM at
+ * https://docs.microsoft.com/azure/virtual-machines/linux/sizes to check which VM sizes exposes a cache disk.
+ *
+ * @return the placement value.
+ */
+ public DiffDiskPlacement placement() {
+ return this.placement;
+ }
+
+ /**
+ * Set the placement property: Specifies the ephemeral disk placement for operating system disk. Possible values
+ * are: **CacheDisk,** **ResourceDisk.** The defaulting behavior is: **CacheDisk** if one is configured for the VM
+ * size otherwise **ResourceDisk** is used. Refer to the VM size documentation for Windows VM at
+ * https://docs.microsoft.com/azure/virtual-machines/windows/sizes and Linux VM at
+ * https://docs.microsoft.com/azure/virtual-machines/linux/sizes to check which VM sizes exposes a cache disk.
+ *
+ * @param placement the placement value to set.
+ * @return the DiffDiskSettings object itself.
+ */
+ public DiffDiskSettings withPlacement(DiffDiskPlacement placement) {
+ this.placement = placement;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/models/DiskCreateOptionTypes.java b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/models/DiskCreateOptionTypes.java
new file mode 100644
index 000000000000..06d7ff50b61a
--- /dev/null
+++ b/sdk/azurefleet/azure-resourcemanager-azurefleet/src/main/java/com/azure/resourcemanager/azurefleet/models/DiskCreateOptionTypes.java
@@ -0,0 +1,61 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.azurefleet.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.Collection;
+
+/**
+ * Specifies how the virtual machine should be created. Possible values are: **Attach.** This value is used when you are
+ * using a specialized disk to create the virtual machine. **FromImage.** This value is used when you are using an image
+ * to create the virtual machine. If you are using a platform image, you also use the imageReference element described
+ * above. If you are using a marketplace image, you also use the plan element previously described.
+ */
+public final class DiskCreateOptionTypes extends ExpandableStringEnum {
+ /**
+ * Static value FromImage for DiskCreateOptionTypes.
+ */
+ public static final DiskCreateOptionTypes FROM_IMAGE = fromString("FromImage");
+
+ /**
+ * Static value Empty for DiskCreateOptionTypes.
+ */
+ public static final DiskCreateOptionTypes EMPTY = fromString("Empty");
+
+ /**
+ * Static value Attach for DiskCreateOptionTypes.
+ */
+ public static final DiskCreateOptionTypes ATTACH = fromString("Attach");
+
+ /**
+ * Creates a new instance of DiskCreateOptionTypes value.
+ *
+ * @deprecated Use the {@link #fromString(String)} factory method.
+ */
+ @Deprecated
+ public DiskCreateOptionTypes() {
+ }
+
+ /**
+ * Creates or finds a DiskCreateOptionTypes from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding DiskCreateOptionTypes.
+ */
+ @JsonCreator
+ public static DiskCreateOptionTypes fromString(String name) {
+ return fromString(name, DiskCreateOptionTypes.class);
+ }
+
+ /**
+ * Gets known DiskCreateOptionTypes values.
+ *
+ * @return known DiskCreateOptionTypes values.
+ */
+ public static Collection