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 HybridConnectivity service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the HybridConnectivity service API instance.
+ */
+ public HybridConnectivityManager 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.hybridconnectivity")
+ .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 HybridConnectivityManager(httpPipeline, profile, defaultPollInterval);
+ }
+ }
+
+ /** @return Resource collection API of Operations. */
+ public Operations operations() {
+ if (this.operations == null) {
+ this.operations = new OperationsImpl(clientObject.getOperations(), this);
+ }
+ return operations;
+ }
+
+ /** @return Resource collection API of Endpoints. */
+ public Endpoints endpoints() {
+ if (this.endpoints == null) {
+ this.endpoints = new EndpointsImpl(clientObject.getEndpoints(), this);
+ }
+ return endpoints;
+ }
+
+ /**
+ * @return Wrapped service client HybridConnectivityManagementApi providing direct access to the underlying
+ * auto-generated API implementation, based on Azure REST API.
+ */
+ public HybridConnectivityManagementApi serviceClient() {
+ return this.clientObject;
+ }
+}
diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/EndpointsClient.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/EndpointsClient.java
new file mode 100644
index 000000000000..36b2c066f15f
--- /dev/null
+++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/EndpointsClient.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.hybridconnectivity.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.hybridconnectivity.fluent.models.EndpointAccessResourceInner;
+import com.azure.resourcemanager.hybridconnectivity.fluent.models.EndpointResourceInner;
+import com.azure.resourcemanager.hybridconnectivity.fluent.models.ManagedProxyResourceInner;
+import com.azure.resourcemanager.hybridconnectivity.models.ManagedProxyRequest;
+
+/** An instance of this class provides access to all the operations defined in EndpointsClient. */
+public interface EndpointsClient {
+ /**
+ * List of endpoints to the target resource.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
+ * @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 list of endpoints as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceUri);
+
+ /**
+ * List of endpoints to the target resource.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
+ * @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 list of endpoints as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceUri, Context context);
+
+ /**
+ * Gets the endpoint to the resource.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
+ * @param endpointName The endpoint 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 endpoint to the resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ EndpointResourceInner get(String resourceUri, String endpointName);
+
+ /**
+ * Gets the endpoint to the resource.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
+ * @param endpointName The endpoint 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 endpoint to the resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceUri, String endpointName, Context context);
+
+ /**
+ * Create or update the endpoint to the target resource.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
+ * @param endpointName The endpoint name.
+ * @param endpointResource Endpoint details.
+ * @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 endpoint for the target resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ EndpointResourceInner createOrUpdate(
+ String resourceUri, String endpointName, EndpointResourceInner endpointResource);
+
+ /**
+ * Create or update the endpoint to the target resource.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
+ * @param endpointName The endpoint name.
+ * @param endpointResource Endpoint details.
+ * @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 endpoint for the target resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(
+ String resourceUri, String endpointName, EndpointResourceInner endpointResource, Context context);
+
+ /**
+ * Update the endpoint to the target resource.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
+ * @param endpointName The endpoint name.
+ * @param endpointResource Endpoint details.
+ * @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 endpoint for the target resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ EndpointResourceInner update(String resourceUri, String endpointName, EndpointResourceInner endpointResource);
+
+ /**
+ * Update the endpoint to the target resource.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
+ * @param endpointName The endpoint name.
+ * @param endpointResource Endpoint details.
+ * @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 endpoint for the target resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(
+ String resourceUri, String endpointName, EndpointResourceInner endpointResource, Context context);
+
+ /**
+ * Deletes the endpoint access to the target resource.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
+ * @param endpointName The endpoint 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 resourceUri, String endpointName);
+
+ /**
+ * Deletes the endpoint access to the target resource.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
+ * @param endpointName The endpoint 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 Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteWithResponse(String resourceUri, String endpointName, Context context);
+
+ /**
+ * Gets the endpoint access credentials to the resource.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
+ * @param endpointName The endpoint 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 endpoint access credentials to the resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ EndpointAccessResourceInner listCredentials(String resourceUri, String endpointName);
+
+ /**
+ * Gets the endpoint access credentials to the resource.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
+ * @param endpointName The endpoint name.
+ * @param expiresin The is how long the endpoint access token is valid (in seconds).
+ * @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 endpoint access credentials to the resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response listCredentialsWithResponse(
+ String resourceUri, String endpointName, Long expiresin, Context context);
+
+ /**
+ * Fetches the managed proxy details.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
+ * @param endpointName The endpoint name.
+ * @param managedProxyRequest Object of type ManagedProxyRequest.
+ * @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 managed Proxy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ManagedProxyResourceInner listManagedProxyDetails(
+ String resourceUri, String endpointName, ManagedProxyRequest managedProxyRequest);
+
+ /**
+ * Fetches the managed proxy details.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
+ * @param endpointName The endpoint name.
+ * @param managedProxyRequest Object of type ManagedProxyRequest.
+ * @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 managed Proxy along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response listManagedProxyDetailsWithResponse(
+ String resourceUri, String endpointName, ManagedProxyRequest managedProxyRequest, Context context);
+}
diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/HybridConnectivityManagementApi.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/HybridConnectivityManagementApi.java
new file mode 100644
index 000000000000..b5dcb7a86cf2
--- /dev/null
+++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/HybridConnectivityManagementApi.java
@@ -0,0 +1,53 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.hybridconnectivity.fluent;
+
+import com.azure.core.http.HttpPipeline;
+import java.time.Duration;
+
+/** The interface for HybridConnectivityManagementApi class. */
+public interface HybridConnectivityManagementApi {
+ /**
+ * 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 EndpointsClient object to access its operations.
+ *
+ * @return the EndpointsClient object.
+ */
+ EndpointsClient getEndpoints();
+}
diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/OperationsClient.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/OperationsClient.java
new file mode 100644
index 000000000000..8d7c7b4b209d
--- /dev/null
+++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/OperationsClient.java
@@ -0,0 +1,38 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.hybridconnectivity.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.hybridconnectivity.fluent.models.OperationInner;
+
+/** An instance of this class provides access to all the operations defined in OperationsClient. */
+public interface OperationsClient {
+ /**
+ * Lists the available Hybrid Connectivity REST API operations.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link
+ * PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Lists the available Hybrid Connectivity REST API operations.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link
+ * PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+}
diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/EndpointAccessResourceInner.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/EndpointAccessResourceInner.java
new file mode 100644
index 000000000000..7a056318aff0
--- /dev/null
+++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/EndpointAccessResourceInner.java
@@ -0,0 +1,139 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.hybridconnectivity.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The endpoint access for the target resource. */
+@Fluent
+public final class EndpointAccessResourceInner {
+ /*
+ * Azure relay hybrid connection access properties
+ */
+ @JsonProperty(value = "relay")
+ private RelayNamespaceAccessProperties innerRelay;
+
+ /**
+ * Get the innerRelay property: Azure relay hybrid connection access properties.
+ *
+ * @return the innerRelay value.
+ */
+ private RelayNamespaceAccessProperties innerRelay() {
+ return this.innerRelay;
+ }
+
+ /**
+ * Get the namespaceName property: The namespace name.
+ *
+ * @return the namespaceName value.
+ */
+ public String namespaceName() {
+ return this.innerRelay() == null ? null : this.innerRelay().namespaceName();
+ }
+
+ /**
+ * Set the namespaceName property: The namespace name.
+ *
+ * @param namespaceName the namespaceName value to set.
+ * @return the EndpointAccessResourceInner object itself.
+ */
+ public EndpointAccessResourceInner withNamespaceName(String namespaceName) {
+ if (this.innerRelay() == null) {
+ this.innerRelay = new RelayNamespaceAccessProperties();
+ }
+ this.innerRelay().withNamespaceName(namespaceName);
+ return this;
+ }
+
+ /**
+ * Get the namespaceNameSuffix property: The suffix domain name of relay namespace.
+ *
+ * @return the namespaceNameSuffix value.
+ */
+ public String namespaceNameSuffix() {
+ return this.innerRelay() == null ? null : this.innerRelay().namespaceNameSuffix();
+ }
+
+ /**
+ * Set the namespaceNameSuffix property: The suffix domain name of relay namespace.
+ *
+ * @param namespaceNameSuffix the namespaceNameSuffix value to set.
+ * @return the EndpointAccessResourceInner object itself.
+ */
+ public EndpointAccessResourceInner withNamespaceNameSuffix(String namespaceNameSuffix) {
+ if (this.innerRelay() == null) {
+ this.innerRelay = new RelayNamespaceAccessProperties();
+ }
+ this.innerRelay().withNamespaceNameSuffix(namespaceNameSuffix);
+ return this;
+ }
+
+ /**
+ * Get the hybridConnectionName property: Azure Relay hybrid connection name for the resource.
+ *
+ * @return the hybridConnectionName value.
+ */
+ public String hybridConnectionName() {
+ return this.innerRelay() == null ? null : this.innerRelay().hybridConnectionName();
+ }
+
+ /**
+ * Set the hybridConnectionName property: Azure Relay hybrid connection name for the resource.
+ *
+ * @param hybridConnectionName the hybridConnectionName value to set.
+ * @return the EndpointAccessResourceInner object itself.
+ */
+ public EndpointAccessResourceInner withHybridConnectionName(String hybridConnectionName) {
+ if (this.innerRelay() == null) {
+ this.innerRelay = new RelayNamespaceAccessProperties();
+ }
+ this.innerRelay().withHybridConnectionName(hybridConnectionName);
+ return this;
+ }
+
+ /**
+ * Get the accessKey property: Access key for hybrid connection.
+ *
+ * @return the accessKey value.
+ */
+ public String accessKey() {
+ return this.innerRelay() == null ? null : this.innerRelay().accessKey();
+ }
+
+ /**
+ * Get the expiresOn property: The expiration of access key in unix time.
+ *
+ * @return the expiresOn value.
+ */
+ public Long expiresOn() {
+ return this.innerRelay() == null ? null : this.innerRelay().expiresOn();
+ }
+
+ /**
+ * Set the expiresOn property: The expiration of access key in unix time.
+ *
+ * @param expiresOn the expiresOn value to set.
+ * @return the EndpointAccessResourceInner object itself.
+ */
+ public EndpointAccessResourceInner withExpiresOn(Long expiresOn) {
+ if (this.innerRelay() == null) {
+ this.innerRelay = new RelayNamespaceAccessProperties();
+ }
+ this.innerRelay().withExpiresOn(expiresOn);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerRelay() != null) {
+ innerRelay().validate();
+ }
+ }
+}
diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/EndpointProperties.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/EndpointProperties.java
new file mode 100644
index 000000000000..0fee09417e73
--- /dev/null
+++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/EndpointProperties.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.hybridconnectivity.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.hybridconnectivity.models.Type;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Endpoint details. */
+@Fluent
+public final class EndpointProperties {
+ /*
+ * The type of endpoint.
+ */
+ @JsonProperty(value = "type", required = true)
+ private Type type;
+
+ /*
+ * The resource Id of the connectivity endpoint (optional).
+ */
+ @JsonProperty(value = "resourceId")
+ private String resourceId;
+
+ /*
+ * The resource provisioning state.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private String provisioningState;
+
+ /**
+ * Get the type property: The type of endpoint.
+ *
+ * @return the type value.
+ */
+ public Type type() {
+ return this.type;
+ }
+
+ /**
+ * Set the type property: The type of endpoint.
+ *
+ * @param type the type value to set.
+ * @return the EndpointProperties object itself.
+ */
+ public EndpointProperties withType(Type type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * Get the resourceId property: The resource Id of the connectivity endpoint (optional).
+ *
+ * @return the resourceId value.
+ */
+ public String resourceId() {
+ return this.resourceId;
+ }
+
+ /**
+ * Set the resourceId property: The resource Id of the connectivity endpoint (optional).
+ *
+ * @param resourceId the resourceId value to set.
+ * @return the EndpointProperties object itself.
+ */
+ public EndpointProperties withResourceId(String resourceId) {
+ this.resourceId = resourceId;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: The resource provisioning state.
+ *
+ * @return the provisioningState value.
+ */
+ public String provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (type() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property type in model EndpointProperties"));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(EndpointProperties.class);
+}
diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/EndpointResourceInner.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/EndpointResourceInner.java
new file mode 100644
index 000000000000..978bf047599e
--- /dev/null
+++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/EndpointResourceInner.java
@@ -0,0 +1,111 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.hybridconnectivity.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.hybridconnectivity.models.Type;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The endpoint for the target resource. */
+@Fluent
+public final class EndpointResourceInner extends ProxyResource {
+ /*
+ * System data of endpoint resource
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData innerSystemData;
+
+ /*
+ * The endpoint properties.
+ */
+ @JsonProperty(value = "properties")
+ private EndpointProperties innerProperties;
+
+ /**
+ * Get the innerSystemData property: System data of endpoint resource.
+ *
+ * @return the innerSystemData value.
+ */
+ private SystemData innerSystemData() {
+ return this.innerSystemData;
+ }
+
+ /**
+ * Get the innerProperties property: The endpoint properties.
+ *
+ * @return the innerProperties value.
+ */
+ private EndpointProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the type property: The type of endpoint.
+ *
+ * @return the type value.
+ */
+ public Type typePropertiesType() {
+ return this.innerProperties() == null ? null : this.innerProperties().type();
+ }
+
+ /**
+ * Set the type property: The type of endpoint.
+ *
+ * @param type the type value to set.
+ * @return the EndpointResourceInner object itself.
+ */
+ public EndpointResourceInner withTypePropertiesType(Type type) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new EndpointProperties();
+ }
+ this.innerProperties().withType(type);
+ return this;
+ }
+
+ /**
+ * Get the resourceId property: The resource Id of the connectivity endpoint (optional).
+ *
+ * @return the resourceId value.
+ */
+ public String resourceId() {
+ return this.innerProperties() == null ? null : this.innerProperties().resourceId();
+ }
+
+ /**
+ * Set the resourceId property: The resource Id of the connectivity endpoint (optional).
+ *
+ * @param resourceId the resourceId value to set.
+ * @return the EndpointResourceInner object itself.
+ */
+ public EndpointResourceInner withResourceId(String resourceId) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new EndpointProperties();
+ }
+ this.innerProperties().withResourceId(resourceId);
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: The resource provisioning state.
+ *
+ * @return the provisioningState value.
+ */
+ public String provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/ManagedProxyResourceInner.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/ManagedProxyResourceInner.java
new file mode 100644
index 000000000000..c7593ed9704e
--- /dev/null
+++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/ManagedProxyResourceInner.java
@@ -0,0 +1,80 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.hybridconnectivity.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Managed Proxy. */
+@Fluent
+public final class ManagedProxyResourceInner {
+ /*
+ * The short lived proxy name.
+ */
+ @JsonProperty(value = "proxy", required = true)
+ private String proxy;
+
+ /*
+ * The expiration time of short lived proxy name in unix epoch.
+ */
+ @JsonProperty(value = "expiresOn", required = true)
+ private long expiresOn;
+
+ /**
+ * Get the proxy property: The short lived proxy name.
+ *
+ * @return the proxy value.
+ */
+ public String proxy() {
+ return this.proxy;
+ }
+
+ /**
+ * Set the proxy property: The short lived proxy name.
+ *
+ * @param proxy the proxy value to set.
+ * @return the ManagedProxyResourceInner object itself.
+ */
+ public ManagedProxyResourceInner withProxy(String proxy) {
+ this.proxy = proxy;
+ return this;
+ }
+
+ /**
+ * Get the expiresOn property: The expiration time of short lived proxy name in unix epoch.
+ *
+ * @return the expiresOn value.
+ */
+ public long expiresOn() {
+ return this.expiresOn;
+ }
+
+ /**
+ * Set the expiresOn property: The expiration time of short lived proxy name in unix epoch.
+ *
+ * @param expiresOn the expiresOn value to set.
+ * @return the ManagedProxyResourceInner object itself.
+ */
+ public ManagedProxyResourceInner withExpiresOn(long expiresOn) {
+ this.expiresOn = expiresOn;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (proxy() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property proxy in model ManagedProxyResourceInner"));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(ManagedProxyResourceInner.class);
+}
diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/OperationInner.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/OperationInner.java
new file mode 100644
index 000000000000..2be50a8caefc
--- /dev/null
+++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/OperationInner.java
@@ -0,0 +1,121 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.hybridconnectivity.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.hybridconnectivity.models.ActionType;
+import com.azure.resourcemanager.hybridconnectivity.models.OperationDisplay;
+import com.azure.resourcemanager.hybridconnectivity.models.Origin;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** REST API Operation Details of a REST API operation, returned from the Resource Provider Operations API. */
+@Fluent
+public final class OperationInner {
+ /*
+ * The name of the operation, as per Resource-Based Access Control (RBAC).
+ * Examples: "Microsoft.Compute/virtualMachines/write",
+ * "Microsoft.Compute/virtualMachines/capture/action"
+ */
+ @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
+ private String name;
+
+ /*
+ * Whether the operation applies to data-plane. This is "true" for
+ * data-plane operations and "false" for ARM/control-plane operations.
+ */
+ @JsonProperty(value = "isDataAction", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean isDataAction;
+
+ /*
+ * Localized display information for this particular operation.
+ */
+ @JsonProperty(value = "display")
+ private OperationDisplay display;
+
+ /*
+ * The intended executor of the operation; as in Resource Based Access
+ * Control (RBAC) and audit logs UX. Default value is "user,system"
+ */
+ @JsonProperty(value = "origin", access = JsonProperty.Access.WRITE_ONLY)
+ private Origin origin;
+
+ /*
+ * Enum. Indicates the action type. "Internal" refers to actions that are
+ * for internal only APIs.
+ */
+ @JsonProperty(value = "actionType", access = JsonProperty.Access.WRITE_ONLY)
+ private ActionType actionType;
+
+ /**
+ * Get the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples:
+ * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action".
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane
+ * operations and "false" for ARM/control-plane operations.
+ *
+ * @return the isDataAction value.
+ */
+ public Boolean isDataAction() {
+ return this.isDataAction;
+ }
+
+ /**
+ * Get the display property: Localized display information for this particular operation.
+ *
+ * @return the display value.
+ */
+ public OperationDisplay display() {
+ return this.display;
+ }
+
+ /**
+ * Set the display property: Localized display information for this particular operation.
+ *
+ * @param display the display value to set.
+ * @return the OperationInner object itself.
+ */
+ public OperationInner withDisplay(OperationDisplay display) {
+ this.display = display;
+ return this;
+ }
+
+ /**
+ * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and
+ * audit logs UX. Default value is "user,system".
+ *
+ * @return the origin value.
+ */
+ public Origin origin() {
+ return this.origin;
+ }
+
+ /**
+ * Get the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal
+ * only APIs.
+ *
+ * @return the actionType value.
+ */
+ public ActionType actionType() {
+ return this.actionType;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (display() != null) {
+ display().validate();
+ }
+ }
+}
diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/RelayNamespaceAccessProperties.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/RelayNamespaceAccessProperties.java
new file mode 100644
index 000000000000..005d7e0f0b4a
--- /dev/null
+++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/RelayNamespaceAccessProperties.java
@@ -0,0 +1,160 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.hybridconnectivity.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Azure relay hybrid connection access properties. */
+@Fluent
+public final class RelayNamespaceAccessProperties {
+ /*
+ * The namespace name.
+ */
+ @JsonProperty(value = "namespaceName", required = true)
+ private String namespaceName;
+
+ /*
+ * The suffix domain name of relay namespace.
+ */
+ @JsonProperty(value = "namespaceNameSuffix", required = true)
+ private String namespaceNameSuffix;
+
+ /*
+ * Azure Relay hybrid connection name for the resource.
+ */
+ @JsonProperty(value = "hybridConnectionName", required = true)
+ private String hybridConnectionName;
+
+ /*
+ * Access key for hybrid connection.
+ */
+ @JsonProperty(value = "accessKey", access = JsonProperty.Access.WRITE_ONLY)
+ private String accessKey;
+
+ /*
+ * The expiration of access key in unix time.
+ */
+ @JsonProperty(value = "expiresOn")
+ private Long expiresOn;
+
+ /**
+ * Get the namespaceName property: The namespace name.
+ *
+ * @return the namespaceName value.
+ */
+ public String namespaceName() {
+ return this.namespaceName;
+ }
+
+ /**
+ * Set the namespaceName property: The namespace name.
+ *
+ * @param namespaceName the namespaceName value to set.
+ * @return the RelayNamespaceAccessProperties object itself.
+ */
+ public RelayNamespaceAccessProperties withNamespaceName(String namespaceName) {
+ this.namespaceName = namespaceName;
+ return this;
+ }
+
+ /**
+ * Get the namespaceNameSuffix property: The suffix domain name of relay namespace.
+ *
+ * @return the namespaceNameSuffix value.
+ */
+ public String namespaceNameSuffix() {
+ return this.namespaceNameSuffix;
+ }
+
+ /**
+ * Set the namespaceNameSuffix property: The suffix domain name of relay namespace.
+ *
+ * @param namespaceNameSuffix the namespaceNameSuffix value to set.
+ * @return the RelayNamespaceAccessProperties object itself.
+ */
+ public RelayNamespaceAccessProperties withNamespaceNameSuffix(String namespaceNameSuffix) {
+ this.namespaceNameSuffix = namespaceNameSuffix;
+ return this;
+ }
+
+ /**
+ * Get the hybridConnectionName property: Azure Relay hybrid connection name for the resource.
+ *
+ * @return the hybridConnectionName value.
+ */
+ public String hybridConnectionName() {
+ return this.hybridConnectionName;
+ }
+
+ /**
+ * Set the hybridConnectionName property: Azure Relay hybrid connection name for the resource.
+ *
+ * @param hybridConnectionName the hybridConnectionName value to set.
+ * @return the RelayNamespaceAccessProperties object itself.
+ */
+ public RelayNamespaceAccessProperties withHybridConnectionName(String hybridConnectionName) {
+ this.hybridConnectionName = hybridConnectionName;
+ return this;
+ }
+
+ /**
+ * Get the accessKey property: Access key for hybrid connection.
+ *
+ * @return the accessKey value.
+ */
+ public String accessKey() {
+ return this.accessKey;
+ }
+
+ /**
+ * Get the expiresOn property: The expiration of access key in unix time.
+ *
+ * @return the expiresOn value.
+ */
+ public Long expiresOn() {
+ return this.expiresOn;
+ }
+
+ /**
+ * Set the expiresOn property: The expiration of access key in unix time.
+ *
+ * @param expiresOn the expiresOn value to set.
+ * @return the RelayNamespaceAccessProperties object itself.
+ */
+ public RelayNamespaceAccessProperties withExpiresOn(Long expiresOn) {
+ this.expiresOn = expiresOn;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (namespaceName() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property namespaceName in model RelayNamespaceAccessProperties"));
+ }
+ if (namespaceNameSuffix() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property namespaceNameSuffix in model RelayNamespaceAccessProperties"));
+ }
+ if (hybridConnectionName() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property hybridConnectionName in model RelayNamespaceAccessProperties"));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(RelayNamespaceAccessProperties.class);
+}
diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/package-info.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/package-info.java
new file mode 100644
index 000000000000..e0beea14383c
--- /dev/null
+++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/package-info.java
@@ -0,0 +1,6 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/** Package containing the inner data models for HybridConnectivityManagementApi. REST API for Hybrid Connectivity. */
+package com.azure.resourcemanager.hybridconnectivity.fluent.models;
diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/package-info.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/package-info.java
new file mode 100644
index 000000000000..4ba47a2bbe94
--- /dev/null
+++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/package-info.java
@@ -0,0 +1,6 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/** Package containing the service clients for HybridConnectivityManagementApi. REST API for Hybrid Connectivity. */
+package com.azure.resourcemanager.hybridconnectivity.fluent;
diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/EndpointAccessResourceImpl.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/EndpointAccessResourceImpl.java
new file mode 100644
index 000000000000..720294f0aa93
--- /dev/null
+++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/EndpointAccessResourceImpl.java
@@ -0,0 +1,49 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.hybridconnectivity.implementation;
+
+import com.azure.resourcemanager.hybridconnectivity.fluent.models.EndpointAccessResourceInner;
+import com.azure.resourcemanager.hybridconnectivity.models.EndpointAccessResource;
+
+public final class EndpointAccessResourceImpl implements EndpointAccessResource {
+ private EndpointAccessResourceInner innerObject;
+
+ private final com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager serviceManager;
+
+ EndpointAccessResourceImpl(
+ EndpointAccessResourceInner innerObject,
+ com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String namespaceName() {
+ return this.innerModel().namespaceName();
+ }
+
+ public String namespaceNameSuffix() {
+ return this.innerModel().namespaceNameSuffix();
+ }
+
+ public String hybridConnectionName() {
+ return this.innerModel().hybridConnectionName();
+ }
+
+ public String accessKey() {
+ return this.innerModel().accessKey();
+ }
+
+ public Long expiresOn() {
+ return this.innerModel().expiresOn();
+ }
+
+ public EndpointAccessResourceInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/EndpointResourceImpl.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/EndpointResourceImpl.java
new file mode 100644
index 000000000000..beef677d0cc5
--- /dev/null
+++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/EndpointResourceImpl.java
@@ -0,0 +1,181 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.hybridconnectivity.implementation;
+
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.hybridconnectivity.fluent.models.EndpointResourceInner;
+import com.azure.resourcemanager.hybridconnectivity.models.EndpointAccessResource;
+import com.azure.resourcemanager.hybridconnectivity.models.EndpointResource;
+import com.azure.resourcemanager.hybridconnectivity.models.ManagedProxyRequest;
+import com.azure.resourcemanager.hybridconnectivity.models.ManagedProxyResource;
+import com.azure.resourcemanager.hybridconnectivity.models.Type;
+
+public final class EndpointResourceImpl
+ implements EndpointResource, EndpointResource.Definition, EndpointResource.Update {
+ private EndpointResourceInner innerObject;
+
+ private final com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public Type typePropertiesType() {
+ return this.innerModel().typePropertiesType();
+ }
+
+ public String resourceId() {
+ return this.innerModel().resourceId();
+ }
+
+ public String provisioningState() {
+ return this.innerModel().provisioningState();
+ }
+
+ public EndpointResourceInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceUri;
+
+ private String endpointName;
+
+ public EndpointResourceImpl withExistingResourceUri(String resourceUri) {
+ this.resourceUri = resourceUri;
+ return this;
+ }
+
+ public EndpointResource create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getEndpoints()
+ .createOrUpdateWithResponse(resourceUri, endpointName, this.innerModel(), Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public EndpointResource create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getEndpoints()
+ .createOrUpdateWithResponse(resourceUri, endpointName, this.innerModel(), context)
+ .getValue();
+ return this;
+ }
+
+ EndpointResourceImpl(
+ String name, com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager serviceManager) {
+ this.innerObject = new EndpointResourceInner();
+ this.serviceManager = serviceManager;
+ this.endpointName = name;
+ }
+
+ public EndpointResourceImpl update() {
+ return this;
+ }
+
+ public EndpointResource apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getEndpoints()
+ .updateWithResponse(resourceUri, endpointName, this.innerModel(), Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public EndpointResource apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getEndpoints()
+ .updateWithResponse(resourceUri, endpointName, this.innerModel(), context)
+ .getValue();
+ return this;
+ }
+
+ EndpointResourceImpl(
+ EndpointResourceInner innerObject,
+ com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceUri =
+ Utils
+ .getValueFromIdByParameterName(
+ innerObject.id(),
+ "/{resourceUri}/providers/Microsoft.HybridConnectivity/endpoints/{endpointName}",
+ "resourceUri");
+ this.endpointName =
+ Utils
+ .getValueFromIdByParameterName(
+ innerObject.id(),
+ "/{resourceUri}/providers/Microsoft.HybridConnectivity/endpoints/{endpointName}",
+ "endpointName");
+ }
+
+ public EndpointResource refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getEndpoints()
+ .getWithResponse(resourceUri, endpointName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public EndpointResource refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getEndpoints()
+ .getWithResponse(resourceUri, endpointName, context)
+ .getValue();
+ return this;
+ }
+
+ public EndpointAccessResource listCredentials() {
+ return serviceManager.endpoints().listCredentials(resourceUri, endpointName);
+ }
+
+ public Response listCredentialsWithResponse(Long expiresin, Context context) {
+ return serviceManager.endpoints().listCredentialsWithResponse(resourceUri, endpointName, expiresin, context);
+ }
+
+ public ManagedProxyResource listManagedProxyDetails(ManagedProxyRequest managedProxyRequest) {
+ return serviceManager.endpoints().listManagedProxyDetails(resourceUri, endpointName, managedProxyRequest);
+ }
+
+ public Response listManagedProxyDetailsWithResponse(
+ ManagedProxyRequest managedProxyRequest, Context context) {
+ return serviceManager
+ .endpoints()
+ .listManagedProxyDetailsWithResponse(resourceUri, endpointName, managedProxyRequest, context);
+ }
+
+ public EndpointResourceImpl withTypePropertiesType(Type typePropertiesType) {
+ this.innerModel().withTypePropertiesType(typePropertiesType);
+ return this;
+ }
+
+ public EndpointResourceImpl withResourceId(String resourceId) {
+ this.innerModel().withResourceId(resourceId);
+ return this;
+ }
+}
diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/EndpointsClientImpl.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/EndpointsClientImpl.java
new file mode 100644
index 000000000000..5f895dc89513
--- /dev/null
+++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/EndpointsClientImpl.java
@@ -0,0 +1,1241 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.hybridconnectivity.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.Patch;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Post;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.resourcemanager.hybridconnectivity.fluent.EndpointsClient;
+import com.azure.resourcemanager.hybridconnectivity.fluent.models.EndpointAccessResourceInner;
+import com.azure.resourcemanager.hybridconnectivity.fluent.models.EndpointResourceInner;
+import com.azure.resourcemanager.hybridconnectivity.fluent.models.ManagedProxyResourceInner;
+import com.azure.resourcemanager.hybridconnectivity.models.EndpointsList;
+import com.azure.resourcemanager.hybridconnectivity.models.ManagedProxyRequest;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in EndpointsClient. */
+public final class EndpointsClientImpl implements EndpointsClient {
+ /** The proxy service used to perform REST calls. */
+ private final EndpointsService service;
+
+ /** The service client containing this operation class. */
+ private final HybridConnectivityManagementApiImpl client;
+
+ /**
+ * Initializes an instance of EndpointsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ EndpointsClientImpl(HybridConnectivityManagementApiImpl client) {
+ this.service =
+ RestProxy.create(EndpointsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for HybridConnectivityManagementApiEndpoints to be used by the proxy
+ * service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "HybridConnectivityMa")
+ private interface EndpointsService {
+ @Headers({"Content-Type: application/json"})
+ @Get("/{resourceUri}/providers/Microsoft.HybridConnectivity/endpoints")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam(value = "resourceUri", encoded = true) String resourceUri,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("/{resourceUri}/providers/Microsoft.HybridConnectivity/endpoints/{endpointName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam(value = "resourceUri", encoded = true) String resourceUri,
+ @PathParam(value = "endpointName", encoded = true) String endpointName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put("/{resourceUri}/providers/Microsoft.HybridConnectivity/endpoints/{endpointName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> createOrUpdate(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam(value = "resourceUri", encoded = true) String resourceUri,
+ @PathParam(value = "endpointName", encoded = true) String endpointName,
+ @BodyParam("application/json") EndpointResourceInner endpointResource,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Patch("/{resourceUri}/providers/Microsoft.HybridConnectivity/endpoints/{endpointName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> update(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam(value = "resourceUri", encoded = true) String resourceUri,
+ @PathParam(value = "endpointName", encoded = true) String endpointName,
+ @BodyParam("application/json") EndpointResourceInner endpointResource,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete("/{resourceUri}/providers/Microsoft.HybridConnectivity/endpoints/{endpointName}")
+ @ExpectedResponses({200, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> delete(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam(value = "resourceUri", encoded = true) String resourceUri,
+ @PathParam(value = "endpointName", encoded = true) String endpointName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post("/{resourceUri}/providers/Microsoft.HybridConnectivity/endpoints/{endpointName}/listCredentials")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listCredentials(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam(value = "resourceUri", encoded = true) String resourceUri,
+ @PathParam(value = "endpointName", encoded = true) String endpointName,
+ @QueryParam("expiresin") Long expiresin,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post("/{resourceUri}/providers/Microsoft.HybridConnectivity/endpoints/{endpointName}/listManagedProxyDetails")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listManagedProxyDetails(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam(value = "resourceUri", encoded = true) String resourceUri,
+ @PathParam(value = "endpointName", encoded = true) String endpointName,
+ @BodyParam("application/json") ManagedProxyRequest managedProxyRequest,
+ @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 of endpoints to the target resource.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list of endpoints along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(String resourceUri) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceUri == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service.list(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, 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 of endpoints to the target resource.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
+ * @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 list of endpoints along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(String resourceUri, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceUri == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceUri 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(), resourceUri, accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * List of endpoints to the target resource.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list of endpoints as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceUri) {
+ return new PagedFlux<>(() -> listSinglePageAsync(resourceUri), nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List of endpoints to the target resource.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
+ * @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 list of endpoints as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceUri, Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(resourceUri, context), nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List of endpoints to the target resource.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list of endpoints as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceUri) {
+ return new PagedIterable<>(listAsync(resourceUri));
+ }
+
+ /**
+ * List of endpoints to the target resource.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
+ * @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 list of endpoints as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceUri, Context context) {
+ return new PagedIterable<>(listAsync(resourceUri, context));
+ }
+
+ /**
+ * Gets the endpoint to the resource.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
+ * @param endpointName The endpoint 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 endpoint to the resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String resourceUri, String endpointName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceUri == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null."));
+ }
+ if (endpointName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ resourceUri,
+ endpointName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets the endpoint to the resource.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
+ * @param endpointName The endpoint 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 endpoint to the resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceUri, String endpointName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceUri == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null."));
+ }
+ if (endpointName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .get(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, endpointName, accept, context);
+ }
+
+ /**
+ * Gets the endpoint to the resource.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
+ * @param endpointName The endpoint 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 endpoint to the resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String resourceUri, String endpointName) {
+ return getWithResponseAsync(resourceUri, endpointName)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Gets the endpoint to the resource.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
+ * @param endpointName The endpoint 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 endpoint to the resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public EndpointResourceInner get(String resourceUri, String endpointName) {
+ return getAsync(resourceUri, endpointName).block();
+ }
+
+ /**
+ * Gets the endpoint to the resource.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
+ * @param endpointName The endpoint 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 endpoint to the resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(String resourceUri, String endpointName, Context context) {
+ return getWithResponseAsync(resourceUri, endpointName, context).block();
+ }
+
+ /**
+ * Create or update the endpoint to the target resource.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
+ * @param endpointName The endpoint name.
+ * @param endpointResource Endpoint details.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the endpoint for the target resource along with {@link Response} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createOrUpdateWithResponseAsync(
+ String resourceUri, String endpointName, EndpointResourceInner endpointResource) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceUri == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null."));
+ }
+ if (endpointName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null."));
+ }
+ if (endpointResource == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter endpointResource is required and cannot be null."));
+ } else {
+ endpointResource.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ resourceUri,
+ endpointName,
+ endpointResource,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Create or update the endpoint to the target resource.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
+ * @param endpointName The endpoint name.
+ * @param endpointResource Endpoint details.
+ * @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 endpoint for the target resource along with {@link Response} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createOrUpdateWithResponseAsync(
+ String resourceUri, String endpointName, EndpointResourceInner endpointResource, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceUri == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null."));
+ }
+ if (endpointName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null."));
+ }
+ if (endpointResource == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter endpointResource is required and cannot be null."));
+ } else {
+ endpointResource.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ resourceUri,
+ endpointName,
+ endpointResource,
+ accept,
+ context);
+ }
+
+ /**
+ * Create or update the endpoint to the target resource.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
+ * @param endpointName The endpoint name.
+ * @param endpointResource Endpoint details.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the endpoint for the target resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceUri, String endpointName, EndpointResourceInner endpointResource) {
+ return createOrUpdateWithResponseAsync(resourceUri, endpointName, endpointResource)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Create or update the endpoint to the target resource.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
+ * @param endpointName The endpoint name.
+ * @param endpointResource Endpoint details.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the endpoint for the target resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public EndpointResourceInner createOrUpdate(
+ String resourceUri, String endpointName, EndpointResourceInner endpointResource) {
+ return createOrUpdateAsync(resourceUri, endpointName, endpointResource).block();
+ }
+
+ /**
+ * Create or update the endpoint to the target resource.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
+ * @param endpointName The endpoint name.
+ * @param endpointResource Endpoint details.
+ * @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 endpoint for the target resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response createOrUpdateWithResponse(
+ String resourceUri, String endpointName, EndpointResourceInner endpointResource, Context context) {
+ return createOrUpdateWithResponseAsync(resourceUri, endpointName, endpointResource, context).block();
+ }
+
+ /**
+ * Update the endpoint to the target resource.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
+ * @param endpointName The endpoint name.
+ * @param endpointResource Endpoint details.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the endpoint for the target resource along with {@link Response} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(
+ String resourceUri, String endpointName, EndpointResourceInner endpointResource) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceUri == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null."));
+ }
+ if (endpointName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null."));
+ }
+ if (endpointResource == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter endpointResource is required and cannot be null."));
+ } else {
+ endpointResource.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .update(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ resourceUri,
+ endpointName,
+ endpointResource,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Update the endpoint to the target resource.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
+ * @param endpointName The endpoint name.
+ * @param endpointResource Endpoint details.
+ * @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 endpoint for the target resource along with {@link Response} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(
+ String resourceUri, String endpointName, EndpointResourceInner endpointResource, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceUri == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null."));
+ }
+ if (endpointName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null."));
+ }
+ if (endpointResource == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter endpointResource is required and cannot be null."));
+ } else {
+ endpointResource.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .update(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ resourceUri,
+ endpointName,
+ endpointResource,
+ accept,
+ context);
+ }
+
+ /**
+ * Update the endpoint to the target resource.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
+ * @param endpointName The endpoint name.
+ * @param endpointResource Endpoint details.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the endpoint for the target resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(
+ String resourceUri, String endpointName, EndpointResourceInner endpointResource) {
+ return updateWithResponseAsync(resourceUri, endpointName, endpointResource)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Update the endpoint to the target resource.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
+ * @param endpointName The endpoint name.
+ * @param endpointResource Endpoint details.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the endpoint for the target resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public EndpointResourceInner update(
+ String resourceUri, String endpointName, EndpointResourceInner endpointResource) {
+ return updateAsync(resourceUri, endpointName, endpointResource).block();
+ }
+
+ /**
+ * Update the endpoint to the target resource.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
+ * @param endpointName The endpoint name.
+ * @param endpointResource Endpoint details.
+ * @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 endpoint for the target resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response updateWithResponse(
+ String resourceUri, String endpointName, EndpointResourceInner endpointResource, Context context) {
+ return updateWithResponseAsync(resourceUri, endpointName, endpointResource, context).block();
+ }
+
+ /**
+ * Deletes the endpoint access to the target resource.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
+ * @param endpointName The endpoint 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 resourceUri, String endpointName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceUri == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null."));
+ }
+ if (endpointName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ resourceUri,
+ endpointName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Deletes the endpoint access to the target resource.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
+ * @param endpointName The endpoint 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 resourceUri, String endpointName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceUri == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null."));
+ }
+ if (endpointName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter endpointName 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(), resourceUri, endpointName, accept, context);
+ }
+
+ /**
+ * Deletes the endpoint access to the target resource.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
+ * @param endpointName The endpoint 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 resourceUri, String endpointName) {
+ return deleteWithResponseAsync(resourceUri, endpointName).flatMap((Response res) -> Mono.empty());
+ }
+
+ /**
+ * Deletes the endpoint access to the target resource.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
+ * @param endpointName The endpoint 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 resourceUri, String endpointName) {
+ deleteAsync(resourceUri, endpointName).block();
+ }
+
+ /**
+ * Deletes the endpoint access to the target resource.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
+ * @param endpointName The endpoint 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}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response deleteWithResponse(String resourceUri, String endpointName, Context context) {
+ return deleteWithResponseAsync(resourceUri, endpointName, context).block();
+ }
+
+ /**
+ * Gets the endpoint access credentials to the resource.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
+ * @param endpointName The endpoint name.
+ * @param expiresin The is how long the endpoint access token is valid (in seconds).
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the endpoint access credentials to the resource along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listCredentialsWithResponseAsync(
+ String resourceUri, String endpointName, Long expiresin) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceUri == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null."));
+ }
+ if (endpointName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listCredentials(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ resourceUri,
+ endpointName,
+ expiresin,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets the endpoint access credentials to the resource.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
+ * @param endpointName The endpoint name.
+ * @param expiresin The is how long the endpoint access token is valid (in seconds).
+ * @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 endpoint access credentials to the resource along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listCredentialsWithResponseAsync(
+ String resourceUri, String endpointName, Long expiresin, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceUri == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null."));
+ }
+ if (endpointName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listCredentials(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ resourceUri,
+ endpointName,
+ expiresin,
+ accept,
+ context);
+ }
+
+ /**
+ * Gets the endpoint access credentials to the resource.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
+ * @param endpointName The endpoint name.
+ * @param expiresin The is how long the endpoint access token is valid (in seconds).
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the endpoint access credentials to the resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono listCredentialsAsync(
+ String resourceUri, String endpointName, Long expiresin) {
+ return listCredentialsWithResponseAsync(resourceUri, endpointName, expiresin)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Gets the endpoint access credentials to the resource.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
+ * @param endpointName The endpoint 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 endpoint access credentials to the resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono listCredentialsAsync(String resourceUri, String endpointName) {
+ final Long expiresin = null;
+ return listCredentialsWithResponseAsync(resourceUri, endpointName, expiresin)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Gets the endpoint access credentials to the resource.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
+ * @param endpointName The endpoint 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 endpoint access credentials to the resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public EndpointAccessResourceInner listCredentials(String resourceUri, String endpointName) {
+ final Long expiresin = null;
+ return listCredentialsAsync(resourceUri, endpointName, expiresin).block();
+ }
+
+ /**
+ * Gets the endpoint access credentials to the resource.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
+ * @param endpointName The endpoint name.
+ * @param expiresin The is how long the endpoint access token is valid (in seconds).
+ * @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 endpoint access credentials to the resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response listCredentialsWithResponse(
+ String resourceUri, String endpointName, Long expiresin, Context context) {
+ return listCredentialsWithResponseAsync(resourceUri, endpointName, expiresin, context).block();
+ }
+
+ /**
+ * Fetches the managed proxy details.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
+ * @param endpointName The endpoint name.
+ * @param managedProxyRequest Object of type ManagedProxyRequest.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return managed Proxy along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listManagedProxyDetailsWithResponseAsync(
+ String resourceUri, String endpointName, ManagedProxyRequest managedProxyRequest) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceUri == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null."));
+ }
+ if (endpointName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null."));
+ }
+ if (managedProxyRequest == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter managedProxyRequest is required and cannot be null."));
+ } else {
+ managedProxyRequest.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listManagedProxyDetails(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ resourceUri,
+ endpointName,
+ managedProxyRequest,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Fetches the managed proxy details.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
+ * @param endpointName The endpoint name.
+ * @param managedProxyRequest Object of type ManagedProxyRequest.
+ * @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 managed Proxy along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listManagedProxyDetailsWithResponseAsync(
+ String resourceUri, String endpointName, ManagedProxyRequest managedProxyRequest, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceUri == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null."));
+ }
+ if (endpointName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null."));
+ }
+ if (managedProxyRequest == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter managedProxyRequest is required and cannot be null."));
+ } else {
+ managedProxyRequest.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listManagedProxyDetails(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ resourceUri,
+ endpointName,
+ managedProxyRequest,
+ accept,
+ context);
+ }
+
+ /**
+ * Fetches the managed proxy details.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
+ * @param endpointName The endpoint name.
+ * @param managedProxyRequest Object of type ManagedProxyRequest.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return managed Proxy on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono listManagedProxyDetailsAsync(
+ String resourceUri, String endpointName, ManagedProxyRequest managedProxyRequest) {
+ return listManagedProxyDetailsWithResponseAsync(resourceUri, endpointName, managedProxyRequest)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Fetches the managed proxy details.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
+ * @param endpointName The endpoint name.
+ * @param managedProxyRequest Object of type ManagedProxyRequest.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return managed Proxy.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ManagedProxyResourceInner listManagedProxyDetails(
+ String resourceUri, String endpointName, ManagedProxyRequest managedProxyRequest) {
+ return listManagedProxyDetailsAsync(resourceUri, endpointName, managedProxyRequest).block();
+ }
+
+ /**
+ * Fetches the managed proxy details.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
+ * @param endpointName The endpoint name.
+ * @param managedProxyRequest Object of type ManagedProxyRequest.
+ * @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 managed Proxy along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response listManagedProxyDetailsWithResponse(
+ String resourceUri, String endpointName, ManagedProxyRequest managedProxyRequest, Context context) {
+ return listManagedProxyDetailsWithResponseAsync(resourceUri, endpointName, managedProxyRequest, context)
+ .block();
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list of endpoints along with {@link PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list of endpoints 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/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/EndpointsImpl.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/EndpointsImpl.java
new file mode 100644
index 000000000000..67fd064d6f41
--- /dev/null
+++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/EndpointsImpl.java
@@ -0,0 +1,252 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.hybridconnectivity.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.hybridconnectivity.fluent.EndpointsClient;
+import com.azure.resourcemanager.hybridconnectivity.fluent.models.EndpointAccessResourceInner;
+import com.azure.resourcemanager.hybridconnectivity.fluent.models.EndpointResourceInner;
+import com.azure.resourcemanager.hybridconnectivity.fluent.models.ManagedProxyResourceInner;
+import com.azure.resourcemanager.hybridconnectivity.models.EndpointAccessResource;
+import com.azure.resourcemanager.hybridconnectivity.models.EndpointResource;
+import com.azure.resourcemanager.hybridconnectivity.models.Endpoints;
+import com.azure.resourcemanager.hybridconnectivity.models.ManagedProxyRequest;
+import com.azure.resourcemanager.hybridconnectivity.models.ManagedProxyResource;
+
+public final class EndpointsImpl implements Endpoints {
+ private static final ClientLogger LOGGER = new ClientLogger(EndpointsImpl.class);
+
+ private final EndpointsClient innerClient;
+
+ private final com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager serviceManager;
+
+ public EndpointsImpl(
+ EndpointsClient innerClient,
+ com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list(String resourceUri) {
+ PagedIterable inner = this.serviceClient().list(resourceUri);
+ return Utils.mapPage(inner, inner1 -> new EndpointResourceImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(String resourceUri, Context context) {
+ PagedIterable inner = this.serviceClient().list(resourceUri, context);
+ return Utils.mapPage(inner, inner1 -> new EndpointResourceImpl(inner1, this.manager()));
+ }
+
+ public EndpointResource get(String resourceUri, String endpointName) {
+ EndpointResourceInner inner = this.serviceClient().get(resourceUri, endpointName);
+ if (inner != null) {
+ return new EndpointResourceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getWithResponse(String resourceUri, String endpointName, Context context) {
+ Response inner =
+ this.serviceClient().getWithResponse(resourceUri, endpointName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new EndpointResourceImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public void deleteByResourceGroup(String resourceUri, String endpointName) {
+ this.serviceClient().delete(resourceUri, endpointName);
+ }
+
+ public Response deleteWithResponse(String resourceUri, String endpointName, Context context) {
+ return this.serviceClient().deleteWithResponse(resourceUri, endpointName, context);
+ }
+
+ public EndpointAccessResource listCredentials(String resourceUri, String endpointName) {
+ EndpointAccessResourceInner inner = this.serviceClient().listCredentials(resourceUri, endpointName);
+ if (inner != null) {
+ return new EndpointAccessResourceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response listCredentialsWithResponse(
+ String resourceUri, String endpointName, Long expiresin, Context context) {
+ Response inner =
+ this.serviceClient().listCredentialsWithResponse(resourceUri, endpointName, expiresin, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new EndpointAccessResourceImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public ManagedProxyResource listManagedProxyDetails(
+ String resourceUri, String endpointName, ManagedProxyRequest managedProxyRequest) {
+ ManagedProxyResourceInner inner =
+ this.serviceClient().listManagedProxyDetails(resourceUri, endpointName, managedProxyRequest);
+ if (inner != null) {
+ return new ManagedProxyResourceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response listManagedProxyDetailsWithResponse(
+ String resourceUri, String endpointName, ManagedProxyRequest managedProxyRequest, Context context) {
+ Response inner =
+ this
+ .serviceClient()
+ .listManagedProxyDetailsWithResponse(resourceUri, endpointName, managedProxyRequest, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new ManagedProxyResourceImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public EndpointResource getById(String id) {
+ String resourceUri =
+ Utils
+ .getValueFromIdByParameterName(
+ id,
+ "/{resourceUri}/providers/Microsoft.HybridConnectivity/endpoints/{endpointName}",
+ "resourceUri");
+ if (resourceUri == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceUri'.", id)));
+ }
+ String endpointName =
+ Utils
+ .getValueFromIdByParameterName(
+ id,
+ "/{resourceUri}/providers/Microsoft.HybridConnectivity/endpoints/{endpointName}",
+ "endpointName");
+ if (endpointName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'endpoints'.", id)));
+ }
+ return this.getWithResponse(resourceUri, endpointName, Context.NONE).getValue();
+ }
+
+ public Response getByIdWithResponse(String id, Context context) {
+ String resourceUri =
+ Utils
+ .getValueFromIdByParameterName(
+ id,
+ "/{resourceUri}/providers/Microsoft.HybridConnectivity/endpoints/{endpointName}",
+ "resourceUri");
+ if (resourceUri == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceUri'.", id)));
+ }
+ String endpointName =
+ Utils
+ .getValueFromIdByParameterName(
+ id,
+ "/{resourceUri}/providers/Microsoft.HybridConnectivity/endpoints/{endpointName}",
+ "endpointName");
+ if (endpointName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'endpoints'.", id)));
+ }
+ return this.getWithResponse(resourceUri, endpointName, context);
+ }
+
+ public void deleteById(String id) {
+ String resourceUri =
+ Utils
+ .getValueFromIdByParameterName(
+ id,
+ "/{resourceUri}/providers/Microsoft.HybridConnectivity/endpoints/{endpointName}",
+ "resourceUri");
+ if (resourceUri == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceUri'.", id)));
+ }
+ String endpointName =
+ Utils
+ .getValueFromIdByParameterName(
+ id,
+ "/{resourceUri}/providers/Microsoft.HybridConnectivity/endpoints/{endpointName}",
+ "endpointName");
+ if (endpointName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'endpoints'.", id)));
+ }
+ this.deleteWithResponse(resourceUri, endpointName, Context.NONE);
+ }
+
+ public Response deleteByIdWithResponse(String id, Context context) {
+ String resourceUri =
+ Utils
+ .getValueFromIdByParameterName(
+ id,
+ "/{resourceUri}/providers/Microsoft.HybridConnectivity/endpoints/{endpointName}",
+ "resourceUri");
+ if (resourceUri == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceUri'.", id)));
+ }
+ String endpointName =
+ Utils
+ .getValueFromIdByParameterName(
+ id,
+ "/{resourceUri}/providers/Microsoft.HybridConnectivity/endpoints/{endpointName}",
+ "endpointName");
+ if (endpointName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'endpoints'.", id)));
+ }
+ return this.deleteWithResponse(resourceUri, endpointName, context);
+ }
+
+ private EndpointsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager() {
+ return this.serviceManager;
+ }
+
+ public EndpointResourceImpl define(String name) {
+ return new EndpointResourceImpl(name, this.manager());
+ }
+}
diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/HybridConnectivityManagementApiBuilder.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/HybridConnectivityManagementApiBuilder.java
new file mode 100644
index 000000000000..4305a9fc5c16
--- /dev/null
+++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/HybridConnectivityManagementApiBuilder.java
@@ -0,0 +1,126 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.hybridconnectivity.implementation;
+
+import com.azure.core.annotation.ServiceClientBuilder;
+import com.azure.core.http.HttpPipeline;
+import com.azure.core.http.HttpPipelineBuilder;
+import com.azure.core.http.policy.RetryPolicy;
+import com.azure.core.http.policy.UserAgentPolicy;
+import com.azure.core.management.AzureEnvironment;
+import com.azure.core.management.serializer.SerializerFactory;
+import com.azure.core.util.serializer.SerializerAdapter;
+import java.time.Duration;
+
+/** A builder for creating a new instance of the HybridConnectivityManagementApiImpl type. */
+@ServiceClientBuilder(serviceClients = {HybridConnectivityManagementApiImpl.class})
+public final class HybridConnectivityManagementApiBuilder {
+ /*
+ * server parameter
+ */
+ private String endpoint;
+
+ /**
+ * Sets server parameter.
+ *
+ * @param endpoint the endpoint value.
+ * @return the HybridConnectivityManagementApiBuilder.
+ */
+ public HybridConnectivityManagementApiBuilder endpoint(String endpoint) {
+ this.endpoint = endpoint;
+ return this;
+ }
+
+ /*
+ * The environment to connect to
+ */
+ private AzureEnvironment environment;
+
+ /**
+ * Sets The environment to connect to.
+ *
+ * @param environment the environment value.
+ * @return the HybridConnectivityManagementApiBuilder.
+ */
+ public HybridConnectivityManagementApiBuilder environment(AzureEnvironment environment) {
+ this.environment = environment;
+ return this;
+ }
+
+ /*
+ * The HTTP pipeline to send requests through
+ */
+ private HttpPipeline pipeline;
+
+ /**
+ * Sets The HTTP pipeline to send requests through.
+ *
+ * @param pipeline the pipeline value.
+ * @return the HybridConnectivityManagementApiBuilder.
+ */
+ public HybridConnectivityManagementApiBuilder pipeline(HttpPipeline pipeline) {
+ this.pipeline = pipeline;
+ return this;
+ }
+
+ /*
+ * The default poll interval for long-running operation
+ */
+ private Duration defaultPollInterval;
+
+ /**
+ * Sets The default poll interval for long-running operation.
+ *
+ * @param defaultPollInterval the defaultPollInterval value.
+ * @return the HybridConnectivityManagementApiBuilder.
+ */
+ public HybridConnectivityManagementApiBuilder defaultPollInterval(Duration defaultPollInterval) {
+ this.defaultPollInterval = defaultPollInterval;
+ return this;
+ }
+
+ /*
+ * The serializer to serialize an object into a string
+ */
+ private SerializerAdapter serializerAdapter;
+
+ /**
+ * Sets The serializer to serialize an object into a string.
+ *
+ * @param serializerAdapter the serializerAdapter value.
+ * @return the HybridConnectivityManagementApiBuilder.
+ */
+ public HybridConnectivityManagementApiBuilder serializerAdapter(SerializerAdapter serializerAdapter) {
+ this.serializerAdapter = serializerAdapter;
+ return this;
+ }
+
+ /**
+ * Builds an instance of HybridConnectivityManagementApiImpl with the provided parameters.
+ *
+ * @return an instance of HybridConnectivityManagementApiImpl.
+ */
+ public HybridConnectivityManagementApiImpl buildClient() {
+ if (endpoint == null) {
+ this.endpoint = "https://management.azure.com";
+ }
+ if (environment == null) {
+ this.environment = AzureEnvironment.AZURE;
+ }
+ if (pipeline == null) {
+ this.pipeline = new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build();
+ }
+ if (defaultPollInterval == null) {
+ this.defaultPollInterval = Duration.ofSeconds(30);
+ }
+ if (serializerAdapter == null) {
+ this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter();
+ }
+ HybridConnectivityManagementApiImpl client =
+ new HybridConnectivityManagementApiImpl(
+ pipeline, serializerAdapter, defaultPollInterval, environment, endpoint);
+ return client;
+ }
+}
diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/HybridConnectivityManagementApiImpl.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/HybridConnectivityManagementApiImpl.java
new file mode 100644
index 000000000000..dd4fe9ace6d1
--- /dev/null
+++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/HybridConnectivityManagementApiImpl.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.hybridconnectivity.implementation;
+
+import com.azure.core.annotation.ServiceClient;
+import com.azure.core.http.HttpHeaders;
+import com.azure.core.http.HttpPipeline;
+import com.azure.core.http.HttpResponse;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.AzureEnvironment;
+import com.azure.core.management.exception.ManagementError;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.management.polling.PollerFactory;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.core.util.polling.AsyncPollResponse;
+import com.azure.core.util.polling.LongRunningOperationStatus;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.serializer.SerializerAdapter;
+import com.azure.core.util.serializer.SerializerEncoding;
+import com.azure.resourcemanager.hybridconnectivity.fluent.EndpointsClient;
+import com.azure.resourcemanager.hybridconnectivity.fluent.HybridConnectivityManagementApi;
+import com.azure.resourcemanager.hybridconnectivity.fluent.OperationsClient;
+import java.io.IOException;
+import java.lang.reflect.Type;
+import java.nio.ByteBuffer;
+import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
+import java.time.Duration;
+import java.util.Map;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/** Initializes a new instance of the HybridConnectivityManagementApiImpl type. */
+@ServiceClient(builder = HybridConnectivityManagementApiBuilder.class)
+public final class HybridConnectivityManagementApiImpl implements HybridConnectivityManagementApi {
+ /** server parameter. */
+ private final String endpoint;
+
+ /**
+ * Gets server parameter.
+ *
+ * @return the endpoint value.
+ */
+ public String getEndpoint() {
+ return this.endpoint;
+ }
+
+ /** Api Version. */
+ private final String apiVersion;
+
+ /**
+ * Gets Api Version.
+ *
+ * @return the apiVersion value.
+ */
+ public String getApiVersion() {
+ return this.apiVersion;
+ }
+
+ /** The HTTP pipeline to send requests through. */
+ private final HttpPipeline httpPipeline;
+
+ /**
+ * Gets The HTTP pipeline to send requests through.
+ *
+ * @return the httpPipeline value.
+ */
+ public HttpPipeline getHttpPipeline() {
+ return this.httpPipeline;
+ }
+
+ /** The serializer to serialize an object into a string. */
+ private final SerializerAdapter serializerAdapter;
+
+ /**
+ * Gets The serializer to serialize an object into a string.
+ *
+ * @return the serializerAdapter value.
+ */
+ SerializerAdapter getSerializerAdapter() {
+ return this.serializerAdapter;
+ }
+
+ /** The default poll interval for long-running operation. */
+ private final Duration defaultPollInterval;
+
+ /**
+ * Gets The default poll interval for long-running operation.
+ *
+ * @return the defaultPollInterval value.
+ */
+ public Duration getDefaultPollInterval() {
+ return this.defaultPollInterval;
+ }
+
+ /** The OperationsClient object to access its operations. */
+ private final OperationsClient operations;
+
+ /**
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ public OperationsClient getOperations() {
+ return this.operations;
+ }
+
+ /** The EndpointsClient object to access its operations. */
+ private final EndpointsClient endpoints;
+
+ /**
+ * Gets the EndpointsClient object to access its operations.
+ *
+ * @return the EndpointsClient object.
+ */
+ public EndpointsClient getEndpoints() {
+ return this.endpoints;
+ }
+
+ /**
+ * Initializes an instance of HybridConnectivityManagementApi client.
+ *
+ * @param httpPipeline The HTTP pipeline to send requests through.
+ * @param serializerAdapter The serializer to serialize an object into a string.
+ * @param defaultPollInterval The default poll interval for long-running operation.
+ * @param environment The Azure environment.
+ * @param endpoint server parameter.
+ */
+ HybridConnectivityManagementApiImpl(
+ HttpPipeline httpPipeline,
+ SerializerAdapter serializerAdapter,
+ Duration defaultPollInterval,
+ AzureEnvironment environment,
+ String endpoint) {
+ this.httpPipeline = httpPipeline;
+ this.serializerAdapter = serializerAdapter;
+ this.defaultPollInterval = defaultPollInterval;
+ this.endpoint = endpoint;
+ this.apiVersion = "2022-05-01-preview";
+ this.operations = new OperationsClientImpl(this);
+ this.endpoints = new EndpointsClientImpl(this);
+ }
+
+ /**
+ * Gets default client context.
+ *
+ * @return the default client context.
+ */
+ public Context getContext() {
+ return Context.NONE;
+ }
+
+ /**
+ * Merges default client context with provided context.
+ *
+ * @param context the context to be merged with default client context.
+ * @return the merged context.
+ */
+ public Context mergeContext(Context context) {
+ for (Map.Entry