diff --git a/sdk/search/azure-resourcemanager-search/CHANGELOG.md b/sdk/search/azure-resourcemanager-search/CHANGELOG.md
new file mode 100644
index 000000000000..f1ab8c480553
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/CHANGELOG.md
@@ -0,0 +1,5 @@
+# Release History
+
+## 1.0.0-beta.1 (2022-03-03)
+
+- Azure Resource Manager Search client library for Java. This package contains Microsoft Azure SDK for Search Management SDK. Client that can be used to manage Azure Cognitive Search services and API keys. Package tag package-2020-08. 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/search/azure-resourcemanager-search/README.md b/sdk/search/azure-resourcemanager-search/README.md
new file mode 100644
index 000000000000..26346cc9251b
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/README.md
@@ -0,0 +1,102 @@
+# Azure Resource Manager Search client library for Java
+
+Azure Resource Manager Search client library for Java.
+
+This package contains Microsoft Azure SDK for Search Management SDK. Client that can be used to manage Azure Cognitive Search services and API keys. Package tag package-2020-08. 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-search;current})
+```xml
+
+ com.azure.resourcemanager
+ azure-resourcemanager-search
+ 2.13.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();
+SearchManager manager = SearchManager
+ .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/search/azure-resourcemanager-search/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/search/azure-resourcemanager-search/SAMPLE.md b/sdk/search/azure-resourcemanager-search/SAMPLE.md
new file mode 100644
index 000000000000..df8126e732db
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/SAMPLE.md
@@ -0,0 +1,720 @@
+# Code snippets and samples
+
+
+## AdminKeys
+
+- [Get](#adminkeys_get)
+- [Regenerate](#adminkeys_regenerate)
+
+## PrivateEndpointConnections
+
+- [Delete](#privateendpointconnections_delete)
+- [Get](#privateendpointconnections_get)
+- [ListByService](#privateendpointconnections_listbyservice)
+- [Update](#privateendpointconnections_update)
+
+## PrivateLinkResources
+
+- [ListSupported](#privatelinkresources_listsupported)
+
+## QueryKeys
+
+- [Create](#querykeys_create)
+- [Delete](#querykeys_delete)
+- [ListBySearchService](#querykeys_listbysearchservice)
+
+## Services
+
+- [CheckNameAvailability](#services_checknameavailability)
+- [CreateOrUpdate](#services_createorupdate)
+- [Delete](#services_delete)
+- [GetByResourceGroup](#services_getbyresourcegroup)
+- [List](#services_list)
+- [ListByResourceGroup](#services_listbyresourcegroup)
+- [Update](#services_update)
+
+## SharedPrivateLinkResources
+
+- [CreateOrUpdate](#sharedprivatelinkresources_createorupdate)
+- [Delete](#sharedprivatelinkresources_delete)
+- [Get](#sharedprivatelinkresources_get)
+- [ListByService](#sharedprivatelinkresources_listbyservice)
+### AdminKeys_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for AdminKeys Get. */
+public final class AdminKeysGetSamples {
+ /*
+ * x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2020-08-01/examples/SearchGetAdminKeys.json
+ */
+ /**
+ * Sample code: SearchGetAdminKeys.
+ *
+ * @param manager Entry point to SearchManager.
+ */
+ public static void searchGetAdminKeys(com.azure.resourcemanager.search.SearchManager manager) {
+ manager.adminKeys().getWithResponse("rg1", "mysearchservice", null, Context.NONE);
+ }
+}
+```
+
+### AdminKeys_Regenerate
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.search.models.AdminKeyKind;
+
+/** Samples for AdminKeys Regenerate. */
+public final class AdminKeysRegenerateSamples {
+ /*
+ * x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2020-08-01/examples/SearchRegenerateAdminKey.json
+ */
+ /**
+ * Sample code: SearchRegenerateAdminKey.
+ *
+ * @param manager Entry point to SearchManager.
+ */
+ public static void searchRegenerateAdminKey(com.azure.resourcemanager.search.SearchManager manager) {
+ manager.adminKeys().regenerateWithResponse("rg1", "mysearchservice", AdminKeyKind.PRIMARY, null, Context.NONE);
+ }
+}
+```
+
+### PrivateEndpointConnections_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for PrivateEndpointConnections Delete. */
+public final class PrivateEndpointConnectionsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2020-08-01/examples/DeletePrivateEndpointConnection.json
+ */
+ /**
+ * Sample code: PrivateEndpointConnectionDelete.
+ *
+ * @param manager Entry point to SearchManager.
+ */
+ public static void privateEndpointConnectionDelete(com.azure.resourcemanager.search.SearchManager manager) {
+ manager
+ .privateEndpointConnections()
+ .deleteWithResponse(
+ "rg1", "mysearchservice", "testEndpoint.50bf4fbe-d7c1-4b48-a642-4f5892642546", null, Context.NONE);
+ }
+}
+```
+
+### PrivateEndpointConnections_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for PrivateEndpointConnections Get. */
+public final class PrivateEndpointConnectionsGetSamples {
+ /*
+ * x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2020-08-01/examples/GetPrivateEndpointConnection.json
+ */
+ /**
+ * Sample code: PrivateEndpointConnectionGet.
+ *
+ * @param manager Entry point to SearchManager.
+ */
+ public static void privateEndpointConnectionGet(com.azure.resourcemanager.search.SearchManager manager) {
+ manager
+ .privateEndpointConnections()
+ .getWithResponse(
+ "rg1", "mysearchservice", "testEndpoint.50bf4fbe-d7c1-4b48-a642-4f5892642546", null, Context.NONE);
+ }
+}
+```
+
+### PrivateEndpointConnections_ListByService
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for PrivateEndpointConnections ListByService. */
+public final class PrivateEndpointConnectionsListByServiceSamples {
+ /*
+ * x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2020-08-01/examples/ListPrivateEndpointConnectionsByService.json
+ */
+ /**
+ * Sample code: ListPrivateEndpointConnectionsByService.
+ *
+ * @param manager Entry point to SearchManager.
+ */
+ public static void listPrivateEndpointConnectionsByService(com.azure.resourcemanager.search.SearchManager manager) {
+ manager.privateEndpointConnections().listByService("rg1", "mysearchservice", null, Context.NONE);
+ }
+}
+```
+
+### PrivateEndpointConnections_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.search.fluent.models.PrivateEndpointConnectionInner;
+import com.azure.resourcemanager.search.models.PrivateEndpointConnectionProperties;
+import com.azure.resourcemanager.search.models.PrivateEndpointConnectionPropertiesPrivateLinkServiceConnectionState;
+import com.azure.resourcemanager.search.models.PrivateLinkServiceConnectionStatus;
+
+/** Samples for PrivateEndpointConnections Update. */
+public final class PrivateEndpointConnectionsUpdateSamples {
+ /*
+ * x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2020-08-01/examples/UpdatePrivateEndpointConnection.json
+ */
+ /**
+ * Sample code: PrivateEndpointConnectionUpdate.
+ *
+ * @param manager Entry point to SearchManager.
+ */
+ public static void privateEndpointConnectionUpdate(com.azure.resourcemanager.search.SearchManager manager) {
+ manager
+ .privateEndpointConnections()
+ .updateWithResponse(
+ "rg1",
+ "mysearchservice",
+ "testEndpoint.50bf4fbe-d7c1-4b48-a642-4f5892642546",
+ new PrivateEndpointConnectionInner()
+ .withProperties(
+ new PrivateEndpointConnectionProperties()
+ .withPrivateLinkServiceConnectionState(
+ new PrivateEndpointConnectionPropertiesPrivateLinkServiceConnectionState()
+ .withStatus(PrivateLinkServiceConnectionStatus.REJECTED)
+ .withDescription("Rejected for some reason"))),
+ null,
+ Context.NONE);
+ }
+}
+```
+
+### PrivateLinkResources_ListSupported
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for PrivateLinkResources ListSupported. */
+public final class PrivateLinkResourcesListSupportedSamples {
+ /*
+ * x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2020-08-01/examples/ListSupportedPrivateLinkResources.json
+ */
+ /**
+ * Sample code: ListSupportedPrivateLinkResources.
+ *
+ * @param manager Entry point to SearchManager.
+ */
+ public static void listSupportedPrivateLinkResources(com.azure.resourcemanager.search.SearchManager manager) {
+ manager.privateLinkResources().listSupported("rg1", "mysearchservice", null, Context.NONE);
+ }
+}
+```
+
+### QueryKeys_Create
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for QueryKeys Create. */
+public final class QueryKeysCreateSamples {
+ /*
+ * x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2020-08-01/examples/SearchCreateQueryKey.json
+ */
+ /**
+ * Sample code: SearchCreateQueryKey.
+ *
+ * @param manager Entry point to SearchManager.
+ */
+ public static void searchCreateQueryKey(com.azure.resourcemanager.search.SearchManager manager) {
+ manager
+ .queryKeys()
+ .createWithResponse("rg1", "mysearchservice", "Query key for browser-based clients", null, Context.NONE);
+ }
+}
+```
+
+### QueryKeys_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for QueryKeys Delete. */
+public final class QueryKeysDeleteSamples {
+ /*
+ * x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2020-08-01/examples/SearchDeleteQueryKey.json
+ */
+ /**
+ * Sample code: SearchDeleteQueryKey.
+ *
+ * @param manager Entry point to SearchManager.
+ */
+ public static void searchDeleteQueryKey(com.azure.resourcemanager.search.SearchManager manager) {
+ manager.queryKeys().deleteWithResponse("rg1", "mysearchservice", "", null, Context.NONE);
+ }
+}
+```
+
+### QueryKeys_ListBySearchService
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for QueryKeys ListBySearchService. */
+public final class QueryKeysListBySearchServiceSamples {
+ /*
+ * x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2020-08-01/examples/SearchListQueryKeysBySearchService.json
+ */
+ /**
+ * Sample code: SearchListQueryKeysBySearchService.
+ *
+ * @param manager Entry point to SearchManager.
+ */
+ public static void searchListQueryKeysBySearchService(com.azure.resourcemanager.search.SearchManager manager) {
+ manager.queryKeys().listBySearchService("rg1", "mysearchservice", null, Context.NONE);
+ }
+}
+```
+
+### Services_CheckNameAvailability
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.search.models.CheckNameAvailabilityInput;
+
+/** Samples for Services CheckNameAvailability. */
+public final class ServicesCheckNameAvailabilitySamples {
+ /*
+ * x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2020-08-01/examples/SearchCheckNameAvailability.json
+ */
+ /**
+ * Sample code: SearchCheckNameAvailability.
+ *
+ * @param manager Entry point to SearchManager.
+ */
+ public static void searchCheckNameAvailability(com.azure.resourcemanager.search.SearchManager manager) {
+ manager
+ .services()
+ .checkNameAvailabilityWithResponse(
+ new CheckNameAvailabilityInput().withName("mysearchservice"), null, Context.NONE);
+ }
+}
+```
+
+### Services_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.search.models.HostingMode;
+import com.azure.resourcemanager.search.models.Identity;
+import com.azure.resourcemanager.search.models.IdentityType;
+import com.azure.resourcemanager.search.models.IpRule;
+import com.azure.resourcemanager.search.models.NetworkRuleSet;
+import com.azure.resourcemanager.search.models.PublicNetworkAccess;
+import com.azure.resourcemanager.search.models.Sku;
+import com.azure.resourcemanager.search.models.SkuName;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for Services CreateOrUpdate. */
+public final class ServicesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2020-08-01/examples/SearchCreateOrUpdateServiceToAllowAccessFromPrivateEndpoints.json
+ */
+ /**
+ * Sample code: SearchCreateOrUpdateServiceToAllowAccessFromPrivateEndpoints.
+ *
+ * @param manager Entry point to SearchManager.
+ */
+ public static void searchCreateOrUpdateServiceToAllowAccessFromPrivateEndpoints(
+ com.azure.resourcemanager.search.SearchManager manager) {
+ manager
+ .services()
+ .define("mysearchservice")
+ .withRegion("westus")
+ .withExistingResourceGroup("rg1")
+ .withTags(mapOf("app-name", "My e-commerce app"))
+ .withSku(new Sku().withName(SkuName.STANDARD))
+ .withReplicaCount(3)
+ .withPartitionCount(1)
+ .withHostingMode(HostingMode.DEFAULT)
+ .withPublicNetworkAccess(PublicNetworkAccess.DISABLED)
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2020-08-01/examples/SearchCreateOrUpdateService.json
+ */
+ /**
+ * Sample code: SearchCreateOrUpdateService.
+ *
+ * @param manager Entry point to SearchManager.
+ */
+ public static void searchCreateOrUpdateService(com.azure.resourcemanager.search.SearchManager manager) {
+ manager
+ .services()
+ .define("mysearchservice")
+ .withRegion("westus")
+ .withExistingResourceGroup("rg1")
+ .withTags(mapOf("app-name", "My e-commerce app"))
+ .withSku(new Sku().withName(SkuName.STANDARD))
+ .withReplicaCount(3)
+ .withPartitionCount(1)
+ .withHostingMode(HostingMode.DEFAULT)
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2020-08-01/examples/SearchCreateOrUpdateServiceWithIdentity.json
+ */
+ /**
+ * Sample code: SearchCreateOrUpdateServiceWithIdentity.
+ *
+ * @param manager Entry point to SearchManager.
+ */
+ public static void searchCreateOrUpdateServiceWithIdentity(com.azure.resourcemanager.search.SearchManager manager) {
+ manager
+ .services()
+ .define("mysearchservice")
+ .withRegion("westus")
+ .withExistingResourceGroup("rg1")
+ .withTags(mapOf("app-name", "My e-commerce app"))
+ .withSku(new Sku().withName(SkuName.STANDARD))
+ .withIdentity(new Identity().withType(IdentityType.SYSTEM_ASSIGNED))
+ .withReplicaCount(3)
+ .withPartitionCount(1)
+ .withHostingMode(HostingMode.DEFAULT)
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2020-08-01/examples/SearchCreateOrUpdateServiceToAllowAccessFromPublicCustomIPs.json
+ */
+ /**
+ * Sample code: SearchCreateOrUpdateServiceToAllowAccessFromPublicCustomIPs.
+ *
+ * @param manager Entry point to SearchManager.
+ */
+ public static void searchCreateOrUpdateServiceToAllowAccessFromPublicCustomIPs(
+ com.azure.resourcemanager.search.SearchManager manager) {
+ manager
+ .services()
+ .define("mysearchservice")
+ .withRegion("westus")
+ .withExistingResourceGroup("rg1")
+ .withTags(mapOf("app-name", "My e-commerce app"))
+ .withSku(new Sku().withName(SkuName.STANDARD))
+ .withReplicaCount(1)
+ .withPartitionCount(1)
+ .withHostingMode(HostingMode.DEFAULT)
+ .withNetworkRuleSet(
+ new NetworkRuleSet()
+ .withIpRules(
+ Arrays.asList(new IpRule().withValue("123.4.5.6"), new IpRule().withValue("123.4.6.0/18"))))
+ .create();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### Services_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Services Delete. */
+public final class ServicesDeleteSamples {
+ /*
+ * x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2020-08-01/examples/SearchDeleteService.json
+ */
+ /**
+ * Sample code: SearchDeleteService.
+ *
+ * @param manager Entry point to SearchManager.
+ */
+ public static void searchDeleteService(com.azure.resourcemanager.search.SearchManager manager) {
+ manager.services().deleteWithResponse("rg1", "mysearchservice", null, Context.NONE);
+ }
+}
+```
+
+### Services_GetByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Services GetByResourceGroup. */
+public final class ServicesGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2020-08-01/examples/SearchGetService.json
+ */
+ /**
+ * Sample code: SearchGetService.
+ *
+ * @param manager Entry point to SearchManager.
+ */
+ public static void searchGetService(com.azure.resourcemanager.search.SearchManager manager) {
+ manager.services().getByResourceGroupWithResponse("rg1", "mysearchservice", null, Context.NONE);
+ }
+}
+```
+
+### Services_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Services List. */
+public final class ServicesListSamples {
+ /*
+ * x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2020-08-01/examples/SearchListServicesBySubscription.json
+ */
+ /**
+ * Sample code: SearchListServicesBySubscription.
+ *
+ * @param manager Entry point to SearchManager.
+ */
+ public static void searchListServicesBySubscription(com.azure.resourcemanager.search.SearchManager manager) {
+ manager.services().list(null, Context.NONE);
+ }
+}
+```
+
+### Services_ListByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Services ListByResourceGroup. */
+public final class ServicesListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2020-08-01/examples/SearchListServicesByResourceGroup.json
+ */
+ /**
+ * Sample code: SearchListServicesByResourceGroup.
+ *
+ * @param manager Entry point to SearchManager.
+ */
+ public static void searchListServicesByResourceGroup(com.azure.resourcemanager.search.SearchManager manager) {
+ manager.services().listByResourceGroup("rg1", null, Context.NONE);
+ }
+}
+```
+
+### Services_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.search.models.Identity;
+import com.azure.resourcemanager.search.models.IdentityType;
+import com.azure.resourcemanager.search.models.IpRule;
+import com.azure.resourcemanager.search.models.NetworkRuleSet;
+import com.azure.resourcemanager.search.models.PublicNetworkAccess;
+import com.azure.resourcemanager.search.models.SearchService;
+import com.azure.resourcemanager.search.models.Sku;
+import com.azure.resourcemanager.search.models.SkuName;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for Services Update. */
+public final class ServicesUpdateSamples {
+ /*
+ * x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2020-08-01/examples/SearchUpdateServiceToAllowAccessFromPublicCustomIPs.json
+ */
+ /**
+ * Sample code: searchUpdateServiceToAllowAccessFromPublicCustomIPs.
+ *
+ * @param manager Entry point to SearchManager.
+ */
+ public static void searchUpdateServiceToAllowAccessFromPublicCustomIPs(
+ com.azure.resourcemanager.search.SearchManager manager) {
+ SearchService resource =
+ manager.services().getByResourceGroupWithResponse("rg1", "mysearchservice", null, Context.NONE).getValue();
+ resource
+ .update()
+ .withReplicaCount(3)
+ .withPartitionCount(1)
+ .withPublicNetworkAccess(PublicNetworkAccess.ENABLED)
+ .withNetworkRuleSet(
+ new NetworkRuleSet()
+ .withIpRules(
+ Arrays.asList(new IpRule().withValue("123.4.5.6"), new IpRule().withValue("123.4.6.0/18"))))
+ .apply();
+ }
+
+ /*
+ * x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2020-08-01/examples/SearchUpdateServiceToRemoveIdentity.json
+ */
+ /**
+ * Sample code: SearchUpdateServiceToRemoveIdentity.
+ *
+ * @param manager Entry point to SearchManager.
+ */
+ public static void searchUpdateServiceToRemoveIdentity(com.azure.resourcemanager.search.SearchManager manager) {
+ SearchService resource =
+ manager.services().getByResourceGroupWithResponse("rg1", "mysearchservice", null, Context.NONE).getValue();
+ resource
+ .update()
+ .withSku(new Sku().withName(SkuName.STANDARD))
+ .withIdentity(new Identity().withType(IdentityType.NONE))
+ .apply();
+ }
+
+ /*
+ * x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2020-08-01/examples/SearchUpdateServiceToAllowAccessFromPrivateEndpoints.json
+ */
+ /**
+ * Sample code: searchUpdateServiceToAllowAccessFromPrivateEndpoints.
+ *
+ * @param manager Entry point to SearchManager.
+ */
+ public static void searchUpdateServiceToAllowAccessFromPrivateEndpoints(
+ com.azure.resourcemanager.search.SearchManager manager) {
+ SearchService resource =
+ manager.services().getByResourceGroupWithResponse("rg1", "mysearchservice", null, Context.NONE).getValue();
+ resource
+ .update()
+ .withReplicaCount(1)
+ .withPartitionCount(1)
+ .withPublicNetworkAccess(PublicNetworkAccess.DISABLED)
+ .apply();
+ }
+
+ /*
+ * x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2020-08-01/examples/SearchUpdateService.json
+ */
+ /**
+ * Sample code: SearchUpdateService.
+ *
+ * @param manager Entry point to SearchManager.
+ */
+ public static void searchUpdateService(com.azure.resourcemanager.search.SearchManager manager) {
+ SearchService resource =
+ manager.services().getByResourceGroupWithResponse("rg1", "mysearchservice", null, Context.NONE).getValue();
+ resource
+ .update()
+ .withTags(mapOf("app-name", "My e-commerce app", "new-tag", "Adding a new tag"))
+ .withReplicaCount(2)
+ .apply();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### SharedPrivateLinkResources_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.search.models.SharedPrivateLinkResourceProperties;
+
+/** Samples for SharedPrivateLinkResources CreateOrUpdate. */
+public final class SharedPrivateLinkResourcesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2020-08-01/examples/CreateOrUpdateSharedPrivateLinkResource.json
+ */
+ /**
+ * Sample code: SharedPrivateLinkResourceCreateOrUpdate.
+ *
+ * @param manager Entry point to SearchManager.
+ */
+ public static void sharedPrivateLinkResourceCreateOrUpdate(com.azure.resourcemanager.search.SearchManager manager) {
+ manager
+ .sharedPrivateLinkResources()
+ .define("testResource")
+ .withExistingSearchService("rg1", "mysearchservice")
+ .withProperties(
+ new SharedPrivateLinkResourceProperties()
+ .withPrivateLinkResourceId(
+ "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/storageAccountName")
+ .withGroupId("blob")
+ .withRequestMessage("please approve"))
+ .create();
+ }
+}
+```
+
+### SharedPrivateLinkResources_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SharedPrivateLinkResources Delete. */
+public final class SharedPrivateLinkResourcesDeleteSamples {
+ /*
+ * x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2020-08-01/examples/DeleteSharedPrivateLinkResource.json
+ */
+ /**
+ * Sample code: SharedPrivateLinkResourceDelete.
+ *
+ * @param manager Entry point to SearchManager.
+ */
+ public static void sharedPrivateLinkResourceDelete(com.azure.resourcemanager.search.SearchManager manager) {
+ manager.sharedPrivateLinkResources().delete("rg1", "mysearchservice", "testResource", null, Context.NONE);
+ }
+}
+```
+
+### SharedPrivateLinkResources_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SharedPrivateLinkResources Get. */
+public final class SharedPrivateLinkResourcesGetSamples {
+ /*
+ * x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2020-08-01/examples/GetSharedPrivateLinkResource.json
+ */
+ /**
+ * Sample code: SharedPrivateLinkResourceGet.
+ *
+ * @param manager Entry point to SearchManager.
+ */
+ public static void sharedPrivateLinkResourceGet(com.azure.resourcemanager.search.SearchManager manager) {
+ manager
+ .sharedPrivateLinkResources()
+ .getWithResponse("rg1", "mysearchservice", "testResource", null, Context.NONE);
+ }
+}
+```
+
+### SharedPrivateLinkResources_ListByService
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SharedPrivateLinkResources ListByService. */
+public final class SharedPrivateLinkResourcesListByServiceSamples {
+ /*
+ * x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2020-08-01/examples/ListSharedPrivateLinkResourcesByService.json
+ */
+ /**
+ * Sample code: ListSharedPrivateLinkResourcesByService.
+ *
+ * @param manager Entry point to SearchManager.
+ */
+ public static void listSharedPrivateLinkResourcesByService(com.azure.resourcemanager.search.SearchManager manager) {
+ manager.sharedPrivateLinkResources().listByService("rg1", "mysearchservice", null, Context.NONE);
+ }
+}
+```
+
diff --git a/sdk/search/azure-resourcemanager-search/pom.xml b/sdk/search/azure-resourcemanager-search/pom.xml
new file mode 100644
index 000000000000..0e2c53edfd52
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/pom.xml
@@ -0,0 +1,55 @@
+
+ 4.0.0
+
+ com.azure
+ azure-client-sdk-parent
+ 1.7.0
+ ../../parents/azure-client-sdk-parent
+
+
+ com.azure.resourcemanager
+ azure-resourcemanager-search
+ 2.13.0-beta.1
+ jar
+
+ Microsoft Azure SDK for Search Management
+ This package contains Microsoft Azure SDK for Search Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Client that can be used to manage Azure Cognitive Search services and API keys. Package tag package-2020-08.
+ 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
+ true
+
+
+
+ com.azure
+ azure-core
+ 1.25.0
+
+
+ com.azure
+ azure-core-management
+ 1.5.2
+
+
+
diff --git a/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/SearchManager.java b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/SearchManager.java
new file mode 100644
index 000000000000..91e3284d9878
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/SearchManager.java
@@ -0,0 +1,316 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.search;
+
+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.HttpPipelinePosition;
+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.search.fluent.SearchManagementClient;
+import com.azure.resourcemanager.search.implementation.AdminKeysImpl;
+import com.azure.resourcemanager.search.implementation.OperationsImpl;
+import com.azure.resourcemanager.search.implementation.PrivateEndpointConnectionsImpl;
+import com.azure.resourcemanager.search.implementation.PrivateLinkResourcesImpl;
+import com.azure.resourcemanager.search.implementation.QueryKeysImpl;
+import com.azure.resourcemanager.search.implementation.SearchManagementClientBuilder;
+import com.azure.resourcemanager.search.implementation.ServicesImpl;
+import com.azure.resourcemanager.search.implementation.SharedPrivateLinkResourcesImpl;
+import com.azure.resourcemanager.search.models.AdminKeys;
+import com.azure.resourcemanager.search.models.Operations;
+import com.azure.resourcemanager.search.models.PrivateEndpointConnections;
+import com.azure.resourcemanager.search.models.PrivateLinkResources;
+import com.azure.resourcemanager.search.models.QueryKeys;
+import com.azure.resourcemanager.search.models.Services;
+import com.azure.resourcemanager.search.models.SharedPrivateLinkResources;
+import java.time.Duration;
+import java.time.temporal.ChronoUnit;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+import java.util.stream.Collectors;
+
+/** Entry point to SearchManager. Client that can be used to manage Azure Cognitive Search services and API keys. */
+public final class SearchManager {
+ private Operations operations;
+
+ private AdminKeys adminKeys;
+
+ private QueryKeys queryKeys;
+
+ private Services services;
+
+ private PrivateLinkResources privateLinkResources;
+
+ private PrivateEndpointConnections privateEndpointConnections;
+
+ private SharedPrivateLinkResources sharedPrivateLinkResources;
+
+ private final SearchManagementClient clientObject;
+
+ private SearchManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
+ Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+ this.clientObject =
+ new SearchManagementClientBuilder()
+ .pipeline(httpPipeline)
+ .endpoint(profile.getEnvironment().getResourceManagerEndpoint())
+ .subscriptionId(profile.getSubscriptionId())
+ .defaultPollInterval(defaultPollInterval)
+ .buildClient();
+ }
+
+ /**
+ * Creates an instance of Search service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the Search service API instance.
+ */
+ public static SearchManager 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 SearchManager with optional configuration.
+ *
+ * @return the Configurable instance allowing configurations.
+ */
+ public static Configurable configure() {
+ return new SearchManager.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 Search service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the Search service API instance.
+ */
+ public SearchManager 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.search")
+ .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());
+ policies
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
+ .collect(Collectors.toList()));
+ HttpPolicyProviders.addBeforeRetryPolicies(policies);
+ policies.add(retryPolicy);
+ policies.add(new AddDatePolicy());
+ policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
+ policies
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
+ .collect(Collectors.toList()));
+ HttpPolicyProviders.addAfterRetryPolicies(policies);
+ policies.add(new HttpLoggingPolicy(httpLogOptions));
+ HttpPipeline httpPipeline =
+ new HttpPipelineBuilder()
+ .httpClient(httpClient)
+ .policies(policies.toArray(new HttpPipelinePolicy[0]))
+ .build();
+ return new SearchManager(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 AdminKeys. */
+ public AdminKeys adminKeys() {
+ if (this.adminKeys == null) {
+ this.adminKeys = new AdminKeysImpl(clientObject.getAdminKeys(), this);
+ }
+ return adminKeys;
+ }
+
+ /** @return Resource collection API of QueryKeys. */
+ public QueryKeys queryKeys() {
+ if (this.queryKeys == null) {
+ this.queryKeys = new QueryKeysImpl(clientObject.getQueryKeys(), this);
+ }
+ return queryKeys;
+ }
+
+ /** @return Resource collection API of Services. */
+ public Services services() {
+ if (this.services == null) {
+ this.services = new ServicesImpl(clientObject.getServices(), this);
+ }
+ return services;
+ }
+
+ /** @return Resource collection API of PrivateLinkResources. */
+ public PrivateLinkResources privateLinkResources() {
+ if (this.privateLinkResources == null) {
+ this.privateLinkResources = new PrivateLinkResourcesImpl(clientObject.getPrivateLinkResources(), this);
+ }
+ return privateLinkResources;
+ }
+
+ /** @return Resource collection API of PrivateEndpointConnections. */
+ public PrivateEndpointConnections privateEndpointConnections() {
+ if (this.privateEndpointConnections == null) {
+ this.privateEndpointConnections =
+ new PrivateEndpointConnectionsImpl(clientObject.getPrivateEndpointConnections(), this);
+ }
+ return privateEndpointConnections;
+ }
+
+ /** @return Resource collection API of SharedPrivateLinkResources. */
+ public SharedPrivateLinkResources sharedPrivateLinkResources() {
+ if (this.sharedPrivateLinkResources == null) {
+ this.sharedPrivateLinkResources =
+ new SharedPrivateLinkResourcesImpl(clientObject.getSharedPrivateLinkResources(), this);
+ }
+ return sharedPrivateLinkResources;
+ }
+
+ /**
+ * @return Wrapped service client SearchManagementClient providing direct access to the underlying auto-generated
+ * API implementation, based on Azure REST API.
+ */
+ public SearchManagementClient serviceClient() {
+ return this.clientObject;
+ }
+}
diff --git a/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/AdminKeysClient.java b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/AdminKeysClient.java
new file mode 100644
index 000000000000..2a4b56011902
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/AdminKeysClient.java
@@ -0,0 +1,92 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.search.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.search.fluent.models.AdminKeyResultInner;
+import com.azure.resourcemanager.search.models.AdminKeyKind;
+import java.util.UUID;
+
+/** An instance of this class provides access to all the operations defined in AdminKeysClient. */
+public interface AdminKeysClient {
+ /**
+ * Gets the primary and secondary admin API keys for the specified Azure Cognitive Search service.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @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 primary and secondary admin API keys for the specified Azure Cognitive Search service.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ AdminKeyResultInner get(String resourceGroupName, String searchServiceName);
+
+ /**
+ * Gets the primary and secondary admin API keys for the specified Azure Cognitive Search service.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @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 primary and secondary admin API keys for the specified Azure Cognitive Search service along with
+ * {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String searchServiceName, UUID clientRequestId, Context context);
+
+ /**
+ * Regenerates either the primary or secondary admin API key. You can only regenerate one key at a time.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param keyKind Specifies which key to regenerate. Valid values include 'primary' and 'secondary'.
+ * @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 response containing the primary and secondary admin API keys for a given Azure Cognitive Search service.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ AdminKeyResultInner regenerate(String resourceGroupName, String searchServiceName, AdminKeyKind keyKind);
+
+ /**
+ * Regenerates either the primary or secondary admin API key. You can only regenerate one key at a time.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param keyKind Specifies which key to regenerate. Valid values include 'primary' and 'secondary'.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @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 response containing the primary and secondary admin API keys for a given Azure Cognitive Search service
+ * along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response regenerateWithResponse(
+ String resourceGroupName,
+ String searchServiceName,
+ AdminKeyKind keyKind,
+ UUID clientRequestId,
+ Context context);
+}
diff --git a/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/OperationsClient.java b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/OperationsClient.java
new file mode 100644
index 000000000000..682c2eaab12c
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/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.search.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.search.fluent.models.OperationInner;
+
+/** An instance of this class provides access to all the operations defined in OperationsClient. */
+public interface OperationsClient {
+ /**
+ * Lists all of the available REST API operations of the Microsoft.Search provider.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the result of the request to list REST API operations as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Lists all of the available REST API operations of the Microsoft.Search provider.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the result of the request to list REST API operations as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+}
diff --git a/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/PrivateEndpointConnectionsClient.java b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/PrivateEndpointConnectionsClient.java
new file mode 100644
index 000000000000..27151fff82be
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/PrivateEndpointConnectionsClient.java
@@ -0,0 +1,190 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.search.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.search.fluent.models.PrivateEndpointConnectionInner;
+import java.util.UUID;
+
+/** An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. */
+public interface PrivateEndpointConnectionsClient {
+ /**
+ * Updates a Private Endpoint connection to the search service in the given resource group.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param privateEndpointConnectionName The name of the private endpoint connection to the Azure Cognitive Search
+ * service with the specified resource group.
+ * @param privateEndpointConnection The definition of the private endpoint connection to update.
+ * @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 describes an existing Private Endpoint connection to the Azure Cognitive Search service.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PrivateEndpointConnectionInner update(
+ String resourceGroupName,
+ String searchServiceName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner privateEndpointConnection);
+
+ /**
+ * Updates a Private Endpoint connection to the search service in the given resource group.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param privateEndpointConnectionName The name of the private endpoint connection to the Azure Cognitive Search
+ * service with the specified resource group.
+ * @param privateEndpointConnection The definition of the private endpoint connection to update.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @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 describes an existing Private Endpoint connection to the Azure Cognitive Search service along with {@link
+ * Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(
+ String resourceGroupName,
+ String searchServiceName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner privateEndpointConnection,
+ UUID clientRequestId,
+ Context context);
+
+ /**
+ * Gets the details of the private endpoint connection to the search service in the given resource group.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param privateEndpointConnectionName The name of the private endpoint connection to the Azure Cognitive Search
+ * service with the specified resource group.
+ * @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 details of the private endpoint connection to the search service in the given resource group.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PrivateEndpointConnectionInner get(
+ String resourceGroupName, String searchServiceName, String privateEndpointConnectionName);
+
+ /**
+ * Gets the details of the private endpoint connection to the search service in the given resource group.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param privateEndpointConnectionName The name of the private endpoint connection to the Azure Cognitive Search
+ * service with the specified resource group.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @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 details of the private endpoint connection to the search service in the given resource group along
+ * with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName,
+ String searchServiceName,
+ String privateEndpointConnectionName,
+ UUID clientRequestId,
+ Context context);
+
+ /**
+ * Disconnects the private endpoint connection and deletes it from the search service.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param privateEndpointConnectionName The name of the private endpoint connection to the Azure Cognitive Search
+ * service with the specified resource group.
+ * @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 describes an existing Private Endpoint connection to the Azure Cognitive Search service.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PrivateEndpointConnectionInner delete(
+ String resourceGroupName, String searchServiceName, String privateEndpointConnectionName);
+
+ /**
+ * Disconnects the private endpoint connection and deletes it from the search service.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param privateEndpointConnectionName The name of the private endpoint connection to the Azure Cognitive Search
+ * service with the specified resource group.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @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 describes an existing Private Endpoint connection to the Azure Cognitive Search service along with {@link
+ * Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteWithResponse(
+ String resourceGroupName,
+ String searchServiceName,
+ String privateEndpointConnectionName,
+ UUID clientRequestId,
+ Context context);
+
+ /**
+ * Gets a list of all private endpoint connections in the given service.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @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 all private endpoint connections in the given service as paginated response with {@link
+ * PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByService(String resourceGroupName, String searchServiceName);
+
+ /**
+ * Gets a list of all private endpoint connections in the given service.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @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 all private endpoint connections in the given service as paginated response with {@link
+ * PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByService(
+ String resourceGroupName, String searchServiceName, UUID clientRequestId, Context context);
+}
diff --git a/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/PrivateLinkResourcesClient.java b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/PrivateLinkResourcesClient.java
new file mode 100644
index 000000000000..9afcdbfcbe6b
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/PrivateLinkResourcesClient.java
@@ -0,0 +1,51 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.search.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.search.fluent.models.PrivateLinkResourceInner;
+import java.util.UUID;
+
+/** An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. */
+public interface PrivateLinkResourcesClient {
+ /**
+ * Gets a list of all supported private link resource types for the given service.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @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 all supported private link resource types for the given service as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listSupported(String resourceGroupName, String searchServiceName);
+
+ /**
+ * Gets a list of all supported private link resource types for the given service.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @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 all supported private link resource types for the given service as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listSupported(
+ String resourceGroupName, String searchServiceName, UUID clientRequestId, Context context);
+}
diff --git a/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/QueryKeysClient.java b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/QueryKeysClient.java
new file mode 100644
index 000000000000..804d41b6b674
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/QueryKeysClient.java
@@ -0,0 +1,127 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.search.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.search.fluent.models.QueryKeyInner;
+import java.util.UUID;
+
+/** An instance of this class provides access to all the operations defined in QueryKeysClient. */
+public interface QueryKeysClient {
+ /**
+ * Generates a new query key for the specified search service. You can create up to 50 query keys per service.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param name The name of the new query API key.
+ * @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 describes an API key for a given Azure Cognitive Search service that has permissions for query operations
+ * only.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ QueryKeyInner create(String resourceGroupName, String searchServiceName, String name);
+
+ /**
+ * Generates a new query key for the specified search service. You can create up to 50 query keys per service.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param name The name of the new query API key.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @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 describes an API key for a given Azure Cognitive Search service that has permissions for query operations
+ * only along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createWithResponse(
+ String resourceGroupName, String searchServiceName, String name, UUID clientRequestId, Context context);
+
+ /**
+ * Returns the list of query API keys for the given Azure Cognitive Search service.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @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 response containing the query API keys for a given Azure Cognitive Search service as paginated response
+ * with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listBySearchService(String resourceGroupName, String searchServiceName);
+
+ /**
+ * Returns the list of query API keys for the given Azure Cognitive Search service.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @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 response containing the query API keys for a given Azure Cognitive Search service as paginated response
+ * with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listBySearchService(
+ String resourceGroupName, String searchServiceName, UUID clientRequestId, Context context);
+
+ /**
+ * Deletes the specified query key. Unlike admin keys, query keys are not regenerated. The process for regenerating
+ * a query key is to delete and then recreate it.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param key The query key to be deleted. Query keys are identified by value, not by name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String searchServiceName, String key);
+
+ /**
+ * Deletes the specified query key. Unlike admin keys, query keys are not regenerated. The process for regenerating
+ * a query key is to delete and then recreate it.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param key The query key to be deleted. Query keys are identified by value, not by name.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteWithResponse(
+ String resourceGroupName, String searchServiceName, String key, UUID clientRequestId, Context context);
+}
diff --git a/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/SearchManagementClient.java b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/SearchManagementClient.java
new file mode 100644
index 000000000000..26e1fb315f17
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/SearchManagementClient.java
@@ -0,0 +1,96 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.search.fluent;
+
+import com.azure.core.http.HttpPipeline;
+import java.time.Duration;
+
+/** The interface for SearchManagementClient class. */
+public interface SearchManagementClient {
+ /**
+ * Gets The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource
+ * Manager API or the portal.
+ *
+ * @return the subscriptionId value.
+ */
+ String getSubscriptionId();
+
+ /**
+ * Gets server parameter.
+ *
+ * @return the endpoint value.
+ */
+ String getEndpoint();
+
+ /**
+ * Gets Api Version.
+ *
+ * @return the apiVersion value.
+ */
+ String getApiVersion();
+
+ /**
+ * Gets The HTTP pipeline to send requests through.
+ *
+ * @return the httpPipeline value.
+ */
+ HttpPipeline getHttpPipeline();
+
+ /**
+ * Gets The default poll interval for long-running operation.
+ *
+ * @return the defaultPollInterval value.
+ */
+ Duration getDefaultPollInterval();
+
+ /**
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ OperationsClient getOperations();
+
+ /**
+ * Gets the AdminKeysClient object to access its operations.
+ *
+ * @return the AdminKeysClient object.
+ */
+ AdminKeysClient getAdminKeys();
+
+ /**
+ * Gets the QueryKeysClient object to access its operations.
+ *
+ * @return the QueryKeysClient object.
+ */
+ QueryKeysClient getQueryKeys();
+
+ /**
+ * Gets the ServicesClient object to access its operations.
+ *
+ * @return the ServicesClient object.
+ */
+ ServicesClient getServices();
+
+ /**
+ * Gets the PrivateLinkResourcesClient object to access its operations.
+ *
+ * @return the PrivateLinkResourcesClient object.
+ */
+ PrivateLinkResourcesClient getPrivateLinkResources();
+
+ /**
+ * Gets the PrivateEndpointConnectionsClient object to access its operations.
+ *
+ * @return the PrivateEndpointConnectionsClient object.
+ */
+ PrivateEndpointConnectionsClient getPrivateEndpointConnections();
+
+ /**
+ * Gets the SharedPrivateLinkResourcesClient object to access its operations.
+ *
+ * @return the SharedPrivateLinkResourcesClient object.
+ */
+ SharedPrivateLinkResourcesClient getSharedPrivateLinkResources();
+}
diff --git a/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/ServicesClient.java b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/ServicesClient.java
new file mode 100644
index 000000000000..d41378a32784
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/ServicesClient.java
@@ -0,0 +1,335 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.search.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.search.fluent.models.CheckNameAvailabilityOutputInner;
+import com.azure.resourcemanager.search.fluent.models.SearchServiceInner;
+import com.azure.resourcemanager.search.models.CheckNameAvailabilityInput;
+import com.azure.resourcemanager.search.models.SearchServiceUpdate;
+import java.util.UUID;
+
+/** An instance of this class provides access to all the operations defined in ServicesClient. */
+public interface ServicesClient {
+ /**
+ * Creates or updates a search service in the given resource group. If the search service already exists, all
+ * properties will be updated with the given values.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service to create or update. Search service names
+ * must only contain lowercase letters, digits or dashes, cannot use dash as the first two or last one
+ * characters, cannot contain consecutive dashes, and must be between 2 and 60 characters in length. Search
+ * service names must be globally unique since they are part of the service URI
+ * (https://<name>.search.windows.net). You cannot change the service name after the service is created.
+ * @param serviceParam The definition of the search service to create or update.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of describes an Azure Cognitive Search service and its current state.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, SearchServiceInner> beginCreateOrUpdate(
+ String resourceGroupName, String searchServiceName, SearchServiceInner serviceParam, UUID clientRequestId);
+
+ /**
+ * Creates or updates a search service in the given resource group. If the search service already exists, all
+ * properties will be updated with the given values.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service to create or update. Search service names
+ * must only contain lowercase letters, digits or dashes, cannot use dash as the first two or last one
+ * characters, cannot contain consecutive dashes, and must be between 2 and 60 characters in length. Search
+ * service names must be globally unique since they are part of the service URI
+ * (https://<name>.search.windows.net). You cannot change the service name after the service is created.
+ * @param serviceParam The definition of the search service to create or update.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of describes an Azure Cognitive Search service and its current state.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, SearchServiceInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String searchServiceName,
+ SearchServiceInner serviceParam,
+ UUID clientRequestId,
+ Context context);
+
+ /**
+ * Creates or updates a search service in the given resource group. If the search service already exists, all
+ * properties will be updated with the given values.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service to create or update. Search service names
+ * must only contain lowercase letters, digits or dashes, cannot use dash as the first two or last one
+ * characters, cannot contain consecutive dashes, and must be between 2 and 60 characters in length. Search
+ * service names must be globally unique since they are part of the service URI
+ * (https://<name>.search.windows.net). You cannot change the service name after the service is created.
+ * @param serviceParam The definition of the search service to create or update.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @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 describes an Azure Cognitive Search service and its current state.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SearchServiceInner createOrUpdate(
+ String resourceGroupName, String searchServiceName, SearchServiceInner serviceParam, UUID clientRequestId);
+
+ /**
+ * Creates or updates a search service in the given resource group. If the search service already exists, all
+ * properties will be updated with the given values.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service to create or update. Search service names
+ * must only contain lowercase letters, digits or dashes, cannot use dash as the first two or last one
+ * characters, cannot contain consecutive dashes, and must be between 2 and 60 characters in length. Search
+ * service names must be globally unique since they are part of the service URI
+ * (https://<name>.search.windows.net). You cannot change the service name after the service is created.
+ * @param serviceParam The definition of the search service to create or update.
+ * @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 describes an Azure Cognitive Search service and its current state.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SearchServiceInner createOrUpdate(
+ String resourceGroupName, String searchServiceName, SearchServiceInner serviceParam);
+
+ /**
+ * Creates or updates a search service in the given resource group. If the search service already exists, all
+ * properties will be updated with the given values.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service to create or update. Search service names
+ * must only contain lowercase letters, digits or dashes, cannot use dash as the first two or last one
+ * characters, cannot contain consecutive dashes, and must be between 2 and 60 characters in length. Search
+ * service names must be globally unique since they are part of the service URI
+ * (https://<name>.search.windows.net). You cannot change the service name after the service is created.
+ * @param serviceParam The definition of the search service to create or update.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @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 describes an Azure Cognitive Search service and its current state.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SearchServiceInner createOrUpdate(
+ String resourceGroupName,
+ String searchServiceName,
+ SearchServiceInner serviceParam,
+ UUID clientRequestId,
+ Context context);
+
+ /**
+ * Updates an existing search service in the given resource group.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service to update.
+ * @param serviceParam The definition of the search service to update.
+ * @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 describes an Azure Cognitive Search service and its current state.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SearchServiceInner update(String resourceGroupName, String searchServiceName, SearchServiceUpdate serviceParam);
+
+ /**
+ * Updates an existing search service in the given resource group.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service to update.
+ * @param serviceParam The definition of the search service to update.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @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 describes an Azure Cognitive Search service and its current state along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(
+ String resourceGroupName,
+ String searchServiceName,
+ SearchServiceUpdate serviceParam,
+ UUID clientRequestId,
+ Context context);
+
+ /**
+ * Gets the search service with the given name in the given resource group.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @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 search service with the given name in the given resource group.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SearchServiceInner getByResourceGroup(String resourceGroupName, String searchServiceName);
+
+ /**
+ * Gets the search service with the given name in the given resource group.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @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 search service with the given name in the given resource group along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(
+ String resourceGroupName, String searchServiceName, UUID clientRequestId, Context context);
+
+ /**
+ * Deletes a search service in the given resource group, along with its associated resources.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String searchServiceName);
+
+ /**
+ * Deletes a search service in the given resource group, along with its associated resources.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteWithResponse(
+ String resourceGroupName, String searchServiceName, UUID clientRequestId, Context context);
+
+ /**
+ * Gets a list of all search services in the given resource group.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @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 all search services in the given resource group as paginated response with {@link
+ * PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * Gets a list of all search services in the given resource group.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @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 all search services in the given resource group as paginated response with {@link
+ * PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(
+ String resourceGroupName, UUID clientRequestId, Context context);
+
+ /**
+ * Gets a list of all search services in the given subscription.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of all search services in the given subscription as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Gets a list of all search services in the given subscription.
+ *
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @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 all search services in the given subscription as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(UUID clientRequestId, Context context);
+
+ /**
+ * Checks whether or not the given search service name is available for use. Search service names must be globally
+ * unique since they are part of the service URI (https://<name>.search.windows.net).
+ *
+ * @param checkNameAvailabilityInput The resource name and type to check.
+ * @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 output of check name availability API.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CheckNameAvailabilityOutputInner checkNameAvailability(CheckNameAvailabilityInput checkNameAvailabilityInput);
+
+ /**
+ * Checks whether or not the given search service name is available for use. Search service names must be globally
+ * unique since they are part of the service URI (https://<name>.search.windows.net).
+ *
+ * @param checkNameAvailabilityInput The resource name and type to check.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @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 output of check name availability API along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response checkNameAvailabilityWithResponse(
+ CheckNameAvailabilityInput checkNameAvailabilityInput, UUID clientRequestId, Context context);
+}
diff --git a/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/SharedPrivateLinkResourcesClient.java b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/SharedPrivateLinkResourcesClient.java
new file mode 100644
index 000000000000..cad693de641b
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/SharedPrivateLinkResourcesClient.java
@@ -0,0 +1,336 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.search.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.search.fluent.models.SharedPrivateLinkResourceInner;
+import java.util.UUID;
+
+/** An instance of this class provides access to all the operations defined in SharedPrivateLinkResourcesClient. */
+public interface SharedPrivateLinkResourcesClient {
+ /**
+ * Initiates the creation or update of a shared private link resource managed by the search service in the given
+ * resource group.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param sharedPrivateLinkResourceName The name of the shared private link resource managed by the Azure Cognitive
+ * Search service within the specified resource group.
+ * @param sharedPrivateLinkResource The definition of the shared private link resource to create or update.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of describes a Shared Private Link Resource managed by the Azure
+ * Cognitive Search service.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, SharedPrivateLinkResourceInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String searchServiceName,
+ String sharedPrivateLinkResourceName,
+ SharedPrivateLinkResourceInner sharedPrivateLinkResource,
+ UUID clientRequestId);
+
+ /**
+ * Initiates the creation or update of a shared private link resource managed by the search service in the given
+ * resource group.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param sharedPrivateLinkResourceName The name of the shared private link resource managed by the Azure Cognitive
+ * Search service within the specified resource group.
+ * @param sharedPrivateLinkResource The definition of the shared private link resource to create or update.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of describes a Shared Private Link Resource managed by the Azure
+ * Cognitive Search service.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, SharedPrivateLinkResourceInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String searchServiceName,
+ String sharedPrivateLinkResourceName,
+ SharedPrivateLinkResourceInner sharedPrivateLinkResource,
+ UUID clientRequestId,
+ Context context);
+
+ /**
+ * Initiates the creation or update of a shared private link resource managed by the search service in the given
+ * resource group.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param sharedPrivateLinkResourceName The name of the shared private link resource managed by the Azure Cognitive
+ * Search service within the specified resource group.
+ * @param sharedPrivateLinkResource The definition of the shared private link resource to create or update.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @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 describes a Shared Private Link Resource managed by the Azure Cognitive Search service.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SharedPrivateLinkResourceInner createOrUpdate(
+ String resourceGroupName,
+ String searchServiceName,
+ String sharedPrivateLinkResourceName,
+ SharedPrivateLinkResourceInner sharedPrivateLinkResource,
+ UUID clientRequestId);
+
+ /**
+ * Initiates the creation or update of a shared private link resource managed by the search service in the given
+ * resource group.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param sharedPrivateLinkResourceName The name of the shared private link resource managed by the Azure Cognitive
+ * Search service within the specified resource group.
+ * @param sharedPrivateLinkResource The definition of the shared private link resource to create or update.
+ * @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 describes a Shared Private Link Resource managed by the Azure Cognitive Search service.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SharedPrivateLinkResourceInner createOrUpdate(
+ String resourceGroupName,
+ String searchServiceName,
+ String sharedPrivateLinkResourceName,
+ SharedPrivateLinkResourceInner sharedPrivateLinkResource);
+
+ /**
+ * Initiates the creation or update of a shared private link resource managed by the search service in the given
+ * resource group.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param sharedPrivateLinkResourceName The name of the shared private link resource managed by the Azure Cognitive
+ * Search service within the specified resource group.
+ * @param sharedPrivateLinkResource The definition of the shared private link resource to create or update.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @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 describes a Shared Private Link Resource managed by the Azure Cognitive Search service.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SharedPrivateLinkResourceInner createOrUpdate(
+ String resourceGroupName,
+ String searchServiceName,
+ String sharedPrivateLinkResourceName,
+ SharedPrivateLinkResourceInner sharedPrivateLinkResource,
+ UUID clientRequestId,
+ Context context);
+
+ /**
+ * Gets the details of the shared private link resource managed by the search service in the given resource group.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param sharedPrivateLinkResourceName The name of the shared private link resource managed by the Azure Cognitive
+ * Search service within the specified resource group.
+ * @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 details of the shared private link resource managed by the search service in the given resource
+ * group.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SharedPrivateLinkResourceInner get(
+ String resourceGroupName, String searchServiceName, String sharedPrivateLinkResourceName);
+
+ /**
+ * Gets the details of the shared private link resource managed by the search service in the given resource group.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param sharedPrivateLinkResourceName The name of the shared private link resource managed by the Azure Cognitive
+ * Search service within the specified resource group.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @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 details of the shared private link resource managed by the search service in the given resource group
+ * along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName,
+ String searchServiceName,
+ String sharedPrivateLinkResourceName,
+ UUID clientRequestId,
+ Context context);
+
+ /**
+ * Initiates the deletion of the shared private link resource from the search service.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param sharedPrivateLinkResourceName The name of the shared private link resource managed by the Azure Cognitive
+ * Search service within the specified resource group.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String searchServiceName, String sharedPrivateLinkResourceName, UUID clientRequestId);
+
+ /**
+ * Initiates the deletion of the shared private link resource from the search service.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param sharedPrivateLinkResourceName The name of the shared private link resource managed by the Azure Cognitive
+ * Search service within the specified resource group.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName,
+ String searchServiceName,
+ String sharedPrivateLinkResourceName,
+ UUID clientRequestId,
+ Context context);
+
+ /**
+ * Initiates the deletion of the shared private link resource from the search service.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param sharedPrivateLinkResourceName The name of the shared private link resource managed by the Azure Cognitive
+ * Search service within the specified resource group.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(
+ String resourceGroupName, String searchServiceName, String sharedPrivateLinkResourceName, UUID clientRequestId);
+
+ /**
+ * Initiates the deletion of the shared private link resource from the search service.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param sharedPrivateLinkResourceName The name of the shared private link resource managed by the Azure Cognitive
+ * Search service within the specified resource group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String searchServiceName, String sharedPrivateLinkResourceName);
+
+ /**
+ * Initiates the deletion of the shared private link resource from the search service.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param sharedPrivateLinkResourceName The name of the shared private link resource managed by the Azure Cognitive
+ * Search service within the specified resource group.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(
+ String resourceGroupName,
+ String searchServiceName,
+ String sharedPrivateLinkResourceName,
+ UUID clientRequestId,
+ Context context);
+
+ /**
+ * Gets a list of all shared private link resources managed by the given service.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @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 all shared private link resources managed by the given service as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByService(String resourceGroupName, String searchServiceName);
+
+ /**
+ * Gets a list of all shared private link resources managed by the given service.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @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 all shared private link resources managed by the given service as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByService(
+ String resourceGroupName, String searchServiceName, UUID clientRequestId, Context context);
+}
diff --git a/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/models/AdminKeyResultInner.java b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/models/AdminKeyResultInner.java
new file mode 100644
index 000000000000..8d140cee9a29
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/models/AdminKeyResultInner.java
@@ -0,0 +1,54 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.search.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Response containing the primary and secondary admin API keys for a given Azure Cognitive Search service. */
+@Immutable
+public final class AdminKeyResultInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(AdminKeyResultInner.class);
+
+ /*
+ * The primary admin API key of the search service.
+ */
+ @JsonProperty(value = "primaryKey", access = JsonProperty.Access.WRITE_ONLY)
+ private String primaryKey;
+
+ /*
+ * The secondary admin API key of the search service.
+ */
+ @JsonProperty(value = "secondaryKey", access = JsonProperty.Access.WRITE_ONLY)
+ private String secondaryKey;
+
+ /**
+ * Get the primaryKey property: The primary admin API key of the search service.
+ *
+ * @return the primaryKey value.
+ */
+ public String primaryKey() {
+ return this.primaryKey;
+ }
+
+ /**
+ * Get the secondaryKey property: The secondary admin API key of the search service.
+ *
+ * @return the secondaryKey value.
+ */
+ public String secondaryKey() {
+ return this.secondaryKey;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/models/CheckNameAvailabilityOutputInner.java b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/models/CheckNameAvailabilityOutputInner.java
new file mode 100644
index 000000000000..7eccc28902e7
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/models/CheckNameAvailabilityOutputInner.java
@@ -0,0 +1,78 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.search.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.search.models.UnavailableNameReason;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Output of check name availability API. */
+@Immutable
+public final class CheckNameAvailabilityOutputInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(CheckNameAvailabilityOutputInner.class);
+
+ /*
+ * A value indicating whether the name is available.
+ */
+ @JsonProperty(value = "nameAvailable", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean isNameAvailable;
+
+ /*
+ * The reason why the name is not available. 'Invalid' indicates the name
+ * provided does not match the naming requirements (incorrect length,
+ * unsupported characters, etc.). 'AlreadyExists' indicates that the name
+ * is already in use and is therefore unavailable.
+ */
+ @JsonProperty(value = "reason", access = JsonProperty.Access.WRITE_ONLY)
+ private UnavailableNameReason reason;
+
+ /*
+ * A message that explains why the name is invalid and provides resource
+ * naming requirements. Available only if 'Invalid' is returned in the
+ * 'reason' property.
+ */
+ @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY)
+ private String message;
+
+ /**
+ * Get the isNameAvailable property: A value indicating whether the name is available.
+ *
+ * @return the isNameAvailable value.
+ */
+ public Boolean isNameAvailable() {
+ return this.isNameAvailable;
+ }
+
+ /**
+ * Get the reason property: The reason why the name is not available. 'Invalid' indicates the name provided does not
+ * match the naming requirements (incorrect length, unsupported characters, etc.). 'AlreadyExists' indicates that
+ * the name is already in use and is therefore unavailable.
+ *
+ * @return the reason value.
+ */
+ public UnavailableNameReason reason() {
+ return this.reason;
+ }
+
+ /**
+ * Get the message property: A message that explains why the name is invalid and provides resource naming
+ * requirements. Available only if 'Invalid' is returned in the 'reason' property.
+ *
+ * @return the message value.
+ */
+ public String message() {
+ return this.message;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/models/OperationInner.java b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/models/OperationInner.java
new file mode 100644
index 000000000000..684b286f9624
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/models/OperationInner.java
@@ -0,0 +1,59 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.search.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.search.models.OperationDisplay;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Describes a REST API operation. */
+@Immutable
+public final class OperationInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationInner.class);
+
+ /*
+ * The name of the operation. This name is of the form
+ * {provider}/{resource}/{operation}.
+ */
+ @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
+ private String name;
+
+ /*
+ * The object that describes the operation.
+ */
+ @JsonProperty(value = "display", access = JsonProperty.Access.WRITE_ONLY)
+ private OperationDisplay display;
+
+ /**
+ * Get the name property: The name of the operation. This name is of the form {provider}/{resource}/{operation}.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the display property: The object that describes the operation.
+ *
+ * @return the display value.
+ */
+ public OperationDisplay display() {
+ return this.display;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (display() != null) {
+ display().validate();
+ }
+ }
+}
diff --git a/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/models/PrivateEndpointConnectionInner.java b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/models/PrivateEndpointConnectionInner.java
new file mode 100644
index 000000000000..a66b39bcc51c
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/models/PrivateEndpointConnectionInner.java
@@ -0,0 +1,58 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.search.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.search.models.PrivateEndpointConnectionProperties;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Describes an existing Private Endpoint connection to the Azure Cognitive Search service. */
+@Fluent
+public final class PrivateEndpointConnectionInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionInner.class);
+
+ /*
+ * Describes the properties of an existing Private Endpoint connection to
+ * the Azure Cognitive Search service.
+ */
+ @JsonProperty(value = "properties")
+ private PrivateEndpointConnectionProperties properties;
+
+ /**
+ * Get the properties property: Describes the properties of an existing Private Endpoint connection to the Azure
+ * Cognitive Search service.
+ *
+ * @return the properties value.
+ */
+ public PrivateEndpointConnectionProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: Describes the properties of an existing Private Endpoint connection to the Azure
+ * Cognitive Search service.
+ *
+ * @param properties the properties value to set.
+ * @return the PrivateEndpointConnectionInner object itself.
+ */
+ public PrivateEndpointConnectionInner withProperties(PrivateEndpointConnectionProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() != null) {
+ properties().validate();
+ }
+ }
+}
diff --git a/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/models/PrivateLinkResourceInner.java b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/models/PrivateLinkResourceInner.java
new file mode 100644
index 000000000000..654532fa973f
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/models/PrivateLinkResourceInner.java
@@ -0,0 +1,46 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.search.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.search.models.PrivateLinkResourceProperties;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Describes a supported private link resource for the Azure Cognitive Search service. */
+@Immutable
+public final class PrivateLinkResourceInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkResourceInner.class);
+
+ /*
+ * Describes the properties of a supported private link resource for the
+ * Azure Cognitive Search service.
+ */
+ @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY)
+ private PrivateLinkResourceProperties properties;
+
+ /**
+ * Get the properties property: Describes the properties of a supported private link resource for the Azure
+ * Cognitive Search service.
+ *
+ * @return the properties value.
+ */
+ public PrivateLinkResourceProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() != null) {
+ properties().validate();
+ }
+ }
+}
diff --git a/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/models/QueryKeyInner.java b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/models/QueryKeyInner.java
new file mode 100644
index 000000000000..88f0fff80d26
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/models/QueryKeyInner.java
@@ -0,0 +1,54 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.search.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Describes an API key for a given Azure Cognitive Search service that has permissions for query operations only. */
+@Immutable
+public final class QueryKeyInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(QueryKeyInner.class);
+
+ /*
+ * The name of the query API key; may be empty.
+ */
+ @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
+ private String name;
+
+ /*
+ * The value of the query API key.
+ */
+ @JsonProperty(value = "key", access = JsonProperty.Access.WRITE_ONLY)
+ private String key;
+
+ /**
+ * Get the name property: The name of the query API key; may be empty.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the key property: The value of the query API key.
+ *
+ * @return the key value.
+ */
+ public String key() {
+ return this.key;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/models/SearchServiceInner.java b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/models/SearchServiceInner.java
new file mode 100644
index 000000000000..089508e1c466
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/models/SearchServiceInner.java
@@ -0,0 +1,321 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.search.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.Resource;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.search.models.HostingMode;
+import com.azure.resourcemanager.search.models.Identity;
+import com.azure.resourcemanager.search.models.NetworkRuleSet;
+import com.azure.resourcemanager.search.models.ProvisioningState;
+import com.azure.resourcemanager.search.models.PublicNetworkAccess;
+import com.azure.resourcemanager.search.models.SearchServiceStatus;
+import com.azure.resourcemanager.search.models.Sku;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+import java.util.Map;
+
+/** Describes an Azure Cognitive Search service and its current state. */
+@Fluent
+public final class SearchServiceInner extends Resource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(SearchServiceInner.class);
+
+ /*
+ * Properties of the search service.
+ */
+ @JsonProperty(value = "properties")
+ private SearchServiceProperties innerProperties;
+
+ /*
+ * The SKU of the Search Service, which determines price tier and capacity
+ * limits. This property is required when creating a new Search Service.
+ */
+ @JsonProperty(value = "sku")
+ private Sku sku;
+
+ /*
+ * The identity of the resource.
+ */
+ @JsonProperty(value = "identity")
+ private Identity identity;
+
+ /**
+ * Get the innerProperties property: Properties of the search service.
+ *
+ * @return the innerProperties value.
+ */
+ private SearchServiceProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the sku property: The SKU of the Search Service, which determines price tier and capacity limits. This
+ * property is required when creating a new Search Service.
+ *
+ * @return the sku value.
+ */
+ public Sku sku() {
+ return this.sku;
+ }
+
+ /**
+ * Set the sku property: The SKU of the Search Service, which determines price tier and capacity limits. This
+ * property is required when creating a new Search Service.
+ *
+ * @param sku the sku value to set.
+ * @return the SearchServiceInner object itself.
+ */
+ public SearchServiceInner withSku(Sku sku) {
+ this.sku = sku;
+ return this;
+ }
+
+ /**
+ * Get the identity property: The identity of the resource.
+ *
+ * @return the identity value.
+ */
+ public Identity identity() {
+ return this.identity;
+ }
+
+ /**
+ * Set the identity property: The identity of the resource.
+ *
+ * @param identity the identity value to set.
+ * @return the SearchServiceInner object itself.
+ */
+ public SearchServiceInner withIdentity(Identity identity) {
+ this.identity = identity;
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public SearchServiceInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public SearchServiceInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Get the replicaCount property: The number of replicas in the search service. If specified, it must be a value
+ * between 1 and 12 inclusive for standard SKUs or between 1 and 3 inclusive for basic SKU.
+ *
+ * @return the replicaCount value.
+ */
+ public Integer replicaCount() {
+ return this.innerProperties() == null ? null : this.innerProperties().replicaCount();
+ }
+
+ /**
+ * Set the replicaCount property: The number of replicas in the search service. If specified, it must be a value
+ * between 1 and 12 inclusive for standard SKUs or between 1 and 3 inclusive for basic SKU.
+ *
+ * @param replicaCount the replicaCount value to set.
+ * @return the SearchServiceInner object itself.
+ */
+ public SearchServiceInner withReplicaCount(Integer replicaCount) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SearchServiceProperties();
+ }
+ this.innerProperties().withReplicaCount(replicaCount);
+ return this;
+ }
+
+ /**
+ * Get the partitionCount property: The number of partitions in the search service; if specified, it can be 1, 2, 3,
+ * 4, 6, or 12. Values greater than 1 are only valid for standard SKUs. For 'standard3' services with hostingMode
+ * set to 'highDensity', the allowed values are between 1 and 3.
+ *
+ * @return the partitionCount value.
+ */
+ public Integer partitionCount() {
+ return this.innerProperties() == null ? null : this.innerProperties().partitionCount();
+ }
+
+ /**
+ * Set the partitionCount property: The number of partitions in the search service; if specified, it can be 1, 2, 3,
+ * 4, 6, or 12. Values greater than 1 are only valid for standard SKUs. For 'standard3' services with hostingMode
+ * set to 'highDensity', the allowed values are between 1 and 3.
+ *
+ * @param partitionCount the partitionCount value to set.
+ * @return the SearchServiceInner object itself.
+ */
+ public SearchServiceInner withPartitionCount(Integer partitionCount) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SearchServiceProperties();
+ }
+ this.innerProperties().withPartitionCount(partitionCount);
+ return this;
+ }
+
+ /**
+ * Get the hostingMode property: Applicable only for the standard3 SKU. You can set this property to enable up to 3
+ * high density partitions that allow up to 1000 indexes, which is much higher than the maximum indexes allowed for
+ * any other SKU. For the standard3 SKU, the value is either 'default' or 'highDensity'. For all other SKUs, this
+ * value must be 'default'.
+ *
+ * @return the hostingMode value.
+ */
+ public HostingMode hostingMode() {
+ return this.innerProperties() == null ? null : this.innerProperties().hostingMode();
+ }
+
+ /**
+ * Set the hostingMode property: Applicable only for the standard3 SKU. You can set this property to enable up to 3
+ * high density partitions that allow up to 1000 indexes, which is much higher than the maximum indexes allowed for
+ * any other SKU. For the standard3 SKU, the value is either 'default' or 'highDensity'. For all other SKUs, this
+ * value must be 'default'.
+ *
+ * @param hostingMode the hostingMode value to set.
+ * @return the SearchServiceInner object itself.
+ */
+ public SearchServiceInner withHostingMode(HostingMode hostingMode) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SearchServiceProperties();
+ }
+ this.innerProperties().withHostingMode(hostingMode);
+ return this;
+ }
+
+ /**
+ * Get the publicNetworkAccess property: This value can be set to 'enabled' to avoid breaking changes on existing
+ * customer resources and templates. If set to 'disabled', traffic over public interface is not allowed, and private
+ * endpoint connections would be the exclusive access method.
+ *
+ * @return the publicNetworkAccess value.
+ */
+ public PublicNetworkAccess publicNetworkAccess() {
+ return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccess();
+ }
+
+ /**
+ * Set the publicNetworkAccess property: This value can be set to 'enabled' to avoid breaking changes on existing
+ * customer resources and templates. If set to 'disabled', traffic over public interface is not allowed, and private
+ * endpoint connections would be the exclusive access method.
+ *
+ * @param publicNetworkAccess the publicNetworkAccess value to set.
+ * @return the SearchServiceInner object itself.
+ */
+ public SearchServiceInner withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SearchServiceProperties();
+ }
+ this.innerProperties().withPublicNetworkAccess(publicNetworkAccess);
+ return this;
+ }
+
+ /**
+ * Get the status property: The status of the search service. Possible values include: 'running': The search service
+ * is running and no provisioning operations are underway. 'provisioning': The search service is being provisioned
+ * or scaled up or down. 'deleting': The search service is being deleted. 'degraded': The search service is
+ * degraded. This can occur when the underlying search units are not healthy. The search service is most likely
+ * operational, but performance might be slow and some requests might be dropped. 'disabled': The search service is
+ * disabled. In this state, the service will reject all API requests. 'error': The search service is in an error
+ * state. If your service is in the degraded, disabled, or error states, it means the Azure Cognitive Search team is
+ * actively investigating the underlying issue. Dedicated services in these states are still chargeable based on the
+ * number of search units provisioned.
+ *
+ * @return the status value.
+ */
+ public SearchServiceStatus status() {
+ return this.innerProperties() == null ? null : this.innerProperties().status();
+ }
+
+ /**
+ * Get the statusDetails property: The details of the search service status.
+ *
+ * @return the statusDetails value.
+ */
+ public String statusDetails() {
+ return this.innerProperties() == null ? null : this.innerProperties().statusDetails();
+ }
+
+ /**
+ * Get the provisioningState property: The state of the last provisioning operation performed on the search service.
+ * Provisioning is an intermediate state that occurs while service capacity is being established. After capacity is
+ * set up, provisioningState changes to either 'succeeded' or 'failed'. Client applications can poll provisioning
+ * status (the recommended polling interval is from 30 seconds to one minute) by using the Get Search Service
+ * operation to see when an operation is completed. If you are using the free service, this value tends to come back
+ * as 'succeeded' directly in the call to Create search service. This is because the free service uses capacity that
+ * is already set up.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * Get the networkRuleSet property: Network specific rules that determine how the Azure Cognitive Search service may
+ * be reached.
+ *
+ * @return the networkRuleSet value.
+ */
+ public NetworkRuleSet networkRuleSet() {
+ return this.innerProperties() == null ? null : this.innerProperties().networkRuleSet();
+ }
+
+ /**
+ * Set the networkRuleSet property: Network specific rules that determine how the Azure Cognitive Search service may
+ * be reached.
+ *
+ * @param networkRuleSet the networkRuleSet value to set.
+ * @return the SearchServiceInner object itself.
+ */
+ public SearchServiceInner withNetworkRuleSet(NetworkRuleSet networkRuleSet) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SearchServiceProperties();
+ }
+ this.innerProperties().withNetworkRuleSet(networkRuleSet);
+ return this;
+ }
+
+ /**
+ * Get the privateEndpointConnections property: The list of private endpoint connections to the Azure Cognitive
+ * Search service.
+ *
+ * @return the privateEndpointConnections value.
+ */
+ public List privateEndpointConnections() {
+ return this.innerProperties() == null ? null : this.innerProperties().privateEndpointConnections();
+ }
+
+ /**
+ * Get the sharedPrivateLinkResources property: The list of shared private link resources managed by the Azure
+ * Cognitive Search service.
+ *
+ * @return the sharedPrivateLinkResources value.
+ */
+ public List sharedPrivateLinkResources() {
+ return this.innerProperties() == null ? null : this.innerProperties().sharedPrivateLinkResources();
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ if (sku() != null) {
+ sku().validate();
+ }
+ if (identity() != null) {
+ identity().validate();
+ }
+ }
+}
diff --git a/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/models/SearchServiceProperties.java b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/models/SearchServiceProperties.java
new file mode 100644
index 000000000000..af65f355acd9
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/models/SearchServiceProperties.java
@@ -0,0 +1,315 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.search.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.search.models.HostingMode;
+import com.azure.resourcemanager.search.models.NetworkRuleSet;
+import com.azure.resourcemanager.search.models.ProvisioningState;
+import com.azure.resourcemanager.search.models.PublicNetworkAccess;
+import com.azure.resourcemanager.search.models.SearchServiceStatus;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Properties of the search service. */
+@Fluent
+public final class SearchServiceProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(SearchServiceProperties.class);
+
+ /*
+ * The number of replicas in the search service. If specified, it must be a
+ * value between 1 and 12 inclusive for standard SKUs or between 1 and 3
+ * inclusive for basic SKU.
+ */
+ @JsonProperty(value = "replicaCount")
+ private Integer replicaCount;
+
+ /*
+ * The number of partitions in the search service; if specified, it can be
+ * 1, 2, 3, 4, 6, or 12. Values greater than 1 are only valid for standard
+ * SKUs. For 'standard3' services with hostingMode set to 'highDensity',
+ * the allowed values are between 1 and 3.
+ */
+ @JsonProperty(value = "partitionCount")
+ private Integer partitionCount;
+
+ /*
+ * Applicable only for the standard3 SKU. You can set this property to
+ * enable up to 3 high density partitions that allow up to 1000 indexes,
+ * which is much higher than the maximum indexes allowed for any other SKU.
+ * For the standard3 SKU, the value is either 'default' or 'highDensity'.
+ * For all other SKUs, this value must be 'default'.
+ */
+ @JsonProperty(value = "hostingMode")
+ private HostingMode hostingMode;
+
+ /*
+ * This value can be set to 'enabled' to avoid breaking changes on existing
+ * customer resources and templates. If set to 'disabled', traffic over
+ * public interface is not allowed, and private endpoint connections would
+ * be the exclusive access method.
+ */
+ @JsonProperty(value = "publicNetworkAccess")
+ private PublicNetworkAccess publicNetworkAccess;
+
+ /*
+ * The status of the search service. Possible values include: 'running':
+ * The search service is running and no provisioning operations are
+ * underway. 'provisioning': The search service is being provisioned or
+ * scaled up or down. 'deleting': The search service is being deleted.
+ * 'degraded': The search service is degraded. This can occur when the
+ * underlying search units are not healthy. The search service is most
+ * likely operational, but performance might be slow and some requests
+ * might be dropped. 'disabled': The search service is disabled. In this
+ * state, the service will reject all API requests. 'error': The search
+ * service is in an error state. If your service is in the degraded,
+ * disabled, or error states, it means the Azure Cognitive Search team is
+ * actively investigating the underlying issue. Dedicated services in these
+ * states are still chargeable based on the number of search units
+ * provisioned.
+ */
+ @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY)
+ private SearchServiceStatus status;
+
+ /*
+ * The details of the search service status.
+ */
+ @JsonProperty(value = "statusDetails", access = JsonProperty.Access.WRITE_ONLY)
+ private String statusDetails;
+
+ /*
+ * The state of the last provisioning operation performed on the search
+ * service. Provisioning is an intermediate state that occurs while service
+ * capacity is being established. After capacity is set up,
+ * provisioningState changes to either 'succeeded' or 'failed'. Client
+ * applications can poll provisioning status (the recommended polling
+ * interval is from 30 seconds to one minute) by using the Get Search
+ * Service operation to see when an operation is completed. If you are
+ * using the free service, this value tends to come back as 'succeeded'
+ * directly in the call to Create search service. This is because the free
+ * service uses capacity that is already set up.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningState provisioningState;
+
+ /*
+ * Network specific rules that determine how the Azure Cognitive Search
+ * service may be reached.
+ */
+ @JsonProperty(value = "networkRuleSet")
+ private NetworkRuleSet networkRuleSet;
+
+ /*
+ * The list of private endpoint connections to the Azure Cognitive Search
+ * service.
+ */
+ @JsonProperty(value = "privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY)
+ private List privateEndpointConnections;
+
+ /*
+ * The list of shared private link resources managed by the Azure Cognitive
+ * Search service.
+ */
+ @JsonProperty(value = "sharedPrivateLinkResources", access = JsonProperty.Access.WRITE_ONLY)
+ private List sharedPrivateLinkResources;
+
+ /**
+ * Get the replicaCount property: The number of replicas in the search service. If specified, it must be a value
+ * between 1 and 12 inclusive for standard SKUs or between 1 and 3 inclusive for basic SKU.
+ *
+ * @return the replicaCount value.
+ */
+ public Integer replicaCount() {
+ return this.replicaCount;
+ }
+
+ /**
+ * Set the replicaCount property: The number of replicas in the search service. If specified, it must be a value
+ * between 1 and 12 inclusive for standard SKUs or between 1 and 3 inclusive for basic SKU.
+ *
+ * @param replicaCount the replicaCount value to set.
+ * @return the SearchServiceProperties object itself.
+ */
+ public SearchServiceProperties withReplicaCount(Integer replicaCount) {
+ this.replicaCount = replicaCount;
+ return this;
+ }
+
+ /**
+ * Get the partitionCount property: The number of partitions in the search service; if specified, it can be 1, 2, 3,
+ * 4, 6, or 12. Values greater than 1 are only valid for standard SKUs. For 'standard3' services with hostingMode
+ * set to 'highDensity', the allowed values are between 1 and 3.
+ *
+ * @return the partitionCount value.
+ */
+ public Integer partitionCount() {
+ return this.partitionCount;
+ }
+
+ /**
+ * Set the partitionCount property: The number of partitions in the search service; if specified, it can be 1, 2, 3,
+ * 4, 6, or 12. Values greater than 1 are only valid for standard SKUs. For 'standard3' services with hostingMode
+ * set to 'highDensity', the allowed values are between 1 and 3.
+ *
+ * @param partitionCount the partitionCount value to set.
+ * @return the SearchServiceProperties object itself.
+ */
+ public SearchServiceProperties withPartitionCount(Integer partitionCount) {
+ this.partitionCount = partitionCount;
+ return this;
+ }
+
+ /**
+ * Get the hostingMode property: Applicable only for the standard3 SKU. You can set this property to enable up to 3
+ * high density partitions that allow up to 1000 indexes, which is much higher than the maximum indexes allowed for
+ * any other SKU. For the standard3 SKU, the value is either 'default' or 'highDensity'. For all other SKUs, this
+ * value must be 'default'.
+ *
+ * @return the hostingMode value.
+ */
+ public HostingMode hostingMode() {
+ return this.hostingMode;
+ }
+
+ /**
+ * Set the hostingMode property: Applicable only for the standard3 SKU. You can set this property to enable up to 3
+ * high density partitions that allow up to 1000 indexes, which is much higher than the maximum indexes allowed for
+ * any other SKU. For the standard3 SKU, the value is either 'default' or 'highDensity'. For all other SKUs, this
+ * value must be 'default'.
+ *
+ * @param hostingMode the hostingMode value to set.
+ * @return the SearchServiceProperties object itself.
+ */
+ public SearchServiceProperties withHostingMode(HostingMode hostingMode) {
+ this.hostingMode = hostingMode;
+ return this;
+ }
+
+ /**
+ * Get the publicNetworkAccess property: This value can be set to 'enabled' to avoid breaking changes on existing
+ * customer resources and templates. If set to 'disabled', traffic over public interface is not allowed, and private
+ * endpoint connections would be the exclusive access method.
+ *
+ * @return the publicNetworkAccess value.
+ */
+ public PublicNetworkAccess publicNetworkAccess() {
+ return this.publicNetworkAccess;
+ }
+
+ /**
+ * Set the publicNetworkAccess property: This value can be set to 'enabled' to avoid breaking changes on existing
+ * customer resources and templates. If set to 'disabled', traffic over public interface is not allowed, and private
+ * endpoint connections would be the exclusive access method.
+ *
+ * @param publicNetworkAccess the publicNetworkAccess value to set.
+ * @return the SearchServiceProperties object itself.
+ */
+ public SearchServiceProperties withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) {
+ this.publicNetworkAccess = publicNetworkAccess;
+ return this;
+ }
+
+ /**
+ * Get the status property: The status of the search service. Possible values include: 'running': The search service
+ * is running and no provisioning operations are underway. 'provisioning': The search service is being provisioned
+ * or scaled up or down. 'deleting': The search service is being deleted. 'degraded': The search service is
+ * degraded. This can occur when the underlying search units are not healthy. The search service is most likely
+ * operational, but performance might be slow and some requests might be dropped. 'disabled': The search service is
+ * disabled. In this state, the service will reject all API requests. 'error': The search service is in an error
+ * state. If your service is in the degraded, disabled, or error states, it means the Azure Cognitive Search team is
+ * actively investigating the underlying issue. Dedicated services in these states are still chargeable based on the
+ * number of search units provisioned.
+ *
+ * @return the status value.
+ */
+ public SearchServiceStatus status() {
+ return this.status;
+ }
+
+ /**
+ * Get the statusDetails property: The details of the search service status.
+ *
+ * @return the statusDetails value.
+ */
+ public String statusDetails() {
+ return this.statusDetails;
+ }
+
+ /**
+ * Get the provisioningState property: The state of the last provisioning operation performed on the search service.
+ * Provisioning is an intermediate state that occurs while service capacity is being established. After capacity is
+ * set up, provisioningState changes to either 'succeeded' or 'failed'. Client applications can poll provisioning
+ * status (the recommended polling interval is from 30 seconds to one minute) by using the Get Search Service
+ * operation to see when an operation is completed. If you are using the free service, this value tends to come back
+ * as 'succeeded' directly in the call to Create search service. This is because the free service uses capacity that
+ * is already set up.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Get the networkRuleSet property: Network specific rules that determine how the Azure Cognitive Search service may
+ * be reached.
+ *
+ * @return the networkRuleSet value.
+ */
+ public NetworkRuleSet networkRuleSet() {
+ return this.networkRuleSet;
+ }
+
+ /**
+ * Set the networkRuleSet property: Network specific rules that determine how the Azure Cognitive Search service may
+ * be reached.
+ *
+ * @param networkRuleSet the networkRuleSet value to set.
+ * @return the SearchServiceProperties object itself.
+ */
+ public SearchServiceProperties withNetworkRuleSet(NetworkRuleSet networkRuleSet) {
+ this.networkRuleSet = networkRuleSet;
+ return this;
+ }
+
+ /**
+ * Get the privateEndpointConnections property: The list of private endpoint connections to the Azure Cognitive
+ * Search service.
+ *
+ * @return the privateEndpointConnections value.
+ */
+ public List privateEndpointConnections() {
+ return this.privateEndpointConnections;
+ }
+
+ /**
+ * Get the sharedPrivateLinkResources property: The list of shared private link resources managed by the Azure
+ * Cognitive Search service.
+ *
+ * @return the sharedPrivateLinkResources value.
+ */
+ public List sharedPrivateLinkResources() {
+ return this.sharedPrivateLinkResources;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (networkRuleSet() != null) {
+ networkRuleSet().validate();
+ }
+ if (privateEndpointConnections() != null) {
+ privateEndpointConnections().forEach(e -> e.validate());
+ }
+ if (sharedPrivateLinkResources() != null) {
+ sharedPrivateLinkResources().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/models/SharedPrivateLinkResourceInner.java b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/models/SharedPrivateLinkResourceInner.java
new file mode 100644
index 000000000000..1ee749b1015d
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/models/SharedPrivateLinkResourceInner.java
@@ -0,0 +1,58 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.search.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.search.models.SharedPrivateLinkResourceProperties;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Describes a Shared Private Link Resource managed by the Azure Cognitive Search service. */
+@Fluent
+public final class SharedPrivateLinkResourceInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(SharedPrivateLinkResourceInner.class);
+
+ /*
+ * Describes the properties of a Shared Private Link Resource managed by
+ * the Azure Cognitive Search service.
+ */
+ @JsonProperty(value = "properties")
+ private SharedPrivateLinkResourceProperties properties;
+
+ /**
+ * Get the properties property: Describes the properties of a Shared Private Link Resource managed by the Azure
+ * Cognitive Search service.
+ *
+ * @return the properties value.
+ */
+ public SharedPrivateLinkResourceProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: Describes the properties of a Shared Private Link Resource managed by the Azure
+ * Cognitive Search service.
+ *
+ * @param properties the properties value to set.
+ * @return the SharedPrivateLinkResourceInner object itself.
+ */
+ public SharedPrivateLinkResourceInner withProperties(SharedPrivateLinkResourceProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() != null) {
+ properties().validate();
+ }
+ }
+}
diff --git a/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/models/package-info.java b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/models/package-info.java
new file mode 100644
index 000000000000..f709afc865d1
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/models/package-info.java
@@ -0,0 +1,9 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/**
+ * Package containing the inner data models for SearchManagementClient. Client that can be used to manage Azure
+ * Cognitive Search services and API keys.
+ */
+package com.azure.resourcemanager.search.fluent.models;
diff --git a/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/package-info.java b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/package-info.java
new file mode 100644
index 000000000000..f19f6b05ea5e
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/package-info.java
@@ -0,0 +1,9 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/**
+ * Package containing the service clients for SearchManagementClient. Client that can be used to manage Azure Cognitive
+ * Search services and API keys.
+ */
+package com.azure.resourcemanager.search.fluent;
diff --git a/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/AdminKeyResultImpl.java b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/AdminKeyResultImpl.java
new file mode 100644
index 000000000000..6b4f9315b9ab
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/AdminKeyResultImpl.java
@@ -0,0 +1,35 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.search.implementation;
+
+import com.azure.resourcemanager.search.fluent.models.AdminKeyResultInner;
+import com.azure.resourcemanager.search.models.AdminKeyResult;
+
+public final class AdminKeyResultImpl implements AdminKeyResult {
+ private AdminKeyResultInner innerObject;
+
+ private final com.azure.resourcemanager.search.SearchManager serviceManager;
+
+ AdminKeyResultImpl(AdminKeyResultInner innerObject, com.azure.resourcemanager.search.SearchManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String primaryKey() {
+ return this.innerModel().primaryKey();
+ }
+
+ public String secondaryKey() {
+ return this.innerModel().secondaryKey();
+ }
+
+ public AdminKeyResultInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.search.SearchManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/AdminKeysClientImpl.java b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/AdminKeysClientImpl.java
new file mode 100644
index 000000000000..05ecbac6089d
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/AdminKeysClientImpl.java
@@ -0,0 +1,524 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.search.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Post;
+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.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.search.fluent.AdminKeysClient;
+import com.azure.resourcemanager.search.fluent.models.AdminKeyResultInner;
+import com.azure.resourcemanager.search.models.AdminKeyKind;
+import java.util.UUID;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in AdminKeysClient. */
+public final class AdminKeysClientImpl implements AdminKeysClient {
+ private final ClientLogger logger = new ClientLogger(AdminKeysClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final AdminKeysService service;
+
+ /** The service client containing this operation class. */
+ private final SearchManagementClientImpl client;
+
+ /**
+ * Initializes an instance of AdminKeysClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ AdminKeysClientImpl(SearchManagementClientImpl client) {
+ this.service =
+ RestProxy.create(AdminKeysService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for SearchManagementClientAdminKeys to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "SearchManagementClie")
+ private interface AdminKeysService {
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search"
+ + "/searchServices/{searchServiceName}/listAdminKeys")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("searchServiceName") String searchServiceName,
+ @HeaderParam("x-ms-client-request-id") UUID clientRequestId,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search"
+ + "/searchServices/{searchServiceName}/regenerateAdminKey/{keyKind}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> regenerate(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("searchServiceName") String searchServiceName,
+ @PathParam("keyKind") AdminKeyKind keyKind,
+ @HeaderParam("x-ms-client-request-id") UUID clientRequestId,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Gets the primary and secondary admin API keys for the specified Azure Cognitive Search service.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the primary and secondary admin API keys for the specified Azure Cognitive Search service along with
+ * {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String searchServiceName, UUID clientRequestId) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (searchServiceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter searchServiceName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ searchServiceName,
+ clientRequestId,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets the primary and secondary admin API keys for the specified Azure Cognitive Search service.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @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 primary and secondary admin API keys for the specified Azure Cognitive Search service along with
+ * {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String searchServiceName, UUID clientRequestId, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (searchServiceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter searchServiceName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .get(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ searchServiceName,
+ clientRequestId,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context);
+ }
+
+ /**
+ * Gets the primary and secondary admin API keys for the specified Azure Cognitive Search service.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the primary and secondary admin API keys for the specified Azure Cognitive Search service on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(
+ String resourceGroupName, String searchServiceName, UUID clientRequestId) {
+ return getWithResponseAsync(resourceGroupName, searchServiceName, clientRequestId)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Gets the primary and secondary admin API keys for the specified Azure Cognitive Search service.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the primary and secondary admin API keys for the specified Azure Cognitive Search service on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String resourceGroupName, String searchServiceName) {
+ final UUID clientRequestId = null;
+ return getWithResponseAsync(resourceGroupName, searchServiceName, clientRequestId)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Gets the primary and secondary admin API keys for the specified Azure Cognitive Search service.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the primary and secondary admin API keys for the specified Azure Cognitive Search service.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public AdminKeyResultInner get(String resourceGroupName, String searchServiceName) {
+ final UUID clientRequestId = null;
+ return getAsync(resourceGroupName, searchServiceName, clientRequestId).block();
+ }
+
+ /**
+ * Gets the primary and secondary admin API keys for the specified Azure Cognitive Search service.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @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 primary and secondary admin API keys for the specified Azure Cognitive Search service along with
+ * {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(
+ String resourceGroupName, String searchServiceName, UUID clientRequestId, Context context) {
+ return getWithResponseAsync(resourceGroupName, searchServiceName, clientRequestId, context).block();
+ }
+
+ /**
+ * Regenerates either the primary or secondary admin API key. You can only regenerate one key at a time.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param keyKind Specifies which key to regenerate. Valid values include 'primary' and 'secondary'.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return response containing the primary and secondary admin API keys for a given Azure Cognitive Search service
+ * along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> regenerateWithResponseAsync(
+ String resourceGroupName, String searchServiceName, AdminKeyKind keyKind, UUID clientRequestId) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (searchServiceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter searchServiceName is required and cannot be null."));
+ }
+ if (keyKind == null) {
+ return Mono.error(new IllegalArgumentException("Parameter keyKind is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .regenerate(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ searchServiceName,
+ keyKind,
+ clientRequestId,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Regenerates either the primary or secondary admin API key. You can only regenerate one key at a time.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param keyKind Specifies which key to regenerate. Valid values include 'primary' and 'secondary'.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @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 response containing the primary and secondary admin API keys for a given Azure Cognitive Search service
+ * along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> regenerateWithResponseAsync(
+ String resourceGroupName,
+ String searchServiceName,
+ AdminKeyKind keyKind,
+ UUID clientRequestId,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (searchServiceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter searchServiceName is required and cannot be null."));
+ }
+ if (keyKind == null) {
+ return Mono.error(new IllegalArgumentException("Parameter keyKind is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .regenerate(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ searchServiceName,
+ keyKind,
+ clientRequestId,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context);
+ }
+
+ /**
+ * Regenerates either the primary or secondary admin API key. You can only regenerate one key at a time.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param keyKind Specifies which key to regenerate. Valid values include 'primary' and 'secondary'.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return response containing the primary and secondary admin API keys for a given Azure Cognitive Search service
+ * on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono regenerateAsync(
+ String resourceGroupName, String searchServiceName, AdminKeyKind keyKind, UUID clientRequestId) {
+ return regenerateWithResponseAsync(resourceGroupName, searchServiceName, keyKind, clientRequestId)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Regenerates either the primary or secondary admin API key. You can only regenerate one key at a time.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param keyKind Specifies which key to regenerate. Valid values include 'primary' and 'secondary'.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return response containing the primary and secondary admin API keys for a given Azure Cognitive Search service
+ * on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono regenerateAsync(
+ String resourceGroupName, String searchServiceName, AdminKeyKind keyKind) {
+ final UUID clientRequestId = null;
+ return regenerateWithResponseAsync(resourceGroupName, searchServiceName, keyKind, clientRequestId)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Regenerates either the primary or secondary admin API key. You can only regenerate one key at a time.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param keyKind Specifies which key to regenerate. Valid values include 'primary' and 'secondary'.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return response containing the primary and secondary admin API keys for a given Azure Cognitive Search service.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public AdminKeyResultInner regenerate(String resourceGroupName, String searchServiceName, AdminKeyKind keyKind) {
+ final UUID clientRequestId = null;
+ return regenerateAsync(resourceGroupName, searchServiceName, keyKind, clientRequestId).block();
+ }
+
+ /**
+ * Regenerates either the primary or secondary admin API key. You can only regenerate one key at a time.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param keyKind Specifies which key to regenerate. Valid values include 'primary' and 'secondary'.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @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 response containing the primary and secondary admin API keys for a given Azure Cognitive Search service
+ * along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response regenerateWithResponse(
+ String resourceGroupName,
+ String searchServiceName,
+ AdminKeyKind keyKind,
+ UUID clientRequestId,
+ Context context) {
+ return regenerateWithResponseAsync(resourceGroupName, searchServiceName, keyKind, clientRequestId, context)
+ .block();
+ }
+}
diff --git a/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/AdminKeysImpl.java b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/AdminKeysImpl.java
new file mode 100644
index 000000000000..36237de3855e
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/AdminKeysImpl.java
@@ -0,0 +1,92 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.search.implementation;
+
+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.search.fluent.AdminKeysClient;
+import com.azure.resourcemanager.search.fluent.models.AdminKeyResultInner;
+import com.azure.resourcemanager.search.models.AdminKeyKind;
+import com.azure.resourcemanager.search.models.AdminKeyResult;
+import com.azure.resourcemanager.search.models.AdminKeys;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import java.util.UUID;
+
+public final class AdminKeysImpl implements AdminKeys {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(AdminKeysImpl.class);
+
+ private final AdminKeysClient innerClient;
+
+ private final com.azure.resourcemanager.search.SearchManager serviceManager;
+
+ public AdminKeysImpl(AdminKeysClient innerClient, com.azure.resourcemanager.search.SearchManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public AdminKeyResult get(String resourceGroupName, String searchServiceName) {
+ AdminKeyResultInner inner = this.serviceClient().get(resourceGroupName, searchServiceName);
+ if (inner != null) {
+ return new AdminKeyResultImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getWithResponse(
+ String resourceGroupName, String searchServiceName, UUID clientRequestId, Context context) {
+ Response inner =
+ this.serviceClient().getWithResponse(resourceGroupName, searchServiceName, clientRequestId, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new AdminKeyResultImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public AdminKeyResult regenerate(String resourceGroupName, String searchServiceName, AdminKeyKind keyKind) {
+ AdminKeyResultInner inner = this.serviceClient().regenerate(resourceGroupName, searchServiceName, keyKind);
+ if (inner != null) {
+ return new AdminKeyResultImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response regenerateWithResponse(
+ String resourceGroupName,
+ String searchServiceName,
+ AdminKeyKind keyKind,
+ UUID clientRequestId,
+ Context context) {
+ Response inner =
+ this
+ .serviceClient()
+ .regenerateWithResponse(resourceGroupName, searchServiceName, keyKind, clientRequestId, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new AdminKeyResultImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ private AdminKeysClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.search.SearchManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/CheckNameAvailabilityOutputImpl.java b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/CheckNameAvailabilityOutputImpl.java
new file mode 100644
index 000000000000..95a6f195e444
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/CheckNameAvailabilityOutputImpl.java
@@ -0,0 +1,41 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.search.implementation;
+
+import com.azure.resourcemanager.search.fluent.models.CheckNameAvailabilityOutputInner;
+import com.azure.resourcemanager.search.models.CheckNameAvailabilityOutput;
+import com.azure.resourcemanager.search.models.UnavailableNameReason;
+
+public final class CheckNameAvailabilityOutputImpl implements CheckNameAvailabilityOutput {
+ private CheckNameAvailabilityOutputInner innerObject;
+
+ private final com.azure.resourcemanager.search.SearchManager serviceManager;
+
+ CheckNameAvailabilityOutputImpl(
+ CheckNameAvailabilityOutputInner innerObject, com.azure.resourcemanager.search.SearchManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public Boolean isNameAvailable() {
+ return this.innerModel().isNameAvailable();
+ }
+
+ public UnavailableNameReason reason() {
+ return this.innerModel().reason();
+ }
+
+ public String message() {
+ return this.innerModel().message();
+ }
+
+ public CheckNameAvailabilityOutputInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.search.SearchManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/OperationImpl.java b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/OperationImpl.java
new file mode 100644
index 000000000000..357e9e5834b7
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/OperationImpl.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.search.implementation;
+
+import com.azure.resourcemanager.search.fluent.models.OperationInner;
+import com.azure.resourcemanager.search.models.Operation;
+import com.azure.resourcemanager.search.models.OperationDisplay;
+
+public final class OperationImpl implements Operation {
+ private OperationInner innerObject;
+
+ private final com.azure.resourcemanager.search.SearchManager serviceManager;
+
+ OperationImpl(OperationInner innerObject, com.azure.resourcemanager.search.SearchManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public OperationDisplay display() {
+ return this.innerModel().display();
+ }
+
+ public OperationInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.search.SearchManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/OperationsClientImpl.java b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/OperationsClientImpl.java
new file mode 100644
index 000000000000..76e2aa962831
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/OperationsClientImpl.java
@@ -0,0 +1,178 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.search.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.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.search.fluent.OperationsClient;
+import com.azure.resourcemanager.search.fluent.models.OperationInner;
+import com.azure.resourcemanager.search.models.OperationListResult;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in OperationsClient. */
+public final class OperationsClientImpl implements OperationsClient {
+ private final ClientLogger logger = new ClientLogger(OperationsClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final OperationsService service;
+
+ /** The service client containing this operation class. */
+ private final SearchManagementClientImpl client;
+
+ /**
+ * Initializes an instance of OperationsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ OperationsClientImpl(SearchManagementClientImpl client) {
+ this.service =
+ RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for SearchManagementClientOperations to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "SearchManagementClie")
+ private interface OperationsService {
+ @Headers({"Content-Type: application/json"})
+ @Get("/providers/Microsoft.Search/operations")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Lists all of the available REST API operations of the Microsoft.Search provider.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the result of the request to list REST API operations along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync() {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Lists all of the available REST API operations of the Microsoft.Search provider.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the result of the request to list REST API operations along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null));
+ }
+
+ /**
+ * Lists all of the available REST API operations of the Microsoft.Search provider.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the result of the request to list REST API operations as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(() -> listSinglePageAsync());
+ }
+
+ /**
+ * Lists all of the available REST API operations of the Microsoft.Search provider.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the result of the request to list REST API operations as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(Context context) {
+ return new PagedFlux<>(() -> listSinglePageAsync(context));
+ }
+
+ /**
+ * Lists all of the available REST API operations of the Microsoft.Search provider.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the result of the request to list REST API operations as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ return new PagedIterable<>(listAsync());
+ }
+
+ /**
+ * Lists all of the available REST API operations of the Microsoft.Search provider.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the result of the request to list REST API operations as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(Context context) {
+ return new PagedIterable<>(listAsync(context));
+ }
+}
diff --git a/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/OperationsImpl.java b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/OperationsImpl.java
new file mode 100644
index 000000000000..049907f3b6bc
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/OperationsImpl.java
@@ -0,0 +1,45 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.search.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.search.fluent.OperationsClient;
+import com.azure.resourcemanager.search.fluent.models.OperationInner;
+import com.azure.resourcemanager.search.models.Operation;
+import com.azure.resourcemanager.search.models.Operations;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class OperationsImpl implements Operations {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationsImpl.class);
+
+ private final OperationsClient innerClient;
+
+ private final com.azure.resourcemanager.search.SearchManager serviceManager;
+
+ public OperationsImpl(OperationsClient innerClient, com.azure.resourcemanager.search.SearchManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(Context context) {
+ PagedIterable inner = this.serviceClient().list(context);
+ return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager()));
+ }
+
+ private OperationsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.search.SearchManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/PrivateEndpointConnectionImpl.java b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/PrivateEndpointConnectionImpl.java
new file mode 100644
index 000000000000..9ae371671e57
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/PrivateEndpointConnectionImpl.java
@@ -0,0 +1,45 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.search.implementation;
+
+import com.azure.resourcemanager.search.fluent.models.PrivateEndpointConnectionInner;
+import com.azure.resourcemanager.search.models.PrivateEndpointConnection;
+import com.azure.resourcemanager.search.models.PrivateEndpointConnectionProperties;
+
+public final class PrivateEndpointConnectionImpl implements PrivateEndpointConnection {
+ private PrivateEndpointConnectionInner innerObject;
+
+ private final com.azure.resourcemanager.search.SearchManager serviceManager;
+
+ PrivateEndpointConnectionImpl(
+ PrivateEndpointConnectionInner innerObject, com.azure.resourcemanager.search.SearchManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public PrivateEndpointConnectionProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public PrivateEndpointConnectionInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.search.SearchManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/PrivateEndpointConnectionsClientImpl.java
new file mode 100644
index 000000000000..4769187e1789
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/PrivateEndpointConnectionsClientImpl.java
@@ -0,0 +1,1269 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.search.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.search.fluent.PrivateEndpointConnectionsClient;
+import com.azure.resourcemanager.search.fluent.models.PrivateEndpointConnectionInner;
+import com.azure.resourcemanager.search.models.PrivateEndpointConnectionListResult;
+import java.util.UUID;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. */
+public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpointConnectionsClient {
+ private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionsClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final PrivateEndpointConnectionsService service;
+
+ /** The service client containing this operation class. */
+ private final SearchManagementClientImpl client;
+
+ /**
+ * Initializes an instance of PrivateEndpointConnectionsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ PrivateEndpointConnectionsClientImpl(SearchManagementClientImpl client) {
+ this.service =
+ RestProxy
+ .create(
+ PrivateEndpointConnectionsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for SearchManagementClientPrivateEndpointConnections to be used by the
+ * proxy service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "SearchManagementClie")
+ private interface PrivateEndpointConnectionsService {
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search"
+ + "/searchServices/{searchServiceName}/privateEndpointConnections/{privateEndpointConnectionName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> update(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("searchServiceName") String searchServiceName,
+ @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName,
+ @HeaderParam("x-ms-client-request-id") UUID clientRequestId,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @BodyParam("application/json") PrivateEndpointConnectionInner privateEndpointConnection,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search"
+ + "/searchServices/{searchServiceName}/privateEndpointConnections/{privateEndpointConnectionName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("searchServiceName") String searchServiceName,
+ @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName,
+ @HeaderParam("x-ms-client-request-id") UUID clientRequestId,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search"
+ + "/searchServices/{searchServiceName}/privateEndpointConnections/{privateEndpointConnectionName}")
+ @ExpectedResponses({200, 404})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> delete(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("searchServiceName") String searchServiceName,
+ @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName,
+ @HeaderParam("x-ms-client-request-id") UUID clientRequestId,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search"
+ + "/searchServices/{searchServiceName}/privateEndpointConnections")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByService(
+ @HostParam("$host") String endpoint,
+ @HeaderParam("x-ms-client-request-id") UUID clientRequestId,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("searchServiceName") String searchServiceName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByServiceNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("x-ms-client-request-id") UUID clientRequestId,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Updates a Private Endpoint connection to the search service in the given resource group.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param privateEndpointConnectionName The name of the private endpoint connection to the Azure Cognitive Search
+ * service with the specified resource group.
+ * @param privateEndpointConnection The definition of the private endpoint connection to update.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return describes an existing Private Endpoint connection to the Azure Cognitive Search service along with {@link
+ * Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(
+ String resourceGroupName,
+ String searchServiceName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner privateEndpointConnection,
+ UUID clientRequestId) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (searchServiceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter searchServiceName is required and cannot be null."));
+ }
+ if (privateEndpointConnectionName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter privateEndpointConnectionName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (privateEndpointConnection == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter privateEndpointConnection is required and cannot be null."));
+ } else {
+ privateEndpointConnection.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .update(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ searchServiceName,
+ privateEndpointConnectionName,
+ clientRequestId,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ privateEndpointConnection,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Updates a Private Endpoint connection to the search service in the given resource group.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param privateEndpointConnectionName The name of the private endpoint connection to the Azure Cognitive Search
+ * service with the specified resource group.
+ * @param privateEndpointConnection The definition of the private endpoint connection to update.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @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 describes an existing Private Endpoint connection to the Azure Cognitive Search service along with {@link
+ * Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(
+ String resourceGroupName,
+ String searchServiceName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner privateEndpointConnection,
+ UUID clientRequestId,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (searchServiceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter searchServiceName is required and cannot be null."));
+ }
+ if (privateEndpointConnectionName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter privateEndpointConnectionName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (privateEndpointConnection == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter privateEndpointConnection is required and cannot be null."));
+ } else {
+ privateEndpointConnection.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .update(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ searchServiceName,
+ privateEndpointConnectionName,
+ clientRequestId,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ privateEndpointConnection,
+ accept,
+ context);
+ }
+
+ /**
+ * Updates a Private Endpoint connection to the search service in the given resource group.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param privateEndpointConnectionName The name of the private endpoint connection to the Azure Cognitive Search
+ * service with the specified resource group.
+ * @param privateEndpointConnection The definition of the private endpoint connection to update.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return describes an existing Private Endpoint connection to the Azure Cognitive Search service on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(
+ String resourceGroupName,
+ String searchServiceName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner privateEndpointConnection,
+ UUID clientRequestId) {
+ return updateWithResponseAsync(
+ resourceGroupName,
+ searchServiceName,
+ privateEndpointConnectionName,
+ privateEndpointConnection,
+ clientRequestId)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Updates a Private Endpoint connection to the search service in the given resource group.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param privateEndpointConnectionName The name of the private endpoint connection to the Azure Cognitive Search
+ * service with the specified resource group.
+ * @param privateEndpointConnection The definition of the private endpoint connection to update.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return describes an existing Private Endpoint connection to the Azure Cognitive Search service on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(
+ String resourceGroupName,
+ String searchServiceName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner privateEndpointConnection) {
+ final UUID clientRequestId = null;
+ return updateWithResponseAsync(
+ resourceGroupName,
+ searchServiceName,
+ privateEndpointConnectionName,
+ privateEndpointConnection,
+ clientRequestId)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Updates a Private Endpoint connection to the search service in the given resource group.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param privateEndpointConnectionName The name of the private endpoint connection to the Azure Cognitive Search
+ * service with the specified resource group.
+ * @param privateEndpointConnection The definition of the private endpoint connection to update.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return describes an existing Private Endpoint connection to the Azure Cognitive Search service.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public PrivateEndpointConnectionInner update(
+ String resourceGroupName,
+ String searchServiceName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner privateEndpointConnection) {
+ final UUID clientRequestId = null;
+ return updateAsync(
+ resourceGroupName,
+ searchServiceName,
+ privateEndpointConnectionName,
+ privateEndpointConnection,
+ clientRequestId)
+ .block();
+ }
+
+ /**
+ * Updates a Private Endpoint connection to the search service in the given resource group.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param privateEndpointConnectionName The name of the private endpoint connection to the Azure Cognitive Search
+ * service with the specified resource group.
+ * @param privateEndpointConnection The definition of the private endpoint connection to update.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @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 describes an existing Private Endpoint connection to the Azure Cognitive Search service along with {@link
+ * Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response updateWithResponse(
+ String resourceGroupName,
+ String searchServiceName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner privateEndpointConnection,
+ UUID clientRequestId,
+ Context context) {
+ return updateWithResponseAsync(
+ resourceGroupName,
+ searchServiceName,
+ privateEndpointConnectionName,
+ privateEndpointConnection,
+ clientRequestId,
+ context)
+ .block();
+ }
+
+ /**
+ * Gets the details of the private endpoint connection to the search service in the given resource group.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param privateEndpointConnectionName The name of the private endpoint connection to the Azure Cognitive Search
+ * service with the specified resource group.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the details of the private endpoint connection to the search service in the given resource group along
+ * with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName,
+ String searchServiceName,
+ String privateEndpointConnectionName,
+ UUID clientRequestId) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (searchServiceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter searchServiceName is required and cannot be null."));
+ }
+ if (privateEndpointConnectionName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter privateEndpointConnectionName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ searchServiceName,
+ privateEndpointConnectionName,
+ clientRequestId,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets the details of the private endpoint connection to the search service in the given resource group.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param privateEndpointConnectionName The name of the private endpoint connection to the Azure Cognitive Search
+ * service with the specified resource group.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @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 details of the private endpoint connection to the search service in the given resource group along
+ * with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName,
+ String searchServiceName,
+ String privateEndpointConnectionName,
+ UUID clientRequestId,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (searchServiceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter searchServiceName is required and cannot be null."));
+ }
+ if (privateEndpointConnectionName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter privateEndpointConnectionName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .get(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ searchServiceName,
+ privateEndpointConnectionName,
+ clientRequestId,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context);
+ }
+
+ /**
+ * Gets the details of the private endpoint connection to the search service in the given resource group.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param privateEndpointConnectionName The name of the private endpoint connection to the Azure Cognitive Search
+ * service with the specified resource group.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the details of the private endpoint connection to the search service in the given resource group on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(
+ String resourceGroupName,
+ String searchServiceName,
+ String privateEndpointConnectionName,
+ UUID clientRequestId) {
+ return getWithResponseAsync(
+ resourceGroupName, searchServiceName, privateEndpointConnectionName, clientRequestId)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Gets the details of the private endpoint connection to the search service in the given resource group.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param privateEndpointConnectionName The name of the private endpoint connection to the Azure Cognitive Search
+ * service with the specified resource group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the details of the private endpoint connection to the search service in the given resource group on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(
+ String resourceGroupName, String searchServiceName, String privateEndpointConnectionName) {
+ final UUID clientRequestId = null;
+ return getWithResponseAsync(
+ resourceGroupName, searchServiceName, privateEndpointConnectionName, clientRequestId)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Gets the details of the private endpoint connection to the search service in the given resource group.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param privateEndpointConnectionName The name of the private endpoint connection to the Azure Cognitive Search
+ * service with the specified resource group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the details of the private endpoint connection to the search service in the given resource group.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public PrivateEndpointConnectionInner get(
+ String resourceGroupName, String searchServiceName, String privateEndpointConnectionName) {
+ final UUID clientRequestId = null;
+ return getAsync(resourceGroupName, searchServiceName, privateEndpointConnectionName, clientRequestId).block();
+ }
+
+ /**
+ * Gets the details of the private endpoint connection to the search service in the given resource group.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param privateEndpointConnectionName The name of the private endpoint connection to the Azure Cognitive Search
+ * service with the specified resource group.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @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 details of the private endpoint connection to the search service in the given resource group along
+ * with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(
+ String resourceGroupName,
+ String searchServiceName,
+ String privateEndpointConnectionName,
+ UUID clientRequestId,
+ Context context) {
+ return getWithResponseAsync(
+ resourceGroupName, searchServiceName, privateEndpointConnectionName, clientRequestId, context)
+ .block();
+ }
+
+ /**
+ * Disconnects the private endpoint connection and deletes it from the search service.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param privateEndpointConnectionName The name of the private endpoint connection to the Azure Cognitive Search
+ * service with the specified resource group.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return describes an existing Private Endpoint connection to the Azure Cognitive Search service along with {@link
+ * Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> deleteWithResponseAsync(
+ String resourceGroupName,
+ String searchServiceName,
+ String privateEndpointConnectionName,
+ UUID clientRequestId) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (searchServiceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter searchServiceName is required and cannot be null."));
+ }
+ if (privateEndpointConnectionName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter privateEndpointConnectionName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .delete(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ searchServiceName,
+ privateEndpointConnectionName,
+ clientRequestId,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Disconnects the private endpoint connection and deletes it from the search service.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param privateEndpointConnectionName The name of the private endpoint connection to the Azure Cognitive Search
+ * service with the specified resource group.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @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 describes an existing Private Endpoint connection to the Azure Cognitive Search service along with {@link
+ * Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> deleteWithResponseAsync(
+ String resourceGroupName,
+ String searchServiceName,
+ String privateEndpointConnectionName,
+ UUID clientRequestId,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (searchServiceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter searchServiceName is required and cannot be null."));
+ }
+ if (privateEndpointConnectionName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter privateEndpointConnectionName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .delete(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ searchServiceName,
+ privateEndpointConnectionName,
+ clientRequestId,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context);
+ }
+
+ /**
+ * Disconnects the private endpoint connection and deletes it from the search service.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param privateEndpointConnectionName The name of the private endpoint connection to the Azure Cognitive Search
+ * service with the specified resource group.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return describes an existing Private Endpoint connection to the Azure Cognitive Search service on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(
+ String resourceGroupName,
+ String searchServiceName,
+ String privateEndpointConnectionName,
+ UUID clientRequestId) {
+ return deleteWithResponseAsync(
+ resourceGroupName, searchServiceName, privateEndpointConnectionName, clientRequestId)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Disconnects the private endpoint connection and deletes it from the search service.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param privateEndpointConnectionName The name of the private endpoint connection to the Azure Cognitive Search
+ * service with the specified resource group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return describes an existing Private Endpoint connection to the Azure Cognitive Search service on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(
+ String resourceGroupName, String searchServiceName, String privateEndpointConnectionName) {
+ final UUID clientRequestId = null;
+ return deleteWithResponseAsync(
+ resourceGroupName, searchServiceName, privateEndpointConnectionName, clientRequestId)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Disconnects the private endpoint connection and deletes it from the search service.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param privateEndpointConnectionName The name of the private endpoint connection to the Azure Cognitive Search
+ * service with the specified resource group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return describes an existing Private Endpoint connection to the Azure Cognitive Search service.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public PrivateEndpointConnectionInner delete(
+ String resourceGroupName, String searchServiceName, String privateEndpointConnectionName) {
+ final UUID clientRequestId = null;
+ return deleteAsync(resourceGroupName, searchServiceName, privateEndpointConnectionName, clientRequestId)
+ .block();
+ }
+
+ /**
+ * Disconnects the private endpoint connection and deletes it from the search service.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param privateEndpointConnectionName The name of the private endpoint connection to the Azure Cognitive Search
+ * service with the specified resource group.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @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 describes an existing Private Endpoint connection to the Azure Cognitive Search service along with {@link
+ * Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response deleteWithResponse(
+ String resourceGroupName,
+ String searchServiceName,
+ String privateEndpointConnectionName,
+ UUID clientRequestId,
+ Context context) {
+ return deleteWithResponseAsync(
+ resourceGroupName, searchServiceName, privateEndpointConnectionName, clientRequestId, context)
+ .block();
+ }
+
+ /**
+ * Gets a list of all private endpoint connections in the given service.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 all private endpoint connections in the given service along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByServiceSinglePageAsync(
+ String resourceGroupName, String searchServiceName, UUID clientRequestId) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (searchServiceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter searchServiceName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listByService(
+ this.client.getEndpoint(),
+ clientRequestId,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ searchServiceName,
+ 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()));
+ }
+
+ /**
+ * Gets a list of all private endpoint connections in the given service.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of all private endpoint connections in the given service along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByServiceSinglePageAsync(
+ String resourceGroupName, String searchServiceName, UUID clientRequestId, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (searchServiceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter searchServiceName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByService(
+ this.client.getEndpoint(),
+ clientRequestId,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ searchServiceName,
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Gets a list of all private endpoint connections in the given service.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 all private endpoint connections in the given service as paginated response with {@link
+ * PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByServiceAsync(
+ String resourceGroupName, String searchServiceName, UUID clientRequestId) {
+ return new PagedFlux<>(
+ () -> listByServiceSinglePageAsync(resourceGroupName, searchServiceName, clientRequestId),
+ nextLink -> listByServiceNextSinglePageAsync(nextLink, clientRequestId));
+ }
+
+ /**
+ * Gets a list of all private endpoint connections in the given service.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 all private endpoint connections in the given service as paginated response with {@link
+ * PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByServiceAsync(
+ String resourceGroupName, String searchServiceName) {
+ final UUID clientRequestId = null;
+ return new PagedFlux<>(
+ () -> listByServiceSinglePageAsync(resourceGroupName, searchServiceName, clientRequestId),
+ nextLink -> listByServiceNextSinglePageAsync(nextLink, clientRequestId));
+ }
+
+ /**
+ * Gets a list of all private endpoint connections in the given service.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of all private endpoint connections in the given service as paginated response with {@link
+ * PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByServiceAsync(
+ String resourceGroupName, String searchServiceName, UUID clientRequestId, Context context) {
+ return new PagedFlux<>(
+ () -> listByServiceSinglePageAsync(resourceGroupName, searchServiceName, clientRequestId, context),
+ nextLink -> listByServiceNextSinglePageAsync(nextLink, clientRequestId, context));
+ }
+
+ /**
+ * Gets a list of all private endpoint connections in the given service.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 all private endpoint connections in the given service as paginated response with {@link
+ * PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByService(
+ String resourceGroupName, String searchServiceName) {
+ final UUID clientRequestId = null;
+ return new PagedIterable<>(listByServiceAsync(resourceGroupName, searchServiceName, clientRequestId));
+ }
+
+ /**
+ * Gets a list of all private endpoint connections in the given service.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of all private endpoint connections in the given service as paginated response with {@link
+ * PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByService(
+ String resourceGroupName, String searchServiceName, UUID clientRequestId, Context context) {
+ return new PagedIterable<>(listByServiceAsync(resourceGroupName, searchServiceName, clientRequestId, context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return response containing a list of Private Endpoint connections along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByServiceNextSinglePageAsync(
+ String nextLink, UUID clientRequestId) {
+ 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.listByServiceNext(nextLink, this.client.getEndpoint(), clientRequestId, 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 clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @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 response containing a list of Private Endpoint connections along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByServiceNextSinglePageAsync(
+ String nextLink, UUID clientRequestId, 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
+ .listByServiceNext(nextLink, this.client.getEndpoint(), clientRequestId, accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+}
diff --git a/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/PrivateEndpointConnectionsImpl.java b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/PrivateEndpointConnectionsImpl.java
new file mode 100644
index 000000000000..06339e0a2d1a
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/PrivateEndpointConnectionsImpl.java
@@ -0,0 +1,162 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.search.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.search.fluent.PrivateEndpointConnectionsClient;
+import com.azure.resourcemanager.search.fluent.models.PrivateEndpointConnectionInner;
+import com.azure.resourcemanager.search.models.PrivateEndpointConnection;
+import com.azure.resourcemanager.search.models.PrivateEndpointConnections;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import java.util.UUID;
+
+public final class PrivateEndpointConnectionsImpl implements PrivateEndpointConnections {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionsImpl.class);
+
+ private final PrivateEndpointConnectionsClient innerClient;
+
+ private final com.azure.resourcemanager.search.SearchManager serviceManager;
+
+ public PrivateEndpointConnectionsImpl(
+ PrivateEndpointConnectionsClient innerClient, com.azure.resourcemanager.search.SearchManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PrivateEndpointConnection update(
+ String resourceGroupName,
+ String searchServiceName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner privateEndpointConnection) {
+ PrivateEndpointConnectionInner inner =
+ this
+ .serviceClient()
+ .update(resourceGroupName, searchServiceName, privateEndpointConnectionName, privateEndpointConnection);
+ if (inner != null) {
+ return new PrivateEndpointConnectionImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response updateWithResponse(
+ String resourceGroupName,
+ String searchServiceName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner privateEndpointConnection,
+ UUID clientRequestId,
+ Context context) {
+ Response inner =
+ this
+ .serviceClient()
+ .updateWithResponse(
+ resourceGroupName,
+ searchServiceName,
+ privateEndpointConnectionName,
+ privateEndpointConnection,
+ clientRequestId,
+ context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new PrivateEndpointConnectionImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public PrivateEndpointConnection get(
+ String resourceGroupName, String searchServiceName, String privateEndpointConnectionName) {
+ PrivateEndpointConnectionInner inner =
+ this.serviceClient().get(resourceGroupName, searchServiceName, privateEndpointConnectionName);
+ if (inner != null) {
+ return new PrivateEndpointConnectionImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getWithResponse(
+ String resourceGroupName,
+ String searchServiceName,
+ String privateEndpointConnectionName,
+ UUID clientRequestId,
+ Context context) {
+ Response inner =
+ this
+ .serviceClient()
+ .getWithResponse(
+ resourceGroupName, searchServiceName, privateEndpointConnectionName, clientRequestId, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new PrivateEndpointConnectionImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public PrivateEndpointConnection delete(
+ String resourceGroupName, String searchServiceName, String privateEndpointConnectionName) {
+ PrivateEndpointConnectionInner inner =
+ this.serviceClient().delete(resourceGroupName, searchServiceName, privateEndpointConnectionName);
+ if (inner != null) {
+ return new PrivateEndpointConnectionImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response deleteWithResponse(
+ String resourceGroupName,
+ String searchServiceName,
+ String privateEndpointConnectionName,
+ UUID clientRequestId,
+ Context context) {
+ Response inner =
+ this
+ .serviceClient()
+ .deleteWithResponse(
+ resourceGroupName, searchServiceName, privateEndpointConnectionName, clientRequestId, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new PrivateEndpointConnectionImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public PagedIterable listByService(String resourceGroupName, String searchServiceName) {
+ PagedIterable inner =
+ this.serviceClient().listByService(resourceGroupName, searchServiceName);
+ return Utils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByService(
+ String resourceGroupName, String searchServiceName, UUID clientRequestId, Context context) {
+ PagedIterable inner =
+ this.serviceClient().listByService(resourceGroupName, searchServiceName, clientRequestId, context);
+ return Utils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager()));
+ }
+
+ private PrivateEndpointConnectionsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.search.SearchManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/PrivateLinkResourceImpl.java b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/PrivateLinkResourceImpl.java
new file mode 100644
index 000000000000..c591bac9ffe3
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/PrivateLinkResourceImpl.java
@@ -0,0 +1,45 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.search.implementation;
+
+import com.azure.resourcemanager.search.fluent.models.PrivateLinkResourceInner;
+import com.azure.resourcemanager.search.models.PrivateLinkResource;
+import com.azure.resourcemanager.search.models.PrivateLinkResourceProperties;
+
+public final class PrivateLinkResourceImpl implements PrivateLinkResource {
+ private PrivateLinkResourceInner innerObject;
+
+ private final com.azure.resourcemanager.search.SearchManager serviceManager;
+
+ PrivateLinkResourceImpl(
+ PrivateLinkResourceInner innerObject, com.azure.resourcemanager.search.SearchManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public PrivateLinkResourceProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public PrivateLinkResourceInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.search.SearchManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/PrivateLinkResourcesClientImpl.java b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/PrivateLinkResourcesClientImpl.java
new file mode 100644
index 000000000000..cc8f21b82efc
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/PrivateLinkResourcesClientImpl.java
@@ -0,0 +1,302 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.search.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.search.fluent.PrivateLinkResourcesClient;
+import com.azure.resourcemanager.search.fluent.models.PrivateLinkResourceInner;
+import com.azure.resourcemanager.search.models.PrivateLinkResourcesResult;
+import java.util.UUID;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. */
+public final class PrivateLinkResourcesClientImpl implements PrivateLinkResourcesClient {
+ private final ClientLogger logger = new ClientLogger(PrivateLinkResourcesClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final PrivateLinkResourcesService service;
+
+ /** The service client containing this operation class. */
+ private final SearchManagementClientImpl client;
+
+ /**
+ * Initializes an instance of PrivateLinkResourcesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ PrivateLinkResourcesClientImpl(SearchManagementClientImpl client) {
+ this.service =
+ RestProxy
+ .create(PrivateLinkResourcesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for SearchManagementClientPrivateLinkResources to be used by the proxy
+ * service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "SearchManagementClie")
+ private interface PrivateLinkResourcesService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search"
+ + "/searchServices/{searchServiceName}/privateLinkResources")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listSupported(
+ @HostParam("$host") String endpoint,
+ @HeaderParam("x-ms-client-request-id") UUID clientRequestId,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("searchServiceName") String searchServiceName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Gets a list of all supported private link resource types for the given service.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 all supported private link resource types for the given service along with {@link
+ * PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSupportedSinglePageAsync(
+ String resourceGroupName, String searchServiceName, UUID clientRequestId) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (searchServiceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter searchServiceName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listSupported(
+ this.client.getEndpoint(),
+ clientRequestId,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ searchServiceName,
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets a list of all supported private link resource types for the given service.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of all supported private link resource types for the given service along with {@link
+ * PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSupportedSinglePageAsync(
+ String resourceGroupName, String searchServiceName, UUID clientRequestId, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (searchServiceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter searchServiceName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listSupported(
+ this.client.getEndpoint(),
+ clientRequestId,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ searchServiceName,
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null));
+ }
+
+ /**
+ * Gets a list of all supported private link resource types for the given service.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 all supported private link resource types for the given service as paginated response with
+ * {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listSupportedAsync(
+ String resourceGroupName, String searchServiceName, UUID clientRequestId) {
+ return new PagedFlux<>(
+ () -> listSupportedSinglePageAsync(resourceGroupName, searchServiceName, clientRequestId));
+ }
+
+ /**
+ * Gets a list of all supported private link resource types for the given service.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 all supported private link resource types for the given service as paginated response with
+ * {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listSupportedAsync(String resourceGroupName, String searchServiceName) {
+ final UUID clientRequestId = null;
+ return new PagedFlux<>(
+ () -> listSupportedSinglePageAsync(resourceGroupName, searchServiceName, clientRequestId));
+ }
+
+ /**
+ * Gets a list of all supported private link resource types for the given service.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of all supported private link resource types for the given service as paginated response with
+ * {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listSupportedAsync(
+ String resourceGroupName, String searchServiceName, UUID clientRequestId, Context context) {
+ return new PagedFlux<>(
+ () -> listSupportedSinglePageAsync(resourceGroupName, searchServiceName, clientRequestId, context));
+ }
+
+ /**
+ * Gets a list of all supported private link resource types for the given service.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 all supported private link resource types for the given service as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listSupported(String resourceGroupName, String searchServiceName) {
+ final UUID clientRequestId = null;
+ return new PagedIterable<>(listSupportedAsync(resourceGroupName, searchServiceName, clientRequestId));
+ }
+
+ /**
+ * Gets a list of all supported private link resource types for the given service.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of all supported private link resource types for the given service as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listSupported(
+ String resourceGroupName, String searchServiceName, UUID clientRequestId, Context context) {
+ return new PagedIterable<>(listSupportedAsync(resourceGroupName, searchServiceName, clientRequestId, context));
+ }
+}
diff --git a/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/PrivateLinkResourcesImpl.java b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/PrivateLinkResourcesImpl.java
new file mode 100644
index 000000000000..d0c5fca174bd
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/PrivateLinkResourcesImpl.java
@@ -0,0 +1,50 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.search.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.search.fluent.PrivateLinkResourcesClient;
+import com.azure.resourcemanager.search.fluent.models.PrivateLinkResourceInner;
+import com.azure.resourcemanager.search.models.PrivateLinkResource;
+import com.azure.resourcemanager.search.models.PrivateLinkResources;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import java.util.UUID;
+
+public final class PrivateLinkResourcesImpl implements PrivateLinkResources {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkResourcesImpl.class);
+
+ private final PrivateLinkResourcesClient innerClient;
+
+ private final com.azure.resourcemanager.search.SearchManager serviceManager;
+
+ public PrivateLinkResourcesImpl(
+ PrivateLinkResourcesClient innerClient, com.azure.resourcemanager.search.SearchManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable listSupported(String resourceGroupName, String searchServiceName) {
+ PagedIterable inner =
+ this.serviceClient().listSupported(resourceGroupName, searchServiceName);
+ return Utils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listSupported(
+ String resourceGroupName, String searchServiceName, UUID clientRequestId, Context context) {
+ PagedIterable inner =
+ this.serviceClient().listSupported(resourceGroupName, searchServiceName, clientRequestId, context);
+ return Utils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager()));
+ }
+
+ private PrivateLinkResourcesClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.search.SearchManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/QueryKeyImpl.java b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/QueryKeyImpl.java
new file mode 100644
index 000000000000..62ab2b4f493f
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/QueryKeyImpl.java
@@ -0,0 +1,35 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.search.implementation;
+
+import com.azure.resourcemanager.search.fluent.models.QueryKeyInner;
+import com.azure.resourcemanager.search.models.QueryKey;
+
+public final class QueryKeyImpl implements QueryKey {
+ private QueryKeyInner innerObject;
+
+ private final com.azure.resourcemanager.search.SearchManager serviceManager;
+
+ QueryKeyImpl(QueryKeyInner innerObject, com.azure.resourcemanager.search.SearchManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String key() {
+ return this.innerModel().key();
+ }
+
+ public QueryKeyInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.search.SearchManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/QueryKeysClientImpl.java b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/QueryKeysClientImpl.java
new file mode 100644
index 000000000000..209541fae09d
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/QueryKeysClientImpl.java
@@ -0,0 +1,867 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.search.implementation;
+
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Post;
+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.search.fluent.QueryKeysClient;
+import com.azure.resourcemanager.search.fluent.models.QueryKeyInner;
+import com.azure.resourcemanager.search.models.ListQueryKeysResult;
+import java.util.UUID;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in QueryKeysClient. */
+public final class QueryKeysClientImpl implements QueryKeysClient {
+ private final ClientLogger logger = new ClientLogger(QueryKeysClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final QueryKeysService service;
+
+ /** The service client containing this operation class. */
+ private final SearchManagementClientImpl client;
+
+ /**
+ * Initializes an instance of QueryKeysClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ QueryKeysClientImpl(SearchManagementClientImpl client) {
+ this.service =
+ RestProxy.create(QueryKeysService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for SearchManagementClientQueryKeys to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "SearchManagementClie")
+ private interface QueryKeysService {
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search"
+ + "/searchServices/{searchServiceName}/createQueryKey/{name}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> create(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("searchServiceName") String searchServiceName,
+ @PathParam("name") String name,
+ @HeaderParam("x-ms-client-request-id") UUID clientRequestId,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search"
+ + "/searchServices/{searchServiceName}/listQueryKeys")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listBySearchService(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("searchServiceName") String searchServiceName,
+ @HeaderParam("x-ms-client-request-id") UUID clientRequestId,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search"
+ + "/searchServices/{searchServiceName}/deleteQueryKey/{key}")
+ @ExpectedResponses({200, 204, 404})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> delete(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("searchServiceName") String searchServiceName,
+ @PathParam("key") String key,
+ @HeaderParam("x-ms-client-request-id") UUID clientRequestId,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listBySearchServiceNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("x-ms-client-request-id") UUID clientRequestId,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Generates a new query key for the specified search service. You can create up to 50 query keys per service.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param name The name of the new query API key.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return describes an API key for a given Azure Cognitive Search service that has permissions for query operations
+ * only along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createWithResponseAsync(
+ String resourceGroupName, String searchServiceName, String name, UUID clientRequestId) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (searchServiceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter searchServiceName is required and cannot be null."));
+ }
+ if (name == null) {
+ return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .create(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ searchServiceName,
+ name,
+ clientRequestId,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Generates a new query key for the specified search service. You can create up to 50 query keys per service.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param name The name of the new query API key.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @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 describes an API key for a given Azure Cognitive Search service that has permissions for query operations
+ * only along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createWithResponseAsync(
+ String resourceGroupName, String searchServiceName, String name, UUID clientRequestId, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (searchServiceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter searchServiceName is required and cannot be null."));
+ }
+ if (name == null) {
+ return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .create(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ searchServiceName,
+ name,
+ clientRequestId,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context);
+ }
+
+ /**
+ * Generates a new query key for the specified search service. You can create up to 50 query keys per service.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param name The name of the new query API key.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return describes an API key for a given Azure Cognitive Search service that has permissions for query operations
+ * only on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAsync(
+ String resourceGroupName, String searchServiceName, String name, UUID clientRequestId) {
+ return createWithResponseAsync(resourceGroupName, searchServiceName, name, clientRequestId)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Generates a new query key for the specified search service. You can create up to 50 query keys per service.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param name The name of the new query API key.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return describes an API key for a given Azure Cognitive Search service that has permissions for query operations
+ * only on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAsync(String resourceGroupName, String searchServiceName, String name) {
+ final UUID clientRequestId = null;
+ return createWithResponseAsync(resourceGroupName, searchServiceName, name, clientRequestId)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Generates a new query key for the specified search service. You can create up to 50 query keys per service.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param name The name of the new query API key.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return describes an API key for a given Azure Cognitive Search service that has permissions for query operations
+ * only.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public QueryKeyInner create(String resourceGroupName, String searchServiceName, String name) {
+ final UUID clientRequestId = null;
+ return createAsync(resourceGroupName, searchServiceName, name, clientRequestId).block();
+ }
+
+ /**
+ * Generates a new query key for the specified search service. You can create up to 50 query keys per service.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param name The name of the new query API key.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @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 describes an API key for a given Azure Cognitive Search service that has permissions for query operations
+ * only along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response createWithResponse(
+ String resourceGroupName, String searchServiceName, String name, UUID clientRequestId, Context context) {
+ return createWithResponseAsync(resourceGroupName, searchServiceName, name, clientRequestId, context).block();
+ }
+
+ /**
+ * Returns the list of query API keys for the given Azure Cognitive Search service.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return response containing the query API keys for a given Azure Cognitive Search service along with {@link
+ * PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySearchServiceSinglePageAsync(
+ String resourceGroupName, String searchServiceName, UUID clientRequestId) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (searchServiceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter searchServiceName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listBySearchService(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ searchServiceName,
+ clientRequestId,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Returns the list of query API keys for the given Azure Cognitive Search service.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @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 response containing the query API keys for a given Azure Cognitive Search service along with {@link
+ * PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySearchServiceSinglePageAsync(
+ String resourceGroupName, String searchServiceName, UUID clientRequestId, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (searchServiceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter searchServiceName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listBySearchService(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ searchServiceName,
+ clientRequestId,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Returns the list of query API keys for the given Azure Cognitive Search service.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return response containing the query API keys for a given Azure Cognitive Search service as paginated response
+ * with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listBySearchServiceAsync(
+ String resourceGroupName, String searchServiceName, UUID clientRequestId) {
+ return new PagedFlux<>(
+ () -> listBySearchServiceSinglePageAsync(resourceGroupName, searchServiceName, clientRequestId),
+ nextLink -> listBySearchServiceNextSinglePageAsync(nextLink, clientRequestId));
+ }
+
+ /**
+ * Returns the list of query API keys for the given Azure Cognitive Search service.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return response containing the query API keys for a given Azure Cognitive Search service as paginated response
+ * with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listBySearchServiceAsync(String resourceGroupName, String searchServiceName) {
+ final UUID clientRequestId = null;
+ return new PagedFlux<>(
+ () -> listBySearchServiceSinglePageAsync(resourceGroupName, searchServiceName, clientRequestId),
+ nextLink -> listBySearchServiceNextSinglePageAsync(nextLink, clientRequestId));
+ }
+
+ /**
+ * Returns the list of query API keys for the given Azure Cognitive Search service.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @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 response containing the query API keys for a given Azure Cognitive Search service as paginated response
+ * with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listBySearchServiceAsync(
+ String resourceGroupName, String searchServiceName, UUID clientRequestId, Context context) {
+ return new PagedFlux<>(
+ () -> listBySearchServiceSinglePageAsync(resourceGroupName, searchServiceName, clientRequestId, context),
+ nextLink -> listBySearchServiceNextSinglePageAsync(nextLink, clientRequestId, context));
+ }
+
+ /**
+ * Returns the list of query API keys for the given Azure Cognitive Search service.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return response containing the query API keys for a given Azure Cognitive Search service as paginated response
+ * with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listBySearchService(String resourceGroupName, String searchServiceName) {
+ final UUID clientRequestId = null;
+ return new PagedIterable<>(listBySearchServiceAsync(resourceGroupName, searchServiceName, clientRequestId));
+ }
+
+ /**
+ * Returns the list of query API keys for the given Azure Cognitive Search service.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @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 response containing the query API keys for a given Azure Cognitive Search service as paginated response
+ * with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listBySearchService(
+ String resourceGroupName, String searchServiceName, UUID clientRequestId, Context context) {
+ return new PagedIterable<>(
+ listBySearchServiceAsync(resourceGroupName, searchServiceName, clientRequestId, context));
+ }
+
+ /**
+ * Deletes the specified query key. Unlike admin keys, query keys are not regenerated. The process for regenerating
+ * a query key is to delete and then recreate it.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param key The query key to be deleted. Query keys are identified by value, not by name.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> deleteWithResponseAsync(
+ String resourceGroupName, String searchServiceName, String key, UUID clientRequestId) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (searchServiceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter searchServiceName is required and cannot be null."));
+ }
+ if (key == null) {
+ return Mono.error(new IllegalArgumentException("Parameter key is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .delete(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ searchServiceName,
+ key,
+ clientRequestId,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Deletes the specified query key. Unlike admin keys, query keys are not regenerated. The process for regenerating
+ * a query key is to delete and then recreate it.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param key The query key to be deleted. Query keys are identified by value, not by name.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> deleteWithResponseAsync(
+ String resourceGroupName, String searchServiceName, String key, UUID clientRequestId, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (searchServiceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter searchServiceName is required and cannot be null."));
+ }
+ if (key == null) {
+ return Mono.error(new IllegalArgumentException("Parameter key is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .delete(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ searchServiceName,
+ key,
+ clientRequestId,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context);
+ }
+
+ /**
+ * Deletes the specified query key. Unlike admin keys, query keys are not regenerated. The process for regenerating
+ * a query key is to delete and then recreate it.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param key The query key to be deleted. Query keys are identified by value, not by name.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(
+ String resourceGroupName, String searchServiceName, String key, UUID clientRequestId) {
+ return deleteWithResponseAsync(resourceGroupName, searchServiceName, key, clientRequestId)
+ .flatMap((Response res) -> Mono.empty());
+ }
+
+ /**
+ * Deletes the specified query key. Unlike admin keys, query keys are not regenerated. The process for regenerating
+ * a query key is to delete and then recreate it.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param key The query key to be deleted. Query keys are identified by value, not by name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String searchServiceName, String key) {
+ final UUID clientRequestId = null;
+ return deleteWithResponseAsync(resourceGroupName, searchServiceName, key, clientRequestId)
+ .flatMap((Response res) -> Mono.empty());
+ }
+
+ /**
+ * Deletes the specified query key. Unlike admin keys, query keys are not regenerated. The process for regenerating
+ * a query key is to delete and then recreate it.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param key The query key to be deleted. Query keys are identified by value, not by name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String searchServiceName, String key) {
+ final UUID clientRequestId = null;
+ deleteAsync(resourceGroupName, searchServiceName, key, clientRequestId).block();
+ }
+
+ /**
+ * Deletes the specified query key. Unlike admin keys, query keys are not regenerated. The process for regenerating
+ * a query key is to delete and then recreate it.
+ *
+ * @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
+ * value from the Azure Resource Manager API or the portal.
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the specified resource
+ * group.
+ * @param key The query key to be deleted. Query keys are identified by value, not by name.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response deleteWithResponse(
+ String resourceGroupName, String searchServiceName, String key, UUID clientRequestId, Context context) {
+ return deleteWithResponseAsync(resourceGroupName, searchServiceName, key, clientRequestId, context).block();
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @param clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return response containing the query API keys for a given Azure Cognitive Search service along with {@link
+ * PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySearchServiceNextSinglePageAsync(
+ String nextLink, UUID clientRequestId) {
+ 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
+ .listBySearchServiceNext(nextLink, this.client.getEndpoint(), clientRequestId, 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 clientRequestId A client-generated GUID value that identifies this request. If specified, this will be
+ * included in response information as a way to track the request.
+ * @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 response containing the query API keys for a given Azure Cognitive Search service along with {@link
+ * PagedResponse} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySearchServiceNextSinglePageAsync(
+ String nextLink, UUID clientRequestId, 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
+ .listBySearchServiceNext(nextLink, this.client.getEndpoint(), clientRequestId, accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+}
diff --git a/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/QueryKeysImpl.java b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/QueryKeysImpl.java
new file mode 100644
index 000000000000..6800538bf9a7
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/QueryKeysImpl.java
@@ -0,0 +1,88 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.search.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.search.fluent.QueryKeysClient;
+import com.azure.resourcemanager.search.fluent.models.QueryKeyInner;
+import com.azure.resourcemanager.search.models.QueryKey;
+import com.azure.resourcemanager.search.models.QueryKeys;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import java.util.UUID;
+
+public final class QueryKeysImpl implements QueryKeys {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(QueryKeysImpl.class);
+
+ private final QueryKeysClient innerClient;
+
+ private final com.azure.resourcemanager.search.SearchManager serviceManager;
+
+ public QueryKeysImpl(QueryKeysClient innerClient, com.azure.resourcemanager.search.SearchManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public QueryKey create(String resourceGroupName, String searchServiceName, String name) {
+ QueryKeyInner inner = this.serviceClient().create(resourceGroupName, searchServiceName, name);
+ if (inner != null) {
+ return new QueryKeyImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response createWithResponse(
+ String resourceGroupName, String searchServiceName, String name, UUID clientRequestId, Context context) {
+ Response inner =
+ this
+ .serviceClient()
+ .createWithResponse(resourceGroupName, searchServiceName, name, clientRequestId, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new QueryKeyImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public PagedIterable listBySearchService(String resourceGroupName, String searchServiceName) {
+ PagedIterable inner =
+ this.serviceClient().listBySearchService(resourceGroupName, searchServiceName);
+ return Utils.mapPage(inner, inner1 -> new QueryKeyImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listBySearchService(
+ String resourceGroupName, String searchServiceName, UUID clientRequestId, Context context) {
+ PagedIterable inner =
+ this.serviceClient().listBySearchService(resourceGroupName, searchServiceName, clientRequestId, context);
+ return Utils.mapPage(inner, inner1 -> new QueryKeyImpl(inner1, this.manager()));
+ }
+
+ public void delete(String resourceGroupName, String searchServiceName, String key) {
+ this.serviceClient().delete(resourceGroupName, searchServiceName, key);
+ }
+
+ public Response deleteWithResponse(
+ String resourceGroupName, String searchServiceName, String key, UUID clientRequestId, Context context) {
+ return this
+ .serviceClient()
+ .deleteWithResponse(resourceGroupName, searchServiceName, key, clientRequestId, context);
+ }
+
+ private QueryKeysClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.search.SearchManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/SearchManagementClientBuilder.java b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/SearchManagementClientBuilder.java
new file mode 100644
index 000000000000..f29f04fe5e17
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/SearchManagementClientBuilder.java
@@ -0,0 +1,148 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.search.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 SearchManagementClientImpl type. */
+@ServiceClientBuilder(serviceClients = {SearchManagementClientImpl.class})
+public final class SearchManagementClientBuilder {
+ /*
+ * The unique identifier for a Microsoft Azure subscription. You can obtain
+ * this value from the Azure Resource Manager API or the portal.
+ */
+ private String subscriptionId;
+
+ /**
+ * Sets The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource
+ * Manager API or the portal.
+ *
+ * @param subscriptionId the subscriptionId value.
+ * @return the SearchManagementClientBuilder.
+ */
+ public SearchManagementClientBuilder subscriptionId(String subscriptionId) {
+ this.subscriptionId = subscriptionId;
+ return this;
+ }
+
+ /*
+ * server parameter
+ */
+ private String endpoint;
+
+ /**
+ * Sets server parameter.
+ *
+ * @param endpoint the endpoint value.
+ * @return the SearchManagementClientBuilder.
+ */
+ public SearchManagementClientBuilder 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 SearchManagementClientBuilder.
+ */
+ public SearchManagementClientBuilder 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 SearchManagementClientBuilder.
+ */
+ public SearchManagementClientBuilder 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 SearchManagementClientBuilder.
+ */
+ public SearchManagementClientBuilder 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 SearchManagementClientBuilder.
+ */
+ public SearchManagementClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) {
+ this.serializerAdapter = serializerAdapter;
+ return this;
+ }
+
+ /**
+ * Builds an instance of SearchManagementClientImpl with the provided parameters.
+ *
+ * @return an instance of SearchManagementClientImpl.
+ */
+ public SearchManagementClientImpl 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();
+ }
+ SearchManagementClientImpl client =
+ new SearchManagementClientImpl(
+ pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint);
+ return client;
+ }
+}
diff --git a/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/SearchManagementClientImpl.java b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/SearchManagementClientImpl.java
new file mode 100644
index 000000000000..9d02df9d47dd
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/SearchManagementClientImpl.java
@@ -0,0 +1,382 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.search.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.search.fluent.AdminKeysClient;
+import com.azure.resourcemanager.search.fluent.OperationsClient;
+import com.azure.resourcemanager.search.fluent.PrivateEndpointConnectionsClient;
+import com.azure.resourcemanager.search.fluent.PrivateLinkResourcesClient;
+import com.azure.resourcemanager.search.fluent.QueryKeysClient;
+import com.azure.resourcemanager.search.fluent.SearchManagementClient;
+import com.azure.resourcemanager.search.fluent.ServicesClient;
+import com.azure.resourcemanager.search.fluent.SharedPrivateLinkResourcesClient;
+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 SearchManagementClientImpl type. */
+@ServiceClient(builder = SearchManagementClientBuilder.class)
+public final class SearchManagementClientImpl implements SearchManagementClient {
+ private final ClientLogger logger = new ClientLogger(SearchManagementClientImpl.class);
+
+ /**
+ * The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource
+ * Manager API or the portal.
+ */
+ private final String subscriptionId;
+
+ /**
+ * Gets The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource
+ * Manager API or the portal.
+ *
+ * @return the subscriptionId value.
+ */
+ public String getSubscriptionId() {
+ return this.subscriptionId;
+ }
+
+ /** server parameter. */
+ private final String endpoint;
+
+ /**
+ * Gets server parameter.
+ *
+ * @return the endpoint value.
+ */
+ public String getEndpoint() {
+ return this.endpoint;
+ }
+
+ /** Api Version. */
+ private final String apiVersion;
+
+ /**
+ * Gets Api Version.
+ *
+ * @return the apiVersion value.
+ */
+ public String getApiVersion() {
+ return this.apiVersion;
+ }
+
+ /** The HTTP pipeline to send requests through. */
+ private final HttpPipeline httpPipeline;
+
+ /**
+ * Gets The HTTP pipeline to send requests through.
+ *
+ * @return the httpPipeline value.
+ */
+ public HttpPipeline getHttpPipeline() {
+ return this.httpPipeline;
+ }
+
+ /** The serializer to serialize an object into a string. */
+ private final SerializerAdapter serializerAdapter;
+
+ /**
+ * Gets The serializer to serialize an object into a string.
+ *
+ * @return the serializerAdapter value.
+ */
+ SerializerAdapter getSerializerAdapter() {
+ return this.serializerAdapter;
+ }
+
+ /** The default poll interval for long-running operation. */
+ private final Duration defaultPollInterval;
+
+ /**
+ * Gets The default poll interval for long-running operation.
+ *
+ * @return the defaultPollInterval value.
+ */
+ public Duration getDefaultPollInterval() {
+ return this.defaultPollInterval;
+ }
+
+ /** The 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 AdminKeysClient object to access its operations. */
+ private final AdminKeysClient adminKeys;
+
+ /**
+ * Gets the AdminKeysClient object to access its operations.
+ *
+ * @return the AdminKeysClient object.
+ */
+ public AdminKeysClient getAdminKeys() {
+ return this.adminKeys;
+ }
+
+ /** The QueryKeysClient object to access its operations. */
+ private final QueryKeysClient queryKeys;
+
+ /**
+ * Gets the QueryKeysClient object to access its operations.
+ *
+ * @return the QueryKeysClient object.
+ */
+ public QueryKeysClient getQueryKeys() {
+ return this.queryKeys;
+ }
+
+ /** The ServicesClient object to access its operations. */
+ private final ServicesClient services;
+
+ /**
+ * Gets the ServicesClient object to access its operations.
+ *
+ * @return the ServicesClient object.
+ */
+ public ServicesClient getServices() {
+ return this.services;
+ }
+
+ /** The PrivateLinkResourcesClient object to access its operations. */
+ private final PrivateLinkResourcesClient privateLinkResources;
+
+ /**
+ * Gets the PrivateLinkResourcesClient object to access its operations.
+ *
+ * @return the PrivateLinkResourcesClient object.
+ */
+ public PrivateLinkResourcesClient getPrivateLinkResources() {
+ return this.privateLinkResources;
+ }
+
+ /** The PrivateEndpointConnectionsClient object to access its operations. */
+ private final PrivateEndpointConnectionsClient privateEndpointConnections;
+
+ /**
+ * Gets the PrivateEndpointConnectionsClient object to access its operations.
+ *
+ * @return the PrivateEndpointConnectionsClient object.
+ */
+ public PrivateEndpointConnectionsClient getPrivateEndpointConnections() {
+ return this.privateEndpointConnections;
+ }
+
+ /** The SharedPrivateLinkResourcesClient object to access its operations. */
+ private final SharedPrivateLinkResourcesClient sharedPrivateLinkResources;
+
+ /**
+ * Gets the SharedPrivateLinkResourcesClient object to access its operations.
+ *
+ * @return the SharedPrivateLinkResourcesClient object.
+ */
+ public SharedPrivateLinkResourcesClient getSharedPrivateLinkResources() {
+ return this.sharedPrivateLinkResources;
+ }
+
+ /**
+ * Initializes an instance of SearchManagementClient client.
+ *
+ * @param httpPipeline The HTTP pipeline to send requests through.
+ * @param serializerAdapter The serializer to serialize an object into a string.
+ * @param defaultPollInterval The default poll interval for long-running operation.
+ * @param environment The Azure environment.
+ * @param subscriptionId The unique identifier for a Microsoft Azure subscription. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param endpoint server parameter.
+ */
+ SearchManagementClientImpl(
+ HttpPipeline httpPipeline,
+ SerializerAdapter serializerAdapter,
+ Duration defaultPollInterval,
+ AzureEnvironment environment,
+ String subscriptionId,
+ String endpoint) {
+ this.httpPipeline = httpPipeline;
+ this.serializerAdapter = serializerAdapter;
+ this.defaultPollInterval = defaultPollInterval;
+ this.subscriptionId = subscriptionId;
+ this.endpoint = endpoint;
+ this.apiVersion = "2020-08-01";
+ this.operations = new OperationsClientImpl(this);
+ this.adminKeys = new AdminKeysClientImpl(this);
+ this.queryKeys = new QueryKeysClientImpl(this);
+ this.services = new ServicesClientImpl(this);
+ this.privateLinkResources = new PrivateLinkResourcesClientImpl(this);
+ this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this);
+ this.sharedPrivateLinkResources = new SharedPrivateLinkResourcesClientImpl(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