diff --git a/sdk/loganalytics/mgmt-v2019_08_01_preview/pom.xml b/sdk/loganalytics/mgmt-v2019_08_01_preview/pom.xml
new file mode 100644
index 000000000000..6e386123f5db
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2019_08_01_preview/pom.xml
@@ -0,0 +1,135 @@
+
+
+ 4.0.0
+ com.microsoft.azure.loganalytics.v2019_08_01_preview
+
+ com.microsoft.azure
+ azure-arm-parent
+ 1.1.0
+ ../../../pom.management.xml
+
+ azure-mgmt-loganalytics
+ 1.0.0-beta
+ jar
+ Microsoft Azure SDK for LogAnalytics Management
+ This package contains Microsoft LogAnalytics 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/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/Cluster.java b/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/Cluster.java
new file mode 100644
index 000000000000..9699d057ee74
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/Cluster.java
@@ -0,0 +1,91 @@
+/**
+ * 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.loganalytics.v2019_08_01_preview;
+
+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.resources.models.HasManager;
+import com.microsoft.azure.management.loganalytics.v2019_08_01_preview.implementation.LogAnalyticsManager;
+import com.microsoft.azure.management.loganalytics.v2019_08_01_preview.implementation.ClusterInner;
+
+/**
+ * Type representing Cluster.
+ */
+public interface Cluster extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager {
+ /**
+ * @return the clusterId value.
+ */
+ String clusterId();
+
+ /**
+ * @return the identity value.
+ */
+ Identity identity();
+
+ /**
+ * @return the keyVaultProperties value.
+ */
+ KeyVaultProperties keyVaultProperties();
+
+ /**
+ * @return the nextLink value.
+ */
+ String nextLink();
+
+ /**
+ * @return the provisioningState value.
+ */
+ EntityStatus provisioningState();
+
+ /**
+ * @return the sku value.
+ */
+ Sku sku();
+
+ /**
+ * The template for a Cluster update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithKeyVaultProperties, UpdateStages.WithSku {
+ }
+
+ /**
+ * Grouping of Cluster update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the cluster update allowing to specify KeyVaultProperties.
+ */
+ interface WithKeyVaultProperties {
+ /**
+ * Specifies keyVaultProperties.
+ * @param keyVaultProperties The associated key properties
+ * @return the next update stage
+ */
+ Update withKeyVaultProperties(KeyVaultProperties keyVaultProperties);
+ }
+
+ /**
+ * The stage of the cluster update allowing to specify Sku.
+ */
+ interface WithSku {
+ /**
+ * Specifies sku.
+ * @param sku The sku properties
+ * @return the next update stage
+ */
+ Update withSku(Sku sku);
+ }
+
+ }
+}
diff --git a/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/ClusterPatch.java b/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/ClusterPatch.java
new file mode 100644
index 000000000000..8d440bfec813
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/ClusterPatch.java
@@ -0,0 +1,98 @@
+/**
+ * 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.loganalytics.v2019_08_01_preview;
+
+import java.util.Map;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.rest.serializer.JsonFlatten;
+
+/**
+ * The top level Log Analytics cluster resource container.
+ */
+@JsonFlatten
+public class ClusterPatch {
+ /**
+ * The associated key properties.
+ */
+ @JsonProperty(value = "properties.keyVaultProperties")
+ private KeyVaultProperties keyVaultProperties;
+
+ /**
+ * The sku properties.
+ */
+ @JsonProperty(value = "sku")
+ private Sku sku;
+
+ /**
+ * Resource tags.
+ */
+ @JsonProperty(value = "tags")
+ private Map tags;
+
+ /**
+ * Get the associated key properties.
+ *
+ * @return the keyVaultProperties value
+ */
+ public KeyVaultProperties keyVaultProperties() {
+ return this.keyVaultProperties;
+ }
+
+ /**
+ * Set the associated key properties.
+ *
+ * @param keyVaultProperties the keyVaultProperties value to set
+ * @return the ClusterPatch object itself.
+ */
+ public ClusterPatch withKeyVaultProperties(KeyVaultProperties keyVaultProperties) {
+ this.keyVaultProperties = keyVaultProperties;
+ return this;
+ }
+
+ /**
+ * Get the sku properties.
+ *
+ * @return the sku value
+ */
+ public Sku sku() {
+ return this.sku;
+ }
+
+ /**
+ * Set the sku properties.
+ *
+ * @param sku the sku value to set
+ * @return the ClusterPatch object itself.
+ */
+ public ClusterPatch withSku(Sku sku) {
+ this.sku = sku;
+ return this;
+ }
+
+ /**
+ * Get resource tags.
+ *
+ * @return the tags value
+ */
+ public Map tags() {
+ return this.tags;
+ }
+
+ /**
+ * Set resource tags.
+ *
+ * @param tags the tags value to set
+ * @return the ClusterPatch object itself.
+ */
+ public ClusterPatch withTags(Map tags) {
+ this.tags = tags;
+ return this;
+ }
+
+}
diff --git a/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/Clusters.java b/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/Clusters.java
new file mode 100644
index 000000000000..be9f5cab8e52
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/Clusters.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.loganalytics.v2019_08_01_preview;
+
+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 rx.Completable;
+import com.microsoft.azure.management.loganalytics.v2019_08_01_preview.implementation.ClusterInner;
+import com.microsoft.azure.management.loganalytics.v2019_08_01_preview.implementation.ClustersInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing Clusters.
+ */
+public interface Clusters extends SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner {
+ /**
+ * Create or update a Log Analytics cluster.
+ *
+ * @param resourceGroupName The resource group name of the Log Analytics cluster.
+ * @param clusterName The name of the Log Analytics cluster.
+ * @param parameters The parameters required to create or update a Log Analytics cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable createOrUpdateAsync(String resourceGroupName, String clusterName, ClusterInner parameters);
+
+}
diff --git a/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/DataExport.java b/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/DataExport.java
new file mode 100644
index 000000000000..004d777ddbf9
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/DataExport.java
@@ -0,0 +1,314 @@
+/**
+ * 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.loganalytics.v2019_08_01_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.loganalytics.v2019_08_01_preview.implementation.DataExportInner;
+import com.microsoft.azure.arm.model.Indexable;
+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.loganalytics.v2019_08_01_preview.implementation.LogAnalyticsManager;
+import java.util.List;
+
+/**
+ * Type representing DataExport.
+ */
+public interface DataExport extends HasInner, Indexable, Refreshable, Updatable, HasManager {
+ /**
+ * @return the allTables value.
+ */
+ Boolean allTables();
+
+ /**
+ * @return the createdDate value.
+ */
+ String createdDate();
+
+ /**
+ * @return the dataExportId value.
+ */
+ String dataExportId();
+
+ /**
+ * @return the dataExportType value.
+ */
+ String dataExportType();
+
+ /**
+ * @return the enable value.
+ */
+ Boolean enable();
+
+ /**
+ * @return the eventHubName value.
+ */
+ String eventHubName();
+
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the lastModifiedDate value.
+ */
+ String lastModifiedDate();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the resourceId value.
+ */
+ String resourceId();
+
+ /**
+ * @return the tableNames value.
+ */
+ List tableNames();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * The entirety of the DataExport definition.
+ */
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithWorkspace, DefinitionStages.WithResourceId, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * Grouping of DataExport definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of a DataExport definition.
+ */
+ interface Blank extends WithWorkspace {
+ }
+
+ /**
+ * The stage of the dataexport definition allowing to specify Workspace.
+ */
+ interface WithWorkspace {
+ /**
+ * Specifies resourceGroupName, workspaceName.
+ * @param resourceGroupName The workspace's resource group name
+ * @param workspaceName The Log Analytics workspace name
+ * @return the next definition stage
+ */
+ WithResourceId withExistingWorkspace(String resourceGroupName, String workspaceName);
+ }
+
+ /**
+ * The stage of the dataexport definition allowing to specify ResourceId.
+ */
+ interface WithResourceId {
+ /**
+ * Specifies resourceId.
+ * @param resourceId The destination resource ID. This can be copied from the Properties entry of the destination resource in Azure
+ * @return the next definition stage
+ */
+ WithCreate withResourceId(String resourceId);
+ }
+
+ /**
+ * The stage of the dataexport definition allowing to specify AllTables.
+ */
+ interface WithAllTables {
+ /**
+ * Specifies allTables.
+ * @param allTables When ‘true’, all workspace's tables are exported
+ * @return the next definition stage
+ */
+ WithCreate withAllTables(Boolean allTables);
+ }
+
+ /**
+ * The stage of the dataexport definition allowing to specify CreatedDate.
+ */
+ interface WithCreatedDate {
+ /**
+ * Specifies createdDate.
+ * @param createdDate The latest data export rule modification time
+ * @return the next definition stage
+ */
+ WithCreate withCreatedDate(String createdDate);
+ }
+
+ /**
+ * The stage of the dataexport definition allowing to specify DataExportId.
+ */
+ interface WithDataExportId {
+ /**
+ * Specifies dataExportId.
+ * @param dataExportId The data export rule ID
+ * @return the next definition stage
+ */
+ WithCreate withDataExportId(String dataExportId);
+ }
+
+ /**
+ * The stage of the dataexport definition allowing to specify Enable.
+ */
+ interface WithEnable {
+ /**
+ * Specifies enable.
+ * @param enable Active when enabled
+ * @return the next definition stage
+ */
+ WithCreate withEnable(Boolean enable);
+ }
+
+ /**
+ * The stage of the dataexport definition allowing to specify EventHubName.
+ */
+ interface WithEventHubName {
+ /**
+ * Specifies eventHubName.
+ * @param eventHubName Optional. Allows to define an Event Hub name. Not applicable when destination is Storage Account
+ * @return the next definition stage
+ */
+ WithCreate withEventHubName(String eventHubName);
+ }
+
+ /**
+ * The stage of the dataexport definition allowing to specify LastModifiedDate.
+ */
+ interface WithLastModifiedDate {
+ /**
+ * Specifies lastModifiedDate.
+ * @param lastModifiedDate Date and time when the export was last modified
+ * @return the next definition stage
+ */
+ WithCreate withLastModifiedDate(String lastModifiedDate);
+ }
+
+ /**
+ * The stage of the dataexport definition allowing to specify TableNames.
+ */
+ interface WithTableNames {
+ /**
+ * Specifies tableNames.
+ * @param tableNames An array of tables to export, for example: [“Heartbeat, SecurityEvent”]
+ * @return the next definition stage
+ */
+ WithCreate withTableNames(List tableNames);
+ }
+
+ /**
+ * 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, DefinitionStages.WithAllTables, DefinitionStages.WithCreatedDate, DefinitionStages.WithDataExportId, DefinitionStages.WithEnable, DefinitionStages.WithEventHubName, DefinitionStages.WithLastModifiedDate, DefinitionStages.WithTableNames {
+ }
+ }
+ /**
+ * The template for a DataExport update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, UpdateStages.WithAllTables, UpdateStages.WithCreatedDate, UpdateStages.WithDataExportId, UpdateStages.WithEnable, UpdateStages.WithEventHubName, UpdateStages.WithLastModifiedDate, UpdateStages.WithTableNames {
+ }
+
+ /**
+ * Grouping of DataExport update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the dataexport update allowing to specify AllTables.
+ */
+ interface WithAllTables {
+ /**
+ * Specifies allTables.
+ * @param allTables When ‘true’, all workspace's tables are exported
+ * @return the next update stage
+ */
+ Update withAllTables(Boolean allTables);
+ }
+
+ /**
+ * The stage of the dataexport update allowing to specify CreatedDate.
+ */
+ interface WithCreatedDate {
+ /**
+ * Specifies createdDate.
+ * @param createdDate The latest data export rule modification time
+ * @return the next update stage
+ */
+ Update withCreatedDate(String createdDate);
+ }
+
+ /**
+ * The stage of the dataexport update allowing to specify DataExportId.
+ */
+ interface WithDataExportId {
+ /**
+ * Specifies dataExportId.
+ * @param dataExportId The data export rule ID
+ * @return the next update stage
+ */
+ Update withDataExportId(String dataExportId);
+ }
+
+ /**
+ * The stage of the dataexport update allowing to specify Enable.
+ */
+ interface WithEnable {
+ /**
+ * Specifies enable.
+ * @param enable Active when enabled
+ * @return the next update stage
+ */
+ Update withEnable(Boolean enable);
+ }
+
+ /**
+ * The stage of the dataexport update allowing to specify EventHubName.
+ */
+ interface WithEventHubName {
+ /**
+ * Specifies eventHubName.
+ * @param eventHubName Optional. Allows to define an Event Hub name. Not applicable when destination is Storage Account
+ * @return the next update stage
+ */
+ Update withEventHubName(String eventHubName);
+ }
+
+ /**
+ * The stage of the dataexport update allowing to specify LastModifiedDate.
+ */
+ interface WithLastModifiedDate {
+ /**
+ * Specifies lastModifiedDate.
+ * @param lastModifiedDate Date and time when the export was last modified
+ * @return the next update stage
+ */
+ Update withLastModifiedDate(String lastModifiedDate);
+ }
+
+ /**
+ * The stage of the dataexport update allowing to specify TableNames.
+ */
+ interface WithTableNames {
+ /**
+ * Specifies tableNames.
+ * @param tableNames An array of tables to export, for example: [“Heartbeat, SecurityEvent”]
+ * @return the next update stage
+ */
+ Update withTableNames(List tableNames);
+ }
+
+ }
+}
diff --git a/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/DataExports.java b/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/DataExports.java
new file mode 100644
index 000000000000..5ad35db9c3a2
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/DataExports.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.loganalytics.v2019_08_01_preview;
+
+import com.microsoft.azure.arm.collection.SupportsCreating;
+import rx.Completable;
+import rx.Observable;
+import com.microsoft.azure.management.loganalytics.v2019_08_01_preview.implementation.DataExportsInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing DataExports.
+ */
+public interface DataExports extends SupportsCreating, HasInner {
+ /**
+ * Gets a data export instance.
+ *
+ * @param resourceGroupName The workspace's resource group name.
+ * @param workspaceName The Log Analytics workspace name.
+ * @param dataExportName The data export rule name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAsync(String resourceGroupName, String workspaceName, String dataExportName);
+
+ /**
+ * Lists the data export instances within a workspace.
+ *
+ * @param resourceGroupName The workspace's resource group name.
+ * @param workspaceName The Log Analytics workspace name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listByWorkspaceAsync(final String resourceGroupName, final String workspaceName);
+
+ /**
+ * Deletes the specified data export in a given workspace..
+ *
+ * @param resourceGroupName The workspace's resource group name.
+ * @param workspaceName The Log Analytics workspace name.
+ * @param dataExportName The data export rule name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable deleteAsync(String resourceGroupName, String workspaceName, String dataExportName);
+
+}
diff --git a/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/DataSourceType.java b/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/DataSourceType.java
new file mode 100644
index 000000000000..af2910c88784
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/DataSourceType.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.loganalytics.v2019_08_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Defines values for DataSourceType.
+ */
+public enum DataSourceType {
+ /** Enum value CustomLogs. */
+ CUSTOM_LOGS("CustomLogs"),
+
+ /** Enum value AzureWatson. */
+ AZURE_WATSON("AzureWatson");
+
+ /** The actual serialized value for a DataSourceType instance. */
+ private String value;
+
+ DataSourceType(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Parses a serialized value to a DataSourceType instance.
+ *
+ * @param value the serialized value to parse.
+ * @return the parsed DataSourceType object, or null if unable to parse.
+ */
+ @JsonCreator
+ public static DataSourceType fromString(String value) {
+ DataSourceType[] items = DataSourceType.values();
+ for (DataSourceType item : items) {
+ if (item.toString().equalsIgnoreCase(value)) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ @JsonValue
+ @Override
+ public String toString() {
+ return this.value;
+ }
+}
diff --git a/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/EntityStatus.java b/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/EntityStatus.java
new file mode 100644
index 000000000000..1c3ff795cc60
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/EntityStatus.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.loganalytics.v2019_08_01_preview;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for EntityStatus.
+ */
+public final class EntityStatus extends ExpandableStringEnum {
+ /** Static value Creating for EntityStatus. */
+ public static final EntityStatus CREATING = fromString("Creating");
+
+ /** Static value Succeeded for EntityStatus. */
+ public static final EntityStatus SUCCEEDED = fromString("Succeeded");
+
+ /** Static value Failed for EntityStatus. */
+ public static final EntityStatus FAILED = fromString("Failed");
+
+ /** Static value Canceled for EntityStatus. */
+ public static final EntityStatus CANCELED = fromString("Canceled");
+
+ /** Static value Deleting for EntityStatus. */
+ public static final EntityStatus DELETING = fromString("Deleting");
+
+ /** Static value ProvisioningAccount for EntityStatus. */
+ public static final EntityStatus PROVISIONING_ACCOUNT = fromString("ProvisioningAccount");
+
+ /**
+ * Creates or finds a EntityStatus from its string representation.
+ * @param name a name to look for
+ * @return the corresponding EntityStatus
+ */
+ @JsonCreator
+ public static EntityStatus fromString(String name) {
+ return fromString(name, EntityStatus.class);
+ }
+
+ /**
+ * @return known EntityStatus values
+ */
+ public static Collection values() {
+ return values(EntityStatus.class);
+ }
+}
diff --git a/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/ErrorDetails.java b/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/ErrorDetails.java
new file mode 100644
index 000000000000..68e36ef46d60
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/ErrorDetails.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.loganalytics.v2019_08_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The details of the error.
+ */
+public class ErrorDetails {
+ /**
+ * Error code.
+ */
+ @JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY)
+ private String code;
+
+ /**
+ * Error message indicating why the operation failed.
+ */
+ @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY)
+ private String message;
+
+ /**
+ * The target of the particular error.
+ */
+ @JsonProperty(value = "target", access = JsonProperty.Access.WRITE_ONLY)
+ private String target;
+
+ /**
+ * Get error code.
+ *
+ * @return the code value
+ */
+ public String code() {
+ return this.code;
+ }
+
+ /**
+ * Get error message indicating why the operation failed.
+ *
+ * @return the message value
+ */
+ public String message() {
+ return this.message;
+ }
+
+ /**
+ * Get the target of the particular error.
+ *
+ * @return the target value
+ */
+ public String target() {
+ return this.target;
+ }
+
+}
diff --git a/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/ErrorResponse.java b/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/ErrorResponse.java
new file mode 100644
index 000000000000..86df0e34355c
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/ErrorResponse.java
@@ -0,0 +1,44 @@
+/**
+ * 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.loganalytics.v2019_08_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Error response indicates that the service is not able to process the
+ * incoming request. The reason is provided in the error message.
+ */
+public class ErrorResponse {
+ /**
+ * The details of the error.
+ */
+ @JsonProperty(value = "error")
+ private ErrorDetails error;
+
+ /**
+ * Get the details of the error.
+ *
+ * @return the error value
+ */
+ public ErrorDetails error() {
+ return this.error;
+ }
+
+ /**
+ * Set the details of the error.
+ *
+ * @param error the error value to set
+ * @return the ErrorResponse object itself.
+ */
+ public ErrorResponse withError(ErrorDetails error) {
+ this.error = error;
+ return this;
+ }
+
+}
diff --git a/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/ErrorResponseException.java b/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/ErrorResponseException.java
new file mode 100644
index 000000000000..046fa4af1085
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/ErrorResponseException.java
@@ -0,0 +1,44 @@
+/**
+ * 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.loganalytics.v2019_08_01_preview;
+
+import com.microsoft.rest.RestException;
+import okhttp3.ResponseBody;
+import retrofit2.Response;
+
+/**
+ * Exception thrown for an invalid response with ErrorResponse information.
+ */
+public class ErrorResponseException extends RestException {
+ /**
+ * Initializes a new instance of the ErrorResponseException class.
+ *
+ * @param message the exception message or the response content if a message is not available
+ * @param response the HTTP response
+ */
+ public ErrorResponseException(final String message, final Response response) {
+ super(message, response);
+ }
+
+ /**
+ * Initializes a new instance of the ErrorResponseException class.
+ *
+ * @param message the exception message or the response content if a message is not available
+ * @param response the HTTP response
+ * @param body the deserialized response body
+ */
+ public ErrorResponseException(final String message, final Response response, final ErrorResponse body) {
+ super(message, response, body);
+ }
+
+ @Override
+ public ErrorResponse body() {
+ return (ErrorResponse) super.body();
+ }
+}
diff --git a/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/Identity.java b/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/Identity.java
new file mode 100644
index 000000000000..1bff0ccaa1da
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/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.loganalytics.v2019_08_01_preview;
+
+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: 'SystemAssigned', 'None'.
+ */
+ @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: 'SystemAssigned', 'None'.
+ *
+ * @return the type value
+ */
+ public IdentityType type() {
+ return this.type;
+ }
+
+ /**
+ * Set the identity type. Possible values include: 'SystemAssigned', 'None'.
+ *
+ * @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/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/IdentityType.java b/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/IdentityType.java
new file mode 100644
index 000000000000..23eee5b07046
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/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.loganalytics.v2019_08_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Defines values for IdentityType.
+ */
+public enum IdentityType {
+ /** Enum value SystemAssigned. */
+ SYSTEM_ASSIGNED("SystemAssigned"),
+
+ /** Enum value None. */
+ NONE("None");
+
+ /** 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/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/KeyVaultProperties.java b/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/KeyVaultProperties.java
new file mode 100644
index 000000000000..f0673bff3994
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/KeyVaultProperties.java
@@ -0,0 +1,96 @@
+/**
+ * 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.loganalytics.v2019_08_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The KeyVaultProperties model.
+ */
+public class KeyVaultProperties {
+ /**
+ * The Key Vault uri which holds they key associated with the Log Analytics
+ * cluster.
+ */
+ @JsonProperty(value = "keyVaultUri")
+ private String keyVaultUri;
+
+ /**
+ * The name of the key associated with the Log Analytics cluster.
+ */
+ @JsonProperty(value = "keyName")
+ private String keyName;
+
+ /**
+ * The version of the key associated with the Log Analytics cluster.
+ */
+ @JsonProperty(value = "keyVersion")
+ private String keyVersion;
+
+ /**
+ * Get the Key Vault uri which holds they key associated with the Log Analytics cluster.
+ *
+ * @return the keyVaultUri value
+ */
+ public String keyVaultUri() {
+ return this.keyVaultUri;
+ }
+
+ /**
+ * Set the Key Vault uri which holds they key associated with the Log Analytics cluster.
+ *
+ * @param keyVaultUri the keyVaultUri value to set
+ * @return the KeyVaultProperties object itself.
+ */
+ public KeyVaultProperties withKeyVaultUri(String keyVaultUri) {
+ this.keyVaultUri = keyVaultUri;
+ return this;
+ }
+
+ /**
+ * Get the name of the key associated with the Log Analytics cluster.
+ *
+ * @return the keyName value
+ */
+ public String keyName() {
+ return this.keyName;
+ }
+
+ /**
+ * Set the name of the key associated with the Log Analytics cluster.
+ *
+ * @param keyName the keyName value to set
+ * @return the KeyVaultProperties object itself.
+ */
+ public KeyVaultProperties withKeyName(String keyName) {
+ this.keyName = keyName;
+ return this;
+ }
+
+ /**
+ * Get the version of the key associated with the Log Analytics cluster.
+ *
+ * @return the keyVersion value
+ */
+ public String keyVersion() {
+ return this.keyVersion;
+ }
+
+ /**
+ * Set the version of the key associated with the Log Analytics cluster.
+ *
+ * @param keyVersion the keyVersion value to set
+ * @return the KeyVaultProperties object itself.
+ */
+ public KeyVaultProperties withKeyVersion(String keyVersion) {
+ this.keyVersion = keyVersion;
+ return this;
+ }
+
+}
diff --git a/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/LinkedService.java b/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/LinkedService.java
new file mode 100644
index 000000000000..d5ca26271d6b
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/LinkedService.java
@@ -0,0 +1,146 @@
+/**
+ * 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.loganalytics.v2019_08_01_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.loganalytics.v2019_08_01_preview.implementation.LinkedServiceInner;
+import com.microsoft.azure.arm.model.Indexable;
+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.loganalytics.v2019_08_01_preview.implementation.LogAnalyticsManager;
+
+/**
+ * Type representing LinkedService.
+ */
+public interface LinkedService extends HasInner, Indexable, Refreshable, Updatable, HasManager {
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the resourceId value.
+ */
+ String resourceId();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * @return the writeAccessResourceId value.
+ */
+ String writeAccessResourceId();
+
+ /**
+ * The entirety of the LinkedService definition.
+ */
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithWorkspace, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * Grouping of LinkedService definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of a LinkedService definition.
+ */
+ interface Blank extends WithWorkspace {
+ }
+
+ /**
+ * The stage of the linkedservice definition allowing to specify Workspace.
+ */
+ interface WithWorkspace {
+ /**
+ * Specifies resourceGroupName, workspaceName.
+ * @param resourceGroupName The workspace's resource group name
+ * @param workspaceName Name of the Log Analytics Workspace that will contain the linkedServices resource
+ * @return the next definition stage
+ */
+ WithCreate withExistingWorkspace(String resourceGroupName, String workspaceName);
+ }
+
+ /**
+ * The stage of the linkedservice definition allowing to specify ResourceId.
+ */
+ interface WithResourceId {
+ /**
+ * Specifies resourceId.
+ * @param resourceId The resource id of the resource that will be linked to the workspace. This should be used for linking resources which require read access
+ * @return the next definition stage
+ */
+ WithCreate withResourceId(String resourceId);
+ }
+
+ /**
+ * The stage of the linkedservice definition allowing to specify WriteAccessResourceId.
+ */
+ interface WithWriteAccessResourceId {
+ /**
+ * Specifies writeAccessResourceId.
+ * @param writeAccessResourceId The resource id of the resource that will be linked to the workspace. This should be used for linking resources which require write access
+ * @return the next definition stage
+ */
+ WithCreate withWriteAccessResourceId(String writeAccessResourceId);
+ }
+
+ /**
+ * 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, DefinitionStages.WithResourceId, DefinitionStages.WithWriteAccessResourceId {
+ }
+ }
+ /**
+ * The template for a LinkedService update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, UpdateStages.WithResourceId, UpdateStages.WithWriteAccessResourceId {
+ }
+
+ /**
+ * Grouping of LinkedService update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the linkedservice update allowing to specify ResourceId.
+ */
+ interface WithResourceId {
+ /**
+ * Specifies resourceId.
+ * @param resourceId The resource id of the resource that will be linked to the workspace. This should be used for linking resources which require read access
+ * @return the next update stage
+ */
+ Update withResourceId(String resourceId);
+ }
+
+ /**
+ * The stage of the linkedservice update allowing to specify WriteAccessResourceId.
+ */
+ interface WithWriteAccessResourceId {
+ /**
+ * Specifies writeAccessResourceId.
+ * @param writeAccessResourceId The resource id of the resource that will be linked to the workspace. This should be used for linking resources which require write access
+ * @return the next update stage
+ */
+ Update withWriteAccessResourceId(String writeAccessResourceId);
+ }
+
+ }
+}
diff --git a/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/LinkedServices.java b/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/LinkedServices.java
new file mode 100644
index 000000000000..768decf7fde2
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/LinkedServices.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.loganalytics.v2019_08_01_preview;
+
+import com.microsoft.azure.arm.collection.SupportsCreating;
+import rx.Completable;
+import rx.Observable;
+import com.microsoft.azure.management.loganalytics.v2019_08_01_preview.implementation.LinkedServicesInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing LinkedServices.
+ */
+public interface LinkedServices extends SupportsCreating, HasInner {
+ /**
+ * Gets a linked service instance.
+ *
+ * @param resourceGroupName The workspace's resource group name.
+ * @param workspaceName Name of the Log Analytics Workspace that contains the linkedServices resource
+ * @param linkedServiceName Name of the linked service.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAsync(String resourceGroupName, String workspaceName, String linkedServiceName);
+
+ /**
+ * Gets the linked services instances in a workspace.
+ *
+ * @param resourceGroupName The workspace's resource group name.
+ * @param workspaceName Name of the Log Analytics Workspace that contains the linked services.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listByWorkspaceAsync(String resourceGroupName, String workspaceName);
+
+ /**
+ * Deletes a linked service instance.
+ *
+ * @param resourceGroupName The workspace's resource group name.
+ * @param workspaceName Name of the Log Analytics Workspace that contains the linkedServices resource
+ * @param linkedServiceName Name of the linked service.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable deleteAsync(String resourceGroupName, String workspaceName, String linkedServiceName);
+
+}
diff --git a/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/LinkedStorageAccountList.java b/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/LinkedStorageAccountList.java
new file mode 100644
index 000000000000..53ba81d19359
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/LinkedStorageAccountList.java
@@ -0,0 +1,123 @@
+/**
+ * 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.loganalytics.v2019_08_01_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.loganalytics.v2019_08_01_preview.implementation.LinkedStorageAccountListInner;
+import com.microsoft.azure.arm.model.Indexable;
+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.loganalytics.v2019_08_01_preview.implementation.LogAnalyticsManager;
+import java.util.List;
+
+/**
+ * Type representing LinkedStorageAccountList.
+ */
+public interface LinkedStorageAccountList extends HasInner, Indexable, Refreshable, Updatable, HasManager {
+ /**
+ * @return the dataSourceType value.
+ */
+ DataSourceType dataSourceType();
+
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the storageAccountIds value.
+ */
+ List storageAccountIds();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * The entirety of the LinkedStorageAccountList definition.
+ */
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithWorkspace, DefinitionStages.WithStorageAccountIds, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * Grouping of LinkedStorageAccountList definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of a LinkedStorageAccountList definition.
+ */
+ interface Blank extends WithWorkspace {
+ }
+
+ /**
+ * The stage of the linkedstorageaccountlist definition allowing to specify Workspace.
+ */
+ interface WithWorkspace {
+ /**
+ * Specifies resourceGroupName, workspaceName.
+ * @param resourceGroupName The workspace's resource group name
+ * @param workspaceName Name of the Log Analytics Workspace that will contain the resource
+ * @return the next definition stage
+ */
+ WithStorageAccountIds withExistingWorkspace(String resourceGroupName, String workspaceName);
+ }
+
+ /**
+ * The stage of the linkedstorageaccountlist definition allowing to specify StorageAccountIds.
+ */
+ interface WithStorageAccountIds {
+ /**
+ * Specifies storageAccountIds.
+ * @param storageAccountIds Linked storage accounts resources ids
+ * @return the next definition stage
+ */
+ WithCreate withStorageAccountIds(List storageAccountIds);
+ }
+
+ /**
+ * 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 {
+ }
+ }
+ /**
+ * The template for a LinkedStorageAccountList update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, UpdateStages.WithStorageAccountIds {
+ }
+
+ /**
+ * Grouping of LinkedStorageAccountList update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the linkedstorageaccountlist update allowing to specify StorageAccountIds.
+ */
+ interface WithStorageAccountIds {
+ /**
+ * Specifies storageAccountIds.
+ * @param storageAccountIds Linked storage accounts resources ids
+ * @return the next update stage
+ */
+ Update withStorageAccountIds(List storageAccountIds);
+ }
+
+ }
+}
diff --git a/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/LinkedStorageAccounts.java b/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/LinkedStorageAccounts.java
new file mode 100644
index 000000000000..e4d3feae4f2f
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/LinkedStorageAccounts.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.loganalytics.v2019_08_01_preview;
+
+import com.microsoft.azure.arm.collection.SupportsCreating;
+import rx.Completable;
+import rx.Observable;
+import com.microsoft.azure.management.loganalytics.v2019_08_01_preview.implementation.LinkedStorageAccountsInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing LinkedStorageAccounts.
+ */
+public interface LinkedStorageAccounts extends SupportsCreating, HasInner {
+ /**
+ * Gets all linked storage account of a specific data source type associated with the specified workspace.
+ *
+ * @param resourceGroupName The workspace's resource group name.
+ * @param workspaceName Name of the Log Analytics Workspace that will contain the resource.
+ * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', 'AzureWatson'
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAsync(String resourceGroupName, String workspaceName, DataSourceType dataSourceType);
+
+ /**
+ * Gets all linked storage accounts associated with the specified workspace, storage accounts will be sorted by their data source type.
+ *
+ * @param resourceGroupName The workspace's resource group name.
+ * @param workspaceName Name of the Log Analytics Workspace that will contain the resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listByWorkspaceAsync(String resourceGroupName, String workspaceName);
+
+ /**
+ * Deletes all linked storage accounts of a specific data source type associated with the specified workspace.
+ *
+ * @param resourceGroupName The workspace's resource group name.
+ * @param workspaceName Name of the Log Analytics Workspace that will contain the resource.
+ * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', 'AzureWatson'
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable deleteAsync(String resourceGroupName, String workspaceName, DataSourceType dataSourceType);
+
+}
diff --git a/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/Sku.java b/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/Sku.java
new file mode 100644
index 000000000000..3a846464bb70
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/Sku.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.loganalytics.v2019_08_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The Sku model.
+ */
+public class Sku {
+ /**
+ * The capacity value.
+ */
+ @JsonProperty(value = "capacity")
+ private Long capacity;
+
+ /**
+ * The name of the SKU. Possible values include: 'CapacityReservation'.
+ */
+ @JsonProperty(value = "name")
+ private SkuNameEnum name;
+
+ /**
+ * Get the capacity value.
+ *
+ * @return the capacity value
+ */
+ public Long capacity() {
+ return this.capacity;
+ }
+
+ /**
+ * Set the capacity value.
+ *
+ * @param capacity the capacity value to set
+ * @return the Sku object itself.
+ */
+ public Sku withCapacity(Long capacity) {
+ this.capacity = capacity;
+ return this;
+ }
+
+ /**
+ * Get the name of the SKU. Possible values include: 'CapacityReservation'.
+ *
+ * @return the name value
+ */
+ public SkuNameEnum name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name of the SKU. Possible values include: 'CapacityReservation'.
+ *
+ * @param name the name value to set
+ * @return the Sku object itself.
+ */
+ public Sku withName(SkuNameEnum name) {
+ this.name = name;
+ return this;
+ }
+
+}
diff --git a/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/SkuNameEnum.java b/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/SkuNameEnum.java
new file mode 100644
index 000000000000..43b8c223f5fc
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/SkuNameEnum.java
@@ -0,0 +1,38 @@
+/**
+ * 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.loganalytics.v2019_08_01_preview;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for SkuNameEnum.
+ */
+public final class SkuNameEnum extends ExpandableStringEnum {
+ /** Static value CapacityReservation for SkuNameEnum. */
+ public static final SkuNameEnum CAPACITY_RESERVATION = fromString("CapacityReservation");
+
+ /**
+ * Creates or finds a SkuNameEnum from its string representation.
+ * @param name a name to look for
+ * @return the corresponding SkuNameEnum
+ */
+ @JsonCreator
+ public static SkuNameEnum fromString(String name) {
+ return fromString(name, SkuNameEnum.class);
+ }
+
+ /**
+ * @return known SkuNameEnum values
+ */
+ public static Collection values() {
+ return values(SkuNameEnum.class);
+ }
+}
diff --git a/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/implementation/ClusterImpl.java b/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/implementation/ClusterImpl.java
new file mode 100644
index 000000000000..a68257115794
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/implementation/ClusterImpl.java
@@ -0,0 +1,105 @@
+/**
+ * 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.loganalytics.v2019_08_01_preview.implementation;
+
+import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl;
+import com.microsoft.azure.management.loganalytics.v2019_08_01_preview.Cluster;
+import rx.Observable;
+import com.microsoft.azure.management.loganalytics.v2019_08_01_preview.ClusterPatch;
+import com.microsoft.azure.management.loganalytics.v2019_08_01_preview.Identity;
+import com.microsoft.azure.management.loganalytics.v2019_08_01_preview.KeyVaultProperties;
+import com.microsoft.azure.management.loganalytics.v2019_08_01_preview.EntityStatus;
+import com.microsoft.azure.management.loganalytics.v2019_08_01_preview.Sku;
+import rx.functions.Func1;
+
+class ClusterImpl extends GroupableResourceCoreImpl implements Cluster, Cluster.Update {
+ private ClusterPatch updateParameter;
+ ClusterImpl(String name, ClusterInner inner, LogAnalyticsManager manager) {
+ super(name, inner, manager);
+ this.updateParameter = new ClusterPatch();
+ }
+
+ @Override
+ public Observable createResourceAsync() {
+ ClustersInner client = this.manager().inner().clusters();
+ return null; // NOP createResourceAsync implementation as create is not supported
+ }
+
+ @Override
+ public Observable updateResourceAsync() {
+ ClustersInner client = this.manager().inner().clusters();
+ return client.updateAsync(this.resourceGroupName(), this.name(), this.updateParameter)
+ .map(new Func1() {
+ @Override
+ public ClusterInner call(ClusterInner resource) {
+ resetCreateUpdateParameters();
+ return resource;
+ }
+ })
+ .map(innerToFluentMap(this));
+ }
+
+ @Override
+ protected Observable getInnerAsync() {
+ ClustersInner client = this.manager().inner().clusters();
+ return client.getByResourceGroupAsync(this.resourceGroupName(), this.name());
+ }
+
+ @Override
+ public boolean isInCreateMode() {
+ return this.inner().id() == null;
+ }
+
+ private void resetCreateUpdateParameters() {
+ this.updateParameter = new ClusterPatch();
+ }
+
+ @Override
+ public String clusterId() {
+ return this.inner().clusterId();
+ }
+
+ @Override
+ public Identity identity() {
+ return this.inner().identity();
+ }
+
+ @Override
+ public KeyVaultProperties keyVaultProperties() {
+ return this.inner().keyVaultProperties();
+ }
+
+ @Override
+ public String nextLink() {
+ return this.inner().nextLink();
+ }
+
+ @Override
+ public EntityStatus provisioningState() {
+ return this.inner().provisioningState();
+ }
+
+ @Override
+ public Sku sku() {
+ return this.inner().sku();
+ }
+
+ @Override
+ public ClusterImpl withKeyVaultProperties(KeyVaultProperties keyVaultProperties) {
+ this.updateParameter.withKeyVaultProperties(keyVaultProperties);
+ return this;
+ }
+
+ @Override
+ public ClusterImpl withSku(Sku sku) {
+ this.updateParameter.withSku(sku);
+ return this;
+ }
+
+}
diff --git a/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/implementation/ClusterInner.java b/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/implementation/ClusterInner.java
new file mode 100644
index 000000000000..02dca99aa390
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/implementation/ClusterInner.java
@@ -0,0 +1,162 @@
+/**
+ * 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.loganalytics.v2019_08_01_preview.implementation;
+
+import com.microsoft.azure.management.loganalytics.v2019_08_01_preview.Identity;
+import com.microsoft.azure.management.loganalytics.v2019_08_01_preview.Sku;
+import com.microsoft.azure.management.loganalytics.v2019_08_01_preview.EntityStatus;
+import com.microsoft.azure.management.loganalytics.v2019_08_01_preview.KeyVaultProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.rest.serializer.JsonFlatten;
+import com.microsoft.rest.SkipParentValidation;
+import com.microsoft.azure.Resource;
+
+/**
+ * The top level Log Analytics cluster resource container.
+ */
+@JsonFlatten
+@SkipParentValidation
+public class ClusterInner extends Resource {
+ /**
+ * The identity of the resource.
+ */
+ @JsonProperty(value = "identity")
+ private Identity identity;
+
+ /**
+ * The sku properties.
+ */
+ @JsonProperty(value = "sku")
+ private Sku sku;
+
+ /**
+ * The link used to get the next page of recommendations.
+ */
+ @JsonProperty(value = "properties.nextLink")
+ private String nextLink;
+
+ /**
+ * The ID associated with the cluster.
+ */
+ @JsonProperty(value = "properties.clusterId", access = JsonProperty.Access.WRITE_ONLY)
+ private String clusterId;
+
+ /**
+ * The provisioning state of the cluster. Possible values include:
+ * 'Creating', 'Succeeded', 'Failed', 'Canceled', 'Deleting',
+ * 'ProvisioningAccount'.
+ */
+ @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private EntityStatus provisioningState;
+
+ /**
+ * The associated key properties.
+ */
+ @JsonProperty(value = "properties.keyVaultProperties")
+ private KeyVaultProperties keyVaultProperties;
+
+ /**
+ * Get the identity of the resource.
+ *
+ * @return the identity value
+ */
+ public Identity identity() {
+ return this.identity;
+ }
+
+ /**
+ * Set the identity of the resource.
+ *
+ * @param identity the identity value to set
+ * @return the ClusterInner object itself.
+ */
+ public ClusterInner withIdentity(Identity identity) {
+ this.identity = identity;
+ return this;
+ }
+
+ /**
+ * Get the sku properties.
+ *
+ * @return the sku value
+ */
+ public Sku sku() {
+ return this.sku;
+ }
+
+ /**
+ * Set the sku properties.
+ *
+ * @param sku the sku value to set
+ * @return the ClusterInner object itself.
+ */
+ public ClusterInner withSku(Sku sku) {
+ this.sku = sku;
+ return this;
+ }
+
+ /**
+ * Get the link used to get the next page of recommendations.
+ *
+ * @return the nextLink value
+ */
+ public String nextLink() {
+ return this.nextLink;
+ }
+
+ /**
+ * Set the link used to get the next page of recommendations.
+ *
+ * @param nextLink the nextLink value to set
+ * @return the ClusterInner object itself.
+ */
+ public ClusterInner withNextLink(String nextLink) {
+ this.nextLink = nextLink;
+ return this;
+ }
+
+ /**
+ * Get the ID associated with the cluster.
+ *
+ * @return the clusterId value
+ */
+ public String clusterId() {
+ return this.clusterId;
+ }
+
+ /**
+ * Get the provisioning state of the cluster. Possible values include: 'Creating', 'Succeeded', 'Failed', 'Canceled', 'Deleting', 'ProvisioningAccount'.
+ *
+ * @return the provisioningState value
+ */
+ public EntityStatus provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Get the associated key properties.
+ *
+ * @return the keyVaultProperties value
+ */
+ public KeyVaultProperties keyVaultProperties() {
+ return this.keyVaultProperties;
+ }
+
+ /**
+ * Set the associated key properties.
+ *
+ * @param keyVaultProperties the keyVaultProperties value to set
+ * @return the ClusterInner object itself.
+ */
+ public ClusterInner withKeyVaultProperties(KeyVaultProperties keyVaultProperties) {
+ this.keyVaultProperties = keyVaultProperties;
+ return this;
+ }
+
+}
diff --git a/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/implementation/ClustersImpl.java b/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/implementation/ClustersImpl.java
new file mode 100644
index 000000000000..a91d8dc4dac5
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/implementation/ClustersImpl.java
@@ -0,0 +1,139 @@
+/**
+ * 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.
+ * def
+ */
+
+package com.microsoft.azure.management.loganalytics.v2019_08_01_preview.implementation;
+
+import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl;
+import com.microsoft.azure.management.loganalytics.v2019_08_01_preview.Clusters;
+import com.microsoft.azure.management.loganalytics.v2019_08_01_preview.Cluster;
+import rx.Observable;
+import rx.Completable;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import com.microsoft.azure.arm.resources.ResourceUtilsCore;
+import com.microsoft.azure.arm.utils.RXMapper;
+import rx.functions.Func1;
+import com.microsoft.azure.PagedList;
+import com.microsoft.azure.Page;
+
+class ClustersImpl extends GroupableResourcesCoreImpl implements Clusters {
+ protected ClustersImpl(LogAnalyticsManager manager) {
+ super(manager.inner().clusters(), manager);
+ }
+
+ @Override
+ protected Observable getInnerAsync(String resourceGroupName, String name) {
+ ClustersInner client = this.inner();
+ return client.getByResourceGroupAsync(resourceGroupName, name);
+ }
+
+ @Override
+ protected Completable deleteInnerAsync(String resourceGroupName, String name) {
+ ClustersInner client = this.inner();
+ return client.deleteAsync(resourceGroupName, name).toCompletable();
+ }
+
+ @Override
+ public Observable deleteByIdsAsync(Collection ids) {
+ if (ids == null || ids.isEmpty()) {
+ return Observable.empty();
+ }
+ Collection> observables = new ArrayList<>();
+ for (String id : ids) {
+ final String resourceGroupName = ResourceUtilsCore.groupFromResourceId(id);
+ final String name = ResourceUtilsCore.nameFromResourceId(id);
+ Observable o = RXMapper.map(this.inner().deleteAsync(resourceGroupName, name), id);
+ observables.add(o);
+ }
+ return Observable.mergeDelayError(observables);
+ }
+
+ @Override
+ public Observable deleteByIdsAsync(String...ids) {
+ return this.deleteByIdsAsync(new ArrayList(Arrays.asList(ids)));
+ }
+
+ @Override
+ public void deleteByIds(Collection ids) {
+ if (ids != null && !ids.isEmpty()) {
+ this.deleteByIdsAsync(ids).toBlocking().last();
+ }
+ }
+
+ @Override
+ public void deleteByIds(String...ids) {
+ this.deleteByIds(new ArrayList(Arrays.asList(ids)));
+ }
+
+ @Override
+ public PagedList listByResourceGroup(String resourceGroupName) {
+ ClustersInner client = this.inner();
+ return this.wrapList(client.listByResourceGroup(resourceGroupName));
+ }
+
+ @Override
+ public Observable listByResourceGroupAsync(String resourceGroupName) {
+ ClustersInner client = this.inner();
+ return client.listByResourceGroupAsync(resourceGroupName)
+ .flatMapIterable(new Func1, Iterable>() {
+ @Override
+ public Iterable call(Page page) {
+ return page.items();
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public Cluster call(ClusterInner inner) {
+ return wrapModel(inner);
+ }
+ });
+ }
+
+ @Override
+ public PagedList list() {
+ ClustersInner client = this.inner();
+ return this.wrapList(client.list());
+ }
+
+ @Override
+ public Observable listAsync() {
+ ClustersInner client = this.inner();
+ return client.listAsync()
+ .flatMapIterable(new Func1, Iterable>() {
+ @Override
+ public Iterable call(Page page) {
+ return page.items();
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public Cluster call(ClusterInner inner) {
+ return wrapModel(inner);
+ }
+ });
+ }
+
+ @Override
+ public Completable createOrUpdateAsync(String resourceGroupName, String clusterName, ClusterInner parameters) {
+ ClustersInner client = this.inner();
+ return client.createOrUpdateAsync(resourceGroupName, clusterName, parameters).toCompletable();
+ }
+
+ @Override
+ protected ClusterImpl wrapModel(ClusterInner inner) {
+ return new ClusterImpl(inner.name(), inner, manager());
+ }
+
+ @Override
+ protected ClusterImpl wrapModel(String name) {
+ return null; // Model is not creatable
+ }
+
+}
diff --git a/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/implementation/ClustersInner.java b/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/implementation/ClustersInner.java
new file mode 100644
index 000000000000..ce30fde655c7
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2019_08_01_preview/implementation/ClustersInner.java
@@ -0,0 +1,986 @@
+/**
+ * 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.loganalytics.v2019_08_01_preview.implementation;
+
+import com.microsoft.azure.arm.collection.InnerSupportsGet;
+import com.microsoft.azure.arm.collection.InnerSupportsDelete;
+import com.microsoft.azure.arm.collection.InnerSupportsListing;
+import retrofit2.Retrofit;
+import com.google.common.reflect.TypeToken;
+import com.microsoft.azure.AzureServiceFuture;
+import com.microsoft.azure.ListOperationCallback;
+import com.microsoft.azure.management.loganalytics.v2019_08_01_preview.ClusterPatch;
+import com.microsoft.azure.management.loganalytics.v2019_08_01_preview.ErrorResponseException;
+import com.microsoft.azure.Page;
+import com.microsoft.azure.PagedList;
+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 okhttp3.ResponseBody;
+import retrofit2.http.Body;
+import retrofit2.http.GET;
+import retrofit2.http.Header;
+import retrofit2.http.Headers;
+import retrofit2.http.HTTP;
+import retrofit2.http.PATCH;
+import retrofit2.http.Path;
+import retrofit2.http.PUT;
+import retrofit2.http.Query;
+import retrofit2.http.Url;
+import retrofit2.Response;
+import rx.functions.Func1;
+import rx.Observable;
+
+/**
+ * An instance of this class provides access to all the operations defined
+ * in Clusters.
+ */
+public class ClustersInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing {
+ /** The Retrofit service to perform REST calls. */
+ private ClustersService service;
+ /** The service client containing this operation class. */
+ private OperationalInsightsManagementClientImpl client;
+
+ /**
+ * Initializes an instance of ClustersInner.
+ *
+ * @param retrofit the Retrofit instance built from a Retrofit Builder.
+ * @param client the instance of the service client containing this operation class.
+ */
+ public ClustersInner(Retrofit retrofit, OperationalInsightsManagementClientImpl client) {
+ this.service = retrofit.create(ClustersService.class);
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for Clusters to be
+ * used by Retrofit to perform actually REST calls.
+ */
+ interface ClustersService {
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2019_08_01_preview.Clusters listByResourceGroup" })
+ @GET("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters")
+ Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2019_08_01_preview.Clusters list" })
+ @GET("subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/clusters")
+ Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2019_08_01_preview.Clusters createOrUpdate" })
+ @PUT("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters/{clusterName}")
+ Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("subscriptionId") String subscriptionId, @Body ClusterInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2019_08_01_preview.Clusters beginCreateOrUpdate" })
+ @PUT("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters/{clusterName}")
+ Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("subscriptionId") String subscriptionId, @Body ClusterInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2019_08_01_preview.Clusters delete" })
+ @HTTP(path = "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters/{clusterName}", method = "DELETE", hasBody = true)
+ Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2019_08_01_preview.Clusters getByResourceGroup" })
+ @GET("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters/{clusterName}")
+ Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2019_08_01_preview.Clusters update" })
+ @PATCH("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters/{clusterName}")
+ Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @Path("subscriptionId") String subscriptionId, @Body ClusterPatch parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2019_08_01_preview.Clusters listByResourceGroupNext" })
+ @GET
+ Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2019_08_01_preview.Clusters listNext" })
+ @GET
+ Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ }
+
+ /**
+ * Gets Log Analytics clusters in a resource group.
+ *
+ * @param resourceGroupName The workspace's resource group name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorResponseException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the PagedList<ClusterInner> object if successful.
+ */
+ public PagedList listByResourceGroup(final String resourceGroupName) {
+ ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single();
+ return new PagedList(response.body()) {
+ @Override
+ public Page nextPage(String nextPageLink) {
+ return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body();
+ }
+ };
+ }
+
+ /**
+ * Gets Log Analytics clusters in a resource group.
+ *
+ * @param resourceGroupName The workspace's resource group name.
+ * @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> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) {
+ return AzureServiceFuture.fromPageResponse(
+ listByResourceGroupSinglePageAsync(resourceGroupName),
+ new Func1>>>() {
+ @Override
+ public Observable>> call(String nextPageLink) {
+ return listByResourceGroupNextSinglePageAsync(nextPageLink);
+ }
+ },
+ serviceCallback);
+ }
+
+ /**
+ * Gets Log Analytics clusters in a resource group.
+ *
+ * @param resourceGroupName The workspace's resource group name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<ClusterInner> object
+ */
+ public Observable> listByResourceGroupAsync(final String resourceGroupName) {
+ return listByResourceGroupWithServiceResponseAsync(resourceGroupName)
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Gets Log Analytics clusters in a resource group.
+ *
+ * @param resourceGroupName The workspace's resource group name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<ClusterInner> object
+ */
+ public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) {
+ return listByResourceGroupSinglePageAsync(resourceGroupName)
+ .concatMap(new Func1>, Observable>>>() {
+ @Override
+ public Observable>> call(ServiceResponse> page) {
+ String nextPageLink = page.body().nextPageLink();
+ if (nextPageLink == null) {
+ return Observable.just(page);
+ }
+ return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink));
+ }
+ });
+ }
+
+ /**
+ * Gets Log Analytics clusters in a resource group.
+ *
+ ServiceResponse> * @param resourceGroupName The workspace's resource group name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the PagedList<ClusterInner> object wrapped in {@link ServiceResponse} if successful.
+ */
+ public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName 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.");
+ }
+ return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>>() {
+ @Override
+ public Observable>> call(Response response) {
+ try {
+ ServiceResponse> result = listByResourceGroupDelegate(response);
+ return Observable.just(new ServiceResponse>(result.body(), result.response()));
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse> listByResourceGroupDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken>() { }.getType())
+ .registerError(ErrorResponseException.class)
+ .build(response);
+ }
+
+ /**
+ * Gets the Log Analytics clusters in a subscription.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorResponseException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the PagedList<ClusterInner> object if successful.
+ */
+ public PagedList list() {
+ ServiceResponse> response = listSinglePageAsync().toBlocking().single();
+ return new PagedList(response.body()) {
+ @Override
+ public Page nextPage(String nextPageLink) {
+ return listNextSinglePageAsync(nextPageLink).toBlocking().single().body();
+ }
+ };
+ }
+
+ /**
+ * Gets the Log Analytics clusters in a subscription.
+ *
+ * @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 ListOperationCallback serviceCallback) {
+ return AzureServiceFuture.fromPageResponse(
+ listSinglePageAsync(),
+ new Func1>>>() {
+ @Override
+ public Observable>> call(String nextPageLink) {
+ return listNextSinglePageAsync(nextPageLink);
+ }
+ },
+ serviceCallback);
+ }
+
+ /**
+ * Gets the Log Analytics clusters in a subscription.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<ClusterInner> object
+ */
+ public Observable> listAsync() {
+ return listWithServiceResponseAsync()
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Gets the Log Analytics clusters in a subscription.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<ClusterInner> object
+ */
+ public Observable>> listWithServiceResponseAsync() {
+ return listSinglePageAsync()
+ .concatMap(new Func1>, Observable>>>() {
+ @Override
+ public Observable>> call(ServiceResponse> page) {
+ String nextPageLink = page.body().nextPageLink();
+ if (nextPageLink == null) {
+ return Observable.just(page);
+ }
+ return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink));
+ }
+ });
+ }
+
+ /**
+ * Gets the Log Analytics clusters in a subscription.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the PagedList<ClusterInner> object wrapped in {@link ServiceResponse} if successful.
+ */
+ public Observable>> listSinglePageAsync() {
+ 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.");
+ }
+ return service.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>>() {
+ @Override
+ public Observable>> call(Response response) {
+ try {
+ ServiceResponse> result = listDelegate(response);
+ return Observable.just(new ServiceResponse>(result.body(), result.response()));
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken>() { }.getType())
+ .registerError(ErrorResponseException.class)
+ .build(response);
+ }
+
+ /**
+ * Create or update a Log Analytics cluster.
+ *
+ * @param resourceGroupName The resource group name of the Log Analytics cluster.
+ * @param clusterName The name of the Log Analytics cluster.
+ * @param parameters The parameters required to create or update a Log Analytics cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorResponseException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ */
+ public void createOrUpdate(String resourceGroupName, String clusterName, ClusterInner parameters) {
+ createOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, parameters).toBlocking().last().body();
+ }
+
+ /**
+ * Create or update a Log Analytics cluster.
+ *
+ * @param resourceGroupName The resource group name of the Log Analytics cluster.
+ * @param clusterName The name of the Log Analytics cluster.
+ * @param parameters The parameters required to create or update a Log Analytics cluster.
+ * @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 createOrUpdateAsync(String resourceGroupName, String clusterName, ClusterInner parameters, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, parameters), serviceCallback);
+ }
+
+ /**
+ * Create or update a Log Analytics cluster.
+ *
+ * @param resourceGroupName The resource group name of the Log Analytics cluster.
+ * @param clusterName The name of the Log Analytics cluster.
+ * @param parameters The parameters required to create or update a Log Analytics cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ public Observable createOrUpdateAsync(String resourceGroupName, String clusterName, ClusterInner parameters) {
+ return createOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, parameters).map(new Func1, Void>() {
+ @Override
+ public Void call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Create or update a Log Analytics cluster.
+ *
+ * @param resourceGroupName The resource group name of the Log Analytics cluster.
+ * @param clusterName The name of the Log Analytics cluster.
+ * @param parameters The parameters required to create or update a Log Analytics cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String clusterName, ClusterInner parameters) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (clusterName == null) {
+ throw new IllegalArgumentException("Parameter clusterName 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 (parameters == null) {
+ throw new IllegalArgumentException("Parameter parameters 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(parameters);
+ Observable> observable = service.createOrUpdate(resourceGroupName, clusterName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent());
+ return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType());
+ }
+
+ /**
+ * Create or update a Log Analytics cluster.
+ *
+ * @param resourceGroupName The resource group name of the Log Analytics cluster.
+ * @param clusterName The name of the Log Analytics cluster.
+ * @param parameters The parameters required to create or update a Log Analytics cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorResponseException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ */
+ public void beginCreateOrUpdate(String resourceGroupName, String clusterName, ClusterInner parameters) {
+ beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, parameters).toBlocking().single().body();
+ }
+
+ /**
+ * Create or update a Log Analytics cluster.
+ *
+ * @param resourceGroupName The resource group name of the Log Analytics cluster.
+ * @param clusterName The name of the Log Analytics cluster.
+ * @param parameters The parameters required to create or update a Log Analytics cluster.
+ * @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 beginCreateOrUpdateAsync(String resourceGroupName, String clusterName, ClusterInner parameters, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, parameters), serviceCallback);
+ }
+
+ /**
+ * Create or update a Log Analytics cluster.
+ *
+ * @param resourceGroupName The resource group name of the Log Analytics cluster.
+ * @param clusterName The name of the Log Analytics cluster.
+ * @param parameters The parameters required to create or update a Log Analytics cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceResponse} object if successful.
+ */
+ public Observable beginCreateOrUpdateAsync(String resourceGroupName, String clusterName, ClusterInner parameters) {
+ return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, parameters).map(new Func1, Void>() {
+ @Override
+ public Void call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Create or update a Log Analytics cluster.
+ *
+ * @param resourceGroupName The resource group name of the Log Analytics cluster.
+ * @param clusterName The name of the Log Analytics cluster.
+ * @param parameters The parameters required to create or update a Log Analytics cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceResponse} object if successful.
+ */
+ public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String clusterName, ClusterInner parameters) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (clusterName == null) {
+ throw new IllegalArgumentException("Parameter clusterName 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 (parameters == null) {
+ throw new IllegalArgumentException("Parameter parameters 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(parameters);
+ return service.beginCreateOrUpdate(resourceGroupName, clusterName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(202, new TypeToken() { }.getType())
+ .registerError(ErrorResponseException.class)
+ .build(response);
+ }
+
+ /**
+ * Deletes a cluster instance.
+ *
+ * @param resourceGroupName The resource group name of the Log Analytics cluster.
+ * @param clusterName Name of the Log Analytics Cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorResponseException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ */
+ public void delete(String resourceGroupName, String clusterName) {
+ deleteWithServiceResponseAsync(resourceGroupName, clusterName).toBlocking().single().body();
+ }
+
+ /**
+ * Deletes a cluster instance.
+ *
+ * @param resourceGroupName The resource group name of the Log Analytics cluster.
+ * @param clusterName Name of the Log Analytics Cluster.
+ * @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 deleteAsync(String resourceGroupName, String clusterName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, clusterName), serviceCallback);
+ }
+
+ /**
+ * Deletes a cluster instance.
+ *
+ * @param resourceGroupName The resource group name of the Log Analytics cluster.
+ * @param clusterName Name of the Log Analytics Cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceResponse} object if successful.
+ */
+ public Observable deleteAsync(String resourceGroupName, String clusterName) {
+ return deleteWithServiceResponseAsync(resourceGroupName, clusterName).map(new Func1, Void>() {
+ @Override
+ public Void call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Deletes a cluster instance.
+ *
+ * @param resourceGroupName The resource group name of the Log Analytics cluster.
+ * @param clusterName Name of the Log Analytics Cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceResponse} object if successful.
+ */
+ public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String clusterName) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (clusterName == null) {
+ throw new IllegalArgumentException("Parameter clusterName 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.");
+ }
+ return service.delete(resourceGroupName, clusterName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = deleteDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse deleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .register(204, new TypeToken() { }.getType())
+ .registerError(ErrorResponseException.class)
+ .build(response);
+ }
+
+ /**
+ * Gets a Log Analytics cluster instance.
+ *
+ * @param resourceGroupName The resource group name of the Log Analytics cluster.
+ * @param clusterName Name of the Log Analytics Cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorResponseException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the ClusterInner object if successful.
+ */
+ public ClusterInner getByResourceGroup(String resourceGroupName, String clusterName) {
+ return getByResourceGroupWithServiceResponseAsync(resourceGroupName, clusterName).toBlocking().single().body();
+ }
+
+ /**
+ * Gets a Log Analytics cluster instance.
+ *
+ * @param resourceGroupName The resource group name of the Log Analytics cluster.
+ * @param clusterName Name of the Log Analytics Cluster.
+ * @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 getByResourceGroupAsync(String resourceGroupName, String clusterName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, clusterName), serviceCallback);
+ }
+
+ /**
+ * Gets a Log Analytics cluster instance.
+ *
+ * @param resourceGroupName The resource group name of the Log Analytics cluster.
+ * @param clusterName Name of the Log Analytics Cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the ClusterInner object
+ */
+ public Observable getByResourceGroupAsync(String resourceGroupName, String clusterName) {
+ return getByResourceGroupWithServiceResponseAsync(resourceGroupName, clusterName).map(new Func1, ClusterInner>() {
+ @Override
+ public ClusterInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Gets a Log Analytics cluster instance.
+ *
+ * @param resourceGroupName The resource group name of the Log Analytics cluster.
+ * @param clusterName Name of the Log Analytics Cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the ClusterInner object
+ */
+ public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String clusterName) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (clusterName == null) {
+ throw new IllegalArgumentException("Parameter clusterName 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.");
+ }
+ return service.getByResourceGroup(resourceGroupName, clusterName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = getByResourceGroupDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse getByResourceGroupDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .registerError(ErrorResponseException.class)
+ .build(response);
+ }
+
+ /**
+ * Updates a Log Analytics cluster.
+ *
+ * @param resourceGroupName The resource group name of the cluster.
+ * @param clusterName The name of the cluster.
+ * @param parameters The parameters required to patch a Log Analytics cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorResponseException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the ClusterInner object if successful.
+ */
+ public ClusterInner update(String resourceGroupName, String clusterName, ClusterPatch parameters) {
+ return updateWithServiceResponseAsync(resourceGroupName, clusterName, parameters).toBlocking().single().body();
+ }
+
+ /**
+ * Updates a Log Analytics cluster.
+ *
+ * @param resourceGroupName The resource group name of the cluster.
+ * @param clusterName The name of the cluster.
+ * @param parameters The parameters required to patch a Log Analytics cluster.
+ * @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 updateAsync(String resourceGroupName, String clusterName, ClusterPatch parameters, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, clusterName, parameters), serviceCallback);
+ }
+
+ /**
+ * Updates a Log Analytics cluster.
+ *
+ * @param resourceGroupName The resource group name of the cluster.
+ * @param clusterName The name of the cluster.
+ * @param parameters The parameters required to patch a Log Analytics cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the ClusterInner object
+ */
+ public Observable updateAsync(String resourceGroupName, String clusterName, ClusterPatch parameters) {
+ return updateWithServiceResponseAsync(resourceGroupName, clusterName, parameters).map(new Func1, ClusterInner>() {
+ @Override
+ public ClusterInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Updates a Log Analytics cluster.
+ *
+ * @param resourceGroupName The resource group name of the cluster.
+ * @param clusterName The name of the cluster.
+ * @param parameters The parameters required to patch a Log Analytics cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the ClusterInner object
+ */
+ public Observable> updateWithServiceResponseAsync(String resourceGroupName, String clusterName, ClusterPatch parameters) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (clusterName == null) {
+ throw new IllegalArgumentException("Parameter clusterName 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 (parameters == null) {
+ throw new IllegalArgumentException("Parameter parameters 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(parameters);
+ return service.update(resourceGroupName, clusterName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = updateDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse updateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .registerError(ErrorResponseException.class)
+ .build(response);
+ }
+
+ /**
+ * Gets Log Analytics clusters in a resource group.
+ *
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorResponseException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the PagedList<ClusterInner> object if successful.
+ */
+ public PagedList listByResourceGroupNext(final String nextPageLink) {
+ ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single();
+ return new PagedList(response.body()) {
+ @Override
+ public Page nextPage(String nextPageLink) {
+ return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body();
+ }
+ };
+ }
+
+ /**
+ * Gets Log Analytics clusters in a resource group.
+ *
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param serviceFuture the ServiceFuture object tracking the Retrofit calls
+ * @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> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) {
+ return AzureServiceFuture.fromPageResponse(
+ listByResourceGroupNextSinglePageAsync(nextPageLink),
+ new Func1>>>() {
+ @Override
+ public Observable>> call(String nextPageLink) {
+ return listByResourceGroupNextSinglePageAsync(nextPageLink);
+ }
+ },
+ serviceCallback);
+ }
+
+ /**
+ * Gets Log Analytics clusters in a resource group.
+ *
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<ClusterInner> object
+ */
+ public Observable> listByResourceGroupNextAsync(final String nextPageLink) {
+ return listByResourceGroupNextWithServiceResponseAsync(nextPageLink)
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Gets Log Analytics clusters in a resource group.
+ *
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<ClusterInner> object
+ */
+ public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) {
+ return listByResourceGroupNextSinglePageAsync(nextPageLink)
+ .concatMap(new Func1>, Observable>>>() {
+ @Override
+ public Observable>> call(ServiceResponse> page) {
+ String nextPageLink = page.body().nextPageLink();
+ if (nextPageLink == null) {
+ return Observable.just(page);
+ }
+ return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink));
+ }
+ });
+ }
+
+ /**
+ * Gets Log Analytics clusters in a resource group.
+ *
+ ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the PagedList<ClusterInner> object wrapped in {@link ServiceResponse} if successful.
+ */
+ public Observable>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) {
+ if (nextPageLink == null) {
+ throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null.");
+ }
+ String nextUrl = String.format("%s", nextPageLink);
+ return service.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>>() {
+ @Override
+ public Observable>> call(Response response) {
+ try {
+ ServiceResponse> result = listByResourceGroupNextDelegate(response);
+ return Observable.just(new ServiceResponse>(result.body(), result.response()));
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().