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 ProgrammableConnectivity service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the ProgrammableConnectivity service API instance.
+ */
+ public ProgrammableConnectivityManager authenticate(TokenCredential credential, AzureProfile profile) {
+ Objects.requireNonNull(credential, "'credential' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+
+ StringBuilder userAgentBuilder = new StringBuilder();
+ userAgentBuilder.append("azsdk-java")
+ .append("-")
+ .append("com.azure.resourcemanager.programmableconnectivity")
+ .append("/")
+ .append("1.0.0-beta.1");
+ if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
+ userAgentBuilder.append(" (")
+ .append(Configuration.getGlobalConfiguration().get("java.version"))
+ .append("; ")
+ .append(Configuration.getGlobalConfiguration().get("os.name"))
+ .append("; ")
+ .append(Configuration.getGlobalConfiguration().get("os.version"))
+ .append("; auto-generated)");
+ } else {
+ userAgentBuilder.append(" (auto-generated)");
+ }
+
+ if (scopes.isEmpty()) {
+ scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
+ }
+ if (retryPolicy == null) {
+ if (retryOptions != null) {
+ retryPolicy = new RetryPolicy(retryOptions);
+ } else {
+ retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ }
+ }
+ List policies = new ArrayList<>();
+ policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
+ policies.add(new AddHeadersFromContextPolicy());
+ policies.add(new RequestIdPolicy());
+ policies.addAll(this.policies.stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
+ .collect(Collectors.toList()));
+ HttpPolicyProviders.addBeforeRetryPolicies(policies);
+ policies.add(retryPolicy);
+ policies.add(new AddDatePolicy());
+ policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
+ policies.addAll(this.policies.stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
+ .collect(Collectors.toList()));
+ HttpPolicyProviders.addAfterRetryPolicies(policies);
+ policies.add(new HttpLoggingPolicy(httpLogOptions));
+ HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient)
+ .policies(policies.toArray(new HttpPipelinePolicy[0]))
+ .build();
+ return new 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 ProgrammableConnectivity providing direct access to the underlying auto-generated API
+ * implementation, based on Azure REST API.
+ *
+ * @return Wrapped service client ProgrammableConnectivity.
+ */
+ public ProgrammableConnectivity 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..fbba25b69fa3
--- /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) AutoRest 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 {
+ /**
+ * 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);
+
+ /**
+ * 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);
+
+ /**
+ * 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);
+}
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..83fbb1fa5e85
--- /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) AutoRest 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..742960672eeb
--- /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) AutoRest 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 {
+ /**
+ * 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);
+
+ /**
+ * 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);
+
+ /**
+ * 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);
+}
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..68c8aadfeae3
--- /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) AutoRest 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 {
+ /**
+ * 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);
+
+ /**
+ * 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);
+}
diff --git a/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/fluent/ProgrammableConnectivity.java b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/fluent/ProgrammableConnectivity.java
new file mode 100644
index 000000000000..5c0c7dda4a9a
--- /dev/null
+++ b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/fluent/ProgrammableConnectivity.java
@@ -0,0 +1,76 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.programmableconnectivity.fluent;
+
+import com.azure.core.http.HttpPipeline;
+import java.time.Duration;
+
+/**
+ * The interface for ProgrammableConnectivity class.
+ */
+public interface ProgrammableConnectivity {
+ /**
+ * Gets The ID of the target subscription. The value must be an UUID.
+ *
+ * @return the subscriptionId value.
+ */
+ String getSubscriptionId();
+
+ /**
+ * Gets server parameter.
+ *
+ * @return the endpoint value.
+ */
+ String getEndpoint();
+
+ /**
+ * Gets Api Version.
+ *
+ * @return the apiVersion value.
+ */
+ String getApiVersion();
+
+ /**
+ * Gets The HTTP pipeline to send requests through.
+ *
+ * @return the httpPipeline value.
+ */
+ HttpPipeline getHttpPipeline();
+
+ /**
+ * Gets The default poll interval for long-running operation.
+ *
+ * @return the defaultPollInterval value.
+ */
+ Duration getDefaultPollInterval();
+
+ /**
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ OperationsClient getOperations();
+
+ /**
+ * Gets the 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..19e0775b18f9
--- /dev/null
+++ b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/fluent/models/GatewayInner.java
@@ -0,0 +1,217 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.programmableconnectivity.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.Resource;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.programmableconnectivity.models.ProvisioningState;
+import java.io.IOException;
+import java.util.List;
+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 innerProperties;
+
+ /*
+ * 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 innerProperties property: The resource-specific properties for this resource.
+ *
+ * @return the innerProperties value.
+ */
+ private GatewayProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * 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;
+ }
+
+ /**
+ * Get the operatorApiConnections property: List of Operator API Connections selected by the user.
+ *
+ * @return the operatorApiConnections value.
+ */
+ public List operatorApiConnections() {
+ return this.innerProperties() == null ? null : this.innerProperties().operatorApiConnections();
+ }
+
+ /**
+ * Get the gatewayBaseUrl property: Base URL of the Gateway resource. This is the URL that the users would use to
+ * make Open API Gateway requests to the Operators via Azure.
+ *
+ * @return the gatewayBaseUrl value.
+ */
+ public String gatewayBaseUrl() {
+ return this.innerProperties() == null ? null : this.innerProperties().gatewayBaseUrl();
+ }
+
+ /**
+ * Get the provisioningState property: The status of the last operation on the Gateway resource.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ if (location() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Missing required property location in model GatewayInner"));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(GatewayInner.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("location", location());
+ jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element));
+ jsonWriter.writeJsonField("properties", this.innerProperties);
+ 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.innerProperties = 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/GatewayProperties.java b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/fluent/models/GatewayProperties.java
new file mode 100644
index 000000000000..e9b8ad78eb8d
--- /dev/null
+++ b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/fluent/models/GatewayProperties.java
@@ -0,0 +1,118 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest 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.ProvisioningState;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * Gateway resource properties.
+ */
+@Immutable
+public final class GatewayProperties implements JsonSerializable {
+ /*
+ * List of Operator API Connections selected by the user
+ */
+ private List operatorApiConnections;
+
+ /*
+ * Base URL of the Gateway resource. This is the URL that the users would use to make Open API Gateway requests to
+ * the Operators via Azure.
+ */
+ private String gatewayBaseUrl;
+
+ /*
+ * The status of the last operation on the Gateway resource.
+ */
+ private ProvisioningState provisioningState;
+
+ /**
+ * Creates an instance of GatewayProperties class.
+ */
+ public GatewayProperties() {
+ }
+
+ /**
+ * Get the operatorApiConnections property: List of Operator API Connections selected by the user.
+ *
+ * @return the operatorApiConnections value.
+ */
+ public List operatorApiConnections() {
+ return this.operatorApiConnections;
+ }
+
+ /**
+ * Get the gatewayBaseUrl property: Base URL of the Gateway resource. This is the URL that the users would use to
+ * make Open API Gateway requests to the Operators via Azure.
+ *
+ * @return the gatewayBaseUrl value.
+ */
+ public String gatewayBaseUrl() {
+ return this.gatewayBaseUrl;
+ }
+
+ /**
+ * Get the provisioningState property: The status of the last operation on the Gateway resource.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of GatewayProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of GatewayProperties 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 GatewayProperties.
+ */
+ public static GatewayProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ GatewayProperties deserializedGatewayProperties = new GatewayProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("operatorApiConnections".equals(fieldName)) {
+ List operatorApiConnections = reader.readArray(reader1 -> reader1.getString());
+ deserializedGatewayProperties.operatorApiConnections = operatorApiConnections;
+ } else if ("gatewayBaseUrl".equals(fieldName)) {
+ deserializedGatewayProperties.gatewayBaseUrl = reader.getString();
+ } else if ("provisioningState".equals(fieldName)) {
+ deserializedGatewayProperties.provisioningState = ProvisioningState.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedGatewayProperties;
+ });
+ }
+}
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..a50f62d16c3a
--- /dev/null
+++ b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/fluent/models/OperationInner.java
@@ -0,0 +1,172 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.programmableconnectivity.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.programmableconnectivity.models.ActionType;
+import com.azure.resourcemanager.programmableconnectivity.models.OperationDisplay;
+import com.azure.resourcemanager.programmableconnectivity.models.Origin;
+import java.io.IOException;
+
+/**
+ * REST API Operation
+ *
+ * Details of a REST API operation, returned from the Resource Provider Operations API.
+ */
+@Fluent
+public final class OperationInner implements JsonSerializable {
+ /*
+ * The name of the operation, as per Resource-Based Access Control (RBAC). Examples:
+ * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action"
+ */
+ private String name;
+
+ /*
+ * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for
+ * ARM/control-plane operations.
+ */
+ private Boolean isDataAction;
+
+ /*
+ * Localized display information for this particular operation.
+ */
+ private OperationDisplay display;
+
+ /*
+ * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default
+ * value is "user,system"
+ */
+ private Origin origin;
+
+ /*
+ * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
+ */
+ private ActionType actionType;
+
+ /**
+ * Creates an instance of OperationInner class.
+ */
+ public OperationInner() {
+ }
+
+ /**
+ * Get the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples:
+ * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action".
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane
+ * operations and "false" for ARM/control-plane operations.
+ *
+ * @return the isDataAction value.
+ */
+ public Boolean isDataAction() {
+ return this.isDataAction;
+ }
+
+ /**
+ * Get the display property: Localized display information for this particular operation.
+ *
+ * @return the display value.
+ */
+ public OperationDisplay display() {
+ return this.display;
+ }
+
+ /**
+ * Set the display property: Localized display information for this particular operation.
+ *
+ * @param display the display value to set.
+ * @return the OperationInner object itself.
+ */
+ public OperationInner withDisplay(OperationDisplay display) {
+ this.display = display;
+ return this;
+ }
+
+ /**
+ * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and
+ * audit logs UX. Default value is "user,system".
+ *
+ * @return the origin value.
+ */
+ public Origin origin() {
+ return this.origin;
+ }
+
+ /**
+ * Get the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal
+ * only APIs.
+ *
+ * @return the actionType value.
+ */
+ public ActionType actionType() {
+ return this.actionType;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (display() != null) {
+ display().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("display", this.display);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of OperationInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of OperationInner if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IOException If an error occurs while reading the OperationInner.
+ */
+ public static OperationInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ OperationInner deserializedOperationInner = new OperationInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("name".equals(fieldName)) {
+ deserializedOperationInner.name = reader.getString();
+ } else if ("isDataAction".equals(fieldName)) {
+ deserializedOperationInner.isDataAction = reader.getNullable(JsonReader::getBoolean);
+ } else if ("display".equals(fieldName)) {
+ deserializedOperationInner.display = OperationDisplay.fromJson(reader);
+ } else if ("origin".equals(fieldName)) {
+ deserializedOperationInner.origin = Origin.fromString(reader.getString());
+ } else if ("actionType".equals(fieldName)) {
+ deserializedOperationInner.actionType = ActionType.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedOperationInner;
+ });
+ }
+}
diff --git a/sdk/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..e6a08814fade
--- /dev/null
+++ b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/fluent/models/OperatorApiConnectionInner.java
@@ -0,0 +1,398 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest 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.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.programmableconnectivity.models.AccountType;
+import com.azure.resourcemanager.programmableconnectivity.models.ApplicationProperties;
+import com.azure.resourcemanager.programmableconnectivity.models.ProvisioningState;
+import com.azure.resourcemanager.programmableconnectivity.models.SaasProperties;
+import com.azure.resourcemanager.programmableconnectivity.models.Status;
+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 innerProperties;
+
+ /*
+ * 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 innerProperties property: The resource-specific properties for this resource.
+ *
+ * @return the innerProperties value.
+ */
+ private OperatorApiConnectionProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * 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;
+ }
+
+ /**
+ * Get the operatorApiPlanId property: Reference to the Operator API Plan Resource ID.
+ *
+ * @return the operatorApiPlanId value.
+ */
+ public String operatorApiPlanId() {
+ return this.innerProperties() == null ? null : this.innerProperties().operatorApiPlanId();
+ }
+
+ /**
+ * Set the operatorApiPlanId property: Reference to the Operator API Plan Resource ID.
+ *
+ * @param operatorApiPlanId the operatorApiPlanId value to set.
+ * @return the OperatorApiConnectionInner object itself.
+ */
+ public OperatorApiConnectionInner withOperatorApiPlanId(String operatorApiPlanId) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new OperatorApiConnectionProperties();
+ }
+ this.innerProperties().withOperatorApiPlanId(operatorApiPlanId);
+ return this;
+ }
+
+ /**
+ * Get the saasProperties property: Details about the SaaS offer purchased from the marketplace.
+ *
+ * @return the saasProperties value.
+ */
+ public SaasProperties saasProperties() {
+ return this.innerProperties() == null ? null : this.innerProperties().saasProperties();
+ }
+
+ /**
+ * Set the saasProperties property: Details about the SaaS offer purchased from the marketplace.
+ *
+ * @param saasProperties the saasProperties value to set.
+ * @return the OperatorApiConnectionInner object itself.
+ */
+ public OperatorApiConnectionInner withSaasProperties(SaasProperties saasProperties) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new OperatorApiConnectionProperties();
+ }
+ this.innerProperties().withSaasProperties(saasProperties);
+ return this;
+ }
+
+ /**
+ * Get the configuredApplication property: Details about the Application that would use the Operator's Network APIs.
+ *
+ * @return the configuredApplication value.
+ */
+ public ApplicationProperties configuredApplication() {
+ return this.innerProperties() == null ? null : this.innerProperties().configuredApplication();
+ }
+
+ /**
+ * Set the configuredApplication property: Details about the Application that would use the Operator's Network APIs.
+ *
+ * @param configuredApplication the configuredApplication value to set.
+ * @return the OperatorApiConnectionInner object itself.
+ */
+ public OperatorApiConnectionInner withConfiguredApplication(ApplicationProperties configuredApplication) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new OperatorApiConnectionProperties();
+ }
+ this.innerProperties().withConfiguredApplication(configuredApplication);
+ return this;
+ }
+
+ /**
+ * Get the appId property: Application ID of the App Developer that is registered with the Operator in a specific
+ * country/region.
+ *
+ * @return the appId value.
+ */
+ public String appId() {
+ return this.innerProperties() == null ? null : this.innerProperties().appId();
+ }
+
+ /**
+ * Set the appId property: Application ID of the App Developer that is registered with the Operator in a specific
+ * country/region.
+ *
+ * @param appId the appId value to set.
+ * @return the OperatorApiConnectionInner object itself.
+ */
+ public OperatorApiConnectionInner withAppId(String appId) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new OperatorApiConnectionProperties();
+ }
+ this.innerProperties().withAppId(appId);
+ return this;
+ }
+
+ /**
+ * Get the gatewayId property: Reference to the APC Gateway resource ID.
+ *
+ * @return the gatewayId value.
+ */
+ public String gatewayId() {
+ return this.innerProperties() == null ? null : this.innerProperties().gatewayId();
+ }
+
+ /**
+ * Set the gatewayId property: Reference to the APC Gateway resource ID.
+ *
+ * @param gatewayId the gatewayId value to set.
+ * @return the OperatorApiConnectionInner object itself.
+ */
+ public OperatorApiConnectionInner withGatewayId(String gatewayId) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new OperatorApiConnectionProperties();
+ }
+ this.innerProperties().withGatewayId(gatewayId);
+ return this;
+ }
+
+ /**
+ * Get the accountType property: Type of the account the user has with the Operator's Network API infrastructure.
+ * AzureManaged | UserManaged.
+ *
+ * @return the accountType value.
+ */
+ public AccountType accountType() {
+ return this.innerProperties() == null ? null : this.innerProperties().accountType();
+ }
+
+ /**
+ * Set the accountType property: Type of the account the user has with the Operator's Network API infrastructure.
+ * AzureManaged | UserManaged.
+ *
+ * @param accountType the accountType value to set.
+ * @return the OperatorApiConnectionInner object itself.
+ */
+ public OperatorApiConnectionInner withAccountType(AccountType accountType) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new OperatorApiConnectionProperties();
+ }
+ this.innerProperties().withAccountType(accountType);
+ return this;
+ }
+
+ /**
+ * Get the appSecret property: Application secret linked to the 'appId'. This should be stored securely and is not
+ * returned back when the resource information is read.
+ *
+ * @return the appSecret value.
+ */
+ public String appSecret() {
+ return this.innerProperties() == null ? null : this.innerProperties().appSecret();
+ }
+
+ /**
+ * Set the appSecret property: Application secret linked to the 'appId'. This should be stored securely and is not
+ * returned back when the resource information is read.
+ *
+ * @param appSecret the appSecret value to set.
+ * @return the OperatorApiConnectionInner object itself.
+ */
+ public OperatorApiConnectionInner withAppSecret(String appSecret) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new OperatorApiConnectionProperties();
+ }
+ this.innerProperties().withAppSecret(appSecret);
+ return this;
+ }
+
+ /**
+ * Get the operatorName property: Name of the Operator in the linked Operator API Plan belongs to.
+ *
+ * @return the operatorName value.
+ */
+ public String operatorName() {
+ return this.innerProperties() == null ? null : this.innerProperties().operatorName();
+ }
+
+ /**
+ * Get the camaraApiName property: The Network API for the current operator in the country/region provided in the
+ * linked Operator API Plan.
+ *
+ * @return the camaraApiName value.
+ */
+ public String camaraApiName() {
+ return this.innerProperties() == null ? null : this.innerProperties().camaraApiName();
+ }
+
+ /**
+ * Get the provisioningState property: The status of the last operation.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * Get the status property: The status of the OperatorApiConnection resource.
+ *
+ * @return the status value.
+ */
+ public Status status() {
+ return this.innerProperties() == null ? null : this.innerProperties().status();
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ if (location() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property location in model OperatorApiConnectionInner"));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(OperatorApiConnectionInner.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("location", location());
+ jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element));
+ jsonWriter.writeJsonField("properties", this.innerProperties);
+ 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.innerProperties
+ = 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/OperatorApiConnectionProperties.java b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/fluent/models/OperatorApiConnectionProperties.java
new file mode 100644
index 000000000000..985381081a0d
--- /dev/null
+++ b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/fluent/models/OperatorApiConnectionProperties.java
@@ -0,0 +1,370 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.programmableconnectivity.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.programmableconnectivity.models.AccountType;
+import com.azure.resourcemanager.programmableconnectivity.models.ApplicationProperties;
+import com.azure.resourcemanager.programmableconnectivity.models.ProvisioningState;
+import com.azure.resourcemanager.programmableconnectivity.models.SaasProperties;
+import com.azure.resourcemanager.programmableconnectivity.models.Status;
+import java.io.IOException;
+
+/**
+ * Operator API Connection resource properties that cannot be updated once a resource has been created.
+ */
+@Fluent
+public final class OperatorApiConnectionProperties implements JsonSerializable {
+ /*
+ * Reference to the Operator API Plan Resource ID.
+ */
+ private String operatorApiPlanId;
+
+ /*
+ * Details about the SaaS offer purchased from the marketplace.
+ */
+ private SaasProperties saasProperties;
+
+ /*
+ * Details about the Application that would use the Operator's Network APIs.
+ */
+ private ApplicationProperties configuredApplication;
+
+ /*
+ * Application ID of the App Developer that is registered with the Operator in a specific country/region.
+ */
+ private String appId;
+
+ /*
+ * Reference to the APC Gateway resource ID.
+ */
+ private String gatewayId;
+
+ /*
+ * Type of the account the user has with the Operator's Network API infrastructure. AzureManaged | UserManaged.
+ */
+ private AccountType accountType;
+
+ /*
+ * Application secret linked to the 'appId'. This should be stored securely and is not returned back when the
+ * resource information is read.
+ */
+ private String appSecret;
+
+ /*
+ * Name of the Operator in the linked Operator API Plan belongs to.
+ */
+ private String operatorName;
+
+ /*
+ * The Network API for the current operator in the country/region provided in the linked Operator API Plan.
+ */
+ private String camaraApiName;
+
+ /*
+ * The status of the last operation.
+ */
+ private ProvisioningState provisioningState;
+
+ /*
+ * The status of the OperatorApiConnection resource.
+ */
+ private Status status;
+
+ /**
+ * Creates an instance of OperatorApiConnectionProperties class.
+ */
+ public OperatorApiConnectionProperties() {
+ }
+
+ /**
+ * Get the operatorApiPlanId property: Reference to the Operator API Plan Resource ID.
+ *
+ * @return the operatorApiPlanId value.
+ */
+ public String operatorApiPlanId() {
+ return this.operatorApiPlanId;
+ }
+
+ /**
+ * Set the operatorApiPlanId property: Reference to the Operator API Plan Resource ID.
+ *
+ * @param operatorApiPlanId the operatorApiPlanId value to set.
+ * @return the OperatorApiConnectionProperties object itself.
+ */
+ public OperatorApiConnectionProperties withOperatorApiPlanId(String operatorApiPlanId) {
+ this.operatorApiPlanId = operatorApiPlanId;
+ return this;
+ }
+
+ /**
+ * Get the saasProperties property: Details about the SaaS offer purchased from the marketplace.
+ *
+ * @return the saasProperties value.
+ */
+ public SaasProperties saasProperties() {
+ return this.saasProperties;
+ }
+
+ /**
+ * Set the saasProperties property: Details about the SaaS offer purchased from the marketplace.
+ *
+ * @param saasProperties the saasProperties value to set.
+ * @return the OperatorApiConnectionProperties object itself.
+ */
+ public OperatorApiConnectionProperties withSaasProperties(SaasProperties saasProperties) {
+ this.saasProperties = saasProperties;
+ return this;
+ }
+
+ /**
+ * Get the configuredApplication property: Details about the Application that would use the Operator's Network APIs.
+ *
+ * @return the configuredApplication value.
+ */
+ public ApplicationProperties configuredApplication() {
+ return this.configuredApplication;
+ }
+
+ /**
+ * Set the configuredApplication property: Details about the Application that would use the Operator's Network APIs.
+ *
+ * @param configuredApplication the configuredApplication value to set.
+ * @return the OperatorApiConnectionProperties object itself.
+ */
+ public OperatorApiConnectionProperties withConfiguredApplication(ApplicationProperties configuredApplication) {
+ this.configuredApplication = configuredApplication;
+ return this;
+ }
+
+ /**
+ * Get the appId property: Application ID of the App Developer that is registered with the Operator in a specific
+ * country/region.
+ *
+ * @return the appId value.
+ */
+ public String appId() {
+ return this.appId;
+ }
+
+ /**
+ * Set the appId property: Application ID of the App Developer that is registered with the Operator in a specific
+ * country/region.
+ *
+ * @param appId the appId value to set.
+ * @return the OperatorApiConnectionProperties object itself.
+ */
+ public OperatorApiConnectionProperties withAppId(String appId) {
+ this.appId = appId;
+ return this;
+ }
+
+ /**
+ * Get the gatewayId property: Reference to the APC Gateway resource ID.
+ *
+ * @return the gatewayId value.
+ */
+ public String gatewayId() {
+ return this.gatewayId;
+ }
+
+ /**
+ * Set the gatewayId property: Reference to the APC Gateway resource ID.
+ *
+ * @param gatewayId the gatewayId value to set.
+ * @return the OperatorApiConnectionProperties object itself.
+ */
+ public OperatorApiConnectionProperties withGatewayId(String gatewayId) {
+ this.gatewayId = gatewayId;
+ return this;
+ }
+
+ /**
+ * Get the accountType property: Type of the account the user has with the Operator's Network API infrastructure.
+ * AzureManaged | UserManaged.
+ *
+ * @return the accountType value.
+ */
+ public AccountType accountType() {
+ return this.accountType;
+ }
+
+ /**
+ * Set the accountType property: Type of the account the user has with the Operator's Network API infrastructure.
+ * AzureManaged | UserManaged.
+ *
+ * @param accountType the accountType value to set.
+ * @return the OperatorApiConnectionProperties object itself.
+ */
+ public OperatorApiConnectionProperties withAccountType(AccountType accountType) {
+ this.accountType = accountType;
+ return this;
+ }
+
+ /**
+ * Get the appSecret property: Application secret linked to the 'appId'. This should be stored securely and is not
+ * returned back when the resource information is read.
+ *
+ * @return the appSecret value.
+ */
+ public String appSecret() {
+ return this.appSecret;
+ }
+
+ /**
+ * Set the appSecret property: Application secret linked to the 'appId'. This should be stored securely and is not
+ * returned back when the resource information is read.
+ *
+ * @param appSecret the appSecret value to set.
+ * @return the OperatorApiConnectionProperties object itself.
+ */
+ public OperatorApiConnectionProperties withAppSecret(String appSecret) {
+ this.appSecret = appSecret;
+ return this;
+ }
+
+ /**
+ * Get the operatorName property: Name of the Operator in the linked Operator API Plan belongs to.
+ *
+ * @return the operatorName value.
+ */
+ public String operatorName() {
+ return this.operatorName;
+ }
+
+ /**
+ * Get the camaraApiName property: The Network API for the current operator in the country/region provided in the
+ * linked Operator API Plan.
+ *
+ * @return the camaraApiName value.
+ */
+ public String camaraApiName() {
+ return this.camaraApiName;
+ }
+
+ /**
+ * Get the provisioningState property: The status of the last operation.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Get the status property: The status of the OperatorApiConnection resource.
+ *
+ * @return the status value.
+ */
+ public Status status() {
+ return this.status;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (operatorApiPlanId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property operatorApiPlanId in model OperatorApiConnectionProperties"));
+ }
+ if (saasProperties() != null) {
+ saasProperties().validate();
+ }
+ if (configuredApplication() != null) {
+ configuredApplication().validate();
+ }
+ if (gatewayId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property gatewayId in model OperatorApiConnectionProperties"));
+ }
+ if (accountType() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property accountType in model OperatorApiConnectionProperties"));
+ }
+ if (status() != null) {
+ status().validate();
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(OperatorApiConnectionProperties.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("operatorApiPlanId", this.operatorApiPlanId);
+ jsonWriter.writeStringField("gatewayId", this.gatewayId);
+ jsonWriter.writeStringField("accountType", this.accountType == null ? null : this.accountType.toString());
+ jsonWriter.writeJsonField("saasProperties", this.saasProperties);
+ jsonWriter.writeJsonField("configuredApplication", this.configuredApplication);
+ jsonWriter.writeStringField("appId", this.appId);
+ jsonWriter.writeStringField("appSecret", this.appSecret);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of OperatorApiConnectionProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of OperatorApiConnectionProperties 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 OperatorApiConnectionProperties.
+ */
+ public static OperatorApiConnectionProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ OperatorApiConnectionProperties deserializedOperatorApiConnectionProperties
+ = new OperatorApiConnectionProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("operatorApiPlanId".equals(fieldName)) {
+ deserializedOperatorApiConnectionProperties.operatorApiPlanId = reader.getString();
+ } else if ("gatewayId".equals(fieldName)) {
+ deserializedOperatorApiConnectionProperties.gatewayId = reader.getString();
+ } else if ("accountType".equals(fieldName)) {
+ deserializedOperatorApiConnectionProperties.accountType
+ = AccountType.fromString(reader.getString());
+ } else if ("saasProperties".equals(fieldName)) {
+ deserializedOperatorApiConnectionProperties.saasProperties = SaasProperties.fromJson(reader);
+ } else if ("configuredApplication".equals(fieldName)) {
+ deserializedOperatorApiConnectionProperties.configuredApplication
+ = ApplicationProperties.fromJson(reader);
+ } else if ("appId".equals(fieldName)) {
+ deserializedOperatorApiConnectionProperties.appId = reader.getString();
+ } else if ("appSecret".equals(fieldName)) {
+ deserializedOperatorApiConnectionProperties.appSecret = reader.getString();
+ } else if ("operatorName".equals(fieldName)) {
+ deserializedOperatorApiConnectionProperties.operatorName = reader.getString();
+ } else if ("camaraApiName".equals(fieldName)) {
+ deserializedOperatorApiConnectionProperties.camaraApiName = reader.getString();
+ } else if ("provisioningState".equals(fieldName)) {
+ deserializedOperatorApiConnectionProperties.provisioningState
+ = ProvisioningState.fromString(reader.getString());
+ } else if ("status".equals(fieldName)) {
+ deserializedOperatorApiConnectionProperties.status = Status.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedOperatorApiConnectionProperties;
+ });
+ }
+}
diff --git a/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/fluent/models/OperatorApiConnectionUpdateProperties.java b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/fluent/models/OperatorApiConnectionUpdateProperties.java
new file mode 100644
index 000000000000..ba58a396c153
--- /dev/null
+++ b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/fluent/models/OperatorApiConnectionUpdateProperties.java
@@ -0,0 +1,222 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.programmableconnectivity.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.programmableconnectivity.models.ApplicationProperties;
+import com.azure.resourcemanager.programmableconnectivity.models.SaasProperties;
+import java.io.IOException;
+
+/**
+ * The updatable properties of the OperatorApiConnection.
+ */
+@Fluent
+public final class OperatorApiConnectionUpdateProperties
+ implements JsonSerializable {
+ /*
+ * Reference to the Operator API Plan Resource ID.
+ */
+ private String operatorApiPlanId;
+
+ /*
+ * Details about the SaaS offer purchased from the marketplace.
+ */
+ private SaasProperties saasProperties;
+
+ /*
+ * Details about the Application that would use the Operator's Network APIs.
+ */
+ private ApplicationProperties configuredApplication;
+
+ /*
+ * Application ID of the App Developer that is registered with the Operator in a specific country/region.
+ */
+ private String appId;
+
+ /*
+ * Application secret linked to the 'appId'. This should be stored securely and is not returned back when the
+ * resource information is read.
+ */
+ private String appSecret;
+
+ /**
+ * Creates an instance of OperatorApiConnectionUpdateProperties class.
+ */
+ public OperatorApiConnectionUpdateProperties() {
+ }
+
+ /**
+ * Get the operatorApiPlanId property: Reference to the Operator API Plan Resource ID.
+ *
+ * @return the operatorApiPlanId value.
+ */
+ public String operatorApiPlanId() {
+ return this.operatorApiPlanId;
+ }
+
+ /**
+ * Set the operatorApiPlanId property: Reference to the Operator API Plan Resource ID.
+ *
+ * @param operatorApiPlanId the operatorApiPlanId value to set.
+ * @return the OperatorApiConnectionUpdateProperties object itself.
+ */
+ public OperatorApiConnectionUpdateProperties withOperatorApiPlanId(String operatorApiPlanId) {
+ this.operatorApiPlanId = operatorApiPlanId;
+ return this;
+ }
+
+ /**
+ * Get the saasProperties property: Details about the SaaS offer purchased from the marketplace.
+ *
+ * @return the saasProperties value.
+ */
+ public SaasProperties saasProperties() {
+ return this.saasProperties;
+ }
+
+ /**
+ * Set the saasProperties property: Details about the SaaS offer purchased from the marketplace.
+ *
+ * @param saasProperties the saasProperties value to set.
+ * @return the OperatorApiConnectionUpdateProperties object itself.
+ */
+ public OperatorApiConnectionUpdateProperties withSaasProperties(SaasProperties saasProperties) {
+ this.saasProperties = saasProperties;
+ return this;
+ }
+
+ /**
+ * Get the configuredApplication property: Details about the Application that would use the Operator's Network APIs.
+ *
+ * @return the configuredApplication value.
+ */
+ public ApplicationProperties configuredApplication() {
+ return this.configuredApplication;
+ }
+
+ /**
+ * Set the configuredApplication property: Details about the Application that would use the Operator's Network APIs.
+ *
+ * @param configuredApplication the configuredApplication value to set.
+ * @return the OperatorApiConnectionUpdateProperties object itself.
+ */
+ public OperatorApiConnectionUpdateProperties
+ withConfiguredApplication(ApplicationProperties configuredApplication) {
+ this.configuredApplication = configuredApplication;
+ return this;
+ }
+
+ /**
+ * Get the appId property: Application ID of the App Developer that is registered with the Operator in a specific
+ * country/region.
+ *
+ * @return the appId value.
+ */
+ public String appId() {
+ return this.appId;
+ }
+
+ /**
+ * Set the appId property: Application ID of the App Developer that is registered with the Operator in a specific
+ * country/region.
+ *
+ * @param appId the appId value to set.
+ * @return the OperatorApiConnectionUpdateProperties object itself.
+ */
+ public OperatorApiConnectionUpdateProperties withAppId(String appId) {
+ this.appId = appId;
+ return this;
+ }
+
+ /**
+ * Get the appSecret property: Application secret linked to the 'appId'. This should be stored securely and is not
+ * returned back when the resource information is read.
+ *
+ * @return the appSecret value.
+ */
+ public String appSecret() {
+ return this.appSecret;
+ }
+
+ /**
+ * Set the appSecret property: Application secret linked to the 'appId'. This should be stored securely and is not
+ * returned back when the resource information is read.
+ *
+ * @param appSecret the appSecret value to set.
+ * @return the OperatorApiConnectionUpdateProperties object itself.
+ */
+ public OperatorApiConnectionUpdateProperties withAppSecret(String appSecret) {
+ this.appSecret = appSecret;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (saasProperties() != null) {
+ saasProperties().validate();
+ }
+ if (configuredApplication() != null) {
+ configuredApplication().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("operatorApiPlanId", this.operatorApiPlanId);
+ jsonWriter.writeJsonField("saasProperties", this.saasProperties);
+ jsonWriter.writeJsonField("configuredApplication", this.configuredApplication);
+ jsonWriter.writeStringField("appId", this.appId);
+ jsonWriter.writeStringField("appSecret", this.appSecret);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of OperatorApiConnectionUpdateProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of OperatorApiConnectionUpdateProperties 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 OperatorApiConnectionUpdateProperties.
+ */
+ public static OperatorApiConnectionUpdateProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ OperatorApiConnectionUpdateProperties deserializedOperatorApiConnectionUpdateProperties
+ = new OperatorApiConnectionUpdateProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("operatorApiPlanId".equals(fieldName)) {
+ deserializedOperatorApiConnectionUpdateProperties.operatorApiPlanId = reader.getString();
+ } else if ("saasProperties".equals(fieldName)) {
+ deserializedOperatorApiConnectionUpdateProperties.saasProperties = SaasProperties.fromJson(reader);
+ } else if ("configuredApplication".equals(fieldName)) {
+ deserializedOperatorApiConnectionUpdateProperties.configuredApplication
+ = ApplicationProperties.fromJson(reader);
+ } else if ("appId".equals(fieldName)) {
+ deserializedOperatorApiConnectionUpdateProperties.appId = reader.getString();
+ } else if ("appSecret".equals(fieldName)) {
+ deserializedOperatorApiConnectionUpdateProperties.appSecret = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedOperatorApiConnectionUpdateProperties;
+ });
+ }
+}
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..e926ec8dc792
--- /dev/null
+++ b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/fluent/models/OperatorApiPlanInner.java
@@ -0,0 +1,330 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.programmableconnectivity.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.programmableconnectivity.models.MarketplaceProperties;
+import com.azure.resourcemanager.programmableconnectivity.models.ProvisioningState;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * 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.
+ */
+@Fluent
+public final class OperatorApiPlanInner extends ProxyResource {
+ /*
+ * The resource-specific properties for this resource.
+ */
+ private OperatorApiPlanProperties innerProperties;
+
+ /*
+ * 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.
+ */
+ public OperatorApiPlanInner() {
+ }
+
+ /**
+ * Get the innerProperties property: The resource-specific properties for this resource.
+ *
+ * @return the innerProperties value.
+ */
+ private OperatorApiPlanProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * 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;
+ }
+
+ /**
+ * Get the operatorName property: Name of the Operator this plan belongs to.
+ *
+ * @return the operatorName value.
+ */
+ public String operatorName() {
+ return this.innerProperties() == null ? null : this.innerProperties().operatorName();
+ }
+
+ /**
+ * Set the operatorName property: Name of the Operator this plan belongs to.
+ *
+ * @param operatorName the operatorName value to set.
+ * @return the OperatorApiPlanInner object itself.
+ */
+ public OperatorApiPlanInner withOperatorName(String operatorName) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new OperatorApiPlanProperties();
+ }
+ this.innerProperties().withOperatorName(operatorName);
+ return this;
+ }
+
+ /**
+ * Get the camaraApiName property: Standardized Network API name defined by CAMARA specifications.
+ *
+ * @return the camaraApiName value.
+ */
+ public String camaraApiName() {
+ return this.innerProperties() == null ? null : this.innerProperties().camaraApiName();
+ }
+
+ /**
+ * Set the camaraApiName property: Standardized Network API name defined by CAMARA specifications.
+ *
+ * @param camaraApiName the camaraApiName value to set.
+ * @return the OperatorApiPlanInner object itself.
+ */
+ public OperatorApiPlanInner withCamaraApiName(String camaraApiName) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new OperatorApiPlanProperties();
+ }
+ this.innerProperties().withCamaraApiName(camaraApiName);
+ return this;
+ }
+
+ /**
+ * Get the supportedLocations property: List of Azure regions where this offer is supported.
+ *
+ * @return the supportedLocations value.
+ */
+ public List supportedLocations() {
+ return this.innerProperties() == null ? null : this.innerProperties().supportedLocations();
+ }
+
+ /**
+ * Set the supportedLocations property: List of Azure regions where this offer is supported.
+ *
+ * @param supportedLocations the supportedLocations value to set.
+ * @return the OperatorApiPlanInner object itself.
+ */
+ public OperatorApiPlanInner withSupportedLocations(List supportedLocations) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new OperatorApiPlanProperties();
+ }
+ this.innerProperties().withSupportedLocations(supportedLocations);
+ return this;
+ }
+
+ /**
+ * Get the operatorRegions property: List of country/region names where this plan is being supported by the
+ * Operator.
+ *
+ * @return the operatorRegions value.
+ */
+ public List operatorRegions() {
+ return this.innerProperties() == null ? null : this.innerProperties().operatorRegions();
+ }
+
+ /**
+ * Set the operatorRegions property: List of country/region names where this plan is being supported by the
+ * Operator.
+ *
+ * @param operatorRegions the operatorRegions value to set.
+ * @return the OperatorApiPlanInner object itself.
+ */
+ public OperatorApiPlanInner withOperatorRegions(List operatorRegions) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new OperatorApiPlanProperties();
+ }
+ this.innerProperties().withOperatorRegions(operatorRegions);
+ return this;
+ }
+
+ /**
+ * Get the markets property: List of country/region names where this plan is being supported by Azure Marketplace.
+ *
+ * @return the markets value.
+ */
+ public List markets() {
+ return this.innerProperties() == null ? null : this.innerProperties().markets();
+ }
+
+ /**
+ * Set the markets property: List of country/region names where this plan is being supported by Azure Marketplace.
+ *
+ * @param markets the markets value to set.
+ * @return the OperatorApiPlanInner object itself.
+ */
+ public OperatorApiPlanInner withMarkets(List markets) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new OperatorApiPlanProperties();
+ }
+ this.innerProperties().withMarkets(markets);
+ return this;
+ }
+
+ /**
+ * Get the limits property: The limits, if any, will be imposed by the operator.
+ *
+ * @return the limits value.
+ */
+ public String limits() {
+ return this.innerProperties() == null ? null : this.innerProperties().limits();
+ }
+
+ /**
+ * Set the limits property: The limits, if any, will be imposed by the operator.
+ *
+ * @param limits the limits value to set.
+ * @return the OperatorApiPlanInner object itself.
+ */
+ public OperatorApiPlanInner withLimits(String limits) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new OperatorApiPlanProperties();
+ }
+ this.innerProperties().withLimits(limits);
+ return this;
+ }
+
+ /**
+ * Get the marketplaceProperties property: Azure marketplace properties for this plan.
+ *
+ * @return the marketplaceProperties value.
+ */
+ public MarketplaceProperties marketplaceProperties() {
+ return this.innerProperties() == null ? null : this.innerProperties().marketplaceProperties();
+ }
+
+ /**
+ * Set the marketplaceProperties property: Azure marketplace properties for this plan.
+ *
+ * @param marketplaceProperties the marketplaceProperties value to set.
+ * @return the OperatorApiPlanInner object itself.
+ */
+ public OperatorApiPlanInner withMarketplaceProperties(MarketplaceProperties marketplaceProperties) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new OperatorApiPlanProperties();
+ }
+ this.innerProperties().withMarketplaceProperties(marketplaceProperties);
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: The status of the last operation on the Gateway resource.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.innerProperties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of 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.innerProperties = 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/OperatorApiPlanProperties.java b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/fluent/models/OperatorApiPlanProperties.java
new file mode 100644
index 000000000000..d886acca3c8f
--- /dev/null
+++ b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/fluent/models/OperatorApiPlanProperties.java
@@ -0,0 +1,292 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.programmableconnectivity.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.programmableconnectivity.models.MarketplaceProperties;
+import com.azure.resourcemanager.programmableconnectivity.models.ProvisioningState;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * Operator API Plan properties.
+ */
+@Fluent
+public final class OperatorApiPlanProperties implements JsonSerializable {
+ /*
+ * Name of the Operator this plan belongs to.
+ */
+ private String operatorName;
+
+ /*
+ * Standardized Network API name defined by CAMARA specifications.
+ */
+ private String camaraApiName;
+
+ /*
+ * List of Azure regions where this offer is supported.
+ */
+ private List supportedLocations;
+
+ /*
+ * List of country/region names where this plan is being supported by the Operator.
+ */
+ private List operatorRegions;
+
+ /*
+ * List of country/region names where this plan is being supported by Azure Marketplace.
+ */
+ private List markets;
+
+ /*
+ * The limits, if any, will be imposed by the operator.
+ */
+ private String limits;
+
+ /*
+ * Azure marketplace properties for this plan.
+ */
+ private MarketplaceProperties marketplaceProperties;
+
+ /*
+ * The status of the last operation on the Gateway resource.
+ */
+ private ProvisioningState provisioningState;
+
+ /**
+ * Creates an instance of OperatorApiPlanProperties class.
+ */
+ public OperatorApiPlanProperties() {
+ }
+
+ /**
+ * Get the operatorName property: Name of the Operator this plan belongs to.
+ *
+ * @return the operatorName value.
+ */
+ public String operatorName() {
+ return this.operatorName;
+ }
+
+ /**
+ * Set the operatorName property: Name of the Operator this plan belongs to.
+ *
+ * @param operatorName the operatorName value to set.
+ * @return the OperatorApiPlanProperties object itself.
+ */
+ public OperatorApiPlanProperties withOperatorName(String operatorName) {
+ this.operatorName = operatorName;
+ return this;
+ }
+
+ /**
+ * Get the camaraApiName property: Standardized Network API name defined by CAMARA specifications.
+ *
+ * @return the camaraApiName value.
+ */
+ public String camaraApiName() {
+ return this.camaraApiName;
+ }
+
+ /**
+ * Set the camaraApiName property: Standardized Network API name defined by CAMARA specifications.
+ *
+ * @param camaraApiName the camaraApiName value to set.
+ * @return the OperatorApiPlanProperties object itself.
+ */
+ public OperatorApiPlanProperties withCamaraApiName(String camaraApiName) {
+ this.camaraApiName = camaraApiName;
+ return this;
+ }
+
+ /**
+ * Get the supportedLocations property: List of Azure regions where this offer is supported.
+ *
+ * @return the supportedLocations value.
+ */
+ public List supportedLocations() {
+ return this.supportedLocations;
+ }
+
+ /**
+ * Set the supportedLocations property: List of Azure regions where this offer is supported.
+ *
+ * @param supportedLocations the supportedLocations value to set.
+ * @return the OperatorApiPlanProperties object itself.
+ */
+ public OperatorApiPlanProperties withSupportedLocations(List supportedLocations) {
+ this.supportedLocations = supportedLocations;
+ return this;
+ }
+
+ /**
+ * Get the operatorRegions property: List of country/region names where this plan is being supported by the
+ * Operator.
+ *
+ * @return the operatorRegions value.
+ */
+ public List operatorRegions() {
+ return this.operatorRegions;
+ }
+
+ /**
+ * Set the operatorRegions property: List of country/region names where this plan is being supported by the
+ * Operator.
+ *
+ * @param operatorRegions the operatorRegions value to set.
+ * @return the OperatorApiPlanProperties object itself.
+ */
+ public OperatorApiPlanProperties withOperatorRegions(List operatorRegions) {
+ this.operatorRegions = operatorRegions;
+ return this;
+ }
+
+ /**
+ * Get the markets property: List of country/region names where this plan is being supported by Azure Marketplace.
+ *
+ * @return the markets value.
+ */
+ public List markets() {
+ return this.markets;
+ }
+
+ /**
+ * Set the markets property: List of country/region names where this plan is being supported by Azure Marketplace.
+ *
+ * @param markets the markets value to set.
+ * @return the OperatorApiPlanProperties object itself.
+ */
+ public OperatorApiPlanProperties withMarkets(List markets) {
+ this.markets = markets;
+ return this;
+ }
+
+ /**
+ * Get the limits property: The limits, if any, will be imposed by the operator.
+ *
+ * @return the limits value.
+ */
+ public String limits() {
+ return this.limits;
+ }
+
+ /**
+ * Set the limits property: The limits, if any, will be imposed by the operator.
+ *
+ * @param limits the limits value to set.
+ * @return the OperatorApiPlanProperties object itself.
+ */
+ public OperatorApiPlanProperties withLimits(String limits) {
+ this.limits = limits;
+ return this;
+ }
+
+ /**
+ * Get the marketplaceProperties property: Azure marketplace properties for this plan.
+ *
+ * @return the marketplaceProperties value.
+ */
+ public MarketplaceProperties marketplaceProperties() {
+ return this.marketplaceProperties;
+ }
+
+ /**
+ * Set the marketplaceProperties property: Azure marketplace properties for this plan.
+ *
+ * @param marketplaceProperties the marketplaceProperties value to set.
+ * @return the OperatorApiPlanProperties object itself.
+ */
+ public OperatorApiPlanProperties withMarketplaceProperties(MarketplaceProperties marketplaceProperties) {
+ this.marketplaceProperties = marketplaceProperties;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: The status of the last operation on the Gateway resource.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (marketplaceProperties() != null) {
+ marketplaceProperties().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("operatorName", this.operatorName);
+ jsonWriter.writeStringField("camaraApiName", this.camaraApiName);
+ jsonWriter.writeArrayField("supportedLocations", this.supportedLocations,
+ (writer, element) -> writer.writeString(element));
+ jsonWriter.writeArrayField("operatorRegions", this.operatorRegions,
+ (writer, element) -> writer.writeString(element));
+ jsonWriter.writeArrayField("markets", this.markets, (writer, element) -> writer.writeString(element));
+ jsonWriter.writeStringField("limits", this.limits);
+ jsonWriter.writeJsonField("marketplaceProperties", this.marketplaceProperties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of OperatorApiPlanProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of OperatorApiPlanProperties 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 OperatorApiPlanProperties.
+ */
+ public static OperatorApiPlanProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ OperatorApiPlanProperties deserializedOperatorApiPlanProperties = new OperatorApiPlanProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("operatorName".equals(fieldName)) {
+ deserializedOperatorApiPlanProperties.operatorName = reader.getString();
+ } else if ("camaraApiName".equals(fieldName)) {
+ deserializedOperatorApiPlanProperties.camaraApiName = reader.getString();
+ } else if ("supportedLocations".equals(fieldName)) {
+ List supportedLocations = reader.readArray(reader1 -> reader1.getString());
+ deserializedOperatorApiPlanProperties.supportedLocations = supportedLocations;
+ } else if ("operatorRegions".equals(fieldName)) {
+ List operatorRegions = reader.readArray(reader1 -> reader1.getString());
+ deserializedOperatorApiPlanProperties.operatorRegions = operatorRegions;
+ } else if ("markets".equals(fieldName)) {
+ List markets = reader.readArray(reader1 -> reader1.getString());
+ deserializedOperatorApiPlanProperties.markets = markets;
+ } else if ("limits".equals(fieldName)) {
+ deserializedOperatorApiPlanProperties.limits = reader.getString();
+ } else if ("marketplaceProperties".equals(fieldName)) {
+ deserializedOperatorApiPlanProperties.marketplaceProperties
+ = MarketplaceProperties.fromJson(reader);
+ } else if ("provisioningState".equals(fieldName)) {
+ deserializedOperatorApiPlanProperties.provisioningState
+ = ProvisioningState.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedOperatorApiPlanProperties;
+ });
+ }
+}
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..58452b5adbba
--- /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) AutoRest 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..86538f69890a
--- /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) AutoRest 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..6aef95730527
--- /dev/null
+++ b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/implementation/GatewayImpl.java
@@ -0,0 +1,189 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest 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.GatewayTagsUpdate;
+import com.azure.resourcemanager.programmableconnectivity.models.ProvisioningState;
+import java.util.Collections;
+import java.util.List;
+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 SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public List operatorApiConnections() {
+ List inner = this.innerModel().operatorApiConnections();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public String gatewayBaseUrl() {
+ return this.innerModel().gatewayBaseUrl();
+ }
+
+ public ProvisioningState provisioningState() {
+ return this.innerModel().provisioningState();
+ }
+
+ 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;
+ }
+ }
+
+ 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..15cf649377bc
--- /dev/null
+++ b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/implementation/GatewaysClientImpl.java
@@ -0,0 +1,1177 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest 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.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 ProgrammableConnectivityImpl client;
+
+ /**
+ * Initializes an instance of GatewaysClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ GatewaysClientImpl(ProgrammableConnectivityImpl client) {
+ this.service = RestProxy.create(GatewaysService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for ProgrammableConnectivityGateways to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "ProgrammableConnecti")
+ public interface GatewaysService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ProgrammableConnectivity/gateways")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ProgrammableConnectivity/gateways")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroup(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ProgrammableConnectivity/gateways/{gatewayName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getByResourceGroup(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("gatewayName") String gatewayName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ProgrammableConnectivity/gateways/{gatewayName}")
+ @ExpectedResponses({ 200, 201 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> createOrUpdate(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("gatewayName") String gatewayName,
+ @BodyParam("application/json") GatewayInner resource, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ProgrammableConnectivity/gateways/{gatewayName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> update(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("gatewayName") String gatewayName,
+ @BodyParam("application/json") GatewayTagsUpdate properties, @HeaderParam("Accept") String accept,
+ 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("$host") 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("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listBySubscriptionNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroupNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * List 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));
+ }
+
+ /**
+ * 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));
+ }
+
+ /**
+ * 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 accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, gatewayName, resource, accept, 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 accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, gatewayName, resource, accept, 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 accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, gatewayName, properties, accept, 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 accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, gatewayName, properties, accept, 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();
+ }
+
+ /**
+ * 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));
+ }
+
+ /**
+ * 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));
+ }
+}
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..61a079a6fd01
--- /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) AutoRest 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 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 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 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 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..951372263e67
--- /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) AutoRest 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..39312c40f8db
--- /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) AutoRest 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.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 ProgrammableConnectivityImpl client;
+
+ /**
+ * Initializes an instance of OperationsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ OperationsClientImpl(ProgrammableConnectivityImpl client) {
+ this.service
+ = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for ProgrammableConnectivityOperations to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "ProgrammableConnecti")
+ public interface OperationsService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/providers/Microsoft.ProgrammableConnectivity/operations")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * List the operations for the provider.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync() {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
+ res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * List the operations for the provider.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+
+ /**
+ * List the operations for the provider.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with
+ * {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List the operations for the provider.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with
+ * {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(Context context) {
+ return new PagedFlux<>(() -> listSinglePageAsync(context),
+ nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List the operations for the provider.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ return new PagedIterable<>(listAsync());
+ }
+
+ /**
+ * List the operations for the provider.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(Context context) {
+ return new PagedIterable<>(listAsync(context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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..6409ab8cc850
--- /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) AutoRest 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..8b2501ec2f19
--- /dev/null
+++ b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/implementation/OperatorApiConnectionImpl.java
@@ -0,0 +1,279 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest 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.AccountType;
+import com.azure.resourcemanager.programmableconnectivity.models.ApplicationProperties;
+import com.azure.resourcemanager.programmableconnectivity.models.OperatorApiConnection;
+import com.azure.resourcemanager.programmableconnectivity.models.OperatorApiConnectionUpdate;
+import com.azure.resourcemanager.programmableconnectivity.models.ProvisioningState;
+import com.azure.resourcemanager.programmableconnectivity.models.SaasProperties;
+import com.azure.resourcemanager.programmableconnectivity.models.Status;
+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 SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public String operatorApiPlanId() {
+ return this.innerModel().operatorApiPlanId();
+ }
+
+ public SaasProperties saasProperties() {
+ return this.innerModel().saasProperties();
+ }
+
+ public ApplicationProperties configuredApplication() {
+ return this.innerModel().configuredApplication();
+ }
+
+ public String appId() {
+ return this.innerModel().appId();
+ }
+
+ public String gatewayId() {
+ return this.innerModel().gatewayId();
+ }
+
+ public AccountType accountType() {
+ return this.innerModel().accountType();
+ }
+
+ public String appSecret() {
+ return this.innerModel().appSecret();
+ }
+
+ public String operatorName() {
+ return this.innerModel().operatorName();
+ }
+
+ public String camaraApiName() {
+ return this.innerModel().camaraApiName();
+ }
+
+ public ProvisioningState provisioningState() {
+ return this.innerModel().provisioningState();
+ }
+
+ public Status status() {
+ return this.innerModel().status();
+ }
+
+ 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 withOperatorApiPlanId(String operatorApiPlanId) {
+ if (isInCreateMode()) {
+ this.innerModel().withOperatorApiPlanId(operatorApiPlanId);
+ return this;
+ } else {
+ this.updateProperties.withOperatorApiPlanId(operatorApiPlanId);
+ return this;
+ }
+ }
+
+ public OperatorApiConnectionImpl withSaasProperties(SaasProperties saasProperties) {
+ if (isInCreateMode()) {
+ this.innerModel().withSaasProperties(saasProperties);
+ return this;
+ } else {
+ this.updateProperties.withSaasProperties(saasProperties);
+ return this;
+ }
+ }
+
+ public OperatorApiConnectionImpl withConfiguredApplication(ApplicationProperties configuredApplication) {
+ if (isInCreateMode()) {
+ this.innerModel().withConfiguredApplication(configuredApplication);
+ return this;
+ } else {
+ this.updateProperties.withConfiguredApplication(configuredApplication);
+ return this;
+ }
+ }
+
+ public OperatorApiConnectionImpl withAppId(String appId) {
+ if (isInCreateMode()) {
+ this.innerModel().withAppId(appId);
+ return this;
+ } else {
+ this.updateProperties.withAppId(appId);
+ return this;
+ }
+ }
+
+ public OperatorApiConnectionImpl withGatewayId(String gatewayId) {
+ this.innerModel().withGatewayId(gatewayId);
+ return this;
+ }
+
+ public OperatorApiConnectionImpl withAccountType(AccountType accountType) {
+ this.innerModel().withAccountType(accountType);
+ return this;
+ }
+
+ public OperatorApiConnectionImpl withAppSecret(String appSecret) {
+ if (isInCreateMode()) {
+ this.innerModel().withAppSecret(appSecret);
+ return this;
+ } else {
+ this.updateProperties.withAppSecret(appSecret);
+ 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..0013d4b81f00
--- /dev/null
+++ b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/implementation/OperatorApiConnectionsClientImpl.java
@@ -0,0 +1,1301 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest 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.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 ProgrammableConnectivityImpl client;
+
+ /**
+ * Initializes an instance of OperatorApiConnectionsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ OperatorApiConnectionsClientImpl(ProgrammableConnectivityImpl client) {
+ this.service = RestProxy.create(OperatorApiConnectionsService.class, client.getHttpPipeline(),
+ client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for ProgrammableConnectivityOperatorApiConnections to be used by the
+ * proxy service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "ProgrammableConnecti")
+ public interface OperatorApiConnectionsService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ProgrammableConnectivity/operatorApiConnections")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ProgrammableConnectivity/operatorApiConnections")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroup(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ProgrammableConnectivity/operatorApiConnections/{operatorApiConnectionName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getByResourceGroup(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("operatorApiConnectionName") String operatorApiConnectionName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ProgrammableConnectivity/operatorApiConnections/{operatorApiConnectionName}")
+ @ExpectedResponses({ 200, 201 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> create(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("operatorApiConnectionName") String operatorApiConnectionName,
+ @BodyParam("application/json") OperatorApiConnectionInner resource, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ProgrammableConnectivity/operatorApiConnections/{operatorApiConnectionName}")
+ @ExpectedResponses({ 200, 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> update(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("operatorApiConnectionName") String operatorApiConnectionName,
+ @BodyParam("application/json") OperatorApiConnectionUpdate properties, @HeaderParam("Accept") String accept,
+ 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("$host") 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("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listBySubscriptionNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroupNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * List 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));
+ }
+
+ /**
+ * 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));
+ }
+
+ /**
+ * 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 accept = "application/json";
+ return FluxUtil.withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, operatorApiConnectionName, resource, accept, 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 accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, operatorApiConnectionName, resource, accept, 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 accept = "application/json";
+ return FluxUtil.withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, operatorApiConnectionName, properties, accept, 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 accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, operatorApiConnectionName, properties, accept, 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();
+ }
+
+ /**
+ * 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));
+ }
+
+ /**
+ * 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));
+ }
+}
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..2b456cd51df6
--- /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) AutoRest 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 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 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 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 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..42b60bd38fbd
--- /dev/null
+++ b/sdk/programmableconnectivity/azure-resourcemanager-programmableconnectivity/src/main/java/com/azure/resourcemanager/programmableconnectivity/implementation/OperatorApiPlanImpl.java
@@ -0,0 +1,96 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest 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.MarketplaceProperties;
+import com.azure.resourcemanager.programmableconnectivity.models.OperatorApiPlan;
+import com.azure.resourcemanager.programmableconnectivity.models.ProvisioningState;
+import java.util.Collections;
+import java.util.List;
+
+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 SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public String operatorName() {
+ return this.innerModel().operatorName();
+ }
+
+ public String camaraApiName() {
+ return this.innerModel().camaraApiName();
+ }
+
+ public List supportedLocations() {
+ List inner = this.innerModel().supportedLocations();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public List operatorRegions() {
+ List inner = this.innerModel().operatorRegions();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public List markets() {
+ List