scopes = new ArrayList<>();
+ private RetryPolicy retryPolicy;
+ private RetryOptions retryOptions;
+ private Duration defaultPollInterval;
+
+ private Configurable() {
+ }
+
+ /**
+ * Sets the http client.
+ *
+ * @param httpClient the HTTP client.
+ * @return the configurable object itself.
+ */
+ public Configurable withHttpClient(HttpClient httpClient) {
+ this.httpClient = Objects.requireNonNull(httpClient, "'httpClient' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Sets the logging options to the HTTP pipeline.
+ *
+ * @param httpLogOptions the HTTP log options.
+ * @return the configurable object itself.
+ */
+ public Configurable withLogOptions(HttpLogOptions httpLogOptions) {
+ this.httpLogOptions = Objects.requireNonNull(httpLogOptions, "'httpLogOptions' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Adds the pipeline policy to the HTTP pipeline.
+ *
+ * @param policy the HTTP pipeline policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withPolicy(HttpPipelinePolicy policy) {
+ this.policies.add(Objects.requireNonNull(policy, "'policy' cannot be null."));
+ return this;
+ }
+
+ /**
+ * Adds the scope to permission sets.
+ *
+ * @param scope the scope.
+ * @return the configurable object itself.
+ */
+ public Configurable withScope(String scope) {
+ this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null."));
+ return this;
+ }
+
+ /**
+ * Sets the retry policy to the HTTP pipeline.
+ *
+ * @param retryPolicy the HTTP pipeline retry policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
+ this.retryPolicy = Objects.requireNonNull(retryPolicy, "'retryPolicy' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Sets the retry options for the HTTP pipeline retry policy.
+ *
+ * This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}.
+ *
+ * @param retryOptions the retry options for the HTTP pipeline retry policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withRetryOptions(RetryOptions retryOptions) {
+ this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Sets the default poll interval, used when service does not provide "Retry-After" header.
+ *
+ * @param defaultPollInterval the default poll interval.
+ * @return the configurable object itself.
+ */
+ public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
+ this.defaultPollInterval =
+ Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
+ if (this.defaultPollInterval.isNegative()) {
+ throw LOGGER
+ .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative"));
+ }
+ return this;
+ }
+
+ /**
+ * Creates an instance of 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) {
+ if (retryOptions != null) {
+ retryPolicy = new RetryPolicy(retryOptions);
+ } else {
+ retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ }
+ }
+ List policies = new ArrayList<>();
+ policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
+ policies.add(new AddHeadersFromContextPolicy());
+ policies.add(new RequestIdPolicy());
+ policies
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
+ .collect(Collectors.toList()));
+ HttpPolicyProviders.addBeforeRetryPolicies(policies);
+ policies.add(retryPolicy);
+ policies.add(new AddDatePolicy());
+ policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
+ policies
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
+ .collect(Collectors.toList()));
+ HttpPolicyProviders.addAfterRetryPolicies(policies);
+ policies.add(new HttpLoggingPolicy(httpLogOptions));
+ HttpPipeline httpPipeline =
+ new HttpPipelineBuilder()
+ .httpClient(httpClient)
+ .policies(policies.toArray(new HttpPipelinePolicy[0]))
+ .build();
+ return new SearchManager(httpPipeline, profile, defaultPollInterval);
+ }
+ }
+
+ /**
+ * Gets the resource collection API of Operations.
+ *
+ * @return Resource collection API of Operations.
+ */
+ public Operations operations() {
+ if (this.operations == null) {
+ this.operations = new OperationsImpl(clientObject.getOperations(), this);
+ }
+ return operations;
+ }
+
+ /**
+ * Gets the resource collection API of AdminKeys.
+ *
+ * @return Resource collection API of AdminKeys.
+ */
+ public AdminKeys adminKeys() {
+ if (this.adminKeys == null) {
+ this.adminKeys = new AdminKeysImpl(clientObject.getAdminKeys(), this);
+ }
+ return adminKeys;
+ }
+
+ /**
+ * Gets the resource collection API of QueryKeys.
+ *
+ * @return Resource collection API of QueryKeys.
+ */
+ public QueryKeys queryKeys() {
+ if (this.queryKeys == null) {
+ this.queryKeys = new QueryKeysImpl(clientObject.getQueryKeys(), this);
+ }
+ return queryKeys;
+ }
+
+ /**
+ * Gets the resource collection API of Services. It manages SearchService.
+ *
+ * @return Resource collection API of Services.
+ */
+ public Services services() {
+ if (this.services == null) {
+ this.services = new ServicesImpl(clientObject.getServices(), this);
+ }
+ return services;
+ }
+
+ /**
+ * Gets the resource collection API of PrivateLinkResources.
+ *
+ * @return Resource collection API of PrivateLinkResources.
+ */
+ public PrivateLinkResources privateLinkResources() {
+ if (this.privateLinkResources == null) {
+ this.privateLinkResources = new PrivateLinkResourcesImpl(clientObject.getPrivateLinkResources(), this);
+ }
+ return privateLinkResources;
+ }
+
+ /**
+ * Gets the resource collection API of PrivateEndpointConnections.
+ *
+ * @return Resource collection API of PrivateEndpointConnections.
+ */
+ public PrivateEndpointConnections privateEndpointConnections() {
+ if (this.privateEndpointConnections == null) {
+ this.privateEndpointConnections =
+ new PrivateEndpointConnectionsImpl(clientObject.getPrivateEndpointConnections(), this);
+ }
+ return privateEndpointConnections;
+ }
+
+ /**
+ * Gets the resource collection API of SharedPrivateLinkResources. It manages SharedPrivateLinkResource.
+ *
+ * @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..e549b68484c8
--- /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.
+ * @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);
+
+ /**
+ * 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);
+
+ /**
+ * 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);
+
+ /**
+ * 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);
+}
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..331f2a6dee40
--- /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.
+ * @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);
+
+ /**
+ * 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);
+
+ /**
+ * 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);
+
+ /**
+ * 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);
+
+ /**
+ * 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);
+
+ /**
+ * 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);
+
+ /**
+ * 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..d9d2b7ebb40a
--- /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.
+ * @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);
+
+ /**
+ * 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);
+
+ /**
+ * 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.
+ * @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);
+
+ /**
+ * 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);
+}
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..0a38df9dae08
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/ServicesClient.java
@@ -0,0 +1,310 @@
+// 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.
+ * @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);
+
+ /**
+ * 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.
+ * @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.
+ * @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);
+
+ /**
+ * 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);
+
+ /**
+ * 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);
+
+ /**
+ * 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);
+
+ /**
+ * 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);
+
+ /**
+ * 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);
+
+ /**
+ * 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.
+ * @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);
+
+ /**
+ * 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);
+}
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..eac2752212b3
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/SharedPrivateLinkResourcesClient.java
@@ -0,0 +1,286 @@
+// 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.
+ * @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);
+
+ /**
+ * 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.
+ * @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.
+ * @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);
+
+ /**
+ * 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);
+
+ /**
+ * 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.
+ * @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);
+
+ /**
+ * 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.
+ * @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..05fb8c516123
--- /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.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 {
+ /*
+ * 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;
+
+ /** Creates an instance of AdminKeyResultInner class. */
+ public AdminKeyResultInner() {
+ }
+
+ /**
+ * 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..ba055b9b4fab
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/models/CheckNameAvailabilityOutputInner.java
@@ -0,0 +1,76 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.search.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.resourcemanager.search.models.UnavailableNameReason;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Output of check name availability API. */
+@Immutable
+public final class CheckNameAvailabilityOutputInner {
+ /*
+ * 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;
+
+ /** Creates an instance of CheckNameAvailabilityOutputInner class. */
+ public CheckNameAvailabilityOutputInner() {
+ }
+
+ /**
+ * 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..6c08de0d1a10
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/models/OperationInner.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.Immutable;
+import com.azure.resourcemanager.search.models.OperationDisplay;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Describes a REST API operation. */
+@Immutable
+public final class OperationInner {
+ /*
+ * 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;
+
+ /** Creates an instance of OperationInner class. */
+ public OperationInner() {
+ }
+
+ /**
+ * 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..0a8aa97416b8
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/models/PrivateEndpointConnectionInner.java
@@ -0,0 +1,57 @@
+// 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.resourcemanager.search.models.PrivateEndpointConnectionProperties;
+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 {
+ /*
+ * Describes the properties of an existing Private Endpoint connection to the Azure Cognitive Search service.
+ */
+ @JsonProperty(value = "properties")
+ private PrivateEndpointConnectionProperties properties;
+
+ /** Creates an instance of PrivateEndpointConnectionInner class. */
+ public PrivateEndpointConnectionInner() {
+ }
+
+ /**
+ * 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..34553a274cb2
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/models/PrivateLinkResourceInner.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.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.management.ProxyResource;
+import com.azure.resourcemanager.search.models.PrivateLinkResourceProperties;
+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 {
+ /*
+ * 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;
+
+ /** Creates an instance of PrivateLinkResourceInner class. */
+ public PrivateLinkResourceInner() {
+ }
+
+ /**
+ * 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..7d57ab11056b
--- /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.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 {
+ /*
+ * 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;
+
+ /** Creates an instance of QueryKeyInner class. */
+ public QueryKeyInner() {
+ }
+
+ /**
+ * 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..711bb7c35b64
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/models/SearchServiceInner.java
@@ -0,0 +1,398 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.search.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.Resource;
+import com.azure.resourcemanager.search.models.DataPlaneAuthOptions;
+import com.azure.resourcemanager.search.models.EncryptionWithCmk;
+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.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 {
+ /*
+ * 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;
+
+ /** Creates an instance of SearchServiceInner class. */
+ public SearchServiceInner() {
+ }
+
+ /**
+ * 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 encryptionWithCmk property: Specifies any policy regarding encryption of resources (such as indexes)
+ * using customer manager keys within a search service.
+ *
+ * @return the encryptionWithCmk value.
+ */
+ public EncryptionWithCmk encryptionWithCmk() {
+ return this.innerProperties() == null ? null : this.innerProperties().encryptionWithCmk();
+ }
+
+ /**
+ * Set the encryptionWithCmk property: Specifies any policy regarding encryption of resources (such as indexes)
+ * using customer manager keys within a search service.
+ *
+ * @param encryptionWithCmk the encryptionWithCmk value to set.
+ * @return the SearchServiceInner object itself.
+ */
+ public SearchServiceInner withEncryptionWithCmk(EncryptionWithCmk encryptionWithCmk) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SearchServiceProperties();
+ }
+ this.innerProperties().withEncryptionWithCmk(encryptionWithCmk);
+ return this;
+ }
+
+ /**
+ * Get the disableLocalAuth property: When set to true, calls to the search service will not be permitted to utilize
+ * API keys for authentication. This cannot be set to true if 'dataPlaneAuthOptions' are defined.
+ *
+ * @return the disableLocalAuth value.
+ */
+ public Boolean disableLocalAuth() {
+ return this.innerProperties() == null ? null : this.innerProperties().disableLocalAuth();
+ }
+
+ /**
+ * Set the disableLocalAuth property: When set to true, calls to the search service will not be permitted to utilize
+ * API keys for authentication. This cannot be set to true if 'dataPlaneAuthOptions' are defined.
+ *
+ * @param disableLocalAuth the disableLocalAuth value to set.
+ * @return the SearchServiceInner object itself.
+ */
+ public SearchServiceInner withDisableLocalAuth(Boolean disableLocalAuth) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SearchServiceProperties();
+ }
+ this.innerProperties().withDisableLocalAuth(disableLocalAuth);
+ return this;
+ }
+
+ /**
+ * Get the authOptions property: Defines the options for how the data plane API of a search service authenticates
+ * requests. This cannot be set if 'disableLocalAuth' is set to true.
+ *
+ * @return the authOptions value.
+ */
+ public DataPlaneAuthOptions authOptions() {
+ return this.innerProperties() == null ? null : this.innerProperties().authOptions();
+ }
+
+ /**
+ * Set the authOptions property: Defines the options for how the data plane API of a search service authenticates
+ * requests. This cannot be set if 'disableLocalAuth' is set to true.
+ *
+ * @param authOptions the authOptions value to set.
+ * @return the SearchServiceInner object itself.
+ */
+ public SearchServiceInner withAuthOptions(DataPlaneAuthOptions authOptions) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SearchServiceProperties();
+ }
+ this.innerProperties().withAuthOptions(authOptions);
+ 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..28803d52131b
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/models/SearchServiceProperties.java
@@ -0,0 +1,393 @@
+// 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.resourcemanager.search.models.DataPlaneAuthOptions;
+import com.azure.resourcemanager.search.models.EncryptionWithCmk;
+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.JsonProperty;
+import java.util.List;
+
+/** Properties of the search service. */
+@Fluent
+public final class SearchServiceProperties {
+ /*
+ * 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;
+
+ /*
+ * Specifies any policy regarding encryption of resources (such as indexes) using customer manager keys within a
+ * search service.
+ */
+ @JsonProperty(value = "encryptionWithCmk")
+ private EncryptionWithCmk encryptionWithCmk;
+
+ /*
+ * When set to true, calls to the search service will not be permitted to utilize API keys for authentication. This
+ * cannot be set to true if 'dataPlaneAuthOptions' are defined.
+ */
+ @JsonProperty(value = "disableLocalAuth")
+ private Boolean disableLocalAuth;
+
+ /*
+ * Defines the options for how the data plane API of a search service authenticates requests. This cannot be set if
+ * 'disableLocalAuth' is set to true.
+ */
+ @JsonProperty(value = "authOptions")
+ private DataPlaneAuthOptions authOptions;
+
+ /*
+ * 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;
+
+ /** Creates an instance of SearchServiceProperties class. */
+ public SearchServiceProperties() {
+ }
+
+ /**
+ * 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 encryptionWithCmk property: Specifies any policy regarding encryption of resources (such as indexes)
+ * using customer manager keys within a search service.
+ *
+ * @return the encryptionWithCmk value.
+ */
+ public EncryptionWithCmk encryptionWithCmk() {
+ return this.encryptionWithCmk;
+ }
+
+ /**
+ * Set the encryptionWithCmk property: Specifies any policy regarding encryption of resources (such as indexes)
+ * using customer manager keys within a search service.
+ *
+ * @param encryptionWithCmk the encryptionWithCmk value to set.
+ * @return the SearchServiceProperties object itself.
+ */
+ public SearchServiceProperties withEncryptionWithCmk(EncryptionWithCmk encryptionWithCmk) {
+ this.encryptionWithCmk = encryptionWithCmk;
+ return this;
+ }
+
+ /**
+ * Get the disableLocalAuth property: When set to true, calls to the search service will not be permitted to utilize
+ * API keys for authentication. This cannot be set to true if 'dataPlaneAuthOptions' are defined.
+ *
+ * @return the disableLocalAuth value.
+ */
+ public Boolean disableLocalAuth() {
+ return this.disableLocalAuth;
+ }
+
+ /**
+ * Set the disableLocalAuth property: When set to true, calls to the search service will not be permitted to utilize
+ * API keys for authentication. This cannot be set to true if 'dataPlaneAuthOptions' are defined.
+ *
+ * @param disableLocalAuth the disableLocalAuth value to set.
+ * @return the SearchServiceProperties object itself.
+ */
+ public SearchServiceProperties withDisableLocalAuth(Boolean disableLocalAuth) {
+ this.disableLocalAuth = disableLocalAuth;
+ return this;
+ }
+
+ /**
+ * Get the authOptions property: Defines the options for how the data plane API of a search service authenticates
+ * requests. This cannot be set if 'disableLocalAuth' is set to true.
+ *
+ * @return the authOptions value.
+ */
+ public DataPlaneAuthOptions authOptions() {
+ return this.authOptions;
+ }
+
+ /**
+ * Set the authOptions property: Defines the options for how the data plane API of a search service authenticates
+ * requests. This cannot be set if 'disableLocalAuth' is set to true.
+ *
+ * @param authOptions the authOptions value to set.
+ * @return the SearchServiceProperties object itself.
+ */
+ public SearchServiceProperties withAuthOptions(DataPlaneAuthOptions authOptions) {
+ this.authOptions = authOptions;
+ 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 (encryptionWithCmk() != null) {
+ encryptionWithCmk().validate();
+ }
+ if (authOptions() != null) {
+ authOptions().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..3ea7a77126b6
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/fluent/models/SharedPrivateLinkResourceInner.java
@@ -0,0 +1,57 @@
+// 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.resourcemanager.search.models.SharedPrivateLinkResourceProperties;
+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 {
+ /*
+ * Describes the properties of a Shared Private Link Resource managed by the Azure Cognitive Search service.
+ */
+ @JsonProperty(value = "properties")
+ private SharedPrivateLinkResourceProperties properties;
+
+ /** Creates an instance of SharedPrivateLinkResourceInner class. */
+ public SharedPrivateLinkResourceInner() {
+ }
+
+ /**
+ * 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..85b9a0d0d756
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/AdminKeysClientImpl.java
@@ -0,0 +1,449 @@
+// 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.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 {
+ /** 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")
+ public 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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * 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();
+ }
+
+ /**
+ * 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 getWithResponse(resourceGroupName, searchServiceName, clientRequestId, Context.NONE).getValue();
+ }
+
+ /**
+ * 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'.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * 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();
+ }
+
+ /**
+ * 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 regenerateWithResponse(resourceGroupName, searchServiceName, keyKind, clientRequestId, Context.NONE)
+ .getValue();
+ }
+}
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..8c21ef9ef54c
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/AdminKeysImpl.java
@@ -0,0 +1,91 @@
+// 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 java.util.UUID;
+
+public final class AdminKeysImpl implements AdminKeys {
+ private static 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 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 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 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;
+ }
+ }
+
+ 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;
+ }
+ }
+
+ 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..906715e3a9c4
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/OperationsClientImpl.java
@@ -0,0 +1,175 @@
+// 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.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 {
+ /** 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")
+ public 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..ef3a4bbb7ed6
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/OperationsImpl.java
@@ -0,0 +1,44 @@
+// 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;
+
+public final class OperationsImpl implements Operations {
+ private static 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..dd5c42f84104
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/PrivateEndpointConnectionsClientImpl.java
@@ -0,0 +1,1140 @@
+// 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.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 {
+ /** 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")
+ public 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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * 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();
+ }
+
+ /**
+ * 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 updateWithResponse(
+ resourceGroupName,
+ searchServiceName,
+ privateEndpointConnectionName,
+ privateEndpointConnection,
+ clientRequestId,
+ Context.NONE)
+ .getValue();
+ }
+
+ /**
+ * 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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * 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();
+ }
+
+ /**
+ * 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 getWithResponse(
+ resourceGroupName, searchServiceName, privateEndpointConnectionName, clientRequestId, Context.NONE)
+ .getValue();
+ }
+
+ /**
+ * 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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * 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();
+ }
+
+ /**
+ * 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 deleteWithResponse(
+ resourceGroupName, searchServiceName, privateEndpointConnectionName, clientRequestId, Context.NONE)
+ .getValue();
+ }
+
+ /**
+ * 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 URL to get the next list of items
+ * 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 URL to get the next list of items
+ * 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..e2df104edb8d
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/PrivateEndpointConnectionsImpl.java
@@ -0,0 +1,161 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.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 java.util.UUID;
+
+public final class PrivateEndpointConnectionsImpl implements PrivateEndpointConnections {
+ private static 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 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 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 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 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 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 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 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..525f80f5d301
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/PrivateLinkResourcesClientImpl.java
@@ -0,0 +1,299 @@
+// 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.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 {
+ /** 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")
+ public 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..9ba2aca4ce2e
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/PrivateLinkResourcesImpl.java
@@ -0,0 +1,49 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.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 java.util.UUID;
+
+public final class PrivateLinkResourcesImpl implements PrivateLinkResources {
+ private static 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..e9866b18b4bd
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/QueryKeysClientImpl.java
@@ -0,0 +1,806 @@
+// 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.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 {
+ /** 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")
+ public 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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * 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();
+ }
+
+ /**
+ * 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 createWithResponse(resourceGroupName, searchServiceName, name, clientRequestId, Context.NONE).getValue();
+ }
+
+ /**
+ * 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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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(ignored -> 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.
+ * @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();
+ }
+
+ /**
+ * 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;
+ deleteWithResponse(resourceGroupName, searchServiceName, key, clientRequestId, Context.NONE);
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ * 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 URL to get the next list of items
+ * 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..90e8547022cd
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/QueryKeysImpl.java
@@ -0,0 +1,87 @@
+// 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 java.util.UUID;
+
+public final class QueryKeysImpl implements QueryKeys {
+ private static 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 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 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 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 Response deleteWithResponse(
+ String resourceGroupName, String searchServiceName, String key, UUID clientRequestId, Context context) {
+ return this
+ .serviceClient()
+ .deleteWithResponse(resourceGroupName, searchServiceName, key, clientRequestId, context);
+ }
+
+ public void delete(String resourceGroupName, String searchServiceName, String key) {
+ this.serviceClient().delete(resourceGroupName, searchServiceName, key);
+ }
+
+ 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..ec225574c18f
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/SearchManagementClientBuilder.java
@@ -0,0 +1,146 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.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.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 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 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 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() {
+ String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com";
+ AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE;
+ HttpPipeline localPipeline =
+ (pipeline != null)
+ ? pipeline
+ : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build();
+ Duration localDefaultPollInterval =
+ (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30);
+ SerializerAdapter localSerializerAdapter =
+ (serializerAdapter != null)
+ ? serializerAdapter
+ : SerializerFactory.createDefaultManagementSerializerAdapter();
+ SearchManagementClientImpl client =
+ new SearchManagementClientImpl(
+ localPipeline,
+ localSerializerAdapter,
+ localDefaultPollInterval,
+ localEnvironment,
+ subscriptionId,
+ localEndpoint);
+ 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..67e0243b7dde
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/SearchManagementClientImpl.java
@@ -0,0 +1,379 @@
+// 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.CoreUtils;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.core.util.polling.AsyncPollResponse;
+import com.azure.core.util.polling.LongRunningOperationStatus;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.serializer.SerializerAdapter;
+import com.azure.core.util.serializer.SerializerEncoding;
+import com.azure.resourcemanager.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 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 {
+ /**
+ * 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 = "2022-09-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) {
+ return CoreUtils.mergeContexts(this.getContext(), context);
+ }
+
+ /**
+ * Gets long running operation result.
+ *
+ * @param activationResponse the response of activation operation.
+ * @param httpPipeline the http pipeline.
+ * @param pollResultType type of poll result.
+ * @param finalResultType type of final result.
+ * @param context the context shared by all requests.
+ * @param type of poll result.
+ * @param type of final result.
+ * @return poller flux for poll result and final result.
+ */
+ public PollerFlux, U> getLroResult(
+ Mono>> activationResponse,
+ HttpPipeline httpPipeline,
+ Type pollResultType,
+ Type finalResultType,
+ Context context) {
+ return PollerFactory
+ .create(
+ serializerAdapter,
+ httpPipeline,
+ pollResultType,
+ finalResultType,
+ defaultPollInterval,
+ activationResponse,
+ context);
+ }
+
+ /**
+ * Gets the final result, or an error, based on last async poll response.
+ *
+ * @param response the last async poll response.
+ * @param type of poll result.
+ * @param type of final result.
+ * @return the final result, or an error.
+ */
+ public Mono getLroFinalResultOrError(AsyncPollResponse, U> response) {
+ if (response.getStatus() != LongRunningOperationStatus.SUCCESSFULLY_COMPLETED) {
+ String errorMessage;
+ ManagementError managementError = null;
+ HttpResponse errorResponse = null;
+ PollResult.Error lroError = response.getValue().getError();
+ if (lroError != null) {
+ errorResponse =
+ new HttpResponseImpl(
+ lroError.getResponseStatusCode(), lroError.getResponseHeaders(), lroError.getResponseBody());
+
+ errorMessage = response.getValue().getError().getMessage();
+ String errorBody = response.getValue().getError().getResponseBody();
+ if (errorBody != null) {
+ // try to deserialize error body to ManagementError
+ try {
+ managementError =
+ this
+ .getSerializerAdapter()
+ .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON);
+ if (managementError.getCode() == null || managementError.getMessage() == null) {
+ managementError = null;
+ }
+ } catch (IOException | RuntimeException ioe) {
+ LOGGER.logThrowableAsWarning(ioe);
+ }
+ }
+ } else {
+ // fallback to default error message
+ errorMessage = "Long running operation failed.";
+ }
+ if (managementError == null) {
+ // fallback to default ManagementError
+ managementError = new ManagementError(response.getStatus().toString(), errorMessage);
+ }
+ return Mono.error(new ManagementException(errorMessage, errorResponse, managementError));
+ } else {
+ return response.getFinalResult();
+ }
+ }
+
+ private static final class HttpResponseImpl extends HttpResponse {
+ private final int statusCode;
+
+ private final byte[] responseBody;
+
+ private final HttpHeaders httpHeaders;
+
+ HttpResponseImpl(int statusCode, HttpHeaders httpHeaders, String responseBody) {
+ super(null);
+ this.statusCode = statusCode;
+ this.httpHeaders = httpHeaders;
+ this.responseBody = responseBody == null ? null : responseBody.getBytes(StandardCharsets.UTF_8);
+ }
+
+ public int getStatusCode() {
+ return statusCode;
+ }
+
+ public String getHeaderValue(String s) {
+ return httpHeaders.getValue(s);
+ }
+
+ public HttpHeaders getHeaders() {
+ return httpHeaders;
+ }
+
+ public Flux getBody() {
+ return Flux.just(ByteBuffer.wrap(responseBody));
+ }
+
+ public Mono getBodyAsByteArray() {
+ return Mono.just(responseBody);
+ }
+
+ public Mono getBodyAsString() {
+ return Mono.just(new String(responseBody, StandardCharsets.UTF_8));
+ }
+
+ public Mono getBodyAsString(Charset charset) {
+ return Mono.just(new String(responseBody, charset));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(SearchManagementClientImpl.class);
+}
diff --git a/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/SearchServiceImpl.java b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/SearchServiceImpl.java
new file mode 100644
index 000000000000..879679f9935a
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/SearchServiceImpl.java
@@ -0,0 +1,394 @@
+// 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.management.Region;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.search.fluent.models.PrivateEndpointConnectionInner;
+import com.azure.resourcemanager.search.fluent.models.SearchServiceInner;
+import com.azure.resourcemanager.search.fluent.models.SharedPrivateLinkResourceInner;
+import com.azure.resourcemanager.search.models.DataPlaneAuthOptions;
+import com.azure.resourcemanager.search.models.EncryptionWithCmk;
+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.PrivateEndpointConnection;
+import com.azure.resourcemanager.search.models.ProvisioningState;
+import com.azure.resourcemanager.search.models.PublicNetworkAccess;
+import com.azure.resourcemanager.search.models.SearchService;
+import com.azure.resourcemanager.search.models.SearchServiceStatus;
+import com.azure.resourcemanager.search.models.SearchServiceUpdate;
+import com.azure.resourcemanager.search.models.SharedPrivateLinkResource;
+import com.azure.resourcemanager.search.models.Sku;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+import java.util.stream.Collectors;
+
+public final class SearchServiceImpl implements SearchService, SearchService.Definition, SearchService.Update {
+ private SearchServiceInner innerObject;
+
+ private final com.azure.resourcemanager.search.SearchManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public String location() {
+ return this.innerModel().location();
+ }
+
+ public Map tags() {
+ Map inner = this.innerModel().tags();
+ if (inner != null) {
+ return Collections.unmodifiableMap(inner);
+ } else {
+ return Collections.emptyMap();
+ }
+ }
+
+ public Sku sku() {
+ return this.innerModel().sku();
+ }
+
+ public Identity identity() {
+ return this.innerModel().identity();
+ }
+
+ public Integer replicaCount() {
+ return this.innerModel().replicaCount();
+ }
+
+ public Integer partitionCount() {
+ return this.innerModel().partitionCount();
+ }
+
+ public HostingMode hostingMode() {
+ return this.innerModel().hostingMode();
+ }
+
+ public PublicNetworkAccess publicNetworkAccess() {
+ return this.innerModel().publicNetworkAccess();
+ }
+
+ public SearchServiceStatus status() {
+ return this.innerModel().status();
+ }
+
+ public String statusDetails() {
+ return this.innerModel().statusDetails();
+ }
+
+ public ProvisioningState provisioningState() {
+ return this.innerModel().provisioningState();
+ }
+
+ public NetworkRuleSet networkRuleSet() {
+ return this.innerModel().networkRuleSet();
+ }
+
+ public EncryptionWithCmk encryptionWithCmk() {
+ return this.innerModel().encryptionWithCmk();
+ }
+
+ public Boolean disableLocalAuth() {
+ return this.innerModel().disableLocalAuth();
+ }
+
+ public DataPlaneAuthOptions authOptions() {
+ return this.innerModel().authOptions();
+ }
+
+ public List privateEndpointConnections() {
+ List inner = this.innerModel().privateEndpointConnections();
+ if (inner != null) {
+ return Collections
+ .unmodifiableList(
+ inner
+ .stream()
+ .map(inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager()))
+ .collect(Collectors.toList()));
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public List sharedPrivateLinkResources() {
+ List inner = this.innerModel().sharedPrivateLinkResources();
+ if (inner != null) {
+ return Collections
+ .unmodifiableList(
+ inner
+ .stream()
+ .map(inner1 -> new SharedPrivateLinkResourceImpl(inner1, this.manager()))
+ .collect(Collectors.toList()));
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public Region region() {
+ return Region.fromName(this.regionName());
+ }
+
+ public String regionName() {
+ return this.location();
+ }
+
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
+ public SearchServiceInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.search.SearchManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String searchServiceName;
+
+ private UUID createClientRequestId;
+
+ private UUID updateClientRequestId;
+
+ private SearchServiceUpdate updateServiceParam;
+
+ public SearchServiceImpl withExistingResourceGroup(String resourceGroupName) {
+ this.resourceGroupName = resourceGroupName;
+ return this;
+ }
+
+ public SearchService create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getServices()
+ .createOrUpdate(
+ resourceGroupName, searchServiceName, this.innerModel(), createClientRequestId, Context.NONE);
+ return this;
+ }
+
+ public SearchService create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getServices()
+ .createOrUpdate(
+ resourceGroupName, searchServiceName, this.innerModel(), createClientRequestId, context);
+ return this;
+ }
+
+ SearchServiceImpl(String name, com.azure.resourcemanager.search.SearchManager serviceManager) {
+ this.innerObject = new SearchServiceInner();
+ this.serviceManager = serviceManager;
+ this.searchServiceName = name;
+ this.createClientRequestId = null;
+ }
+
+ public SearchServiceImpl update() {
+ this.updateClientRequestId = null;
+ this.updateServiceParam = new SearchServiceUpdate();
+ return this;
+ }
+
+ public SearchService apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getServices()
+ .updateWithResponse(
+ resourceGroupName, searchServiceName, updateServiceParam, updateClientRequestId, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public SearchService apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getServices()
+ .updateWithResponse(
+ resourceGroupName, searchServiceName, updateServiceParam, updateClientRequestId, context)
+ .getValue();
+ return this;
+ }
+
+ SearchServiceImpl(SearchServiceInner innerObject, com.azure.resourcemanager.search.SearchManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.searchServiceName = Utils.getValueFromIdByName(innerObject.id(), "searchServices");
+ }
+
+ public SearchService refresh() {
+ UUID localClientRequestId = null;
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getServices()
+ .getByResourceGroupWithResponse(
+ resourceGroupName, searchServiceName, localClientRequestId, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public SearchService refresh(Context context) {
+ UUID localClientRequestId = null;
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getServices()
+ .getByResourceGroupWithResponse(resourceGroupName, searchServiceName, localClientRequestId, context)
+ .getValue();
+ return this;
+ }
+
+ public SearchServiceImpl withRegion(Region location) {
+ this.innerModel().withLocation(location.toString());
+ return this;
+ }
+
+ public SearchServiceImpl withRegion(String location) {
+ this.innerModel().withLocation(location);
+ return this;
+ }
+
+ public SearchServiceImpl withTags(Map tags) {
+ if (isInCreateMode()) {
+ this.innerModel().withTags(tags);
+ return this;
+ } else {
+ this.updateServiceParam.withTags(tags);
+ return this;
+ }
+ }
+
+ public SearchServiceImpl withSku(Sku sku) {
+ if (isInCreateMode()) {
+ this.innerModel().withSku(sku);
+ return this;
+ } else {
+ this.updateServiceParam.withSku(sku);
+ return this;
+ }
+ }
+
+ public SearchServiceImpl withIdentity(Identity identity) {
+ if (isInCreateMode()) {
+ this.innerModel().withIdentity(identity);
+ return this;
+ } else {
+ this.updateServiceParam.withIdentity(identity);
+ return this;
+ }
+ }
+
+ public SearchServiceImpl withReplicaCount(Integer replicaCount) {
+ if (isInCreateMode()) {
+ this.innerModel().withReplicaCount(replicaCount);
+ return this;
+ } else {
+ this.updateServiceParam.withReplicaCount(replicaCount);
+ return this;
+ }
+ }
+
+ public SearchServiceImpl withPartitionCount(Integer partitionCount) {
+ if (isInCreateMode()) {
+ this.innerModel().withPartitionCount(partitionCount);
+ return this;
+ } else {
+ this.updateServiceParam.withPartitionCount(partitionCount);
+ return this;
+ }
+ }
+
+ public SearchServiceImpl withHostingMode(HostingMode hostingMode) {
+ if (isInCreateMode()) {
+ this.innerModel().withHostingMode(hostingMode);
+ return this;
+ } else {
+ this.updateServiceParam.withHostingMode(hostingMode);
+ return this;
+ }
+ }
+
+ public SearchServiceImpl withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) {
+ if (isInCreateMode()) {
+ this.innerModel().withPublicNetworkAccess(publicNetworkAccess);
+ return this;
+ } else {
+ this.updateServiceParam.withPublicNetworkAccess(publicNetworkAccess);
+ return this;
+ }
+ }
+
+ public SearchServiceImpl withNetworkRuleSet(NetworkRuleSet networkRuleSet) {
+ if (isInCreateMode()) {
+ this.innerModel().withNetworkRuleSet(networkRuleSet);
+ return this;
+ } else {
+ this.updateServiceParam.withNetworkRuleSet(networkRuleSet);
+ return this;
+ }
+ }
+
+ public SearchServiceImpl withEncryptionWithCmk(EncryptionWithCmk encryptionWithCmk) {
+ if (isInCreateMode()) {
+ this.innerModel().withEncryptionWithCmk(encryptionWithCmk);
+ return this;
+ } else {
+ this.updateServiceParam.withEncryptionWithCmk(encryptionWithCmk);
+ return this;
+ }
+ }
+
+ public SearchServiceImpl withDisableLocalAuth(Boolean disableLocalAuth) {
+ if (isInCreateMode()) {
+ this.innerModel().withDisableLocalAuth(disableLocalAuth);
+ return this;
+ } else {
+ this.updateServiceParam.withDisableLocalAuth(disableLocalAuth);
+ return this;
+ }
+ }
+
+ public SearchServiceImpl withAuthOptions(DataPlaneAuthOptions authOptions) {
+ if (isInCreateMode()) {
+ this.innerModel().withAuthOptions(authOptions);
+ return this;
+ } else {
+ this.updateServiceParam.withAuthOptions(authOptions);
+ return this;
+ }
+ }
+
+ public SearchServiceImpl withClientRequestId(UUID clientRequestId) {
+ if (isInCreateMode()) {
+ this.createClientRequestId = clientRequestId;
+ return this;
+ } else {
+ this.updateClientRequestId = clientRequestId;
+ return this;
+ }
+ }
+
+ private boolean isInCreateMode() {
+ return this.innerModel().id() == null;
+ }
+}
diff --git a/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/ServicesClientImpl.java b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/ServicesClientImpl.java
new file mode 100644
index 000000000000..42b531d71d5c
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/ServicesClientImpl.java
@@ -0,0 +1,1868 @@
+// 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.Patch;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Post;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.search.fluent.ServicesClient;
+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.SearchServiceListResult;
+import com.azure.resourcemanager.search.models.SearchServiceUpdate;
+import java.nio.ByteBuffer;
+import java.util.UUID;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in ServicesClient. */
+public final class ServicesClientImpl implements ServicesClient {
+ /** The proxy service used to perform REST calls. */
+ private final ServicesService service;
+
+ /** The service client containing this operation class. */
+ private final SearchManagementClientImpl client;
+
+ /**
+ * Initializes an instance of ServicesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ ServicesClientImpl(SearchManagementClientImpl client) {
+ this.service = RestProxy.create(ServicesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for SearchManagementClientServices to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "SearchManagementClie")
+ public interface ServicesService {
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search"
+ + "/searchServices/{searchServiceName}")
+ @ExpectedResponses({200, 201})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> createOrUpdate(
+ @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,
+ @BodyParam("application/json") SearchServiceInner service,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Patch(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search"
+ + "/searchServices/{searchServiceName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> update(
+ @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,
+ @BodyParam("application/json") SearchServiceUpdate service,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search"
+ + "/searchServices/{searchServiceName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getByResourceGroup(
+ @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}")
+ @ExpectedResponses({200, 204, 404})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> delete(
+ @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"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search"
+ + "/searchServices")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroup(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @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}/providers/Microsoft.Search/searchServices")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @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}/providers/Microsoft.Search/checkNameAvailability")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> checkNameAvailability(
+ @HostParam("$host") String endpoint,
+ @HeaderParam("x-ms-client-request-id") UUID clientRequestId,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @BodyParam("application/json") CheckNameAvailabilityInput checkNameAvailabilityInput,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroupNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("x-ms-client-request-id") UUID clientRequestId,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listBySubscriptionNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("x-ms-client-request-id") UUID clientRequestId,
+ @HeaderParam("Accept") String accept,
+ 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 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} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(
+ String resourceGroupName, String searchServiceName, SearchServiceInner serviceParam, 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."));
+ }
+ if (serviceParam == null) {
+ return Mono.error(new IllegalArgumentException("Parameter serviceParam is required and cannot be null."));
+ } else {
+ serviceParam.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ searchServiceName,
+ clientRequestId,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ serviceParam,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * 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 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} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(
+ String resourceGroupName,
+ String searchServiceName,
+ SearchServiceInner serviceParam,
+ 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."));
+ }
+ if (serviceParam == null) {
+ return Mono.error(new IllegalArgumentException("Parameter serviceParam is required and cannot be null."));
+ } else {
+ serviceParam.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ searchServiceName,
+ clientRequestId,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ serviceParam,
+ accept,
+ 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 ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of describes an Azure Cognitive Search service and its current state.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, SearchServiceInner> beginCreateOrUpdateAsync(
+ String resourceGroupName, String searchServiceName, SearchServiceInner serviceParam, UUID clientRequestId) {
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(resourceGroupName, searchServiceName, serviceParam, clientRequestId);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ SearchServiceInner.class,
+ SearchServiceInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * 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 ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of describes an Azure Cognitive Search service and its current state.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, SearchServiceInner> beginCreateOrUpdateAsync(
+ String resourceGroupName, String searchServiceName, SearchServiceInner serviceParam) {
+ final UUID clientRequestId = null;
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(resourceGroupName, searchServiceName, serviceParam, clientRequestId);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ SearchServiceInner.class,
+ SearchServiceInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * 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 ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of describes an Azure Cognitive Search service and its current state.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, SearchServiceInner> beginCreateOrUpdateAsync(
+ String resourceGroupName,
+ String searchServiceName,
+ SearchServiceInner serviceParam,
+ UUID clientRequestId,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(
+ resourceGroupName, searchServiceName, serviceParam, clientRequestId, context);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), SearchServiceInner.class, SearchServiceInner.class, 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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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)
+ public SyncPoller, SearchServiceInner> beginCreateOrUpdate(
+ String resourceGroupName, String searchServiceName, SearchServiceInner serviceParam) {
+ final UUID clientRequestId = null;
+ return this
+ .beginCreateOrUpdateAsync(resourceGroupName, searchServiceName, serviceParam, clientRequestId)
+ .getSyncPoller();
+ }
+
+ /**
+ * 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 ManagementException 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)
+ public SyncPoller, SearchServiceInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String searchServiceName,
+ SearchServiceInner serviceParam,
+ UUID clientRequestId,
+ Context context) {
+ return this
+ .beginCreateOrUpdateAsync(resourceGroupName, searchServiceName, serviceParam, clientRequestId, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * 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 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 on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName, String searchServiceName, SearchServiceInner serviceParam, UUID clientRequestId) {
+ return beginCreateOrUpdateAsync(resourceGroupName, searchServiceName, serviceParam, clientRequestId)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * 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 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 on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName, String searchServiceName, SearchServiceInner serviceParam) {
+ final UUID clientRequestId = null;
+ return beginCreateOrUpdateAsync(resourceGroupName, searchServiceName, serviceParam, clientRequestId)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * 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 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 on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName,
+ String searchServiceName,
+ SearchServiceInner serviceParam,
+ UUID clientRequestId,
+ Context context) {
+ return beginCreateOrUpdateAsync(resourceGroupName, searchServiceName, serviceParam, clientRequestId, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * 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 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)
+ public SearchServiceInner createOrUpdate(
+ String resourceGroupName, String searchServiceName, SearchServiceInner serviceParam) {
+ final UUID clientRequestId = null;
+ return createOrUpdateAsync(resourceGroupName, searchServiceName, serviceParam, clientRequestId).block();
+ }
+
+ /**
+ * 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 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)
+ public SearchServiceInner createOrUpdate(
+ String resourceGroupName,
+ String searchServiceName,
+ SearchServiceInner serviceParam,
+ UUID clientRequestId,
+ Context context) {
+ return createOrUpdateAsync(resourceGroupName, searchServiceName, serviceParam, clientRequestId, context)
+ .block();
+ }
+
+ /**
+ * 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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(
+ String resourceGroupName, String searchServiceName, SearchServiceUpdate serviceParam, 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."));
+ }
+ if (serviceParam == null) {
+ return Mono.error(new IllegalArgumentException("Parameter serviceParam is required and cannot be null."));
+ } else {
+ serviceParam.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .update(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ searchServiceName,
+ clientRequestId,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ serviceParam,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * 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 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} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(
+ String resourceGroupName,
+ String searchServiceName,
+ SearchServiceUpdate serviceParam,
+ 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."));
+ }
+ if (serviceParam == null) {
+ return Mono.error(new IllegalArgumentException("Parameter serviceParam is required and cannot be null."));
+ } else {
+ serviceParam.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .update(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ searchServiceName,
+ clientRequestId,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ serviceParam,
+ accept,
+ 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 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 on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(
+ String resourceGroupName, String searchServiceName, SearchServiceUpdate serviceParam) {
+ final UUID clientRequestId = null;
+ return updateWithResponseAsync(resourceGroupName, searchServiceName, serviceParam, clientRequestId)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * 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 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)
+ public Response updateWithResponse(
+ String resourceGroupName,
+ String searchServiceName,
+ SearchServiceUpdate serviceParam,
+ UUID clientRequestId,
+ Context context) {
+ return updateWithResponseAsync(resourceGroupName, searchServiceName, serviceParam, clientRequestId, context)
+ .block();
+ }
+
+ /**
+ * 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 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)
+ public SearchServiceInner update(
+ String resourceGroupName, String searchServiceName, SearchServiceUpdate serviceParam) {
+ final UUID clientRequestId = null;
+ return updateWithResponse(resourceGroupName, searchServiceName, serviceParam, clientRequestId, Context.NONE)
+ .getValue();
+ }
+
+ /**
+ * 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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(
+ 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
+ .getByResourceGroup(
+ 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 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 ManagementException 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} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(
+ 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
+ .getByResourceGroup(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ searchServiceName,
+ clientRequestId,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ 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 ManagementException 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 on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getByResourceGroupAsync(String resourceGroupName, String searchServiceName) {
+ final UUID clientRequestId = null;
+ return getByResourceGroupWithResponseAsync(resourceGroupName, searchServiceName, clientRequestId)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * 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 ManagementException 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)
+ public Response getByResourceGroupWithResponse(
+ String resourceGroupName, String searchServiceName, UUID clientRequestId, Context context) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, searchServiceName, clientRequestId, context)
+ .block();
+ }
+
+ /**
+ * 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 ManagementException 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)
+ public SearchServiceInner getByResourceGroup(String resourceGroupName, String searchServiceName) {
+ final UUID clientRequestId = null;
+ return getByResourceGroupWithResponse(resourceGroupName, searchServiceName, clientRequestId, Context.NONE)
+ .getValue();
+ }
+
+ /**
+ * 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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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, 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
+ .delete(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ searchServiceName,
+ clientRequestId,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * 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 ManagementException 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, 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
+ .delete(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ searchServiceName,
+ clientRequestId,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ 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 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) {
+ final UUID clientRequestId = null;
+ return deleteWithResponseAsync(resourceGroupName, searchServiceName, clientRequestId)
+ .flatMap(ignored -> Mono.empty());
+ }
+
+ /**
+ * 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 ManagementException 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, UUID clientRequestId, Context context) {
+ return deleteWithResponseAsync(resourceGroupName, searchServiceName, clientRequestId, context).block();
+ }
+
+ /**
+ * 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 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) {
+ final UUID clientRequestId = null;
+ deleteWithResponse(resourceGroupName, searchServiceName, clientRequestId, Context.NONE);
+ }
+
+ /**
+ * 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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupSinglePageAsync(
+ String resourceGroupName, 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 (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
+ .listByResourceGroup(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ 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()));
+ }
+
+ /**
+ * 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 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 along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupSinglePageAsync(
+ String resourceGroupName, 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 (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
+ .listByResourceGroup(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ 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));
+ }
+
+ /**
+ * 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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName, UUID clientRequestId) {
+ return new PagedFlux<>(
+ () -> listByResourceGroupSinglePageAsync(resourceGroupName, clientRequestId),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, clientRequestId));
+ }
+
+ /**
+ * 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 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 PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
+ final UUID clientRequestId = null;
+ return new PagedFlux<>(
+ () -> listByResourceGroupSinglePageAsync(resourceGroupName, clientRequestId),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, clientRequestId));
+ }
+
+ /**
+ * 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 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 PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(
+ String resourceGroupName, UUID clientRequestId, Context context) {
+ return new PagedFlux<>(
+ () -> listByResourceGroupSinglePageAsync(resourceGroupName, clientRequestId, context),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, clientRequestId, 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 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)
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ final UUID clientRequestId = null;
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, clientRequestId));
+ }
+
+ /**
+ * 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 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)
+ public PagedIterable listByResourceGroup(
+ String resourceGroupName, UUID clientRequestId, Context context) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, clientRequestId, context));
+ }
+
+ /**
+ * 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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(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."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .list(
+ this.client.getEndpoint(),
+ 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()));
+ }
+
+ /**
+ * 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 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 along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(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."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(
+ this.client.getEndpoint(),
+ 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));
+ }
+
+ /**
+ * 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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(UUID clientRequestId) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(clientRequestId),
+ nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, clientRequestId));
+ }
+
+ /**
+ * Gets a list of all Search services in the given subscription.
+ *
+ * @throws 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 PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ final UUID clientRequestId = null;
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(clientRequestId),
+ nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, clientRequestId));
+ }
+
+ /**
+ * 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 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 PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(UUID clientRequestId, Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(clientRequestId, context),
+ nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, clientRequestId, context));
+ }
+
+ /**
+ * Gets a list of all Search services in the given subscription.
+ *
+ * @throws 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)
+ public PagedIterable list() {
+ final UUID clientRequestId = null;
+ return new PagedIterable<>(listAsync(clientRequestId));
+ }
+
+ /**
+ * 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 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)
+ public PagedIterable list(UUID clientRequestId, Context context) {
+ return new PagedIterable<>(listAsync(clientRequestId, 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.
+ * @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 output of check name availability API along with {@link Response} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> checkNameAvailabilityWithResponseAsync(
+ CheckNameAvailabilityInput checkNameAvailabilityInput, 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 (checkNameAvailabilityInput == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter checkNameAvailabilityInput is required and cannot be null."));
+ } else {
+ checkNameAvailabilityInput.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .checkNameAvailability(
+ this.client.getEndpoint(),
+ clientRequestId,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ checkNameAvailabilityInput,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * 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 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} on successful completion of {@link
+ * Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> checkNameAvailabilityWithResponseAsync(
+ CheckNameAvailabilityInput checkNameAvailabilityInput, 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 (checkNameAvailabilityInput == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter checkNameAvailabilityInput is required and cannot be null."));
+ } else {
+ checkNameAvailabilityInput.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .checkNameAvailability(
+ this.client.getEndpoint(),
+ clientRequestId,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ checkNameAvailabilityInput,
+ accept,
+ 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 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 on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono checkNameAvailabilityAsync(
+ CheckNameAvailabilityInput checkNameAvailabilityInput) {
+ final UUID clientRequestId = null;
+ return checkNameAvailabilityWithResponseAsync(checkNameAvailabilityInput, clientRequestId)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * 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 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)
+ public Response checkNameAvailabilityWithResponse(
+ CheckNameAvailabilityInput checkNameAvailabilityInput, UUID clientRequestId, Context context) {
+ return checkNameAvailabilityWithResponseAsync(checkNameAvailabilityInput, clientRequestId, context).block();
+ }
+
+ /**
+ * 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 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)
+ public CheckNameAvailabilityOutputInner checkNameAvailability(
+ CheckNameAvailabilityInput checkNameAvailabilityInput) {
+ final UUID clientRequestId = null;
+ return checkNameAvailabilityWithResponse(checkNameAvailabilityInput, clientRequestId, Context.NONE).getValue();
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ * 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 Azure Cognitive Search services along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupNextSinglePageAsync(
+ 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
+ .listByResourceGroupNext(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 URL to get the next list of items
+ * 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 Azure Cognitive Search services along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupNextSinglePageAsync(
+ 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
+ .listByResourceGroupNext(nextLink, this.client.getEndpoint(), clientRequestId, accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items
+ * 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 Azure Cognitive Search services along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySubscriptionNextSinglePageAsync(
+ 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
+ .listBySubscriptionNext(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 URL to get the next list of items
+ * 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 Azure Cognitive Search services along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySubscriptionNextSinglePageAsync(
+ 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
+ .listBySubscriptionNext(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/ServicesImpl.java b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/ServicesImpl.java
new file mode 100644
index 000000000000..f8cf9df4e6d7
--- /dev/null
+++ b/sdk/search/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/ServicesImpl.java
@@ -0,0 +1,211 @@
+// 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.ServicesClient;
+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.CheckNameAvailabilityOutput;
+import com.azure.resourcemanager.search.models.SearchService;
+import com.azure.resourcemanager.search.models.Services;
+import java.util.UUID;
+
+public final class ServicesImpl implements Services {
+ private static final ClientLogger LOGGER = new ClientLogger(ServicesImpl.class);
+
+ private final ServicesClient innerClient;
+
+ private final com.azure.resourcemanager.search.SearchManager serviceManager;
+
+ public ServicesImpl(ServicesClient innerClient, com.azure.resourcemanager.search.SearchManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response getByResourceGroupWithResponse(
+ String resourceGroupName, String searchServiceName, UUID clientRequestId, Context context) {
+ Response inner =
+ this
+ .serviceClient()
+ .getByResourceGroupWithResponse(resourceGroupName, searchServiceName, clientRequestId, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new SearchServiceImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public SearchService getByResourceGroup(String resourceGroupName, String searchServiceName) {
+ SearchServiceInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, searchServiceName);
+ if (inner != null) {
+ return new SearchServiceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response deleteWithResponse(
+ String resourceGroupName, String searchServiceName, UUID clientRequestId, Context context) {
+ return this.serviceClient().deleteWithResponse(resourceGroupName, searchServiceName, clientRequestId, context);
+ }
+
+ public void delete(String resourceGroupName, String searchServiceName) {
+ this.serviceClient().delete(resourceGroupName, searchServiceName);
+ }
+
+ public PagedIterable