diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt
index 27be5c0477dd..44863ac41fe1 100644
--- a/eng/versioning/version_client.txt
+++ b/eng/versioning/version_client.txt
@@ -320,6 +320,7 @@ com.azure.resourcemanager:azure-resourcemanager-quota;1.0.0-beta.1;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-extendedlocation;1.0.0-beta.1;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-logz;1.0.0-beta.1;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-storagepool;1.0.0-beta.1;1.0.0-beta.1
+com.azure.resourcemanager:azure-resourcemanager-hybridconnectivity;1.0.0-beta.1;1.0.0-beta.1
# Unreleased dependencies: Copy the entry from above, prepend "unreleased_" and remove the current
# version. Unreleased dependencies are only valid for dependency versions.
diff --git a/pom.xml b/pom.xml
index c48350b9b837..ff9b1f23ca0f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -769,6 +769,7 @@
sdk/healthbot
sdk/healthcareapis
sdk/hybridcompute
+ sdk/hybridconnectivity
sdk/hybridkubernetes
sdk/hybridnetwork
sdk/identity
diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/CHANGELOG.md b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/CHANGELOG.md
new file mode 100644
index 000000000000..fe5d0f24c2e3
--- /dev/null
+++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/CHANGELOG.md
@@ -0,0 +1,5 @@
+# Release History
+
+## 1.0.0-beta.1 (2021-10-14)
+
+- Azure Resource Manager HybridConnectivity client library for Java. This package contains Microsoft Azure SDK for HybridConnectivity Management SDK. REST API for Hybrid Connectivity. Package tag package-2021-10-06-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/README.md b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/README.md
new file mode 100644
index 000000000000..6371297f56b1
--- /dev/null
+++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/README.md
@@ -0,0 +1,102 @@
+# Azure Resource Manager HybridConnectivity client library for Java
+
+Azure Resource Manager HybridConnectivity client library for Java.
+
+This package contains Microsoft Azure SDK for HybridConnectivity Management SDK. REST API for Hybrid Connectivity. Package tag package-2021-10-06-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
+
+## We'd love to hear your feedback
+
+We're always working on improving our products and the way we communicate with our users. So we'd love to learn what's working and how we can do better.
+
+If you haven't already, please take a few minutes to [complete this short survey][survey] we have put together.
+
+Thank you in advance for your collaboration. We really appreciate your time!
+
+## Documentation
+
+Various documentation is available to help you get started
+
+- [API reference documentation][docs]
+
+## Getting started
+
+### Prerequisites
+
+- [Java Development Kit (JDK)][jdk] with version 8 or above
+- [Azure Subscription][azure_subscription]
+
+### Adding the package to your product
+
+[//]: # ({x-version-update-start;com.azure.resourcemanager:azure-resourcemanager-hybridconnectivity;current})
+```xml
+
+ com.azure.resourcemanager
+ azure-resourcemanager-hybridconnectivity
+ 1.0.0-beta.1
+
+```
+[//]: # ({x-version-update-end})
+
+### Include the recommended packages
+
+Azure Management Libraries require a `TokenCredential` implementation for authentication and an `HttpClient` implementation for HTTP client.
+
+[Azure Identity][azure_identity] package and [Azure Core Netty HTTP][azure_core_http_netty] package provide the default implementation.
+
+### Authentication
+
+By default, Azure Active Directory token authentication depends on correct configure of following environment variables.
+
+- `AZURE_CLIENT_ID` for Azure client ID.
+- `AZURE_TENANT_ID` for Azure tenant ID.
+- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate.
+
+In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`.
+
+With above configuration, `azure` client can be authenticated by following code:
+
+```java
+AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
+TokenCredential credential = new DefaultAzureCredentialBuilder()
+ .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint())
+ .build();
+HybridConnectivityManager manager = HybridConnectivityManager
+ .authenticate(credential, profile);
+```
+
+The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise.
+
+See [Authentication][authenticate] for more options.
+
+## Key concepts
+
+See [API design][design] for general introduction on design and key concepts on Azure Management Libraries.
+
+## Examples
+
+[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/SAMPLE.md)
+
+
+## Troubleshooting
+
+## Next steps
+
+## Contributing
+
+For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md).
+
+1. Fork it
+1. Create your feature branch (`git checkout -b my-new-feature`)
+1. Commit your changes (`git commit -am 'Add some feature'`)
+1. Push to the branch (`git push origin my-new-feature`)
+1. Create new Pull Request
+
+
+[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS
+[docs]: https://azure.github.io/azure-sdk-for-java/
+[jdk]: https://docs.microsoft.com/java/azure/jdk/
+[azure_subscription]: https://azure.microsoft.com/free/
+[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity
+[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty
+[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md
+[design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md
diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/SAMPLE.md b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/SAMPLE.md
new file mode 100644
index 000000000000..91bcaebe8308
--- /dev/null
+++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/SAMPLE.md
@@ -0,0 +1,244 @@
+# Code snippets and samples
+
+
+## Endpoints
+
+- [CreateOrUpdate](#endpoints_createorupdate)
+- [Delete](#endpoints_delete)
+- [Get](#endpoints_get)
+- [List](#endpoints_list)
+- [ListCredentials](#endpoints_listcredentials)
+- [Update](#endpoints_update)
+
+## Operations
+
+- [List](#operations_list)
+### Endpoints_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.hybridconnectivity.models.Type;
+
+/** Samples for Endpoints CreateOrUpdate. */
+public final class EndpointsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/preview/2021-10-06-preview/examples/EndpointsPutCustom.json
+ */
+ /**
+ * Sample code: HybridConnectivityEndpointsPutCustom.
+ *
+ * @param manager Entry point to HybridConnectivityManager.
+ */
+ public static void hybridConnectivityEndpointsPutCustom(
+ com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) {
+ manager
+ .endpoints()
+ .define("custom")
+ .withExistingResourceUri(
+ "subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine")
+ .withTypePropertiesType(Type.CUSTOM)
+ .withResourceId(
+ "/subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.Relay/namespaces/custom-relay-namespace")
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/preview/2021-10-06-preview/examples/EndpointsPutDefault.json
+ */
+ /**
+ * Sample code: HybridConnectivityEndpointsPutDefault.
+ *
+ * @param manager Entry point to HybridConnectivityManager.
+ */
+ public static void hybridConnectivityEndpointsPutDefault(
+ com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) {
+ manager
+ .endpoints()
+ .define("default")
+ .withExistingResourceUri(
+ "subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine")
+ .withTypePropertiesType(Type.DEFAULT)
+ .create();
+ }
+}
+```
+
+### Endpoints_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Endpoints Delete. */
+public final class EndpointsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/preview/2021-10-06-preview/examples/EndpointsDeleteDefault.json
+ */
+ /**
+ * Sample code: HybridConnectivityEndpointsDeleteDefault.
+ *
+ * @param manager Entry point to HybridConnectivityManager.
+ */
+ public static void hybridConnectivityEndpointsDeleteDefault(
+ com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) {
+ manager
+ .endpoints()
+ .deleteWithResponse(
+ "subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine",
+ "default",
+ Context.NONE);
+ }
+}
+```
+
+### Endpoints_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Endpoints Get. */
+public final class EndpointsGetSamples {
+ /*
+ * x-ms-original-file: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/preview/2021-10-06-preview/examples/EndpointsGetDefault.json
+ */
+ /**
+ * Sample code: HybridConnectivityEndpointsGetDefault.
+ *
+ * @param manager Entry point to HybridConnectivityManager.
+ */
+ public static void hybridConnectivityEndpointsGetDefault(
+ com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) {
+ manager
+ .endpoints()
+ .getWithResponse(
+ "subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine",
+ "default",
+ Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/preview/2021-10-06-preview/examples/EndpointsGetCustom.json
+ */
+ /**
+ * Sample code: HybridConnectivityEndpointsGetCustom.
+ *
+ * @param manager Entry point to HybridConnectivityManager.
+ */
+ public static void hybridConnectivityEndpointsGetCustom(
+ com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) {
+ manager
+ .endpoints()
+ .getWithResponse(
+ "subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine",
+ "custom",
+ Context.NONE);
+ }
+}
+```
+
+### Endpoints_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Endpoints List. */
+public final class EndpointsListSamples {
+ /*
+ * x-ms-original-file: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/preview/2021-10-06-preview/examples/EndpointsList.json
+ */
+ /**
+ * Sample code: HybridConnectivityEndpointsGet.
+ *
+ * @param manager Entry point to HybridConnectivityManager.
+ */
+ public static void hybridConnectivityEndpointsGet(
+ com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) {
+ manager
+ .endpoints()
+ .list(
+ "subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine",
+ Context.NONE);
+ }
+}
+```
+
+### Endpoints_ListCredentials
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Endpoints ListCredentials. */
+public final class EndpointsListCredentialsSamples {
+ /*
+ * x-ms-original-file: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/preview/2021-10-06-preview/examples/EndpointsPostListCredentials.json
+ */
+ /**
+ * Sample code: HybridConnectivityEndpointsPostListCredentials.
+ *
+ * @param manager Entry point to HybridConnectivityManager.
+ */
+ public static void hybridConnectivityEndpointsPostListCredentials(
+ com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) {
+ manager
+ .endpoints()
+ .listCredentialsWithResponse(
+ "subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine",
+ "default",
+ 10800L,
+ Context.NONE);
+ }
+}
+```
+
+### Endpoints_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.hybridconnectivity.models.EndpointResource;
+import com.azure.resourcemanager.hybridconnectivity.models.Type;
+
+/** Samples for Endpoints Update. */
+public final class EndpointsUpdateSamples {
+ /*
+ * x-ms-original-file: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/preview/2021-10-06-preview/examples/EndpointsPatchDefault.json
+ */
+ /**
+ * Sample code: HybridConnectivityEndpointsPatchDefault.
+ *
+ * @param manager Entry point to HybridConnectivityManager.
+ */
+ public static void hybridConnectivityEndpointsPatchDefault(
+ com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) {
+ EndpointResource resource =
+ manager
+ .endpoints()
+ .getWithResponse(
+ "subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine",
+ "default",
+ Context.NONE)
+ .getValue();
+ resource.update().withTypePropertiesType(Type.DEFAULT).apply();
+ }
+}
+```
+
+### Operations_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Operations List. */
+public final class OperationsListSamples {
+ /*
+ * x-ms-original-file: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/preview/2021-10-06-preview/examples/OperationsList.json
+ */
+ /**
+ * Sample code: HybridConnectivityOperationsList.
+ *
+ * @param manager Entry point to HybridConnectivityManager.
+ */
+ public static void hybridConnectivityOperationsList(
+ com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) {
+ manager.operations().list(Context.NONE);
+ }
+}
+```
+
diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/pom.xml b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/pom.xml
new file mode 100644
index 000000000000..f2195afdd6da
--- /dev/null
+++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/pom.xml
@@ -0,0 +1,86 @@
+
+ 4.0.0
+
+ com.azure
+ azure-client-sdk-parent
+ 1.7.0
+ ../../parents/azure-client-sdk-parent
+
+
+ com.azure.resourcemanager
+ azure-resourcemanager-hybridconnectivity
+ 1.0.0-beta.1
+ jar
+
+ Microsoft Azure SDK for HybridConnectivity Management
+ This package contains Microsoft Azure SDK for HybridConnectivity Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. REST API for Hybrid Connectivity. Package tag package-2021-10-06-preview.
+ https://github.com/Azure/azure-sdk-for-java
+
+
+
+ The MIT License (MIT)
+ http://opensource.org/licenses/MIT
+ repo
+
+
+
+
+ https://github.com/Azure/azure-sdk-for-java
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ HEAD
+
+
+
+ microsoft
+ Microsoft
+
+
+
+ UTF-8
+
+
+
+
+ com.azure
+ azure-core
+ 1.21.0
+
+
+ com.azure
+ azure-core-management
+ 1.4.2
+
+
+
+
+
+ org.jacoco
+ jacoco-maven-plugin
+ 0.8.7
+
+ true
+
+
+
+ org.revapi
+ revapi-maven-plugin
+ 0.11.2
+
+
+
+ -
+
java.method.addedToInterface
+
+ -
+ true
+
.*
+ com\.azure\.resourcemanager(\.[^.]+)+\.fluent(\.[^.]+)*
+
+
+
+
+
+
+
+
diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/HybridConnectivityManager.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/HybridConnectivityManager.java
new file mode 100644
index 000000000000..797187257b5f
--- /dev/null
+++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/HybridConnectivityManager.java
@@ -0,0 +1,238 @@
+// 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;
+
+import com.azure.core.credential.TokenCredential;
+import com.azure.core.http.HttpClient;
+import com.azure.core.http.HttpPipeline;
+import com.azure.core.http.HttpPipelineBuilder;
+import com.azure.core.http.policy.AddDatePolicy;
+import com.azure.core.http.policy.HttpLogOptions;
+import com.azure.core.http.policy.HttpLoggingPolicy;
+import com.azure.core.http.policy.HttpPipelinePolicy;
+import com.azure.core.http.policy.HttpPolicyProviders;
+import com.azure.core.http.policy.RequestIdPolicy;
+import com.azure.core.http.policy.RetryPolicy;
+import com.azure.core.http.policy.UserAgentPolicy;
+import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy;
+import com.azure.core.management.profile.AzureProfile;
+import com.azure.core.util.Configuration;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.hybridconnectivity.fluent.HybridConnectivityManagementApi;
+import com.azure.resourcemanager.hybridconnectivity.implementation.EndpointsImpl;
+import com.azure.resourcemanager.hybridconnectivity.implementation.HybridConnectivityManagementApiBuilder;
+import com.azure.resourcemanager.hybridconnectivity.implementation.OperationsImpl;
+import com.azure.resourcemanager.hybridconnectivity.models.Endpoints;
+import com.azure.resourcemanager.hybridconnectivity.models.Operations;
+import java.time.Duration;
+import java.time.temporal.ChronoUnit;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+
+/** Entry point to HybridConnectivityManager. REST API for Hybrid Connectivity. */
+public final class HybridConnectivityManager {
+ private Operations operations;
+
+ private Endpoints endpoints;
+
+ private final HybridConnectivityManagementApi clientObject;
+
+ private HybridConnectivityManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
+ Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+ this.clientObject =
+ new HybridConnectivityManagementApiBuilder()
+ .pipeline(httpPipeline)
+ .endpoint(profile.getEnvironment().getResourceManagerEndpoint())
+ .defaultPollInterval(defaultPollInterval)
+ .buildClient();
+ }
+
+ /**
+ * 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 static HybridConnectivityManager authenticate(TokenCredential credential, AzureProfile profile) {
+ Objects.requireNonNull(credential, "'credential' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+ return configure().authenticate(credential, profile);
+ }
+
+ /**
+ * Gets a Configurable instance that can be used to create HybridConnectivityManager with optional configuration.
+ *
+ * @return the Configurable instance allowing configurations.
+ */
+ public static Configurable configure() {
+ return new HybridConnectivityManager.Configurable();
+ }
+
+ /** The Configurable allowing configurations to be set. */
+ public static final class Configurable {
+ private final ClientLogger logger = new ClientLogger(Configurable.class);
+
+ private HttpClient httpClient;
+ private HttpLogOptions httpLogOptions;
+ private final List policies = new ArrayList<>();
+ private final List scopes = new ArrayList<>();
+ private RetryPolicy retryPolicy;
+ 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 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, "'retryPolicy' cannot be null.");
+ if (this.defaultPollInterval.isNegative()) {
+ throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' 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) {
+ retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ }
+ List policies = new ArrayList<>();
+ policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
+ policies.add(new RequestIdPolicy());
+ HttpPolicyProviders.addBeforeRetryPolicies(policies);
+ policies.add(retryPolicy);
+ policies.add(new AddDatePolicy());
+ policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
+ policies.addAll(this.policies);
+ 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..ca2c3f3d40df
--- /dev/null
+++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/EndpointsClient.java
@@ -0,0 +1,184 @@
+// 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;
+
+/** 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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response listCredentialsWithResponse(
+ String resourceUri, String endpointName, Long expiresin, 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..e623c4ceec9a
--- /dev/null
+++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/OperationsClient.java
@@ -0,0 +1,36 @@
+// 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.
+ */
+ @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.
+ */
+ @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..652da751440e
--- /dev/null
+++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/EndpointAccessResourceInner.java
@@ -0,0 +1,143 @@
+// 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.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The endpoint access for the target resource. */
+@Fluent
+public final class EndpointAccessResourceInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(EndpointAccessResourceInner.class);
+
+ /*
+ * 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..9e679239d4a7
--- /dev/null
+++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/EndpointProperties.java
@@ -0,0 +1,97 @@
+// 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.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Endpoint details. */
+@Fluent
+public final class EndpointProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(EndpointProperties.class);
+
+ /*
+ * 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 provisioningState property.
+ */
+ @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 provisioningState property.
+ *
+ * @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"));
+ }
+ }
+}
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..73fb96e6e18f
--- /dev/null
+++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/EndpointResourceInner.java
@@ -0,0 +1,115 @@
+// 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.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.hybridconnectivity.models.Type;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The endpoint for the target resource. */
+@Fluent
+public final class EndpointResourceInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(EndpointResourceInner.class);
+
+ /*
+ * 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 provisioningState property.
+ *
+ * @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/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..3eec63d42199
--- /dev/null
+++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/OperationInner.java
@@ -0,0 +1,125 @@
+// 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.ActionType;
+import com.azure.resourcemanager.hybridconnectivity.models.OperationDisplay;
+import com.azure.resourcemanager.hybridconnectivity.models.Origin;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+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 {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationInner.class);
+
+ /*
+ * 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..55976328beb2
--- /dev/null
+++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/RelayNamespaceAccessProperties.java
@@ -0,0 +1,161 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.hybridconnectivity.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Azure relay hybrid connection access properties. */
+@Fluent
+public final class RelayNamespaceAccessProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(RelayNamespaceAccessProperties.class);
+
+ /*
+ * 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"));
+ }
+ }
+}
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..1f5c4236385a
--- /dev/null
+++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/EndpointResourceImpl.java
@@ -0,0 +1,168 @@
+// 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.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 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..fdbf2290e42a
--- /dev/null
+++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/EndpointsClientImpl.java
@@ -0,0 +1,1068 @@
+// 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.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.models.EndpointsList;
+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 {
+ private final ClientLogger logger = new ClientLogger(EndpointsClientImpl.class);
+
+ /** 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"})
+ @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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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 completion.
+ */
+ @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 completion.
+ */
+ @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 the completion.
+ */
+ @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 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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response listCredentialsWithResponse(
+ String resourceUri, String endpointName, Long expiresin, Context context) {
+ return listCredentialsWithResponseAsync(resourceUri, endpointName, expiresin, 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.
+ */
+ @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.
+ */
+ @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..a5047335a219
--- /dev/null
+++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/EndpointsImpl.java
@@ -0,0 +1,222 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.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.models.EndpointAccessResource;
+import com.azure.resourcemanager.hybridconnectivity.models.EndpointResource;
+import com.azure.resourcemanager.hybridconnectivity.models.Endpoints;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class EndpointsImpl implements Endpoints {
+ @JsonIgnore private 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 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).getValue();
+ }
+
+ 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..85eed7c46432
--- /dev/null
+++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/HybridConnectivityManagementApiBuilder.java
@@ -0,0 +1,130 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.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.CookiePolicy;
+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 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 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 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 (defaultPollInterval == null) {
+ this.defaultPollInterval = Duration.ofSeconds(30);
+ }
+ if (pipeline == null) {
+ this.pipeline =
+ new HttpPipelineBuilder()
+ .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy())
+ .build();
+ }
+ 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..ff5baffd11f8
--- /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 {
+ private final ClientLogger logger = new ClientLogger(HybridConnectivityManagementApiImpl.class);
+
+ /** 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 = "2021-10-06-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