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 Programmable Connectivity service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the Programmable Connectivity service API instance.
+ */
+ public ProgrammableConnectivityManager 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.programmableconnectivity")
+ .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 ProgrammableConnectivityManager(httpPipeline, profile, defaultPollInterval);
+ }
+ }
+
+ /**
+ * Gets the resource collection API of Operations.
+ *
+ * @return Resource collection API of Operations.
+ */
+ public Operations operations() {
+ if (this.operations == null) {
+ this.operations = new OperationsImpl(clientObject.getOperations(), this);
+ }
+ return operations;
+ }
+
+ /**
+ * Gets the resource collection API of Gateways. It manages Gateway.
+ *
+ * @return Resource collection API of Gateways.
+ */
+ public Gateways gateways() {
+ if (this.gateways == null) {
+ this.gateways = new GatewaysImpl(clientObject.getGateways(), this);
+ }
+ return gateways;
+ }
+
+ /**
+ * Gets the resource collection API of OperatorApiConnections. It manages OperatorApiConnection.
+ *
+ * @return Resource collection API of OperatorApiConnections.
+ */
+ public OperatorApiConnections operatorApiConnections() {
+ if (this.operatorApiConnections == null) {
+ this.operatorApiConnections
+ = new OperatorApiConnectionsImpl(clientObject.getOperatorApiConnections(), this);
+ }
+ return operatorApiConnections;
+ }
+
+ /**
+ * Gets the resource collection API of OperatorApiPlans.
+ *
+ * @return Resource collection API of OperatorApiPlans.
+ */
+ public OperatorApiPlans operatorApiPlans() {
+ if (this.operatorApiPlans == null) {
+ this.operatorApiPlans = new OperatorApiPlansImpl(clientObject.getOperatorApiPlans(), this);
+ }
+ return operatorApiPlans;
+ }
+
+ /**
+ * Gets wrapped service client ProgrammableConnectivityMgmtClient providing direct access to the underlying
+ * auto-generated API implementation, based on Azure REST API.
+ *
+ * @return Wrapped service client ProgrammableConnectivityMgmtClient.
+ */
+ public ProgrammableConnectivityMgmtClient serviceClient() {
+ return this.clientObject;
+ }
+}
diff --git a/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/fluent/GatewaysClient.java b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/fluent/GatewaysClient.java
new file mode 100644
index 000000000000..17dd4a016458
--- /dev/null
+++ b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/fluent/GatewaysClient.java
@@ -0,0 +1,237 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.programmableconnectivity.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.programmableconnectivity.fluent.models.GatewayInner;
+import com.azure.resourcemanager.programmableconnectivity.models.GatewayTagsUpdate;
+
+/**
+ * An instance of this class provides access to all the operations defined in GatewaysClient.
+ */
+public interface GatewaysClient {
+ /**
+ * Get a Gateway resource by name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param gatewayName Azure Programmable Connectivity Gateway 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 a Gateway resource by name along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(String resourceGroupName, String gatewayName,
+ Context context);
+
+ /**
+ * Get a Gateway resource by name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param gatewayName Azure Programmable Connectivity Gateway 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 a Gateway resource by name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ GatewayInner getByResourceGroup(String resourceGroupName, String gatewayName);
+
+ /**
+ * Create or update an APC Gateway.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param gatewayName Azure Programmable Connectivity Gateway Name.
+ * @param resource Resource create parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of a Programmable Connectivity Gateway resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, GatewayInner> beginCreateOrUpdate(String resourceGroupName, String gatewayName,
+ GatewayInner resource);
+
+ /**
+ * Create or update an APC Gateway.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param gatewayName Azure Programmable Connectivity Gateway Name.
+ * @param resource Resource create parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of a Programmable Connectivity Gateway resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, GatewayInner> beginCreateOrUpdate(String resourceGroupName, String gatewayName,
+ GatewayInner resource, Context context);
+
+ /**
+ * Create or update an APC Gateway.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param gatewayName Azure Programmable Connectivity Gateway Name.
+ * @param resource Resource create parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Programmable Connectivity Gateway resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ GatewayInner createOrUpdate(String resourceGroupName, String gatewayName, GatewayInner resource);
+
+ /**
+ * Create or update an APC Gateway.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param gatewayName Azure Programmable Connectivity Gateway Name.
+ * @param resource Resource create parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Programmable Connectivity Gateway resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ GatewayInner createOrUpdate(String resourceGroupName, String gatewayName, GatewayInner resource, Context context);
+
+ /**
+ * Update Gateway tags.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param gatewayName Azure Programmable Connectivity Gateway Name.
+ * @param properties The resource properties to be updated.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Programmable Connectivity Gateway resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(String resourceGroupName, String gatewayName,
+ GatewayTagsUpdate properties, Context context);
+
+ /**
+ * Update Gateway tags.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param gatewayName Azure Programmable Connectivity Gateway Name.
+ * @param properties The resource properties to be updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Programmable Connectivity Gateway resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ GatewayInner update(String resourceGroupName, String gatewayName, GatewayTagsUpdate properties);
+
+ /**
+ * Delete a Gateway.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param gatewayName Azure Programmable Connectivity Gateway 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 the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String gatewayName);
+
+ /**
+ * Delete a Gateway.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param gatewayName Azure Programmable Connectivity Gateway 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 the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String gatewayName, Context context);
+
+ /**
+ * Delete a Gateway.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param gatewayName Azure Programmable Connectivity Gateway 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String gatewayName);
+
+ /**
+ * Delete a Gateway.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param gatewayName Azure Programmable Connectivity Gateway 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String gatewayName, Context context);
+
+ /**
+ * List Gateway resources by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Gateway list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * List Gateway resources by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Gateway list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+
+ /**
+ * List Gateway resources by subscription ID.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Gateway list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * List Gateway resources by subscription ID.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Gateway list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+}
diff --git a/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/fluent/OperationsClient.java b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/fluent/OperationsClient.java
new file mode 100644
index 000000000000..c2e7aa2adcea
--- /dev/null
+++ b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/fluent/OperationsClient.java
@@ -0,0 +1,40 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.programmableconnectivity.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.programmableconnectivity.fluent.models.OperationInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in OperationsClient.
+ */
+public interface OperationsClient {
+ /**
+ * List the operations for the provider.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * List the operations for the provider.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+}
diff --git a/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/fluent/OperatorApiConnectionsClient.java b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/fluent/OperatorApiConnectionsClient.java
new file mode 100644
index 000000000000..6057e5d30502
--- /dev/null
+++ b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/fluent/OperatorApiConnectionsClient.java
@@ -0,0 +1,272 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.programmableconnectivity.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.programmableconnectivity.fluent.models.OperatorApiConnectionInner;
+import com.azure.resourcemanager.programmableconnectivity.models.OperatorApiConnectionUpdate;
+
+/**
+ * An instance of this class provides access to all the operations defined in OperatorApiConnectionsClient.
+ */
+public interface OperatorApiConnectionsClient {
+ /**
+ * Get an Operator API Connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param operatorApiConnectionName Azure Programmable Connectivity (APC) Operator API Connection 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 an Operator API Connection along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(String resourceGroupName,
+ String operatorApiConnectionName, Context context);
+
+ /**
+ * Get an Operator API Connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param operatorApiConnectionName Azure Programmable Connectivity (APC) Operator API Connection 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 an Operator API Connection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperatorApiConnectionInner getByResourceGroup(String resourceGroupName, String operatorApiConnectionName);
+
+ /**
+ * Create an Operator API Connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param operatorApiConnectionName Azure Programmable Connectivity (APC) Operator API Connection Name.
+ * @param resource Resource create parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of a Programmable Connectivity Operator API Connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, OperatorApiConnectionInner> beginCreate(String resourceGroupName,
+ String operatorApiConnectionName, OperatorApiConnectionInner resource);
+
+ /**
+ * Create an Operator API Connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param operatorApiConnectionName Azure Programmable Connectivity (APC) Operator API Connection Name.
+ * @param resource Resource create parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of a Programmable Connectivity Operator API Connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, OperatorApiConnectionInner> beginCreate(String resourceGroupName,
+ String operatorApiConnectionName, OperatorApiConnectionInner resource, Context context);
+
+ /**
+ * Create an Operator API Connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param operatorApiConnectionName Azure Programmable Connectivity (APC) Operator API Connection Name.
+ * @param resource Resource create parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Programmable Connectivity Operator API Connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperatorApiConnectionInner create(String resourceGroupName, String operatorApiConnectionName,
+ OperatorApiConnectionInner resource);
+
+ /**
+ * Create an Operator API Connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param operatorApiConnectionName Azure Programmable Connectivity (APC) Operator API Connection Name.
+ * @param resource Resource create parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Programmable Connectivity Operator API Connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperatorApiConnectionInner create(String resourceGroupName, String operatorApiConnectionName,
+ OperatorApiConnectionInner resource, Context context);
+
+ /**
+ * Update an Operator API Connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param operatorApiConnectionName Azure Programmable Connectivity (APC) Operator API Connection Name.
+ * @param properties The resource properties to be updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of a Programmable Connectivity Operator API Connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, OperatorApiConnectionInner> beginUpdate(String resourceGroupName,
+ String operatorApiConnectionName, OperatorApiConnectionUpdate properties);
+
+ /**
+ * Update an Operator API Connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param operatorApiConnectionName Azure Programmable Connectivity (APC) Operator API Connection Name.
+ * @param properties The resource properties to be updated.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of a Programmable Connectivity Operator API Connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, OperatorApiConnectionInner> beginUpdate(String resourceGroupName,
+ String operatorApiConnectionName, OperatorApiConnectionUpdate properties, Context context);
+
+ /**
+ * Update an Operator API Connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param operatorApiConnectionName Azure Programmable Connectivity (APC) Operator API Connection Name.
+ * @param properties The resource properties to be updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Programmable Connectivity Operator API Connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperatorApiConnectionInner update(String resourceGroupName, String operatorApiConnectionName,
+ OperatorApiConnectionUpdate properties);
+
+ /**
+ * Update an Operator API Connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param operatorApiConnectionName Azure Programmable Connectivity (APC) Operator API Connection Name.
+ * @param properties The resource properties to be updated.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Programmable Connectivity Operator API Connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperatorApiConnectionInner update(String resourceGroupName, String operatorApiConnectionName,
+ OperatorApiConnectionUpdate properties, Context context);
+
+ /**
+ * Delete an Operator API Connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param operatorApiConnectionName Azure Programmable Connectivity (APC) Operator API Connection 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 the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String operatorApiConnectionName);
+
+ /**
+ * Delete an Operator API Connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param operatorApiConnectionName Azure Programmable Connectivity (APC) Operator API Connection 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 the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String operatorApiConnectionName,
+ Context context);
+
+ /**
+ * Delete an Operator API Connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param operatorApiConnectionName Azure Programmable Connectivity (APC) Operator API Connection 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String operatorApiConnectionName);
+
+ /**
+ * Delete an Operator API Connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param operatorApiConnectionName Azure Programmable Connectivity (APC) Operator API Connection 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String operatorApiConnectionName, Context context);
+
+ /**
+ * List OperatorApiConnection resources by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a OperatorApiConnection list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * List OperatorApiConnection resources by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a OperatorApiConnection list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+
+ /**
+ * List OperatorApiConnection resources by subscription ID.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a OperatorApiConnection list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * List OperatorApiConnection resources by subscription ID.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a OperatorApiConnection list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+}
diff --git a/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/fluent/OperatorApiPlansClient.java b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/fluent/OperatorApiPlansClient.java
new file mode 100644
index 000000000000..c28c75202384
--- /dev/null
+++ b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/fluent/OperatorApiPlansClient.java
@@ -0,0 +1,67 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.programmableconnectivity.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.programmableconnectivity.fluent.models.OperatorApiPlanInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in OperatorApiPlansClient.
+ */
+public interface OperatorApiPlansClient {
+ /**
+ * Get an OperatorApiPlan resource by name.
+ *
+ * @param operatorApiPlanName APC Gateway Plan 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 an OperatorApiPlan resource by name along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String operatorApiPlanName, Context context);
+
+ /**
+ * Get an OperatorApiPlan resource by name.
+ *
+ * @param operatorApiPlanName APC Gateway Plan 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 an OperatorApiPlan resource by name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperatorApiPlanInner get(String operatorApiPlanName);
+
+ /**
+ * List OperatorApiPlan resources by subscription ID.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a OperatorApiPlan list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * List OperatorApiPlan resources by subscription ID.
+ *
+ * @param filter An optional OData based filter expression to apply on the operation.
+ * @param top An optional query parameter which specifies the maximum number of records to be returned.
+ * @param skip An optional query parameter which specifies the number of records to be skipped.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a OperatorApiPlan list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String filter, Integer top, Integer skip, Context context);
+}
diff --git a/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/fluent/ProgrammableConnectivityMgmtClient.java b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/fluent/ProgrammableConnectivityMgmtClient.java
new file mode 100644
index 000000000000..e315357ee624
--- /dev/null
+++ b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/fluent/ProgrammableConnectivityMgmtClient.java
@@ -0,0 +1,76 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.programmableconnectivity.fluent;
+
+import com.azure.core.http.HttpPipeline;
+import java.time.Duration;
+
+/**
+ * The interface for ProgrammableConnectivityMgmtClient class.
+ */
+public interface ProgrammableConnectivityMgmtClient {
+ /**
+ * Gets Service host.
+ *
+ * @return the endpoint value.
+ */
+ String getEndpoint();
+
+ /**
+ * Gets Version parameter.
+ *
+ * @return the apiVersion value.
+ */
+ String getApiVersion();
+
+ /**
+ * Gets The ID of the target subscription. The value must be an UUID.
+ *
+ * @return the subscriptionId value.
+ */
+ String getSubscriptionId();
+
+ /**
+ * Gets The HTTP pipeline to send requests through.
+ *
+ * @return the httpPipeline value.
+ */
+ HttpPipeline getHttpPipeline();
+
+ /**
+ * Gets The default poll interval for long-running operation.
+ *
+ * @return the defaultPollInterval value.
+ */
+ Duration getDefaultPollInterval();
+
+ /**
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ OperationsClient getOperations();
+
+ /**
+ * Gets the GatewaysClient object to access its operations.
+ *
+ * @return the GatewaysClient object.
+ */
+ GatewaysClient getGateways();
+
+ /**
+ * Gets the OperatorApiConnectionsClient object to access its operations.
+ *
+ * @return the OperatorApiConnectionsClient object.
+ */
+ OperatorApiConnectionsClient getOperatorApiConnections();
+
+ /**
+ * Gets the OperatorApiPlansClient object to access its operations.
+ *
+ * @return the OperatorApiPlansClient object.
+ */
+ OperatorApiPlansClient getOperatorApiPlans();
+}
diff --git a/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/fluent/models/GatewayInner.java b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/fluent/models/GatewayInner.java
new file mode 100644
index 000000000000..ec449641f434
--- /dev/null
+++ b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/fluent/models/GatewayInner.java
@@ -0,0 +1,192 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.programmableconnectivity.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.Resource;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.programmableconnectivity.models.GatewayProperties;
+import java.io.IOException;
+import java.util.Map;
+
+/**
+ * A Programmable Connectivity Gateway resource.
+ */
+@Fluent
+public final class GatewayInner extends Resource {
+ /*
+ * The resource-specific properties for this resource.
+ */
+ private GatewayProperties properties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ 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 GatewayInner class.
+ */
+ public GatewayInner() {
+ }
+
+ /**
+ * Get the properties property: The resource-specific properties for this resource.
+ *
+ * @return the properties value.
+ */
+ public GatewayProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: The resource-specific properties for this resource.
+ *
+ * @param properties the properties value to set.
+ * @return the GatewayInner object itself.
+ */
+ public GatewayInner withProperties(GatewayProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the 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 GatewayInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public GatewayInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() != null) {
+ properties().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("location", location());
+ jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element));
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of GatewayInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of GatewayInner 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 GatewayInner.
+ */
+ public static GatewayInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ GatewayInner deserializedGatewayInner = new GatewayInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedGatewayInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedGatewayInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedGatewayInner.type = reader.getString();
+ } else if ("location".equals(fieldName)) {
+ deserializedGatewayInner.withLocation(reader.getString());
+ } else if ("tags".equals(fieldName)) {
+ Map tags = reader.readMap(reader1 -> reader1.getString());
+ deserializedGatewayInner.withTags(tags);
+ } else if ("properties".equals(fieldName)) {
+ deserializedGatewayInner.properties = GatewayProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedGatewayInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedGatewayInner;
+ });
+ }
+}
diff --git a/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/fluent/models/OperationInner.java b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/fluent/models/OperationInner.java
new file mode 100644
index 000000000000..a4ee3f68c15f
--- /dev/null
+++ b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/fluent/models/OperationInner.java
@@ -0,0 +1,159 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.programmableconnectivity.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.programmableconnectivity.models.ActionType;
+import com.azure.resourcemanager.programmableconnectivity.models.OperationDisplay;
+import com.azure.resourcemanager.programmableconnectivity.models.Origin;
+import java.io.IOException;
+
+/**
+ * Details of a REST API operation, returned from the Resource Provider Operations API.
+ */
+@Immutable
+public final class OperationInner implements JsonSerializable {
+ /*
+ * The name of the operation, as per Resource-Based Access Control (RBAC). Examples:
+ * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action"
+ */
+ private String name;
+
+ /*
+ * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for Azure
+ * Resource Manager/control-plane operations.
+ */
+ private Boolean isDataAction;
+
+ /*
+ * Localized display information for this particular operation.
+ */
+ private OperationDisplay display;
+
+ /*
+ * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default
+ * value is "user,system"
+ */
+ private Origin origin;
+
+ /*
+ * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
+ */
+ private ActionType actionType;
+
+ /**
+ * Creates an instance of OperationInner class.
+ */
+ private OperationInner() {
+ }
+
+ /**
+ * Get the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples:
+ * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action".
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane
+ * operations and "false" for Azure Resource Manager/control-plane operations.
+ *
+ * @return the isDataAction value.
+ */
+ public Boolean isDataAction() {
+ return this.isDataAction;
+ }
+
+ /**
+ * Get the display property: Localized display information for this particular operation.
+ *
+ * @return the display value.
+ */
+ public OperationDisplay display() {
+ return this.display;
+ }
+
+ /**
+ * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and
+ * audit logs UX. Default value is "user,system".
+ *
+ * @return the origin value.
+ */
+ public Origin origin() {
+ return this.origin;
+ }
+
+ /**
+ * Get the actionType property: Extensible enum. Indicates the action type. "Internal" refers to actions that are
+ * for internal only APIs.
+ *
+ * @return the actionType value.
+ */
+ public ActionType actionType() {
+ return this.actionType;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (display() != null) {
+ display().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("display", this.display);
+ 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/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/fluent/models/OperatorApiConnectionInner.java b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/fluent/models/OperatorApiConnectionInner.java
new file mode 100644
index 000000000000..14242fb5f1ed
--- /dev/null
+++ b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/fluent/models/OperatorApiConnectionInner.java
@@ -0,0 +1,193 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.programmableconnectivity.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.Resource;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.programmableconnectivity.models.OperatorApiConnectionProperties;
+import java.io.IOException;
+import java.util.Map;
+
+/**
+ * A Programmable Connectivity Operator API Connection resource.
+ */
+@Fluent
+public final class OperatorApiConnectionInner extends Resource {
+ /*
+ * The resource-specific properties for this resource.
+ */
+ private OperatorApiConnectionProperties properties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ 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 OperatorApiConnectionInner class.
+ */
+ public OperatorApiConnectionInner() {
+ }
+
+ /**
+ * Get the properties property: The resource-specific properties for this resource.
+ *
+ * @return the properties value.
+ */
+ public OperatorApiConnectionProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: The resource-specific properties for this resource.
+ *
+ * @param properties the properties value to set.
+ * @return the OperatorApiConnectionInner object itself.
+ */
+ public OperatorApiConnectionInner withProperties(OperatorApiConnectionProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the 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 OperatorApiConnectionInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public OperatorApiConnectionInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() != null) {
+ properties().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("location", location());
+ jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element));
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of OperatorApiConnectionInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of OperatorApiConnectionInner 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 OperatorApiConnectionInner.
+ */
+ public static OperatorApiConnectionInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ OperatorApiConnectionInner deserializedOperatorApiConnectionInner = new OperatorApiConnectionInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedOperatorApiConnectionInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedOperatorApiConnectionInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedOperatorApiConnectionInner.type = reader.getString();
+ } else if ("location".equals(fieldName)) {
+ deserializedOperatorApiConnectionInner.withLocation(reader.getString());
+ } else if ("tags".equals(fieldName)) {
+ Map tags = reader.readMap(reader1 -> reader1.getString());
+ deserializedOperatorApiConnectionInner.withTags(tags);
+ } else if ("properties".equals(fieldName)) {
+ deserializedOperatorApiConnectionInner.properties
+ = OperatorApiConnectionProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedOperatorApiConnectionInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedOperatorApiConnectionInner;
+ });
+ }
+}
diff --git a/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/fluent/models/OperatorApiPlanInner.java b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/fluent/models/OperatorApiPlanInner.java
new file mode 100644
index 000000000000..802124c990d6
--- /dev/null
+++ b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/fluent/models/OperatorApiPlanInner.java
@@ -0,0 +1,156 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.programmableconnectivity.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+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.programmableconnectivity.models.OperatorApiPlanProperties;
+import java.io.IOException;
+
+/**
+ * A Programmable Connectivity Operator API Plans resource. This is a readonly resource that indicates which Operator
+ * Network APIs are available in the user's subscription.
+ */
+@Immutable
+public final class OperatorApiPlanInner extends ProxyResource {
+ /*
+ * The resource-specific properties for this resource.
+ */
+ private OperatorApiPlanProperties properties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ 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 OperatorApiPlanInner class.
+ */
+ private OperatorApiPlanInner() {
+ }
+
+ /**
+ * Get the properties property: The resource-specific properties for this resource.
+ *
+ * @return the properties value.
+ */
+ public OperatorApiPlanProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the 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;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() != null) {
+ properties().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of OperatorApiPlanInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of OperatorApiPlanInner 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 OperatorApiPlanInner.
+ */
+ public static OperatorApiPlanInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ OperatorApiPlanInner deserializedOperatorApiPlanInner = new OperatorApiPlanInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedOperatorApiPlanInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedOperatorApiPlanInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedOperatorApiPlanInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedOperatorApiPlanInner.properties = OperatorApiPlanProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedOperatorApiPlanInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedOperatorApiPlanInner;
+ });
+ }
+}
diff --git a/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/fluent/models/package-info.java b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/fluent/models/package-info.java
new file mode 100644
index 000000000000..134f8ce86f13
--- /dev/null
+++ b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/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) TypeSpec Code Generator.
+
+/**
+ * Package containing the inner data models for ProgrammableConnectivity.
+ * Azure Programmable Connectivity Provider management API.
+ */
+package com.azure.resourcemanager.programmableconnectivity.fluent.models;
diff --git a/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/fluent/package-info.java b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/fluent/package-info.java
new file mode 100644
index 000000000000..04ab1c8e40ed
--- /dev/null
+++ b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/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) TypeSpec Code Generator.
+
+/**
+ * Package containing the service clients for ProgrammableConnectivity.
+ * Azure Programmable Connectivity Provider management API.
+ */
+package com.azure.resourcemanager.programmableconnectivity.fluent;
diff --git a/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/implementation/GatewayImpl.java b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/implementation/GatewayImpl.java
new file mode 100644
index 000000000000..8c34643700c0
--- /dev/null
+++ b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/implementation/GatewayImpl.java
@@ -0,0 +1,180 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.programmableconnectivity.implementation;
+
+import com.azure.core.management.Region;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.programmableconnectivity.fluent.models.GatewayInner;
+import com.azure.resourcemanager.programmableconnectivity.models.Gateway;
+import com.azure.resourcemanager.programmableconnectivity.models.GatewayProperties;
+import com.azure.resourcemanager.programmableconnectivity.models.GatewayTagsUpdate;
+import java.util.Collections;
+import java.util.Map;
+
+public final class GatewayImpl implements Gateway, Gateway.Definition, Gateway.Update {
+ private GatewayInner innerObject;
+
+ private final com.azure.resourcemanager.programmableconnectivity.ProgrammableConnectivityManager 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 GatewayProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public Region region() {
+ return Region.fromName(this.regionName());
+ }
+
+ public String regionName() {
+ return this.location();
+ }
+
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
+ public GatewayInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.programmableconnectivity.ProgrammableConnectivityManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String gatewayName;
+
+ private GatewayTagsUpdate updateProperties;
+
+ public GatewayImpl withExistingResourceGroup(String resourceGroupName) {
+ this.resourceGroupName = resourceGroupName;
+ return this;
+ }
+
+ public Gateway create() {
+ this.innerObject = serviceManager.serviceClient()
+ .getGateways()
+ .createOrUpdate(resourceGroupName, gatewayName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public Gateway create(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getGateways()
+ .createOrUpdate(resourceGroupName, gatewayName, this.innerModel(), context);
+ return this;
+ }
+
+ GatewayImpl(String name,
+ com.azure.resourcemanager.programmableconnectivity.ProgrammableConnectivityManager serviceManager) {
+ this.innerObject = new GatewayInner();
+ this.serviceManager = serviceManager;
+ this.gatewayName = name;
+ }
+
+ public GatewayImpl update() {
+ this.updateProperties = new GatewayTagsUpdate();
+ return this;
+ }
+
+ public Gateway apply() {
+ this.innerObject = serviceManager.serviceClient()
+ .getGateways()
+ .updateWithResponse(resourceGroupName, gatewayName, updateProperties, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public Gateway apply(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getGateways()
+ .updateWithResponse(resourceGroupName, gatewayName, updateProperties, context)
+ .getValue();
+ return this;
+ }
+
+ GatewayImpl(GatewayInner innerObject,
+ com.azure.resourcemanager.programmableconnectivity.ProgrammableConnectivityManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.gatewayName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "gateways");
+ }
+
+ public Gateway refresh() {
+ this.innerObject = serviceManager.serviceClient()
+ .getGateways()
+ .getByResourceGroupWithResponse(resourceGroupName, gatewayName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public Gateway refresh(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getGateways()
+ .getByResourceGroupWithResponse(resourceGroupName, gatewayName, context)
+ .getValue();
+ return this;
+ }
+
+ public GatewayImpl withRegion(Region location) {
+ this.innerModel().withLocation(location.toString());
+ return this;
+ }
+
+ public GatewayImpl withRegion(String location) {
+ this.innerModel().withLocation(location);
+ return this;
+ }
+
+ public GatewayImpl withTags(Map tags) {
+ if (isInCreateMode()) {
+ this.innerModel().withTags(tags);
+ return this;
+ } else {
+ this.updateProperties.withTags(tags);
+ return this;
+ }
+ }
+
+ public GatewayImpl withProperties(GatewayProperties properties) {
+ this.innerModel().withProperties(properties);
+ return this;
+ }
+
+ private boolean isInCreateMode() {
+ return this.innerModel().id() == null;
+ }
+}
diff --git a/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/implementation/GatewaysClientImpl.java b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/implementation/GatewaysClientImpl.java
new file mode 100644
index 000000000000..96ee2f465f91
--- /dev/null
+++ b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/implementation/GatewaysClientImpl.java
@@ -0,0 +1,1179 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.programmableconnectivity.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.Patch;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.programmableconnectivity.fluent.GatewaysClient;
+import com.azure.resourcemanager.programmableconnectivity.fluent.models.GatewayInner;
+import com.azure.resourcemanager.programmableconnectivity.implementation.models.GatewayListResult;
+import com.azure.resourcemanager.programmableconnectivity.models.GatewayTagsUpdate;
+import java.nio.ByteBuffer;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in GatewaysClient.
+ */
+public final class GatewaysClientImpl implements GatewaysClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final GatewaysService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final ProgrammableConnectivityMgmtClientImpl client;
+
+ /**
+ * Initializes an instance of GatewaysClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ GatewaysClientImpl(ProgrammableConnectivityMgmtClientImpl client) {
+ this.service = RestProxy.create(GatewaysService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for ProgrammableConnectivityMgmtClientGateways to be used by the proxy
+ * service to perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "ProgrammableConnecti")
+ public interface GatewaysService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ProgrammableConnectivity/gateways/{gatewayName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getByResourceGroup(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("gatewayName") String gatewayName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ProgrammableConnectivity/gateways/{gatewayName}")
+ @ExpectedResponses({ 200, 201 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> createOrUpdate(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("gatewayName") String gatewayName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") GatewayInner resource, Context context);
+
+ @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ProgrammableConnectivity/gateways/{gatewayName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> update(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("gatewayName") String gatewayName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") GatewayTagsUpdate properties, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ProgrammableConnectivity/gateways/{gatewayName}")
+ @ExpectedResponses({ 202, 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("gatewayName") String gatewayName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ProgrammableConnectivity/gateways")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroup(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ProgrammableConnectivity/gateways")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroupNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listBySubscriptionNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * Get a Gateway resource by name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param gatewayName Azure Programmable Connectivity Gateway 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 a Gateway resource by name along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName,
+ String gatewayName) {
+ 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 (gatewayName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter gatewayName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, gatewayName, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get a Gateway resource by name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param gatewayName Azure Programmable Connectivity Gateway 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 a Gateway resource by name along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName,
+ String gatewayName, 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 (gatewayName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter gatewayName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, gatewayName, accept, context);
+ }
+
+ /**
+ * Get a Gateway resource by name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param gatewayName Azure Programmable Connectivity Gateway 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 a Gateway resource by name on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getByResourceGroupAsync(String resourceGroupName, String gatewayName) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, gatewayName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get a Gateway resource by name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param gatewayName Azure Programmable Connectivity Gateway 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 a Gateway resource by name along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getByResourceGroupWithResponse(String resourceGroupName, String gatewayName,
+ Context context) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, gatewayName, context).block();
+ }
+
+ /**
+ * Get a Gateway resource by name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param gatewayName Azure Programmable Connectivity Gateway 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 a Gateway resource by name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public GatewayInner getByResourceGroup(String resourceGroupName, String gatewayName) {
+ return getByResourceGroupWithResponse(resourceGroupName, gatewayName, Context.NONE).getValue();
+ }
+
+ /**
+ * Create or update an APC Gateway.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param gatewayName Azure Programmable Connectivity Gateway Name.
+ * @param resource Resource create parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Programmable Connectivity Gateway resource along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName,
+ String gatewayName, GatewayInner resource) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (gatewayName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter gatewayName is required and cannot be null."));
+ }
+ if (resource == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null."));
+ } else {
+ resource.validate();
+ }
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, gatewayName, contentType, accept, resource,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Create or update an APC Gateway.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param gatewayName Azure Programmable Connectivity Gateway Name.
+ * @param resource Resource create parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Programmable Connectivity Gateway resource along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName,
+ String gatewayName, GatewayInner resource, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (gatewayName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter gatewayName is required and cannot be null."));
+ }
+ if (resource == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null."));
+ } else {
+ resource.validate();
+ }
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, gatewayName, contentType, accept, resource, context);
+ }
+
+ /**
+ * Create or update an APC Gateway.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param gatewayName Azure Programmable Connectivity Gateway Name.
+ * @param resource Resource create parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of a Programmable Connectivity Gateway resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, GatewayInner> beginCreateOrUpdateAsync(String resourceGroupName,
+ String gatewayName, GatewayInner resource) {
+ Mono>> mono
+ = createOrUpdateWithResponseAsync(resourceGroupName, gatewayName, resource);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(),
+ GatewayInner.class, GatewayInner.class, this.client.getContext());
+ }
+
+ /**
+ * Create or update an APC Gateway.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param gatewayName Azure Programmable Connectivity Gateway Name.
+ * @param resource Resource create parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of a Programmable Connectivity Gateway resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, GatewayInner> beginCreateOrUpdateAsync(String resourceGroupName,
+ String gatewayName, GatewayInner resource, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono
+ = createOrUpdateWithResponseAsync(resourceGroupName, gatewayName, resource, context);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(),
+ GatewayInner.class, GatewayInner.class, context);
+ }
+
+ /**
+ * Create or update an APC Gateway.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param gatewayName Azure Programmable Connectivity Gateway Name.
+ * @param resource Resource create parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of a Programmable Connectivity Gateway resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, GatewayInner> beginCreateOrUpdate(String resourceGroupName,
+ String gatewayName, GatewayInner resource) {
+ return this.beginCreateOrUpdateAsync(resourceGroupName, gatewayName, resource).getSyncPoller();
+ }
+
+ /**
+ * Create or update an APC Gateway.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param gatewayName Azure Programmable Connectivity Gateway Name.
+ * @param resource Resource create parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of a Programmable Connectivity Gateway resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, GatewayInner> beginCreateOrUpdate(String resourceGroupName,
+ String gatewayName, GatewayInner resource, Context context) {
+ return this.beginCreateOrUpdateAsync(resourceGroupName, gatewayName, resource, context).getSyncPoller();
+ }
+
+ /**
+ * Create or update an APC Gateway.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param gatewayName Azure Programmable Connectivity Gateway Name.
+ * @param resource Resource create parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Programmable Connectivity Gateway resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(String resourceGroupName, String gatewayName,
+ GatewayInner resource) {
+ return beginCreateOrUpdateAsync(resourceGroupName, gatewayName, resource).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create or update an APC Gateway.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param gatewayName Azure Programmable Connectivity Gateway Name.
+ * @param resource Resource create parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Programmable Connectivity Gateway resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(String resourceGroupName, String gatewayName, GatewayInner resource,
+ Context context) {
+ return beginCreateOrUpdateAsync(resourceGroupName, gatewayName, resource, context).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create or update an APC Gateway.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param gatewayName Azure Programmable Connectivity Gateway Name.
+ * @param resource Resource create parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Programmable Connectivity Gateway resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public GatewayInner createOrUpdate(String resourceGroupName, String gatewayName, GatewayInner resource) {
+ return createOrUpdateAsync(resourceGroupName, gatewayName, resource).block();
+ }
+
+ /**
+ * Create or update an APC Gateway.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param gatewayName Azure Programmable Connectivity Gateway Name.
+ * @param resource Resource create parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Programmable Connectivity Gateway resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public GatewayInner createOrUpdate(String resourceGroupName, String gatewayName, GatewayInner resource,
+ Context context) {
+ return createOrUpdateAsync(resourceGroupName, gatewayName, resource, context).block();
+ }
+
+ /**
+ * Update Gateway tags.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param gatewayName Azure Programmable Connectivity Gateway Name.
+ * @param properties The resource properties to be updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Programmable Connectivity Gateway resource along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(String resourceGroupName, String gatewayName,
+ GatewayTagsUpdate properties) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (gatewayName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter gatewayName is required and cannot be null."));
+ }
+ if (properties == null) {
+ return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null."));
+ } else {
+ properties.validate();
+ }
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return FluxUtil.withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, gatewayName, contentType, accept, properties, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Update Gateway tags.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param gatewayName Azure Programmable Connectivity Gateway Name.
+ * @param properties The resource properties to be updated.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Programmable Connectivity Gateway resource along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(String resourceGroupName, String gatewayName,
+ GatewayTagsUpdate properties, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (gatewayName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter gatewayName is required and cannot be null."));
+ }
+ if (properties == null) {
+ return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null."));
+ } else {
+ properties.validate();
+ }
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, gatewayName, contentType, accept, properties, context);
+ }
+
+ /**
+ * Update Gateway tags.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param gatewayName Azure Programmable Connectivity Gateway Name.
+ * @param properties The resource properties to be updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Programmable Connectivity Gateway resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(String resourceGroupName, String gatewayName, GatewayTagsUpdate properties) {
+ return updateWithResponseAsync(resourceGroupName, gatewayName, properties)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Update Gateway tags.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param gatewayName Azure Programmable Connectivity Gateway Name.
+ * @param properties The resource properties to be updated.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Programmable Connectivity Gateway resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response updateWithResponse(String resourceGroupName, String gatewayName,
+ GatewayTagsUpdate properties, Context context) {
+ return updateWithResponseAsync(resourceGroupName, gatewayName, properties, context).block();
+ }
+
+ /**
+ * Update Gateway tags.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param gatewayName Azure Programmable Connectivity Gateway Name.
+ * @param properties The resource properties to be updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Programmable Connectivity Gateway resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public GatewayInner update(String resourceGroupName, String gatewayName, GatewayTagsUpdate properties) {
+ return updateWithResponse(resourceGroupName, gatewayName, properties, Context.NONE).getValue();
+ }
+
+ /**
+ * Delete a Gateway.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param gatewayName Azure Programmable Connectivity Gateway 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 the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(String resourceGroupName, String gatewayName) {
+ 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 (gatewayName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter gatewayName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, gatewayName, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Delete a Gateway.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param gatewayName Azure Programmable Connectivity Gateway 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 the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(String resourceGroupName, String gatewayName,
+ 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 (gatewayName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter gatewayName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, gatewayName, accept, context);
+ }
+
+ /**
+ * Delete a Gateway.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param gatewayName Azure Programmable Connectivity Gateway 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 the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String gatewayName) {
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, gatewayName);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Delete a Gateway.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param gatewayName Azure Programmable Connectivity Gateway 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 the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String gatewayName,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, gatewayName, context);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
+ context);
+ }
+
+ /**
+ * Delete a Gateway.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param gatewayName Azure Programmable Connectivity Gateway 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 the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(String resourceGroupName, String gatewayName) {
+ return this.beginDeleteAsync(resourceGroupName, gatewayName).getSyncPoller();
+ }
+
+ /**
+ * Delete a Gateway.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param gatewayName Azure Programmable Connectivity Gateway 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 the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(String resourceGroupName, String gatewayName,
+ Context context) {
+ return this.beginDeleteAsync(resourceGroupName, gatewayName, context).getSyncPoller();
+ }
+
+ /**
+ * Delete a Gateway.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param gatewayName Azure Programmable Connectivity Gateway 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 A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String gatewayName) {
+ return beginDeleteAsync(resourceGroupName, gatewayName).last().flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Delete a Gateway.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param gatewayName Azure Programmable Connectivity Gateway 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 A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String gatewayName, Context context) {
+ return beginDeleteAsync(resourceGroupName, gatewayName, context).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Delete a Gateway.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param gatewayName Azure Programmable Connectivity Gateway 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String gatewayName) {
+ deleteAsync(resourceGroupName, gatewayName).block();
+ }
+
+ /**
+ * Delete a Gateway.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param gatewayName Azure Programmable Connectivity Gateway 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String gatewayName, Context context) {
+ deleteAsync(resourceGroupName, gatewayName, context).block();
+ }
+
+ /**
+ * List Gateway resources by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Gateway list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
+ res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * List Gateway resources by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Gateway list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+
+ /**
+ * List Gateway resources by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Gateway list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
+ return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List Gateway resources by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Gateway list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) {
+ return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List Gateway resources by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Gateway list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName));
+ }
+
+ /**
+ * List Gateway resources by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Gateway list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context));
+ }
+
+ /**
+ * List Gateway resources by subscription ID.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Gateway list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync() {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
+ res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * List Gateway resources by subscription ID.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Gateway list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept,
+ context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+
+ /**
+ * List Gateway resources by subscription ID.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Gateway list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(() -> listSinglePageAsync(),
+ nextLink -> listBySubscriptionNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List Gateway resources by subscription ID.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Gateway list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(Context context) {
+ return new PagedFlux<>(() -> listSinglePageAsync(context),
+ nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List Gateway resources by subscription ID.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Gateway list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ return new PagedIterable<>(listAsync());
+ }
+
+ /**
+ * List Gateway resources by subscription ID.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Gateway list 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 a Gateway list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
+ res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Gateway list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Gateway list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
+ res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Gateway list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+}
diff --git a/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/implementation/GatewaysImpl.java b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/implementation/GatewaysImpl.java
new file mode 100644
index 000000000000..eb541bef3689
--- /dev/null
+++ b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/implementation/GatewaysImpl.java
@@ -0,0 +1,146 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.programmableconnectivity.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.programmableconnectivity.fluent.GatewaysClient;
+import com.azure.resourcemanager.programmableconnectivity.fluent.models.GatewayInner;
+import com.azure.resourcemanager.programmableconnectivity.models.Gateway;
+import com.azure.resourcemanager.programmableconnectivity.models.Gateways;
+
+public final class GatewaysImpl implements Gateways {
+ private static final ClientLogger LOGGER = new ClientLogger(GatewaysImpl.class);
+
+ private final GatewaysClient innerClient;
+
+ private final com.azure.resourcemanager.programmableconnectivity.ProgrammableConnectivityManager serviceManager;
+
+ public GatewaysImpl(GatewaysClient innerClient,
+ com.azure.resourcemanager.programmableconnectivity.ProgrammableConnectivityManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response getByResourceGroupWithResponse(String resourceGroupName, String gatewayName,
+ Context context) {
+ Response inner
+ = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, gatewayName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new GatewayImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public Gateway getByResourceGroup(String resourceGroupName, String gatewayName) {
+ GatewayInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, gatewayName);
+ if (inner != null) {
+ return new GatewayImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public void deleteByResourceGroup(String resourceGroupName, String gatewayName) {
+ this.serviceClient().delete(resourceGroupName, gatewayName);
+ }
+
+ public void delete(String resourceGroupName, String gatewayName, Context context) {
+ this.serviceClient().delete(resourceGroupName, gatewayName, context);
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new GatewayImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new GatewayImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new GatewayImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(Context context) {
+ PagedIterable inner = this.serviceClient().list(context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new GatewayImpl(inner1, this.manager()));
+ }
+
+ public Gateway 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 gatewayName = ResourceManagerUtils.getValueFromIdByName(id, "gateways");
+ if (gatewayName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'gateways'.", id)));
+ }
+ return this.getByResourceGroupWithResponse(resourceGroupName, gatewayName, 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 gatewayName = ResourceManagerUtils.getValueFromIdByName(id, "gateways");
+ if (gatewayName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'gateways'.", id)));
+ }
+ return this.getByResourceGroupWithResponse(resourceGroupName, gatewayName, 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 gatewayName = ResourceManagerUtils.getValueFromIdByName(id, "gateways");
+ if (gatewayName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'gateways'.", id)));
+ }
+ this.delete(resourceGroupName, gatewayName, Context.NONE);
+ }
+
+ public void deleteByIdWithResponse(String id, Context context) {
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String gatewayName = ResourceManagerUtils.getValueFromIdByName(id, "gateways");
+ if (gatewayName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'gateways'.", id)));
+ }
+ this.delete(resourceGroupName, gatewayName, context);
+ }
+
+ private GatewaysClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.programmableconnectivity.ProgrammableConnectivityManager manager() {
+ return this.serviceManager;
+ }
+
+ public GatewayImpl define(String name) {
+ return new GatewayImpl(name, this.manager());
+ }
+}
diff --git a/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/implementation/OperationImpl.java b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/implementation/OperationImpl.java
new file mode 100644
index 000000000000..718a412dc7a6
--- /dev/null
+++ b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/implementation/OperationImpl.java
@@ -0,0 +1,51 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.programmableconnectivity.implementation;
+
+import com.azure.resourcemanager.programmableconnectivity.fluent.models.OperationInner;
+import com.azure.resourcemanager.programmableconnectivity.models.ActionType;
+import com.azure.resourcemanager.programmableconnectivity.models.Operation;
+import com.azure.resourcemanager.programmableconnectivity.models.OperationDisplay;
+import com.azure.resourcemanager.programmableconnectivity.models.Origin;
+
+public final class OperationImpl implements Operation {
+ private OperationInner innerObject;
+
+ private final com.azure.resourcemanager.programmableconnectivity.ProgrammableConnectivityManager serviceManager;
+
+ OperationImpl(OperationInner innerObject,
+ com.azure.resourcemanager.programmableconnectivity.ProgrammableConnectivityManager 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.programmableconnectivity.ProgrammableConnectivityManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/implementation/OperationsClientImpl.java b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/implementation/OperationsClientImpl.java
new file mode 100644
index 000000000000..bf1f7811400b
--- /dev/null
+++ b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/implementation/OperationsClientImpl.java
@@ -0,0 +1,235 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.programmableconnectivity.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.programmableconnectivity.fluent.OperationsClient;
+import com.azure.resourcemanager.programmableconnectivity.fluent.models.OperationInner;
+import com.azure.resourcemanager.programmableconnectivity.implementation.models.OperationListResult;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in OperationsClient.
+ */
+public final class OperationsClientImpl implements OperationsClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final OperationsService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final ProgrammableConnectivityMgmtClientImpl client;
+
+ /**
+ * Initializes an instance of OperationsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ OperationsClientImpl(ProgrammableConnectivityMgmtClientImpl client) {
+ this.service
+ = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for ProgrammableConnectivityMgmtClientOperations to be used by the proxy
+ * service to perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "ProgrammableConnecti")
+ public interface OperationsService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/providers/Microsoft.ProgrammableConnectivity/operations")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * List the operations for the provider.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync() {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
+ res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * List the operations for the provider.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+
+ /**
+ * List the operations for the provider.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with
+ * {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List the operations for the provider.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with
+ * {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(Context context) {
+ return new PagedFlux<>(() -> listSinglePageAsync(context),
+ nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List the operations for the provider.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ return new PagedIterable<>(listAsync());
+ }
+
+ /**
+ * List the operations for the provider.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(Context context) {
+ return new PagedIterable<>(listAsync(context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
+ res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.listNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+}
diff --git a/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/implementation/OperationsImpl.java b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/implementation/OperationsImpl.java
new file mode 100644
index 000000000000..398d21341344
--- /dev/null
+++ b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/implementation/OperationsImpl.java
@@ -0,0 +1,45 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.programmableconnectivity.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.programmableconnectivity.fluent.OperationsClient;
+import com.azure.resourcemanager.programmableconnectivity.fluent.models.OperationInner;
+import com.azure.resourcemanager.programmableconnectivity.models.Operation;
+import com.azure.resourcemanager.programmableconnectivity.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.programmableconnectivity.ProgrammableConnectivityManager serviceManager;
+
+ public OperationsImpl(OperationsClient innerClient,
+ com.azure.resourcemanager.programmableconnectivity.ProgrammableConnectivityManager 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.programmableconnectivity.ProgrammableConnectivityManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/implementation/OperatorApiConnectionImpl.java b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/implementation/OperatorApiConnectionImpl.java
new file mode 100644
index 000000000000..0f9d73bae263
--- /dev/null
+++ b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/implementation/OperatorApiConnectionImpl.java
@@ -0,0 +1,186 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.programmableconnectivity.implementation;
+
+import com.azure.core.management.Region;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.programmableconnectivity.fluent.models.OperatorApiConnectionInner;
+import com.azure.resourcemanager.programmableconnectivity.models.OperatorApiConnection;
+import com.azure.resourcemanager.programmableconnectivity.models.OperatorApiConnectionProperties;
+import com.azure.resourcemanager.programmableconnectivity.models.OperatorApiConnectionUpdate;
+import com.azure.resourcemanager.programmableconnectivity.models.OperatorApiConnectionUpdateProperties;
+import java.util.Collections;
+import java.util.Map;
+
+public final class OperatorApiConnectionImpl
+ implements OperatorApiConnection, OperatorApiConnection.Definition, OperatorApiConnection.Update {
+ private OperatorApiConnectionInner innerObject;
+
+ private final com.azure.resourcemanager.programmableconnectivity.ProgrammableConnectivityManager 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 OperatorApiConnectionProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public Region region() {
+ return Region.fromName(this.regionName());
+ }
+
+ public String regionName() {
+ return this.location();
+ }
+
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
+ public OperatorApiConnectionInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.programmableconnectivity.ProgrammableConnectivityManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String operatorApiConnectionName;
+
+ private OperatorApiConnectionUpdate updateProperties;
+
+ public OperatorApiConnectionImpl withExistingResourceGroup(String resourceGroupName) {
+ this.resourceGroupName = resourceGroupName;
+ return this;
+ }
+
+ public OperatorApiConnection create() {
+ this.innerObject = serviceManager.serviceClient()
+ .getOperatorApiConnections()
+ .create(resourceGroupName, operatorApiConnectionName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public OperatorApiConnection create(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getOperatorApiConnections()
+ .create(resourceGroupName, operatorApiConnectionName, this.innerModel(), context);
+ return this;
+ }
+
+ OperatorApiConnectionImpl(String name,
+ com.azure.resourcemanager.programmableconnectivity.ProgrammableConnectivityManager serviceManager) {
+ this.innerObject = new OperatorApiConnectionInner();
+ this.serviceManager = serviceManager;
+ this.operatorApiConnectionName = name;
+ }
+
+ public OperatorApiConnectionImpl update() {
+ this.updateProperties = new OperatorApiConnectionUpdate();
+ return this;
+ }
+
+ public OperatorApiConnection apply() {
+ this.innerObject = serviceManager.serviceClient()
+ .getOperatorApiConnections()
+ .update(resourceGroupName, operatorApiConnectionName, updateProperties, Context.NONE);
+ return this;
+ }
+
+ public OperatorApiConnection apply(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getOperatorApiConnections()
+ .update(resourceGroupName, operatorApiConnectionName, updateProperties, context);
+ return this;
+ }
+
+ OperatorApiConnectionImpl(OperatorApiConnectionInner innerObject,
+ com.azure.resourcemanager.programmableconnectivity.ProgrammableConnectivityManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.operatorApiConnectionName
+ = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "operatorApiConnections");
+ }
+
+ public OperatorApiConnection refresh() {
+ this.innerObject = serviceManager.serviceClient()
+ .getOperatorApiConnections()
+ .getByResourceGroupWithResponse(resourceGroupName, operatorApiConnectionName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public OperatorApiConnection refresh(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getOperatorApiConnections()
+ .getByResourceGroupWithResponse(resourceGroupName, operatorApiConnectionName, context)
+ .getValue();
+ return this;
+ }
+
+ public OperatorApiConnectionImpl withRegion(Region location) {
+ this.innerModel().withLocation(location.toString());
+ return this;
+ }
+
+ public OperatorApiConnectionImpl withRegion(String location) {
+ this.innerModel().withLocation(location);
+ return this;
+ }
+
+ public OperatorApiConnectionImpl withTags(Map tags) {
+ if (isInCreateMode()) {
+ this.innerModel().withTags(tags);
+ return this;
+ } else {
+ this.updateProperties.withTags(tags);
+ return this;
+ }
+ }
+
+ public OperatorApiConnectionImpl withProperties(OperatorApiConnectionProperties properties) {
+ this.innerModel().withProperties(properties);
+ return this;
+ }
+
+ public OperatorApiConnectionImpl withProperties(OperatorApiConnectionUpdateProperties properties) {
+ this.updateProperties.withProperties(properties);
+ return this;
+ }
+
+ private boolean isInCreateMode() {
+ return this.innerModel().id() == null;
+ }
+}
diff --git a/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/implementation/OperatorApiConnectionsClientImpl.java b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/implementation/OperatorApiConnectionsClientImpl.java
new file mode 100644
index 000000000000..b50e30902883
--- /dev/null
+++ b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/implementation/OperatorApiConnectionsClientImpl.java
@@ -0,0 +1,1307 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.programmableconnectivity.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.Patch;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.programmableconnectivity.fluent.OperatorApiConnectionsClient;
+import com.azure.resourcemanager.programmableconnectivity.fluent.models.OperatorApiConnectionInner;
+import com.azure.resourcemanager.programmableconnectivity.implementation.models.OperatorApiConnectionListResult;
+import com.azure.resourcemanager.programmableconnectivity.models.OperatorApiConnectionUpdate;
+import java.nio.ByteBuffer;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in OperatorApiConnectionsClient.
+ */
+public final class OperatorApiConnectionsClientImpl implements OperatorApiConnectionsClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final OperatorApiConnectionsService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final ProgrammableConnectivityMgmtClientImpl client;
+
+ /**
+ * Initializes an instance of OperatorApiConnectionsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ OperatorApiConnectionsClientImpl(ProgrammableConnectivityMgmtClientImpl client) {
+ this.service = RestProxy.create(OperatorApiConnectionsService.class, client.getHttpPipeline(),
+ client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for ProgrammableConnectivityMgmtClientOperatorApiConnections to be used
+ * by the proxy service to perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "ProgrammableConnecti")
+ public interface OperatorApiConnectionsService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ProgrammableConnectivity/operatorApiConnections/{operatorApiConnectionName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getByResourceGroup(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("operatorApiConnectionName") String operatorApiConnectionName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ProgrammableConnectivity/operatorApiConnections/{operatorApiConnectionName}")
+ @ExpectedResponses({ 200, 201 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> create(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("operatorApiConnectionName") String operatorApiConnectionName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") OperatorApiConnectionInner resource, Context context);
+
+ @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ProgrammableConnectivity/operatorApiConnections/{operatorApiConnectionName}")
+ @ExpectedResponses({ 200, 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> update(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("operatorApiConnectionName") String operatorApiConnectionName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") OperatorApiConnectionUpdate properties, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ProgrammableConnectivity/operatorApiConnections/{operatorApiConnectionName}")
+ @ExpectedResponses({ 202, 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("operatorApiConnectionName") String operatorApiConnectionName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ProgrammableConnectivity/operatorApiConnections")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroup(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ProgrammableConnectivity/operatorApiConnections")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroupNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listBySubscriptionNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * Get an Operator API Connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param operatorApiConnectionName Azure Programmable Connectivity (APC) Operator API Connection 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 an Operator API Connection along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName,
+ String operatorApiConnectionName) {
+ 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 (operatorApiConnectionName == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter operatorApiConnectionName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, operatorApiConnectionName, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get an Operator API Connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param operatorApiConnectionName Azure Programmable Connectivity (APC) Operator API Connection 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 an Operator API Connection along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName,
+ String operatorApiConnectionName, 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 (operatorApiConnectionName == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter operatorApiConnectionName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, operatorApiConnectionName, accept, context);
+ }
+
+ /**
+ * Get an Operator API Connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param operatorApiConnectionName Azure Programmable Connectivity (APC) Operator API Connection 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 an Operator API Connection on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getByResourceGroupAsync(String resourceGroupName,
+ String operatorApiConnectionName) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, operatorApiConnectionName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get an Operator API Connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param operatorApiConnectionName Azure Programmable Connectivity (APC) Operator API Connection 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 an Operator API Connection along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getByResourceGroupWithResponse(String resourceGroupName,
+ String operatorApiConnectionName, Context context) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, operatorApiConnectionName, context).block();
+ }
+
+ /**
+ * Get an Operator API Connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param operatorApiConnectionName Azure Programmable Connectivity (APC) Operator API Connection 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 an Operator API Connection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OperatorApiConnectionInner getByResourceGroup(String resourceGroupName, String operatorApiConnectionName) {
+ return getByResourceGroupWithResponse(resourceGroupName, operatorApiConnectionName, Context.NONE).getValue();
+ }
+
+ /**
+ * Create an Operator API Connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param operatorApiConnectionName Azure Programmable Connectivity (APC) Operator API Connection Name.
+ * @param resource Resource create parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Programmable Connectivity Operator API Connection resource along with {@link Response} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createWithResponseAsync(String resourceGroupName,
+ String operatorApiConnectionName, OperatorApiConnectionInner resource) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (operatorApiConnectionName == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter operatorApiConnectionName is required and cannot be null."));
+ }
+ if (resource == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null."));
+ } else {
+ resource.validate();
+ }
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, operatorApiConnectionName, contentType, accept,
+ resource, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Create an Operator API Connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param operatorApiConnectionName Azure Programmable Connectivity (APC) Operator API Connection Name.
+ * @param resource Resource create parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Programmable Connectivity Operator API Connection resource along with {@link Response} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createWithResponseAsync(String resourceGroupName,
+ String operatorApiConnectionName, OperatorApiConnectionInner resource, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (operatorApiConnectionName == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter operatorApiConnectionName is required and cannot be null."));
+ }
+ if (resource == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null."));
+ } else {
+ resource.validate();
+ }
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, operatorApiConnectionName, contentType, accept, resource, context);
+ }
+
+ /**
+ * Create an Operator API Connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param operatorApiConnectionName Azure Programmable Connectivity (APC) Operator API Connection Name.
+ * @param resource Resource create parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of a Programmable Connectivity Operator API Connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, OperatorApiConnectionInner> beginCreateAsync(
+ String resourceGroupName, String operatorApiConnectionName, OperatorApiConnectionInner resource) {
+ Mono>> mono
+ = createWithResponseAsync(resourceGroupName, operatorApiConnectionName, resource);
+ return this.client.getLroResult(mono,
+ this.client.getHttpPipeline(), OperatorApiConnectionInner.class, OperatorApiConnectionInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Create an Operator API Connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param operatorApiConnectionName Azure Programmable Connectivity (APC) Operator API Connection Name.
+ * @param resource Resource create parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of a Programmable Connectivity Operator API Connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, OperatorApiConnectionInner> beginCreateAsync(
+ String resourceGroupName, String operatorApiConnectionName, OperatorApiConnectionInner resource,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono
+ = createWithResponseAsync(resourceGroupName, operatorApiConnectionName, resource, context);
+ return this.client.getLroResult(mono,
+ this.client.getHttpPipeline(), OperatorApiConnectionInner.class, OperatorApiConnectionInner.class, context);
+ }
+
+ /**
+ * Create an Operator API Connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param operatorApiConnectionName Azure Programmable Connectivity (APC) Operator API Connection Name.
+ * @param resource Resource create parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of a Programmable Connectivity Operator API Connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, OperatorApiConnectionInner>
+ beginCreate(String resourceGroupName, String operatorApiConnectionName, OperatorApiConnectionInner resource) {
+ return this.beginCreateAsync(resourceGroupName, operatorApiConnectionName, resource).getSyncPoller();
+ }
+
+ /**
+ * Create an Operator API Connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param operatorApiConnectionName Azure Programmable Connectivity (APC) Operator API Connection Name.
+ * @param resource Resource create parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of a Programmable Connectivity Operator API Connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, OperatorApiConnectionInner> beginCreate(
+ String resourceGroupName, String operatorApiConnectionName, OperatorApiConnectionInner resource,
+ Context context) {
+ return this.beginCreateAsync(resourceGroupName, operatorApiConnectionName, resource, context).getSyncPoller();
+ }
+
+ /**
+ * Create an Operator API Connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param operatorApiConnectionName Azure Programmable Connectivity (APC) Operator API Connection Name.
+ * @param resource Resource create parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Programmable Connectivity Operator API Connection resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAsync(String resourceGroupName, String operatorApiConnectionName,
+ OperatorApiConnectionInner resource) {
+ return beginCreateAsync(resourceGroupName, operatorApiConnectionName, resource).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create an Operator API Connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param operatorApiConnectionName Azure Programmable Connectivity (APC) Operator API Connection Name.
+ * @param resource Resource create parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Programmable Connectivity Operator API Connection resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAsync(String resourceGroupName, String operatorApiConnectionName,
+ OperatorApiConnectionInner resource, Context context) {
+ return beginCreateAsync(resourceGroupName, operatorApiConnectionName, resource, context).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create an Operator API Connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param operatorApiConnectionName Azure Programmable Connectivity (APC) Operator API Connection Name.
+ * @param resource Resource create parameters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Programmable Connectivity Operator API Connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OperatorApiConnectionInner create(String resourceGroupName, String operatorApiConnectionName,
+ OperatorApiConnectionInner resource) {
+ return createAsync(resourceGroupName, operatorApiConnectionName, resource).block();
+ }
+
+ /**
+ * Create an Operator API Connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param operatorApiConnectionName Azure Programmable Connectivity (APC) Operator API Connection Name.
+ * @param resource Resource create parameters.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Programmable Connectivity Operator API Connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OperatorApiConnectionInner create(String resourceGroupName, String operatorApiConnectionName,
+ OperatorApiConnectionInner resource, Context context) {
+ return createAsync(resourceGroupName, operatorApiConnectionName, resource, context).block();
+ }
+
+ /**
+ * Update an Operator API Connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param operatorApiConnectionName Azure Programmable Connectivity (APC) Operator API Connection Name.
+ * @param properties The resource properties to be updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Programmable Connectivity Operator API Connection resource along with {@link Response} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> updateWithResponseAsync(String resourceGroupName,
+ String operatorApiConnectionName, OperatorApiConnectionUpdate properties) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (operatorApiConnectionName == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter operatorApiConnectionName is required and cannot be null."));
+ }
+ if (properties == null) {
+ return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null."));
+ } else {
+ properties.validate();
+ }
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, operatorApiConnectionName, contentType, accept,
+ properties, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Update an Operator API Connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param operatorApiConnectionName Azure Programmable Connectivity (APC) Operator API Connection Name.
+ * @param properties The resource properties to be updated.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Programmable Connectivity Operator API Connection resource along with {@link Response} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> updateWithResponseAsync(String resourceGroupName,
+ String operatorApiConnectionName, OperatorApiConnectionUpdate properties, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (operatorApiConnectionName == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter operatorApiConnectionName is required and cannot be null."));
+ }
+ if (properties == null) {
+ return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null."));
+ } else {
+ properties.validate();
+ }
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, operatorApiConnectionName, contentType, accept, properties, context);
+ }
+
+ /**
+ * Update an Operator API Connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param operatorApiConnectionName Azure Programmable Connectivity (APC) Operator API Connection Name.
+ * @param properties The resource properties to be updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of a Programmable Connectivity Operator API Connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, OperatorApiConnectionInner> beginUpdateAsync(
+ String resourceGroupName, String operatorApiConnectionName, OperatorApiConnectionUpdate properties) {
+ Mono>> mono
+ = updateWithResponseAsync(resourceGroupName, operatorApiConnectionName, properties);
+ return this.client.getLroResult(mono,
+ this.client.getHttpPipeline(), OperatorApiConnectionInner.class, OperatorApiConnectionInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Update an Operator API Connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param operatorApiConnectionName Azure Programmable Connectivity (APC) Operator API Connection Name.
+ * @param properties The resource properties to be updated.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of a Programmable Connectivity Operator API Connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, OperatorApiConnectionInner> beginUpdateAsync(
+ String resourceGroupName, String operatorApiConnectionName, OperatorApiConnectionUpdate properties,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono
+ = updateWithResponseAsync(resourceGroupName, operatorApiConnectionName, properties, context);
+ return this.client.getLroResult(mono,
+ this.client.getHttpPipeline(), OperatorApiConnectionInner.class, OperatorApiConnectionInner.class, context);
+ }
+
+ /**
+ * Update an Operator API Connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param operatorApiConnectionName Azure Programmable Connectivity (APC) Operator API Connection Name.
+ * @param properties The resource properties to be updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of a Programmable Connectivity Operator API Connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, OperatorApiConnectionInner> beginUpdate(
+ String resourceGroupName, String operatorApiConnectionName, OperatorApiConnectionUpdate properties) {
+ return this.beginUpdateAsync(resourceGroupName, operatorApiConnectionName, properties).getSyncPoller();
+ }
+
+ /**
+ * Update an Operator API Connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param operatorApiConnectionName Azure Programmable Connectivity (APC) Operator API Connection Name.
+ * @param properties The resource properties to be updated.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of a Programmable Connectivity Operator API Connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, OperatorApiConnectionInner> beginUpdate(
+ String resourceGroupName, String operatorApiConnectionName, OperatorApiConnectionUpdate properties,
+ Context context) {
+ return this.beginUpdateAsync(resourceGroupName, operatorApiConnectionName, properties, context).getSyncPoller();
+ }
+
+ /**
+ * Update an Operator API Connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param operatorApiConnectionName Azure Programmable Connectivity (APC) Operator API Connection Name.
+ * @param properties The resource properties to be updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Programmable Connectivity Operator API Connection resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(String resourceGroupName, String operatorApiConnectionName,
+ OperatorApiConnectionUpdate properties) {
+ return beginUpdateAsync(resourceGroupName, operatorApiConnectionName, properties).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Update an Operator API Connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param operatorApiConnectionName Azure Programmable Connectivity (APC) Operator API Connection Name.
+ * @param properties The resource properties to be updated.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Programmable Connectivity Operator API Connection resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(String resourceGroupName, String operatorApiConnectionName,
+ OperatorApiConnectionUpdate properties, Context context) {
+ return beginUpdateAsync(resourceGroupName, operatorApiConnectionName, properties, context).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Update an Operator API Connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param operatorApiConnectionName Azure Programmable Connectivity (APC) Operator API Connection Name.
+ * @param properties The resource properties to be updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Programmable Connectivity Operator API Connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OperatorApiConnectionInner update(String resourceGroupName, String operatorApiConnectionName,
+ OperatorApiConnectionUpdate properties) {
+ return updateAsync(resourceGroupName, operatorApiConnectionName, properties).block();
+ }
+
+ /**
+ * Update an Operator API Connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param operatorApiConnectionName Azure Programmable Connectivity (APC) Operator API Connection Name.
+ * @param properties The resource properties to be updated.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Programmable Connectivity Operator API Connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OperatorApiConnectionInner update(String resourceGroupName, String operatorApiConnectionName,
+ OperatorApiConnectionUpdate properties, Context context) {
+ return updateAsync(resourceGroupName, operatorApiConnectionName, properties, context).block();
+ }
+
+ /**
+ * Delete an Operator API Connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param operatorApiConnectionName Azure Programmable Connectivity (APC) Operator API Connection 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 the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(String resourceGroupName,
+ String operatorApiConnectionName) {
+ 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 (operatorApiConnectionName == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter operatorApiConnectionName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, operatorApiConnectionName, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Delete an Operator API Connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param operatorApiConnectionName Azure Programmable Connectivity (APC) Operator API Connection 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 the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(String resourceGroupName,
+ String operatorApiConnectionName, 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 (operatorApiConnectionName == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter operatorApiConnectionName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, operatorApiConnectionName, accept, context);
+ }
+
+ /**
+ * Delete an Operator API Connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param operatorApiConnectionName Azure Programmable Connectivity (APC) Operator API Connection 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 the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(String resourceGroupName,
+ String operatorApiConnectionName) {
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, operatorApiConnectionName);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Delete an Operator API Connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param operatorApiConnectionName Azure Programmable Connectivity (APC) Operator API Connection 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 the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(String resourceGroupName,
+ String operatorApiConnectionName, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono
+ = deleteWithResponseAsync(resourceGroupName, operatorApiConnectionName, context);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
+ context);
+ }
+
+ /**
+ * Delete an Operator API Connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param operatorApiConnectionName Azure Programmable Connectivity (APC) Operator API Connection 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 the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(String resourceGroupName, String operatorApiConnectionName) {
+ return this.beginDeleteAsync(resourceGroupName, operatorApiConnectionName).getSyncPoller();
+ }
+
+ /**
+ * Delete an Operator API Connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param operatorApiConnectionName Azure Programmable Connectivity (APC) Operator API Connection 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 the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(String resourceGroupName, String operatorApiConnectionName,
+ Context context) {
+ return this.beginDeleteAsync(resourceGroupName, operatorApiConnectionName, context).getSyncPoller();
+ }
+
+ /**
+ * Delete an Operator API Connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param operatorApiConnectionName Azure Programmable Connectivity (APC) Operator API Connection 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 A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String operatorApiConnectionName) {
+ return beginDeleteAsync(resourceGroupName, operatorApiConnectionName).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Delete an Operator API Connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param operatorApiConnectionName Azure Programmable Connectivity (APC) Operator API Connection 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 A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String operatorApiConnectionName, Context context) {
+ return beginDeleteAsync(resourceGroupName, operatorApiConnectionName, context).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Delete an Operator API Connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param operatorApiConnectionName Azure Programmable Connectivity (APC) Operator API Connection 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String operatorApiConnectionName) {
+ deleteAsync(resourceGroupName, operatorApiConnectionName).block();
+ }
+
+ /**
+ * Delete an Operator API Connection.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param operatorApiConnectionName Azure Programmable Connectivity (APC) Operator API Connection 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String operatorApiConnectionName, Context context) {
+ deleteAsync(resourceGroupName, operatorApiConnectionName, context).block();
+ }
+
+ /**
+ * List OperatorApiConnection resources by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a OperatorApiConnection list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>
+ listByResourceGroupSinglePageAsync(String resourceGroupName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(),
+ res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * List OperatorApiConnection resources by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a OperatorApiConnection list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+
+ /**
+ * List OperatorApiConnection resources by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a OperatorApiConnection list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
+ return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List OperatorApiConnection resources by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a OperatorApiConnection list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) {
+ return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List OperatorApiConnection resources by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a OperatorApiConnection list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName));
+ }
+
+ /**
+ * List OperatorApiConnection resources by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a OperatorApiConnection list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context));
+ }
+
+ /**
+ * List OperatorApiConnection resources by subscription ID.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a OperatorApiConnection list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync() {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(),
+ res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * List OperatorApiConnection resources by subscription ID.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a OperatorApiConnection list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept,
+ context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+
+ /**
+ * List OperatorApiConnection resources by subscription ID.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a OperatorApiConnection list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(() -> listSinglePageAsync(),
+ nextLink -> listBySubscriptionNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List OperatorApiConnection resources by subscription ID.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a OperatorApiConnection list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(Context context) {
+ return new PagedFlux<>(() -> listSinglePageAsync(context),
+ nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List OperatorApiConnection resources by subscription ID.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a OperatorApiConnection list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ return new PagedIterable<>(listAsync());
+ }
+
+ /**
+ * List OperatorApiConnection resources by subscription ID.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a OperatorApiConnection list 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 a OperatorApiConnection list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(),
+ res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a OperatorApiConnection list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupNextSinglePageAsync(String nextLink,
+ Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a OperatorApiConnection list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(),
+ res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a OperatorApiConnection list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySubscriptionNextSinglePageAsync(String nextLink,
+ Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+}
diff --git a/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/implementation/OperatorApiConnectionsImpl.java b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/implementation/OperatorApiConnectionsImpl.java
new file mode 100644
index 000000000000..e5f798eb0da1
--- /dev/null
+++ b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/implementation/OperatorApiConnectionsImpl.java
@@ -0,0 +1,149 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.programmableconnectivity.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.programmableconnectivity.fluent.OperatorApiConnectionsClient;
+import com.azure.resourcemanager.programmableconnectivity.fluent.models.OperatorApiConnectionInner;
+import com.azure.resourcemanager.programmableconnectivity.models.OperatorApiConnection;
+import com.azure.resourcemanager.programmableconnectivity.models.OperatorApiConnections;
+
+public final class OperatorApiConnectionsImpl implements OperatorApiConnections {
+ private static final ClientLogger LOGGER = new ClientLogger(OperatorApiConnectionsImpl.class);
+
+ private final OperatorApiConnectionsClient innerClient;
+
+ private final com.azure.resourcemanager.programmableconnectivity.ProgrammableConnectivityManager serviceManager;
+
+ public OperatorApiConnectionsImpl(OperatorApiConnectionsClient innerClient,
+ com.azure.resourcemanager.programmableconnectivity.ProgrammableConnectivityManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response getByResourceGroupWithResponse(String resourceGroupName,
+ String operatorApiConnectionName, Context context) {
+ Response inner = this.serviceClient()
+ .getByResourceGroupWithResponse(resourceGroupName, operatorApiConnectionName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new OperatorApiConnectionImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public OperatorApiConnection getByResourceGroup(String resourceGroupName, String operatorApiConnectionName) {
+ OperatorApiConnectionInner inner
+ = this.serviceClient().getByResourceGroup(resourceGroupName, operatorApiConnectionName);
+ if (inner != null) {
+ return new OperatorApiConnectionImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public void deleteByResourceGroup(String resourceGroupName, String operatorApiConnectionName) {
+ this.serviceClient().delete(resourceGroupName, operatorApiConnectionName);
+ }
+
+ public void delete(String resourceGroupName, String operatorApiConnectionName, Context context) {
+ this.serviceClient().delete(resourceGroupName, operatorApiConnectionName, context);
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new OperatorApiConnectionImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ PagedIterable inner
+ = this.serviceClient().listByResourceGroup(resourceGroupName, context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new OperatorApiConnectionImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new OperatorApiConnectionImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(Context context) {
+ PagedIterable inner = this.serviceClient().list(context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new OperatorApiConnectionImpl(inner1, this.manager()));
+ }
+
+ public OperatorApiConnection 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 operatorApiConnectionName = ResourceManagerUtils.getValueFromIdByName(id, "operatorApiConnections");
+ if (operatorApiConnectionName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(String
+ .format("The resource ID '%s' is not valid. Missing path segment 'operatorApiConnections'.", id)));
+ }
+ return this.getByResourceGroupWithResponse(resourceGroupName, operatorApiConnectionName, 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 operatorApiConnectionName = ResourceManagerUtils.getValueFromIdByName(id, "operatorApiConnections");
+ if (operatorApiConnectionName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(String
+ .format("The resource ID '%s' is not valid. Missing path segment 'operatorApiConnections'.", id)));
+ }
+ return this.getByResourceGroupWithResponse(resourceGroupName, operatorApiConnectionName, 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 operatorApiConnectionName = ResourceManagerUtils.getValueFromIdByName(id, "operatorApiConnections");
+ if (operatorApiConnectionName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(String
+ .format("The resource ID '%s' is not valid. Missing path segment 'operatorApiConnections'.", id)));
+ }
+ this.delete(resourceGroupName, operatorApiConnectionName, Context.NONE);
+ }
+
+ public void deleteByIdWithResponse(String id, Context context) {
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String operatorApiConnectionName = ResourceManagerUtils.getValueFromIdByName(id, "operatorApiConnections");
+ if (operatorApiConnectionName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(String
+ .format("The resource ID '%s' is not valid. Missing path segment 'operatorApiConnections'.", id)));
+ }
+ this.delete(resourceGroupName, operatorApiConnectionName, context);
+ }
+
+ private OperatorApiConnectionsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.programmableconnectivity.ProgrammableConnectivityManager manager() {
+ return this.serviceManager;
+ }
+
+ public OperatorApiConnectionImpl define(String name) {
+ return new OperatorApiConnectionImpl(name, this.manager());
+ }
+}
diff --git a/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/implementation/OperatorApiPlanImpl.java b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/implementation/OperatorApiPlanImpl.java
new file mode 100644
index 000000000000..81ea53129df7
--- /dev/null
+++ b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/implementation/OperatorApiPlanImpl.java
@@ -0,0 +1,50 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.programmableconnectivity.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.programmableconnectivity.fluent.models.OperatorApiPlanInner;
+import com.azure.resourcemanager.programmableconnectivity.models.OperatorApiPlan;
+import com.azure.resourcemanager.programmableconnectivity.models.OperatorApiPlanProperties;
+
+public final class OperatorApiPlanImpl implements OperatorApiPlan {
+ private OperatorApiPlanInner innerObject;
+
+ private final com.azure.resourcemanager.programmableconnectivity.ProgrammableConnectivityManager serviceManager;
+
+ OperatorApiPlanImpl(OperatorApiPlanInner innerObject,
+ com.azure.resourcemanager.programmableconnectivity.ProgrammableConnectivityManager 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 OperatorApiPlanProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public OperatorApiPlanInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.programmableconnectivity.ProgrammableConnectivityManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/implementation/OperatorApiPlansClientImpl.java b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/implementation/OperatorApiPlansClientImpl.java
new file mode 100644
index 000000000000..65fced05e3fd
--- /dev/null
+++ b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/implementation/OperatorApiPlansClientImpl.java
@@ -0,0 +1,397 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.programmableconnectivity.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.programmableconnectivity.fluent.OperatorApiPlansClient;
+import com.azure.resourcemanager.programmableconnectivity.fluent.models.OperatorApiPlanInner;
+import com.azure.resourcemanager.programmableconnectivity.implementation.models.OperatorApiPlanListResult;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in OperatorApiPlansClient.
+ */
+public final class OperatorApiPlansClientImpl implements OperatorApiPlansClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final OperatorApiPlansService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final ProgrammableConnectivityMgmtClientImpl client;
+
+ /**
+ * Initializes an instance of OperatorApiPlansClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ OperatorApiPlansClientImpl(ProgrammableConnectivityMgmtClientImpl client) {
+ this.service
+ = RestProxy.create(OperatorApiPlansService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for ProgrammableConnectivityMgmtClientOperatorApiPlans to be used by the
+ * proxy service to perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "ProgrammableConnecti")
+ public interface OperatorApiPlansService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ProgrammableConnectivity/operatorApiPlans/{operatorApiPlanName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("operatorApiPlanName") String operatorApiPlanName, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ProgrammableConnectivity/operatorApiPlans")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("$filter") String filter, @QueryParam("$top") Integer top, @QueryParam("$skip") Integer skip,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listBySubscriptionNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * Get an OperatorApiPlan resource by name.
+ *
+ * @param operatorApiPlanName APC Gateway Plan 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 an OperatorApiPlan resource by name along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String operatorApiPlanName) {
+ 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 (operatorApiPlanName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter operatorApiPlanName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), operatorApiPlanName, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get an OperatorApiPlan resource by name.
+ *
+ * @param operatorApiPlanName APC Gateway Plan 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 an OperatorApiPlan resource by name along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String operatorApiPlanName, 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 (operatorApiPlanName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter operatorApiPlanName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ operatorApiPlanName, accept, context);
+ }
+
+ /**
+ * Get an OperatorApiPlan resource by name.
+ *
+ * @param operatorApiPlanName APC Gateway Plan 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 an OperatorApiPlan resource by name on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String operatorApiPlanName) {
+ return getWithResponseAsync(operatorApiPlanName).flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get an OperatorApiPlan resource by name.
+ *
+ * @param operatorApiPlanName APC Gateway Plan 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 an OperatorApiPlan resource by name along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(String operatorApiPlanName, Context context) {
+ return getWithResponseAsync(operatorApiPlanName, context).block();
+ }
+
+ /**
+ * Get an OperatorApiPlan resource by name.
+ *
+ * @param operatorApiPlanName APC Gateway Plan 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 an OperatorApiPlan resource by name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OperatorApiPlanInner get(String operatorApiPlanName) {
+ return getWithResponse(operatorApiPlanName, Context.NONE).getValue();
+ }
+
+ /**
+ * List OperatorApiPlan resources by subscription ID.
+ *
+ * @param filter An optional OData based filter expression to apply on the operation.
+ * @param top An optional query parameter which specifies the maximum number of records to be returned.
+ * @param skip An optional query parameter which specifies the number of records to be skipped.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a OperatorApiPlan list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(String filter, Integer top, Integer skip) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), filter, top, skip, accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(),
+ res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * List OperatorApiPlan resources by subscription ID.
+ *
+ * @param filter An optional OData based filter expression to apply on the operation.
+ * @param top An optional query parameter which specifies the maximum number of records to be returned.
+ * @param skip An optional query parameter which specifies the number of records to be skipped.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a OperatorApiPlan list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(String filter, Integer top, Integer skip,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), filter, top,
+ skip, accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+
+ /**
+ * List OperatorApiPlan resources by subscription ID.
+ *
+ * @param filter An optional OData based filter expression to apply on the operation.
+ * @param top An optional query parameter which specifies the maximum number of records to be returned.
+ * @param skip An optional query parameter which specifies the number of records to be skipped.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a OperatorApiPlan list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String filter, Integer top, Integer skip) {
+ return new PagedFlux<>(() -> listSinglePageAsync(filter, top, skip),
+ nextLink -> listBySubscriptionNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List OperatorApiPlan resources by subscription ID.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a OperatorApiPlan list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ final String filter = null;
+ final Integer top = null;
+ final Integer skip = null;
+ return new PagedFlux<>(() -> listSinglePageAsync(filter, top, skip),
+ nextLink -> listBySubscriptionNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List OperatorApiPlan resources by subscription ID.
+ *
+ * @param filter An optional OData based filter expression to apply on the operation.
+ * @param top An optional query parameter which specifies the maximum number of records to be returned.
+ * @param skip An optional query parameter which specifies the number of records to be skipped.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a OperatorApiPlan list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String filter, Integer top, Integer skip, Context context) {
+ return new PagedFlux<>(() -> listSinglePageAsync(filter, top, skip, context),
+ nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List OperatorApiPlan resources by subscription ID.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a OperatorApiPlan list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ final String filter = null;
+ final Integer top = null;
+ final Integer skip = null;
+ return new PagedIterable<>(listAsync(filter, top, skip));
+ }
+
+ /**
+ * List OperatorApiPlan resources by subscription ID.
+ *
+ * @param filter An optional OData based filter expression to apply on the operation.
+ * @param top An optional query parameter which specifies the maximum number of records to be returned.
+ * @param skip An optional query parameter which specifies the number of records to be skipped.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a OperatorApiPlan list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String filter, Integer top, Integer skip, Context context) {
+ return new PagedIterable<>(listAsync(filter, top, skip, 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 a OperatorApiPlan list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(),
+ res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a OperatorApiPlan list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySubscriptionNextSinglePageAsync(String nextLink,
+ Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+}
diff --git a/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/implementation/OperatorApiPlansImpl.java b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/implementation/OperatorApiPlansImpl.java
new file mode 100644
index 000000000000..d75741a00593
--- /dev/null
+++ b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/implementation/OperatorApiPlansImpl.java
@@ -0,0 +1,66 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.programmableconnectivity.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.programmableconnectivity.fluent.OperatorApiPlansClient;
+import com.azure.resourcemanager.programmableconnectivity.fluent.models.OperatorApiPlanInner;
+import com.azure.resourcemanager.programmableconnectivity.models.OperatorApiPlan;
+import com.azure.resourcemanager.programmableconnectivity.models.OperatorApiPlans;
+
+public final class OperatorApiPlansImpl implements OperatorApiPlans {
+ private static final ClientLogger LOGGER = new ClientLogger(OperatorApiPlansImpl.class);
+
+ private final OperatorApiPlansClient innerClient;
+
+ private final com.azure.resourcemanager.programmableconnectivity.ProgrammableConnectivityManager serviceManager;
+
+ public OperatorApiPlansImpl(OperatorApiPlansClient innerClient,
+ com.azure.resourcemanager.programmableconnectivity.ProgrammableConnectivityManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response getWithResponse(String operatorApiPlanName, Context context) {
+ Response inner = this.serviceClient().getWithResponse(operatorApiPlanName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new OperatorApiPlanImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public OperatorApiPlan get(String operatorApiPlanName) {
+ OperatorApiPlanInner inner = this.serviceClient().get(operatorApiPlanName);
+ if (inner != null) {
+ return new OperatorApiPlanImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new OperatorApiPlanImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(String filter, Integer top, Integer skip, Context context) {
+ PagedIterable inner = this.serviceClient().list(filter, top, skip, context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new OperatorApiPlanImpl(inner1, this.manager()));
+ }
+
+ private OperatorApiPlansClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.programmableconnectivity.ProgrammableConnectivityManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/implementation/ProgrammableConnectivityMgmtClientBuilder.java b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/implementation/ProgrammableConnectivityMgmtClientBuilder.java
new file mode 100644
index 000000000000..26e039d92335
--- /dev/null
+++ b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/implementation/ProgrammableConnectivityMgmtClientBuilder.java
@@ -0,0 +1,138 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.programmableconnectivity.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 ProgrammableConnectivityMgmtClientImpl type.
+ */
+@ServiceClientBuilder(serviceClients = { ProgrammableConnectivityMgmtClientImpl.class })
+public final class ProgrammableConnectivityMgmtClientBuilder {
+ /*
+ * Service host
+ */
+ private String endpoint;
+
+ /**
+ * Sets Service host.
+ *
+ * @param endpoint the endpoint value.
+ * @return the ProgrammableConnectivityMgmtClientBuilder.
+ */
+ public ProgrammableConnectivityMgmtClientBuilder endpoint(String endpoint) {
+ this.endpoint = endpoint;
+ return this;
+ }
+
+ /*
+ * The ID of the target subscription. The value must be an UUID.
+ */
+ private String subscriptionId;
+
+ /**
+ * Sets The ID of the target subscription. The value must be an UUID.
+ *
+ * @param subscriptionId the subscriptionId value.
+ * @return the ProgrammableConnectivityMgmtClientBuilder.
+ */
+ public ProgrammableConnectivityMgmtClientBuilder subscriptionId(String subscriptionId) {
+ this.subscriptionId = subscriptionId;
+ return this;
+ }
+
+ /*
+ * The environment to connect to
+ */
+ private AzureEnvironment environment;
+
+ /**
+ * Sets The environment to connect to.
+ *
+ * @param environment the environment value.
+ * @return the ProgrammableConnectivityMgmtClientBuilder.
+ */
+ public ProgrammableConnectivityMgmtClientBuilder 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 ProgrammableConnectivityMgmtClientBuilder.
+ */
+ public ProgrammableConnectivityMgmtClientBuilder 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 ProgrammableConnectivityMgmtClientBuilder.
+ */
+ public ProgrammableConnectivityMgmtClientBuilder 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 ProgrammableConnectivityMgmtClientBuilder.
+ */
+ public ProgrammableConnectivityMgmtClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) {
+ this.serializerAdapter = serializerAdapter;
+ return this;
+ }
+
+ /**
+ * Builds an instance of ProgrammableConnectivityMgmtClientImpl with the provided parameters.
+ *
+ * @return an instance of ProgrammableConnectivityMgmtClientImpl.
+ */
+ public ProgrammableConnectivityMgmtClientImpl 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();
+ ProgrammableConnectivityMgmtClientImpl client = new ProgrammableConnectivityMgmtClientImpl(localPipeline,
+ localSerializerAdapter, localDefaultPollInterval, localEnvironment, localEndpoint, this.subscriptionId);
+ return client;
+ }
+}
diff --git a/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/implementation/ProgrammableConnectivityMgmtClientImpl.java b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/implementation/ProgrammableConnectivityMgmtClientImpl.java
new file mode 100644
index 000000000000..3752484db5a8
--- /dev/null
+++ b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/implementation/ProgrammableConnectivityMgmtClientImpl.java
@@ -0,0 +1,336 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.programmableconnectivity.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.programmableconnectivity.fluent.GatewaysClient;
+import com.azure.resourcemanager.programmableconnectivity.fluent.OperationsClient;
+import com.azure.resourcemanager.programmableconnectivity.fluent.OperatorApiConnectionsClient;
+import com.azure.resourcemanager.programmableconnectivity.fluent.OperatorApiPlansClient;
+import com.azure.resourcemanager.programmableconnectivity.fluent.ProgrammableConnectivityMgmtClient;
+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 ProgrammableConnectivityMgmtClientImpl type.
+ */
+@ServiceClient(builder = ProgrammableConnectivityMgmtClientBuilder.class)
+public final class ProgrammableConnectivityMgmtClientImpl implements ProgrammableConnectivityMgmtClient {
+ /**
+ * Service host.
+ */
+ private final String endpoint;
+
+ /**
+ * Gets Service host.
+ *
+ * @return the endpoint value.
+ */
+ public String getEndpoint() {
+ return this.endpoint;
+ }
+
+ /**
+ * Version parameter.
+ */
+ private final String apiVersion;
+
+ /**
+ * Gets Version parameter.
+ *
+ * @return the apiVersion value.
+ */
+ public String getApiVersion() {
+ return this.apiVersion;
+ }
+
+ /**
+ * The ID of the target subscription. The value must be an UUID.
+ */
+ private final String subscriptionId;
+
+ /**
+ * Gets The ID of the target subscription. The value must be an UUID.
+ *
+ * @return the subscriptionId value.
+ */
+ public String getSubscriptionId() {
+ return this.subscriptionId;
+ }
+
+ /**
+ * The HTTP pipeline to send requests through.
+ */
+ private final HttpPipeline httpPipeline;
+
+ /**
+ * Gets The HTTP pipeline to send requests through.
+ *
+ * @return the httpPipeline value.
+ */
+ public HttpPipeline getHttpPipeline() {
+ return this.httpPipeline;
+ }
+
+ /**
+ * The serializer to serialize an object into a string.
+ */
+ private final SerializerAdapter serializerAdapter;
+
+ /**
+ * Gets The serializer to serialize an object into a string.
+ *
+ * @return the serializerAdapter value.
+ */
+ SerializerAdapter getSerializerAdapter() {
+ return this.serializerAdapter;
+ }
+
+ /**
+ * The default poll interval for long-running operation.
+ */
+ private final Duration defaultPollInterval;
+
+ /**
+ * Gets The default poll interval for long-running operation.
+ *
+ * @return the defaultPollInterval value.
+ */
+ public Duration getDefaultPollInterval() {
+ return this.defaultPollInterval;
+ }
+
+ /**
+ * The OperationsClient object to access its operations.
+ */
+ private final OperationsClient operations;
+
+ /**
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ public OperationsClient getOperations() {
+ return this.operations;
+ }
+
+ /**
+ * The GatewaysClient object to access its operations.
+ */
+ private final GatewaysClient gateways;
+
+ /**
+ * Gets the GatewaysClient object to access its operations.
+ *
+ * @return the GatewaysClient object.
+ */
+ public GatewaysClient getGateways() {
+ return this.gateways;
+ }
+
+ /**
+ * The OperatorApiConnectionsClient object to access its operations.
+ */
+ private final OperatorApiConnectionsClient operatorApiConnections;
+
+ /**
+ * Gets the OperatorApiConnectionsClient object to access its operations.
+ *
+ * @return the OperatorApiConnectionsClient object.
+ */
+ public OperatorApiConnectionsClient getOperatorApiConnections() {
+ return this.operatorApiConnections;
+ }
+
+ /**
+ * The OperatorApiPlansClient object to access its operations.
+ */
+ private final OperatorApiPlansClient operatorApiPlans;
+
+ /**
+ * Gets the OperatorApiPlansClient object to access its operations.
+ *
+ * @return the OperatorApiPlansClient object.
+ */
+ public OperatorApiPlansClient getOperatorApiPlans() {
+ return this.operatorApiPlans;
+ }
+
+ /**
+ * Initializes an instance of ProgrammableConnectivityMgmtClient client.
+ *
+ * @param httpPipeline The HTTP pipeline to send requests through.
+ * @param serializerAdapter The serializer to serialize an object into a string.
+ * @param defaultPollInterval The default poll interval for long-running operation.
+ * @param environment The Azure environment.
+ * @param endpoint Service host.
+ * @param subscriptionId The ID of the target subscription. The value must be an UUID.
+ */
+ ProgrammableConnectivityMgmtClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter,
+ Duration defaultPollInterval, AzureEnvironment environment, String endpoint, String subscriptionId) {
+ this.httpPipeline = httpPipeline;
+ this.serializerAdapter = serializerAdapter;
+ this.defaultPollInterval = defaultPollInterval;
+ this.endpoint = endpoint;
+ this.subscriptionId = subscriptionId;
+ this.apiVersion = "2025-03-30-preview";
+ this.operations = new OperationsClientImpl(this);
+ this.gateways = new GatewaysClientImpl(this);
+ this.operatorApiConnections = new OperatorApiConnectionsClientImpl(this);
+ this.operatorApiPlans = new OperatorApiPlansClientImpl(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