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.");
+
+ String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion");
+
+ StringBuilder userAgentBuilder = new StringBuilder();
+ userAgentBuilder.append("azsdk-java")
+ .append("-")
+ .append("com.azure.resourcemanager.powerplatform")
+ .append("/")
+ .append(clientVersion);
+ 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 BearerTokenAuthenticationPolicy(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;
+ }
+
+ /**
+ * Gets wrapped service client PowerPlatform providing direct access to the underlying auto-generated API
+ * implementation, based on Azure REST API.
+ *
+ * @return Wrapped service client PowerPlatform.
+ */
+ 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..4e36e6e468f2
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/AccountsClient.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.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.
+ * @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);
+
+ /**
+ * 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);
+
+ /**
+ * 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);
+
+ /**
+ * 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);
+
+ /**
+ * 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);
+
+ /**
+ * 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);
+
+ /**
+ * 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);
+
+ /**
+ * 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);
+
+ /**
+ * 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..9e627f3166b1
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/EnterprisePoliciesClient.java
@@ -0,0 +1,181 @@
+// 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.
+ * @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);
+
+ /**
+ * 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);
+
+ /**
+ * 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);
+
+ /**
+ * 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);
+
+ /**
+ * 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);
+
+ /**
+ * 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);
+
+ /**
+ * 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);
+
+ /**
+ * 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);
+
+ /**
+ * 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..5da2e0d59180
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/OperationsClient.java
@@ -0,0 +1,40 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.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..a9ebc60ba960
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/PowerPlatform.java
@@ -0,0 +1,83 @@
+// 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..de0b35e8ee58
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/PrivateEndpointConnectionsClient.java
@@ -0,0 +1,140 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.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.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.
+ * @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);
+
+ /**
+ * 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);
+
+ /**
+ * 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 along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(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);
+
+ /**
+ * 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 Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteWithResponse(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);
+}
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..56e75b215afb
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/PrivateLinkResourcesClient.java
@@ -0,0 +1,78 @@
+// 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.
+ * @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);
+
+ /**
+ * 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);
+}
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..bdfebd3c6931
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/models/AccountInner.java
@@ -0,0 +1,212 @@
+// 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.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+import java.util.Map;
+
+/**
+ * Definition of the account.
+ */
+@Fluent
+public final class AccountInner extends Resource {
+ /*
+ * The properties that define configuration for the account.
+ */
+ private AccountProperties innerProperties;
+
+ /*
+ * Metadata pertaining to creation and last modification of the resource.
+ */
+ private SystemData systemData;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of AccountInner class.
+ */
+ public AccountInner() {
+ }
+
+ /**
+ * 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;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * {@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 systemId property: The internally assigned unique identifier of the resource.
+ *
+ * @return the systemId value.
+ */
+ public String systemId() {
+ return this.innerProperties() == null ? null : this.innerProperties().systemId();
+ }
+
+ /**
+ * 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();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("location", location());
+ jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element));
+ jsonWriter.writeJsonField("properties", this.innerProperties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of AccountInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of AccountInner if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the AccountInner.
+ */
+ public static AccountInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ AccountInner deserializedAccountInner = new AccountInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedAccountInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedAccountInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedAccountInner.type = reader.getString();
+ } else if ("location".equals(fieldName)) {
+ deserializedAccountInner.withLocation(reader.getString());
+ } else if ("tags".equals(fieldName)) {
+ Map tags = reader.readMap(reader1 -> reader1.getString());
+ deserializedAccountInner.withTags(tags);
+ } else if ("properties".equals(fieldName)) {
+ deserializedAccountInner.innerProperties = AccountProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedAccountInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedAccountInner;
+ });
+ }
+}
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..377d19d47653
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/models/AccountProperties.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.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * The properties that define configuration for the account.
+ */
+@Fluent
+public final class AccountProperties implements JsonSerializable {
+ /*
+ * The internally assigned unique identifier of the resource.
+ */
+ private String systemId;
+
+ /*
+ * The description of the account.
+ */
+ private String description;
+
+ /**
+ * Creates an instance of AccountProperties class.
+ */
+ public AccountProperties() {
+ }
+
+ /**
+ * Get the systemId property: The internally assigned unique identifier of the resource.
+ *
+ * @return the systemId value.
+ */
+ public String systemId() {
+ return this.systemId;
+ }
+
+ /**
+ * 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() {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("description", this.description);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of AccountProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of AccountProperties if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IOException If an error occurs while reading the AccountProperties.
+ */
+ public static AccountProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ AccountProperties deserializedAccountProperties = new AccountProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("systemId".equals(fieldName)) {
+ deserializedAccountProperties.systemId = reader.getString();
+ } else if ("description".equals(fieldName)) {
+ deserializedAccountProperties.description = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedAccountProperties;
+ });
+ }
+}
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..168017ca5361
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/models/EnterprisePolicyInner.java
@@ -0,0 +1,353 @@
+// 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.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.powerplatform.models.EnterprisePolicyIdentity;
+import com.azure.resourcemanager.powerplatform.models.EnterprisePolicyKind;
+import com.azure.resourcemanager.powerplatform.models.HealthStatus;
+import com.azure.resourcemanager.powerplatform.models.PropertiesEncryption;
+import com.azure.resourcemanager.powerplatform.models.PropertiesLockbox;
+import com.azure.resourcemanager.powerplatform.models.PropertiesNetworkInjection;
+import java.io.IOException;
+import java.util.Map;
+
+/**
+ * Definition of the EnterprisePolicy.
+ */
+@Fluent
+public final class EnterprisePolicyInner extends Resource {
+ /*
+ * The identity of the EnterprisePolicy.
+ */
+ private EnterprisePolicyIdentity identity;
+
+ /*
+ * The kind (type) of Enterprise Policy.
+ */
+ private EnterprisePolicyKind kind;
+
+ /*
+ * The properties that define configuration for the enterprise policy
+ */
+ private Properties innerProperties;
+
+ /*
+ * Metadata pertaining to creation and last modification of the resource.
+ */
+ private SystemData systemData;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of EnterprisePolicyInner class.
+ */
+ public EnterprisePolicyInner() {
+ }
+
+ /**
+ * 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;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * {@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 systemId property: The internally assigned unique identifier of the resource.
+ *
+ * @return the systemId value.
+ */
+ public String systemId() {
+ return this.innerProperties() == null ? null : this.innerProperties().systemId();
+ }
+
+ /**
+ * 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;
+ }
+
+ /**
+ * Get the healthStatus property: The health status of the resource.
+ *
+ * @return the healthStatus value.
+ */
+ public HealthStatus healthStatus() {
+ return this.innerProperties() == null ? null : this.innerProperties().healthStatus();
+ }
+
+ /**
+ * Set the healthStatus property: The health status of the resource.
+ *
+ * @param healthStatus the healthStatus value to set.
+ * @return the EnterprisePolicyInner object itself.
+ */
+ public EnterprisePolicyInner withHealthStatus(HealthStatus healthStatus) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new Properties();
+ }
+ this.innerProperties().withHealthStatus(healthStatus);
+ 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.atError()
+ .log(new IllegalArgumentException("Missing required property kind in model EnterprisePolicyInner"));
+ }
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(EnterprisePolicyInner.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("location", location());
+ jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element));
+ jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString());
+ jsonWriter.writeJsonField("identity", this.identity);
+ jsonWriter.writeJsonField("properties", this.innerProperties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of EnterprisePolicyInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of EnterprisePolicyInner if the JsonReader was pointing to an instance of it, or null if it
+ * was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the EnterprisePolicyInner.
+ */
+ public static EnterprisePolicyInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ EnterprisePolicyInner deserializedEnterprisePolicyInner = new EnterprisePolicyInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedEnterprisePolicyInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedEnterprisePolicyInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedEnterprisePolicyInner.type = reader.getString();
+ } else if ("location".equals(fieldName)) {
+ deserializedEnterprisePolicyInner.withLocation(reader.getString());
+ } else if ("tags".equals(fieldName)) {
+ Map tags = reader.readMap(reader1 -> reader1.getString());
+ deserializedEnterprisePolicyInner.withTags(tags);
+ } else if ("kind".equals(fieldName)) {
+ deserializedEnterprisePolicyInner.kind = EnterprisePolicyKind.fromString(reader.getString());
+ } else if ("identity".equals(fieldName)) {
+ deserializedEnterprisePolicyInner.identity = EnterprisePolicyIdentity.fromJson(reader);
+ } else if ("properties".equals(fieldName)) {
+ deserializedEnterprisePolicyInner.innerProperties = Properties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedEnterprisePolicyInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedEnterprisePolicyInner;
+ });
+ }
+}
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..b722a4628365
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/models/OperationInner.java
@@ -0,0 +1,172 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.powerplatform.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.powerplatform.models.ActionType;
+import com.azure.resourcemanager.powerplatform.models.OperationDisplay;
+import com.azure.resourcemanager.powerplatform.models.Origin;
+import java.io.IOException;
+
+/**
+ * REST API Operation
+ *
+ * Details of a REST API operation, returned from the Resource Provider Operations API.
+ */
+@Fluent
+public final class OperationInner implements JsonSerializable {
+ /*
+ * The name of the operation, as per Resource-Based Access Control (RBAC). Examples:
+ * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action"
+ */
+ private String name;
+
+ /*
+ * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for
+ * ARM/control-plane operations.
+ */
+ private Boolean isDataAction;
+
+ /*
+ * Localized display information for this particular operation.
+ */
+ private OperationDisplay display;
+
+ /*
+ * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default
+ * value is "user,system"
+ */
+ private Origin origin;
+
+ /*
+ * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
+ */
+ private ActionType actionType;
+
+ /**
+ * Creates an instance of OperationInner class.
+ */
+ public OperationInner() {
+ }
+
+ /**
+ * Get the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples:
+ * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action".
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane
+ * operations and "false" for ARM/control-plane operations.
+ *
+ * @return the isDataAction value.
+ */
+ public Boolean isDataAction() {
+ return this.isDataAction;
+ }
+
+ /**
+ * Get the display property: Localized display information for this particular operation.
+ *
+ * @return the display value.
+ */
+ public OperationDisplay display() {
+ return this.display;
+ }
+
+ /**
+ * Set the display property: Localized display information for this particular operation.
+ *
+ * @param display the display value to set.
+ * @return the OperationInner object itself.
+ */
+ public OperationInner withDisplay(OperationDisplay display) {
+ this.display = display;
+ return this;
+ }
+
+ /**
+ * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and
+ * audit logs UX. Default value is "user,system".
+ *
+ * @return the origin value.
+ */
+ public Origin origin() {
+ return this.origin;
+ }
+
+ /**
+ * Get the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal
+ * only APIs.
+ *
+ * @return the actionType value.
+ */
+ public ActionType actionType() {
+ return this.actionType;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (display() != null) {
+ display().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("display", this.display);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of OperationInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of OperationInner if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IOException If an error occurs while reading the OperationInner.
+ */
+ public static OperationInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ OperationInner deserializedOperationInner = new OperationInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("name".equals(fieldName)) {
+ deserializedOperationInner.name = reader.getString();
+ } else if ("isDataAction".equals(fieldName)) {
+ deserializedOperationInner.isDataAction = reader.getNullable(JsonReader::getBoolean);
+ } else if ("display".equals(fieldName)) {
+ deserializedOperationInner.display = OperationDisplay.fromJson(reader);
+ } else if ("origin".equals(fieldName)) {
+ deserializedOperationInner.origin = Origin.fromString(reader.getString());
+ } else if ("actionType".equals(fieldName)) {
+ deserializedOperationInner.actionType = ActionType.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedOperationInner;
+ });
+ }
+}
diff --git a/sdk/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..884f1f3e80ca
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/models/PrivateEndpointConnectionInner.java
@@ -0,0 +1,217 @@
+// 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.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.powerplatform.models.PrivateEndpoint;
+import com.azure.resourcemanager.powerplatform.models.PrivateEndpointConnectionProvisioningState;
+import com.azure.resourcemanager.powerplatform.models.PrivateLinkServiceConnectionState;
+import java.io.IOException;
+
+/**
+ * A private endpoint connection.
+ */
+@Fluent
+public final class PrivateEndpointConnectionInner extends ProxyResource {
+ /*
+ * Resource properties.
+ */
+ private PrivateEndpointConnectionProperties innerProperties;
+
+ /*
+ * Metadata pertaining to creation and last modification of the resource.
+ */
+ private SystemData systemData;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of PrivateEndpointConnectionInner class.
+ */
+ public PrivateEndpointConnectionInner() {
+ }
+
+ /**
+ * 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 type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * 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();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.innerProperties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of PrivateEndpointConnectionInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of PrivateEndpointConnectionInner if the JsonReader was pointing to an instance of it, or
+ * null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the PrivateEndpointConnectionInner.
+ */
+ public static PrivateEndpointConnectionInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ PrivateEndpointConnectionInner deserializedPrivateEndpointConnectionInner
+ = new PrivateEndpointConnectionInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedPrivateEndpointConnectionInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedPrivateEndpointConnectionInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedPrivateEndpointConnectionInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedPrivateEndpointConnectionInner.innerProperties
+ = PrivateEndpointConnectionProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedPrivateEndpointConnectionInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedPrivateEndpointConnectionInner;
+ });
+ }
+}
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..403fcf005477
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/models/PrivateEndpointConnectionProperties.java
@@ -0,0 +1,161 @@
+// 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.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.powerplatform.models.PrivateEndpoint;
+import com.azure.resourcemanager.powerplatform.models.PrivateEndpointConnectionProvisioningState;
+import com.azure.resourcemanager.powerplatform.models.PrivateLinkServiceConnectionState;
+import java.io.IOException;
+
+/**
+ * Properties of the PrivateEndpointConnectProperties.
+ */
+@Fluent
+public final class PrivateEndpointConnectionProperties
+ implements JsonSerializable {
+ /*
+ * The resource of private end point.
+ */
+ private PrivateEndpoint privateEndpoint;
+
+ /*
+ * A collection of information about the state of the connection between service consumer and provider.
+ */
+ private PrivateLinkServiceConnectionState privateLinkServiceConnectionState;
+
+ /*
+ * The provisioning state of the private endpoint connection resource.
+ */
+ private PrivateEndpointConnectionProvisioningState provisioningState;
+
+ /**
+ * Creates an instance of PrivateEndpointConnectionProperties class.
+ */
+ public PrivateEndpointConnectionProperties() {
+ }
+
+ /**
+ * 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.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property privateLinkServiceConnectionState in model PrivateEndpointConnectionProperties"));
+ } else {
+ privateLinkServiceConnectionState().validate();
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionProperties.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("privateLinkServiceConnectionState", this.privateLinkServiceConnectionState);
+ jsonWriter.writeJsonField("privateEndpoint", this.privateEndpoint);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of PrivateEndpointConnectionProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of PrivateEndpointConnectionProperties if the JsonReader was pointing to an instance of it,
+ * or null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the PrivateEndpointConnectionProperties.
+ */
+ public static PrivateEndpointConnectionProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ PrivateEndpointConnectionProperties deserializedPrivateEndpointConnectionProperties
+ = new PrivateEndpointConnectionProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("privateLinkServiceConnectionState".equals(fieldName)) {
+ deserializedPrivateEndpointConnectionProperties.privateLinkServiceConnectionState
+ = PrivateLinkServiceConnectionState.fromJson(reader);
+ } else if ("privateEndpoint".equals(fieldName)) {
+ deserializedPrivateEndpointConnectionProperties.privateEndpoint = PrivateEndpoint.fromJson(reader);
+ } else if ("provisioningState".equals(fieldName)) {
+ deserializedPrivateEndpointConnectionProperties.provisioningState
+ = PrivateEndpointConnectionProvisioningState.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedPrivateEndpointConnectionProperties;
+ });
+ }
+}
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..831fbf57ba13
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/models/PrivateLinkResourceInner.java
@@ -0,0 +1,180 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.powerplatform.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * A private link resource.
+ */
+@Fluent
+public final class PrivateLinkResourceInner extends ProxyResource {
+ /*
+ * Resource properties.
+ */
+ private PrivateLinkResourceProperties innerProperties;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of PrivateLinkResourceInner class.
+ */
+ public PrivateLinkResourceInner() {
+ }
+
+ /**
+ * Get the innerProperties property: Resource properties.
+ *
+ * @return the innerProperties value.
+ */
+ private PrivateLinkResourceProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * 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();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.innerProperties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of PrivateLinkResourceInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of PrivateLinkResourceInner if the JsonReader was pointing to an instance of it, or null if
+ * it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the PrivateLinkResourceInner.
+ */
+ public static PrivateLinkResourceInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ PrivateLinkResourceInner deserializedPrivateLinkResourceInner = new PrivateLinkResourceInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedPrivateLinkResourceInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedPrivateLinkResourceInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedPrivateLinkResourceInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedPrivateLinkResourceInner.innerProperties
+ = PrivateLinkResourceProperties.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedPrivateLinkResourceInner;
+ });
+ }
+}
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..2a0d0b480fa4
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/models/PrivateLinkResourceProperties.java
@@ -0,0 +1,130 @@
+// 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.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * Properties of a private link resource.
+ */
+@Fluent
+public final class PrivateLinkResourceProperties implements JsonSerializable {
+ /*
+ * The private link resource group id.
+ */
+ private String groupId;
+
+ /*
+ * The private link resource required member names.
+ */
+ private List requiredMembers;
+
+ /*
+ * The private link resource Private link DNS zone name.
+ */
+ private List requiredZoneNames;
+
+ /**
+ * Creates an instance of PrivateLinkResourceProperties class.
+ */
+ public PrivateLinkResourceProperties() {
+ }
+
+ /**
+ * 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() {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeArrayField("requiredZoneNames", this.requiredZoneNames,
+ (writer, element) -> writer.writeString(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of PrivateLinkResourceProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of PrivateLinkResourceProperties if the JsonReader was pointing to an instance of it, or null
+ * if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the PrivateLinkResourceProperties.
+ */
+ public static PrivateLinkResourceProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ PrivateLinkResourceProperties deserializedPrivateLinkResourceProperties
+ = new PrivateLinkResourceProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("groupId".equals(fieldName)) {
+ deserializedPrivateLinkResourceProperties.groupId = reader.getString();
+ } else if ("requiredMembers".equals(fieldName)) {
+ List requiredMembers = reader.readArray(reader1 -> reader1.getString());
+ deserializedPrivateLinkResourceProperties.requiredMembers = requiredMembers;
+ } else if ("requiredZoneNames".equals(fieldName)) {
+ List requiredZoneNames = reader.readArray(reader1 -> reader1.getString());
+ deserializedPrivateLinkResourceProperties.requiredZoneNames = requiredZoneNames;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedPrivateLinkResourceProperties;
+ });
+ }
+}
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..d104bd22bdd0
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/models/Properties.java
@@ -0,0 +1,206 @@
+// 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.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.powerplatform.models.HealthStatus;
+import com.azure.resourcemanager.powerplatform.models.PropertiesEncryption;
+import com.azure.resourcemanager.powerplatform.models.PropertiesLockbox;
+import com.azure.resourcemanager.powerplatform.models.PropertiesNetworkInjection;
+import java.io.IOException;
+
+/**
+ * The properties that define configuration for the enterprise policy.
+ */
+@Fluent
+public final class Properties implements JsonSerializable {
+ /*
+ * The internally assigned unique identifier of the resource.
+ */
+ private String systemId;
+
+ /*
+ * Settings concerning lockbox.
+ */
+ private PropertiesLockbox lockbox;
+
+ /*
+ * The encryption settings for a configuration store.
+ */
+ private PropertiesEncryption encryption;
+
+ /*
+ * Settings concerning network injection.
+ */
+ private PropertiesNetworkInjection networkInjection;
+
+ /*
+ * The health status of the resource.
+ */
+ private HealthStatus healthStatus;
+
+ /**
+ * Creates an instance of Properties class.
+ */
+ public Properties() {
+ }
+
+ /**
+ * Get the systemId property: The internally assigned unique identifier of the resource.
+ *
+ * @return the systemId value.
+ */
+ public String systemId() {
+ return this.systemId;
+ }
+
+ /**
+ * 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;
+ }
+
+ /**
+ * Get the healthStatus property: The health status of the resource.
+ *
+ * @return the healthStatus value.
+ */
+ public HealthStatus healthStatus() {
+ return this.healthStatus;
+ }
+
+ /**
+ * Set the healthStatus property: The health status of the resource.
+ *
+ * @param healthStatus the healthStatus value to set.
+ * @return the Properties object itself.
+ */
+ public Properties withHealthStatus(HealthStatus healthStatus) {
+ this.healthStatus = healthStatus;
+ 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();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("lockbox", this.lockbox);
+ jsonWriter.writeJsonField("encryption", this.encryption);
+ jsonWriter.writeJsonField("networkInjection", this.networkInjection);
+ jsonWriter.writeStringField("healthStatus", this.healthStatus == null ? null : this.healthStatus.toString());
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of Properties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of Properties if the JsonReader was pointing to an instance of it, or null if it was pointing
+ * to JSON null.
+ * @throws IOException If an error occurs while reading the Properties.
+ */
+ public static Properties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ Properties deserializedProperties = new Properties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("systemId".equals(fieldName)) {
+ deserializedProperties.systemId = reader.getString();
+ } else if ("lockbox".equals(fieldName)) {
+ deserializedProperties.lockbox = PropertiesLockbox.fromJson(reader);
+ } else if ("encryption".equals(fieldName)) {
+ deserializedProperties.encryption = PropertiesEncryption.fromJson(reader);
+ } else if ("networkInjection".equals(fieldName)) {
+ deserializedProperties.networkInjection = PropertiesNetworkInjection.fromJson(reader);
+ } else if ("healthStatus".equals(fieldName)) {
+ deserializedProperties.healthStatus = HealthStatus.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedProperties;
+ });
+ }
+}
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..e2fef90848aa
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/models/package-info.java
@@ -0,0 +1,9 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/**
+ * Package containing the inner data models for 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..8ade80627212
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/fluent/package-info.java
@@ -0,0 +1,9 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/**
+ * Package containing the service clients for 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..9b9bc44bda7e
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/AccountImpl.java
@@ -0,0 +1,188 @@
+// 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 systemId() {
+ return this.innerModel().systemId();
+ }
+
+ 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 = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "accounts");
+ this.resourceGroupName = ResourceManagerUtils.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..78428129320d
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/AccountsClientImpl.java
@@ -0,0 +1,989 @@
+// 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")
+ public 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.
+ * @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();
+ }
+
+ /**
+ * 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 createOrUpdateWithResponse(accountName, resourceGroupName, parameters, Context.NONE).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 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.
+ * @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();
+ }
+
+ /**
+ * 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 getByResourceGroupWithResponse(resourceGroupName, accountName, Context.NONE).getValue();
+ }
+
+ /**
+ * 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.
+ * @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();
+ }
+
+ /**
+ * 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) {
+ deleteWithResponse(resourceGroupName, accountName, Context.NONE);
+ }
+
+ /**
+ * 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.
+ * @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();
+ }
+
+ /**
+ * 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 updateWithResponse(accountName, resourceGroupName, parameters, Context.NONE).getValue();
+ }
+
+ /**
+ * 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 URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of 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 URL to get the next list of items.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of 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 URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of 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 URL to get the next list of items.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of 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..d963bcb482fb
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/AccountsImpl.java
@@ -0,0 +1,147 @@
+// 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 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 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 deleteByResourceGroupWithResponse(String resourceGroupName, String accountName,
+ Context context) {
+ return this.serviceClient().deleteWithResponse(resourceGroupName, accountName, context);
+ }
+
+ public void deleteByResourceGroup(String resourceGroupName, String accountName) {
+ this.serviceClient().delete(resourceGroupName, accountName);
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new AccountImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new AccountImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new AccountImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(Context context) {
+ PagedIterable inner = this.serviceClient().list(context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new AccountImpl(inner1, this.manager()));
+ }
+
+ public Account getById(String id) {
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String accountName = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String accountName = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String accountName = ResourceManagerUtils.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.deleteByResourceGroupWithResponse(resourceGroupName, accountName, Context.NONE);
+ }
+
+ public Response deleteByIdWithResponse(String id, Context context) {
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String accountName = ResourceManagerUtils.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.deleteByResourceGroupWithResponse(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..dc1d802c5552
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/EnterprisePoliciesClientImpl.java
@@ -0,0 +1,1009 @@
+// 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")
+ public 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.
+ * @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();
+ }
+
+ /**
+ * 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 createOrUpdateWithResponse(enterprisePolicyName, resourceGroupName, parameters, Context.NONE).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 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.
+ * @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();
+ }
+
+ /**
+ * 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 getByResourceGroupWithResponse(resourceGroupName, enterprisePolicyName, Context.NONE).getValue();
+ }
+
+ /**
+ * 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.
+ * @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();
+ }
+
+ /**
+ * 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) {
+ deleteWithResponse(resourceGroupName, enterprisePolicyName, Context.NONE);
+ }
+
+ /**
+ * 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.
+ * @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();
+ }
+
+ /**
+ * 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 updateWithResponse(enterprisePolicyName, resourceGroupName, parameters, Context.NONE).getValue();
+ }
+
+ /**
+ * 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 URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of 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 URL to get the next list of items.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of 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 URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of 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 URL to get the next list of items.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of 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..84f35cc8f783
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/EnterprisePoliciesImpl.java
@@ -0,0 +1,148 @@
+// 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 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 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 deleteByResourceGroupWithResponse(String resourceGroupName, String enterprisePolicyName,
+ Context context) {
+ return this.serviceClient().deleteWithResponse(resourceGroupName, enterprisePolicyName, context);
+ }
+
+ public void deleteByResourceGroup(String resourceGroupName, String enterprisePolicyName) {
+ this.serviceClient().delete(resourceGroupName, enterprisePolicyName);
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new EnterprisePolicyImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ PagedIterable inner
+ = this.serviceClient().listByResourceGroup(resourceGroupName, context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new EnterprisePolicyImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new EnterprisePolicyImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(Context context) {
+ PagedIterable inner = this.serviceClient().list(context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new EnterprisePolicyImpl(inner1, this.manager()));
+ }
+
+ public EnterprisePolicy getById(String id) {
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String enterprisePolicyName = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String enterprisePolicyName = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String enterprisePolicyName = ResourceManagerUtils.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.deleteByResourceGroupWithResponse(resourceGroupName, enterprisePolicyName, Context.NONE);
+ }
+
+ public Response deleteByIdWithResponse(String id, Context context) {
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String enterprisePolicyName = ResourceManagerUtils.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.deleteByResourceGroupWithResponse(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..66d1c03b648d
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/EnterprisePolicyImpl.java
@@ -0,0 +1,266 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.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.HealthStatus;
+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 String systemId() {
+ return this.innerModel().systemId();
+ }
+
+ public PropertiesLockbox lockbox() {
+ return this.innerModel().lockbox();
+ }
+
+ public PropertiesEncryption encryption() {
+ return this.innerModel().encryption();
+ }
+
+ public PropertiesNetworkInjection networkInjection() {
+ return this.innerModel().networkInjection();
+ }
+
+ public HealthStatus healthStatus() {
+ return this.innerModel().healthStatus();
+ }
+
+ 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 = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "enterprisePolicies");
+ this.resourceGroupName = ResourceManagerUtils.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;
+ }
+ }
+
+ public EnterprisePolicyImpl withHealthStatus(HealthStatus healthStatus) {
+ if (isInCreateMode()) {
+ this.innerModel().withHealthStatus(healthStatus);
+ return this;
+ } else {
+ this.updateParameters.withHealthStatus(healthStatus);
+ 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..5831db858b20
--- /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..877a02ed4a1c
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/OperationsClientImpl.java
@@ -0,0 +1,235 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.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")
+ public 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 URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
+ res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.listNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+}
diff --git a/sdk/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..3d73ca8198d9
--- /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 ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(Context context) {
+ PagedIterable inner = this.serviceClient().list(context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager()));
+ }
+
+ private OperationsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.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..3b53235377ed
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/PowerPlatformBuilder.java
@@ -0,0 +1,138 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.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() {
+ String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com";
+ AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE;
+ HttpPipeline localPipeline = (pipeline != null)
+ ? pipeline
+ : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build();
+ Duration localDefaultPollInterval
+ = (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30);
+ SerializerAdapter localSerializerAdapter = (serializerAdapter != null)
+ ? serializerAdapter
+ : SerializerFactory.createDefaultManagementSerializerAdapter();
+ PowerPlatformImpl client = new PowerPlatformImpl(localPipeline, localSerializerAdapter,
+ localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint);
+ 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..cc8ddb5864ce
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/PowerPlatformImpl.java
@@ -0,0 +1,352 @@
+// 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.HttpHeaderName;
+import com.azure.core.http.HttpHeaders;
+import com.azure.core.http.HttpPipeline;
+import com.azure.core.http.HttpResponse;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.AzureEnvironment;
+import com.azure.core.management.exception.ManagementError;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.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(HttpHeaderName.fromString(s));
+ }
+
+ public HttpHeaders getHeaders() {
+ return httpHeaders;
+ }
+
+ public Flux getBody() {
+ return Flux.just(ByteBuffer.wrap(responseBody));
+ }
+
+ public Mono getBodyAsByteArray() {
+ return Mono.just(responseBody);
+ }
+
+ public Mono getBodyAsString() {
+ return Mono.just(new String(responseBody, StandardCharsets.UTF_8));
+ }
+
+ public Mono getBodyAsString(Charset charset) {
+ return Mono.just(new String(responseBody, charset));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(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..d482464dd156
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/PrivateEndpointConnectionImpl.java
@@ -0,0 +1,157 @@
+// 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()
+ .createOrUpdateWithResponse(resourceGroupName, enterprisePolicyName, privateEndpointConnectionName,
+ this.innerModel(), Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public PrivateEndpointConnection create(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getPrivateEndpointConnections()
+ .createOrUpdateWithResponse(resourceGroupName, enterprisePolicyName, privateEndpointConnectionName,
+ this.innerModel(), context)
+ .getValue();
+ 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()
+ .createOrUpdateWithResponse(resourceGroupName, enterprisePolicyName, privateEndpointConnectionName,
+ this.innerModel(), Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public PrivateEndpointConnection apply(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getPrivateEndpointConnections()
+ .createOrUpdateWithResponse(resourceGroupName, enterprisePolicyName, privateEndpointConnectionName,
+ this.innerModel(), context)
+ .getValue();
+ return this;
+ }
+
+ PrivateEndpointConnectionImpl(PrivateEndpointConnectionInner innerObject,
+ com.azure.resourcemanager.powerplatform.PowerPlatformManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.enterprisePolicyName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "enterprisePolicies");
+ this.privateEndpointConnectionName
+ = ResourceManagerUtils.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..3d129343a1ad
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/PrivateEndpointConnectionsClientImpl.java
@@ -0,0 +1,688 @@
+// 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.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.resourcemanager.powerplatform.fluent.PrivateEndpointConnectionsClient;
+import com.azure.resourcemanager.powerplatform.fluent.models.PrivateEndpointConnectionInner;
+import com.azure.resourcemanager.powerplatform.models.PrivateEndpointConnectionListResult;
+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")
+ public 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 })
+ @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, 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.
+ * @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();
+ }
+
+ /**
+ * 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 getWithResponse(resourceGroupName, enterprisePolicyName, privateEndpointConnectionName, Context.NONE)
+ .getValue();
+ }
+
+ /**
+ * 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 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 createOrUpdateWithResponseAsync(resourceGroupName, enterprisePolicyName, privateEndpointConnectionName,
+ parameters).flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * 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}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response createOrUpdateWithResponse(String resourceGroupName,
+ String enterprisePolicyName, String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters,
+ Context context) {
+ return createOrUpdateWithResponseAsync(resourceGroupName, enterprisePolicyName, privateEndpointConnectionName,
+ parameters, 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public PrivateEndpointConnectionInner createOrUpdate(String resourceGroupName, String enterprisePolicyName,
+ String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters) {
+ return createOrUpdateWithResponse(resourceGroupName, enterprisePolicyName, privateEndpointConnectionName,
+ parameters, Context.NONE).getValue();
+ }
+
+ /**
+ * 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 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 deleteWithResponseAsync(resourceGroupName, enterprisePolicyName, privateEndpointConnectionName)
+ .flatMap(ignored -> Mono.empty());
+ }
+
+ /**
+ * 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}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response deleteWithResponse(String resourceGroupName, String enterprisePolicyName,
+ String privateEndpointConnectionName, Context context) {
+ return deleteWithResponseAsync(resourceGroupName, enterprisePolicyName, privateEndpointConnectionName, 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String enterprisePolicyName, String privateEndpointConnectionName) {
+ deleteWithResponse(resourceGroupName, enterprisePolicyName, privateEndpointConnectionName, Context.NONE);
+ }
+}
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..b51b02c5160c
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/PrivateEndpointConnectionsImpl.java
@@ -0,0 +1,170 @@
+// 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 ResourceManagerUtils.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 ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager()));
+ }
+
+ 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 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 deleteWithResponse(String resourceGroupName, String enterprisePolicyName,
+ String privateEndpointConnectionName, Context context) {
+ return this.serviceClient()
+ .deleteWithResponse(resourceGroupName, enterprisePolicyName, privateEndpointConnectionName, context);
+ }
+
+ public void delete(String resourceGroupName, String enterprisePolicyName, String privateEndpointConnectionName) {
+ this.serviceClient().delete(resourceGroupName, enterprisePolicyName, privateEndpointConnectionName);
+ }
+
+ public PrivateEndpointConnection getById(String id) {
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String enterprisePolicyName = ResourceManagerUtils.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
+ = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String enterprisePolicyName = ResourceManagerUtils.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
+ = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String enterprisePolicyName = ResourceManagerUtils.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
+ = ResourceManagerUtils.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.deleteWithResponse(resourceGroupName, enterprisePolicyName, privateEndpointConnectionName, Context.NONE);
+ }
+
+ public Response deleteByIdWithResponse(String id, Context context) {
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String enterprisePolicyName = ResourceManagerUtils.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
+ = ResourceManagerUtils.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.deleteWithResponse(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..87221c13f3da
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/PrivateLinkResourceImpl.java
@@ -0,0 +1,64 @@
+// 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..a03479074349
--- /dev/null
+++ b/sdk/powerplatform/azure-resourcemanager-powerplatform/src/main/java/com/azure/resourcemanager/powerplatform/implementation/PrivateLinkResourcesClientImpl.java
@@ -0,0 +1,371 @@
+// 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")
+ public interface PrivateLinkResourcesService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerPlatform/enterprisePolicies/{enterprisePolicyName}/privateLinkResources")
+ @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}/privateLinkResources/{groupName}")
+ @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("groupName") String groupName,
+ @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * 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 ManagementException 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 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()));
+ }
+
+ /**
+ * 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 ManagementException 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 along with {@link PagedResponse}
+ * on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono