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 PowerPlatform service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the PowerPlatform service API instance.
+ */
+ public PowerPlatformManager 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.powerplatform")
+ .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 PowerPlatformManager(httpPipeline, profile, defaultPollInterval);
+ }
+ }
+
+ /**
+ * Gets the resource collection API of Accounts. It manages Account.
+ *
+ * @return Resource collection API of Accounts.
+ */
+ public Accounts accounts() {
+ if (this.accounts == null) {
+ this.accounts = new AccountsImpl(clientObject.getAccounts(), this);
+ }
+ return accounts;
+ }
+
+ /**
+ * Gets the resource collection API of EnterprisePolicies. It manages EnterprisePolicy.
+ *
+ * @return Resource collection API of EnterprisePolicies.
+ */
+ public EnterprisePolicies enterprisePolicies() {
+ if (this.enterprisePolicies == null) {
+ this.enterprisePolicies = new EnterprisePoliciesImpl(clientObject.getEnterprisePolicies(), this);
+ }
+ return enterprisePolicies;
+ }
+
+ /**
+ * 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 PrivateEndpointConnections. It manages PrivateEndpointConnection.
+ *
+ * @return Resource collection API of PrivateEndpointConnections.
+ */
+ public PrivateEndpointConnections privateEndpointConnections() {
+ if (this.privateEndpointConnections == null) {
+ this.privateEndpointConnections =
+ new PrivateEndpointConnectionsImpl(clientObject.getPrivateEndpointConnections(), this);
+ }
+ return privateEndpointConnections;
+ }
+
+ /**
+ * Gets the resource collection API of PrivateLinkResources.
+ *
+ * @return Resource collection API of PrivateLinkResources.
+ */
+ public PrivateLinkResources privateLinkResources() {
+ if (this.privateLinkResources == null) {
+ this.privateLinkResources = new PrivateLinkResourcesImpl(clientObject.getPrivateLinkResources(), this);
+ }
+ return privateLinkResources;
+ }
+
+ /**
+ * @return Wrapped service client PowerPlatform providing direct access to the underlying auto-generated API
+ * implementation, based on Azure REST API.
+ */
+ public PowerPlatform serviceClient() {
+ return this.clientObject;
+ }
+}
diff --git a/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/AccountsClient.java b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/AccountsClient.java
new file mode 100644
index 000000000000..cc1f2befedd3
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/AccountsClient.java
@@ -0,0 +1,177 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.powerplatform.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.powerplatform.fluent.models.AccountInner;
+import com.azure.resourcemanager.powerplatform.models.PatchAccount;
+
+/** An instance of this class provides access to all the operations defined in AccountsClient. */
+public interface AccountsClient {
+ /**
+ * Creates an account.
+ *
+ * @param accountName Name of the account.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parameters Parameters supplied to create or update an account.
+ * @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 definition of the account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ AccountInner createOrUpdate(String accountName, String resourceGroupName, AccountInner parameters);
+
+ /**
+ * Creates an account.
+ *
+ * @param accountName Name of the account.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parameters Parameters supplied to create or update an account.
+ * @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 definition of the account along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(
+ String accountName, String resourceGroupName, AccountInner parameters, Context context);
+
+ /**
+ * Get information about an account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Name of the account.
+ * @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 information about an account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ AccountInner getByResourceGroup(String resourceGroupName, String accountName);
+
+ /**
+ * Get information about an account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Name of the account.
+ * @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 information about an account along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(
+ String resourceGroupName, String accountName, Context context);
+
+ /**
+ * Delete an account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Name of the account.
+ * @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 accountName);
+
+ /**
+ * Delete an account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Name of the account.
+ * @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 Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteWithResponse(String resourceGroupName, String accountName, Context context);
+
+ /**
+ * Updates an account.
+ *
+ * @param accountName Name of the account.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parameters Parameters supplied to update an account.
+ * @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 definition of the account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ AccountInner update(String accountName, String resourceGroupName, PatchAccount parameters);
+
+ /**
+ * Updates an account.
+ *
+ * @param accountName Name of the account.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parameters Parameters supplied to update an account.
+ * @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 definition of the account along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(
+ String accountName, String resourceGroupName, PatchAccount parameters, Context context);
+
+ /**
+ * Retrieve a list of accounts within a given 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 the list accounts operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * Retrieve a list of accounts within a given 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 the list accounts operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+
+ /**
+ * Retrieve a list of accounts within a subscription.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of the list accounts operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Retrieve a list of accounts within a subscription.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of the list accounts operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+}
diff --git a/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/EnterprisePoliciesClient.java b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/EnterprisePoliciesClient.java
new file mode 100644
index 000000000000..d83d54dd38e4
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/EnterprisePoliciesClient.java
@@ -0,0 +1,179 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.powerplatform.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.powerplatform.fluent.models.EnterprisePolicyInner;
+import com.azure.resourcemanager.powerplatform.models.PatchEnterprisePolicy;
+
+/** An instance of this class provides access to all the operations defined in EnterprisePoliciesClient. */
+public interface EnterprisePoliciesClient {
+ /**
+ * Creates an EnterprisePolicy.
+ *
+ * @param enterprisePolicyName Name of the EnterprisePolicy.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parameters Parameters supplied to create or update EnterprisePolicy.
+ * @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 definition of the EnterprisePolicy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ EnterprisePolicyInner createOrUpdate(
+ String enterprisePolicyName, String resourceGroupName, EnterprisePolicyInner parameters);
+
+ /**
+ * Creates an EnterprisePolicy.
+ *
+ * @param enterprisePolicyName Name of the EnterprisePolicy.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parameters Parameters supplied to create or update EnterprisePolicy.
+ * @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 definition of the EnterprisePolicy along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(
+ String enterprisePolicyName, String resourceGroupName, EnterprisePolicyInner parameters, Context context);
+
+ /**
+ * Get information about an EnterprisePolicy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName The EnterprisePolicy name.
+ * @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 information about an EnterprisePolicy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ EnterprisePolicyInner getByResourceGroup(String resourceGroupName, String enterprisePolicyName);
+
+ /**
+ * Get information about an EnterprisePolicy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName The EnterprisePolicy name.
+ * @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 information about an EnterprisePolicy along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(
+ String resourceGroupName, String enterprisePolicyName, Context context);
+
+ /**
+ * Delete an EnterprisePolicy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName Name of the EnterprisePolicy.
+ * @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 enterprisePolicyName);
+
+ /**
+ * Delete an EnterprisePolicy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName Name of the EnterprisePolicy.
+ * @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 Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteWithResponse(String resourceGroupName, String enterprisePolicyName, Context context);
+
+ /**
+ * Updates an EnterprisePolicy.
+ *
+ * @param enterprisePolicyName Name of the EnterprisePolicy.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parameters Parameters supplied to update EnterprisePolicy.
+ * @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 definition of the EnterprisePolicy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ EnterprisePolicyInner update(
+ String enterprisePolicyName, String resourceGroupName, PatchEnterprisePolicy parameters);
+
+ /**
+ * Updates an EnterprisePolicy.
+ *
+ * @param enterprisePolicyName Name of the EnterprisePolicy.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parameters Parameters supplied to update EnterprisePolicy.
+ * @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 definition of the EnterprisePolicy along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(
+ String enterprisePolicyName, String resourceGroupName, PatchEnterprisePolicy parameters, Context context);
+
+ /**
+ * Retrieve a list of EnterprisePolicies within a given 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 the list EnterprisePolicy operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * Retrieve a list of EnterprisePolicies within a given 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 the list EnterprisePolicy operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+
+ /**
+ * Retrieve a list of EnterprisePolicies within a subscription.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of the list EnterprisePolicy operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Retrieve a list of EnterprisePolicies within a subscription.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of the list EnterprisePolicy operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+}
diff --git a/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/OperationsClient.java b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/OperationsClient.java
new file mode 100644
index 000000000000..5de9d2a1492c
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/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.powerplatform.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.powerplatform.fluent.models.OperationInner;
+
+/** An instance of this class provides access to all the operations defined in OperationsClient. */
+public interface OperationsClient {
+ /**
+ * Lists all of the available PowerPlatform REST API operations.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link
+ * PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Lists all of the available PowerPlatform REST API operations.
+ *
+ * @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/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/PowerPlatform.java b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/PowerPlatform.java
new file mode 100644
index 000000000000..990ab6735e51
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/PowerPlatform.java
@@ -0,0 +1,81 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.powerplatform.fluent;
+
+import com.azure.core.http.HttpPipeline;
+import java.time.Duration;
+
+/** The interface for PowerPlatform class. */
+public interface PowerPlatform {
+ /**
+ * 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 AccountsClient object to access its operations.
+ *
+ * @return the AccountsClient object.
+ */
+ AccountsClient getAccounts();
+
+ /**
+ * Gets the EnterprisePoliciesClient object to access its operations.
+ *
+ * @return the EnterprisePoliciesClient object.
+ */
+ EnterprisePoliciesClient getEnterprisePolicies();
+
+ /**
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ OperationsClient getOperations();
+
+ /**
+ * Gets the PrivateEndpointConnectionsClient object to access its operations.
+ *
+ * @return the PrivateEndpointConnectionsClient object.
+ */
+ PrivateEndpointConnectionsClient getPrivateEndpointConnections();
+
+ /**
+ * Gets the PrivateLinkResourcesClient object to access its operations.
+ *
+ * @return the PrivateLinkResourcesClient object.
+ */
+ PrivateLinkResourcesClient getPrivateLinkResources();
+}
diff --git a/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/PrivateEndpointConnectionsClient.java b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/PrivateEndpointConnectionsClient.java
new file mode 100644
index 000000000000..fd7dda0e472b
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/PrivateEndpointConnectionsClient.java
@@ -0,0 +1,216 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.powerplatform.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.powerplatform.fluent.models.PrivateEndpointConnectionInner;
+
+/** An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. */
+public interface PrivateEndpointConnectionsClient {
+ /**
+ * List all private endpoint connections on an EnterprisePolicy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName EnterprisePolicy for the Microsoft Azure subscription.
+ * @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 private endpoint connections as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByEnterprisePolicy(
+ String resourceGroupName, String enterprisePolicyName);
+
+ /**
+ * List all private endpoint connections on an EnterprisePolicy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName EnterprisePolicy for the Microsoft Azure 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 a list of private endpoint connections as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByEnterprisePolicy(
+ String resourceGroupName, String enterprisePolicyName, Context context);
+
+ /**
+ * Gets a private endpoint connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName EnterprisePolicy for the Microsoft Azure subscription.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @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 private endpoint connection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PrivateEndpointConnectionInner get(
+ String resourceGroupName, String enterprisePolicyName, String privateEndpointConnectionName);
+
+ /**
+ * Gets a private endpoint connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName EnterprisePolicy for the Microsoft Azure subscription.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @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 private endpoint connection along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String enterprisePolicyName, String privateEndpointConnectionName, Context context);
+
+ /**
+ * Approve or reject a private endpoint connection with a given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName EnterprisePolicy for the Microsoft Azure subscription.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @param parameters Parameters supplied to create or update a private endpoint connection.
+ * @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 private endpoint connection.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String enterprisePolicyName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner parameters);
+
+ /**
+ * Approve or reject a private endpoint connection with a given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName EnterprisePolicy for the Microsoft Azure subscription.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @param parameters Parameters supplied to create or update a private endpoint connection.
+ * @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 private endpoint connection.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String enterprisePolicyName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner parameters,
+ Context context);
+
+ /**
+ * Approve or reject a private endpoint connection with a given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName EnterprisePolicy for the Microsoft Azure subscription.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @param parameters Parameters supplied to create or update a private endpoint connection.
+ * @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 private endpoint connection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PrivateEndpointConnectionInner createOrUpdate(
+ String resourceGroupName,
+ String enterprisePolicyName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner parameters);
+
+ /**
+ * Approve or reject a private endpoint connection with a given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName EnterprisePolicy for the Microsoft Azure subscription.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @param parameters Parameters supplied to create or update a private endpoint connection.
+ * @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 private endpoint connection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PrivateEndpointConnectionInner createOrUpdate(
+ String resourceGroupName,
+ String enterprisePolicyName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner parameters,
+ Context context);
+
+ /**
+ * Deletes a private endpoint connection with a given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName EnterprisePolicy for the Microsoft Azure subscription.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @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 enterprisePolicyName, String privateEndpointConnectionName);
+
+ /**
+ * Deletes a private endpoint connection with a given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName EnterprisePolicy for the Microsoft Azure subscription.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @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 enterprisePolicyName, String privateEndpointConnectionName, Context context);
+
+ /**
+ * Deletes a private endpoint connection with a given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName EnterprisePolicy for the Microsoft Azure subscription.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @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 enterprisePolicyName, String privateEndpointConnectionName);
+
+ /**
+ * Deletes a private endpoint connection with a given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName EnterprisePolicy for the Microsoft Azure subscription.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @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 enterprisePolicyName, String privateEndpointConnectionName, Context context);
+}
diff --git a/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/PrivateLinkResourcesClient.java b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/PrivateLinkResourcesClient.java
new file mode 100644
index 000000000000..1833c4d6869f
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/PrivateLinkResourcesClient.java
@@ -0,0 +1,76 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.powerplatform.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.powerplatform.fluent.models.PrivateLinkResourceInner;
+
+/** An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. */
+public interface PrivateLinkResourcesClient {
+ /**
+ * Gets the private link resources that need to be created for enterprisePolicy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName EnterprisePolicy for the Microsoft Azure subscription.
+ * @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 private link resources that need to be created for enterprisePolicy as paginated response with {@link
+ * PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByEnterprisePolicy(
+ String resourceGroupName, String enterprisePolicyName);
+
+ /**
+ * Gets the private link resources that need to be created for enterprisePolicy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName EnterprisePolicy for the Microsoft Azure 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 private link resources that need to be created for enterprisePolicy as paginated response with {@link
+ * PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByEnterprisePolicy(
+ String resourceGroupName, String enterprisePolicyName, Context context);
+
+ /**
+ * Gets the private link resources that need to be created for an EnterprisePolicy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName EnterprisePolicy for the Microsoft Azure subscription.
+ * @param groupName The name of the private link 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 private link resources that need to be created for an EnterprisePolicy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PrivateLinkResourceInner get(String resourceGroupName, String enterprisePolicyName, String groupName);
+
+ /**
+ * Gets the private link resources that need to be created for an EnterprisePolicy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName EnterprisePolicy for the Microsoft Azure subscription.
+ * @param groupName The name of the private link 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 private link resources that need to be created for an EnterprisePolicy along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String enterprisePolicyName, String groupName, Context context);
+}
diff --git a/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/models/AccountInner.java b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/models/AccountInner.java
new file mode 100644
index 000000000000..b7ea4666fd4f
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/models/AccountInner.java
@@ -0,0 +1,93 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.powerplatform.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.Resource;
+import com.azure.core.management.SystemData;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+
+/** Definition of the account. */
+@Fluent
+public final class AccountInner extends Resource {
+ /*
+ * The properties that define configuration for the account.
+ */
+ @JsonProperty(value = "properties")
+ private AccountProperties innerProperties;
+
+ /*
+ * Metadata pertaining to creation and last modification of the resource.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /**
+ * Get the innerProperties property: The properties that define configuration for the account.
+ *
+ * @return the innerProperties value.
+ */
+ private AccountProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the systemData property: Metadata pertaining to creation and last modification of the resource.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public AccountInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public AccountInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Get the description property: The description of the account.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.innerProperties() == null ? null : this.innerProperties().description();
+ }
+
+ /**
+ * Set the description property: The description of the account.
+ *
+ * @param description the description value to set.
+ * @return the AccountInner object itself.
+ */
+ public AccountInner withDescription(String description) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new AccountProperties();
+ }
+ this.innerProperties().withDescription(description);
+ 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/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/models/AccountProperties.java b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/models/AccountProperties.java
new file mode 100644
index 000000000000..f3d3db989406
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/models/AccountProperties.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.powerplatform.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The properties that define configuration for the account. */
+@Fluent
+public final class AccountProperties {
+ /*
+ * The description of the account.
+ */
+ @JsonProperty(value = "description")
+ private String description;
+
+ /**
+ * Get the description property: The description of the account.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Set the description property: The description of the account.
+ *
+ * @param description the description value to set.
+ * @return the AccountProperties object itself.
+ */
+ public AccountProperties withDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/models/EnterprisePolicyInner.java b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/models/EnterprisePolicyInner.java
new file mode 100644
index 000000000000..77e024ee7f5e
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/models/EnterprisePolicyInner.java
@@ -0,0 +1,207 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.powerplatform.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.Resource;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.powerplatform.models.EnterprisePolicyIdentity;
+import com.azure.resourcemanager.powerplatform.models.EnterprisePolicyKind;
+import com.azure.resourcemanager.powerplatform.models.PropertiesEncryption;
+import com.azure.resourcemanager.powerplatform.models.PropertiesLockbox;
+import com.azure.resourcemanager.powerplatform.models.PropertiesNetworkInjection;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+
+/** Definition of the EnterprisePolicy. */
+@Fluent
+public final class EnterprisePolicyInner extends Resource {
+ /*
+ * The identity of the EnterprisePolicy.
+ */
+ @JsonProperty(value = "identity")
+ private EnterprisePolicyIdentity identity;
+
+ /*
+ * The kind (type) of Enterprise Policy.
+ */
+ @JsonProperty(value = "kind", required = true)
+ private EnterprisePolicyKind kind;
+
+ /*
+ * The properties that define configuration for the enterprise policy
+ */
+ @JsonProperty(value = "properties")
+ private Properties innerProperties;
+
+ /*
+ * Metadata pertaining to creation and last modification of the resource.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /**
+ * Get the identity property: The identity of the EnterprisePolicy.
+ *
+ * @return the identity value.
+ */
+ public EnterprisePolicyIdentity identity() {
+ return this.identity;
+ }
+
+ /**
+ * Set the identity property: The identity of the EnterprisePolicy.
+ *
+ * @param identity the identity value to set.
+ * @return the EnterprisePolicyInner object itself.
+ */
+ public EnterprisePolicyInner withIdentity(EnterprisePolicyIdentity identity) {
+ this.identity = identity;
+ return this;
+ }
+
+ /**
+ * Get the kind property: The kind (type) of Enterprise Policy.
+ *
+ * @return the kind value.
+ */
+ public EnterprisePolicyKind kind() {
+ return this.kind;
+ }
+
+ /**
+ * Set the kind property: The kind (type) of Enterprise Policy.
+ *
+ * @param kind the kind value to set.
+ * @return the EnterprisePolicyInner object itself.
+ */
+ public EnterprisePolicyInner withKind(EnterprisePolicyKind kind) {
+ this.kind = kind;
+ return this;
+ }
+
+ /**
+ * Get the innerProperties property: The properties that define configuration for the enterprise policy.
+ *
+ * @return the innerProperties value.
+ */
+ private Properties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the systemData property: Metadata pertaining to creation and last modification of the resource.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public EnterprisePolicyInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public EnterprisePolicyInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Get the lockbox property: Settings concerning lockbox.
+ *
+ * @return the lockbox value.
+ */
+ public PropertiesLockbox lockbox() {
+ return this.innerProperties() == null ? null : this.innerProperties().lockbox();
+ }
+
+ /**
+ * Set the lockbox property: Settings concerning lockbox.
+ *
+ * @param lockbox the lockbox value to set.
+ * @return the EnterprisePolicyInner object itself.
+ */
+ public EnterprisePolicyInner withLockbox(PropertiesLockbox lockbox) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new Properties();
+ }
+ this.innerProperties().withLockbox(lockbox);
+ return this;
+ }
+
+ /**
+ * Get the encryption property: The encryption settings for a configuration store.
+ *
+ * @return the encryption value.
+ */
+ public PropertiesEncryption encryption() {
+ return this.innerProperties() == null ? null : this.innerProperties().encryption();
+ }
+
+ /**
+ * Set the encryption property: The encryption settings for a configuration store.
+ *
+ * @param encryption the encryption value to set.
+ * @return the EnterprisePolicyInner object itself.
+ */
+ public EnterprisePolicyInner withEncryption(PropertiesEncryption encryption) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new Properties();
+ }
+ this.innerProperties().withEncryption(encryption);
+ return this;
+ }
+
+ /**
+ * Get the networkInjection property: Settings concerning network injection.
+ *
+ * @return the networkInjection value.
+ */
+ public PropertiesNetworkInjection networkInjection() {
+ return this.innerProperties() == null ? null : this.innerProperties().networkInjection();
+ }
+
+ /**
+ * Set the networkInjection property: Settings concerning network injection.
+ *
+ * @param networkInjection the networkInjection value to set.
+ * @return the EnterprisePolicyInner object itself.
+ */
+ public EnterprisePolicyInner withNetworkInjection(PropertiesNetworkInjection networkInjection) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new Properties();
+ }
+ this.innerProperties().withNetworkInjection(networkInjection);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (identity() != null) {
+ identity().validate();
+ }
+ if (kind() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property kind in model EnterprisePolicyInner"));
+ }
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(EnterprisePolicyInner.class);
+}
diff --git a/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/models/OperationInner.java b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/models/OperationInner.java
new file mode 100644
index 000000000000..e52c7f89173d
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/models/OperationInner.java
@@ -0,0 +1,121 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.powerplatform.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.powerplatform.models.ActionType;
+import com.azure.resourcemanager.powerplatform.models.OperationDisplay;
+import com.azure.resourcemanager.powerplatform.models.Origin;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** REST API Operation Details of a REST API operation, returned from the Resource Provider Operations API. */
+@Fluent
+public final class OperationInner {
+ /*
+ * The name of the operation, as per Resource-Based Access Control (RBAC).
+ * Examples: "Microsoft.Compute/virtualMachines/write",
+ * "Microsoft.Compute/virtualMachines/capture/action"
+ */
+ @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
+ private String name;
+
+ /*
+ * Whether the operation applies to data-plane. This is "true" for
+ * data-plane operations and "false" for ARM/control-plane operations.
+ */
+ @JsonProperty(value = "isDataAction", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean isDataAction;
+
+ /*
+ * Localized display information for this particular operation.
+ */
+ @JsonProperty(value = "display")
+ private OperationDisplay display;
+
+ /*
+ * The intended executor of the operation; as in Resource Based Access
+ * Control (RBAC) and audit logs UX. Default value is "user,system"
+ */
+ @JsonProperty(value = "origin", access = JsonProperty.Access.WRITE_ONLY)
+ private Origin origin;
+
+ /*
+ * Enum. Indicates the action type. "Internal" refers to actions that are
+ * for internal only APIs.
+ */
+ @JsonProperty(value = "actionType", access = JsonProperty.Access.WRITE_ONLY)
+ private ActionType actionType;
+
+ /**
+ * Get the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples:
+ * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action".
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane
+ * operations and "false" for ARM/control-plane operations.
+ *
+ * @return the isDataAction value.
+ */
+ public Boolean isDataAction() {
+ return this.isDataAction;
+ }
+
+ /**
+ * Get the display property: Localized display information for this particular operation.
+ *
+ * @return the display value.
+ */
+ public OperationDisplay display() {
+ return this.display;
+ }
+
+ /**
+ * Set the display property: Localized display information for this particular operation.
+ *
+ * @param display the display value to set.
+ * @return the OperationInner object itself.
+ */
+ public OperationInner withDisplay(OperationDisplay display) {
+ this.display = display;
+ return this;
+ }
+
+ /**
+ * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and
+ * audit logs UX. Default value is "user,system".
+ *
+ * @return the origin value.
+ */
+ public Origin origin() {
+ return this.origin;
+ }
+
+ /**
+ * Get the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal
+ * only APIs.
+ *
+ * @return the actionType value.
+ */
+ public ActionType actionType() {
+ return this.actionType;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (display() != null) {
+ display().validate();
+ }
+ }
+}
diff --git a/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/models/PrivateEndpointConnectionInner.java b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/models/PrivateEndpointConnectionInner.java
new file mode 100644
index 000000000000..b9f04596c0e6
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/models/PrivateEndpointConnectionInner.java
@@ -0,0 +1,116 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.powerplatform.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.powerplatform.models.PrivateEndpoint;
+import com.azure.resourcemanager.powerplatform.models.PrivateEndpointConnectionProvisioningState;
+import com.azure.resourcemanager.powerplatform.models.PrivateLinkServiceConnectionState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** A private endpoint connection. */
+@Fluent
+public final class PrivateEndpointConnectionInner extends ProxyResource {
+ /*
+ * Resource properties.
+ */
+ @JsonProperty(value = "properties")
+ private PrivateEndpointConnectionProperties innerProperties;
+
+ /*
+ * Metadata pertaining to creation and last modification of the resource.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /**
+ * Get the innerProperties property: Resource properties.
+ *
+ * @return the innerProperties value.
+ */
+ private PrivateEndpointConnectionProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the systemData property: Metadata pertaining to creation and last modification of the resource.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the privateEndpoint property: The resource of private end point.
+ *
+ * @return the privateEndpoint value.
+ */
+ public PrivateEndpoint privateEndpoint() {
+ return this.innerProperties() == null ? null : this.innerProperties().privateEndpoint();
+ }
+
+ /**
+ * Set the privateEndpoint property: The resource of private end point.
+ *
+ * @param privateEndpoint the privateEndpoint value to set.
+ * @return the PrivateEndpointConnectionInner object itself.
+ */
+ public PrivateEndpointConnectionInner withPrivateEndpoint(PrivateEndpoint privateEndpoint) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PrivateEndpointConnectionProperties();
+ }
+ this.innerProperties().withPrivateEndpoint(privateEndpoint);
+ return this;
+ }
+
+ /**
+ * Get the privateLinkServiceConnectionState property: A collection of information about the state of the connection
+ * between service consumer and provider.
+ *
+ * @return the privateLinkServiceConnectionState value.
+ */
+ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() {
+ return this.innerProperties() == null ? null : this.innerProperties().privateLinkServiceConnectionState();
+ }
+
+ /**
+ * Set the privateLinkServiceConnectionState property: A collection of information about the state of the connection
+ * between service consumer and provider.
+ *
+ * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set.
+ * @return the PrivateEndpointConnectionInner object itself.
+ */
+ public PrivateEndpointConnectionInner withPrivateLinkServiceConnectionState(
+ PrivateLinkServiceConnectionState privateLinkServiceConnectionState) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PrivateEndpointConnectionProperties();
+ }
+ this.innerProperties().withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState);
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: The provisioning state of the private endpoint connection resource.
+ *
+ * @return the provisioningState value.
+ */
+ public PrivateEndpointConnectionProvisioningState 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/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/models/PrivateEndpointConnectionProperties.java b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/models/PrivateEndpointConnectionProperties.java
new file mode 100644
index 000000000000..264a0d5e815e
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/models/PrivateEndpointConnectionProperties.java
@@ -0,0 +1,109 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.powerplatform.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.powerplatform.models.PrivateEndpoint;
+import com.azure.resourcemanager.powerplatform.models.PrivateEndpointConnectionProvisioningState;
+import com.azure.resourcemanager.powerplatform.models.PrivateLinkServiceConnectionState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Properties of the PrivateEndpointConnectProperties. */
+@Fluent
+public final class PrivateEndpointConnectionProperties {
+ /*
+ * The resource of private end point.
+ */
+ @JsonProperty(value = "privateEndpoint")
+ private PrivateEndpoint privateEndpoint;
+
+ /*
+ * A collection of information about the state of the connection between
+ * service consumer and provider.
+ */
+ @JsonProperty(value = "privateLinkServiceConnectionState", required = true)
+ private PrivateLinkServiceConnectionState privateLinkServiceConnectionState;
+
+ /*
+ * The provisioning state of the private endpoint connection resource.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private PrivateEndpointConnectionProvisioningState provisioningState;
+
+ /**
+ * Get the privateEndpoint property: The resource of private end point.
+ *
+ * @return the privateEndpoint value.
+ */
+ public PrivateEndpoint privateEndpoint() {
+ return this.privateEndpoint;
+ }
+
+ /**
+ * Set the privateEndpoint property: The resource of private end point.
+ *
+ * @param privateEndpoint the privateEndpoint value to set.
+ * @return the PrivateEndpointConnectionProperties object itself.
+ */
+ public PrivateEndpointConnectionProperties withPrivateEndpoint(PrivateEndpoint privateEndpoint) {
+ this.privateEndpoint = privateEndpoint;
+ return this;
+ }
+
+ /**
+ * Get the privateLinkServiceConnectionState property: A collection of information about the state of the connection
+ * between service consumer and provider.
+ *
+ * @return the privateLinkServiceConnectionState value.
+ */
+ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() {
+ return this.privateLinkServiceConnectionState;
+ }
+
+ /**
+ * Set the privateLinkServiceConnectionState property: A collection of information about the state of the connection
+ * between service consumer and provider.
+ *
+ * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set.
+ * @return the PrivateEndpointConnectionProperties object itself.
+ */
+ public PrivateEndpointConnectionProperties withPrivateLinkServiceConnectionState(
+ PrivateLinkServiceConnectionState privateLinkServiceConnectionState) {
+ this.privateLinkServiceConnectionState = privateLinkServiceConnectionState;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: The provisioning state of the private endpoint connection resource.
+ *
+ * @return the provisioningState value.
+ */
+ public PrivateEndpointConnectionProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (privateEndpoint() != null) {
+ privateEndpoint().validate();
+ }
+ if (privateLinkServiceConnectionState() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property privateLinkServiceConnectionState in model"
+ + " PrivateEndpointConnectionProperties"));
+ } else {
+ privateLinkServiceConnectionState().validate();
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionProperties.class);
+}
diff --git a/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/models/PrivateLinkResourceInner.java b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/models/PrivateLinkResourceInner.java
new file mode 100644
index 000000000000..2a7efc340ef1
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/models/PrivateLinkResourceInner.java
@@ -0,0 +1,81 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.powerplatform.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** A private link resource. */
+@Fluent
+public final class PrivateLinkResourceInner extends ProxyResource {
+ /*
+ * Resource properties.
+ */
+ @JsonProperty(value = "properties")
+ private PrivateLinkResourceProperties innerProperties;
+
+ /**
+ * Get the innerProperties property: Resource properties.
+ *
+ * @return the innerProperties value.
+ */
+ private PrivateLinkResourceProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the groupId property: The private link resource group id.
+ *
+ * @return the groupId value.
+ */
+ public String groupId() {
+ return this.innerProperties() == null ? null : this.innerProperties().groupId();
+ }
+
+ /**
+ * Get the requiredMembers property: The private link resource required member names.
+ *
+ * @return the requiredMembers value.
+ */
+ public List requiredMembers() {
+ return this.innerProperties() == null ? null : this.innerProperties().requiredMembers();
+ }
+
+ /**
+ * Get the requiredZoneNames property: The private link resource Private link DNS zone name.
+ *
+ * @return the requiredZoneNames value.
+ */
+ public List requiredZoneNames() {
+ return this.innerProperties() == null ? null : this.innerProperties().requiredZoneNames();
+ }
+
+ /**
+ * Set the requiredZoneNames property: The private link resource Private link DNS zone name.
+ *
+ * @param requiredZoneNames the requiredZoneNames value to set.
+ * @return the PrivateLinkResourceInner object itself.
+ */
+ public PrivateLinkResourceInner withRequiredZoneNames(List requiredZoneNames) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PrivateLinkResourceProperties();
+ }
+ this.innerProperties().withRequiredZoneNames(requiredZoneNames);
+ 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/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/models/PrivateLinkResourceProperties.java b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/models/PrivateLinkResourceProperties.java
new file mode 100644
index 000000000000..0ca2ae2bf7cd
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/models/PrivateLinkResourceProperties.java
@@ -0,0 +1,77 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.powerplatform.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Properties of a private link resource. */
+@Fluent
+public final class PrivateLinkResourceProperties {
+ /*
+ * The private link resource group id.
+ */
+ @JsonProperty(value = "groupId", access = JsonProperty.Access.WRITE_ONLY)
+ private String groupId;
+
+ /*
+ * The private link resource required member names.
+ */
+ @JsonProperty(value = "requiredMembers", access = JsonProperty.Access.WRITE_ONLY)
+ private List requiredMembers;
+
+ /*
+ * The private link resource Private link DNS zone name.
+ */
+ @JsonProperty(value = "requiredZoneNames")
+ private List requiredZoneNames;
+
+ /**
+ * Get the groupId property: The private link resource group id.
+ *
+ * @return the groupId value.
+ */
+ public String groupId() {
+ return this.groupId;
+ }
+
+ /**
+ * Get the requiredMembers property: The private link resource required member names.
+ *
+ * @return the requiredMembers value.
+ */
+ public List requiredMembers() {
+ return this.requiredMembers;
+ }
+
+ /**
+ * Get the requiredZoneNames property: The private link resource Private link DNS zone name.
+ *
+ * @return the requiredZoneNames value.
+ */
+ public List requiredZoneNames() {
+ return this.requiredZoneNames;
+ }
+
+ /**
+ * Set the requiredZoneNames property: The private link resource Private link DNS zone name.
+ *
+ * @param requiredZoneNames the requiredZoneNames value to set.
+ * @return the PrivateLinkResourceProperties object itself.
+ */
+ public PrivateLinkResourceProperties withRequiredZoneNames(List requiredZoneNames) {
+ this.requiredZoneNames = requiredZoneNames;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/models/Properties.java b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/models/Properties.java
new file mode 100644
index 000000000000..7f72b7f9afff
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/models/Properties.java
@@ -0,0 +1,110 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.powerplatform.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.powerplatform.models.PropertiesEncryption;
+import com.azure.resourcemanager.powerplatform.models.PropertiesLockbox;
+import com.azure.resourcemanager.powerplatform.models.PropertiesNetworkInjection;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The properties that define configuration for the enterprise policy. */
+@Fluent
+public final class Properties {
+ /*
+ * Settings concerning lockbox.
+ */
+ @JsonProperty(value = "lockbox")
+ private PropertiesLockbox lockbox;
+
+ /*
+ * The encryption settings for a configuration store.
+ */
+ @JsonProperty(value = "encryption")
+ private PropertiesEncryption encryption;
+
+ /*
+ * Settings concerning network injection.
+ */
+ @JsonProperty(value = "networkInjection")
+ private PropertiesNetworkInjection networkInjection;
+
+ /**
+ * Get the lockbox property: Settings concerning lockbox.
+ *
+ * @return the lockbox value.
+ */
+ public PropertiesLockbox lockbox() {
+ return this.lockbox;
+ }
+
+ /**
+ * Set the lockbox property: Settings concerning lockbox.
+ *
+ * @param lockbox the lockbox value to set.
+ * @return the Properties object itself.
+ */
+ public Properties withLockbox(PropertiesLockbox lockbox) {
+ this.lockbox = lockbox;
+ return this;
+ }
+
+ /**
+ * Get the encryption property: The encryption settings for a configuration store.
+ *
+ * @return the encryption value.
+ */
+ public PropertiesEncryption encryption() {
+ return this.encryption;
+ }
+
+ /**
+ * Set the encryption property: The encryption settings for a configuration store.
+ *
+ * @param encryption the encryption value to set.
+ * @return the Properties object itself.
+ */
+ public Properties withEncryption(PropertiesEncryption encryption) {
+ this.encryption = encryption;
+ return this;
+ }
+
+ /**
+ * Get the networkInjection property: Settings concerning network injection.
+ *
+ * @return the networkInjection value.
+ */
+ public PropertiesNetworkInjection networkInjection() {
+ return this.networkInjection;
+ }
+
+ /**
+ * Set the networkInjection property: Settings concerning network injection.
+ *
+ * @param networkInjection the networkInjection value to set.
+ * @return the Properties object itself.
+ */
+ public Properties withNetworkInjection(PropertiesNetworkInjection networkInjection) {
+ this.networkInjection = networkInjection;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (lockbox() != null) {
+ lockbox().validate();
+ }
+ if (encryption() != null) {
+ encryption().validate();
+ }
+ if (networkInjection() != null) {
+ networkInjection().validate();
+ }
+ }
+}
diff --git a/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/models/package-info.java b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/models/package-info.java
new file mode 100644
index 000000000000..e777b7be30a6
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/models/package-info.java
@@ -0,0 +1,6 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/** Package containing the inner data models for PowerPlatform. null. */
+package com.azure.resourcemanager.powerplatform.fluent.models;
diff --git a/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/package-info.java b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/package-info.java
new file mode 100644
index 000000000000..f4b4bbdc46b3
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/package-info.java
@@ -0,0 +1,6 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/** Package containing the service clients for PowerPlatform. null. */
+package com.azure.resourcemanager.powerplatform.fluent;
diff --git a/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/AccountImpl.java b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/AccountImpl.java
new file mode 100644
index 000000000000..e30f787fde2c
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/AccountImpl.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.powerplatform.implementation;
+
+import com.azure.core.management.Region;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.powerplatform.fluent.models.AccountInner;
+import com.azure.resourcemanager.powerplatform.models.Account;
+import com.azure.resourcemanager.powerplatform.models.PatchAccount;
+import java.util.Collections;
+import java.util.Map;
+
+public final class AccountImpl implements Account, Account.Definition, Account.Update {
+ private AccountInner innerObject;
+
+ private final com.azure.resourcemanager.powerplatform.PowerPlatformManager 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 SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public String description() {
+ return this.innerModel().description();
+ }
+
+ public Region region() {
+ return Region.fromName(this.regionName());
+ }
+
+ public String regionName() {
+ return this.location();
+ }
+
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
+ public AccountInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.powerplatform.PowerPlatformManager manager() {
+ return this.serviceManager;
+ }
+
+ private String accountName;
+
+ private String resourceGroupName;
+
+ private PatchAccount updateParameters;
+
+ public AccountImpl withExistingResourceGroup(String resourceGroupName) {
+ this.resourceGroupName = resourceGroupName;
+ return this;
+ }
+
+ public Account create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getAccounts()
+ .createOrUpdateWithResponse(accountName, resourceGroupName, this.innerModel(), Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public Account create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getAccounts()
+ .createOrUpdateWithResponse(accountName, resourceGroupName, this.innerModel(), context)
+ .getValue();
+ return this;
+ }
+
+ AccountImpl(String name, com.azure.resourcemanager.powerplatform.PowerPlatformManager serviceManager) {
+ this.innerObject = new AccountInner();
+ this.serviceManager = serviceManager;
+ this.accountName = name;
+ }
+
+ public AccountImpl update() {
+ this.updateParameters = new PatchAccount();
+ return this;
+ }
+
+ public Account apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getAccounts()
+ .updateWithResponse(accountName, resourceGroupName, updateParameters, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public Account apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getAccounts()
+ .updateWithResponse(accountName, resourceGroupName, updateParameters, context)
+ .getValue();
+ return this;
+ }
+
+ AccountImpl(AccountInner innerObject, com.azure.resourcemanager.powerplatform.PowerPlatformManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.accountName = Utils.getValueFromIdByName(innerObject.id(), "accounts");
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ }
+
+ public Account refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getAccounts()
+ .getByResourceGroupWithResponse(resourceGroupName, accountName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public Account refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getAccounts()
+ .getByResourceGroupWithResponse(resourceGroupName, accountName, context)
+ .getValue();
+ return this;
+ }
+
+ public AccountImpl withRegion(Region location) {
+ this.innerModel().withLocation(location.toString());
+ return this;
+ }
+
+ public AccountImpl withRegion(String location) {
+ this.innerModel().withLocation(location);
+ return this;
+ }
+
+ public AccountImpl withTags(Map tags) {
+ if (isInCreateMode()) {
+ this.innerModel().withTags(tags);
+ return this;
+ } else {
+ this.updateParameters.withTags(tags);
+ return this;
+ }
+ }
+
+ public AccountImpl withDescription(String description) {
+ if (isInCreateMode()) {
+ this.innerModel().withDescription(description);
+ return this;
+ } else {
+ this.updateParameters.withDescription(description);
+ return this;
+ }
+ }
+
+ private boolean isInCreateMode() {
+ return this.innerModel().id() == null;
+ }
+}
diff --git a/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/AccountsClientImpl.java b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/AccountsClientImpl.java
new file mode 100644
index 000000000000..ae1e43cc2586
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/AccountsClientImpl.java
@@ -0,0 +1,1225 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.powerplatform.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.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.resourcemanager.powerplatform.fluent.AccountsClient;
+import com.azure.resourcemanager.powerplatform.fluent.models.AccountInner;
+import com.azure.resourcemanager.powerplatform.models.AccountList;
+import com.azure.resourcemanager.powerplatform.models.PatchAccount;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in AccountsClient. */
+public final class AccountsClientImpl implements AccountsClient {
+ /** The proxy service used to perform REST calls. */
+ private final AccountsService service;
+
+ /** The service client containing this operation class. */
+ private final PowerPlatformImpl client;
+
+ /**
+ * Initializes an instance of AccountsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ AccountsClientImpl(PowerPlatformImpl client) {
+ this.service = RestProxy.create(AccountsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for PowerPlatformAccounts to be used by the proxy service to perform REST
+ * calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "PowerPlatformAccount")
+ private interface AccountsService {
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerPlatform"
+ + "/accounts/{accountName}")
+ @ExpectedResponses({200, 201})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> createOrUpdate(
+ @HostParam("$host") String endpoint,
+ @PathParam("accountName") String accountName,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") AccountInner parameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerPlatform"
+ + "/accounts/{accountName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getByResourceGroup(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("accountName") String accountName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerPlatform"
+ + "/accounts/{accountName}")
+ @ExpectedResponses({200, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> delete(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("accountName") String accountName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Patch(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerPlatform"
+ + "/accounts/{accountName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> update(
+ @HostParam("$host") String endpoint,
+ @PathParam("accountName") String accountName,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") PatchAccount parameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerPlatform"
+ + "/accounts")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroup(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.PowerPlatform/accounts")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("api-version") String apiVersion,
+ @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);
+
+ @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);
+ }
+
+ /**
+ * Creates an account.
+ *
+ * @param accountName Name of the account.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parameters Parameters supplied to create or update an account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return definition of the account along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createOrUpdateWithResponseAsync(
+ String accountName, String resourceGroupName, AccountInner parameters) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (accountName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter accountName 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 (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ accountName,
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ this.client.getApiVersion(),
+ parameters,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Creates an account.
+ *
+ * @param accountName Name of the account.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parameters Parameters supplied to create or update an account.
+ * @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 definition of the account along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createOrUpdateWithResponseAsync(
+ String accountName, String resourceGroupName, AccountInner parameters, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (accountName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter accountName 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 (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ accountName,
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ this.client.getApiVersion(),
+ parameters,
+ accept,
+ context);
+ }
+
+ /**
+ * Creates an account.
+ *
+ * @param accountName Name of the account.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parameters Parameters supplied to create or update an account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return definition of the account on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String accountName, String resourceGroupName, AccountInner parameters) {
+ return createOrUpdateWithResponseAsync(accountName, resourceGroupName, parameters)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Creates an account.
+ *
+ * @param accountName Name of the account.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parameters Parameters supplied to create or update an account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return definition of the account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public AccountInner createOrUpdate(String accountName, String resourceGroupName, AccountInner parameters) {
+ return createOrUpdateAsync(accountName, resourceGroupName, parameters).block();
+ }
+
+ /**
+ * Creates an account.
+ *
+ * @param accountName Name of the account.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parameters Parameters supplied to create or update an account.
+ * @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 definition of the account along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response createOrUpdateWithResponse(
+ String accountName, String resourceGroupName, AccountInner parameters, Context context) {
+ return createOrUpdateWithResponseAsync(accountName, resourceGroupName, parameters, context).block();
+ }
+
+ /**
+ * Get information about an account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Name of the account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return information about an account along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(
+ String resourceGroupName, String accountName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName 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 (accountName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .getByResourceGroup(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ this.client.getSubscriptionId(),
+ accountName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get information about an account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Name of the account.
+ * @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 information about an account along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(
+ String resourceGroupName, String accountName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName 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 (accountName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .getByResourceGroup(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ this.client.getSubscriptionId(),
+ accountName,
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * Get information about an account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Name of the account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return information about an account on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getByResourceGroupAsync(String resourceGroupName, String accountName) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, accountName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get information about an account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Name of the account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return information about an account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public AccountInner getByResourceGroup(String resourceGroupName, String accountName) {
+ return getByResourceGroupAsync(resourceGroupName, accountName).block();
+ }
+
+ /**
+ * Get information about an account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Name of the account.
+ * @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 information about an account along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getByResourceGroupWithResponse(
+ String resourceGroupName, String accountName, Context context) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, accountName, context).block();
+ }
+
+ /**
+ * Delete an account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Name of the account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 accountName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName 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 (accountName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .delete(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ this.client.getSubscriptionId(),
+ accountName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Delete an account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Name of the account.
+ * @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 accountName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName 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 (accountName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .delete(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ this.client.getSubscriptionId(),
+ accountName,
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * Delete an account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Name of the account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 accountName) {
+ return deleteWithResponseAsync(resourceGroupName, accountName).flatMap(ignored -> Mono.empty());
+ }
+
+ /**
+ * Delete an account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Name of the account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 accountName) {
+ deleteAsync(resourceGroupName, accountName).block();
+ }
+
+ /**
+ * Delete an account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Name of the account.
+ * @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}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response deleteWithResponse(String resourceGroupName, String accountName, Context context) {
+ return deleteWithResponseAsync(resourceGroupName, accountName, context).block();
+ }
+
+ /**
+ * Updates an account.
+ *
+ * @param accountName Name of the account.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parameters Parameters supplied to update an account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return definition of the account along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(
+ String accountName, String resourceGroupName, PatchAccount parameters) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (accountName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter accountName 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 (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .update(
+ this.client.getEndpoint(),
+ accountName,
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ this.client.getApiVersion(),
+ parameters,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Updates an account.
+ *
+ * @param accountName Name of the account.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parameters Parameters supplied to update an account.
+ * @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 definition of the account along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(
+ String accountName, String resourceGroupName, PatchAccount parameters, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (accountName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter accountName 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 (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .update(
+ this.client.getEndpoint(),
+ accountName,
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ this.client.getApiVersion(),
+ parameters,
+ accept,
+ context);
+ }
+
+ /**
+ * Updates an account.
+ *
+ * @param accountName Name of the account.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parameters Parameters supplied to update an account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return definition of the account on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(String accountName, String resourceGroupName, PatchAccount parameters) {
+ return updateWithResponseAsync(accountName, resourceGroupName, parameters)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Updates an account.
+ *
+ * @param accountName Name of the account.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parameters Parameters supplied to update an account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return definition of the account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public AccountInner update(String accountName, String resourceGroupName, PatchAccount parameters) {
+ return updateAsync(accountName, resourceGroupName, parameters).block();
+ }
+
+ /**
+ * Updates an account.
+ *
+ * @param accountName Name of the account.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parameters Parameters supplied to update an account.
+ * @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 definition of the account along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response updateWithResponse(
+ String accountName, String resourceGroupName, PatchAccount parameters, Context context) {
+ return updateWithResponseAsync(accountName, resourceGroupName, parameters, context).block();
+ }
+
+ /**
+ * Retrieve a list of accounts within a given 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 the list accounts 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.getSubscriptionId(),
+ resourceGroupName,
+ 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()));
+ }
+
+ /**
+ * Retrieve a list of accounts within a given 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 the list accounts 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.getSubscriptionId(),
+ resourceGroupName,
+ this.client.getApiVersion(),
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Retrieve a list of accounts within a given 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 the list accounts operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
+ return new PagedFlux<>(
+ () -> listByResourceGroupSinglePageAsync(resourceGroupName),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Retrieve a list of accounts within a given 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 the list accounts 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));
+ }
+
+ /**
+ * Retrieve a list of accounts within a given 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 the list accounts operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName));
+ }
+
+ /**
+ * Retrieve a list of accounts within a given 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 the list accounts operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context));
+ }
+
+ /**
+ * Retrieve a list of accounts within a 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 the list accounts 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.getSubscriptionId(),
+ 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()));
+ }
+
+ /**
+ * Retrieve a list of accounts within a 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 the list accounts 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.getSubscriptionId(),
+ this.client.getApiVersion(),
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Retrieve a list of accounts within a 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 the list accounts operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Retrieve a list of accounts within a 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 the list accounts 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));
+ }
+
+ /**
+ * Retrieve a list of accounts within a 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 the list accounts operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ return new PagedIterable<>(listAsync());
+ }
+
+ /**
+ * Retrieve a list of accounts within a 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 the list accounts operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(Context context) {
+ return new PagedIterable<>(listAsync(context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of the list accounts 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 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 the list accounts operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The 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 the list accounts 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 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 the list accounts operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+}
diff --git a/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/AccountsImpl.java b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/AccountsImpl.java
new file mode 100644
index 000000000000..2436e0a02c1b
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/AccountsImpl.java
@@ -0,0 +1,169 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.powerplatform.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.powerplatform.fluent.AccountsClient;
+import com.azure.resourcemanager.powerplatform.fluent.models.AccountInner;
+import com.azure.resourcemanager.powerplatform.models.Account;
+import com.azure.resourcemanager.powerplatform.models.Accounts;
+
+public final class AccountsImpl implements Accounts {
+ private static final ClientLogger LOGGER = new ClientLogger(AccountsImpl.class);
+
+ private final AccountsClient innerClient;
+
+ private final com.azure.resourcemanager.powerplatform.PowerPlatformManager serviceManager;
+
+ public AccountsImpl(
+ AccountsClient innerClient, com.azure.resourcemanager.powerplatform.PowerPlatformManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Account getByResourceGroup(String resourceGroupName, String accountName) {
+ AccountInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, accountName);
+ if (inner != null) {
+ return new AccountImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getByResourceGroupWithResponse(
+ String resourceGroupName, String accountName, Context context) {
+ Response inner =
+ this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, accountName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new AccountImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public void deleteByResourceGroup(String resourceGroupName, String accountName) {
+ this.serviceClient().delete(resourceGroupName, accountName);
+ }
+
+ public Response deleteWithResponse(String resourceGroupName, String accountName, Context context) {
+ return this.serviceClient().deleteWithResponse(resourceGroupName, accountName, context);
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName);
+ return Utils.mapPage(inner, inner1 -> new AccountImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context);
+ return Utils.mapPage(inner, inner1 -> new AccountImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return Utils.mapPage(inner, inner1 -> new AccountImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(Context context) {
+ PagedIterable inner = this.serviceClient().list(context);
+ return Utils.mapPage(inner, inner1 -> new AccountImpl(inner1, this.manager()));
+ }
+
+ public Account 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 accountName = Utils.getValueFromIdByName(id, "accounts");
+ if (accountName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id)));
+ }
+ return this.getByResourceGroupWithResponse(resourceGroupName, accountName, 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 accountName = Utils.getValueFromIdByName(id, "accounts");
+ if (accountName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id)));
+ }
+ return this.getByResourceGroupWithResponse(resourceGroupName, accountName, 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 accountName = Utils.getValueFromIdByName(id, "accounts");
+ if (accountName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id)));
+ }
+ this.deleteWithResponse(resourceGroupName, accountName, Context.NONE);
+ }
+
+ public Response deleteByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String accountName = Utils.getValueFromIdByName(id, "accounts");
+ if (accountName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id)));
+ }
+ return this.deleteWithResponse(resourceGroupName, accountName, context);
+ }
+
+ private AccountsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.powerplatform.PowerPlatformManager manager() {
+ return this.serviceManager;
+ }
+
+ public AccountImpl define(String name) {
+ return new AccountImpl(name, this.manager());
+ }
+}
diff --git a/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/EnterprisePoliciesClientImpl.java b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/EnterprisePoliciesClientImpl.java
new file mode 100644
index 000000000000..27e07ea4256a
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/EnterprisePoliciesClientImpl.java
@@ -0,0 +1,1241 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.powerplatform.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.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.resourcemanager.powerplatform.fluent.EnterprisePoliciesClient;
+import com.azure.resourcemanager.powerplatform.fluent.models.EnterprisePolicyInner;
+import com.azure.resourcemanager.powerplatform.models.EnterprisePolicyList;
+import com.azure.resourcemanager.powerplatform.models.PatchEnterprisePolicy;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in EnterprisePoliciesClient. */
+public final class EnterprisePoliciesClientImpl implements EnterprisePoliciesClient {
+ /** The proxy service used to perform REST calls. */
+ private final EnterprisePoliciesService service;
+
+ /** The service client containing this operation class. */
+ private final PowerPlatformImpl client;
+
+ /**
+ * Initializes an instance of EnterprisePoliciesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ EnterprisePoliciesClientImpl(PowerPlatformImpl client) {
+ this.service =
+ RestProxy.create(EnterprisePoliciesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for PowerPlatformEnterprisePolicies to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "PowerPlatformEnterpr")
+ private interface EnterprisePoliciesService {
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerPlatform"
+ + "/enterprisePolicies/{enterprisePolicyName}")
+ @ExpectedResponses({200, 201})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> createOrUpdate(
+ @HostParam("$host") String endpoint,
+ @PathParam("enterprisePolicyName") String enterprisePolicyName,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") EnterprisePolicyInner parameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerPlatform"
+ + "/enterprisePolicies/{enterprisePolicyName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getByResourceGroup(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("enterprisePolicyName") String enterprisePolicyName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerPlatform"
+ + "/enterprisePolicies/{enterprisePolicyName}")
+ @ExpectedResponses({200, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> delete(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("enterprisePolicyName") String enterprisePolicyName,
+ @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Patch(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerPlatform"
+ + "/enterprisePolicies/{enterprisePolicyName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> update(
+ @HostParam("$host") String endpoint,
+ @PathParam("enterprisePolicyName") String enterprisePolicyName,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") PatchEnterprisePolicy parameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerPlatform"
+ + "/enterprisePolicies")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroup(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.PowerPlatform/enterprisePolicies")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("api-version") String apiVersion,
+ @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);
+
+ @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);
+ }
+
+ /**
+ * Creates an EnterprisePolicy.
+ *
+ * @param enterprisePolicyName Name of the EnterprisePolicy.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parameters Parameters supplied to create or update EnterprisePolicy.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return definition of the EnterprisePolicy along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createOrUpdateWithResponseAsync(
+ String enterprisePolicyName, String resourceGroupName, EnterprisePolicyInner parameters) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (enterprisePolicyName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter enterprisePolicyName 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 (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ enterprisePolicyName,
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ this.client.getApiVersion(),
+ parameters,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Creates an EnterprisePolicy.
+ *
+ * @param enterprisePolicyName Name of the EnterprisePolicy.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parameters Parameters supplied to create or update EnterprisePolicy.
+ * @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 definition of the EnterprisePolicy along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createOrUpdateWithResponseAsync(
+ String enterprisePolicyName, String resourceGroupName, EnterprisePolicyInner parameters, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (enterprisePolicyName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter enterprisePolicyName 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 (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ enterprisePolicyName,
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ this.client.getApiVersion(),
+ parameters,
+ accept,
+ context);
+ }
+
+ /**
+ * Creates an EnterprisePolicy.
+ *
+ * @param enterprisePolicyName Name of the EnterprisePolicy.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parameters Parameters supplied to create or update EnterprisePolicy.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return definition of the EnterprisePolicy on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String enterprisePolicyName, String resourceGroupName, EnterprisePolicyInner parameters) {
+ return createOrUpdateWithResponseAsync(enterprisePolicyName, resourceGroupName, parameters)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Creates an EnterprisePolicy.
+ *
+ * @param enterprisePolicyName Name of the EnterprisePolicy.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parameters Parameters supplied to create or update EnterprisePolicy.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return definition of the EnterprisePolicy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public EnterprisePolicyInner createOrUpdate(
+ String enterprisePolicyName, String resourceGroupName, EnterprisePolicyInner parameters) {
+ return createOrUpdateAsync(enterprisePolicyName, resourceGroupName, parameters).block();
+ }
+
+ /**
+ * Creates an EnterprisePolicy.
+ *
+ * @param enterprisePolicyName Name of the EnterprisePolicy.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parameters Parameters supplied to create or update EnterprisePolicy.
+ * @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 definition of the EnterprisePolicy along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response createOrUpdateWithResponse(
+ String enterprisePolicyName, String resourceGroupName, EnterprisePolicyInner parameters, Context context) {
+ return createOrUpdateWithResponseAsync(enterprisePolicyName, resourceGroupName, parameters, context).block();
+ }
+
+ /**
+ * Get information about an EnterprisePolicy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName The EnterprisePolicy name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return information about an EnterprisePolicy along with {@link Response} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(
+ String resourceGroupName, String enterprisePolicyName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName 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 (enterprisePolicyName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter enterprisePolicyName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .getByResourceGroup(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ this.client.getSubscriptionId(),
+ enterprisePolicyName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get information about an EnterprisePolicy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName The EnterprisePolicy name.
+ * @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 information about an EnterprisePolicy along with {@link Response} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(
+ String resourceGroupName, String enterprisePolicyName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName 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 (enterprisePolicyName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter enterprisePolicyName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .getByResourceGroup(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ this.client.getSubscriptionId(),
+ enterprisePolicyName,
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * Get information about an EnterprisePolicy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName The EnterprisePolicy name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return information about an EnterprisePolicy on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getByResourceGroupAsync(String resourceGroupName, String enterprisePolicyName) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, enterprisePolicyName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get information about an EnterprisePolicy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName The EnterprisePolicy name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return information about an EnterprisePolicy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public EnterprisePolicyInner getByResourceGroup(String resourceGroupName, String enterprisePolicyName) {
+ return getByResourceGroupAsync(resourceGroupName, enterprisePolicyName).block();
+ }
+
+ /**
+ * Get information about an EnterprisePolicy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName The EnterprisePolicy name.
+ * @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 information about an EnterprisePolicy along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getByResourceGroupWithResponse(
+ String resourceGroupName, String enterprisePolicyName, Context context) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, enterprisePolicyName, context).block();
+ }
+
+ /**
+ * Delete an EnterprisePolicy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName Name of the EnterprisePolicy.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 enterprisePolicyName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (enterprisePolicyName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter enterprisePolicyName 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
+ .delete(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ enterprisePolicyName,
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Delete an EnterprisePolicy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName Name of the EnterprisePolicy.
+ * @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 enterprisePolicyName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (enterprisePolicyName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter enterprisePolicyName 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
+ .delete(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ enterprisePolicyName,
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * Delete an EnterprisePolicy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName Name of the EnterprisePolicy.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 enterprisePolicyName) {
+ return deleteWithResponseAsync(resourceGroupName, enterprisePolicyName).flatMap(ignored -> Mono.empty());
+ }
+
+ /**
+ * Delete an EnterprisePolicy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName Name of the EnterprisePolicy.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 enterprisePolicyName) {
+ deleteAsync(resourceGroupName, enterprisePolicyName).block();
+ }
+
+ /**
+ * Delete an EnterprisePolicy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName Name of the EnterprisePolicy.
+ * @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}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response deleteWithResponse(String resourceGroupName, String enterprisePolicyName, Context context) {
+ return deleteWithResponseAsync(resourceGroupName, enterprisePolicyName, context).block();
+ }
+
+ /**
+ * Updates an EnterprisePolicy.
+ *
+ * @param enterprisePolicyName Name of the EnterprisePolicy.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parameters Parameters supplied to update EnterprisePolicy.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return definition of the EnterprisePolicy along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(
+ String enterprisePolicyName, String resourceGroupName, PatchEnterprisePolicy parameters) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (enterprisePolicyName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter enterprisePolicyName 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 (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .update(
+ this.client.getEndpoint(),
+ enterprisePolicyName,
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ this.client.getApiVersion(),
+ parameters,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Updates an EnterprisePolicy.
+ *
+ * @param enterprisePolicyName Name of the EnterprisePolicy.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parameters Parameters supplied to update EnterprisePolicy.
+ * @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 definition of the EnterprisePolicy along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(
+ String enterprisePolicyName, String resourceGroupName, PatchEnterprisePolicy parameters, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (enterprisePolicyName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter enterprisePolicyName 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 (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .update(
+ this.client.getEndpoint(),
+ enterprisePolicyName,
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ this.client.getApiVersion(),
+ parameters,
+ accept,
+ context);
+ }
+
+ /**
+ * Updates an EnterprisePolicy.
+ *
+ * @param enterprisePolicyName Name of the EnterprisePolicy.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parameters Parameters supplied to update EnterprisePolicy.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return definition of the EnterprisePolicy on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(
+ String enterprisePolicyName, String resourceGroupName, PatchEnterprisePolicy parameters) {
+ return updateWithResponseAsync(enterprisePolicyName, resourceGroupName, parameters)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Updates an EnterprisePolicy.
+ *
+ * @param enterprisePolicyName Name of the EnterprisePolicy.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parameters Parameters supplied to update EnterprisePolicy.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return definition of the EnterprisePolicy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public EnterprisePolicyInner update(
+ String enterprisePolicyName, String resourceGroupName, PatchEnterprisePolicy parameters) {
+ return updateAsync(enterprisePolicyName, resourceGroupName, parameters).block();
+ }
+
+ /**
+ * Updates an EnterprisePolicy.
+ *
+ * @param enterprisePolicyName Name of the EnterprisePolicy.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param parameters Parameters supplied to update EnterprisePolicy.
+ * @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 definition of the EnterprisePolicy along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response updateWithResponse(
+ String enterprisePolicyName, String resourceGroupName, PatchEnterprisePolicy parameters, Context context) {
+ return updateWithResponseAsync(enterprisePolicyName, resourceGroupName, parameters, context).block();
+ }
+
+ /**
+ * Retrieve a list of EnterprisePolicies within a given 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 the list EnterprisePolicy 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.getSubscriptionId(),
+ resourceGroupName,
+ 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()));
+ }
+
+ /**
+ * Retrieve a list of EnterprisePolicies within a given 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 the list EnterprisePolicy 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.getSubscriptionId(),
+ resourceGroupName,
+ this.client.getApiVersion(),
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Retrieve a list of EnterprisePolicies within a given 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 the list EnterprisePolicy operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
+ return new PagedFlux<>(
+ () -> listByResourceGroupSinglePageAsync(resourceGroupName),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Retrieve a list of EnterprisePolicies within a given 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 the list EnterprisePolicy 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));
+ }
+
+ /**
+ * Retrieve a list of EnterprisePolicies within a given 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 the list EnterprisePolicy operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName));
+ }
+
+ /**
+ * Retrieve a list of EnterprisePolicies within a given 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 the list EnterprisePolicy operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context));
+ }
+
+ /**
+ * Retrieve a list of EnterprisePolicies within a 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 the list EnterprisePolicy 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.getSubscriptionId(),
+ 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()));
+ }
+
+ /**
+ * Retrieve a list of EnterprisePolicies within a 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 the list EnterprisePolicy 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.getSubscriptionId(),
+ this.client.getApiVersion(),
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Retrieve a list of EnterprisePolicies within a 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 the list EnterprisePolicy operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Retrieve a list of EnterprisePolicies within a 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 the list EnterprisePolicy 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));
+ }
+
+ /**
+ * Retrieve a list of EnterprisePolicies within a 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 the list EnterprisePolicy operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ return new PagedIterable<>(listAsync());
+ }
+
+ /**
+ * Retrieve a list of EnterprisePolicies within a 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 the list EnterprisePolicy operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(Context context) {
+ return new PagedIterable<>(listAsync(context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of the list EnterprisePolicy 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 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 the list EnterprisePolicy operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupNextSinglePageAsync(
+ String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The 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 the list EnterprisePolicy 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 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 the list EnterprisePolicy operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySubscriptionNextSinglePageAsync(
+ String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+}
diff --git a/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/EnterprisePoliciesImpl.java b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/EnterprisePoliciesImpl.java
new file mode 100644
index 000000000000..ac4bc219af25
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/EnterprisePoliciesImpl.java
@@ -0,0 +1,179 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.powerplatform.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.powerplatform.fluent.EnterprisePoliciesClient;
+import com.azure.resourcemanager.powerplatform.fluent.models.EnterprisePolicyInner;
+import com.azure.resourcemanager.powerplatform.models.EnterprisePolicies;
+import com.azure.resourcemanager.powerplatform.models.EnterprisePolicy;
+
+public final class EnterprisePoliciesImpl implements EnterprisePolicies {
+ private static final ClientLogger LOGGER = new ClientLogger(EnterprisePoliciesImpl.class);
+
+ private final EnterprisePoliciesClient innerClient;
+
+ private final com.azure.resourcemanager.powerplatform.PowerPlatformManager serviceManager;
+
+ public EnterprisePoliciesImpl(
+ EnterprisePoliciesClient innerClient,
+ com.azure.resourcemanager.powerplatform.PowerPlatformManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public EnterprisePolicy getByResourceGroup(String resourceGroupName, String enterprisePolicyName) {
+ EnterprisePolicyInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, enterprisePolicyName);
+ if (inner != null) {
+ return new EnterprisePolicyImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getByResourceGroupWithResponse(
+ String resourceGroupName, String enterprisePolicyName, Context context) {
+ Response inner =
+ this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, enterprisePolicyName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new EnterprisePolicyImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public void deleteByResourceGroup(String resourceGroupName, String enterprisePolicyName) {
+ this.serviceClient().delete(resourceGroupName, enterprisePolicyName);
+ }
+
+ public Response deleteWithResponse(String resourceGroupName, String enterprisePolicyName, Context context) {
+ return this.serviceClient().deleteWithResponse(resourceGroupName, enterprisePolicyName, context);
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName);
+ return Utils.mapPage(inner, inner1 -> new EnterprisePolicyImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ PagedIterable inner =
+ this.serviceClient().listByResourceGroup(resourceGroupName, context);
+ return Utils.mapPage(inner, inner1 -> new EnterprisePolicyImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return Utils.mapPage(inner, inner1 -> new EnterprisePolicyImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(Context context) {
+ PagedIterable inner = this.serviceClient().list(context);
+ return Utils.mapPage(inner, inner1 -> new EnterprisePolicyImpl(inner1, this.manager()));
+ }
+
+ public EnterprisePolicy 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 enterprisePolicyName = Utils.getValueFromIdByName(id, "enterprisePolicies");
+ if (enterprisePolicyName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'enterprisePolicies'.", id)));
+ }
+ return this.getByResourceGroupWithResponse(resourceGroupName, enterprisePolicyName, 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 enterprisePolicyName = Utils.getValueFromIdByName(id, "enterprisePolicies");
+ if (enterprisePolicyName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'enterprisePolicies'.", id)));
+ }
+ return this.getByResourceGroupWithResponse(resourceGroupName, enterprisePolicyName, 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 enterprisePolicyName = Utils.getValueFromIdByName(id, "enterprisePolicies");
+ if (enterprisePolicyName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'enterprisePolicies'.", id)));
+ }
+ this.deleteWithResponse(resourceGroupName, enterprisePolicyName, Context.NONE);
+ }
+
+ public Response deleteByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String enterprisePolicyName = Utils.getValueFromIdByName(id, "enterprisePolicies");
+ if (enterprisePolicyName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'enterprisePolicies'.", id)));
+ }
+ return this.deleteWithResponse(resourceGroupName, enterprisePolicyName, context);
+ }
+
+ private EnterprisePoliciesClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.powerplatform.PowerPlatformManager manager() {
+ return this.serviceManager;
+ }
+
+ public EnterprisePolicyImpl define(String name) {
+ return new EnterprisePolicyImpl(name, this.manager());
+ }
+}
diff --git a/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/EnterprisePolicyImpl.java b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/EnterprisePolicyImpl.java
new file mode 100644
index 000000000000..5caa907d712a
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/EnterprisePolicyImpl.java
@@ -0,0 +1,260 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.powerplatform.implementation;
+
+import com.azure.core.management.Region;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.powerplatform.fluent.models.EnterprisePolicyInner;
+import com.azure.resourcemanager.powerplatform.models.EnterprisePolicy;
+import com.azure.resourcemanager.powerplatform.models.EnterprisePolicyIdentity;
+import com.azure.resourcemanager.powerplatform.models.EnterprisePolicyKind;
+import com.azure.resourcemanager.powerplatform.models.PatchEnterprisePolicy;
+import com.azure.resourcemanager.powerplatform.models.PropertiesEncryption;
+import com.azure.resourcemanager.powerplatform.models.PropertiesLockbox;
+import com.azure.resourcemanager.powerplatform.models.PropertiesNetworkInjection;
+import java.util.Collections;
+import java.util.Map;
+
+public final class EnterprisePolicyImpl
+ implements EnterprisePolicy, EnterprisePolicy.Definition, EnterprisePolicy.Update {
+ private EnterprisePolicyInner innerObject;
+
+ private final com.azure.resourcemanager.powerplatform.PowerPlatformManager 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 EnterprisePolicyIdentity identity() {
+ return this.innerModel().identity();
+ }
+
+ public EnterprisePolicyKind kind() {
+ return this.innerModel().kind();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public PropertiesLockbox lockbox() {
+ return this.innerModel().lockbox();
+ }
+
+ public PropertiesEncryption encryption() {
+ return this.innerModel().encryption();
+ }
+
+ public PropertiesNetworkInjection networkInjection() {
+ return this.innerModel().networkInjection();
+ }
+
+ public Region region() {
+ return Region.fromName(this.regionName());
+ }
+
+ public String regionName() {
+ return this.location();
+ }
+
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
+ public EnterprisePolicyInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.powerplatform.PowerPlatformManager manager() {
+ return this.serviceManager;
+ }
+
+ private String enterprisePolicyName;
+
+ private String resourceGroupName;
+
+ private PatchEnterprisePolicy updateParameters;
+
+ public EnterprisePolicyImpl withExistingResourceGroup(String resourceGroupName) {
+ this.resourceGroupName = resourceGroupName;
+ return this;
+ }
+
+ public EnterprisePolicy create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getEnterprisePolicies()
+ .createOrUpdateWithResponse(enterprisePolicyName, resourceGroupName, this.innerModel(), Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public EnterprisePolicy create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getEnterprisePolicies()
+ .createOrUpdateWithResponse(enterprisePolicyName, resourceGroupName, this.innerModel(), context)
+ .getValue();
+ return this;
+ }
+
+ EnterprisePolicyImpl(String name, com.azure.resourcemanager.powerplatform.PowerPlatformManager serviceManager) {
+ this.innerObject = new EnterprisePolicyInner();
+ this.serviceManager = serviceManager;
+ this.enterprisePolicyName = name;
+ }
+
+ public EnterprisePolicyImpl update() {
+ this.updateParameters = new PatchEnterprisePolicy();
+ return this;
+ }
+
+ public EnterprisePolicy apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getEnterprisePolicies()
+ .updateWithResponse(enterprisePolicyName, resourceGroupName, updateParameters, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public EnterprisePolicy apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getEnterprisePolicies()
+ .updateWithResponse(enterprisePolicyName, resourceGroupName, updateParameters, context)
+ .getValue();
+ return this;
+ }
+
+ EnterprisePolicyImpl(
+ EnterprisePolicyInner innerObject,
+ com.azure.resourcemanager.powerplatform.PowerPlatformManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.enterprisePolicyName = Utils.getValueFromIdByName(innerObject.id(), "enterprisePolicies");
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ }
+
+ public EnterprisePolicy refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getEnterprisePolicies()
+ .getByResourceGroupWithResponse(resourceGroupName, enterprisePolicyName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public EnterprisePolicy refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getEnterprisePolicies()
+ .getByResourceGroupWithResponse(resourceGroupName, enterprisePolicyName, context)
+ .getValue();
+ return this;
+ }
+
+ public EnterprisePolicyImpl withRegion(Region location) {
+ this.innerModel().withLocation(location.toString());
+ return this;
+ }
+
+ public EnterprisePolicyImpl withRegion(String location) {
+ this.innerModel().withLocation(location);
+ return this;
+ }
+
+ public EnterprisePolicyImpl withKind(EnterprisePolicyKind kind) {
+ if (isInCreateMode()) {
+ this.innerModel().withKind(kind);
+ return this;
+ } else {
+ this.updateParameters.withKind(kind);
+ return this;
+ }
+ }
+
+ public EnterprisePolicyImpl withTags(Map tags) {
+ if (isInCreateMode()) {
+ this.innerModel().withTags(tags);
+ return this;
+ } else {
+ this.updateParameters.withTags(tags);
+ return this;
+ }
+ }
+
+ public EnterprisePolicyImpl withIdentity(EnterprisePolicyIdentity identity) {
+ if (isInCreateMode()) {
+ this.innerModel().withIdentity(identity);
+ return this;
+ } else {
+ this.updateParameters.withIdentity(identity);
+ return this;
+ }
+ }
+
+ public EnterprisePolicyImpl withLockbox(PropertiesLockbox lockbox) {
+ if (isInCreateMode()) {
+ this.innerModel().withLockbox(lockbox);
+ return this;
+ } else {
+ this.updateParameters.withLockbox(lockbox);
+ return this;
+ }
+ }
+
+ public EnterprisePolicyImpl withEncryption(PropertiesEncryption encryption) {
+ if (isInCreateMode()) {
+ this.innerModel().withEncryption(encryption);
+ return this;
+ } else {
+ this.updateParameters.withEncryption(encryption);
+ return this;
+ }
+ }
+
+ public EnterprisePolicyImpl withNetworkInjection(PropertiesNetworkInjection networkInjection) {
+ if (isInCreateMode()) {
+ this.innerModel().withNetworkInjection(networkInjection);
+ return this;
+ } else {
+ this.updateParameters.withNetworkInjection(networkInjection);
+ return this;
+ }
+ }
+
+ private boolean isInCreateMode() {
+ return this.innerModel().id() == null;
+ }
+}
diff --git a/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/OperationImpl.java b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/OperationImpl.java
new file mode 100644
index 000000000000..b925db46f630
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/OperationImpl.java
@@ -0,0 +1,51 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.powerplatform.implementation;
+
+import com.azure.resourcemanager.powerplatform.fluent.models.OperationInner;
+import com.azure.resourcemanager.powerplatform.models.ActionType;
+import com.azure.resourcemanager.powerplatform.models.Operation;
+import com.azure.resourcemanager.powerplatform.models.OperationDisplay;
+import com.azure.resourcemanager.powerplatform.models.Origin;
+
+public final class OperationImpl implements Operation {
+ private OperationInner innerObject;
+
+ private final com.azure.resourcemanager.powerplatform.PowerPlatformManager serviceManager;
+
+ OperationImpl(
+ OperationInner innerObject, com.azure.resourcemanager.powerplatform.PowerPlatformManager 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.powerplatform.PowerPlatformManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/OperationsClientImpl.java b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/OperationsClientImpl.java
new file mode 100644
index 000000000000..0f5aa351f5ab
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/OperationsClientImpl.java
@@ -0,0 +1,274 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.powerplatform.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.powerplatform.fluent.OperationsClient;
+import com.azure.resourcemanager.powerplatform.fluent.models.OperationInner;
+import com.azure.resourcemanager.powerplatform.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 PowerPlatformImpl client;
+
+ /**
+ * Initializes an instance of OperationsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ OperationsClientImpl(PowerPlatformImpl client) {
+ this.service =
+ RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for PowerPlatformOperations to be used by the proxy service to perform
+ * REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "PowerPlatformOperati")
+ private interface OperationsService {
+ @Headers({"Content-Type: application/json"})
+ @Get("/providers/Microsoft.PowerPlatform/operations")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Lists all of the available PowerPlatform REST API operations.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync() {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Lists all of the available PowerPlatform REST API operations.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Lists all of the available PowerPlatform REST API operations.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link
+ * PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists all of the available PowerPlatform REST API operations.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link
+ * PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Lists all of the available PowerPlatform REST API operations.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link
+ * PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ return new PagedIterable<>(listAsync());
+ }
+
+ /**
+ * Lists all of the available PowerPlatform REST API operations.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link
+ * PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(Context context) {
+ return new PagedIterable<>(listAsync(context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+}
diff --git a/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/OperationsImpl.java b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/OperationsImpl.java
new file mode 100644
index 000000000000..9673c330c715
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/OperationsImpl.java
@@ -0,0 +1,45 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.powerplatform.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.powerplatform.fluent.OperationsClient;
+import com.azure.resourcemanager.powerplatform.fluent.models.OperationInner;
+import com.azure.resourcemanager.powerplatform.models.Operation;
+import com.azure.resourcemanager.powerplatform.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.powerplatform.PowerPlatformManager serviceManager;
+
+ public OperationsImpl(
+ OperationsClient innerClient, com.azure.resourcemanager.powerplatform.PowerPlatformManager 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.powerplatform.PowerPlatformManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/PowerPlatformBuilder.java b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/PowerPlatformBuilder.java
new file mode 100644
index 000000000000..50c3c223e9c1
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/PowerPlatformBuilder.java
@@ -0,0 +1,142 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.powerplatform.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 PowerPlatformImpl type. */
+@ServiceClientBuilder(serviceClients = {PowerPlatformImpl.class})
+public final class PowerPlatformBuilder {
+ /*
+ * The ID of the target subscription.
+ */
+ private String subscriptionId;
+
+ /**
+ * Sets The ID of the target subscription.
+ *
+ * @param subscriptionId the subscriptionId value.
+ * @return the PowerPlatformBuilder.
+ */
+ public PowerPlatformBuilder subscriptionId(String subscriptionId) {
+ this.subscriptionId = subscriptionId;
+ return this;
+ }
+
+ /*
+ * server parameter
+ */
+ private String endpoint;
+
+ /**
+ * Sets server parameter.
+ *
+ * @param endpoint the endpoint value.
+ * @return the PowerPlatformBuilder.
+ */
+ public PowerPlatformBuilder 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 PowerPlatformBuilder.
+ */
+ public PowerPlatformBuilder 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 PowerPlatformBuilder.
+ */
+ public PowerPlatformBuilder 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 PowerPlatformBuilder.
+ */
+ public PowerPlatformBuilder 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 PowerPlatformBuilder.
+ */
+ public PowerPlatformBuilder serializerAdapter(SerializerAdapter serializerAdapter) {
+ this.serializerAdapter = serializerAdapter;
+ return this;
+ }
+
+ /**
+ * Builds an instance of PowerPlatformImpl with the provided parameters.
+ *
+ * @return an instance of PowerPlatformImpl.
+ */
+ public PowerPlatformImpl buildClient() {
+ if (endpoint == null) {
+ this.endpoint = "https://management.azure.com";
+ }
+ if (environment == null) {
+ this.environment = AzureEnvironment.AZURE;
+ }
+ if (pipeline == null) {
+ this.pipeline = new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build();
+ }
+ if (defaultPollInterval == null) {
+ this.defaultPollInterval = Duration.ofSeconds(30);
+ }
+ if (serializerAdapter == null) {
+ this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter();
+ }
+ PowerPlatformImpl client =
+ new PowerPlatformImpl(
+ pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint);
+ return client;
+ }
+}
diff --git a/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/PowerPlatformImpl.java b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/PowerPlatformImpl.java
new file mode 100644
index 000000000000..8d3558ae9dc1
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/PowerPlatformImpl.java
@@ -0,0 +1,346 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.powerplatform.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.powerplatform.fluent.AccountsClient;
+import com.azure.resourcemanager.powerplatform.fluent.EnterprisePoliciesClient;
+import com.azure.resourcemanager.powerplatform.fluent.OperationsClient;
+import com.azure.resourcemanager.powerplatform.fluent.PowerPlatform;
+import com.azure.resourcemanager.powerplatform.fluent.PrivateEndpointConnectionsClient;
+import com.azure.resourcemanager.powerplatform.fluent.PrivateLinkResourcesClient;
+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 PowerPlatformImpl type. */
+@ServiceClient(builder = PowerPlatformBuilder.class)
+public final class PowerPlatformImpl implements PowerPlatform {
+ /** 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 AccountsClient object to access its operations. */
+ private final AccountsClient accounts;
+
+ /**
+ * Gets the AccountsClient object to access its operations.
+ *
+ * @return the AccountsClient object.
+ */
+ public AccountsClient getAccounts() {
+ return this.accounts;
+ }
+
+ /** The EnterprisePoliciesClient object to access its operations. */
+ private final EnterprisePoliciesClient enterprisePolicies;
+
+ /**
+ * Gets the EnterprisePoliciesClient object to access its operations.
+ *
+ * @return the EnterprisePoliciesClient object.
+ */
+ public EnterprisePoliciesClient getEnterprisePolicies() {
+ return this.enterprisePolicies;
+ }
+
+ /** 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 PrivateEndpointConnectionsClient object to access its operations. */
+ private final PrivateEndpointConnectionsClient privateEndpointConnections;
+
+ /**
+ * Gets the PrivateEndpointConnectionsClient object to access its operations.
+ *
+ * @return the PrivateEndpointConnectionsClient object.
+ */
+ public PrivateEndpointConnectionsClient getPrivateEndpointConnections() {
+ return this.privateEndpointConnections;
+ }
+
+ /** The PrivateLinkResourcesClient object to access its operations. */
+ private final PrivateLinkResourcesClient privateLinkResources;
+
+ /**
+ * Gets the PrivateLinkResourcesClient object to access its operations.
+ *
+ * @return the PrivateLinkResourcesClient object.
+ */
+ public PrivateLinkResourcesClient getPrivateLinkResources() {
+ return this.privateLinkResources;
+ }
+
+ /**
+ * Initializes an instance of PowerPlatform 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.
+ */
+ PowerPlatformImpl(
+ 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 = "2020-10-30-preview";
+ this.accounts = new AccountsClientImpl(this);
+ this.enterprisePolicies = new EnterprisePoliciesClientImpl(this);
+ this.operations = new OperationsClientImpl(this);
+ this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this);
+ this.privateLinkResources = new PrivateLinkResourcesClientImpl(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(PowerPlatformImpl.class);
+}
diff --git a/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/PrivateEndpointConnectionImpl.java b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/PrivateEndpointConnectionImpl.java
new file mode 100644
index 000000000000..0e12f37dec9d
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/PrivateEndpointConnectionImpl.java
@@ -0,0 +1,173 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.powerplatform.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.powerplatform.fluent.models.PrivateEndpointConnectionInner;
+import com.azure.resourcemanager.powerplatform.models.PrivateEndpoint;
+import com.azure.resourcemanager.powerplatform.models.PrivateEndpointConnection;
+import com.azure.resourcemanager.powerplatform.models.PrivateEndpointConnectionProvisioningState;
+import com.azure.resourcemanager.powerplatform.models.PrivateLinkServiceConnectionState;
+
+public final class PrivateEndpointConnectionImpl
+ implements PrivateEndpointConnection, PrivateEndpointConnection.Definition, PrivateEndpointConnection.Update {
+ private PrivateEndpointConnectionInner innerObject;
+
+ private final com.azure.resourcemanager.powerplatform.PowerPlatformManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public PrivateEndpoint privateEndpoint() {
+ return this.innerModel().privateEndpoint();
+ }
+
+ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() {
+ return this.innerModel().privateLinkServiceConnectionState();
+ }
+
+ public PrivateEndpointConnectionProvisioningState provisioningState() {
+ return this.innerModel().provisioningState();
+ }
+
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
+ public PrivateEndpointConnectionInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.powerplatform.PowerPlatformManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String enterprisePolicyName;
+
+ private String privateEndpointConnectionName;
+
+ public PrivateEndpointConnectionImpl withExistingEnterprisePolicy(
+ String resourceGroupName, String enterprisePolicyName) {
+ this.resourceGroupName = resourceGroupName;
+ this.enterprisePolicyName = enterprisePolicyName;
+ return this;
+ }
+
+ public PrivateEndpointConnection create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getPrivateEndpointConnections()
+ .createOrUpdate(
+ resourceGroupName,
+ enterprisePolicyName,
+ privateEndpointConnectionName,
+ this.innerModel(),
+ Context.NONE);
+ return this;
+ }
+
+ public PrivateEndpointConnection create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getPrivateEndpointConnections()
+ .createOrUpdate(
+ resourceGroupName, enterprisePolicyName, privateEndpointConnectionName, this.innerModel(), context);
+ return this;
+ }
+
+ PrivateEndpointConnectionImpl(
+ String name, com.azure.resourcemanager.powerplatform.PowerPlatformManager serviceManager) {
+ this.innerObject = new PrivateEndpointConnectionInner();
+ this.serviceManager = serviceManager;
+ this.privateEndpointConnectionName = name;
+ }
+
+ public PrivateEndpointConnectionImpl update() {
+ return this;
+ }
+
+ public PrivateEndpointConnection apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getPrivateEndpointConnections()
+ .createOrUpdate(
+ resourceGroupName,
+ enterprisePolicyName,
+ privateEndpointConnectionName,
+ this.innerModel(),
+ Context.NONE);
+ return this;
+ }
+
+ public PrivateEndpointConnection apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getPrivateEndpointConnections()
+ .createOrUpdate(
+ resourceGroupName, enterprisePolicyName, privateEndpointConnectionName, this.innerModel(), context);
+ return this;
+ }
+
+ PrivateEndpointConnectionImpl(
+ PrivateEndpointConnectionInner innerObject,
+ com.azure.resourcemanager.powerplatform.PowerPlatformManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.enterprisePolicyName = Utils.getValueFromIdByName(innerObject.id(), "enterprisePolicies");
+ this.privateEndpointConnectionName = Utils.getValueFromIdByName(innerObject.id(), "privateEndpointConnections");
+ }
+
+ public PrivateEndpointConnection refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getPrivateEndpointConnections()
+ .getWithResponse(resourceGroupName, enterprisePolicyName, privateEndpointConnectionName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public PrivateEndpointConnection refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getPrivateEndpointConnections()
+ .getWithResponse(resourceGroupName, enterprisePolicyName, privateEndpointConnectionName, context)
+ .getValue();
+ return this;
+ }
+
+ public PrivateEndpointConnectionImpl withPrivateEndpoint(PrivateEndpoint privateEndpoint) {
+ this.innerModel().withPrivateEndpoint(privateEndpoint);
+ return this;
+ }
+
+ public PrivateEndpointConnectionImpl withPrivateLinkServiceConnectionState(
+ PrivateLinkServiceConnectionState privateLinkServiceConnectionState) {
+ this.innerModel().withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState);
+ return this;
+ }
+}
diff --git a/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/PrivateEndpointConnectionsClientImpl.java
new file mode 100644
index 000000000000..29cd92ccccf9
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/PrivateEndpointConnectionsClientImpl.java
@@ -0,0 +1,1084 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.powerplatform.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.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.powerplatform.fluent.PrivateEndpointConnectionsClient;
+import com.azure.resourcemanager.powerplatform.fluent.models.PrivateEndpointConnectionInner;
+import com.azure.resourcemanager.powerplatform.models.PrivateEndpointConnectionListResult;
+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 PrivateEndpointConnectionsClient. */
+public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpointConnectionsClient {
+ /** The proxy service used to perform REST calls. */
+ private final PrivateEndpointConnectionsService service;
+
+ /** The service client containing this operation class. */
+ private final PowerPlatformImpl client;
+
+ /**
+ * Initializes an instance of PrivateEndpointConnectionsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ PrivateEndpointConnectionsClientImpl(PowerPlatformImpl client) {
+ this.service =
+ RestProxy
+ .create(
+ PrivateEndpointConnectionsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for PowerPlatformPrivateEndpointConnections to be used by the proxy
+ * service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "PowerPlatformPrivate")
+ private interface PrivateEndpointConnectionsService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerPlatform"
+ + "/enterprisePolicies/{enterprisePolicyName}/privateEndpointConnections")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByEnterprisePolicy(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("enterprisePolicyName") String enterprisePolicyName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerPlatform"
+ + "/enterprisePolicies/{enterprisePolicyName}/privateEndpointConnections"
+ + "/{privateEndpointConnectionName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("enterprisePolicyName") String enterprisePolicyName,
+ @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerPlatform"
+ + "/enterprisePolicies/{enterprisePolicyName}/privateEndpointConnections"
+ + "/{privateEndpointConnectionName}")
+ @ExpectedResponses({200, 202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> createOrUpdate(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("enterprisePolicyName") String enterprisePolicyName,
+ @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName,
+ @BodyParam("application/json") PrivateEndpointConnectionInner parameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerPlatform"
+ + "/enterprisePolicies/{enterprisePolicyName}/privateEndpointConnections"
+ + "/{privateEndpointConnectionName}")
+ @ExpectedResponses({200, 202, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("enterprisePolicyName") String enterprisePolicyName,
+ @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * List all private endpoint connections on an EnterprisePolicy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName EnterprisePolicy for the Microsoft Azure subscription.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 private endpoint connections along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByEnterprisePolicySinglePageAsync(
+ String resourceGroupName, String enterprisePolicyName) {
+ 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 (enterprisePolicyName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter enterprisePolicyName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listByEnterprisePolicy(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ this.client.getApiVersion(),
+ enterprisePolicyName,
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * List all private endpoint connections on an EnterprisePolicy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName EnterprisePolicy for the Microsoft Azure 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 a list of private endpoint connections along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByEnterprisePolicySinglePageAsync(
+ String resourceGroupName, String enterprisePolicyName, 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 (enterprisePolicyName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter enterprisePolicyName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByEnterprisePolicy(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ this.client.getApiVersion(),
+ enterprisePolicyName,
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null));
+ }
+
+ /**
+ * List all private endpoint connections on an EnterprisePolicy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName EnterprisePolicy for the Microsoft Azure subscription.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 private endpoint connections as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByEnterprisePolicyAsync(
+ String resourceGroupName, String enterprisePolicyName) {
+ return new PagedFlux<>(() -> listByEnterprisePolicySinglePageAsync(resourceGroupName, enterprisePolicyName));
+ }
+
+ /**
+ * List all private endpoint connections on an EnterprisePolicy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName EnterprisePolicy for the Microsoft Azure 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 a list of private endpoint connections as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByEnterprisePolicyAsync(
+ String resourceGroupName, String enterprisePolicyName, Context context) {
+ return new PagedFlux<>(
+ () -> listByEnterprisePolicySinglePageAsync(resourceGroupName, enterprisePolicyName, context));
+ }
+
+ /**
+ * List all private endpoint connections on an EnterprisePolicy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName EnterprisePolicy for the Microsoft Azure subscription.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 private endpoint connections as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByEnterprisePolicy(
+ String resourceGroupName, String enterprisePolicyName) {
+ return new PagedIterable<>(listByEnterprisePolicyAsync(resourceGroupName, enterprisePolicyName));
+ }
+
+ /**
+ * List all private endpoint connections on an EnterprisePolicy.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName EnterprisePolicy for the Microsoft Azure 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 a list of private endpoint connections as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByEnterprisePolicy(
+ String resourceGroupName, String enterprisePolicyName, Context context) {
+ return new PagedIterable<>(listByEnterprisePolicyAsync(resourceGroupName, enterprisePolicyName, context));
+ }
+
+ /**
+ * Gets a private endpoint connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName EnterprisePolicy for the Microsoft Azure subscription.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 private endpoint connection along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String enterprisePolicyName, String privateEndpointConnectionName) {
+ 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 (enterprisePolicyName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter enterprisePolicyName is required and cannot be null."));
+ }
+ if (privateEndpointConnectionName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter privateEndpointConnectionName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ this.client.getApiVersion(),
+ enterprisePolicyName,
+ privateEndpointConnectionName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets a private endpoint connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName EnterprisePolicy for the Microsoft Azure subscription.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @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 private endpoint connection along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String enterprisePolicyName, String privateEndpointConnectionName, 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 (enterprisePolicyName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter enterprisePolicyName is required and cannot be null."));
+ }
+ if (privateEndpointConnectionName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter privateEndpointConnectionName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ this.client.getApiVersion(),
+ enterprisePolicyName,
+ privateEndpointConnectionName,
+ accept,
+ context);
+ }
+
+ /**
+ * Gets a private endpoint connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName EnterprisePolicy for the Microsoft Azure subscription.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 private endpoint connection on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(
+ String resourceGroupName, String enterprisePolicyName, String privateEndpointConnectionName) {
+ return getWithResponseAsync(resourceGroupName, enterprisePolicyName, privateEndpointConnectionName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Gets a private endpoint connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName EnterprisePolicy for the Microsoft Azure subscription.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 private endpoint connection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public PrivateEndpointConnectionInner get(
+ String resourceGroupName, String enterprisePolicyName, String privateEndpointConnectionName) {
+ return getAsync(resourceGroupName, enterprisePolicyName, privateEndpointConnectionName).block();
+ }
+
+ /**
+ * Gets a private endpoint connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName EnterprisePolicy for the Microsoft Azure subscription.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @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 private endpoint connection along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(
+ String resourceGroupName, String enterprisePolicyName, String privateEndpointConnectionName, Context context) {
+ return getWithResponseAsync(resourceGroupName, enterprisePolicyName, privateEndpointConnectionName, context)
+ .block();
+ }
+
+ /**
+ * Approve or reject a private endpoint connection with a given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName EnterprisePolicy for the Microsoft Azure subscription.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @param parameters Parameters supplied to create or update a private endpoint connection.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 private endpoint connection along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(
+ String resourceGroupName,
+ String enterprisePolicyName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner parameters) {
+ 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 (enterprisePolicyName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter enterprisePolicyName is required and cannot be null."));
+ }
+ if (privateEndpointConnectionName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter privateEndpointConnectionName is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ this.client.getApiVersion(),
+ enterprisePolicyName,
+ privateEndpointConnectionName,
+ parameters,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Approve or reject a private endpoint connection with a given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName EnterprisePolicy for the Microsoft Azure subscription.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @param parameters Parameters supplied to create or update a private endpoint connection.
+ * @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 private endpoint connection along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(
+ String resourceGroupName,
+ String enterprisePolicyName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner parameters,
+ 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 (enterprisePolicyName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter enterprisePolicyName is required and cannot be null."));
+ }
+ if (privateEndpointConnectionName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter privateEndpointConnectionName is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ this.client.getApiVersion(),
+ enterprisePolicyName,
+ privateEndpointConnectionName,
+ parameters,
+ accept,
+ context);
+ }
+
+ /**
+ * Approve or reject a private endpoint connection with a given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName EnterprisePolicy for the Microsoft Azure subscription.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @param parameters Parameters supplied to create or update a private endpoint connection.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 private endpoint connection.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, PrivateEndpointConnectionInner>
+ beginCreateOrUpdateAsync(
+ String resourceGroupName,
+ String enterprisePolicyName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner parameters) {
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(
+ resourceGroupName, enterprisePolicyName, privateEndpointConnectionName, parameters);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ PrivateEndpointConnectionInner.class,
+ PrivateEndpointConnectionInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Approve or reject a private endpoint connection with a given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName EnterprisePolicy for the Microsoft Azure subscription.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @param parameters Parameters supplied to create or update a private endpoint connection.
+ * @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 private endpoint connection.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, PrivateEndpointConnectionInner>
+ beginCreateOrUpdateAsync(
+ String resourceGroupName,
+ String enterprisePolicyName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner parameters,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(
+ resourceGroupName, enterprisePolicyName, privateEndpointConnectionName, parameters, context);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ PrivateEndpointConnectionInner.class,
+ PrivateEndpointConnectionInner.class,
+ context);
+ }
+
+ /**
+ * Approve or reject a private endpoint connection with a given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName EnterprisePolicy for the Microsoft Azure subscription.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @param parameters Parameters supplied to create or update a private endpoint connection.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 private endpoint connection.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String enterprisePolicyName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner parameters) {
+ return beginCreateOrUpdateAsync(
+ resourceGroupName, enterprisePolicyName, privateEndpointConnectionName, parameters)
+ .getSyncPoller();
+ }
+
+ /**
+ * Approve or reject a private endpoint connection with a given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName EnterprisePolicy for the Microsoft Azure subscription.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @param parameters Parameters supplied to create or update a private endpoint connection.
+ * @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 private endpoint connection.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String enterprisePolicyName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner parameters,
+ Context context) {
+ return beginCreateOrUpdateAsync(
+ resourceGroupName, enterprisePolicyName, privateEndpointConnectionName, parameters, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * Approve or reject a private endpoint connection with a given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName EnterprisePolicy for the Microsoft Azure subscription.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @param parameters Parameters supplied to create or update a private endpoint connection.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 private endpoint connection on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName,
+ String enterprisePolicyName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner parameters) {
+ return beginCreateOrUpdateAsync(
+ resourceGroupName, enterprisePolicyName, privateEndpointConnectionName, parameters)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Approve or reject a private endpoint connection with a given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName EnterprisePolicy for the Microsoft Azure subscription.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @param parameters Parameters supplied to create or update a private endpoint connection.
+ * @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 private endpoint connection on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName,
+ String enterprisePolicyName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner parameters,
+ Context context) {
+ return beginCreateOrUpdateAsync(
+ resourceGroupName, enterprisePolicyName, privateEndpointConnectionName, parameters, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Approve or reject a private endpoint connection with a given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName EnterprisePolicy for the Microsoft Azure subscription.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @param parameters Parameters supplied to create or update a private endpoint connection.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 private endpoint connection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public PrivateEndpointConnectionInner createOrUpdate(
+ String resourceGroupName,
+ String enterprisePolicyName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner parameters) {
+ return createOrUpdateAsync(resourceGroupName, enterprisePolicyName, privateEndpointConnectionName, parameters)
+ .block();
+ }
+
+ /**
+ * Approve or reject a private endpoint connection with a given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName EnterprisePolicy for the Microsoft Azure subscription.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @param parameters Parameters supplied to create or update a private endpoint connection.
+ * @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 private endpoint connection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public PrivateEndpointConnectionInner createOrUpdate(
+ String resourceGroupName,
+ String enterprisePolicyName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner parameters,
+ Context context) {
+ return createOrUpdateAsync(
+ resourceGroupName, enterprisePolicyName, privateEndpointConnectionName, parameters, context)
+ .block();
+ }
+
+ /**
+ * Deletes a private endpoint connection with a given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName EnterprisePolicy for the Microsoft Azure subscription.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 enterprisePolicyName, String privateEndpointConnectionName) {
+ 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 (enterprisePolicyName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter enterprisePolicyName is required and cannot be null."));
+ }
+ if (privateEndpointConnectionName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter privateEndpointConnectionName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ this.client.getApiVersion(),
+ enterprisePolicyName,
+ privateEndpointConnectionName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Deletes a private endpoint connection with a given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName EnterprisePolicy for the Microsoft Azure subscription.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @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 enterprisePolicyName, String privateEndpointConnectionName, 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 (enterprisePolicyName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter enterprisePolicyName is required and cannot be null."));
+ }
+ if (privateEndpointConnectionName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter privateEndpointConnectionName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ this.client.getApiVersion(),
+ enterprisePolicyName,
+ privateEndpointConnectionName,
+ accept,
+ context);
+ }
+
+ /**
+ * Deletes a private endpoint connection with a given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName EnterprisePolicy for the Microsoft Azure subscription.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 enterprisePolicyName, String privateEndpointConnectionName) {
+ Mono>> mono =
+ deleteWithResponseAsync(resourceGroupName, enterprisePolicyName, privateEndpointConnectionName);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
+ }
+
+ /**
+ * Deletes a private endpoint connection with a given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName EnterprisePolicy for the Microsoft Azure subscription.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @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 enterprisePolicyName, String privateEndpointConnectionName, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ deleteWithResponseAsync(resourceGroupName, enterprisePolicyName, privateEndpointConnectionName, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * Deletes a private endpoint connection with a given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName EnterprisePolicy for the Microsoft Azure subscription.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 enterprisePolicyName, String privateEndpointConnectionName) {
+ return beginDeleteAsync(resourceGroupName, enterprisePolicyName, privateEndpointConnectionName).getSyncPoller();
+ }
+
+ /**
+ * Deletes a private endpoint connection with a given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName EnterprisePolicy for the Microsoft Azure subscription.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @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 enterprisePolicyName, String privateEndpointConnectionName, Context context) {
+ return beginDeleteAsync(resourceGroupName, enterprisePolicyName, privateEndpointConnectionName, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * Deletes a private endpoint connection with a given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName EnterprisePolicy for the Microsoft Azure subscription.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 enterprisePolicyName, String privateEndpointConnectionName) {
+ return beginDeleteAsync(resourceGroupName, enterprisePolicyName, privateEndpointConnectionName)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Deletes a private endpoint connection with a given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName EnterprisePolicy for the Microsoft Azure subscription.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @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 enterprisePolicyName, String privateEndpointConnectionName, Context context) {
+ return beginDeleteAsync(resourceGroupName, enterprisePolicyName, privateEndpointConnectionName, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Deletes a private endpoint connection with a given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName EnterprisePolicy for the Microsoft Azure subscription.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 enterprisePolicyName, String privateEndpointConnectionName) {
+ deleteAsync(resourceGroupName, enterprisePolicyName, privateEndpointConnectionName).block();
+ }
+
+ /**
+ * Deletes a private endpoint connection with a given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param enterprisePolicyName EnterprisePolicy for the Microsoft Azure subscription.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @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 enterprisePolicyName, String privateEndpointConnectionName, Context context) {
+ deleteAsync(resourceGroupName, enterprisePolicyName, privateEndpointConnectionName, context).block();
+ }
+}
diff --git a/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/PrivateEndpointConnectionsImpl.java b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/PrivateEndpointConnectionsImpl.java
new file mode 100644
index 000000000000..23a065fe32ac
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/PrivateEndpointConnectionsImpl.java
@@ -0,0 +1,219 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.powerplatform.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.powerplatform.fluent.PrivateEndpointConnectionsClient;
+import com.azure.resourcemanager.powerplatform.fluent.models.PrivateEndpointConnectionInner;
+import com.azure.resourcemanager.powerplatform.models.PrivateEndpointConnection;
+import com.azure.resourcemanager.powerplatform.models.PrivateEndpointConnections;
+
+public final class PrivateEndpointConnectionsImpl implements PrivateEndpointConnections {
+ private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionsImpl.class);
+
+ private final PrivateEndpointConnectionsClient innerClient;
+
+ private final com.azure.resourcemanager.powerplatform.PowerPlatformManager serviceManager;
+
+ public PrivateEndpointConnectionsImpl(
+ PrivateEndpointConnectionsClient innerClient,
+ com.azure.resourcemanager.powerplatform.PowerPlatformManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable listByEnterprisePolicy(
+ String resourceGroupName, String enterprisePolicyName) {
+ PagedIterable inner =
+ this.serviceClient().listByEnterprisePolicy(resourceGroupName, enterprisePolicyName);
+ return Utils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByEnterprisePolicy(
+ String resourceGroupName, String enterprisePolicyName, Context context) {
+ PagedIterable inner =
+ this.serviceClient().listByEnterprisePolicy(resourceGroupName, enterprisePolicyName, context);
+ return Utils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager()));
+ }
+
+ public PrivateEndpointConnection get(
+ String resourceGroupName, String enterprisePolicyName, String privateEndpointConnectionName) {
+ PrivateEndpointConnectionInner inner =
+ this.serviceClient().get(resourceGroupName, enterprisePolicyName, privateEndpointConnectionName);
+ if (inner != null) {
+ return new PrivateEndpointConnectionImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getWithResponse(
+ String resourceGroupName, String enterprisePolicyName, String privateEndpointConnectionName, Context context) {
+ Response inner =
+ this
+ .serviceClient()
+ .getWithResponse(resourceGroupName, enterprisePolicyName, privateEndpointConnectionName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new PrivateEndpointConnectionImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public void delete(String resourceGroupName, String enterprisePolicyName, String privateEndpointConnectionName) {
+ this.serviceClient().delete(resourceGroupName, enterprisePolicyName, privateEndpointConnectionName);
+ }
+
+ public void delete(
+ String resourceGroupName, String enterprisePolicyName, String privateEndpointConnectionName, Context context) {
+ this.serviceClient().delete(resourceGroupName, enterprisePolicyName, privateEndpointConnectionName, context);
+ }
+
+ public PrivateEndpointConnection 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 enterprisePolicyName = Utils.getValueFromIdByName(id, "enterprisePolicies");
+ if (enterprisePolicyName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'enterprisePolicies'.", id)));
+ }
+ String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections");
+ if (privateEndpointConnectionName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.",
+ id)));
+ }
+ return this
+ .getWithResponse(resourceGroupName, enterprisePolicyName, privateEndpointConnectionName, 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 enterprisePolicyName = Utils.getValueFromIdByName(id, "enterprisePolicies");
+ if (enterprisePolicyName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'enterprisePolicies'.", id)));
+ }
+ String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections");
+ if (privateEndpointConnectionName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.",
+ id)));
+ }
+ return this.getWithResponse(resourceGroupName, enterprisePolicyName, privateEndpointConnectionName, 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 enterprisePolicyName = Utils.getValueFromIdByName(id, "enterprisePolicies");
+ if (enterprisePolicyName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'enterprisePolicies'.", id)));
+ }
+ String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections");
+ if (privateEndpointConnectionName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.",
+ id)));
+ }
+ this.delete(resourceGroupName, enterprisePolicyName, privateEndpointConnectionName, Context.NONE);
+ }
+
+ public void deleteByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String enterprisePolicyName = Utils.getValueFromIdByName(id, "enterprisePolicies");
+ if (enterprisePolicyName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'enterprisePolicies'.", id)));
+ }
+ String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections");
+ if (privateEndpointConnectionName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.",
+ id)));
+ }
+ this.delete(resourceGroupName, enterprisePolicyName, privateEndpointConnectionName, context);
+ }
+
+ private PrivateEndpointConnectionsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.powerplatform.PowerPlatformManager manager() {
+ return this.serviceManager;
+ }
+
+ public PrivateEndpointConnectionImpl define(String name) {
+ return new PrivateEndpointConnectionImpl(name, this.manager());
+ }
+}
diff --git a/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/PrivateLinkResourceImpl.java b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/PrivateLinkResourceImpl.java
new file mode 100644
index 000000000000..6f3ac043aacf
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/PrivateLinkResourceImpl.java
@@ -0,0 +1,65 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.powerplatform.implementation;
+
+import com.azure.resourcemanager.powerplatform.fluent.models.PrivateLinkResourceInner;
+import com.azure.resourcemanager.powerplatform.models.PrivateLinkResource;
+import java.util.Collections;
+import java.util.List;
+
+public final class PrivateLinkResourceImpl implements PrivateLinkResource {
+ private PrivateLinkResourceInner innerObject;
+
+ private final com.azure.resourcemanager.powerplatform.PowerPlatformManager serviceManager;
+
+ PrivateLinkResourceImpl(
+ PrivateLinkResourceInner innerObject,
+ com.azure.resourcemanager.powerplatform.PowerPlatformManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public String groupId() {
+ return this.innerModel().groupId();
+ }
+
+ public List requiredMembers() {
+ List inner = this.innerModel().requiredMembers();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public List requiredZoneNames() {
+ List inner = this.innerModel().requiredZoneNames();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public PrivateLinkResourceInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.powerplatform.PowerPlatformManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/PrivateLinkResourcesClientImpl.java b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/PrivateLinkResourcesClientImpl.java
new file mode 100644
index 000000000000..c3207e4057f4
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/PrivateLinkResourcesClientImpl.java
@@ -0,0 +1,429 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.powerplatform.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.powerplatform.fluent.PrivateLinkResourcesClient;
+import com.azure.resourcemanager.powerplatform.fluent.models.PrivateLinkResourceInner;
+import com.azure.resourcemanager.powerplatform.models.PrivateLinkResourceListResult;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. */
+public final class PrivateLinkResourcesClientImpl implements PrivateLinkResourcesClient {
+ /** The proxy service used to perform REST calls. */
+ private final PrivateLinkResourcesService service;
+
+ /** The service client containing this operation class. */
+ private final PowerPlatformImpl client;
+
+ /**
+ * Initializes an instance of PrivateLinkResourcesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ PrivateLinkResourcesClientImpl(PowerPlatformImpl client) {
+ this.service =
+ RestProxy
+ .create(PrivateLinkResourcesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for PowerPlatformPrivateLinkResources to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "PowerPlatformPrivate")
+ private interface PrivateLinkResourcesService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerPlatform"
+ + "/enterprisePolicies/{enterprisePolicyName}/privateLinkResources")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono