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 ContainerServiceFleet service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the ContainerServiceFleet service API instance.
+ */
+ public ContainerServiceFleetManager 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.containerservicefleet")
+ .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 ContainerServiceFleetManager(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 FleetMembers. It manages FleetMember.
+ *
+ * @return Resource collection API of FleetMembers.
+ */
+ public FleetMembers fleetMembers() {
+ if (this.fleetMembers == null) {
+ this.fleetMembers = new FleetMembersImpl(clientObject.getFleetMembers(), this);
+ }
+ return fleetMembers;
+ }
+
+ /**
+ * Gets the resource collection API of UpdateRuns. It manages UpdateRun.
+ *
+ * @return Resource collection API of UpdateRuns.
+ */
+ public UpdateRuns updateRuns() {
+ if (this.updateRuns == null) {
+ this.updateRuns = new UpdateRunsImpl(clientObject.getUpdateRuns(), this);
+ }
+ return updateRuns;
+ }
+
+ /**
+ * @return Wrapped service client ContainerServiceFleetManagementClient providing direct access to the underlying
+ * auto-generated API implementation, based on Azure REST API.
+ */
+ public ContainerServiceFleetManagementClient serviceClient() {
+ return this.clientObject;
+ }
+}
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/ContainerServiceFleetManagementClient.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/ContainerServiceFleetManagementClient.java
new file mode 100644
index 0000000000000..969e4dda852e8
--- /dev/null
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/ContainerServiceFleetManagementClient.java
@@ -0,0 +1,74 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.containerservicefleet.fluent;
+
+import com.azure.core.http.HttpPipeline;
+import java.time.Duration;
+
+/** The interface for ContainerServiceFleetManagementClient class. */
+public interface ContainerServiceFleetManagementClient {
+ /**
+ * Gets The ID of the target subscription.
+ *
+ * @return the subscriptionId value.
+ */
+ String getSubscriptionId();
+
+ /**
+ * Gets server parameter.
+ *
+ * @return the endpoint value.
+ */
+ String getEndpoint();
+
+ /**
+ * Gets Api Version.
+ *
+ * @return the apiVersion value.
+ */
+ String getApiVersion();
+
+ /**
+ * Gets The HTTP pipeline to send requests through.
+ *
+ * @return the httpPipeline value.
+ */
+ HttpPipeline getHttpPipeline();
+
+ /**
+ * Gets The default poll interval for long-running operation.
+ *
+ * @return the defaultPollInterval value.
+ */
+ Duration getDefaultPollInterval();
+
+ /**
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ OperationsClient getOperations();
+
+ /**
+ * Gets the FleetsClient object to access its operations.
+ *
+ * @return the FleetsClient object.
+ */
+ FleetsClient getFleets();
+
+ /**
+ * Gets the FleetMembersClient object to access its operations.
+ *
+ * @return the FleetMembersClient object.
+ */
+ FleetMembersClient getFleetMembers();
+
+ /**
+ * Gets the UpdateRunsClient object to access its operations.
+ *
+ * @return the UpdateRunsClient object.
+ */
+ UpdateRunsClient getUpdateRuns();
+}
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/FleetMembersClient.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/FleetMembersClient.java
new file mode 100644
index 0000000000000..0471f5c8a45b5
--- /dev/null
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/FleetMembersClient.java
@@ -0,0 +1,255 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.containerservicefleet.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.containerservicefleet.fluent.models.FleetMemberInner;
+import com.azure.resourcemanager.containerservicefleet.models.FleetMemberUpdate;
+
+/** An instance of this class provides access to all the operations defined in FleetMembersClient. */
+public interface FleetMembersClient {
+ /**
+ * List FleetMember resources by Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a FleetMember list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByFleet(String resourceGroupName, String fleetName);
+
+ /**
+ * List FleetMember resources by Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a FleetMember list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByFleet(String resourceGroupName, String fleetName, Context context);
+
+ /**
+ * Get a FleetMember.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param fleetMemberName The name of the Fleet member resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a FleetMember along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String fleetName, String fleetMemberName, Context context);
+
+ /**
+ * Get a FleetMember.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param fleetMemberName The name of the Fleet member resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a FleetMember.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FleetMemberInner get(String resourceGroupName, String fleetName, String fleetMemberName);
+
+ /**
+ * Create a FleetMember.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param fleetMemberName The name of the Fleet member resource.
+ * @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 a member of the Fleet.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, FleetMemberInner> beginCreate(
+ String resourceGroupName, String fleetName, String fleetMemberName, FleetMemberInner resource);
+
+ /**
+ * Create a FleetMember.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param fleetMemberName The name of the Fleet member resource.
+ * @param resource Resource create parameters.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @param ifNoneMatch The request should only proceed if no entity matches this string.
+ * @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 a member of the Fleet.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, FleetMemberInner> beginCreate(
+ String resourceGroupName,
+ String fleetName,
+ String fleetMemberName,
+ FleetMemberInner resource,
+ String ifMatch,
+ String ifNoneMatch,
+ Context context);
+
+ /**
+ * Create a FleetMember.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param fleetMemberName The name of the Fleet member resource.
+ * @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 a member of the Fleet.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FleetMemberInner create(
+ String resourceGroupName, String fleetName, String fleetMemberName, FleetMemberInner resource);
+
+ /**
+ * Create a FleetMember.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param fleetMemberName The name of the Fleet member resource.
+ * @param resource Resource create parameters.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @param ifNoneMatch The request should only proceed if no entity matches this string.
+ * @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 member of the Fleet.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FleetMemberInner create(
+ String resourceGroupName,
+ String fleetName,
+ String fleetMemberName,
+ FleetMemberInner resource,
+ String ifMatch,
+ String ifNoneMatch,
+ Context context);
+
+ /**
+ * Update a FleetMember.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param fleetMemberName The name of the Fleet member resource.
+ * @param properties The resource properties to be updated.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @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 member of the Fleet along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(
+ String resourceGroupName,
+ String fleetName,
+ String fleetMemberName,
+ FleetMemberUpdate properties,
+ String ifMatch,
+ Context context);
+
+ /**
+ * Update a FleetMember.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param fleetMemberName The name of the Fleet member resource.
+ * @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 a member of the Fleet.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FleetMemberInner update(
+ String resourceGroupName, String fleetName, String fleetMemberName, FleetMemberUpdate properties);
+
+ /**
+ * Delete a FleetMember.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param fleetMemberName The name of the Fleet member resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String fleetName, String fleetMemberName);
+
+ /**
+ * Delete a FleetMember.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param fleetMemberName The name of the Fleet member resource.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @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, String fleetMemberName, String ifMatch, Context context);
+
+ /**
+ * Delete a FleetMember.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param fleetMemberName The name of the Fleet member resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String fleetName, String fleetMemberName);
+
+ /**
+ * Delete a FleetMember.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param fleetMemberName The name of the Fleet member resource.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @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, String fleetMemberName, String ifMatch, Context context);
+}
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/FleetsClient.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/FleetsClient.java
new file mode 100644
index 0000000000000..8e13481a37f9e
--- /dev/null
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/FleetsClient.java
@@ -0,0 +1,282 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.containerservicefleet.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.containerservicefleet.fluent.models.FleetCredentialResultsInner;
+import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetInner;
+import com.azure.resourcemanager.containerservicefleet.models.FleetPatch;
+
+/** An instance of this class provides access to all the operations defined in FleetsClient. */
+public interface FleetsClient {
+ /**
+ * Lists fleets in the specified subscription.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Fleet list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Lists fleets in the specified subscription.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Fleet list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+
+ /**
+ * Lists fleets in the specified subscription and 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);
+
+ /**
+ * Lists fleets in the specified subscription and 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);
+
+ /**
+ * Gets a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Fleet along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(String resourceGroupName, String fleetName, Context context);
+
+ /**
+ * Gets a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Fleet.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FleetInner getByResourceGroup(String resourceGroupName, String fleetName);
+
+ /**
+ * Creates or updates a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @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 the Fleet resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, FleetInner> beginCreateOrUpdate(
+ String resourceGroupName, String fleetName, FleetInner resource);
+
+ /**
+ * Creates or updates a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param resource Resource create parameters.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @param ifNoneMatch The request should only proceed if no entity matches this string.
+ * @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 the Fleet resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, FleetInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String fleetName,
+ FleetInner resource,
+ String ifMatch,
+ String ifNoneMatch,
+ Context context);
+
+ /**
+ * Creates or updates a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @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 Fleet resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FleetInner createOrUpdate(String resourceGroupName, String fleetName, FleetInner resource);
+
+ /**
+ * Creates or updates a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param resource Resource create parameters.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @param ifNoneMatch The request should only proceed if no entity matches this string.
+ * @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 Fleet resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FleetInner createOrUpdate(
+ String resourceGroupName,
+ String fleetName,
+ FleetInner resource,
+ String ifMatch,
+ String ifNoneMatch,
+ Context context);
+
+ /**
+ * Update a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param properties The resource properties to be updated.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @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 Fleet resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(
+ String resourceGroupName, String fleetName, FleetPatch properties, String ifMatch, Context context);
+
+ /**
+ * Update a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @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 Fleet resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FleetInner update(String resourceGroupName, String fleetName, FleetPatch properties);
+
+ /**
+ * Delete a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String fleetName);
+
+ /**
+ * Delete a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @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, String ifMatch, Context context);
+
+ /**
+ * Delete a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String fleetName);
+
+ /**
+ * Delete a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @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, String ifMatch, Context context);
+
+ /**
+ * Lists the user credentials of a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the Credential results response along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response listCredentialsWithResponse(
+ String resourceGroupName, String fleetName, Context context);
+
+ /**
+ * Lists the user credentials of a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the Credential results response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FleetCredentialResultsInner listCredentials(String resourceGroupName, String fleetName);
+}
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/OperationsClient.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/OperationsClient.java
new file mode 100644
index 0000000000000..49b4687b7b615
--- /dev/null
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/OperationsClient.java
@@ -0,0 +1,38 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.containerservicefleet.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.containerservicefleet.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/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/UpdateRunsClient.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/UpdateRunsClient.java
new file mode 100644
index 0000000000000..4600c323c6476
--- /dev/null
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/UpdateRunsClient.java
@@ -0,0 +1,347 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.containerservicefleet.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.containerservicefleet.fluent.models.UpdateRunInner;
+
+/** An instance of this class provides access to all the operations defined in UpdateRunsClient. */
+public interface UpdateRunsClient {
+ /**
+ * List UpdateRun resources by Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a UpdateRun list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByFleet(String resourceGroupName, String fleetName);
+
+ /**
+ * List UpdateRun resources by Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a UpdateRun list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByFleet(String resourceGroupName, String fleetName, Context context);
+
+ /**
+ * Get a UpdateRun.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param updateRunName The name of the UpdateRun resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a UpdateRun along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String fleetName, String updateRunName, Context context);
+
+ /**
+ * Get a UpdateRun.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param updateRunName The name of the UpdateRun resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a UpdateRun.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ UpdateRunInner get(String resourceGroupName, String fleetName, String updateRunName);
+
+ /**
+ * Create a UpdateRun.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param updateRunName The name of the UpdateRun resource.
+ * @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 UpdateRun is a multi-stage process to perform update operations
+ * across members of a Fleet.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, UpdateRunInner> beginCreateOrUpdate(
+ String resourceGroupName, String fleetName, String updateRunName, UpdateRunInner resource);
+
+ /**
+ * Create a UpdateRun.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param updateRunName The name of the UpdateRun resource.
+ * @param resource Resource create parameters.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @param ifNoneMatch The request should only proceed if no entity matches this string.
+ * @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 UpdateRun is a multi-stage process to perform update operations
+ * across members of a Fleet.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, UpdateRunInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String fleetName,
+ String updateRunName,
+ UpdateRunInner resource,
+ String ifMatch,
+ String ifNoneMatch,
+ Context context);
+
+ /**
+ * Create a UpdateRun.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param updateRunName The name of the UpdateRun resource.
+ * @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 UpdateRun is a multi-stage process to perform update operations across members of a Fleet.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ UpdateRunInner createOrUpdate(
+ String resourceGroupName, String fleetName, String updateRunName, UpdateRunInner resource);
+
+ /**
+ * Create a UpdateRun.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param updateRunName The name of the UpdateRun resource.
+ * @param resource Resource create parameters.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @param ifNoneMatch The request should only proceed if no entity matches this string.
+ * @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 UpdateRun is a multi-stage process to perform update operations across members of a Fleet.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ UpdateRunInner createOrUpdate(
+ String resourceGroupName,
+ String fleetName,
+ String updateRunName,
+ UpdateRunInner resource,
+ String ifMatch,
+ String ifNoneMatch,
+ Context context);
+
+ /**
+ * Delete a UpdateRun.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param updateRunName The name of the UpdateRun resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String fleetName, String updateRunName);
+
+ /**
+ * Delete a UpdateRun.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param updateRunName The name of the UpdateRun resource.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @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, String updateRunName, String ifMatch, Context context);
+
+ /**
+ * Delete a UpdateRun.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param updateRunName The name of the UpdateRun resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String fleetName, String updateRunName);
+
+ /**
+ * Delete a UpdateRun.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param updateRunName The name of the UpdateRun resource.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @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, String updateRunName, String ifMatch, Context context);
+
+ /**
+ * Starts an UpdateRun.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param updateRunName The name of the UpdateRun resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of an UpdateRun is a multi-stage process to perform update operations
+ * across members of a Fleet.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, UpdateRunInner> beginStart(
+ String resourceGroupName, String fleetName, String updateRunName);
+
+ /**
+ * Starts an UpdateRun.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param updateRunName The name of the UpdateRun resource.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @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 UpdateRun is a multi-stage process to perform update operations
+ * across members of a Fleet.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, UpdateRunInner> beginStart(
+ String resourceGroupName, String fleetName, String updateRunName, String ifMatch, Context context);
+
+ /**
+ * Starts an UpdateRun.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param updateRunName The name of the UpdateRun resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an UpdateRun is a multi-stage process to perform update operations across members of a Fleet.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ UpdateRunInner start(String resourceGroupName, String fleetName, String updateRunName);
+
+ /**
+ * Starts an UpdateRun.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param updateRunName The name of the UpdateRun resource.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @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 UpdateRun is a multi-stage process to perform update operations across members of a Fleet.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ UpdateRunInner start(
+ String resourceGroupName, String fleetName, String updateRunName, String ifMatch, Context context);
+
+ /**
+ * Stops an UpdateRun.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param updateRunName The name of the UpdateRun resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of an UpdateRun is a multi-stage process to perform update operations
+ * across members of a Fleet.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, UpdateRunInner> beginStop(
+ String resourceGroupName, String fleetName, String updateRunName);
+
+ /**
+ * Stops an UpdateRun.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param updateRunName The name of the UpdateRun resource.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @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 UpdateRun is a multi-stage process to perform update operations
+ * across members of a Fleet.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, UpdateRunInner> beginStop(
+ String resourceGroupName, String fleetName, String updateRunName, String ifMatch, Context context);
+
+ /**
+ * Stops an UpdateRun.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param updateRunName The name of the UpdateRun resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an UpdateRun is a multi-stage process to perform update operations across members of a Fleet.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ UpdateRunInner stop(String resourceGroupName, String fleetName, String updateRunName);
+
+ /**
+ * Stops an UpdateRun.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param updateRunName The name of the UpdateRun resource.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @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 UpdateRun is a multi-stage process to perform update operations across members of a Fleet.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ UpdateRunInner stop(
+ String resourceGroupName, String fleetName, String updateRunName, String ifMatch, Context context);
+}
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetCredentialResultsInner.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetCredentialResultsInner.java
new file mode 100644
index 0000000000000..18206743527ff
--- /dev/null
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetCredentialResultsInner.java
@@ -0,0 +1,44 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.containerservicefleet.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.resourcemanager.containerservicefleet.models.FleetCredentialResult;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** The Credential results response. */
+@Immutable
+public final class FleetCredentialResultsInner {
+ /*
+ * Array of base64-encoded Kubernetes configuration files.
+ */
+ @JsonProperty(value = "kubeconfigs", access = JsonProperty.Access.WRITE_ONLY)
+ private List kubeconfigs;
+
+ /** Creates an instance of FleetCredentialResultsInner class. */
+ public FleetCredentialResultsInner() {
+ }
+
+ /**
+ * Get the kubeconfigs property: Array of base64-encoded Kubernetes configuration files.
+ *
+ * @return the kubeconfigs value.
+ */
+ public List kubeconfigs() {
+ return this.kubeconfigs;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (kubeconfigs() != null) {
+ kubeconfigs().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetInner.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetInner.java
new file mode 100644
index 0000000000000..eb33abb3b6545
--- /dev/null
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetInner.java
@@ -0,0 +1,129 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.containerservicefleet.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.Resource;
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.containerservicefleet.models.FleetHubProfile;
+import com.azure.resourcemanager.containerservicefleet.models.FleetProvisioningState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+
+/** The Fleet resource. */
+@Fluent
+public final class FleetInner extends Resource {
+ /*
+ * The resource-specific properties for this resource.
+ */
+ @JsonProperty(value = "properties")
+ private FleetProperties innerProperties;
+
+ /*
+ * If eTag is provided in the response body, it may also be provided as a header per the normal etag convention.
+ * Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity
+ * tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section
+ * 14.27) header fields.
+ */
+ @JsonProperty(value = "eTag", access = JsonProperty.Access.WRITE_ONLY)
+ private String etag;
+
+ /*
+ * 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 etag property: If eTag is provided in the response body, it may also be provided as a header per the
+ * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource.
+ * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26),
+ * and If-Range (section 14.27) header fields.
+ *
+ * @return the etag value.
+ */
+ public String etag() {
+ return this.etag;
+ }
+
+ /**
+ * 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 FleetProvisioningState provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * Get the hubProfile property: The FleetHubProfile configures the Fleet's hub.
+ *
+ * @return the hubProfile value.
+ */
+ public FleetHubProfile hubProfile() {
+ return this.innerProperties() == null ? null : this.innerProperties().hubProfile();
+ }
+
+ /**
+ * Set the hubProfile property: The FleetHubProfile configures the Fleet's hub.
+ *
+ * @param hubProfile the hubProfile value to set.
+ * @return the FleetInner object itself.
+ */
+ public FleetInner withHubProfile(FleetHubProfile hubProfile) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new FleetProperties();
+ }
+ this.innerProperties().withHubProfile(hubProfile);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetMemberInner.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetMemberInner.java
new file mode 100644
index 0000000000000..c71631cf03914
--- /dev/null
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetMemberInner.java
@@ -0,0 +1,140 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.containerservicefleet.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.containerservicefleet.models.FleetMemberProvisioningState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** A member of the Fleet. It contains a reference to an existing Kubernetes cluster on Azure. */
+@Fluent
+public final class FleetMemberInner extends ProxyResource {
+ /*
+ * The resource-specific properties for this resource.
+ */
+ @JsonProperty(value = "properties")
+ private FleetMemberProperties innerProperties;
+
+ /*
+ * If eTag is provided in the response body, it may also be provided as a header per the normal etag convention.
+ * Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity
+ * tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section
+ * 14.27) header fields.
+ */
+ @JsonProperty(value = "eTag", access = JsonProperty.Access.WRITE_ONLY)
+ private String etag;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /** Creates an instance of FleetMemberInner class. */
+ public FleetMemberInner() {
+ }
+
+ /**
+ * Get the innerProperties property: The resource-specific properties for this resource.
+ *
+ * @return the innerProperties value.
+ */
+ private FleetMemberProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the etag property: If eTag is provided in the response body, it may also be provided as a header per the
+ * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource.
+ * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26),
+ * and If-Range (section 14.27) header fields.
+ *
+ * @return the etag value.
+ */
+ public String etag() {
+ return this.etag;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the clusterResourceId property: The ARM resource id of the cluster that joins the Fleet. Must be a valid
+ * Azure resource id. e.g.:
+ * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{clusterName}'.
+ *
+ * @return the clusterResourceId value.
+ */
+ public String clusterResourceId() {
+ return this.innerProperties() == null ? null : this.innerProperties().clusterResourceId();
+ }
+
+ /**
+ * Set the clusterResourceId property: The ARM resource id of the cluster that joins the Fleet. Must be a valid
+ * Azure resource id. e.g.:
+ * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{clusterName}'.
+ *
+ * @param clusterResourceId the clusterResourceId value to set.
+ * @return the FleetMemberInner object itself.
+ */
+ public FleetMemberInner withClusterResourceId(String clusterResourceId) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new FleetMemberProperties();
+ }
+ this.innerProperties().withClusterResourceId(clusterResourceId);
+ return this;
+ }
+
+ /**
+ * Get the group property: The group this member belongs to for multi-cluster update management.
+ *
+ * @return the group value.
+ */
+ public String group() {
+ return this.innerProperties() == null ? null : this.innerProperties().group();
+ }
+
+ /**
+ * Set the group property: The group this member belongs to for multi-cluster update management.
+ *
+ * @param group the group value to set.
+ * @return the FleetMemberInner object itself.
+ */
+ public FleetMemberInner withGroup(String group) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new FleetMemberProperties();
+ }
+ this.innerProperties().withGroup(group);
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: The status of the last operation.
+ *
+ * @return the provisioningState value.
+ */
+ public FleetMemberProvisioningState provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetMemberProperties.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetMemberProperties.java
new file mode 100644
index 0000000000000..1fe40bda2c31f
--- /dev/null
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetMemberProperties.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.containerservicefleet.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.containerservicefleet.models.FleetMemberProvisioningState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** A member of the Fleet. It contains a reference to an existing Kubernetes cluster on Azure. */
+@Fluent
+public final class FleetMemberProperties {
+ /*
+ * The ARM resource id of the cluster that joins the Fleet. Must be a valid Azure resource id. e.g.:
+ * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{clusterName}'.
+ */
+ @JsonProperty(value = "clusterResourceId", required = true)
+ private String clusterResourceId;
+
+ /*
+ * The group this member belongs to for multi-cluster update management.
+ */
+ @JsonProperty(value = "group")
+ private String group;
+
+ /*
+ * The status of the last operation.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private FleetMemberProvisioningState provisioningState;
+
+ /** Creates an instance of FleetMemberProperties class. */
+ public FleetMemberProperties() {
+ }
+
+ /**
+ * Get the clusterResourceId property: The ARM resource id of the cluster that joins the Fleet. Must be a valid
+ * Azure resource id. e.g.:
+ * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{clusterName}'.
+ *
+ * @return the clusterResourceId value.
+ */
+ public String clusterResourceId() {
+ return this.clusterResourceId;
+ }
+
+ /**
+ * Set the clusterResourceId property: The ARM resource id of the cluster that joins the Fleet. Must be a valid
+ * Azure resource id. e.g.:
+ * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{clusterName}'.
+ *
+ * @param clusterResourceId the clusterResourceId value to set.
+ * @return the FleetMemberProperties object itself.
+ */
+ public FleetMemberProperties withClusterResourceId(String clusterResourceId) {
+ this.clusterResourceId = clusterResourceId;
+ return this;
+ }
+
+ /**
+ * Get the group property: The group this member belongs to for multi-cluster update management.
+ *
+ * @return the group value.
+ */
+ public String group() {
+ return this.group;
+ }
+
+ /**
+ * Set the group property: The group this member belongs to for multi-cluster update management.
+ *
+ * @param group the group value to set.
+ * @return the FleetMemberProperties object itself.
+ */
+ public FleetMemberProperties withGroup(String group) {
+ this.group = group;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: The status of the last operation.
+ *
+ * @return the provisioningState value.
+ */
+ public FleetMemberProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (clusterResourceId() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property clusterResourceId in model FleetMemberProperties"));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(FleetMemberProperties.class);
+}
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetMemberUpdateProperties.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetMemberUpdateProperties.java
new file mode 100644
index 0000000000000..c2d10155bba57
--- /dev/null
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetMemberUpdateProperties.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.containerservicefleet.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The updatable properties of the FleetMember. */
+@Fluent
+public final class FleetMemberUpdateProperties {
+ /*
+ * The group this member belongs to for multi-cluster update management.
+ */
+ @JsonProperty(value = "group")
+ private String group;
+
+ /** Creates an instance of FleetMemberUpdateProperties class. */
+ public FleetMemberUpdateProperties() {
+ }
+
+ /**
+ * Get the group property: The group this member belongs to for multi-cluster update management.
+ *
+ * @return the group value.
+ */
+ public String group() {
+ return this.group;
+ }
+
+ /**
+ * Set the group property: The group this member belongs to for multi-cluster update management.
+ *
+ * @param group the group value to set.
+ * @return the FleetMemberUpdateProperties object itself.
+ */
+ public FleetMemberUpdateProperties withGroup(String group) {
+ this.group = group;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetProperties.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetProperties.java
new file mode 100644
index 0000000000000..3b07fc602230d
--- /dev/null
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/FleetProperties.java
@@ -0,0 +1,70 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.containerservicefleet.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.containerservicefleet.models.FleetHubProfile;
+import com.azure.resourcemanager.containerservicefleet.models.FleetProvisioningState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Fleet properties. */
+@Fluent
+public final class FleetProperties {
+ /*
+ * The status of the last operation.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private FleetProvisioningState provisioningState;
+
+ /*
+ * The FleetHubProfile configures the Fleet's hub.
+ */
+ @JsonProperty(value = "hubProfile")
+ private FleetHubProfile hubProfile;
+
+ /** Creates an instance of FleetProperties class. */
+ public FleetProperties() {
+ }
+
+ /**
+ * Get the provisioningState property: The status of the last operation.
+ *
+ * @return the provisioningState value.
+ */
+ public FleetProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Get the hubProfile property: The FleetHubProfile configures the Fleet's hub.
+ *
+ * @return the hubProfile value.
+ */
+ public FleetHubProfile hubProfile() {
+ return this.hubProfile;
+ }
+
+ /**
+ * Set the hubProfile property: The FleetHubProfile configures the Fleet's hub.
+ *
+ * @param hubProfile the hubProfile value to set.
+ * @return the FleetProperties object itself.
+ */
+ public FleetProperties withHubProfile(FleetHubProfile hubProfile) {
+ this.hubProfile = hubProfile;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (hubProfile() != null) {
+ hubProfile().validate();
+ }
+ }
+}
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/OperationInner.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/OperationInner.java
new file mode 100644
index 0000000000000..c0c713aa7bbc6
--- /dev/null
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/OperationInner.java
@@ -0,0 +1,127 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.containerservicefleet.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.containerservicefleet.models.ActionType;
+import com.azure.resourcemanager.containerservicefleet.models.OperationDisplay;
+import com.azure.resourcemanager.containerservicefleet.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/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/UpdateRunInner.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/UpdateRunInner.java
new file mode 100644
index 0000000000000..d38284fb3d316
--- /dev/null
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/UpdateRunInner.java
@@ -0,0 +1,154 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.containerservicefleet.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.containerservicefleet.models.ManagedClusterUpdate;
+import com.azure.resourcemanager.containerservicefleet.models.UpdateRunProvisioningState;
+import com.azure.resourcemanager.containerservicefleet.models.UpdateRunStatus;
+import com.azure.resourcemanager.containerservicefleet.models.UpdateRunStrategy;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** An UpdateRun is a multi-stage process to perform update operations across members of a Fleet. */
+@Fluent
+public final class UpdateRunInner extends ProxyResource {
+ /*
+ * The resource-specific properties for this resource.
+ */
+ @JsonProperty(value = "properties")
+ private UpdateRunProperties innerProperties;
+
+ /*
+ * If eTag is provided in the response body, it may also be provided as a header per the normal etag convention.
+ * Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity
+ * tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section
+ * 14.27) header fields.
+ */
+ @JsonProperty(value = "eTag", access = JsonProperty.Access.WRITE_ONLY)
+ private String etag;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /** Creates an instance of UpdateRunInner class. */
+ public UpdateRunInner() {
+ }
+
+ /**
+ * Get the innerProperties property: The resource-specific properties for this resource.
+ *
+ * @return the innerProperties value.
+ */
+ private UpdateRunProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the etag property: If eTag is provided in the response body, it may also be provided as a header per the
+ * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource.
+ * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26),
+ * and If-Range (section 14.27) header fields.
+ *
+ * @return the etag value.
+ */
+ public String etag() {
+ return this.etag;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the provisioningState property: The provisioning state of the UpdateRun resource.
+ *
+ * @return the provisioningState value.
+ */
+ public UpdateRunProvisioningState provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * Get the strategy property: The strategy defines the order in which the clusters will be updated. If not set, all
+ * members will be updated sequentially. The UpdateRun status will show a single UpdateStage and a single
+ * UpdateGroup targeting all members. The strategy of the UpdateRun can be modified until the run is started.
+ *
+ * @return the strategy value.
+ */
+ public UpdateRunStrategy strategy() {
+ return this.innerProperties() == null ? null : this.innerProperties().strategy();
+ }
+
+ /**
+ * Set the strategy property: The strategy defines the order in which the clusters will be updated. If not set, all
+ * members will be updated sequentially. The UpdateRun status will show a single UpdateStage and a single
+ * UpdateGroup targeting all members. The strategy of the UpdateRun can be modified until the run is started.
+ *
+ * @param strategy the strategy value to set.
+ * @return the UpdateRunInner object itself.
+ */
+ public UpdateRunInner withStrategy(UpdateRunStrategy strategy) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new UpdateRunProperties();
+ }
+ this.innerProperties().withStrategy(strategy);
+ return this;
+ }
+
+ /**
+ * Get the managedClusterUpdate property: The update to be applied to all clusters in the UpdateRun. The
+ * managedClusterUpdate can be modified until the run is started.
+ *
+ * @return the managedClusterUpdate value.
+ */
+ public ManagedClusterUpdate managedClusterUpdate() {
+ return this.innerProperties() == null ? null : this.innerProperties().managedClusterUpdate();
+ }
+
+ /**
+ * Set the managedClusterUpdate property: The update to be applied to all clusters in the UpdateRun. The
+ * managedClusterUpdate can be modified until the run is started.
+ *
+ * @param managedClusterUpdate the managedClusterUpdate value to set.
+ * @return the UpdateRunInner object itself.
+ */
+ public UpdateRunInner withManagedClusterUpdate(ManagedClusterUpdate managedClusterUpdate) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new UpdateRunProperties();
+ }
+ this.innerProperties().withManagedClusterUpdate(managedClusterUpdate);
+ return this;
+ }
+
+ /**
+ * Get the status property: The status of the UpdateRun.
+ *
+ * @return the status value.
+ */
+ public UpdateRunStatus status() {
+ return this.innerProperties() == null ? null : this.innerProperties().status();
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/UpdateRunProperties.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/UpdateRunProperties.java
new file mode 100644
index 0000000000000..4bf52c56a42f3
--- /dev/null
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/UpdateRunProperties.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.containerservicefleet.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.containerservicefleet.models.ManagedClusterUpdate;
+import com.azure.resourcemanager.containerservicefleet.models.UpdateRunProvisioningState;
+import com.azure.resourcemanager.containerservicefleet.models.UpdateRunStatus;
+import com.azure.resourcemanager.containerservicefleet.models.UpdateRunStrategy;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The properties of the UpdateRun. */
+@Fluent
+public final class UpdateRunProperties {
+ /*
+ * The provisioning state of the UpdateRun resource.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private UpdateRunProvisioningState provisioningState;
+
+ /*
+ * The strategy defines the order in which the clusters will be updated.
+ * If not set, all members will be updated sequentially. The UpdateRun status will show a single UpdateStage and a
+ * single UpdateGroup targeting all members.
+ * The strategy of the UpdateRun can be modified until the run is started.
+ */
+ @JsonProperty(value = "strategy")
+ private UpdateRunStrategy strategy;
+
+ /*
+ * The update to be applied to all clusters in the UpdateRun. The managedClusterUpdate can be modified until the
+ * run is started.
+ */
+ @JsonProperty(value = "managedClusterUpdate", required = true)
+ private ManagedClusterUpdate managedClusterUpdate;
+
+ /*
+ * The status of the UpdateRun.
+ */
+ @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY)
+ private UpdateRunStatus status;
+
+ /** Creates an instance of UpdateRunProperties class. */
+ public UpdateRunProperties() {
+ }
+
+ /**
+ * Get the provisioningState property: The provisioning state of the UpdateRun resource.
+ *
+ * @return the provisioningState value.
+ */
+ public UpdateRunProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Get the strategy property: The strategy defines the order in which the clusters will be updated. If not set, all
+ * members will be updated sequentially. The UpdateRun status will show a single UpdateStage and a single
+ * UpdateGroup targeting all members. The strategy of the UpdateRun can be modified until the run is started.
+ *
+ * @return the strategy value.
+ */
+ public UpdateRunStrategy strategy() {
+ return this.strategy;
+ }
+
+ /**
+ * Set the strategy property: The strategy defines the order in which the clusters will be updated. If not set, all
+ * members will be updated sequentially. The UpdateRun status will show a single UpdateStage and a single
+ * UpdateGroup targeting all members. The strategy of the UpdateRun can be modified until the run is started.
+ *
+ * @param strategy the strategy value to set.
+ * @return the UpdateRunProperties object itself.
+ */
+ public UpdateRunProperties withStrategy(UpdateRunStrategy strategy) {
+ this.strategy = strategy;
+ return this;
+ }
+
+ /**
+ * Get the managedClusterUpdate property: The update to be applied to all clusters in the UpdateRun. The
+ * managedClusterUpdate can be modified until the run is started.
+ *
+ * @return the managedClusterUpdate value.
+ */
+ public ManagedClusterUpdate managedClusterUpdate() {
+ return this.managedClusterUpdate;
+ }
+
+ /**
+ * Set the managedClusterUpdate property: The update to be applied to all clusters in the UpdateRun. The
+ * managedClusterUpdate can be modified until the run is started.
+ *
+ * @param managedClusterUpdate the managedClusterUpdate value to set.
+ * @return the UpdateRunProperties object itself.
+ */
+ public UpdateRunProperties withManagedClusterUpdate(ManagedClusterUpdate managedClusterUpdate) {
+ this.managedClusterUpdate = managedClusterUpdate;
+ return this;
+ }
+
+ /**
+ * Get the status property: The status of the UpdateRun.
+ *
+ * @return the status value.
+ */
+ public UpdateRunStatus status() {
+ return this.status;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (strategy() != null) {
+ strategy().validate();
+ }
+ if (managedClusterUpdate() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property managedClusterUpdate in model UpdateRunProperties"));
+ } else {
+ managedClusterUpdate().validate();
+ }
+ if (status() != null) {
+ status().validate();
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(UpdateRunProperties.class);
+}
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/package-info.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/models/package-info.java
new file mode 100644
index 0000000000000..d5577476bd3ce
--- /dev/null
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/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 ContainerServiceFleetManagementClient. Azure Kubernetes Fleet Manager
+ * Client.
+ */
+package com.azure.resourcemanager.containerservicefleet.fluent.models;
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/package-info.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/fluent/package-info.java
new file mode 100644
index 0000000000000..2717bb0f140bb
--- /dev/null
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/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 ContainerServiceFleetManagementClient. Azure Kubernetes Fleet Manager
+ * Client.
+ */
+package com.azure.resourcemanager.containerservicefleet.fluent;
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/ContainerServiceFleetManagementClientBuilder.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/ContainerServiceFleetManagementClientBuilder.java
new file mode 100644
index 0000000000000..acfe1c1ad16f5
--- /dev/null
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/ContainerServiceFleetManagementClientBuilder.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.containerservicefleet.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 ContainerServiceFleetManagementClientImpl type. */
+@ServiceClientBuilder(serviceClients = {ContainerServiceFleetManagementClientImpl.class})
+public final class ContainerServiceFleetManagementClientBuilder {
+ /*
+ * The ID of the target subscription.
+ */
+ private String subscriptionId;
+
+ /**
+ * Sets The ID of the target subscription.
+ *
+ * @param subscriptionId the subscriptionId value.
+ * @return the ContainerServiceFleetManagementClientBuilder.
+ */
+ public ContainerServiceFleetManagementClientBuilder subscriptionId(String subscriptionId) {
+ this.subscriptionId = subscriptionId;
+ return this;
+ }
+
+ /*
+ * server parameter
+ */
+ private String endpoint;
+
+ /**
+ * Sets server parameter.
+ *
+ * @param endpoint the endpoint value.
+ * @return the ContainerServiceFleetManagementClientBuilder.
+ */
+ public ContainerServiceFleetManagementClientBuilder 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 ContainerServiceFleetManagementClientBuilder.
+ */
+ public ContainerServiceFleetManagementClientBuilder 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 ContainerServiceFleetManagementClientBuilder.
+ */
+ public ContainerServiceFleetManagementClientBuilder 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 ContainerServiceFleetManagementClientBuilder.
+ */
+ public ContainerServiceFleetManagementClientBuilder 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 ContainerServiceFleetManagementClientBuilder.
+ */
+ public ContainerServiceFleetManagementClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) {
+ this.serializerAdapter = serializerAdapter;
+ return this;
+ }
+
+ /**
+ * Builds an instance of ContainerServiceFleetManagementClientImpl with the provided parameters.
+ *
+ * @return an instance of ContainerServiceFleetManagementClientImpl.
+ */
+ public ContainerServiceFleetManagementClientImpl 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();
+ ContainerServiceFleetManagementClientImpl client =
+ new ContainerServiceFleetManagementClientImpl(
+ localPipeline,
+ localSerializerAdapter,
+ localDefaultPollInterval,
+ localEnvironment,
+ subscriptionId,
+ localEndpoint);
+ return client;
+ }
+}
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/ContainerServiceFleetManagementClientImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/ContainerServiceFleetManagementClientImpl.java
new file mode 100644
index 0000000000000..c935723c33796
--- /dev/null
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/ContainerServiceFleetManagementClientImpl.java
@@ -0,0 +1,332 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.containerservicefleet.implementation;
+
+import com.azure.core.annotation.ServiceClient;
+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.PollResult;
+import com.azure.core.management.polling.PollerFactory;
+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.containerservicefleet.fluent.ContainerServiceFleetManagementClient;
+import com.azure.resourcemanager.containerservicefleet.fluent.FleetMembersClient;
+import com.azure.resourcemanager.containerservicefleet.fluent.FleetsClient;
+import com.azure.resourcemanager.containerservicefleet.fluent.OperationsClient;
+import com.azure.resourcemanager.containerservicefleet.fluent.UpdateRunsClient;
+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 ContainerServiceFleetManagementClientImpl type. */
+@ServiceClient(builder = ContainerServiceFleetManagementClientBuilder.class)
+public final class ContainerServiceFleetManagementClientImpl implements ContainerServiceFleetManagementClient {
+ /** The ID of the target subscription. */
+ private final String subscriptionId;
+
+ /**
+ * Gets The ID of the target subscription.
+ *
+ * @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 FleetMembersClient object to access its operations. */
+ private final FleetMembersClient fleetMembers;
+
+ /**
+ * Gets the FleetMembersClient object to access its operations.
+ *
+ * @return the FleetMembersClient object.
+ */
+ public FleetMembersClient getFleetMembers() {
+ return this.fleetMembers;
+ }
+
+ /** The UpdateRunsClient object to access its operations. */
+ private final UpdateRunsClient updateRuns;
+
+ /**
+ * Gets the UpdateRunsClient object to access its operations.
+ *
+ * @return the UpdateRunsClient object.
+ */
+ public UpdateRunsClient getUpdateRuns() {
+ return this.updateRuns;
+ }
+
+ /**
+ * Initializes an instance of ContainerServiceFleetManagementClient 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.
+ * @param endpoint server parameter.
+ */
+ ContainerServiceFleetManagementClientImpl(
+ 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 = "2023-03-15-preview";
+ this.operations = new OperationsClientImpl(this);
+ this.fleets = new FleetsClientImpl(this);
+ this.fleetMembers = new FleetMembersClientImpl(this);
+ this.updateRuns = new UpdateRunsClientImpl(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(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(ContainerServiceFleetManagementClientImpl.class);
+}
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetCredentialResultsImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetCredentialResultsImpl.java
new file mode 100644
index 0000000000000..c04c0e7651c66
--- /dev/null
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetCredentialResultsImpl.java
@@ -0,0 +1,41 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.containerservicefleet.implementation;
+
+import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetCredentialResultsInner;
+import com.azure.resourcemanager.containerservicefleet.models.FleetCredentialResult;
+import com.azure.resourcemanager.containerservicefleet.models.FleetCredentialResults;
+import java.util.Collections;
+import java.util.List;
+
+public final class FleetCredentialResultsImpl implements FleetCredentialResults {
+ private FleetCredentialResultsInner innerObject;
+
+ private final com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager serviceManager;
+
+ FleetCredentialResultsImpl(
+ FleetCredentialResultsInner innerObject,
+ com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public List kubeconfigs() {
+ List inner = this.innerModel().kubeconfigs();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public FleetCredentialResultsInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetImpl.java
new file mode 100644
index 0000000000000..faec43979470a
--- /dev/null
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetImpl.java
@@ -0,0 +1,238 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.containerservicefleet.implementation;
+
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.Region;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetInner;
+import com.azure.resourcemanager.containerservicefleet.models.Fleet;
+import com.azure.resourcemanager.containerservicefleet.models.FleetCredentialResults;
+import com.azure.resourcemanager.containerservicefleet.models.FleetHubProfile;
+import com.azure.resourcemanager.containerservicefleet.models.FleetPatch;
+import com.azure.resourcemanager.containerservicefleet.models.FleetProvisioningState;
+import java.util.Collections;
+import java.util.Map;
+
+public final class FleetImpl implements Fleet, Fleet.Definition, Fleet.Update {
+ private FleetInner innerObject;
+
+ private final com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager 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 String etag() {
+ return this.innerModel().etag();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public FleetProvisioningState provisioningState() {
+ return this.innerModel().provisioningState();
+ }
+
+ public FleetHubProfile hubProfile() {
+ return this.innerModel().hubProfile();
+ }
+
+ 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.containerservicefleet.ContainerServiceFleetManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String fleetName;
+
+ private String createIfMatch;
+
+ private String createIfNoneMatch;
+
+ private String updateIfMatch;
+
+ private FleetPatch updateProperties;
+
+ public FleetImpl withExistingResourceGroup(String resourceGroupName) {
+ this.resourceGroupName = resourceGroupName;
+ return this;
+ }
+
+ public Fleet create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getFleets()
+ .createOrUpdate(
+ resourceGroupName, fleetName, this.innerModel(), createIfMatch, createIfNoneMatch, Context.NONE);
+ return this;
+ }
+
+ public Fleet create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getFleets()
+ .createOrUpdate(
+ resourceGroupName, fleetName, this.innerModel(), createIfMatch, createIfNoneMatch, context);
+ return this;
+ }
+
+ FleetImpl(
+ String name, com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager serviceManager) {
+ this.innerObject = new FleetInner();
+ this.serviceManager = serviceManager;
+ this.fleetName = name;
+ this.createIfMatch = null;
+ this.createIfNoneMatch = null;
+ }
+
+ public FleetImpl update() {
+ this.updateIfMatch = null;
+ this.updateProperties = new FleetPatch();
+ return this;
+ }
+
+ public Fleet apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getFleets()
+ .updateWithResponse(resourceGroupName, fleetName, updateProperties, updateIfMatch, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public Fleet apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getFleets()
+ .updateWithResponse(resourceGroupName, fleetName, updateProperties, updateIfMatch, context)
+ .getValue();
+ return this;
+ }
+
+ FleetImpl(
+ FleetInner innerObject,
+ com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.fleetName = Utils.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 Response listCredentialsWithResponse(Context context) {
+ return serviceManager.fleets().listCredentialsWithResponse(resourceGroupName, fleetName, context);
+ }
+
+ public FleetCredentialResults listCredentials() {
+ return serviceManager.fleets().listCredentials(resourceGroupName, fleetName);
+ }
+
+ 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 withHubProfile(FleetHubProfile hubProfile) {
+ this.innerModel().withHubProfile(hubProfile);
+ return this;
+ }
+
+ public FleetImpl withIfMatch(String ifMatch) {
+ if (isInCreateMode()) {
+ this.createIfMatch = ifMatch;
+ return this;
+ } else {
+ this.updateIfMatch = ifMatch;
+ return this;
+ }
+ }
+
+ public FleetImpl withIfNoneMatch(String ifNoneMatch) {
+ this.createIfNoneMatch = ifNoneMatch;
+ return this;
+ }
+
+ private boolean isInCreateMode() {
+ return this.innerModel().id() == null;
+ }
+}
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetMemberImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetMemberImpl.java
new file mode 100644
index 0000000000000..56c962e867b9e
--- /dev/null
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetMemberImpl.java
@@ -0,0 +1,215 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.containerservicefleet.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetMemberInner;
+import com.azure.resourcemanager.containerservicefleet.models.FleetMember;
+import com.azure.resourcemanager.containerservicefleet.models.FleetMemberProvisioningState;
+import com.azure.resourcemanager.containerservicefleet.models.FleetMemberUpdate;
+
+public final class FleetMemberImpl implements FleetMember, FleetMember.Definition, FleetMember.Update {
+ private FleetMemberInner innerObject;
+
+ private final com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public String etag() {
+ return this.innerModel().etag();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public String clusterResourceId() {
+ return this.innerModel().clusterResourceId();
+ }
+
+ public String group() {
+ return this.innerModel().group();
+ }
+
+ public FleetMemberProvisioningState provisioningState() {
+ return this.innerModel().provisioningState();
+ }
+
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
+ public FleetMemberInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String fleetName;
+
+ private String fleetMemberName;
+
+ private String createIfMatch;
+
+ private String createIfNoneMatch;
+
+ private String updateIfMatch;
+
+ private FleetMemberUpdate updateProperties;
+
+ public FleetMemberImpl withExistingFleet(String resourceGroupName, String fleetName) {
+ this.resourceGroupName = resourceGroupName;
+ this.fleetName = fleetName;
+ return this;
+ }
+
+ public FleetMember create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getFleetMembers()
+ .create(
+ resourceGroupName,
+ fleetName,
+ fleetMemberName,
+ this.innerModel(),
+ createIfMatch,
+ createIfNoneMatch,
+ Context.NONE);
+ return this;
+ }
+
+ public FleetMember create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getFleetMembers()
+ .create(
+ resourceGroupName,
+ fleetName,
+ fleetMemberName,
+ this.innerModel(),
+ createIfMatch,
+ createIfNoneMatch,
+ context);
+ return this;
+ }
+
+ FleetMemberImpl(
+ String name, com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager serviceManager) {
+ this.innerObject = new FleetMemberInner();
+ this.serviceManager = serviceManager;
+ this.fleetMemberName = name;
+ this.createIfMatch = null;
+ this.createIfNoneMatch = null;
+ }
+
+ public FleetMemberImpl update() {
+ this.updateIfMatch = null;
+ this.updateProperties = new FleetMemberUpdate();
+ return this;
+ }
+
+ public FleetMember apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getFleetMembers()
+ .updateWithResponse(
+ resourceGroupName, fleetName, fleetMemberName, updateProperties, updateIfMatch, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public FleetMember apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getFleetMembers()
+ .updateWithResponse(
+ resourceGroupName, fleetName, fleetMemberName, updateProperties, updateIfMatch, context)
+ .getValue();
+ return this;
+ }
+
+ FleetMemberImpl(
+ FleetMemberInner innerObject,
+ com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.fleetName = Utils.getValueFromIdByName(innerObject.id(), "fleets");
+ this.fleetMemberName = Utils.getValueFromIdByName(innerObject.id(), "members");
+ }
+
+ public FleetMember refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getFleetMembers()
+ .getWithResponse(resourceGroupName, fleetName, fleetMemberName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public FleetMember refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getFleetMembers()
+ .getWithResponse(resourceGroupName, fleetName, fleetMemberName, context)
+ .getValue();
+ return this;
+ }
+
+ public FleetMemberImpl withClusterResourceId(String clusterResourceId) {
+ this.innerModel().withClusterResourceId(clusterResourceId);
+ return this;
+ }
+
+ public FleetMemberImpl withGroup(String group) {
+ if (isInCreateMode()) {
+ this.innerModel().withGroup(group);
+ return this;
+ } else {
+ this.updateProperties.withGroup(group);
+ return this;
+ }
+ }
+
+ public FleetMemberImpl withIfMatch(String ifMatch) {
+ if (isInCreateMode()) {
+ this.createIfMatch = ifMatch;
+ return this;
+ } else {
+ this.updateIfMatch = ifMatch;
+ return this;
+ }
+ }
+
+ public FleetMemberImpl withIfNoneMatch(String ifNoneMatch) {
+ this.createIfNoneMatch = ifNoneMatch;
+ return this;
+ }
+
+ private boolean isInCreateMode() {
+ return this.innerModel().id() == null;
+ }
+}
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetMembersClientImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetMembersClientImpl.java
new file mode 100644
index 0000000000000..90c28879b8441
--- /dev/null
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetMembersClientImpl.java
@@ -0,0 +1,1493 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.containerservicefleet.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.containerservicefleet.fluent.FleetMembersClient;
+import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetMemberInner;
+import com.azure.resourcemanager.containerservicefleet.models.FleetMemberListResult;
+import com.azure.resourcemanager.containerservicefleet.models.FleetMemberUpdate;
+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 FleetMembersClient. */
+public final class FleetMembersClientImpl implements FleetMembersClient {
+ /** The proxy service used to perform REST calls. */
+ private final FleetMembersService service;
+
+ /** The service client containing this operation class. */
+ private final ContainerServiceFleetManagementClientImpl client;
+
+ /**
+ * Initializes an instance of FleetMembersClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ FleetMembersClientImpl(ContainerServiceFleetManagementClientImpl client) {
+ this.service =
+ RestProxy.create(FleetMembersService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for ContainerServiceFleetManagementClientFleetMembers to be used by the
+ * proxy service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "ContainerServiceFlee")
+ public interface FleetMembersService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members")
+ @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("fleetName") String fleetName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("fleetName") String fleetName,
+ @PathParam("fleetMemberName") String fleetMemberName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName}")
+ @ExpectedResponses({200, 201})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> create(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @HeaderParam("If-Match") String ifMatch,
+ @HeaderParam("If-None-Match") String ifNoneMatch,
+ @PathParam("fleetName") String fleetName,
+ @PathParam("fleetMemberName") String fleetMemberName,
+ @BodyParam("application/json") FleetMemberInner resource,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Patch(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> update(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @HeaderParam("If-Match") String ifMatch,
+ @PathParam("fleetName") String fleetName,
+ @PathParam("fleetMemberName") String fleetMemberName,
+ @BodyParam("application/json") FleetMemberUpdate properties,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members/{fleetMemberName}")
+ @ExpectedResponses({200, 202, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @HeaderParam("If-Match") String ifMatch,
+ @PathParam("fleetName") String fleetName,
+ @PathParam("fleetMemberName") String fleetMemberName,
+ @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 FleetMember resources by Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a FleetMember list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByFleetSinglePageAsync(
+ 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
+ .listByFleet(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ fleetName,
+ 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 FleetMember resources by Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a FleetMember list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByFleetSinglePageAsync(
+ 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
+ .listByFleet(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ fleetName,
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * List FleetMember resources by Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a FleetMember list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByFleetAsync(String resourceGroupName, String fleetName) {
+ return new PagedFlux<>(
+ () -> listByFleetSinglePageAsync(resourceGroupName, fleetName),
+ nextLink -> listByFleetNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List FleetMember resources by Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a FleetMember list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByFleetAsync(String resourceGroupName, String fleetName, Context context) {
+ return new PagedFlux<>(
+ () -> listByFleetSinglePageAsync(resourceGroupName, fleetName, context),
+ nextLink -> listByFleetNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List FleetMember resources by Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a FleetMember list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByFleet(String resourceGroupName, String fleetName) {
+ return new PagedIterable<>(listByFleetAsync(resourceGroupName, fleetName));
+ }
+
+ /**
+ * List FleetMember resources by Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a FleetMember list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByFleet(String resourceGroupName, String fleetName, Context context) {
+ return new PagedIterable<>(listByFleetAsync(resourceGroupName, fleetName, context));
+ }
+
+ /**
+ * Get a FleetMember.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param fleetMemberName The name of the Fleet member resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a FleetMember along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String fleetName, String fleetMemberName) {
+ 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 (fleetMemberName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter fleetMemberName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ fleetName,
+ fleetMemberName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get a FleetMember.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param fleetMemberName The name of the Fleet member resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a FleetMember along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String fleetName, String fleetMemberName, 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 (fleetMemberName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter fleetMemberName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ fleetName,
+ fleetMemberName,
+ accept,
+ context);
+ }
+
+ /**
+ * Get a FleetMember.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param fleetMemberName The name of the Fleet member resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a FleetMember on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String resourceGroupName, String fleetName, String fleetMemberName) {
+ return getWithResponseAsync(resourceGroupName, fleetName, fleetMemberName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get a FleetMember.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param fleetMemberName The name of the Fleet member resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a FleetMember along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(
+ String resourceGroupName, String fleetName, String fleetMemberName, Context context) {
+ return getWithResponseAsync(resourceGroupName, fleetName, fleetMemberName, context).block();
+ }
+
+ /**
+ * Get a FleetMember.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param fleetMemberName The name of the Fleet member resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a FleetMember.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public FleetMemberInner get(String resourceGroupName, String fleetName, String fleetMemberName) {
+ return getWithResponse(resourceGroupName, fleetName, fleetMemberName, Context.NONE).getValue();
+ }
+
+ /**
+ * Create a FleetMember.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param fleetMemberName The name of the Fleet member resource.
+ * @param resource Resource create parameters.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @param ifNoneMatch The request should only proceed if no entity matches this string.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 member of the Fleet along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createWithResponseAsync(
+ String resourceGroupName,
+ String fleetName,
+ String fleetMemberName,
+ FleetMemberInner resource,
+ String ifMatch,
+ String ifNoneMatch) {
+ 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 (fleetMemberName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter fleetMemberName 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
+ .create(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ ifMatch,
+ ifNoneMatch,
+ fleetName,
+ fleetMemberName,
+ resource,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Create a FleetMember.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param fleetMemberName The name of the Fleet member resource.
+ * @param resource Resource create parameters.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @param ifNoneMatch The request should only proceed if no entity matches this string.
+ * @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 member of the Fleet along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createWithResponseAsync(
+ String resourceGroupName,
+ String fleetName,
+ String fleetMemberName,
+ FleetMemberInner resource,
+ String ifMatch,
+ String ifNoneMatch,
+ 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 (fleetMemberName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter fleetMemberName 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
+ .create(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ ifMatch,
+ ifNoneMatch,
+ fleetName,
+ fleetMemberName,
+ resource,
+ accept,
+ context);
+ }
+
+ /**
+ * Create a FleetMember.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param fleetMemberName The name of the Fleet member resource.
+ * @param resource Resource create parameters.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @param ifNoneMatch The request should only proceed if no entity matches this string.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 a member of the Fleet.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, FleetMemberInner> beginCreateAsync(
+ String resourceGroupName,
+ String fleetName,
+ String fleetMemberName,
+ FleetMemberInner resource,
+ String ifMatch,
+ String ifNoneMatch) {
+ Mono>> mono =
+ createWithResponseAsync(resourceGroupName, fleetName, fleetMemberName, resource, ifMatch, ifNoneMatch);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ FleetMemberInner.class,
+ FleetMemberInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Create a FleetMember.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param fleetMemberName The name of the Fleet member resource.
+ * @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 a member of the Fleet.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, FleetMemberInner> beginCreateAsync(
+ String resourceGroupName, String fleetName, String fleetMemberName, FleetMemberInner resource) {
+ final String ifMatch = null;
+ final String ifNoneMatch = null;
+ Mono>> mono =
+ createWithResponseAsync(resourceGroupName, fleetName, fleetMemberName, resource, ifMatch, ifNoneMatch);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ FleetMemberInner.class,
+ FleetMemberInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Create a FleetMember.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param fleetMemberName The name of the Fleet member resource.
+ * @param resource Resource create parameters.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @param ifNoneMatch The request should only proceed if no entity matches this string.
+ * @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 a member of the Fleet.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, FleetMemberInner> beginCreateAsync(
+ String resourceGroupName,
+ String fleetName,
+ String fleetMemberName,
+ FleetMemberInner resource,
+ String ifMatch,
+ String ifNoneMatch,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ createWithResponseAsync(
+ resourceGroupName, fleetName, fleetMemberName, resource, ifMatch, ifNoneMatch, context);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), FleetMemberInner.class, FleetMemberInner.class, context);
+ }
+
+ /**
+ * Create a FleetMember.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param fleetMemberName The name of the Fleet member resource.
+ * @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 a member of the Fleet.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, FleetMemberInner> beginCreate(
+ String resourceGroupName, String fleetName, String fleetMemberName, FleetMemberInner resource) {
+ final String ifMatch = null;
+ final String ifNoneMatch = null;
+ return this
+ .beginCreateAsync(resourceGroupName, fleetName, fleetMemberName, resource, ifMatch, ifNoneMatch)
+ .getSyncPoller();
+ }
+
+ /**
+ * Create a FleetMember.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param fleetMemberName The name of the Fleet member resource.
+ * @param resource Resource create parameters.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @param ifNoneMatch The request should only proceed if no entity matches this string.
+ * @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 a member of the Fleet.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, FleetMemberInner> beginCreate(
+ String resourceGroupName,
+ String fleetName,
+ String fleetMemberName,
+ FleetMemberInner resource,
+ String ifMatch,
+ String ifNoneMatch,
+ Context context) {
+ return this
+ .beginCreateAsync(resourceGroupName, fleetName, fleetMemberName, resource, ifMatch, ifNoneMatch, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * Create a FleetMember.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param fleetMemberName The name of the Fleet member resource.
+ * @param resource Resource create parameters.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @param ifNoneMatch The request should only proceed if no entity matches this string.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 member of the Fleet on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAsync(
+ String resourceGroupName,
+ String fleetName,
+ String fleetMemberName,
+ FleetMemberInner resource,
+ String ifMatch,
+ String ifNoneMatch) {
+ return beginCreateAsync(resourceGroupName, fleetName, fleetMemberName, resource, ifMatch, ifNoneMatch)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create a FleetMember.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param fleetMemberName The name of the Fleet member resource.
+ * @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 a member of the Fleet on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAsync(
+ String resourceGroupName, String fleetName, String fleetMemberName, FleetMemberInner resource) {
+ final String ifMatch = null;
+ final String ifNoneMatch = null;
+ return beginCreateAsync(resourceGroupName, fleetName, fleetMemberName, resource, ifMatch, ifNoneMatch)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create a FleetMember.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param fleetMemberName The name of the Fleet member resource.
+ * @param resource Resource create parameters.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @param ifNoneMatch The request should only proceed if no entity matches this string.
+ * @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 member of the Fleet on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAsync(
+ String resourceGroupName,
+ String fleetName,
+ String fleetMemberName,
+ FleetMemberInner resource,
+ String ifMatch,
+ String ifNoneMatch,
+ Context context) {
+ return beginCreateAsync(resourceGroupName, fleetName, fleetMemberName, resource, ifMatch, ifNoneMatch, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create a FleetMember.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param fleetMemberName The name of the Fleet member resource.
+ * @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 a member of the Fleet.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public FleetMemberInner create(
+ String resourceGroupName, String fleetName, String fleetMemberName, FleetMemberInner resource) {
+ final String ifMatch = null;
+ final String ifNoneMatch = null;
+ return createAsync(resourceGroupName, fleetName, fleetMemberName, resource, ifMatch, ifNoneMatch).block();
+ }
+
+ /**
+ * Create a FleetMember.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param fleetMemberName The name of the Fleet member resource.
+ * @param resource Resource create parameters.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @param ifNoneMatch The request should only proceed if no entity matches this string.
+ * @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 member of the Fleet.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public FleetMemberInner create(
+ String resourceGroupName,
+ String fleetName,
+ String fleetMemberName,
+ FleetMemberInner resource,
+ String ifMatch,
+ String ifNoneMatch,
+ Context context) {
+ return createAsync(resourceGroupName, fleetName, fleetMemberName, resource, ifMatch, ifNoneMatch, context)
+ .block();
+ }
+
+ /**
+ * Update a FleetMember.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param fleetMemberName The name of the Fleet member resource.
+ * @param properties The resource properties to be updated.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 member of the Fleet along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(
+ String resourceGroupName,
+ String fleetName,
+ String fleetMemberName,
+ FleetMemberUpdate properties,
+ String ifMatch) {
+ 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 (fleetMemberName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter fleetMemberName 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,
+ ifMatch,
+ fleetName,
+ fleetMemberName,
+ properties,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Update a FleetMember.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param fleetMemberName The name of the Fleet member resource.
+ * @param properties The resource properties to be updated.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @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 member of the Fleet along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(
+ String resourceGroupName,
+ String fleetName,
+ String fleetMemberName,
+ FleetMemberUpdate properties,
+ String ifMatch,
+ 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 (fleetMemberName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter fleetMemberName 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,
+ ifMatch,
+ fleetName,
+ fleetMemberName,
+ properties,
+ accept,
+ context);
+ }
+
+ /**
+ * Update a FleetMember.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param fleetMemberName The name of the Fleet member resource.
+ * @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 a member of the Fleet on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(
+ String resourceGroupName, String fleetName, String fleetMemberName, FleetMemberUpdate properties) {
+ final String ifMatch = null;
+ return updateWithResponseAsync(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Update a FleetMember.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param fleetMemberName The name of the Fleet member resource.
+ * @param properties The resource properties to be updated.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @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 member of the Fleet along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response updateWithResponse(
+ String resourceGroupName,
+ String fleetName,
+ String fleetMemberName,
+ FleetMemberUpdate properties,
+ String ifMatch,
+ Context context) {
+ return updateWithResponseAsync(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch, context)
+ .block();
+ }
+
+ /**
+ * Update a FleetMember.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param fleetMemberName The name of the Fleet member resource.
+ * @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 a member of the Fleet.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public FleetMemberInner update(
+ String resourceGroupName, String fleetName, String fleetMemberName, FleetMemberUpdate properties) {
+ final String ifMatch = null;
+ return updateWithResponse(resourceGroupName, fleetName, fleetMemberName, properties, ifMatch, Context.NONE)
+ .getValue();
+ }
+
+ /**
+ * Delete a FleetMember.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param fleetMemberName The name of the Fleet member resource.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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, String fleetMemberName, String ifMatch) {
+ 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 (fleetMemberName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter fleetMemberName 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,
+ ifMatch,
+ fleetName,
+ fleetMemberName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Delete a FleetMember.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param fleetMemberName The name of the Fleet member resource.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @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, String fleetMemberName, String ifMatch, 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 (fleetMemberName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter fleetMemberName 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,
+ ifMatch,
+ fleetName,
+ fleetMemberName,
+ accept,
+ context);
+ }
+
+ /**
+ * Delete a FleetMember.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param fleetMemberName The name of the Fleet member resource.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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, String fleetMemberName, String ifMatch) {
+ Mono>> mono =
+ deleteWithResponseAsync(resourceGroupName, fleetName, fleetMemberName, ifMatch);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
+ }
+
+ /**
+ * Delete a FleetMember.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param fleetMemberName The name of the Fleet member resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(
+ String resourceGroupName, String fleetName, String fleetMemberName) {
+ final String ifMatch = null;
+ Mono>> mono =
+ deleteWithResponseAsync(resourceGroupName, fleetName, fleetMemberName, ifMatch);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
+ }
+
+ /**
+ * Delete a FleetMember.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param fleetMemberName The name of the Fleet member resource.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @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, String fleetMemberName, String ifMatch, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ deleteWithResponseAsync(resourceGroupName, fleetName, fleetMemberName, ifMatch, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * Delete a FleetMember.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param fleetMemberName The name of the Fleet member resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(
+ String resourceGroupName, String fleetName, String fleetMemberName) {
+ final String ifMatch = null;
+ return this.beginDeleteAsync(resourceGroupName, fleetName, fleetMemberName, ifMatch).getSyncPoller();
+ }
+
+ /**
+ * Delete a FleetMember.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param fleetMemberName The name of the Fleet member resource.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @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, String fleetMemberName, String ifMatch, Context context) {
+ return this.beginDeleteAsync(resourceGroupName, fleetName, fleetMemberName, ifMatch, context).getSyncPoller();
+ }
+
+ /**
+ * Delete a FleetMember.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param fleetMemberName The name of the Fleet member resource.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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, String fleetMemberName, String ifMatch) {
+ return beginDeleteAsync(resourceGroupName, fleetName, fleetMemberName, ifMatch)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Delete a FleetMember.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param fleetMemberName The name of the Fleet member resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String fleetName, String fleetMemberName) {
+ final String ifMatch = null;
+ return beginDeleteAsync(resourceGroupName, fleetName, fleetMemberName, ifMatch)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Delete a FleetMember.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param fleetMemberName The name of the Fleet member resource.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @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, String fleetMemberName, String ifMatch, Context context) {
+ return beginDeleteAsync(resourceGroupName, fleetName, fleetMemberName, ifMatch, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Delete a FleetMember.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param fleetMemberName The name of the Fleet member resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String fleetName, String fleetMemberName) {
+ final String ifMatch = null;
+ deleteAsync(resourceGroupName, fleetName, fleetMemberName, ifMatch).block();
+ }
+
+ /**
+ * Delete a FleetMember.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param fleetMemberName The name of the Fleet member resource.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @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, String fleetMemberName, String ifMatch, Context context) {
+ deleteAsync(resourceGroupName, fleetName, fleetMemberName, ifMatch, 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 FleetMember 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 FleetMember 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/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetMembersImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetMembersImpl.java
new file mode 100644
index 0000000000000..0ff47c31b12da
--- /dev/null
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetMembersImpl.java
@@ -0,0 +1,190 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.containerservicefleet.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.containerservicefleet.fluent.FleetMembersClient;
+import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetMemberInner;
+import com.azure.resourcemanager.containerservicefleet.models.FleetMember;
+import com.azure.resourcemanager.containerservicefleet.models.FleetMembers;
+
+public final class FleetMembersImpl implements FleetMembers {
+ private static final ClientLogger LOGGER = new ClientLogger(FleetMembersImpl.class);
+
+ private final FleetMembersClient innerClient;
+
+ private final com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager serviceManager;
+
+ public FleetMembersImpl(
+ FleetMembersClient innerClient,
+ com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable listByFleet(String resourceGroupName, String fleetName) {
+ PagedIterable inner = this.serviceClient().listByFleet(resourceGroupName, fleetName);
+ return Utils.mapPage(inner, inner1 -> new FleetMemberImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByFleet(String resourceGroupName, String fleetName, Context context) {
+ PagedIterable inner = this.serviceClient().listByFleet(resourceGroupName, fleetName, context);
+ return Utils.mapPage(inner, inner1 -> new FleetMemberImpl(inner1, this.manager()));
+ }
+
+ public Response getWithResponse(
+ String resourceGroupName, String fleetName, String fleetMemberName, Context context) {
+ Response inner =
+ this.serviceClient().getWithResponse(resourceGroupName, fleetName, fleetMemberName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new FleetMemberImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public FleetMember get(String resourceGroupName, String fleetName, String fleetMemberName) {
+ FleetMemberInner inner = this.serviceClient().get(resourceGroupName, fleetName, fleetMemberName);
+ if (inner != null) {
+ return new FleetMemberImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public void delete(String resourceGroupName, String fleetName, String fleetMemberName) {
+ this.serviceClient().delete(resourceGroupName, fleetName, fleetMemberName);
+ }
+
+ public void delete(
+ String resourceGroupName, String fleetName, String fleetMemberName, String ifMatch, Context context) {
+ this.serviceClient().delete(resourceGroupName, fleetName, fleetMemberName, ifMatch, context);
+ }
+
+ public FleetMember getById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String fleetName = Utils.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)));
+ }
+ String fleetMemberName = Utils.getValueFromIdByName(id, "members");
+ if (fleetMemberName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'members'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, fleetName, fleetMemberName, Context.NONE).getValue();
+ }
+
+ public Response getByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String fleetName = Utils.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)));
+ }
+ String fleetMemberName = Utils.getValueFromIdByName(id, "members");
+ if (fleetMemberName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'members'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, fleetName, fleetMemberName, context);
+ }
+
+ public void deleteById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String fleetName = Utils.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)));
+ }
+ String fleetMemberName = Utils.getValueFromIdByName(id, "members");
+ if (fleetMemberName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'members'.", id)));
+ }
+ String localIfMatch = null;
+ this.delete(resourceGroupName, fleetName, fleetMemberName, localIfMatch, Context.NONE);
+ }
+
+ public void deleteByIdWithResponse(String id, String ifMatch, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String fleetName = Utils.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)));
+ }
+ String fleetMemberName = Utils.getValueFromIdByName(id, "members");
+ if (fleetMemberName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'members'.", id)));
+ }
+ this.delete(resourceGroupName, fleetName, fleetMemberName, ifMatch, context);
+ }
+
+ private FleetMembersClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager() {
+ return this.serviceManager;
+ }
+
+ public FleetMemberImpl define(String name) {
+ return new FleetMemberImpl(name, this.manager());
+ }
+}
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetsClientImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetsClientImpl.java
new file mode 100644
index 0000000000000..4f4b74c66b7f7
--- /dev/null
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetsClientImpl.java
@@ -0,0 +1,1739 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.containerservicefleet.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.Patch;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Post;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.containerservicefleet.fluent.FleetsClient;
+import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetCredentialResultsInner;
+import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetInner;
+import com.azure.resourcemanager.containerservicefleet.models.FleetListResult;
+import com.azure.resourcemanager.containerservicefleet.models.FleetPatch;
+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 ContainerServiceFleetManagementClientImpl client;
+
+ /**
+ * Initializes an instance of FleetsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ FleetsClientImpl(ContainerServiceFleetManagementClientImpl client) {
+ this.service = RestProxy.create(FleetsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for ContainerServiceFleetManagementClientFleets to be used by the proxy
+ * service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "ContainerServiceFlee")
+ public interface FleetsService {
+ @Headers({"Content-Type: application/json"})
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/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.ContainerService/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.ContainerService/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.ContainerService/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,
+ @HeaderParam("If-Match") String ifMatch,
+ @HeaderParam("If-None-Match") String ifNoneMatch,
+ @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.ContainerService/fleets/{fleetName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> update(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @HeaderParam("If-Match") String ifMatch,
+ @PathParam("fleetName") String fleetName,
+ @BodyParam("application/json") FleetPatch properties,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}")
+ @ExpectedResponses({200, 202, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @HeaderParam("If-Match") String ifMatch,
+ @PathParam("fleetName") String fleetName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/listCredentials")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listCredentials(
+ @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);
+ }
+
+ /**
+ * Lists fleets in the specified subscription.
+ *
+ * @throws 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()));
+ }
+
+ /**
+ * Lists fleets in the specified subscription.
+ *
+ * @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));
+ }
+
+ /**
+ * Lists fleets in the specified subscription.
+ *
+ * @throws 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));
+ }
+
+ /**
+ * Lists fleets in the specified subscription.
+ *
+ * @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));
+ }
+
+ /**
+ * Lists fleets in the specified subscription.
+ *
+ * @throws 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());
+ }
+
+ /**
+ * Lists fleets in the specified subscription.
+ *
+ * @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));
+ }
+
+ /**
+ * Lists fleets in the specified subscription and 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()));
+ }
+
+ /**
+ * Lists fleets in the specified subscription and 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));
+ }
+
+ /**
+ * Lists fleets in the specified subscription and 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));
+ }
+
+ /**
+ * Lists fleets in the specified subscription and 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));
+ }
+
+ /**
+ * Lists fleets in the specified subscription and 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));
+ }
+
+ /**
+ * Lists fleets in the specified subscription and 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));
+ }
+
+ /**
+ * Gets a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a 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()));
+ }
+
+ /**
+ * Gets a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a 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);
+ }
+
+ /**
+ * Gets a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a 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()));
+ }
+
+ /**
+ * Gets a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Fleet along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getByResourceGroupWithResponse(
+ String resourceGroupName, String fleetName, Context context) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, fleetName, context).block();
+ }
+
+ /**
+ * Gets a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Fleet.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public FleetInner getByResourceGroup(String resourceGroupName, String fleetName) {
+ return getByResourceGroupWithResponse(resourceGroupName, fleetName, Context.NONE).getValue();
+ }
+
+ /**
+ * Creates or updates a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param resource Resource create parameters.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @param ifNoneMatch The request should only proceed if no entity matches this string.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 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, String ifMatch, String ifNoneMatch) {
+ 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,
+ ifMatch,
+ ifNoneMatch,
+ fleetName,
+ resource,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Creates or updates a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param resource Resource create parameters.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @param ifNoneMatch The request should only proceed if no entity matches this string.
+ * @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 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,
+ String ifMatch,
+ String ifNoneMatch,
+ 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,
+ ifMatch,
+ ifNoneMatch,
+ fleetName,
+ resource,
+ accept,
+ context);
+ }
+
+ /**
+ * Creates or updates a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param resource Resource create parameters.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @param ifNoneMatch The request should only proceed if no entity matches this string.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 the Fleet resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, FleetInner> beginCreateOrUpdateAsync(
+ String resourceGroupName, String fleetName, FleetInner resource, String ifMatch, String ifNoneMatch) {
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(resourceGroupName, fleetName, resource, ifMatch, ifNoneMatch);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), FleetInner.class, FleetInner.class, this.client.getContext());
+ }
+
+ /**
+ * Creates or updates a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @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 the Fleet resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, FleetInner> beginCreateOrUpdateAsync(
+ String resourceGroupName, String fleetName, FleetInner resource) {
+ final String ifMatch = null;
+ final String ifNoneMatch = null;
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(resourceGroupName, fleetName, resource, ifMatch, ifNoneMatch);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), FleetInner.class, FleetInner.class, this.client.getContext());
+ }
+
+ /**
+ * Creates or updates a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param resource Resource create parameters.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @param ifNoneMatch The request should only proceed if no entity matches this string.
+ * @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 the Fleet resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, FleetInner> beginCreateOrUpdateAsync(
+ String resourceGroupName,
+ String fleetName,
+ FleetInner resource,
+ String ifMatch,
+ String ifNoneMatch,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(resourceGroupName, fleetName, resource, ifMatch, ifNoneMatch, context);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), FleetInner.class, FleetInner.class, context);
+ }
+
+ /**
+ * Creates or updates a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @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 the Fleet resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, FleetInner> beginCreateOrUpdate(
+ String resourceGroupName, String fleetName, FleetInner resource) {
+ final String ifMatch = null;
+ final String ifNoneMatch = null;
+ return this
+ .beginCreateOrUpdateAsync(resourceGroupName, fleetName, resource, ifMatch, ifNoneMatch)
+ .getSyncPoller();
+ }
+
+ /**
+ * Creates or updates a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param resource Resource create parameters.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @param ifNoneMatch The request should only proceed if no entity matches this string.
+ * @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 the Fleet resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, FleetInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String fleetName,
+ FleetInner resource,
+ String ifMatch,
+ String ifNoneMatch,
+ Context context) {
+ return this
+ .beginCreateOrUpdateAsync(resourceGroupName, fleetName, resource, ifMatch, ifNoneMatch, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * Creates or updates a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param resource Resource create parameters.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @param ifNoneMatch The request should only proceed if no entity matches this string.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 Fleet resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName, String fleetName, FleetInner resource, String ifMatch, String ifNoneMatch) {
+ return beginCreateOrUpdateAsync(resourceGroupName, fleetName, resource, ifMatch, ifNoneMatch)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Creates or updates a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @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 Fleet resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(String resourceGroupName, String fleetName, FleetInner resource) {
+ final String ifMatch = null;
+ final String ifNoneMatch = null;
+ return beginCreateOrUpdateAsync(resourceGroupName, fleetName, resource, ifMatch, ifNoneMatch)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Creates or updates a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param resource Resource create parameters.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @param ifNoneMatch The request should only proceed if no entity matches this string.
+ * @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 Fleet resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName,
+ String fleetName,
+ FleetInner resource,
+ String ifMatch,
+ String ifNoneMatch,
+ Context context) {
+ return beginCreateOrUpdateAsync(resourceGroupName, fleetName, resource, ifMatch, ifNoneMatch, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Creates or updates a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @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 Fleet resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public FleetInner createOrUpdate(String resourceGroupName, String fleetName, FleetInner resource) {
+ final String ifMatch = null;
+ final String ifNoneMatch = null;
+ return createOrUpdateAsync(resourceGroupName, fleetName, resource, ifMatch, ifNoneMatch).block();
+ }
+
+ /**
+ * Creates or updates a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param resource Resource create parameters.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @param ifNoneMatch The request should only proceed if no entity matches this string.
+ * @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 Fleet resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public FleetInner createOrUpdate(
+ String resourceGroupName,
+ String fleetName,
+ FleetInner resource,
+ String ifMatch,
+ String ifNoneMatch,
+ Context context) {
+ return createOrUpdateAsync(resourceGroupName, fleetName, resource, ifMatch, ifNoneMatch, context).block();
+ }
+
+ /**
+ * Update a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param properties The resource properties to be updated.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 Fleet resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(
+ String resourceGroupName, String fleetName, FleetPatch properties, String ifMatch) {
+ 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,
+ ifMatch,
+ 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 Fleet resource.
+ * @param properties The resource properties to be updated.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @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 Fleet resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(
+ String resourceGroupName, String fleetName, FleetPatch properties, String ifMatch, 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,
+ ifMatch,
+ 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 Fleet resource.
+ * @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 Fleet resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(String resourceGroupName, String fleetName, FleetPatch properties) {
+ final String ifMatch = null;
+ return updateWithResponseAsync(resourceGroupName, fleetName, properties, ifMatch)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Update a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param properties The resource properties to be updated.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @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 Fleet resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response updateWithResponse(
+ String resourceGroupName, String fleetName, FleetPatch properties, String ifMatch, Context context) {
+ return updateWithResponseAsync(resourceGroupName, fleetName, properties, ifMatch, context).block();
+ }
+
+ /**
+ * Update a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @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 Fleet resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public FleetInner update(String resourceGroupName, String fleetName, FleetPatch properties) {
+ final String ifMatch = null;
+ return updateWithResponse(resourceGroupName, fleetName, properties, ifMatch, Context.NONE).getValue();
+ }
+
+ /**
+ * Delete a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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, String ifMatch) {
+ 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,
+ ifMatch,
+ 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 Fleet resource.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @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, String ifMatch, 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,
+ ifMatch,
+ 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 Fleet resource.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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, String ifMatch) {
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, fleetName, ifMatch);
+ 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 Fleet resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String fleetName) {
+ final String ifMatch = null;
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, fleetName, ifMatch);
+ 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 Fleet resource.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @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, String ifMatch, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, fleetName, ifMatch, 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 Fleet resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(String resourceGroupName, String fleetName) {
+ final String ifMatch = null;
+ return this.beginDeleteAsync(resourceGroupName, fleetName, ifMatch).getSyncPoller();
+ }
+
+ /**
+ * Delete a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @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, String ifMatch, Context context) {
+ return this.beginDeleteAsync(resourceGroupName, fleetName, ifMatch, context).getSyncPoller();
+ }
+
+ /**
+ * Delete a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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, String ifMatch) {
+ return beginDeleteAsync(resourceGroupName, fleetName, ifMatch)
+ .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 Fleet resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String fleetName) {
+ final String ifMatch = null;
+ return beginDeleteAsync(resourceGroupName, fleetName, ifMatch)
+ .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 Fleet resource.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @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, String ifMatch, Context context) {
+ return beginDeleteAsync(resourceGroupName, fleetName, ifMatch, 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 Fleet resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String fleetName) {
+ final String ifMatch = null;
+ deleteAsync(resourceGroupName, fleetName, ifMatch).block();
+ }
+
+ /**
+ * Delete a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param ifMatch The request should only proceed if an entity matches this string.
+ * @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, String ifMatch, Context context) {
+ deleteAsync(resourceGroupName, fleetName, ifMatch, context).block();
+ }
+
+ /**
+ * Lists the user credentials of a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the Credential results response along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listCredentialsWithResponseAsync(
+ 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
+ .listCredentials(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ fleetName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Lists the user credentials of a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the Credential results response along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listCredentialsWithResponseAsync(
+ 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
+ .listCredentials(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ fleetName,
+ accept,
+ context);
+ }
+
+ /**
+ * Lists the user credentials of a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the Credential results response on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono listCredentialsAsync(String resourceGroupName, String fleetName) {
+ return listCredentialsWithResponseAsync(resourceGroupName, fleetName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Lists the user credentials of a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the Credential results response along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response listCredentialsWithResponse(
+ String resourceGroupName, String fleetName, Context context) {
+ return listCredentialsWithResponseAsync(resourceGroupName, fleetName, context).block();
+ }
+
+ /**
+ * Lists the user credentials of a Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the Credential results response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public FleetCredentialResultsInner listCredentials(String resourceGroupName, String fleetName) {
+ return listCredentialsWithResponse(resourceGroupName, fleetName, Context.NONE).getValue();
+ }
+
+ /**
+ * 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/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetsImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetsImpl.java
new file mode 100644
index 0000000000000..f4d77d52c4edf
--- /dev/null
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/FleetsImpl.java
@@ -0,0 +1,196 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.containerservicefleet.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.containerservicefleet.fluent.FleetsClient;
+import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetCredentialResultsInner;
+import com.azure.resourcemanager.containerservicefleet.fluent.models.FleetInner;
+import com.azure.resourcemanager.containerservicefleet.models.Fleet;
+import com.azure.resourcemanager.containerservicefleet.models.FleetCredentialResults;
+import com.azure.resourcemanager.containerservicefleet.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.containerservicefleet.ContainerServiceFleetManager serviceManager;
+
+ public FleetsImpl(
+ FleetsClient innerClient,
+ com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return Utils.mapPage(inner, inner1 -> new FleetImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(Context context) {
+ PagedIterable inner = this.serviceClient().list(context);
+ return Utils.mapPage(inner, inner1 -> new FleetImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName);
+ return Utils.mapPage(inner, inner1 -> new FleetImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context);
+ return Utils.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 delete(String resourceGroupName, String fleetName) {
+ this.serviceClient().delete(resourceGroupName, fleetName);
+ }
+
+ public void delete(String resourceGroupName, String fleetName, String ifMatch, Context context) {
+ this.serviceClient().delete(resourceGroupName, fleetName, ifMatch, context);
+ }
+
+ public Response listCredentialsWithResponse(
+ String resourceGroupName, String fleetName, Context context) {
+ Response inner =
+ this.serviceClient().listCredentialsWithResponse(resourceGroupName, fleetName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new FleetCredentialResultsImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public FleetCredentialResults listCredentials(String resourceGroupName, String fleetName) {
+ FleetCredentialResultsInner inner = this.serviceClient().listCredentials(resourceGroupName, fleetName);
+ if (inner != null) {
+ return new FleetCredentialResultsImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Fleet getById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String fleetName = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String fleetName = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String fleetName = Utils.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)));
+ }
+ String localIfMatch = null;
+ this.delete(resourceGroupName, fleetName, localIfMatch, Context.NONE);
+ }
+
+ public void deleteByIdWithResponse(String id, String ifMatch, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String fleetName = Utils.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, ifMatch, context);
+ }
+
+ private FleetsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager() {
+ return this.serviceManager;
+ }
+
+ public FleetImpl define(String name) {
+ return new FleetImpl(name, this.manager());
+ }
+}
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/OperationImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/OperationImpl.java
new file mode 100644
index 0000000000000..10ea069c828d5
--- /dev/null
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/OperationImpl.java
@@ -0,0 +1,52 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.containerservicefleet.implementation;
+
+import com.azure.resourcemanager.containerservicefleet.fluent.models.OperationInner;
+import com.azure.resourcemanager.containerservicefleet.models.ActionType;
+import com.azure.resourcemanager.containerservicefleet.models.Operation;
+import com.azure.resourcemanager.containerservicefleet.models.OperationDisplay;
+import com.azure.resourcemanager.containerservicefleet.models.Origin;
+
+public final class OperationImpl implements Operation {
+ private OperationInner innerObject;
+
+ private final com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager serviceManager;
+
+ OperationImpl(
+ OperationInner innerObject,
+ com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager 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.containerservicefleet.ContainerServiceFleetManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/OperationsClientImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/OperationsClientImpl.java
new file mode 100644
index 0000000000000..8ecb23c26ea49
--- /dev/null
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/OperationsClientImpl.java
@@ -0,0 +1,276 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.containerservicefleet.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.containerservicefleet.fluent.OperationsClient;
+import com.azure.resourcemanager.containerservicefleet.fluent.models.OperationInner;
+import com.azure.resourcemanager.containerservicefleet.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 ContainerServiceFleetManagementClientImpl client;
+
+ /**
+ * Initializes an instance of OperationsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ OperationsClientImpl(ContainerServiceFleetManagementClientImpl client) {
+ this.service =
+ RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for ContainerServiceFleetManagementClientOperations to be used by the
+ * proxy service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "ContainerServiceFlee")
+ public interface OperationsService {
+ @Headers({"Content-Type: application/json"})
+ @Get("/providers/Microsoft.ContainerService/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/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/OperationsImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/OperationsImpl.java
new file mode 100644
index 0000000000000..10dbb5bc4d0eb
--- /dev/null
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/OperationsImpl.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.containerservicefleet.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.containerservicefleet.fluent.OperationsClient;
+import com.azure.resourcemanager.containerservicefleet.fluent.models.OperationInner;
+import com.azure.resourcemanager.containerservicefleet.models.Operation;
+import com.azure.resourcemanager.containerservicefleet.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.containerservicefleet.ContainerServiceFleetManager serviceManager;
+
+ public OperationsImpl(
+ OperationsClient innerClient,
+ com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(Context context) {
+ PagedIterable inner = this.serviceClient().list(context);
+ return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager()));
+ }
+
+ private OperationsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/UpdateRunImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/UpdateRunImpl.java
new file mode 100644
index 0000000000000..881a14875ab3b
--- /dev/null
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/UpdateRunImpl.java
@@ -0,0 +1,247 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.containerservicefleet.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.containerservicefleet.fluent.models.UpdateRunInner;
+import com.azure.resourcemanager.containerservicefleet.models.ManagedClusterUpdate;
+import com.azure.resourcemanager.containerservicefleet.models.UpdateRun;
+import com.azure.resourcemanager.containerservicefleet.models.UpdateRunProvisioningState;
+import com.azure.resourcemanager.containerservicefleet.models.UpdateRunStatus;
+import com.azure.resourcemanager.containerservicefleet.models.UpdateRunStrategy;
+
+public final class UpdateRunImpl implements UpdateRun, UpdateRun.Definition, UpdateRun.Update {
+ private UpdateRunInner innerObject;
+
+ private final com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public String etag() {
+ return this.innerModel().etag();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public UpdateRunProvisioningState provisioningState() {
+ return this.innerModel().provisioningState();
+ }
+
+ public UpdateRunStrategy strategy() {
+ return this.innerModel().strategy();
+ }
+
+ public ManagedClusterUpdate managedClusterUpdate() {
+ return this.innerModel().managedClusterUpdate();
+ }
+
+ public UpdateRunStatus status() {
+ return this.innerModel().status();
+ }
+
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
+ public UpdateRunInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String fleetName;
+
+ private String updateRunName;
+
+ private String createIfMatch;
+
+ private String createIfNoneMatch;
+
+ private String updateIfMatch;
+
+ private String updateIfNoneMatch;
+
+ public UpdateRunImpl withExistingFleet(String resourceGroupName, String fleetName) {
+ this.resourceGroupName = resourceGroupName;
+ this.fleetName = fleetName;
+ return this;
+ }
+
+ public UpdateRun create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getUpdateRuns()
+ .createOrUpdate(
+ resourceGroupName,
+ fleetName,
+ updateRunName,
+ this.innerModel(),
+ createIfMatch,
+ createIfNoneMatch,
+ Context.NONE);
+ return this;
+ }
+
+ public UpdateRun create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getUpdateRuns()
+ .createOrUpdate(
+ resourceGroupName,
+ fleetName,
+ updateRunName,
+ this.innerModel(),
+ createIfMatch,
+ createIfNoneMatch,
+ context);
+ return this;
+ }
+
+ UpdateRunImpl(
+ String name, com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager serviceManager) {
+ this.innerObject = new UpdateRunInner();
+ this.serviceManager = serviceManager;
+ this.updateRunName = name;
+ this.createIfMatch = null;
+ this.createIfNoneMatch = null;
+ }
+
+ public UpdateRunImpl update() {
+ this.updateIfMatch = null;
+ this.updateIfNoneMatch = null;
+ return this;
+ }
+
+ public UpdateRun apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getUpdateRuns()
+ .createOrUpdate(
+ resourceGroupName,
+ fleetName,
+ updateRunName,
+ this.innerModel(),
+ updateIfMatch,
+ updateIfNoneMatch,
+ Context.NONE);
+ return this;
+ }
+
+ public UpdateRun apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getUpdateRuns()
+ .createOrUpdate(
+ resourceGroupName,
+ fleetName,
+ updateRunName,
+ this.innerModel(),
+ updateIfMatch,
+ updateIfNoneMatch,
+ context);
+ return this;
+ }
+
+ UpdateRunImpl(
+ UpdateRunInner innerObject,
+ com.azure.resourcemanager.containerservicefleet.ContainerServiceFleetManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.fleetName = Utils.getValueFromIdByName(innerObject.id(), "fleets");
+ this.updateRunName = Utils.getValueFromIdByName(innerObject.id(), "updateRuns");
+ }
+
+ public UpdateRun refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getUpdateRuns()
+ .getWithResponse(resourceGroupName, fleetName, updateRunName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public UpdateRun refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getUpdateRuns()
+ .getWithResponse(resourceGroupName, fleetName, updateRunName, context)
+ .getValue();
+ return this;
+ }
+
+ public UpdateRun start() {
+ return serviceManager.updateRuns().start(resourceGroupName, fleetName, updateRunName);
+ }
+
+ public UpdateRun start(String ifMatch, Context context) {
+ return serviceManager.updateRuns().start(resourceGroupName, fleetName, updateRunName, ifMatch, context);
+ }
+
+ public UpdateRun stop() {
+ return serviceManager.updateRuns().stop(resourceGroupName, fleetName, updateRunName);
+ }
+
+ public UpdateRun stop(String ifMatch, Context context) {
+ return serviceManager.updateRuns().stop(resourceGroupName, fleetName, updateRunName, ifMatch, context);
+ }
+
+ public UpdateRunImpl withStrategy(UpdateRunStrategy strategy) {
+ this.innerModel().withStrategy(strategy);
+ return this;
+ }
+
+ public UpdateRunImpl withManagedClusterUpdate(ManagedClusterUpdate managedClusterUpdate) {
+ this.innerModel().withManagedClusterUpdate(managedClusterUpdate);
+ return this;
+ }
+
+ public UpdateRunImpl withIfMatch(String ifMatch) {
+ if (isInCreateMode()) {
+ this.createIfMatch = ifMatch;
+ return this;
+ } else {
+ this.updateIfMatch = ifMatch;
+ return this;
+ }
+ }
+
+ public UpdateRunImpl withIfNoneMatch(String ifNoneMatch) {
+ if (isInCreateMode()) {
+ this.createIfNoneMatch = ifNoneMatch;
+ return this;
+ } else {
+ this.updateIfNoneMatch = ifNoneMatch;
+ return this;
+ }
+ }
+
+ private boolean isInCreateMode() {
+ return this.innerModel().id() == null;
+ }
+}
diff --git a/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/UpdateRunsClientImpl.java b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/UpdateRunsClientImpl.java
new file mode 100644
index 0000000000000..8aaaa8dc520e0
--- /dev/null
+++ b/sdk/containerservicefleet/azure-resourcemanager-containerservicefleet/src/main/java/com/azure/resourcemanager/containerservicefleet/implementation/UpdateRunsClientImpl.java
@@ -0,0 +1,1975 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.containerservicefleet.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.PathParam;
+import com.azure.core.annotation.Post;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.containerservicefleet.fluent.UpdateRunsClient;
+import com.azure.resourcemanager.containerservicefleet.fluent.models.UpdateRunInner;
+import com.azure.resourcemanager.containerservicefleet.models.UpdateRunListResult;
+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 UpdateRunsClient. */
+public final class UpdateRunsClientImpl implements UpdateRunsClient {
+ /** The proxy service used to perform REST calls. */
+ private final UpdateRunsService service;
+
+ /** The service client containing this operation class. */
+ private final ContainerServiceFleetManagementClientImpl client;
+
+ /**
+ * Initializes an instance of UpdateRunsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ UpdateRunsClientImpl(ContainerServiceFleetManagementClientImpl client) {
+ this.service =
+ RestProxy.create(UpdateRunsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for ContainerServiceFleetManagementClientUpdateRuns to be used by the
+ * proxy service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "ContainerServiceFlee")
+ public interface UpdateRunsService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns")
+ @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("fleetName") String fleetName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("fleetName") String fleetName,
+ @PathParam("updateRunName") String updateRunName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}")
+ @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,
+ @HeaderParam("If-Match") String ifMatch,
+ @HeaderParam("If-None-Match") String ifNoneMatch,
+ @PathParam("fleetName") String fleetName,
+ @PathParam("updateRunName") String updateRunName,
+ @BodyParam("application/json") UpdateRunInner resource,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}")
+ @ExpectedResponses({200, 202, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @HeaderParam("If-Match") String ifMatch,
+ @PathParam("fleetName") String fleetName,
+ @PathParam("updateRunName") String updateRunName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}/start")
+ @ExpectedResponses({200, 202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> start(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @HeaderParam("If-Match") String ifMatch,
+ @PathParam("fleetName") String fleetName,
+ @PathParam("updateRunName") String updateRunName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}/stop")
+ @ExpectedResponses({200, 202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> stop(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @HeaderParam("If-Match") String ifMatch,
+ @PathParam("fleetName") String fleetName,
+ @PathParam("updateRunName") String updateRunName,
+ @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 UpdateRun resources by Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a UpdateRun list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByFleetSinglePageAsync(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
+ .listByFleet(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ fleetName,
+ 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 UpdateRun resources by Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a UpdateRun list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByFleetSinglePageAsync(
+ 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
+ .listByFleet(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ fleetName,
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * List UpdateRun resources by Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a UpdateRun list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByFleetAsync(String resourceGroupName, String fleetName) {
+ return new PagedFlux<>(
+ () -> listByFleetSinglePageAsync(resourceGroupName, fleetName),
+ nextLink -> listByFleetNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List UpdateRun resources by Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a UpdateRun list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByFleetAsync(String resourceGroupName, String fleetName, Context context) {
+ return new PagedFlux<>(
+ () -> listByFleetSinglePageAsync(resourceGroupName, fleetName, context),
+ nextLink -> listByFleetNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List UpdateRun resources by Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a UpdateRun list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByFleet(String resourceGroupName, String fleetName) {
+ return new PagedIterable<>(listByFleetAsync(resourceGroupName, fleetName));
+ }
+
+ /**
+ * List UpdateRun resources by Fleet.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param fleetName The name of the Fleet resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a UpdateRun list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable