diff --git a/sdk/search/mgmt-resource-manager/v2015_08_19/pom.xml b/sdk/search/mgmt-resource-manager/v2015_08_19/pom.xml
new file mode 100644
index 000000000000..caf29202fd62
--- /dev/null
+++ b/sdk/search/mgmt-resource-manager/v2015_08_19/pom.xml
@@ -0,0 +1,135 @@
+
+
+ 4.0.0
+ com.microsoft.azure.search.v2015_08_19
+
+ com.microsoft.azure
+ azure-arm-parent
+ 1.1.0
+ ../../../pom.management.xml
+
+ azure-mgmt-search
+ 1.0.0-beta
+ jar
+ Microsoft Azure SDK for Search Management
+ This package contains Microsoft Search Management SDK.
+ https://github.com/Azure/azure-sdk-for-java
+
+
+ The MIT License (MIT)
+ http://opensource.org/licenses/MIT
+ repo
+
+
+
+ scm:git:https://github.com/Azure/azure-sdk-for-java
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ HEAD
+
+
+ UTF-8
+
+
+
+
+ microsoft
+ Microsoft
+
+
+
+
+ com.microsoft.azure
+ azure-client-runtime
+
+
+ com.microsoft.azure
+ azure-arm-client-runtime
+
+
+ junit
+ junit
+ test
+
+
+ com.microsoft.azure
+ azure-client-authentication
+ test
+
+
+ com.microsoft.azure
+ azure-mgmt-resources
+ test
+
+
+ com.microsoft.azure
+ azure-arm-client-runtime
+ test-jar
+ test
+
+ 1.6.5
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+
+
+
+ true
+ true
+
+
+
+
+
+ org.codehaus.mojo
+ build-helper-maven-plugin
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.1
+
+ 1.7
+ 1.7
+
+
+ com.microsoft.azure.management.apigeneration.LangDefinitionProcessor
+
+
+ true
+ true
+
+ true
+ true
+
+
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ 2.8
+
+ *.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search
+
+
+ /**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ */
+ ]]>
+
+
+
+
+
+
diff --git a/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/AdminKeyKind.java b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/AdminKeyKind.java
new file mode 100644
index 000000000000..89803de02f6c
--- /dev/null
+++ b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/AdminKeyKind.java
@@ -0,0 +1,53 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.search.v2015_08_19;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Defines values for AdminKeyKind.
+ */
+public enum AdminKeyKind {
+ /** Enum value primary. */
+ PRIMARY("primary"),
+
+ /** Enum value secondary. */
+ SECONDARY("secondary");
+
+ /** The actual serialized value for a AdminKeyKind instance. */
+ private String value;
+
+ AdminKeyKind(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Parses a serialized value to a AdminKeyKind instance.
+ *
+ * @param value the serialized value to parse.
+ * @return the parsed AdminKeyKind object, or null if unable to parse.
+ */
+ @JsonCreator
+ public static AdminKeyKind fromString(String value) {
+ AdminKeyKind[] items = AdminKeyKind.values();
+ for (AdminKeyKind item : items) {
+ if (item.toString().equalsIgnoreCase(value)) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ @JsonValue
+ @Override
+ public String toString() {
+ return this.value;
+ }
+}
diff --git a/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/AdminKeyResult.java b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/AdminKeyResult.java
new file mode 100644
index 000000000000..fc36bfa8556b
--- /dev/null
+++ b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/AdminKeyResult.java
@@ -0,0 +1,30 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.search.v2015_08_19;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.search.v2015_08_19.implementation.SearchManager;
+import com.microsoft.azure.management.search.v2015_08_19.implementation.AdminKeyResultInner;
+
+/**
+ * Type representing AdminKeyResult.
+ */
+public interface AdminKeyResult extends HasInner, HasManager {
+ /**
+ * @return the primaryKey value.
+ */
+ String primaryKey();
+
+ /**
+ * @return the secondaryKey value.
+ */
+ String secondaryKey();
+
+}
diff --git a/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/AdminKeys.java b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/AdminKeys.java
new file mode 100644
index 000000000000..bc5d997096b1
--- /dev/null
+++ b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/AdminKeys.java
@@ -0,0 +1,40 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.search.v2015_08_19;
+
+import rx.Observable;
+import com.microsoft.azure.management.search.v2015_08_19.implementation.AdminKeysInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing AdminKeys.
+ */
+public interface AdminKeys extends HasInner {
+ /**
+ * 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
+ * @return the observable for the request
+ */
+ Observable getAsync(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'. Possible values include: 'primary', 'secondary'
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable regenerateAsync(String resourceGroupName, String searchServiceName, AdminKeyKind keyKind);
+
+}
diff --git a/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/CheckNameAvailabilityInput.java b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/CheckNameAvailabilityInput.java
new file mode 100644
index 000000000000..7b4025731457
--- /dev/null
+++ b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/CheckNameAvailabilityInput.java
@@ -0,0 +1,81 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.search.v2015_08_19;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Input of check name availability API.
+ */
+public class CheckNameAvailabilityInput {
+ /**
+ * The Search service name to validate. 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.
+ */
+ @JsonProperty(value = "name", required = true)
+ private String name;
+
+ /**
+ * The type of the resource whose name is to be validated. This value must
+ * always be 'searchServices'.
+ */
+ @JsonProperty(value = "type", required = true)
+ private String type;
+
+ /**
+ * Creates an instance of CheckNameAvailabilityInput class.
+ * @param name the Search service name to validate. 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.
+ */
+ public CheckNameAvailabilityInput() {
+ type = "searchServices";
+ }
+
+ /**
+ * Get the Search service name to validate. 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.
+ *
+ * @return the name value
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set the Search service name to validate. 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.
+ *
+ * @param name the name value to set
+ * @return the CheckNameAvailabilityInput object itself.
+ */
+ public CheckNameAvailabilityInput withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the type of the resource whose name is to be validated. This value must always be 'searchServices'.
+ *
+ * @return the type value
+ */
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Set the type of the resource whose name is to be validated. This value must always be 'searchServices'.
+ *
+ * @param type the type value to set
+ * @return the CheckNameAvailabilityInput object itself.
+ */
+ public CheckNameAvailabilityInput withType(String type) {
+ this.type = type;
+ return this;
+ }
+
+}
diff --git a/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/CheckNameAvailabilityOutput.java b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/CheckNameAvailabilityOutput.java
new file mode 100644
index 000000000000..8cd0a8ee4ea3
--- /dev/null
+++ b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/CheckNameAvailabilityOutput.java
@@ -0,0 +1,35 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.search.v2015_08_19;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.search.v2015_08_19.implementation.SearchManager;
+import com.microsoft.azure.management.search.v2015_08_19.implementation.CheckNameAvailabilityOutputInner;
+
+/**
+ * Type representing CheckNameAvailabilityOutput.
+ */
+public interface CheckNameAvailabilityOutput extends HasInner, HasManager {
+ /**
+ * @return the isNameAvailable value.
+ */
+ Boolean isNameAvailable();
+
+ /**
+ * @return the message value.
+ */
+ String message();
+
+ /**
+ * @return the reason value.
+ */
+ UnavailableNameReason reason();
+
+}
diff --git a/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/HostingMode.java b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/HostingMode.java
new file mode 100644
index 000000000000..974797f15ddb
--- /dev/null
+++ b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/HostingMode.java
@@ -0,0 +1,53 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.search.v2015_08_19;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Defines values for HostingMode.
+ */
+public enum HostingMode {
+ /** Enum value default. */
+ DEFAULT("default"),
+
+ /** Enum value highDensity. */
+ HIGH_DENSITY("highDensity");
+
+ /** The actual serialized value for a HostingMode instance. */
+ private String value;
+
+ HostingMode(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Parses a serialized value to a HostingMode instance.
+ *
+ * @param value the serialized value to parse.
+ * @return the parsed HostingMode object, or null if unable to parse.
+ */
+ @JsonCreator
+ public static HostingMode fromString(String value) {
+ HostingMode[] items = HostingMode.values();
+ for (HostingMode item : items) {
+ if (item.toString().equalsIgnoreCase(value)) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ @JsonValue
+ @Override
+ public String toString() {
+ return this.value;
+ }
+}
diff --git a/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/Identity.java b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/Identity.java
new file mode 100644
index 000000000000..4304e5427a2c
--- /dev/null
+++ b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/Identity.java
@@ -0,0 +1,73 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.search.v2015_08_19;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Identity for the resource.
+ */
+public class Identity {
+ /**
+ * The principal ID of resource identity.
+ */
+ @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY)
+ private String principalId;
+
+ /**
+ * The tenant ID of resource.
+ */
+ @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY)
+ private String tenantId;
+
+ /**
+ * The identity type. Possible values include: 'None', 'SystemAssigned'.
+ */
+ @JsonProperty(value = "type", required = true)
+ private IdentityType type;
+
+ /**
+ * Get the principal ID of resource identity.
+ *
+ * @return the principalId value
+ */
+ public String principalId() {
+ return this.principalId;
+ }
+
+ /**
+ * Get the tenant ID of resource.
+ *
+ * @return the tenantId value
+ */
+ public String tenantId() {
+ return this.tenantId;
+ }
+
+ /**
+ * Get the identity type. Possible values include: 'None', 'SystemAssigned'.
+ *
+ * @return the type value
+ */
+ public IdentityType type() {
+ return this.type;
+ }
+
+ /**
+ * Set the identity type. Possible values include: 'None', 'SystemAssigned'.
+ *
+ * @param type the type value to set
+ * @return the Identity object itself.
+ */
+ public Identity withType(IdentityType type) {
+ this.type = type;
+ return this;
+ }
+
+}
diff --git a/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/IdentityType.java b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/IdentityType.java
new file mode 100644
index 000000000000..acd38de34304
--- /dev/null
+++ b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/IdentityType.java
@@ -0,0 +1,53 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.search.v2015_08_19;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Defines values for IdentityType.
+ */
+public enum IdentityType {
+ /** Enum value None. */
+ NONE("None"),
+
+ /** Enum value SystemAssigned. */
+ SYSTEM_ASSIGNED("SystemAssigned");
+
+ /** The actual serialized value for a IdentityType instance. */
+ private String value;
+
+ IdentityType(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Parses a serialized value to a IdentityType instance.
+ *
+ * @param value the serialized value to parse.
+ * @return the parsed IdentityType object, or null if unable to parse.
+ */
+ @JsonCreator
+ public static IdentityType fromString(String value) {
+ IdentityType[] items = IdentityType.values();
+ for (IdentityType item : items) {
+ if (item.toString().equalsIgnoreCase(value)) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ @JsonValue
+ @Override
+ public String toString() {
+ return this.value;
+ }
+}
diff --git a/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/Operation.java b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/Operation.java
new file mode 100644
index 000000000000..9f3b9943f872
--- /dev/null
+++ b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/Operation.java
@@ -0,0 +1,30 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.search.v2015_08_19;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.search.v2015_08_19.implementation.SearchManager;
+import com.microsoft.azure.management.search.v2015_08_19.implementation.OperationInner;
+
+/**
+ * Type representing Operation.
+ */
+public interface Operation extends HasInner, HasManager {
+ /**
+ * @return the display value.
+ */
+ OperationDisplay display();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+}
diff --git a/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/OperationDisplay.java b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/OperationDisplay.java
new file mode 100644
index 000000000000..9a639dd2e3a1
--- /dev/null
+++ b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/OperationDisplay.java
@@ -0,0 +1,77 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.search.v2015_08_19;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The object that describes the operation.
+ */
+public class OperationDisplay {
+ /**
+ * The friendly name of the resource provider.
+ */
+ @JsonProperty(value = "provider", access = JsonProperty.Access.WRITE_ONLY)
+ private String provider;
+
+ /**
+ * The operation type: read, write, delete, listKeys/action, etc.
+ */
+ @JsonProperty(value = "operation", access = JsonProperty.Access.WRITE_ONLY)
+ private String operation;
+
+ /**
+ * The resource type on which the operation is performed.
+ */
+ @JsonProperty(value = "resource", access = JsonProperty.Access.WRITE_ONLY)
+ private String resource;
+
+ /**
+ * The friendly name of the operation.
+ */
+ @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY)
+ private String description;
+
+ /**
+ * Get the friendly name of the resource provider.
+ *
+ * @return the provider value
+ */
+ public String provider() {
+ return this.provider;
+ }
+
+ /**
+ * Get the operation type: read, write, delete, listKeys/action, etc.
+ *
+ * @return the operation value
+ */
+ public String operation() {
+ return this.operation;
+ }
+
+ /**
+ * Get the resource type on which the operation is performed.
+ *
+ * @return the resource value
+ */
+ public String resource() {
+ return this.resource;
+ }
+
+ /**
+ * Get the friendly name of the operation.
+ *
+ * @return the description value
+ */
+ public String description() {
+ return this.description;
+ }
+
+}
diff --git a/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/Operations.java b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/Operations.java
new file mode 100644
index 000000000000..a4e72336193f
--- /dev/null
+++ b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/Operations.java
@@ -0,0 +1,27 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.search.v2015_08_19;
+
+import rx.Observable;
+import com.microsoft.azure.management.search.v2015_08_19.implementation.OperationsInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing Operations.
+ */
+public interface Operations extends HasInner {
+ /**
+ * Lists all of the available REST API operations of the Microsoft.Search provider.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listAsync();
+
+}
diff --git a/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/ProvisioningState.java b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/ProvisioningState.java
new file mode 100644
index 000000000000..7ae1ffa7e352
--- /dev/null
+++ b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/ProvisioningState.java
@@ -0,0 +1,56 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.search.v2015_08_19;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Defines values for ProvisioningState.
+ */
+public enum ProvisioningState {
+ /** Enum value succeeded. */
+ SUCCEEDED("succeeded"),
+
+ /** Enum value provisioning. */
+ PROVISIONING("provisioning"),
+
+ /** Enum value failed. */
+ FAILED("failed");
+
+ /** The actual serialized value for a ProvisioningState instance. */
+ private String value;
+
+ ProvisioningState(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Parses a serialized value to a ProvisioningState instance.
+ *
+ * @param value the serialized value to parse.
+ * @return the parsed ProvisioningState object, or null if unable to parse.
+ */
+ @JsonCreator
+ public static ProvisioningState fromString(String value) {
+ ProvisioningState[] items = ProvisioningState.values();
+ for (ProvisioningState item : items) {
+ if (item.toString().equalsIgnoreCase(value)) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ @JsonValue
+ @Override
+ public String toString() {
+ return this.value;
+ }
+}
diff --git a/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/QueryKey.java b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/QueryKey.java
new file mode 100644
index 000000000000..f8cd6bc03e68
--- /dev/null
+++ b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/QueryKey.java
@@ -0,0 +1,30 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.search.v2015_08_19;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.search.v2015_08_19.implementation.QueryKeyInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.search.v2015_08_19.implementation.SearchManager;
+
+/**
+ * Type representing QueryKey.
+ */
+public interface QueryKey extends HasInner, HasManager {
+ /**
+ * @return the key value.
+ */
+ String keyVal();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+}
diff --git a/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/QueryKeys.java b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/QueryKeys.java
new file mode 100644
index 000000000000..1bfc52f93554
--- /dev/null
+++ b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/QueryKeys.java
@@ -0,0 +1,62 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.search.v2015_08_19;
+
+import rx.Observable;
+import com.microsoft.azure.management.search.v2015_08_19.implementation.QueryKeysInner;
+import com.microsoft.azure.arm.model.HasInner;
+import rx.Completable;
+
+/**
+ * Type representing QueryKeys.
+ */
+public interface QueryKeys extends HasInner {
+ /**
+ * 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
+ * @return the observable for the request
+ */
+ Observable listBySearchServiceGetAsync(String resourceGroupName, String searchServiceName);
+
+ /**
+ * 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
+ * @return the observable for the request
+ */
+ Observable createAsync(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
+ * @return the observable for the request
+ */
+ Observable listBySearchServiceAsync(String resourceGroupName, String searchServiceName);
+
+ /**
+ * 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
+ * @return the observable for the request
+ */
+ Completable deleteAsync(String resourceGroupName, String searchServiceName, String key);
+
+}
diff --git a/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/SearchManagementRequestOptions.java b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/SearchManagementRequestOptions.java
new file mode 100644
index 000000000000..799598ce2636
--- /dev/null
+++ b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/SearchManagementRequestOptions.java
@@ -0,0 +1,46 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.search.v2015_08_19;
+
+import java.util.UUID;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Additional parameters for a set of operations.
+ */
+public class SearchManagementRequestOptions {
+ /**
+ * 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.
+ */
+ @JsonProperty(value = "")
+ private UUID clientRequestId;
+
+ /**
+ * Get 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.
+ *
+ * @return the clientRequestId value
+ */
+ public UUID clientRequestId() {
+ return this.clientRequestId;
+ }
+
+ /**
+ * Set 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 clientRequestId the clientRequestId value to set
+ * @return the SearchManagementRequestOptions object itself.
+ */
+ public SearchManagementRequestOptions withClientRequestId(UUID clientRequestId) {
+ this.clientRequestId = clientRequestId;
+ return this;
+ }
+
+}
diff --git a/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/SearchService.java b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/SearchService.java
new file mode 100644
index 000000000000..192a1f6beb66
--- /dev/null
+++ b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/SearchService.java
@@ -0,0 +1,253 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.search.v2015_08_19;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.Resource;
+import com.microsoft.azure.arm.resources.models.GroupableResourceCore;
+import com.microsoft.azure.arm.resources.models.HasResourceGroup;
+import com.microsoft.azure.arm.model.Refreshable;
+import com.microsoft.azure.arm.model.Updatable;
+import com.microsoft.azure.arm.model.Appliable;
+import com.microsoft.azure.arm.model.Creatable;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.search.v2015_08_19.implementation.SearchManager;
+import java.util.UUID;
+import com.microsoft.azure.management.search.v2015_08_19.implementation.SearchServiceInner;
+
+/**
+ * Type representing SearchService.
+ */
+public interface SearchService extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager {
+ /**
+ * @return the hostingMode value.
+ */
+ HostingMode hostingMode();
+
+ /**
+ * @return the identity value.
+ */
+ Identity identity();
+
+ /**
+ * @return the partitionCount value.
+ */
+ Integer partitionCount();
+
+ /**
+ * @return the provisioningState value.
+ */
+ ProvisioningState provisioningState();
+
+ /**
+ * @return the replicaCount value.
+ */
+ Integer replicaCount();
+
+ /**
+ * @return the sku value.
+ */
+ Sku sku();
+
+ /**
+ * @return the status value.
+ */
+ SearchServiceStatus status();
+
+ /**
+ * @return the statusDetails value.
+ */
+ String statusDetails();
+
+ /**
+ * The entirety of the SearchService definition.
+ */
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithSearchManagementRequestOptions, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * Grouping of SearchService definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of a SearchService definition.
+ */
+ interface Blank extends GroupableResourceCore.DefinitionWithRegion {
+ }
+
+ /**
+ * The stage of the SearchService definition allowing to specify the resource group.
+ */
+ interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup {
+ }
+
+ /**
+ * The stage of the searchservice definition allowing to specify SearchManagementRequestOptions.
+ */
+ interface WithSearchManagementRequestOptions {
+ /**
+ * Specifies searchManagementRequestOptions.
+ * @param searchManagementRequestOptions Additional parameters for the operation
+ * @return the next definition stage
+*/
+ WithCreate withSearchManagementRequestOptions(SearchManagementRequestOptions searchManagementRequestOptions);
+ }
+
+ /**
+ * The stage of the searchservice definition allowing to specify HostingMode.
+ */
+ interface WithHostingMode {
+ /**
+ * Specifies hostingMode.
+ * @param hostingMode 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'. Possible values include: 'default', 'highDensity'
+ * @return the next definition stage
+ */
+ WithCreate withHostingMode(HostingMode hostingMode);
+ }
+
+ /**
+ * The stage of the searchservice definition allowing to specify Identity.
+ */
+ interface WithIdentity {
+ /**
+ * Specifies identity.
+ * @param identity The identity of the resource
+ * @return the next definition stage
+ */
+ WithCreate withIdentity(Identity identity);
+ }
+
+ /**
+ * The stage of the searchservice definition allowing to specify PartitionCount.
+ */
+ interface WithPartitionCount {
+ /**
+ * Specifies partitionCount.
+ * @param partitionCount 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 next definition stage
+ */
+ WithCreate withPartitionCount(Integer partitionCount);
+ }
+
+ /**
+ * The stage of the searchservice definition allowing to specify ReplicaCount.
+ */
+ interface WithReplicaCount {
+ /**
+ * Specifies replicaCount.
+ * @param replicaCount 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 next definition stage
+ */
+ WithCreate withReplicaCount(Integer replicaCount);
+ }
+
+ /**
+ * The stage of the searchservice definition allowing to specify Sku.
+ */
+ interface WithSku {
+ /**
+ * Specifies sku.
+ * @param sku 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 next definition stage
+ */
+ WithCreate withSku(Sku sku);
+ }
+
+ /**
+ * The stage of the definition which contains all the minimum required inputs for
+ * the resource to be created (via {@link WithCreate#create()}), but also allows
+ * for any other optional settings to be specified.
+ */
+ interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithHostingMode, DefinitionStages.WithIdentity, DefinitionStages.WithPartitionCount, DefinitionStages.WithReplicaCount, DefinitionStages.WithSku {
+ }
+ }
+ /**
+ * The template for a SearchService update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithSearchManagementRequestOptions, UpdateStages.WithHostingMode, UpdateStages.WithIdentity, UpdateStages.WithPartitionCount, UpdateStages.WithReplicaCount, UpdateStages.WithSku {
+ }
+
+ /**
+ * Grouping of SearchService update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the searchservice update allowing to specify SearchManagementRequestOptions.
+ */
+ interface WithSearchManagementRequestOptions {
+ /**
+ * Specifies searchManagementRequestOptions.
+ * @param searchManagementRequestOptions Additional parameters for the operation
+ * @return the next update stage
+ */
+ Update withSearchManagementRequestOptions(SearchManagementRequestOptions searchManagementRequestOptions);
+ }
+
+ /**
+ * The stage of the searchservice update allowing to specify HostingMode.
+ */
+ interface WithHostingMode {
+ /**
+ * Specifies hostingMode.
+ * @param hostingMode 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'. Possible values include: 'default', 'highDensity'
+ * @return the next update stage
+ */
+ Update withHostingMode(HostingMode hostingMode);
+ }
+
+ /**
+ * The stage of the searchservice update allowing to specify Identity.
+ */
+ interface WithIdentity {
+ /**
+ * Specifies identity.
+ * @param identity The identity of the resource
+ * @return the next update stage
+ */
+ Update withIdentity(Identity identity);
+ }
+
+ /**
+ * The stage of the searchservice update allowing to specify PartitionCount.
+ */
+ interface WithPartitionCount {
+ /**
+ * Specifies partitionCount.
+ * @param partitionCount 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 next update stage
+ */
+ Update withPartitionCount(Integer partitionCount);
+ }
+
+ /**
+ * The stage of the searchservice update allowing to specify ReplicaCount.
+ */
+ interface WithReplicaCount {
+ /**
+ * Specifies replicaCount.
+ * @param replicaCount 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 next update stage
+ */
+ Update withReplicaCount(Integer replicaCount);
+ }
+
+ /**
+ * The stage of the searchservice update allowing to specify Sku.
+ */
+ interface WithSku {
+ /**
+ * Specifies sku.
+ * @param sku 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 next update stage
+ */
+ Update withSku(Sku sku);
+ }
+
+ }
+}
diff --git a/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/SearchServiceStatus.java b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/SearchServiceStatus.java
new file mode 100644
index 000000000000..1c87a0cdbd87
--- /dev/null
+++ b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/SearchServiceStatus.java
@@ -0,0 +1,65 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.search.v2015_08_19;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Defines values for SearchServiceStatus.
+ */
+public enum SearchServiceStatus {
+ /** Enum value running. */
+ RUNNING("running"),
+
+ /** Enum value provisioning. */
+ PROVISIONING("provisioning"),
+
+ /** Enum value deleting. */
+ DELETING("deleting"),
+
+ /** Enum value degraded. */
+ DEGRADED("degraded"),
+
+ /** Enum value disabled. */
+ DISABLED("disabled"),
+
+ /** Enum value error. */
+ ERROR("error");
+
+ /** The actual serialized value for a SearchServiceStatus instance. */
+ private String value;
+
+ SearchServiceStatus(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Parses a serialized value to a SearchServiceStatus instance.
+ *
+ * @param value the serialized value to parse.
+ * @return the parsed SearchServiceStatus object, or null if unable to parse.
+ */
+ @JsonCreator
+ public static SearchServiceStatus fromString(String value) {
+ SearchServiceStatus[] items = SearchServiceStatus.values();
+ for (SearchServiceStatus item : items) {
+ if (item.toString().equalsIgnoreCase(value)) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ @JsonValue
+ @Override
+ public String toString() {
+ return this.value;
+ }
+}
diff --git a/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/Services.java b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/Services.java
new file mode 100644
index 000000000000..bd9e9ca24416
--- /dev/null
+++ b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/Services.java
@@ -0,0 +1,34 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.search.v2015_08_19;
+
+import com.microsoft.azure.arm.collection.SupportsCreating;
+import com.microsoft.azure.arm.resources.collection.SupportsDeletingByResourceGroup;
+import com.microsoft.azure.arm.resources.collection.SupportsBatchDeletion;
+import com.microsoft.azure.arm.resources.collection.SupportsGettingByResourceGroup;
+import rx.Observable;
+import com.microsoft.azure.arm.resources.collection.SupportsListingByResourceGroup;
+import com.microsoft.azure.arm.collection.SupportsListing;
+import com.microsoft.azure.management.search.v2015_08_19.implementation.ServicesInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing Services.
+ */
+public interface Services extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner {
+ /**
+ * 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 name The Search service name to validate. 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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable checkNameAvailabilityAsync(String name);
+
+}
diff --git a/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/Sku.java b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/Sku.java
new file mode 100644
index 000000000000..d75302b7ef9a
--- /dev/null
+++ b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/Sku.java
@@ -0,0 +1,54 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.search.v2015_08_19;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Defines the SKU of an Azure Cognitive Search Service, which determines price
+ * tier and capacity limits.
+ */
+public class Sku {
+ /**
+ * The SKU of the Search service. Valid values include: 'free': Shared
+ * service. 'basic': Dedicated service with up to 3 replicas. 'standard':
+ * Dedicated service with up to 12 partitions and 12 replicas. 'standard2':
+ * Similar to standard, but with more capacity per search unit.
+ * 'standard3': The largest Standard offering with up to 12 partitions and
+ * 12 replicas (or up to 3 partitions with more indexes if you also set the
+ * hostingMode property to 'highDensity'). 'storage_optimized_l1': Supports
+ * 1TB per partition, up to 12 partitions. 'storage_optimized_l2': Supports
+ * 2TB per partition, up to 12 partitions.'. Possible values include:
+ * 'free', 'basic', 'standard', 'standard2', 'standard3',
+ * 'storage_optimized_l1', 'storage_optimized_l2'.
+ */
+ @JsonProperty(value = "name")
+ private SkuName name;
+
+ /**
+ * Get the SKU of the Search service. Valid values include: 'free': Shared service. 'basic': Dedicated service with up to 3 replicas. 'standard': Dedicated service with up to 12 partitions and 12 replicas. 'standard2': Similar to standard, but with more capacity per search unit. 'standard3': The largest Standard offering with up to 12 partitions and 12 replicas (or up to 3 partitions with more indexes if you also set the hostingMode property to 'highDensity'). 'storage_optimized_l1': Supports 1TB per partition, up to 12 partitions. 'storage_optimized_l2': Supports 2TB per partition, up to 12 partitions.'. Possible values include: 'free', 'basic', 'standard', 'standard2', 'standard3', 'storage_optimized_l1', 'storage_optimized_l2'.
+ *
+ * @return the name value
+ */
+ public SkuName name() {
+ return this.name;
+ }
+
+ /**
+ * Set the SKU of the Search service. Valid values include: 'free': Shared service. 'basic': Dedicated service with up to 3 replicas. 'standard': Dedicated service with up to 12 partitions and 12 replicas. 'standard2': Similar to standard, but with more capacity per search unit. 'standard3': The largest Standard offering with up to 12 partitions and 12 replicas (or up to 3 partitions with more indexes if you also set the hostingMode property to 'highDensity'). 'storage_optimized_l1': Supports 1TB per partition, up to 12 partitions. 'storage_optimized_l2': Supports 2TB per partition, up to 12 partitions.'. Possible values include: 'free', 'basic', 'standard', 'standard2', 'standard3', 'storage_optimized_l1', 'storage_optimized_l2'.
+ *
+ * @param name the name value to set
+ * @return the Sku object itself.
+ */
+ public Sku withName(SkuName name) {
+ this.name = name;
+ return this;
+ }
+
+}
diff --git a/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/SkuName.java b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/SkuName.java
new file mode 100644
index 000000000000..61f3745183ae
--- /dev/null
+++ b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/SkuName.java
@@ -0,0 +1,68 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.search.v2015_08_19;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Defines values for SkuName.
+ */
+public enum SkuName {
+ /** Enum value free. */
+ FREE("free"),
+
+ /** Enum value basic. */
+ BASIC("basic"),
+
+ /** Enum value standard. */
+ STANDARD("standard"),
+
+ /** Enum value standard2. */
+ STANDARD2("standard2"),
+
+ /** Enum value standard3. */
+ STANDARD3("standard3"),
+
+ /** Enum value storage_optimized_l1. */
+ STORAGE_OPTIMIZED_L1("storage_optimized_l1"),
+
+ /** Enum value storage_optimized_l2. */
+ STORAGE_OPTIMIZED_L2("storage_optimized_l2");
+
+ /** The actual serialized value for a SkuName instance. */
+ private String value;
+
+ SkuName(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Parses a serialized value to a SkuName instance.
+ *
+ * @param value the serialized value to parse.
+ * @return the parsed SkuName object, or null if unable to parse.
+ */
+ @JsonCreator
+ public static SkuName fromString(String value) {
+ SkuName[] items = SkuName.values();
+ for (SkuName item : items) {
+ if (item.toString().equalsIgnoreCase(value)) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ @JsonValue
+ @Override
+ public String toString() {
+ return this.value;
+ }
+}
diff --git a/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/UnavailableNameReason.java b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/UnavailableNameReason.java
new file mode 100644
index 000000000000..68db24c5e605
--- /dev/null
+++ b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/UnavailableNameReason.java
@@ -0,0 +1,41 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.search.v2015_08_19;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for UnavailableNameReason.
+ */
+public final class UnavailableNameReason extends ExpandableStringEnum {
+ /** Static value Invalid for UnavailableNameReason. */
+ public static final UnavailableNameReason INVALID = fromString("Invalid");
+
+ /** Static value AlreadyExists for UnavailableNameReason. */
+ public static final UnavailableNameReason ALREADY_EXISTS = fromString("AlreadyExists");
+
+ /**
+ * Creates or finds a UnavailableNameReason from its string representation.
+ * @param name a name to look for
+ * @return the corresponding UnavailableNameReason
+ */
+ @JsonCreator
+ public static UnavailableNameReason fromString(String name) {
+ return fromString(name, UnavailableNameReason.class);
+ }
+
+ /**
+ * @return known UnavailableNameReason values
+ */
+ public static Collection values() {
+ return values(UnavailableNameReason.class);
+ }
+}
diff --git a/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/implementation/AdminKeyResultImpl.java b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/implementation/AdminKeyResultImpl.java
new file mode 100644
index 000000000000..5c9f9a553e02
--- /dev/null
+++ b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/implementation/AdminKeyResultImpl.java
@@ -0,0 +1,36 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.search.v2015_08_19.implementation;
+
+import com.microsoft.azure.management.search.v2015_08_19.AdminKeyResult;
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+
+class AdminKeyResultImpl extends WrapperImpl implements AdminKeyResult {
+ private final SearchManager manager;
+ AdminKeyResultImpl(AdminKeyResultInner inner, SearchManager manager) {
+ super(inner);
+ this.manager = manager;
+ }
+
+ @Override
+ public SearchManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public String primaryKey() {
+ return this.inner().primaryKey();
+ }
+
+ @Override
+ public String secondaryKey() {
+ return this.inner().secondaryKey();
+ }
+
+}
diff --git a/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/implementation/AdminKeyResultInner.java b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/implementation/AdminKeyResultInner.java
new file mode 100644
index 000000000000..4213f48b7800
--- /dev/null
+++ b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/implementation/AdminKeyResultInner.java
@@ -0,0 +1,48 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.search.v2015_08_19.implementation;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Response containing the primary and secondary admin API keys for a given
+ * Azure Cognitive Search service.
+ */
+public 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;
+
+ /**
+ * Get the primary admin API key of the Search service.
+ *
+ * @return the primaryKey value
+ */
+ public String primaryKey() {
+ return this.primaryKey;
+ }
+
+ /**
+ * Get the secondary admin API key of the Search service.
+ *
+ * @return the secondaryKey value
+ */
+ public String secondaryKey() {
+ return this.secondaryKey;
+ }
+
+}
diff --git a/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/implementation/AdminKeysImpl.java b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/implementation/AdminKeysImpl.java
new file mode 100644
index 000000000000..14ab8be4f2f2
--- /dev/null
+++ b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/implementation/AdminKeysImpl.java
@@ -0,0 +1,55 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * abc
+ */
+
+package com.microsoft.azure.management.search.v2015_08_19.implementation;
+
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import com.microsoft.azure.management.search.v2015_08_19.AdminKeys;
+import rx.functions.Func1;
+import rx.Observable;
+import com.microsoft.azure.management.search.v2015_08_19.AdminKeyResult;
+import com.microsoft.azure.management.search.v2015_08_19.AdminKeyKind;
+
+class AdminKeysImpl extends WrapperImpl implements AdminKeys {
+ private final SearchManager manager;
+
+ AdminKeysImpl(SearchManager manager) {
+ super(manager.inner().adminKeys());
+ this.manager = manager;
+ }
+
+ public SearchManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public Observable getAsync(String resourceGroupName, String searchServiceName) {
+ AdminKeysInner client = this.inner();
+ return client.getAsync(resourceGroupName, searchServiceName)
+ .map(new Func1() {
+ @Override
+ public AdminKeyResult call(AdminKeyResultInner inner) {
+ return new AdminKeyResultImpl(inner, manager());
+ }
+ });
+ }
+
+ @Override
+ public Observable regenerateAsync(String resourceGroupName, String searchServiceName, AdminKeyKind keyKind) {
+ AdminKeysInner client = this.inner();
+ return client.regenerateAsync(resourceGroupName, searchServiceName, keyKind)
+ .map(new Func1() {
+ @Override
+ public AdminKeyResult call(AdminKeyResultInner inner) {
+ return new AdminKeyResultImpl(inner, manager());
+ }
+ });
+ }
+
+}
diff --git a/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/implementation/AdminKeysInner.java b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/implementation/AdminKeysInner.java
new file mode 100644
index 000000000000..c21fc1c94f0c
--- /dev/null
+++ b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/implementation/AdminKeysInner.java
@@ -0,0 +1,434 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.search.v2015_08_19.implementation;
+
+import retrofit2.Retrofit;
+import com.google.common.reflect.TypeToken;
+import com.microsoft.azure.CloudException;
+import com.microsoft.azure.management.search.v2015_08_19.AdminKeyKind;
+import com.microsoft.azure.management.search.v2015_08_19.SearchManagementRequestOptions;
+import com.microsoft.rest.ServiceCallback;
+import com.microsoft.rest.ServiceFuture;
+import com.microsoft.rest.ServiceResponse;
+import com.microsoft.rest.Validator;
+import java.io.IOException;
+import java.util.UUID;
+import okhttp3.ResponseBody;
+import retrofit2.http.Header;
+import retrofit2.http.Headers;
+import retrofit2.http.Path;
+import retrofit2.http.POST;
+import retrofit2.http.Query;
+import retrofit2.Response;
+import rx.functions.Func1;
+import rx.Observable;
+
+/**
+ * An instance of this class provides access to all the operations defined
+ * in AdminKeys.
+ */
+public class AdminKeysInner {
+ /** The Retrofit service to perform REST calls. */
+ private AdminKeysService service;
+ /** The service client containing this operation class. */
+ private SearchManagementClientImpl client;
+
+ /**
+ * Initializes an instance of AdminKeysInner.
+ *
+ * @param retrofit the Retrofit instance built from a Retrofit Builder.
+ * @param client the instance of the service client containing this operation class.
+ */
+ public AdminKeysInner(Retrofit retrofit, SearchManagementClientImpl client) {
+ this.service = retrofit.create(AdminKeysService.class);
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for AdminKeys to be
+ * used by Retrofit to perform actually REST calls.
+ */
+ interface AdminKeysService {
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.search.v2015_08_19.AdminKeys get" })
+ @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/listAdminKeys")
+ Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("searchServiceName") String searchServiceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("x-ms-client-request-id") UUID clientRequestId, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.search.v2015_08_19.AdminKeys regenerate" })
+ @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/regenerateAdminKey/{keyKind}")
+ Observable> regenerate(@Path("resourceGroupName") String resourceGroupName, @Path("searchServiceName") String searchServiceName, @Path("keyKind") AdminKeyKind keyKind, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("x-ms-client-request-id") UUID clientRequestId, @Header("User-Agent") String userAgent);
+
+ }
+
+ /**
+ * 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 CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the AdminKeyResultInner object if successful.
+ */
+ public AdminKeyResultInner get(String resourceGroupName, String searchServiceName) {
+ return getWithServiceResponseAsync(resourceGroupName, searchServiceName).toBlocking().single().body();
+ }
+
+ /**
+ * 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 serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture getAsync(String resourceGroupName, String searchServiceName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, searchServiceName), serviceCallback);
+ }
+
+ /**
+ * 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
+ * @return the observable to the AdminKeyResultInner object
+ */
+ public Observable getAsync(String resourceGroupName, String searchServiceName) {
+ return getWithServiceResponseAsync(resourceGroupName, searchServiceName).map(new Func1, AdminKeyResultInner>() {
+ @Override
+ public AdminKeyResultInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * 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
+ * @return the observable to the AdminKeyResultInner object
+ */
+ public Observable> getWithServiceResponseAsync(String resourceGroupName, String searchServiceName) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (searchServiceName == null) {
+ throw new IllegalArgumentException("Parameter searchServiceName is required and cannot be null.");
+ }
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ final SearchManagementRequestOptions searchManagementRequestOptions = null;
+ UUID clientRequestId = null;
+ return service.get(resourceGroupName, searchServiceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), clientRequestId, this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = getDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ /**
+ * 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 searchManagementRequestOptions Additional parameters for the operation
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the AdminKeyResultInner object if successful.
+ */
+ public AdminKeyResultInner get(String resourceGroupName, String searchServiceName, SearchManagementRequestOptions searchManagementRequestOptions) {
+ return getWithServiceResponseAsync(resourceGroupName, searchServiceName, searchManagementRequestOptions).toBlocking().single().body();
+ }
+
+ /**
+ * 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 searchManagementRequestOptions Additional parameters for the operation
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture getAsync(String resourceGroupName, String searchServiceName, SearchManagementRequestOptions searchManagementRequestOptions, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, searchServiceName, searchManagementRequestOptions), serviceCallback);
+ }
+
+ /**
+ * 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 searchManagementRequestOptions Additional parameters for the operation
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the AdminKeyResultInner object
+ */
+ public Observable getAsync(String resourceGroupName, String searchServiceName, SearchManagementRequestOptions searchManagementRequestOptions) {
+ return getWithServiceResponseAsync(resourceGroupName, searchServiceName, searchManagementRequestOptions).map(new Func1, AdminKeyResultInner>() {
+ @Override
+ public AdminKeyResultInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * 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 searchManagementRequestOptions Additional parameters for the operation
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the AdminKeyResultInner object
+ */
+ public Observable> getWithServiceResponseAsync(String resourceGroupName, String searchServiceName, SearchManagementRequestOptions searchManagementRequestOptions) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (searchServiceName == null) {
+ throw new IllegalArgumentException("Parameter searchServiceName is required and cannot be null.");
+ }
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ Validator.validate(searchManagementRequestOptions);
+ UUID clientRequestId = null;
+ if (searchManagementRequestOptions != null) {
+ clientRequestId = searchManagementRequestOptions.clientRequestId();
+ }
+ return service.get(resourceGroupName, searchServiceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), clientRequestId, this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = getDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
+ /**
+ * 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'. Possible values include: 'primary', 'secondary'
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the AdminKeyResultInner object if successful.
+ */
+ public AdminKeyResultInner regenerate(String resourceGroupName, String searchServiceName, AdminKeyKind keyKind) {
+ return regenerateWithServiceResponseAsync(resourceGroupName, searchServiceName, keyKind).toBlocking().single().body();
+ }
+
+ /**
+ * 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'. Possible values include: 'primary', 'secondary'
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture regenerateAsync(String resourceGroupName, String searchServiceName, AdminKeyKind keyKind, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(regenerateWithServiceResponseAsync(resourceGroupName, searchServiceName, keyKind), serviceCallback);
+ }
+
+ /**
+ * 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'. Possible values include: 'primary', 'secondary'
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the AdminKeyResultInner object
+ */
+ public Observable regenerateAsync(String resourceGroupName, String searchServiceName, AdminKeyKind keyKind) {
+ return regenerateWithServiceResponseAsync(resourceGroupName, searchServiceName, keyKind).map(new Func1, AdminKeyResultInner>() {
+ @Override
+ public AdminKeyResultInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * 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'. Possible values include: 'primary', 'secondary'
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the AdminKeyResultInner object
+ */
+ public Observable> regenerateWithServiceResponseAsync(String resourceGroupName, String searchServiceName, AdminKeyKind keyKind) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (searchServiceName == null) {
+ throw new IllegalArgumentException("Parameter searchServiceName is required and cannot be null.");
+ }
+ if (keyKind == null) {
+ throw new IllegalArgumentException("Parameter keyKind is required and cannot be null.");
+ }
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ final SearchManagementRequestOptions searchManagementRequestOptions = null;
+ UUID clientRequestId = null;
+ return service.regenerate(resourceGroupName, searchServiceName, keyKind, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), clientRequestId, this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = regenerateDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ /**
+ * 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'. Possible values include: 'primary', 'secondary'
+ * @param searchManagementRequestOptions Additional parameters for the operation
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the AdminKeyResultInner object if successful.
+ */
+ public AdminKeyResultInner regenerate(String resourceGroupName, String searchServiceName, AdminKeyKind keyKind, SearchManagementRequestOptions searchManagementRequestOptions) {
+ return regenerateWithServiceResponseAsync(resourceGroupName, searchServiceName, keyKind, searchManagementRequestOptions).toBlocking().single().body();
+ }
+
+ /**
+ * 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'. Possible values include: 'primary', 'secondary'
+ * @param searchManagementRequestOptions Additional parameters for the operation
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture regenerateAsync(String resourceGroupName, String searchServiceName, AdminKeyKind keyKind, SearchManagementRequestOptions searchManagementRequestOptions, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(regenerateWithServiceResponseAsync(resourceGroupName, searchServiceName, keyKind, searchManagementRequestOptions), serviceCallback);
+ }
+
+ /**
+ * 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'. Possible values include: 'primary', 'secondary'
+ * @param searchManagementRequestOptions Additional parameters for the operation
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the AdminKeyResultInner object
+ */
+ public Observable regenerateAsync(String resourceGroupName, String searchServiceName, AdminKeyKind keyKind, SearchManagementRequestOptions searchManagementRequestOptions) {
+ return regenerateWithServiceResponseAsync(resourceGroupName, searchServiceName, keyKind, searchManagementRequestOptions).map(new Func1, AdminKeyResultInner>() {
+ @Override
+ public AdminKeyResultInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * 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'. Possible values include: 'primary', 'secondary'
+ * @param searchManagementRequestOptions Additional parameters for the operation
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the AdminKeyResultInner object
+ */
+ public Observable> regenerateWithServiceResponseAsync(String resourceGroupName, String searchServiceName, AdminKeyKind keyKind, SearchManagementRequestOptions searchManagementRequestOptions) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (searchServiceName == null) {
+ throw new IllegalArgumentException("Parameter searchServiceName is required and cannot be null.");
+ }
+ if (keyKind == null) {
+ throw new IllegalArgumentException("Parameter keyKind is required and cannot be null.");
+ }
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ Validator.validate(searchManagementRequestOptions);
+ UUID clientRequestId = null;
+ if (searchManagementRequestOptions != null) {
+ clientRequestId = searchManagementRequestOptions.clientRequestId();
+ }
+ return service.regenerate(resourceGroupName, searchServiceName, keyKind, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), clientRequestId, this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = regenerateDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse regenerateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
+}
diff --git a/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/implementation/CheckNameAvailabilityOutputImpl.java b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/implementation/CheckNameAvailabilityOutputImpl.java
new file mode 100644
index 000000000000..b25674518906
--- /dev/null
+++ b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/implementation/CheckNameAvailabilityOutputImpl.java
@@ -0,0 +1,42 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.search.v2015_08_19.implementation;
+
+import com.microsoft.azure.management.search.v2015_08_19.CheckNameAvailabilityOutput;
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import com.microsoft.azure.management.search.v2015_08_19.UnavailableNameReason;
+
+class CheckNameAvailabilityOutputImpl extends WrapperImpl implements CheckNameAvailabilityOutput {
+ private final SearchManager manager;
+ CheckNameAvailabilityOutputImpl(CheckNameAvailabilityOutputInner inner, SearchManager manager) {
+ super(inner);
+ this.manager = manager;
+ }
+
+ @Override
+ public SearchManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public Boolean isNameAvailable() {
+ return this.inner().isNameAvailable();
+ }
+
+ @Override
+ public String message() {
+ return this.inner().message();
+ }
+
+ @Override
+ public UnavailableNameReason reason() {
+ return this.inner().reason();
+ }
+
+}
diff --git a/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/implementation/CheckNameAvailabilityOutputInner.java b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/implementation/CheckNameAvailabilityOutputInner.java
new file mode 100644
index 000000000000..514ad6e8eeff
--- /dev/null
+++ b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/implementation/CheckNameAvailabilityOutputInner.java
@@ -0,0 +1,69 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.search.v2015_08_19.implementation;
+
+import com.microsoft.azure.management.search.v2015_08_19.UnavailableNameReason;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Output of check name availability API.
+ */
+public 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. Possible values include:
+ * 'Invalid', 'AlreadyExists'.
+ */
+ @JsonProperty(value = "reason", access = JsonProperty.Access.WRITE_ONLY)
+ private UnavailableNameReason reason;
+
+ /**
+ * A message that explains why the name is invalid and provides resource
+ * naming requirements. Available only if 'Invalid' is returned in the
+ * 'reason' property.
+ */
+ @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY)
+ private String message;
+
+ /**
+ * Get a value indicating whether the name is available.
+ *
+ * @return the isNameAvailable value
+ */
+ public Boolean isNameAvailable() {
+ return this.isNameAvailable;
+ }
+
+ /**
+ * Get 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. Possible values include: 'Invalid', 'AlreadyExists'.
+ *
+ * @return the reason value
+ */
+ public UnavailableNameReason reason() {
+ return this.reason;
+ }
+
+ /**
+ * Get 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;
+ }
+
+}
diff --git a/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/implementation/IdParsingUtils.java b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/implementation/IdParsingUtils.java
new file mode 100644
index 000000000000..5ec32909a7ec
--- /dev/null
+++ b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/implementation/IdParsingUtils.java
@@ -0,0 +1,57 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.search.v2015_08_19.implementation;
+import java.util.Arrays;
+import java.util.Iterator;
+
+class IdParsingUtils {
+ public static String getValueFromIdByName(String id, String name) {
+ if (id == null) {
+ return null;
+ }
+ Iterable iterable = Arrays.asList(id.split("/"));
+ Iterator itr = iterable.iterator();
+ while (itr.hasNext()) {
+ String part = itr.next();
+ if (part != null && part.trim() != "") {
+ if (part.equalsIgnoreCase(name)) {
+ if (itr.hasNext()) {
+ return itr.next();
+ } else {
+ return null;
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+ public static String getValueFromIdByPosition(String id, int pos) {
+ if (id == null) {
+ return null;
+ }
+ Iterable iterable = Arrays.asList(id.split("/"));
+ Iterator itr = iterable.iterator();
+ int index = 0;
+ while (itr.hasNext()) {
+ String part = itr.next();
+ if (part != null && part.trim() != "") {
+ if (index == pos) {
+ if (itr.hasNext()) {
+ return itr.next();
+ } else {
+ return null;
+ }
+ }
+ }
+ index++;
+ }
+ return null;
+ }
+}
diff --git a/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/implementation/OperationImpl.java b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/implementation/OperationImpl.java
new file mode 100644
index 000000000000..45b445169d15
--- /dev/null
+++ b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/implementation/OperationImpl.java
@@ -0,0 +1,37 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.search.v2015_08_19.implementation;
+
+import com.microsoft.azure.management.search.v2015_08_19.Operation;
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import com.microsoft.azure.management.search.v2015_08_19.OperationDisplay;
+
+class OperationImpl extends WrapperImpl implements Operation {
+ private final SearchManager manager;
+ OperationImpl(OperationInner inner, SearchManager manager) {
+ super(inner);
+ this.manager = manager;
+ }
+
+ @Override
+ public SearchManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public OperationDisplay display() {
+ return this.inner().display();
+ }
+
+ @Override
+ public String name() {
+ return this.inner().name();
+ }
+
+}
diff --git a/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/implementation/OperationInner.java b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/implementation/OperationInner.java
new file mode 100644
index 000000000000..3b953597d05c
--- /dev/null
+++ b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/implementation/OperationInner.java
@@ -0,0 +1,49 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.search.v2015_08_19.implementation;
+
+import com.microsoft.azure.management.search.v2015_08_19.OperationDisplay;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Describes a REST API operation.
+ */
+public 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;
+
+ /**
+ * Get 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 object that describes the operation.
+ *
+ * @return the display value
+ */
+ public OperationDisplay display() {
+ return this.display;
+ }
+
+}
diff --git a/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/implementation/OperationsImpl.java b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/implementation/OperationsImpl.java
new file mode 100644
index 000000000000..26d4f5119a6a
--- /dev/null
+++ b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/implementation/OperationsImpl.java
@@ -0,0 +1,49 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * abc
+ */
+
+package com.microsoft.azure.management.search.v2015_08_19.implementation;
+
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import com.microsoft.azure.management.search.v2015_08_19.Operations;
+import rx.functions.Func1;
+import rx.Observable;
+import java.util.List;
+import com.microsoft.azure.management.search.v2015_08_19.Operation;
+
+class OperationsImpl extends WrapperImpl implements Operations {
+ private final SearchManager manager;
+
+ OperationsImpl(SearchManager manager) {
+ super(manager.inner().operations());
+ this.manager = manager;
+ }
+
+ public SearchManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public Observable listAsync() {
+ OperationsInner client = this.inner();
+ return client.listAsync()
+ .flatMap(new Func1, Observable>() {
+ @Override
+ public Observable call(List innerList) {
+ return Observable.from(innerList);
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public Operation call(OperationInner inner) {
+ return new OperationImpl(inner, manager());
+ }
+ });
+ }
+
+}
diff --git a/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/implementation/OperationsInner.java b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/implementation/OperationsInner.java
new file mode 100644
index 000000000000..5f89d509efe9
--- /dev/null
+++ b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/implementation/OperationsInner.java
@@ -0,0 +1,134 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.search.v2015_08_19.implementation;
+
+import retrofit2.Retrofit;
+import com.google.common.reflect.TypeToken;
+import com.microsoft.azure.CloudException;
+import com.microsoft.rest.ServiceCallback;
+import com.microsoft.rest.ServiceFuture;
+import com.microsoft.rest.ServiceResponse;
+import java.io.IOException;
+import java.util.List;
+import okhttp3.ResponseBody;
+import retrofit2.http.GET;
+import retrofit2.http.Header;
+import retrofit2.http.Headers;
+import retrofit2.http.Query;
+import retrofit2.Response;
+import rx.functions.Func1;
+import rx.Observable;
+
+/**
+ * An instance of this class provides access to all the operations defined
+ * in Operations.
+ */
+public class OperationsInner {
+ /** The Retrofit service to perform REST calls. */
+ private OperationsService service;
+ /** The service client containing this operation class. */
+ private SearchManagementClientImpl client;
+
+ /**
+ * Initializes an instance of OperationsInner.
+ *
+ * @param retrofit the Retrofit instance built from a Retrofit Builder.
+ * @param client the instance of the service client containing this operation class.
+ */
+ public OperationsInner(Retrofit retrofit, SearchManagementClientImpl client) {
+ this.service = retrofit.create(OperationsService.class);
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for Operations to be
+ * used by Retrofit to perform actually REST calls.
+ */
+ interface OperationsService {
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.search.v2015_08_19.Operations list" })
+ @GET("providers/Microsoft.Search/operations")
+ Observable> list(@Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ }
+
+ /**
+ * Lists all of the available REST API operations of the Microsoft.Search provider.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the List<OperationInner> object if successful.
+ */
+ public List list() {
+ return listWithServiceResponseAsync().toBlocking().single().body();
+ }
+
+ /**
+ * Lists all of the available REST API operations of the Microsoft.Search provider.
+ *
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture> listAsync(final ServiceCallback> serviceCallback) {
+ return ServiceFuture.fromResponse(listWithServiceResponseAsync(), serviceCallback);
+ }
+
+ /**
+ * Lists all of the available REST API operations of the Microsoft.Search provider.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the List<OperationInner> object
+ */
+ public Observable> listAsync() {
+ return listWithServiceResponseAsync().map(new Func1>, List>() {
+ @Override
+ public List call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Lists all of the available REST API operations of the Microsoft.Search provider.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the List<OperationInner> object
+ */
+ public Observable>> listWithServiceResponseAsync() {
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ return service.list(this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>>() {
+ @Override
+ public Observable>> call(Response response) {
+ try {
+ ServiceResponse> result = listDelegate(response);
+ List items = null;
+ if (result.body() != null) {
+ items = result.body().items();
+ }
+ ServiceResponse> clientResponse = new ServiceResponse>(items, result.response());
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken>() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
+}
diff --git a/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/implementation/PageImpl.java b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/implementation/PageImpl.java
new file mode 100644
index 000000000000..b74002f16928
--- /dev/null
+++ b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/implementation/PageImpl.java
@@ -0,0 +1,75 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.search.v2015_08_19.implementation;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.azure.Page;
+import java.util.List;
+
+/**
+ * An instance of this class defines a page of Azure resources and a link to
+ * get the next page of resources, if any.
+ *
+ * @param type of Azure resource
+ */
+public class PageImpl implements Page {
+ /**
+ * The link to the next page.
+ */
+ @JsonProperty("")
+ private String nextPageLink;
+
+ /**
+ * The list of items.
+ */
+ @JsonProperty("value")
+ private List items;
+
+ /**
+ * Gets the link to the next page.
+ *
+ * @return the link to the next page.
+ */
+ @Override
+ public String nextPageLink() {
+ return this.nextPageLink;
+ }
+
+ /**
+ * Gets the list of items.
+ *
+ * @return the list of items in {@link List}.
+ */
+ @Override
+ public List items() {
+ return items;
+ }
+
+ /**
+ * Sets the link to the next page.
+ *
+ * @param nextPageLink the link to the next page.
+ * @return this Page object itself.
+ */
+ public PageImpl setNextPageLink(String nextPageLink) {
+ this.nextPageLink = nextPageLink;
+ return this;
+ }
+
+ /**
+ * Sets the list of items.
+ *
+ * @param items the list of items in {@link List}.
+ * @return this Page object itself.
+ */
+ public PageImpl setItems(List items) {
+ this.items = items;
+ return this;
+ }
+}
diff --git a/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/implementation/QueryKeyImpl.java b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/implementation/QueryKeyImpl.java
new file mode 100644
index 000000000000..1b1d9bc54940
--- /dev/null
+++ b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/implementation/QueryKeyImpl.java
@@ -0,0 +1,40 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.search.v2015_08_19.implementation;
+
+import com.microsoft.azure.management.search.v2015_08_19.QueryKey;
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import rx.Observable;
+
+class QueryKeyImpl extends WrapperImpl implements QueryKey {
+ private final SearchManager manager;
+
+ QueryKeyImpl(QueryKeyInner inner, SearchManager manager) {
+ super(inner);
+ this.manager = manager;
+ }
+
+ @Override
+ public SearchManager manager() {
+ return this.manager;
+ }
+
+
+
+ @Override
+ public String keyVal() {
+ return this.inner().key();
+ }
+
+ @Override
+ public String name() {
+ return this.inner().name();
+ }
+
+}
diff --git a/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/implementation/QueryKeyInner.java b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/implementation/QueryKeyInner.java
new file mode 100644
index 000000000000..ecba217877b1
--- /dev/null
+++ b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/implementation/QueryKeyInner.java
@@ -0,0 +1,48 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.search.v2015_08_19.implementation;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Describes an API key for a given Azure Cognitive Search service that has
+ * permissions for query operations only.
+ */
+public 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;
+
+ /**
+ * Get the name of the query API key; may be empty.
+ *
+ * @return the name value
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the value of the query API key.
+ *
+ * @return the key value
+ */
+ public String key() {
+ return this.key;
+ }
+
+}
diff --git a/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/implementation/QueryKeysImpl.java b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/implementation/QueryKeysImpl.java
new file mode 100644
index 000000000000..5090771b62bb
--- /dev/null
+++ b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/implementation/QueryKeysImpl.java
@@ -0,0 +1,90 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ *
+ */
+
+package com.microsoft.azure.management.search.v2015_08_19.implementation;
+
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import com.microsoft.azure.management.search.v2015_08_19.QueryKeys;
+import rx.Observable;
+import rx.functions.Func1;
+import java.util.List;
+import com.microsoft.azure.management.search.v2015_08_19.QueryKey;
+import rx.Completable;
+
+class QueryKeysImpl extends WrapperImpl implements QueryKeys {
+ private final SearchManager manager;
+
+ QueryKeysImpl(SearchManager manager) {
+ super(manager.inner().queryKeys());
+ this.manager = manager;
+ }
+
+ public SearchManager manager() {
+ return this.manager;
+ }
+
+ private QueryKeyImpl wrapModel(QueryKeyInner inner) {
+ return new QueryKeyImpl(inner, manager());
+ }
+
+ @Override
+ public Observable listBySearchServiceGetAsync(String resourceGroupName, String searchServiceName) {
+ QueryKeysInner client = this.inner();
+ return client.listBySearchServiceGetAsync(resourceGroupName, searchServiceName)
+ .flatMap(new Func1, Observable>() {
+ @Override
+ public Observable call(List innerList) {
+ return Observable.from(innerList);
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public QueryKey call(QueryKeyInner inner) {
+ return wrapModel(inner);
+ }
+ });
+ }
+
+ @Override
+ public Observable createAsync(String resourceGroupName, String searchServiceName, String name) {
+ QueryKeysInner client = this.inner();
+ return client.createAsync(resourceGroupName, searchServiceName, name)
+ .map(new Func1() {
+ @Override
+ public QueryKey call(QueryKeyInner inner) {
+ return new QueryKeyImpl(inner, manager());
+ }
+ });
+ }
+
+ @Override
+ public Observable listBySearchServiceAsync(String resourceGroupName, String searchServiceName) {
+ QueryKeysInner client = this.inner();
+ return client.listBySearchServiceAsync(resourceGroupName, searchServiceName)
+ .flatMap(new Func1, Observable>() {
+ @Override
+ public Observable call(List innerList) {
+ return Observable.from(innerList);
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public QueryKey call(QueryKeyInner inner) {
+ return new QueryKeyImpl(inner, manager());
+ }
+ });
+ }
+
+ @Override
+ public Completable deleteAsync(String resourceGroupName, String searchServiceName, String key) {
+ QueryKeysInner client = this.inner();
+ return client.deleteAsync(resourceGroupName, searchServiceName, key).toCompletable();
+ }
+
+}
diff --git a/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/implementation/QueryKeysInner.java b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/implementation/QueryKeysInner.java
new file mode 100644
index 000000000000..877fb9348b43
--- /dev/null
+++ b/sdk/search/mgmt-resource-manager/v2015_08_19/src/main/java/com/microsoft/azure/management/search/v2015_08_19/implementation/QueryKeysInner.java
@@ -0,0 +1,830 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.search.v2015_08_19.implementation;
+
+import retrofit2.Retrofit;
+import com.google.common.reflect.TypeToken;
+import com.microsoft.azure.CloudException;
+import com.microsoft.azure.management.search.v2015_08_19.SearchManagementRequestOptions;
+import com.microsoft.rest.ServiceCallback;
+import com.microsoft.rest.ServiceFuture;
+import com.microsoft.rest.ServiceResponse;
+import com.microsoft.rest.Validator;
+import java.io.IOException;
+import java.util.List;
+import java.util.UUID;
+import okhttp3.ResponseBody;
+import retrofit2.http.GET;
+import retrofit2.http.Header;
+import retrofit2.http.Headers;
+import retrofit2.http.HTTP;
+import retrofit2.http.Path;
+import retrofit2.http.POST;
+import retrofit2.http.Query;
+import retrofit2.Response;
+import rx.functions.Func1;
+import rx.Observable;
+
+/**
+ * An instance of this class provides access to all the operations defined
+ * in QueryKeys.
+ */
+public class QueryKeysInner {
+ /** The Retrofit service to perform REST calls. */
+ private QueryKeysService service;
+ /** The service client containing this operation class. */
+ private SearchManagementClientImpl client;
+
+ /**
+ * Initializes an instance of QueryKeysInner.
+ *
+ * @param retrofit the Retrofit instance built from a Retrofit Builder.
+ * @param client the instance of the service client containing this operation class.
+ */
+ public QueryKeysInner(Retrofit retrofit, SearchManagementClientImpl client) {
+ this.service = retrofit.create(QueryKeysService.class);
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for QueryKeys to be
+ * used by Retrofit to perform actually REST calls.
+ */
+ interface QueryKeysService {
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.search.v2015_08_19.QueryKeys create" })
+ @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/createQueryKey/{name}")
+ Observable> create(@Path("resourceGroupName") String resourceGroupName, @Path("searchServiceName") String searchServiceName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("x-ms-client-request-id") UUID clientRequestId, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.search.v2015_08_19.QueryKeys listBySearchServiceGet" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/listQueryKeys")
+ Observable> listBySearchServiceGet(@Path("resourceGroupName") String resourceGroupName, @Path("searchServiceName") String searchServiceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("x-ms-client-request-id") UUID clientRequestId, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.search.v2015_08_19.QueryKeys listBySearchService" })
+ @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/listQueryKeys")
+ Observable> listBySearchService(@Path("resourceGroupName") String resourceGroupName, @Path("searchServiceName") String searchServiceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("x-ms-client-request-id") UUID clientRequestId, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.search.v2015_08_19.QueryKeys delete" })
+ @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/deleteQueryKey/{key}", method = "DELETE", hasBody = true)
+ Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("searchServiceName") String searchServiceName, @Path("key") String key, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("x-ms-client-request-id") UUID clientRequestId, @Header("User-Agent") String userAgent);
+
+ }
+
+ /**
+ * 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 CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the QueryKeyInner object if successful.
+ */
+ public QueryKeyInner create(String resourceGroupName, String searchServiceName, String name) {
+ return createWithServiceResponseAsync(resourceGroupName, searchServiceName, name).toBlocking().single().body();
+ }
+
+ /**
+ * 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 serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture createAsync(String resourceGroupName, String searchServiceName, String name, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(createWithServiceResponseAsync(resourceGroupName, searchServiceName, name), serviceCallback);
+ }
+
+ /**
+ * 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
+ * @return the observable to the QueryKeyInner object
+ */
+ public Observable createAsync(String resourceGroupName, String searchServiceName, String name) {
+ return createWithServiceResponseAsync(resourceGroupName, searchServiceName, name).map(new Func1, QueryKeyInner>() {
+ @Override
+ public QueryKeyInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * 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
+ * @return the observable to the QueryKeyInner object
+ */
+ public Observable> createWithServiceResponseAsync(String resourceGroupName, String searchServiceName, String name) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (searchServiceName == null) {
+ throw new IllegalArgumentException("Parameter searchServiceName is required and cannot be null.");
+ }
+ if (name == null) {
+ throw new IllegalArgumentException("Parameter name is required and cannot be null.");
+ }
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ final SearchManagementRequestOptions searchManagementRequestOptions = null;
+ UUID clientRequestId = null;
+ return service.create(resourceGroupName, searchServiceName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), clientRequestId, this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = createDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ /**
+ * 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 searchManagementRequestOptions Additional parameters for the operation
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the QueryKeyInner object if successful.
+ */
+ public QueryKeyInner create(String resourceGroupName, String searchServiceName, String name, SearchManagementRequestOptions searchManagementRequestOptions) {
+ return createWithServiceResponseAsync(resourceGroupName, searchServiceName, name, searchManagementRequestOptions).toBlocking().single().body();
+ }
+
+ /**
+ * 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 searchManagementRequestOptions Additional parameters for the operation
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture createAsync(String resourceGroupName, String searchServiceName, String name, SearchManagementRequestOptions searchManagementRequestOptions, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(createWithServiceResponseAsync(resourceGroupName, searchServiceName, name, searchManagementRequestOptions), serviceCallback);
+ }
+
+ /**
+ * 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 searchManagementRequestOptions Additional parameters for the operation
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the QueryKeyInner object
+ */
+ public Observable createAsync(String resourceGroupName, String searchServiceName, String name, SearchManagementRequestOptions searchManagementRequestOptions) {
+ return createWithServiceResponseAsync(resourceGroupName, searchServiceName, name, searchManagementRequestOptions).map(new Func1, QueryKeyInner>() {
+ @Override
+ public QueryKeyInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * 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 searchManagementRequestOptions Additional parameters for the operation
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the QueryKeyInner object
+ */
+ public Observable> createWithServiceResponseAsync(String resourceGroupName, String searchServiceName, String name, SearchManagementRequestOptions searchManagementRequestOptions) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (searchServiceName == null) {
+ throw new IllegalArgumentException("Parameter searchServiceName is required and cannot be null.");
+ }
+ if (name == null) {
+ throw new IllegalArgumentException("Parameter name is required and cannot be null.");
+ }
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ Validator.validate(searchManagementRequestOptions);
+ UUID clientRequestId = null;
+ if (searchManagementRequestOptions != null) {
+ clientRequestId = searchManagementRequestOptions.clientRequestId();
+ }
+ return service.create(resourceGroupName, searchServiceName, name, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), clientRequestId, this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = createDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse createDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
+ /**
+ * 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 CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the List<QueryKeyInner> object if successful.
+ */
+ public List listBySearchServiceGet(String resourceGroupName, String searchServiceName) {
+ return listBySearchServiceGetWithServiceResponseAsync(resourceGroupName, searchServiceName).toBlocking().single().body();
+ }
+
+ /**
+ * 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 serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture> listBySearchServiceGetAsync(String resourceGroupName, String searchServiceName, final ServiceCallback> serviceCallback) {
+ return ServiceFuture.fromResponse(listBySearchServiceGetWithServiceResponseAsync(resourceGroupName, searchServiceName), serviceCallback);
+ }
+
+ /**
+ * 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
+ * @return the observable to the List<QueryKeyInner> object
+ */
+ public Observable> listBySearchServiceGetAsync(String resourceGroupName, String searchServiceName) {
+ return listBySearchServiceGetWithServiceResponseAsync(resourceGroupName, searchServiceName).map(new Func1>, List>() {
+ @Override
+ public List call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * 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
+ * @return the observable to the List<QueryKeyInner> object
+ */
+ public Observable>> listBySearchServiceGetWithServiceResponseAsync(String resourceGroupName, String searchServiceName) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (searchServiceName == null) {
+ throw new IllegalArgumentException("Parameter searchServiceName is required and cannot be null.");
+ }
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ final SearchManagementRequestOptions searchManagementRequestOptions = null;
+ UUID clientRequestId = null;
+ return service.listBySearchServiceGet(resourceGroupName, searchServiceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), clientRequestId, this.client.userAgent())
+ .flatMap(new Func1, Observable>>>() {
+ @Override
+ public Observable>> call(Response response) {
+ try {
+ ServiceResponse> result = listBySearchServiceGetDelegate(response);
+ List items = null;
+ if (result.body() != null) {
+ items = result.body().items();
+ }
+ ServiceResponse> clientResponse = new ServiceResponse>(items, result.response());
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ /**
+ * 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 searchManagementRequestOptions Additional parameters for the operation
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the List<QueryKeyInner> object if successful.
+ */
+ public List listBySearchServiceGet(String resourceGroupName, String searchServiceName, SearchManagementRequestOptions searchManagementRequestOptions) {
+ return listBySearchServiceGetWithServiceResponseAsync(resourceGroupName, searchServiceName, searchManagementRequestOptions).toBlocking().single().body();
+ }
+
+ /**
+ * 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 searchManagementRequestOptions Additional parameters for the operation
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture> listBySearchServiceGetAsync(String resourceGroupName, String searchServiceName, SearchManagementRequestOptions searchManagementRequestOptions, final ServiceCallback> serviceCallback) {
+ return ServiceFuture.fromResponse(listBySearchServiceGetWithServiceResponseAsync(resourceGroupName, searchServiceName, searchManagementRequestOptions), serviceCallback);
+ }
+
+ /**
+ * 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 searchManagementRequestOptions Additional parameters for the operation
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the List<QueryKeyInner> object
+ */
+ public Observable> listBySearchServiceGetAsync(String resourceGroupName, String searchServiceName, SearchManagementRequestOptions searchManagementRequestOptions) {
+ return listBySearchServiceGetWithServiceResponseAsync(resourceGroupName, searchServiceName, searchManagementRequestOptions).map(new Func1>, List>() {
+ @Override
+ public List call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * 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 searchManagementRequestOptions Additional parameters for the operation
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the List<QueryKeyInner> object
+ */
+ public Observable>> listBySearchServiceGetWithServiceResponseAsync(String resourceGroupName, String searchServiceName, SearchManagementRequestOptions searchManagementRequestOptions) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (searchServiceName == null) {
+ throw new IllegalArgumentException("Parameter searchServiceName is required and cannot be null.");
+ }
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ Validator.validate(searchManagementRequestOptions);
+ UUID clientRequestId = null;
+ if (searchManagementRequestOptions != null) {
+ clientRequestId = searchManagementRequestOptions.clientRequestId();
+ }
+ return service.listBySearchServiceGet(resourceGroupName, searchServiceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), clientRequestId, this.client.userAgent())
+ .flatMap(new Func1, Observable>>>() {
+ @Override
+ public Observable>> call(Response response) {
+ try {
+ ServiceResponse> result = listBySearchServiceGetDelegate(response);
+ List items = null;
+ if (result.body() != null) {
+ items = result.body().items();
+ }
+ ServiceResponse> clientResponse = new ServiceResponse>(items, result.response());
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse> listBySearchServiceGetDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken>() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
+ /**
+ * 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 CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the List<QueryKeyInner> object if successful.
+ */
+ public List listBySearchService(String resourceGroupName, String searchServiceName) {
+ return listBySearchServiceWithServiceResponseAsync(resourceGroupName, searchServiceName).toBlocking().single().body();
+ }
+
+ /**
+ * 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 serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture> listBySearchServiceAsync(String resourceGroupName, String searchServiceName, final ServiceCallback> serviceCallback) {
+ return ServiceFuture.fromResponse(listBySearchServiceWithServiceResponseAsync(resourceGroupName, searchServiceName), serviceCallback);
+ }
+
+ /**
+ * 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
+ * @return the observable to the List<QueryKeyInner> object
+ */
+ public Observable> listBySearchServiceAsync(String resourceGroupName, String searchServiceName) {
+ return listBySearchServiceWithServiceResponseAsync(resourceGroupName, searchServiceName).map(new Func1>, List>() {
+ @Override
+ public List call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * 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
+ * @return the observable to the List<QueryKeyInner> object
+ */
+ public Observable>> listBySearchServiceWithServiceResponseAsync(String resourceGroupName, String searchServiceName) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (searchServiceName == null) {
+ throw new IllegalArgumentException("Parameter searchServiceName is required and cannot be null.");
+ }
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ final SearchManagementRequestOptions searchManagementRequestOptions = null;
+ UUID clientRequestId = null;
+ return service.listBySearchService(resourceGroupName, searchServiceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), clientRequestId, this.client.userAgent())
+ .flatMap(new Func1, Observable>>>() {
+ @Override
+ public Observable>> call(Response response) {
+ try {
+ ServiceResponse> result = listBySearchServiceDelegate(response);
+ List items = null;
+ if (result.body() != null) {
+ items = result.body().items();
+ }
+ ServiceResponse> clientResponse = new ServiceResponse>(items, result.response());
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ /**
+ * 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 searchManagementRequestOptions Additional parameters for the operation
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the List<QueryKeyInner> object if successful.
+ */
+ public List listBySearchService(String resourceGroupName, String searchServiceName, SearchManagementRequestOptions searchManagementRequestOptions) {
+ return listBySearchServiceWithServiceResponseAsync(resourceGroupName, searchServiceName, searchManagementRequestOptions).toBlocking().single().body();
+ }
+
+ /**
+ * 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 searchManagementRequestOptions Additional parameters for the operation
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture> listBySearchServiceAsync(String resourceGroupName, String searchServiceName, SearchManagementRequestOptions searchManagementRequestOptions, final ServiceCallback> serviceCallback) {
+ return ServiceFuture.fromResponse(listBySearchServiceWithServiceResponseAsync(resourceGroupName, searchServiceName, searchManagementRequestOptions), serviceCallback);
+ }
+
+ /**
+ * 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 searchManagementRequestOptions Additional parameters for the operation
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the List<QueryKeyInner> object
+ */
+ public Observable> listBySearchServiceAsync(String resourceGroupName, String searchServiceName, SearchManagementRequestOptions searchManagementRequestOptions) {
+ return listBySearchServiceWithServiceResponseAsync(resourceGroupName, searchServiceName, searchManagementRequestOptions).map(new Func1>, List>() {
+ @Override
+ public List call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * 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 searchManagementRequestOptions Additional parameters for the operation
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the List<QueryKeyInner> object
+ */
+ public Observable>> listBySearchServiceWithServiceResponseAsync(String resourceGroupName, String searchServiceName, SearchManagementRequestOptions searchManagementRequestOptions) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (searchServiceName == null) {
+ throw new IllegalArgumentException("Parameter searchServiceName is required and cannot be null.");
+ }
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ Validator.validate(searchManagementRequestOptions);
+ UUID clientRequestId = null;
+ if (searchManagementRequestOptions != null) {
+ clientRequestId = searchManagementRequestOptions.clientRequestId();
+ }
+ return service.listBySearchService(resourceGroupName, searchServiceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), clientRequestId, this.client.userAgent())
+ .flatMap(new Func1, Observable>>>() {
+ @Override
+ public Observable>> call(Response response) {
+ try {
+ ServiceResponse> result = listBySearchServiceDelegate(response);
+ List