diff --git a/sdk/loganalytics/mgmt-v2020_10_01/pom.xml b/sdk/loganalytics/mgmt-v2020_10_01/pom.xml
new file mode 100644
index 000000000000..f6ffeafb696d
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2020_10_01/pom.xml
@@ -0,0 +1,135 @@
+
+
+ 4.0.0
+ com.microsoft.azure.loganalytics.v2020_10_01
+
+ 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-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/AssociatedWorkspace.java b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/AssociatedWorkspace.java
new file mode 100644
index 000000000000..c52e01fc8b67
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/AssociatedWorkspace.java
@@ -0,0 +1,77 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.loganalytics.v2020_10_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The list of Log Analytics workspaces associated with the cluster.
+ */
+public class AssociatedWorkspace {
+ /**
+ * The id of the assigned workspace.
+ */
+ @JsonProperty(value = "workspaceId", access = JsonProperty.Access.WRITE_ONLY)
+ private String workspaceId;
+
+ /**
+ * The name id the assigned workspace.
+ */
+ @JsonProperty(value = "workspaceName", access = JsonProperty.Access.WRITE_ONLY)
+ private String workspaceName;
+
+ /**
+ * The ResourceId id the assigned workspace.
+ */
+ @JsonProperty(value = "resourceId", access = JsonProperty.Access.WRITE_ONLY)
+ private String resourceId;
+
+ /**
+ * The time of workspace association.
+ */
+ @JsonProperty(value = "associateDate", access = JsonProperty.Access.WRITE_ONLY)
+ private String associateDate;
+
+ /**
+ * Get the id of the assigned workspace.
+ *
+ * @return the workspaceId value
+ */
+ public String workspaceId() {
+ return this.workspaceId;
+ }
+
+ /**
+ * Get the name id the assigned workspace.
+ *
+ * @return the workspaceName value
+ */
+ public String workspaceName() {
+ return this.workspaceName;
+ }
+
+ /**
+ * Get the ResourceId id the assigned workspace.
+ *
+ * @return the resourceId value
+ */
+ public String resourceId() {
+ return this.resourceId;
+ }
+
+ /**
+ * Get the time of workspace association.
+ *
+ * @return the associateDate value
+ */
+ public String associateDate() {
+ return this.associateDate;
+ }
+
+}
diff --git a/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/AzureEntityResource.java b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/AzureEntityResource.java
new file mode 100644
index 000000000000..4a24d971a217
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/AzureEntityResource.java
@@ -0,0 +1,34 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.loganalytics.v2020_10_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.azure.ProxyResource;
+
+/**
+ * The resource model definition for an Azure Resource Manager resource with an
+ * etag.
+ */
+public class AzureEntityResource extends ProxyResource {
+ /**
+ * Resource Etag.
+ */
+ @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY)
+ private String etag;
+
+ /**
+ * Get resource Etag.
+ *
+ * @return the etag value
+ */
+ public String etag() {
+ return this.etag;
+ }
+
+}
diff --git a/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/BillingType.java b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/BillingType.java
new file mode 100644
index 000000000000..b6996e7e86ce
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/BillingType.java
@@ -0,0 +1,41 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.loganalytics.v2020_10_01;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for BillingType.
+ */
+public final class BillingType extends ExpandableStringEnum {
+ /** Static value Cluster for BillingType. */
+ public static final BillingType CLUSTER = fromString("Cluster");
+
+ /** Static value Workspaces for BillingType. */
+ public static final BillingType WORKSPACES = fromString("Workspaces");
+
+ /**
+ * Creates or finds a BillingType from its string representation.
+ * @param name a name to look for
+ * @return the corresponding BillingType
+ */
+ @JsonCreator
+ public static BillingType fromString(String name) {
+ return fromString(name, BillingType.class);
+ }
+
+ /**
+ * @return known BillingType values
+ */
+ public static Collection values() {
+ return values(BillingType.class);
+ }
+}
diff --git a/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/CapacityReservationProperties.java b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/CapacityReservationProperties.java
new file mode 100644
index 000000000000..bdf1dc7c2dc7
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/CapacityReservationProperties.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.v2020_10_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The Capacity Reservation properties.
+ */
+public class CapacityReservationProperties {
+ /**
+ * The last time Sku was updated.
+ */
+ @JsonProperty(value = "lastSkuUpdate", access = JsonProperty.Access.WRITE_ONLY)
+ private String lastSkuUpdate;
+
+ /**
+ * Minimum CapacityReservation value in GB.
+ */
+ @JsonProperty(value = "minCapacity", access = JsonProperty.Access.WRITE_ONLY)
+ private Long minCapacity;
+
+ /**
+ * Maximum CapacityReservation value in GB.
+ */
+ @JsonProperty(value = "maxCapacity", access = JsonProperty.Access.WRITE_ONLY)
+ private Long maxCapacity;
+
+ /**
+ * Get the last time Sku was updated.
+ *
+ * @return the lastSkuUpdate value
+ */
+ public String lastSkuUpdate() {
+ return this.lastSkuUpdate;
+ }
+
+ /**
+ * Get minimum CapacityReservation value in GB.
+ *
+ * @return the minCapacity value
+ */
+ public Long minCapacity() {
+ return this.minCapacity;
+ }
+
+ /**
+ * Get maximum CapacityReservation value in GB.
+ *
+ * @return the maxCapacity value
+ */
+ public Long maxCapacity() {
+ return this.maxCapacity;
+ }
+
+}
diff --git a/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/Cluster.java b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/Cluster.java
new file mode 100644
index 000000000000..d7e037fc7479
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/Cluster.java
@@ -0,0 +1,261 @@
+/**
+ * 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.v2020_10_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.Resource;
+import com.microsoft.azure.arm.resources.models.GroupableResourceCore;
+import com.microsoft.azure.arm.resources.models.HasResourceGroup;
+import com.microsoft.azure.arm.model.Refreshable;
+import com.microsoft.azure.arm.model.Updatable;
+import com.microsoft.azure.arm.model.Appliable;
+import com.microsoft.azure.arm.model.Creatable;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.loganalytics.v2020_10_01.implementation.LogAnalyticsManager;
+import java.util.List;
+import com.microsoft.azure.management.loganalytics.v2020_10_01.implementation.ClusterInner;
+
+/**
+ * Type representing Cluster.
+ */
+public interface Cluster extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager {
+ /**
+ * @return the associatedWorkspaces value.
+ */
+ List associatedWorkspaces();
+
+ /**
+ * @return the billingType value.
+ */
+ BillingType billingType();
+
+ /**
+ * @return the capacityReservationProperties value.
+ */
+ CapacityReservationProperties capacityReservationProperties();
+
+ /**
+ * @return the clusterId value.
+ */
+ String clusterId();
+
+ /**
+ * @return the createdDate value.
+ */
+ String createdDate();
+
+ /**
+ * @return the identity value.
+ */
+ Identity identity();
+
+ /**
+ * @return the isAvailabilityZonesEnabled value.
+ */
+ Boolean isAvailabilityZonesEnabled();
+
+ /**
+ * @return the isDoubleEncryptionEnabled value.
+ */
+ Boolean isDoubleEncryptionEnabled();
+
+ /**
+ * @return the keyVaultProperties value.
+ */
+ KeyVaultProperties keyVaultProperties();
+
+ /**
+ * @return the lastModifiedDate value.
+ */
+ String lastModifiedDate();
+
+ /**
+ * @return the provisioningState value.
+ */
+ ClusterEntityStatus provisioningState();
+
+ /**
+ * @return the sku value.
+ */
+ ClusterSku sku();
+
+ /**
+ * The entirety of the Cluster definition.
+ */
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * Grouping of Cluster definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of a Cluster definition.
+ */
+ interface Blank extends GroupableResourceCore.DefinitionWithRegion {
+ }
+
+ /**
+ * The stage of the Cluster definition allowing to specify the resource group.
+ */
+ interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup {
+ }
+
+ /**
+ * The stage of the cluster definition allowing to specify AssociatedWorkspaces.
+ */
+ interface WithAssociatedWorkspaces {
+ /**
+ * Specifies associatedWorkspaces.
+ * @param associatedWorkspaces The list of Log Analytics workspaces associated with the cluster
+ * @return the next definition stage
+ */
+ WithCreate withAssociatedWorkspaces(List associatedWorkspaces);
+ }
+
+ /**
+ * The stage of the cluster definition allowing to specify BillingType.
+ */
+ interface WithBillingType {
+ /**
+ * Specifies billingType.
+ * @param billingType Configures whether billing will be only on the cluster or each workspace will be billed by its proportional use. This does not change the overall billing, only how it will be distributed. Default value is 'Cluster'. Possible values include: 'Cluster', 'Workspaces'
+ * @return the next definition stage
+ */
+ WithCreate withBillingType(BillingType billingType);
+ }
+
+ /**
+ * The stage of the cluster definition allowing to specify CapacityReservationProperties.
+ */
+ interface WithCapacityReservationProperties {
+ /**
+ * Specifies capacityReservationProperties.
+ * @param capacityReservationProperties Additional properties for capacity reservation
+ * @return the next definition stage
+ */
+ WithCreate withCapacityReservationProperties(CapacityReservationProperties capacityReservationProperties);
+ }
+
+ /**
+ * The stage of the cluster definition allowing to specify Identity.
+ */
+ interface WithIdentity {
+ /**
+ * Specifies identity.
+ * @param identity The identity of the resource
+ * @return the next definition stage
+ */
+ WithCreate withIdentity(Identity identity);
+ }
+
+ /**
+ * The stage of the cluster definition allowing to specify IsAvailabilityZonesEnabled.
+ */
+ interface WithIsAvailabilityZonesEnabled {
+ /**
+ * Specifies isAvailabilityZonesEnabled.
+ * @param isAvailabilityZonesEnabled Sets whether the cluster will support availability zones. This can be set as true only in regions where Azure Data Explorer support Availability Zones. This Property can not be modified after cluster creation. Default value is 'true' if region supports Availability Zones
+ * @return the next definition stage
+ */
+ WithCreate withIsAvailabilityZonesEnabled(Boolean isAvailabilityZonesEnabled);
+ }
+
+ /**
+ * The stage of the cluster definition allowing to specify IsDoubleEncryptionEnabled.
+ */
+ interface WithIsDoubleEncryptionEnabled {
+ /**
+ * Specifies isDoubleEncryptionEnabled.
+ * @param isDoubleEncryptionEnabled Configures whether cluster will use double encryption. This Property can not be modified after cluster creation. Default value is 'true'
+ * @return the next definition stage
+ */
+ WithCreate withIsDoubleEncryptionEnabled(Boolean isDoubleEncryptionEnabled);
+ }
+
+ /**
+ * The stage of the cluster definition allowing to specify KeyVaultProperties.
+ */
+ interface WithKeyVaultProperties {
+ /**
+ * Specifies keyVaultProperties.
+ * @param keyVaultProperties The associated key properties
+ * @return the next definition stage
+ */
+ WithCreate withKeyVaultProperties(KeyVaultProperties keyVaultProperties);
+ }
+
+ /**
+ * The stage of the cluster definition allowing to specify Sku.
+ */
+ interface WithSku {
+ /**
+ * Specifies sku.
+ * @param sku The sku properties
+ * @return the next definition stage
+ */
+ WithCreate withSku(ClusterSku sku);
+ }
+
+ /**
+ * The stage of the definition which contains all the minimum required inputs for
+ * the resource to be created (via {@link WithCreate#create()}), but also allows
+ * for any other optional settings to be specified.
+ */
+ interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithAssociatedWorkspaces, DefinitionStages.WithBillingType, DefinitionStages.WithCapacityReservationProperties, DefinitionStages.WithIdentity, DefinitionStages.WithIsAvailabilityZonesEnabled, DefinitionStages.WithIsDoubleEncryptionEnabled, DefinitionStages.WithKeyVaultProperties, DefinitionStages.WithSku {
+ }
+ }
+ /**
+ * The template for a Cluster update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithIdentity, UpdateStages.WithKeyVaultProperties, UpdateStages.WithSku {
+ }
+
+ /**
+ * Grouping of Cluster update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the cluster update allowing to specify Identity.
+ */
+ interface WithIdentity {
+ /**
+ * Specifies identity.
+ * @param identity The identity of the resource
+ * @return the next update stage
+ */
+ Update withIdentity(Identity identity);
+ }
+
+ /**
+ * The stage of the 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(ClusterSku sku);
+ }
+
+ }
+}
diff --git a/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/ClusterEntityStatus.java b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/ClusterEntityStatus.java
new file mode 100644
index 000000000000..ce67fb3bd878
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/ClusterEntityStatus.java
@@ -0,0 +1,56 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.loganalytics.v2020_10_01;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for ClusterEntityStatus.
+ */
+public final class ClusterEntityStatus extends ExpandableStringEnum {
+ /** Static value Creating for ClusterEntityStatus. */
+ public static final ClusterEntityStatus CREATING = fromString("Creating");
+
+ /** Static value Succeeded for ClusterEntityStatus. */
+ public static final ClusterEntityStatus SUCCEEDED = fromString("Succeeded");
+
+ /** Static value Failed for ClusterEntityStatus. */
+ public static final ClusterEntityStatus FAILED = fromString("Failed");
+
+ /** Static value Canceled for ClusterEntityStatus. */
+ public static final ClusterEntityStatus CANCELED = fromString("Canceled");
+
+ /** Static value Deleting for ClusterEntityStatus. */
+ public static final ClusterEntityStatus DELETING = fromString("Deleting");
+
+ /** Static value ProvisioningAccount for ClusterEntityStatus. */
+ public static final ClusterEntityStatus PROVISIONING_ACCOUNT = fromString("ProvisioningAccount");
+
+ /** Static value Updating for ClusterEntityStatus. */
+ public static final ClusterEntityStatus UPDATING = fromString("Updating");
+
+ /**
+ * Creates or finds a ClusterEntityStatus from its string representation.
+ * @param name a name to look for
+ * @return the corresponding ClusterEntityStatus
+ */
+ @JsonCreator
+ public static ClusterEntityStatus fromString(String name) {
+ return fromString(name, ClusterEntityStatus.class);
+ }
+
+ /**
+ * @return known ClusterEntityStatus values
+ */
+ public static Collection values() {
+ return values(ClusterEntityStatus.class);
+ }
+}
diff --git a/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/ClusterPatch.java b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/ClusterPatch.java
new file mode 100644
index 000000000000..5dca62b54db5
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/ClusterPatch.java
@@ -0,0 +1,124 @@
+/**
+ * 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.v2020_10_01;
+
+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 identity of the resource.
+ */
+ @JsonProperty(value = "identity")
+ private Identity identity;
+
+ /**
+ * The sku properties.
+ */
+ @JsonProperty(value = "sku")
+ private ClusterSku 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 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 ClusterPatch object itself.
+ */
+ public ClusterPatch withIdentity(Identity identity) {
+ this.identity = identity;
+ return this;
+ }
+
+ /**
+ * Get the sku properties.
+ *
+ * @return the sku value
+ */
+ public ClusterSku sku() {
+ return this.sku;
+ }
+
+ /**
+ * Set the sku properties.
+ *
+ * @param sku the sku value to set
+ * @return the ClusterPatch object itself.
+ */
+ public ClusterPatch withSku(ClusterSku 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-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/ClusterSku.java b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/ClusterSku.java
new file mode 100644
index 000000000000..d2aa8f5fd2b6
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/ClusterSku.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.v2020_10_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The cluster sku definition.
+ */
+public class ClusterSku {
+ /**
+ * The capacity value.
+ */
+ @JsonProperty(value = "capacity")
+ private Long capacity;
+
+ /**
+ * The name of the SKU. Possible values include: 'CapacityReservation'.
+ */
+ @JsonProperty(value = "name")
+ private ClusterSkuNameEnum 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 ClusterSku object itself.
+ */
+ public ClusterSku withCapacity(Long capacity) {
+ this.capacity = capacity;
+ return this;
+ }
+
+ /**
+ * Get the name of the SKU. Possible values include: 'CapacityReservation'.
+ *
+ * @return the name value
+ */
+ public ClusterSkuNameEnum name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name of the SKU. Possible values include: 'CapacityReservation'.
+ *
+ * @param name the name value to set
+ * @return the ClusterSku object itself.
+ */
+ public ClusterSku withName(ClusterSkuNameEnum name) {
+ this.name = name;
+ return this;
+ }
+
+}
diff --git a/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/ClusterSkuNameEnum.java b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/ClusterSkuNameEnum.java
new file mode 100644
index 000000000000..cecba5fd871e
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/ClusterSkuNameEnum.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.v2020_10_01;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for ClusterSkuNameEnum.
+ */
+public final class ClusterSkuNameEnum extends ExpandableStringEnum {
+ /** Static value CapacityReservation for ClusterSkuNameEnum. */
+ public static final ClusterSkuNameEnum CAPACITY_RESERVATION = fromString("CapacityReservation");
+
+ /**
+ * Creates or finds a ClusterSkuNameEnum from its string representation.
+ * @param name a name to look for
+ * @return the corresponding ClusterSkuNameEnum
+ */
+ @JsonCreator
+ public static ClusterSkuNameEnum fromString(String name) {
+ return fromString(name, ClusterSkuNameEnum.class);
+ }
+
+ /**
+ * @return known ClusterSkuNameEnum values
+ */
+ public static Collection values() {
+ return values(ClusterSkuNameEnum.class);
+ }
+}
diff --git a/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/Clusters.java b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/Clusters.java
new file mode 100644
index 000000000000..3bf518a74e41
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/Clusters.java
@@ -0,0 +1,25 @@
+/**
+ * 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.v2020_10_01;
+
+import com.microsoft.azure.arm.collection.SupportsCreating;
+import com.microsoft.azure.arm.resources.collection.SupportsDeletingByResourceGroup;
+import com.microsoft.azure.arm.resources.collection.SupportsBatchDeletion;
+import com.microsoft.azure.arm.resources.collection.SupportsGettingByResourceGroup;
+import rx.Observable;
+import com.microsoft.azure.arm.resources.collection.SupportsListingByResourceGroup;
+import com.microsoft.azure.arm.collection.SupportsListing;
+import com.microsoft.azure.management.loganalytics.v2020_10_01.implementation.ClustersInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing Clusters.
+ */
+public interface Clusters extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner {
+}
diff --git a/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/DataIngestionStatus.java b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/DataIngestionStatus.java
new file mode 100644
index 000000000000..a594d80b4db0
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/DataIngestionStatus.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.v2020_10_01;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for DataIngestionStatus.
+ */
+public final class DataIngestionStatus extends ExpandableStringEnum {
+ /** Static value RespectQuota for DataIngestionStatus. */
+ public static final DataIngestionStatus RESPECT_QUOTA = fromString("RespectQuota");
+
+ /** Static value ForceOn for DataIngestionStatus. */
+ public static final DataIngestionStatus FORCE_ON = fromString("ForceOn");
+
+ /** Static value ForceOff for DataIngestionStatus. */
+ public static final DataIngestionStatus FORCE_OFF = fromString("ForceOff");
+
+ /** Static value OverQuota for DataIngestionStatus. */
+ public static final DataIngestionStatus OVER_QUOTA = fromString("OverQuota");
+
+ /** Static value SubscriptionSuspended for DataIngestionStatus. */
+ public static final DataIngestionStatus SUBSCRIPTION_SUSPENDED = fromString("SubscriptionSuspended");
+
+ /** Static value ApproachingQuota for DataIngestionStatus. */
+ public static final DataIngestionStatus APPROACHING_QUOTA = fromString("ApproachingQuota");
+
+ /**
+ * Creates or finds a DataIngestionStatus from its string representation.
+ * @param name a name to look for
+ * @return the corresponding DataIngestionStatus
+ */
+ @JsonCreator
+ public static DataIngestionStatus fromString(String name) {
+ return fromString(name, DataIngestionStatus.class);
+ }
+
+ /**
+ * @return known DataIngestionStatus values
+ */
+ public static Collection values() {
+ return values(DataIngestionStatus.class);
+ }
+}
diff --git a/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/DeletedWorkspaces.java b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/DeletedWorkspaces.java
new file mode 100644
index 000000000000..d2a6aa74a73f
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/DeletedWorkspaces.java
@@ -0,0 +1,20 @@
+/**
+ * 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.v2020_10_01;
+
+import com.microsoft.azure.arm.resources.collection.SupportsListingByResourceGroup;
+import com.microsoft.azure.arm.collection.SupportsListing;
+import com.microsoft.azure.management.loganalytics.v2020_10_01.implementation.DeletedWorkspacesInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing DeletedWorkspaces.
+ */
+public interface DeletedWorkspaces extends SupportsListingByResourceGroup, SupportsListing, HasInner {
+}
diff --git a/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/ErrorAdditionalInfo.java b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/ErrorAdditionalInfo.java
new file mode 100644
index 000000000000..9234561dd7e7
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/ErrorAdditionalInfo.java
@@ -0,0 +1,47 @@
+/**
+ * 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.v2020_10_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The resource management error additional info.
+ */
+public class ErrorAdditionalInfo {
+ /**
+ * The additional info type.
+ */
+ @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY)
+ private String type;
+
+ /**
+ * The additional info.
+ */
+ @JsonProperty(value = "info", access = JsonProperty.Access.WRITE_ONLY)
+ private Object info;
+
+ /**
+ * Get the additional info type.
+ *
+ * @return the type value
+ */
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the additional info.
+ *
+ * @return the info value
+ */
+ public Object info() {
+ return this.info;
+ }
+
+}
diff --git a/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/ErrorDetail.java b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/ErrorDetail.java
new file mode 100644
index 000000000000..8ca8a240273e
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/ErrorDetail.java
@@ -0,0 +1,93 @@
+/**
+ * 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.v2020_10_01;
+
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The error detail.
+ */
+public class ErrorDetail {
+ /**
+ * The error code.
+ */
+ @JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY)
+ private String code;
+
+ /**
+ * The error message.
+ */
+ @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY)
+ private String message;
+
+ /**
+ * The error target.
+ */
+ @JsonProperty(value = "target", access = JsonProperty.Access.WRITE_ONLY)
+ private String target;
+
+ /**
+ * The error details.
+ */
+ @JsonProperty(value = "details", access = JsonProperty.Access.WRITE_ONLY)
+ private List details;
+
+ /**
+ * The error additional info.
+ */
+ @JsonProperty(value = "additionalInfo", access = JsonProperty.Access.WRITE_ONLY)
+ private List additionalInfo;
+
+ /**
+ * Get the error code.
+ *
+ * @return the code value
+ */
+ public String code() {
+ return this.code;
+ }
+
+ /**
+ * Get the error message.
+ *
+ * @return the message value
+ */
+ public String message() {
+ return this.message;
+ }
+
+ /**
+ * Get the error target.
+ *
+ * @return the target value
+ */
+ public String target() {
+ return this.target;
+ }
+
+ /**
+ * Get the error details.
+ *
+ * @return the details value
+ */
+ public List details() {
+ return this.details;
+ }
+
+ /**
+ * Get the error additional info.
+ *
+ * @return the additionalInfo value
+ */
+ public List additionalInfo() {
+ return this.additionalInfo;
+ }
+
+}
diff --git a/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/ErrorResponse.java b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/ErrorResponse.java
new file mode 100644
index 000000000000..1ca21a3e3656
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/ErrorResponse.java
@@ -0,0 +1,46 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.loganalytics.v2020_10_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Error response.
+ * Common error response for all Azure Resource Manager APIs to return error
+ * details for failed operations. (This also follows the OData error response
+ * format.).
+ */
+public class ErrorResponse {
+ /**
+ * The error object.
+ */
+ @JsonProperty(value = "error")
+ private ErrorDetail error;
+
+ /**
+ * Get the error object.
+ *
+ * @return the error value
+ */
+ public ErrorDetail error() {
+ return this.error;
+ }
+
+ /**
+ * Set the error object.
+ *
+ * @param error the error value to set
+ * @return the ErrorResponse object itself.
+ */
+ public ErrorResponse withError(ErrorDetail error) {
+ this.error = error;
+ return this;
+ }
+
+}
diff --git a/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/ErrorResponseException.java b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/ErrorResponseException.java
new file mode 100644
index 000000000000..c73d216dfadc
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/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.v2020_10_01;
+
+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-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/Identity.java b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/Identity.java
new file mode 100644
index 000000000000..82bf8e2b225c
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/Identity.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.v2020_10_01;
+
+import java.util.Map;
+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 type of identity used for the resource. The type 'SystemAssigned,
+ * UserAssigned' includes both an implicitly created identity and a set of
+ * user assigned identities. Possible values include: 'SystemAssigned',
+ * 'UserAssigned', 'None'.
+ */
+ @JsonProperty(value = "type", required = true)
+ private IdentityType type;
+
+ /**
+ * The list of user identities associated with the resource. The user
+ * identity dictionary key references will be ARM resource ids in the form:
+ * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
+ */
+ @JsonProperty(value = "userAssignedIdentities")
+ private Map userAssignedIdentities;
+
+ /**
+ * 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 type of identity used for the resource. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. Possible values include: 'SystemAssigned', 'UserAssigned', 'None'.
+ *
+ * @return the type value
+ */
+ public IdentityType type() {
+ return this.type;
+ }
+
+ /**
+ * Set the type of identity used for the resource. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. Possible values include: 'SystemAssigned', 'UserAssigned', 'None'.
+ *
+ * @param type the type value to set
+ * @return the Identity object itself.
+ */
+ public Identity withType(IdentityType type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * Get the list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
+ *
+ * @return the userAssignedIdentities value
+ */
+ public Map userAssignedIdentities() {
+ return this.userAssignedIdentities;
+ }
+
+ /**
+ * Set the list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
+ *
+ * @param userAssignedIdentities the userAssignedIdentities value to set
+ * @return the Identity object itself.
+ */
+ public Identity withUserAssignedIdentities(Map userAssignedIdentities) {
+ this.userAssignedIdentities = userAssignedIdentities;
+ return this;
+ }
+
+}
diff --git a/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/IdentityType.java b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/IdentityType.java
new file mode 100644
index 000000000000..5000b92821b0
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/IdentityType.java
@@ -0,0 +1,56 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.loganalytics.v2020_10_01;
+
+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 UserAssigned. */
+ USER_ASSIGNED("UserAssigned"),
+
+ /** 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-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/KeyVaultProperties.java b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/KeyVaultProperties.java
new file mode 100644
index 000000000000..7c12487045af
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/KeyVaultProperties.java
@@ -0,0 +1,122 @@
+/**
+ * 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.v2020_10_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The key vault properties.
+ */
+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;
+
+ /**
+ * Selected key minimum required size.
+ */
+ @JsonProperty(value = "keyRsaSize")
+ private Integer keyRsaSize;
+
+ /**
+ * 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;
+ }
+
+ /**
+ * Get selected key minimum required size.
+ *
+ * @return the keyRsaSize value
+ */
+ public Integer keyRsaSize() {
+ return this.keyRsaSize;
+ }
+
+ /**
+ * Set selected key minimum required size.
+ *
+ * @param keyRsaSize the keyRsaSize value to set
+ * @return the KeyVaultProperties object itself.
+ */
+ public KeyVaultProperties withKeyRsaSize(Integer keyRsaSize) {
+ this.keyRsaSize = keyRsaSize;
+ return this;
+ }
+
+}
diff --git a/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/Operation.java b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/Operation.java
new file mode 100644
index 000000000000..761e99bc6935
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/Operation.java
@@ -0,0 +1,30 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.loganalytics.v2020_10_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.loganalytics.v2020_10_01.implementation.LogAnalyticsManager;
+import com.microsoft.azure.management.loganalytics.v2020_10_01.implementation.OperationInner;
+
+/**
+ * Type representing Operation.
+ */
+public interface Operation extends HasInner, HasManager {
+ /**
+ * @return the display value.
+ */
+ OperationDisplay display();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+}
diff --git a/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/OperationDisplay.java b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/OperationDisplay.java
new file mode 100644
index 000000000000..49fdd11cd0f4
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/OperationDisplay.java
@@ -0,0 +1,121 @@
+/**
+ * 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.v2020_10_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Display metadata associated with the operation.
+ */
+public class OperationDisplay {
+ /**
+ * Service provider: Microsoft OperationsManagement.
+ */
+ @JsonProperty(value = "provider")
+ private String provider;
+
+ /**
+ * Resource on which the operation is performed etc.
+ */
+ @JsonProperty(value = "resource")
+ private String resource;
+
+ /**
+ * Type of operation: get, read, delete, etc.
+ */
+ @JsonProperty(value = "operation")
+ private String operation;
+
+ /**
+ * Description of operation.
+ */
+ @JsonProperty(value = "description")
+ private String description;
+
+ /**
+ * Get service provider: Microsoft OperationsManagement.
+ *
+ * @return the provider value
+ */
+ public String provider() {
+ return this.provider;
+ }
+
+ /**
+ * Set service provider: Microsoft OperationsManagement.
+ *
+ * @param provider the provider value to set
+ * @return the OperationDisplay object itself.
+ */
+ public OperationDisplay withProvider(String provider) {
+ this.provider = provider;
+ return this;
+ }
+
+ /**
+ * Get resource on which the operation is performed etc.
+ *
+ * @return the resource value
+ */
+ public String resource() {
+ return this.resource;
+ }
+
+ /**
+ * Set resource on which the operation is performed etc.
+ *
+ * @param resource the resource value to set
+ * @return the OperationDisplay object itself.
+ */
+ public OperationDisplay withResource(String resource) {
+ this.resource = resource;
+ return this;
+ }
+
+ /**
+ * Get type of operation: get, read, delete, etc.
+ *
+ * @return the operation value
+ */
+ public String operation() {
+ return this.operation;
+ }
+
+ /**
+ * Set type of operation: get, read, delete, etc.
+ *
+ * @param operation the operation value to set
+ * @return the OperationDisplay object itself.
+ */
+ public OperationDisplay withOperation(String operation) {
+ this.operation = operation;
+ return this;
+ }
+
+ /**
+ * Get description of operation.
+ *
+ * @return the description value
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Set description of operation.
+ *
+ * @param description the description value to set
+ * @return the OperationDisplay object itself.
+ */
+ public OperationDisplay withDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+}
diff --git a/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/Operations.java b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/Operations.java
new file mode 100644
index 000000000000..4169011c8f89
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/Operations.java
@@ -0,0 +1,27 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.loganalytics.v2020_10_01;
+
+import rx.Observable;
+import com.microsoft.azure.management.loganalytics.v2020_10_01.implementation.OperationsInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing Operations.
+ */
+public interface Operations extends HasInner {
+ /**
+ * Lists all of the available OperationalInsights Rest API operations.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listAsync();
+
+}
diff --git a/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/PrivateLinkScopedResource.java b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/PrivateLinkScopedResource.java
new file mode 100644
index 000000000000..6c08bb8e756d
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/PrivateLinkScopedResource.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.v2020_10_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The private link scope resource reference.
+ */
+public class PrivateLinkScopedResource {
+ /**
+ * The full resource Id of the private link scope resource.
+ */
+ @JsonProperty(value = "resourceId")
+ private String resourceId;
+
+ /**
+ * The private link scope unique Identifier.
+ */
+ @JsonProperty(value = "scopeId")
+ private String scopeId;
+
+ /**
+ * Get the full resource Id of the private link scope resource.
+ *
+ * @return the resourceId value
+ */
+ public String resourceId() {
+ return this.resourceId;
+ }
+
+ /**
+ * Set the full resource Id of the private link scope resource.
+ *
+ * @param resourceId the resourceId value to set
+ * @return the PrivateLinkScopedResource object itself.
+ */
+ public PrivateLinkScopedResource withResourceId(String resourceId) {
+ this.resourceId = resourceId;
+ return this;
+ }
+
+ /**
+ * Get the private link scope unique Identifier.
+ *
+ * @return the scopeId value
+ */
+ public String scopeId() {
+ return this.scopeId;
+ }
+
+ /**
+ * Set the private link scope unique Identifier.
+ *
+ * @param scopeId the scopeId value to set
+ * @return the PrivateLinkScopedResource object itself.
+ */
+ public PrivateLinkScopedResource withScopeId(String scopeId) {
+ this.scopeId = scopeId;
+ return this;
+ }
+
+}
diff --git a/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/PublicNetworkAccessType.java b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/PublicNetworkAccessType.java
new file mode 100644
index 000000000000..22460ab82acc
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/PublicNetworkAccessType.java
@@ -0,0 +1,41 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.loganalytics.v2020_10_01;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for PublicNetworkAccessType.
+ */
+public final class PublicNetworkAccessType extends ExpandableStringEnum {
+ /** Static value Enabled for PublicNetworkAccessType. */
+ public static final PublicNetworkAccessType ENABLED = fromString("Enabled");
+
+ /** Static value Disabled for PublicNetworkAccessType. */
+ public static final PublicNetworkAccessType DISABLED = fromString("Disabled");
+
+ /**
+ * Creates or finds a PublicNetworkAccessType from its string representation.
+ * @param name a name to look for
+ * @return the corresponding PublicNetworkAccessType
+ */
+ @JsonCreator
+ public static PublicNetworkAccessType fromString(String name) {
+ return fromString(name, PublicNetworkAccessType.class);
+ }
+
+ /**
+ * @return known PublicNetworkAccessType values
+ */
+ public static Collection values() {
+ return values(PublicNetworkAccessType.class);
+ }
+}
diff --git a/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/UserIdentityProperties.java b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/UserIdentityProperties.java
new file mode 100644
index 000000000000..3f3f91a09bba
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/UserIdentityProperties.java
@@ -0,0 +1,47 @@
+/**
+ * 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.v2020_10_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * User assigned identity properties.
+ */
+public class UserIdentityProperties {
+ /**
+ * The principal id of user assigned identity.
+ */
+ @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY)
+ private String principalId;
+
+ /**
+ * The client id of user assigned identity.
+ */
+ @JsonProperty(value = "clientId", access = JsonProperty.Access.WRITE_ONLY)
+ private String clientId;
+
+ /**
+ * Get the principal id of user assigned identity.
+ *
+ * @return the principalId value
+ */
+ public String principalId() {
+ return this.principalId;
+ }
+
+ /**
+ * Get the client id of user assigned identity.
+ *
+ * @return the clientId value
+ */
+ public String clientId() {
+ return this.clientId;
+ }
+
+}
diff --git a/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/Workspace.java b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/Workspace.java
new file mode 100644
index 000000000000..fbe5b3f372cd
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/Workspace.java
@@ -0,0 +1,299 @@
+/**
+ * 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.v2020_10_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.Resource;
+import com.microsoft.azure.arm.resources.models.GroupableResourceCore;
+import com.microsoft.azure.arm.resources.models.HasResourceGroup;
+import com.microsoft.azure.arm.model.Refreshable;
+import com.microsoft.azure.arm.model.Updatable;
+import com.microsoft.azure.arm.model.Appliable;
+import com.microsoft.azure.arm.model.Creatable;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.loganalytics.v2020_10_01.implementation.LogAnalyticsManager;
+import java.util.List;
+import com.microsoft.azure.management.loganalytics.v2020_10_01.implementation.WorkspaceInner;
+
+/**
+ * Type representing Workspace.
+ */
+public interface Workspace extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager {
+ /**
+ * @return the customerId value.
+ */
+ String customerId();
+
+ /**
+ * @return the eTag value.
+ */
+ String eTag();
+
+ /**
+ * @return the forceCmkForQuery value.
+ */
+ Boolean forceCmkForQuery();
+
+ /**
+ * @return the privateLinkScopedResources value.
+ */
+ List privateLinkScopedResources();
+
+ /**
+ * @return the provisioningState value.
+ */
+ WorkspaceEntityStatus provisioningState();
+
+ /**
+ * @return the publicNetworkAccessForIngestion value.
+ */
+ PublicNetworkAccessType publicNetworkAccessForIngestion();
+
+ /**
+ * @return the publicNetworkAccessForQuery value.
+ */
+ PublicNetworkAccessType publicNetworkAccessForQuery();
+
+ /**
+ * @return the retentionInDays value.
+ */
+ Integer retentionInDays();
+
+ /**
+ * @return the sku value.
+ */
+ WorkspaceSku sku();
+
+ /**
+ * @return the workspaceCapping value.
+ */
+ WorkspaceCapping workspaceCapping();
+
+ /**
+ * The entirety of the Workspace definition.
+ */
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * Grouping of Workspace definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of a Workspace definition.
+ */
+ interface Blank extends GroupableResourceCore.DefinitionWithRegion {
+ }
+
+ /**
+ * The stage of the Workspace definition allowing to specify the resource group.
+ */
+ interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup {
+ }
+
+ /**
+ * The stage of the workspace definition allowing to specify ETag.
+ */
+ interface WithETag {
+ /**
+ * Specifies eTag.
+ * @param eTag The ETag of the workspace
+ * @return the next definition stage
+ */
+ WithCreate withETag(String eTag);
+ }
+
+ /**
+ * The stage of the workspace definition allowing to specify ForceCmkForQuery.
+ */
+ interface WithForceCmkForQuery {
+ /**
+ * Specifies forceCmkForQuery.
+ * @param forceCmkForQuery Indicates whether customer managed storage is mandatory for query management
+ * @return the next definition stage
+ */
+ WithCreate withForceCmkForQuery(Boolean forceCmkForQuery);
+ }
+
+ /**
+ * The stage of the workspace definition allowing to specify ProvisioningState.
+ */
+ interface WithProvisioningState {
+ /**
+ * Specifies provisioningState.
+ * @param provisioningState The provisioning state of the workspace. Possible values include: 'Creating', 'Succeeded', 'Failed', 'Canceled', 'Deleting', 'ProvisioningAccount', 'Updating'
+ * @return the next definition stage
+ */
+ WithCreate withProvisioningState(WorkspaceEntityStatus provisioningState);
+ }
+
+ /**
+ * The stage of the workspace definition allowing to specify PublicNetworkAccessForIngestion.
+ */
+ interface WithPublicNetworkAccessForIngestion {
+ /**
+ * Specifies publicNetworkAccessForIngestion.
+ * @param publicNetworkAccessForIngestion The network access type for accessing Log Analytics ingestion. Possible values include: 'Enabled', 'Disabled'
+ * @return the next definition stage
+ */
+ WithCreate withPublicNetworkAccessForIngestion(PublicNetworkAccessType publicNetworkAccessForIngestion);
+ }
+
+ /**
+ * The stage of the workspace definition allowing to specify PublicNetworkAccessForQuery.
+ */
+ interface WithPublicNetworkAccessForQuery {
+ /**
+ * Specifies publicNetworkAccessForQuery.
+ * @param publicNetworkAccessForQuery The network access type for accessing Log Analytics query. Possible values include: 'Enabled', 'Disabled'
+ * @return the next definition stage
+ */
+ WithCreate withPublicNetworkAccessForQuery(PublicNetworkAccessType publicNetworkAccessForQuery);
+ }
+
+ /**
+ * The stage of the workspace definition allowing to specify RetentionInDays.
+ */
+ interface WithRetentionInDays {
+ /**
+ * Specifies retentionInDays.
+ * @param retentionInDays The workspace data retention in days, between 30 and 730
+ * @return the next definition stage
+ */
+ WithCreate withRetentionInDays(Integer retentionInDays);
+ }
+
+ /**
+ * The stage of the workspace definition allowing to specify Sku.
+ */
+ interface WithSku {
+ /**
+ * Specifies sku.
+ * @param sku The SKU of the workspace
+ * @return the next definition stage
+ */
+ WithCreate withSku(WorkspaceSku sku);
+ }
+
+ /**
+ * The stage of the workspace definition allowing to specify WorkspaceCapping.
+ */
+ interface WithWorkspaceCapping {
+ /**
+ * Specifies workspaceCapping.
+ * @param workspaceCapping The daily volume cap for ingestion
+ * @return the next definition stage
+ */
+ WithCreate withWorkspaceCapping(WorkspaceCapping workspaceCapping);
+ }
+
+ /**
+ * The stage of the definition which contains all the minimum required inputs for
+ * the resource to be created (via {@link WithCreate#create()}), but also allows
+ * for any other optional settings to be specified.
+ */
+ interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithETag, DefinitionStages.WithForceCmkForQuery, DefinitionStages.WithProvisioningState, DefinitionStages.WithPublicNetworkAccessForIngestion, DefinitionStages.WithPublicNetworkAccessForQuery, DefinitionStages.WithRetentionInDays, DefinitionStages.WithSku, DefinitionStages.WithWorkspaceCapping {
+ }
+ }
+ /**
+ * The template for a Workspace update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithForceCmkForQuery, UpdateStages.WithProvisioningState, UpdateStages.WithPublicNetworkAccessForIngestion, UpdateStages.WithPublicNetworkAccessForQuery, UpdateStages.WithRetentionInDays, UpdateStages.WithSku, UpdateStages.WithWorkspaceCapping {
+ }
+
+ /**
+ * Grouping of Workspace update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the workspace update allowing to specify ForceCmkForQuery.
+ */
+ interface WithForceCmkForQuery {
+ /**
+ * Specifies forceCmkForQuery.
+ * @param forceCmkForQuery Indicates whether customer managed storage is mandatory for query management
+ * @return the next update stage
+ */
+ Update withForceCmkForQuery(Boolean forceCmkForQuery);
+ }
+
+ /**
+ * The stage of the workspace update allowing to specify ProvisioningState.
+ */
+ interface WithProvisioningState {
+ /**
+ * Specifies provisioningState.
+ * @param provisioningState The provisioning state of the workspace. Possible values include: 'Creating', 'Succeeded', 'Failed', 'Canceled', 'Deleting', 'ProvisioningAccount', 'Updating'
+ * @return the next update stage
+ */
+ Update withProvisioningState(WorkspaceEntityStatus provisioningState);
+ }
+
+ /**
+ * The stage of the workspace update allowing to specify PublicNetworkAccessForIngestion.
+ */
+ interface WithPublicNetworkAccessForIngestion {
+ /**
+ * Specifies publicNetworkAccessForIngestion.
+ * @param publicNetworkAccessForIngestion The network access type for accessing Log Analytics ingestion. Possible values include: 'Enabled', 'Disabled'
+ * @return the next update stage
+ */
+ Update withPublicNetworkAccessForIngestion(PublicNetworkAccessType publicNetworkAccessForIngestion);
+ }
+
+ /**
+ * The stage of the workspace update allowing to specify PublicNetworkAccessForQuery.
+ */
+ interface WithPublicNetworkAccessForQuery {
+ /**
+ * Specifies publicNetworkAccessForQuery.
+ * @param publicNetworkAccessForQuery The network access type for accessing Log Analytics query. Possible values include: 'Enabled', 'Disabled'
+ * @return the next update stage
+ */
+ Update withPublicNetworkAccessForQuery(PublicNetworkAccessType publicNetworkAccessForQuery);
+ }
+
+ /**
+ * The stage of the workspace update allowing to specify RetentionInDays.
+ */
+ interface WithRetentionInDays {
+ /**
+ * Specifies retentionInDays.
+ * @param retentionInDays The workspace data retention in days, between 30 and 730
+ * @return the next update stage
+ */
+ Update withRetentionInDays(Integer retentionInDays);
+ }
+
+ /**
+ * The stage of the workspace update allowing to specify Sku.
+ */
+ interface WithSku {
+ /**
+ * Specifies sku.
+ * @param sku The SKU of the workspace
+ * @return the next update stage
+ */
+ Update withSku(WorkspaceSku sku);
+ }
+
+ /**
+ * The stage of the workspace update allowing to specify WorkspaceCapping.
+ */
+ interface WithWorkspaceCapping {
+ /**
+ * Specifies workspaceCapping.
+ * @param workspaceCapping The daily volume cap for ingestion
+ * @return the next update stage
+ */
+ Update withWorkspaceCapping(WorkspaceCapping workspaceCapping);
+ }
+
+ }
+}
diff --git a/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/WorkspaceCapping.java b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/WorkspaceCapping.java
new file mode 100644
index 000000000000..f83c8b41bcf1
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/WorkspaceCapping.java
@@ -0,0 +1,75 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.loganalytics.v2020_10_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The daily volume cap for ingestion.
+ */
+public class WorkspaceCapping {
+ /**
+ * The workspace daily quota for ingestion.
+ */
+ @JsonProperty(value = "dailyQuotaGb")
+ private Double dailyQuotaGb;
+
+ /**
+ * The time when the quota will be rest.
+ */
+ @JsonProperty(value = "quotaNextResetTime", access = JsonProperty.Access.WRITE_ONLY)
+ private String quotaNextResetTime;
+
+ /**
+ * The status of data ingestion for this workspace. Possible values
+ * include: 'RespectQuota', 'ForceOn', 'ForceOff', 'OverQuota',
+ * 'SubscriptionSuspended', 'ApproachingQuota'.
+ */
+ @JsonProperty(value = "dataIngestionStatus", access = JsonProperty.Access.WRITE_ONLY)
+ private DataIngestionStatus dataIngestionStatus;
+
+ /**
+ * Get the workspace daily quota for ingestion.
+ *
+ * @return the dailyQuotaGb value
+ */
+ public Double dailyQuotaGb() {
+ return this.dailyQuotaGb;
+ }
+
+ /**
+ * Set the workspace daily quota for ingestion.
+ *
+ * @param dailyQuotaGb the dailyQuotaGb value to set
+ * @return the WorkspaceCapping object itself.
+ */
+ public WorkspaceCapping withDailyQuotaGb(Double dailyQuotaGb) {
+ this.dailyQuotaGb = dailyQuotaGb;
+ return this;
+ }
+
+ /**
+ * Get the time when the quota will be rest.
+ *
+ * @return the quotaNextResetTime value
+ */
+ public String quotaNextResetTime() {
+ return this.quotaNextResetTime;
+ }
+
+ /**
+ * Get the status of data ingestion for this workspace. Possible values include: 'RespectQuota', 'ForceOn', 'ForceOff', 'OverQuota', 'SubscriptionSuspended', 'ApproachingQuota'.
+ *
+ * @return the dataIngestionStatus value
+ */
+ public DataIngestionStatus dataIngestionStatus() {
+ return this.dataIngestionStatus;
+ }
+
+}
diff --git a/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/WorkspaceEntityStatus.java b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/WorkspaceEntityStatus.java
new file mode 100644
index 000000000000..702b9701467b
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/WorkspaceEntityStatus.java
@@ -0,0 +1,56 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.loganalytics.v2020_10_01;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for WorkspaceEntityStatus.
+ */
+public final class WorkspaceEntityStatus extends ExpandableStringEnum {
+ /** Static value Creating for WorkspaceEntityStatus. */
+ public static final WorkspaceEntityStatus CREATING = fromString("Creating");
+
+ /** Static value Succeeded for WorkspaceEntityStatus. */
+ public static final WorkspaceEntityStatus SUCCEEDED = fromString("Succeeded");
+
+ /** Static value Failed for WorkspaceEntityStatus. */
+ public static final WorkspaceEntityStatus FAILED = fromString("Failed");
+
+ /** Static value Canceled for WorkspaceEntityStatus. */
+ public static final WorkspaceEntityStatus CANCELED = fromString("Canceled");
+
+ /** Static value Deleting for WorkspaceEntityStatus. */
+ public static final WorkspaceEntityStatus DELETING = fromString("Deleting");
+
+ /** Static value ProvisioningAccount for WorkspaceEntityStatus. */
+ public static final WorkspaceEntityStatus PROVISIONING_ACCOUNT = fromString("ProvisioningAccount");
+
+ /** Static value Updating for WorkspaceEntityStatus. */
+ public static final WorkspaceEntityStatus UPDATING = fromString("Updating");
+
+ /**
+ * Creates or finds a WorkspaceEntityStatus from its string representation.
+ * @param name a name to look for
+ * @return the corresponding WorkspaceEntityStatus
+ */
+ @JsonCreator
+ public static WorkspaceEntityStatus fromString(String name) {
+ return fromString(name, WorkspaceEntityStatus.class);
+ }
+
+ /**
+ * @return known WorkspaceEntityStatus values
+ */
+ public static Collection values() {
+ return values(WorkspaceEntityStatus.class);
+ }
+}
diff --git a/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/WorkspaceModel.java b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/WorkspaceModel.java
new file mode 100644
index 000000000000..05da2aceaa7d
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/WorkspaceModel.java
@@ -0,0 +1,74 @@
+/**
+ * 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.v2020_10_01;
+
+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.resources.models.HasManager;
+import com.microsoft.azure.management.loganalytics.v2020_10_01.implementation.LogAnalyticsManager;
+import java.util.List;
+import com.microsoft.azure.management.loganalytics.v2020_10_01.implementation.WorkspaceInner;
+
+/**
+ * Type representing WorkspaceModel.
+ */
+public interface WorkspaceModel extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, HasManager {
+ /**
+ * @return the customerId value.
+ */
+ String customerId();
+
+ /**
+ * @return the eTag value.
+ */
+ String eTag();
+
+ /**
+ * @return the forceCmkForQuery value.
+ */
+ Boolean forceCmkForQuery();
+
+ /**
+ * @return the privateLinkScopedResources value.
+ */
+ List privateLinkScopedResources();
+
+ /**
+ * @return the provisioningState value.
+ */
+ WorkspaceEntityStatus provisioningState();
+
+ /**
+ * @return the publicNetworkAccessForIngestion value.
+ */
+ PublicNetworkAccessType publicNetworkAccessForIngestion();
+
+ /**
+ * @return the publicNetworkAccessForQuery value.
+ */
+ PublicNetworkAccessType publicNetworkAccessForQuery();
+
+ /**
+ * @return the retentionInDays value.
+ */
+ Integer retentionInDays();
+
+ /**
+ * @return the sku value.
+ */
+ WorkspaceSku sku();
+
+ /**
+ * @return the workspaceCapping value.
+ */
+ WorkspaceCapping workspaceCapping();
+
+}
diff --git a/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/WorkspacePatch.java b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/WorkspacePatch.java
new file mode 100644
index 000000000000..6669155b7d93
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/WorkspacePatch.java
@@ -0,0 +1,265 @@
+/**
+ * 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.v2020_10_01;
+
+import java.util.List;
+import java.util.Map;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.rest.serializer.JsonFlatten;
+
+/**
+ * The top level Workspace resource container.
+ */
+@JsonFlatten
+public class WorkspacePatch extends AzureEntityResource {
+ /**
+ * The provisioning state of the workspace. Possible values include:
+ * 'Creating', 'Succeeded', 'Failed', 'Canceled', 'Deleting',
+ * 'ProvisioningAccount', 'Updating'.
+ */
+ @JsonProperty(value = "properties.provisioningState")
+ private WorkspaceEntityStatus provisioningState;
+
+ /**
+ * This is a read-only property. Represents the ID associated with the
+ * workspace.
+ */
+ @JsonProperty(value = "properties.customerId", access = JsonProperty.Access.WRITE_ONLY)
+ private String customerId;
+
+ /**
+ * The SKU of the workspace.
+ */
+ @JsonProperty(value = "properties.sku")
+ private WorkspaceSku sku;
+
+ /**
+ * The workspace data retention in days, between 30 and 730.
+ */
+ @JsonProperty(value = "properties.retentionInDays")
+ private Integer retentionInDays;
+
+ /**
+ * The daily volume cap for ingestion.
+ */
+ @JsonProperty(value = "properties.workspaceCapping")
+ private WorkspaceCapping workspaceCapping;
+
+ /**
+ * The network access type for accessing Log Analytics ingestion. Possible
+ * values include: 'Enabled', 'Disabled'.
+ */
+ @JsonProperty(value = "properties.publicNetworkAccessForIngestion")
+ private PublicNetworkAccessType publicNetworkAccessForIngestion;
+
+ /**
+ * The network access type for accessing Log Analytics query. Possible
+ * values include: 'Enabled', 'Disabled'.
+ */
+ @JsonProperty(value = "properties.publicNetworkAccessForQuery")
+ private PublicNetworkAccessType publicNetworkAccessForQuery;
+
+ /**
+ * Indicates whether customer managed storage is mandatory for query
+ * management.
+ */
+ @JsonProperty(value = "properties.forceCmkForQuery")
+ private Boolean forceCmkForQuery;
+
+ /**
+ * List of linked private link scope resources.
+ */
+ @JsonProperty(value = "properties.privateLinkScopedResources", access = JsonProperty.Access.WRITE_ONLY)
+ private List privateLinkScopedResources;
+
+ /**
+ * Resource tags. Optional.
+ */
+ @JsonProperty(value = "tags")
+ private Map tags;
+
+ /**
+ * Get the provisioning state of the workspace. Possible values include: 'Creating', 'Succeeded', 'Failed', 'Canceled', 'Deleting', 'ProvisioningAccount', 'Updating'.
+ *
+ * @return the provisioningState value
+ */
+ public WorkspaceEntityStatus provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Set the provisioning state of the workspace. Possible values include: 'Creating', 'Succeeded', 'Failed', 'Canceled', 'Deleting', 'ProvisioningAccount', 'Updating'.
+ *
+ * @param provisioningState the provisioningState value to set
+ * @return the WorkspacePatch object itself.
+ */
+ public WorkspacePatch withProvisioningState(WorkspaceEntityStatus provisioningState) {
+ this.provisioningState = provisioningState;
+ return this;
+ }
+
+ /**
+ * Get this is a read-only property. Represents the ID associated with the workspace.
+ *
+ * @return the customerId value
+ */
+ public String customerId() {
+ return this.customerId;
+ }
+
+ /**
+ * Get the SKU of the workspace.
+ *
+ * @return the sku value
+ */
+ public WorkspaceSku sku() {
+ return this.sku;
+ }
+
+ /**
+ * Set the SKU of the workspace.
+ *
+ * @param sku the sku value to set
+ * @return the WorkspacePatch object itself.
+ */
+ public WorkspacePatch withSku(WorkspaceSku sku) {
+ this.sku = sku;
+ return this;
+ }
+
+ /**
+ * Get the workspace data retention in days, between 30 and 730.
+ *
+ * @return the retentionInDays value
+ */
+ public Integer retentionInDays() {
+ return this.retentionInDays;
+ }
+
+ /**
+ * Set the workspace data retention in days, between 30 and 730.
+ *
+ * @param retentionInDays the retentionInDays value to set
+ * @return the WorkspacePatch object itself.
+ */
+ public WorkspacePatch withRetentionInDays(Integer retentionInDays) {
+ this.retentionInDays = retentionInDays;
+ return this;
+ }
+
+ /**
+ * Get the daily volume cap for ingestion.
+ *
+ * @return the workspaceCapping value
+ */
+ public WorkspaceCapping workspaceCapping() {
+ return this.workspaceCapping;
+ }
+
+ /**
+ * Set the daily volume cap for ingestion.
+ *
+ * @param workspaceCapping the workspaceCapping value to set
+ * @return the WorkspacePatch object itself.
+ */
+ public WorkspacePatch withWorkspaceCapping(WorkspaceCapping workspaceCapping) {
+ this.workspaceCapping = workspaceCapping;
+ return this;
+ }
+
+ /**
+ * Get the network access type for accessing Log Analytics ingestion. Possible values include: 'Enabled', 'Disabled'.
+ *
+ * @return the publicNetworkAccessForIngestion value
+ */
+ public PublicNetworkAccessType publicNetworkAccessForIngestion() {
+ return this.publicNetworkAccessForIngestion;
+ }
+
+ /**
+ * Set the network access type for accessing Log Analytics ingestion. Possible values include: 'Enabled', 'Disabled'.
+ *
+ * @param publicNetworkAccessForIngestion the publicNetworkAccessForIngestion value to set
+ * @return the WorkspacePatch object itself.
+ */
+ public WorkspacePatch withPublicNetworkAccessForIngestion(PublicNetworkAccessType publicNetworkAccessForIngestion) {
+ this.publicNetworkAccessForIngestion = publicNetworkAccessForIngestion;
+ return this;
+ }
+
+ /**
+ * Get the network access type for accessing Log Analytics query. Possible values include: 'Enabled', 'Disabled'.
+ *
+ * @return the publicNetworkAccessForQuery value
+ */
+ public PublicNetworkAccessType publicNetworkAccessForQuery() {
+ return this.publicNetworkAccessForQuery;
+ }
+
+ /**
+ * Set the network access type for accessing Log Analytics query. Possible values include: 'Enabled', 'Disabled'.
+ *
+ * @param publicNetworkAccessForQuery the publicNetworkAccessForQuery value to set
+ * @return the WorkspacePatch object itself.
+ */
+ public WorkspacePatch withPublicNetworkAccessForQuery(PublicNetworkAccessType publicNetworkAccessForQuery) {
+ this.publicNetworkAccessForQuery = publicNetworkAccessForQuery;
+ return this;
+ }
+
+ /**
+ * Get indicates whether customer managed storage is mandatory for query management.
+ *
+ * @return the forceCmkForQuery value
+ */
+ public Boolean forceCmkForQuery() {
+ return this.forceCmkForQuery;
+ }
+
+ /**
+ * Set indicates whether customer managed storage is mandatory for query management.
+ *
+ * @param forceCmkForQuery the forceCmkForQuery value to set
+ * @return the WorkspacePatch object itself.
+ */
+ public WorkspacePatch withForceCmkForQuery(Boolean forceCmkForQuery) {
+ this.forceCmkForQuery = forceCmkForQuery;
+ return this;
+ }
+
+ /**
+ * Get list of linked private link scope resources.
+ *
+ * @return the privateLinkScopedResources value
+ */
+ public List privateLinkScopedResources() {
+ return this.privateLinkScopedResources;
+ }
+
+ /**
+ * Get resource tags. Optional.
+ *
+ * @return the tags value
+ */
+ public Map tags() {
+ return this.tags;
+ }
+
+ /**
+ * Set resource tags. Optional.
+ *
+ * @param tags the tags value to set
+ * @return the WorkspacePatch object itself.
+ */
+ public WorkspacePatch withTags(Map tags) {
+ this.tags = tags;
+ return this;
+ }
+
+}
diff --git a/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/WorkspaceSku.java b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/WorkspaceSku.java
new file mode 100644
index 000000000000..3315600ce780
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/WorkspaceSku.java
@@ -0,0 +1,103 @@
+/**
+ * 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.v2020_10_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The SKU (tier) of a workspace.
+ */
+public class WorkspaceSku {
+ /**
+ * The name of the SKU. Possible values include: 'Free', 'Standard',
+ * 'Premium', 'PerNode', 'PerGB2018', 'Standalone', 'CapacityReservation',
+ * 'LACluster'.
+ */
+ @JsonProperty(value = "name", required = true)
+ private WorkspaceSkuNameEnum name;
+
+ /**
+ * The capacity reservation level for this workspace, when
+ * CapacityReservation sku is selected.
+ */
+ @JsonProperty(value = "capacityReservationLevel")
+ private Integer capacityReservationLevel;
+
+ /**
+ * The maximum capacity reservation level available for this workspace,
+ * when CapacityReservation sku is selected.
+ */
+ @JsonProperty(value = "maxCapacityReservationLevel", access = JsonProperty.Access.WRITE_ONLY)
+ private Integer maxCapacityReservationLevel;
+
+ /**
+ * The last time when the sku was updated.
+ */
+ @JsonProperty(value = "lastSkuUpdate", access = JsonProperty.Access.WRITE_ONLY)
+ private String lastSkuUpdate;
+
+ /**
+ * Get the name of the SKU. Possible values include: 'Free', 'Standard', 'Premium', 'PerNode', 'PerGB2018', 'Standalone', 'CapacityReservation', 'LACluster'.
+ *
+ * @return the name value
+ */
+ public WorkspaceSkuNameEnum name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name of the SKU. Possible values include: 'Free', 'Standard', 'Premium', 'PerNode', 'PerGB2018', 'Standalone', 'CapacityReservation', 'LACluster'.
+ *
+ * @param name the name value to set
+ * @return the WorkspaceSku object itself.
+ */
+ public WorkspaceSku withName(WorkspaceSkuNameEnum name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the capacity reservation level for this workspace, when CapacityReservation sku is selected.
+ *
+ * @return the capacityReservationLevel value
+ */
+ public Integer capacityReservationLevel() {
+ return this.capacityReservationLevel;
+ }
+
+ /**
+ * Set the capacity reservation level for this workspace, when CapacityReservation sku is selected.
+ *
+ * @param capacityReservationLevel the capacityReservationLevel value to set
+ * @return the WorkspaceSku object itself.
+ */
+ public WorkspaceSku withCapacityReservationLevel(Integer capacityReservationLevel) {
+ this.capacityReservationLevel = capacityReservationLevel;
+ return this;
+ }
+
+ /**
+ * Get the maximum capacity reservation level available for this workspace, when CapacityReservation sku is selected.
+ *
+ * @return the maxCapacityReservationLevel value
+ */
+ public Integer maxCapacityReservationLevel() {
+ return this.maxCapacityReservationLevel;
+ }
+
+ /**
+ * Get the last time when the sku was updated.
+ *
+ * @return the lastSkuUpdate value
+ */
+ public String lastSkuUpdate() {
+ return this.lastSkuUpdate;
+ }
+
+}
diff --git a/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/WorkspaceSkuNameEnum.java b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/WorkspaceSkuNameEnum.java
new file mode 100644
index 000000000000..c699f9f27ae9
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/WorkspaceSkuNameEnum.java
@@ -0,0 +1,59 @@
+/**
+ * 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.v2020_10_01;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for WorkspaceSkuNameEnum.
+ */
+public final class WorkspaceSkuNameEnum extends ExpandableStringEnum {
+ /** Static value Free for WorkspaceSkuNameEnum. */
+ public static final WorkspaceSkuNameEnum FREE = fromString("Free");
+
+ /** Static value Standard for WorkspaceSkuNameEnum. */
+ public static final WorkspaceSkuNameEnum STANDARD = fromString("Standard");
+
+ /** Static value Premium for WorkspaceSkuNameEnum. */
+ public static final WorkspaceSkuNameEnum PREMIUM = fromString("Premium");
+
+ /** Static value PerNode for WorkspaceSkuNameEnum. */
+ public static final WorkspaceSkuNameEnum PER_NODE = fromString("PerNode");
+
+ /** Static value PerGB2018 for WorkspaceSkuNameEnum. */
+ public static final WorkspaceSkuNameEnum PER_GB2018 = fromString("PerGB2018");
+
+ /** Static value Standalone for WorkspaceSkuNameEnum. */
+ public static final WorkspaceSkuNameEnum STANDALONE = fromString("Standalone");
+
+ /** Static value CapacityReservation for WorkspaceSkuNameEnum. */
+ public static final WorkspaceSkuNameEnum CAPACITY_RESERVATION = fromString("CapacityReservation");
+
+ /** Static value LACluster for WorkspaceSkuNameEnum. */
+ public static final WorkspaceSkuNameEnum LACLUSTER = fromString("LACluster");
+
+ /**
+ * Creates or finds a WorkspaceSkuNameEnum from its string representation.
+ * @param name a name to look for
+ * @return the corresponding WorkspaceSkuNameEnum
+ */
+ @JsonCreator
+ public static WorkspaceSkuNameEnum fromString(String name) {
+ return fromString(name, WorkspaceSkuNameEnum.class);
+ }
+
+ /**
+ * @return known WorkspaceSkuNameEnum values
+ */
+ public static Collection values() {
+ return values(WorkspaceSkuNameEnum.class);
+ }
+}
diff --git a/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/Workspaces.java b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/Workspaces.java
new file mode 100644
index 000000000000..7bd26c87008a
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/Workspaces.java
@@ -0,0 +1,25 @@
+/**
+ * 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.v2020_10_01;
+
+import com.microsoft.azure.arm.collection.SupportsCreating;
+import com.microsoft.azure.arm.resources.collection.SupportsDeletingByResourceGroup;
+import com.microsoft.azure.arm.resources.collection.SupportsBatchDeletion;
+import com.microsoft.azure.arm.resources.collection.SupportsGettingByResourceGroup;
+import rx.Observable;
+import com.microsoft.azure.arm.resources.collection.SupportsListingByResourceGroup;
+import com.microsoft.azure.arm.collection.SupportsListing;
+import com.microsoft.azure.management.loganalytics.v2020_10_01.implementation.WorkspacesInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing Workspaces.
+ */
+public interface Workspaces extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner {
+}
diff --git a/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/implementation/ClusterImpl.java b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/implementation/ClusterImpl.java
new file mode 100644
index 000000000000..d8d5bafadd06
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/implementation/ClusterImpl.java
@@ -0,0 +1,195 @@
+/**
+ * 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.v2020_10_01.implementation;
+
+import com.microsoft.azure.arm.resources.models.implementation.GroupableResourceCoreImpl;
+import com.microsoft.azure.management.loganalytics.v2020_10_01.Cluster;
+import rx.Observable;
+import com.microsoft.azure.management.loganalytics.v2020_10_01.ClusterPatch;
+import com.microsoft.azure.management.loganalytics.v2020_10_01.Identity;
+import com.microsoft.azure.management.loganalytics.v2020_10_01.ClusterSku;
+import com.microsoft.azure.management.loganalytics.v2020_10_01.ClusterEntityStatus;
+import com.microsoft.azure.management.loganalytics.v2020_10_01.BillingType;
+import com.microsoft.azure.management.loganalytics.v2020_10_01.KeyVaultProperties;
+import java.util.List;
+import com.microsoft.azure.management.loganalytics.v2020_10_01.AssociatedWorkspace;
+import com.microsoft.azure.management.loganalytics.v2020_10_01.CapacityReservationProperties;
+import rx.functions.Func1;
+
+class ClusterImpl extends GroupableResourceCoreImpl implements Cluster, Cluster.Definition, 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 client.createOrUpdateAsync(this.resourceGroupName(), this.name(), this.inner())
+ .map(new Func1() {
+ @Override
+ public ClusterInner call(ClusterInner resource) {
+ resetCreateUpdateParameters();
+ return resource;
+ }
+ })
+ .map(innerToFluentMap(this));
+ }
+
+ @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 List associatedWorkspaces() {
+ return this.inner().associatedWorkspaces();
+ }
+
+ @Override
+ public BillingType billingType() {
+ return this.inner().billingType();
+ }
+
+ @Override
+ public CapacityReservationProperties capacityReservationProperties() {
+ return this.inner().capacityReservationProperties();
+ }
+
+ @Override
+ public String clusterId() {
+ return this.inner().clusterId();
+ }
+
+ @Override
+ public String createdDate() {
+ return this.inner().createdDate();
+ }
+
+ @Override
+ public Identity identity() {
+ return this.inner().identity();
+ }
+
+ @Override
+ public Boolean isAvailabilityZonesEnabled() {
+ return this.inner().isAvailabilityZonesEnabled();
+ }
+
+ @Override
+ public Boolean isDoubleEncryptionEnabled() {
+ return this.inner().isDoubleEncryptionEnabled();
+ }
+
+ @Override
+ public KeyVaultProperties keyVaultProperties() {
+ return this.inner().keyVaultProperties();
+ }
+
+ @Override
+ public String lastModifiedDate() {
+ return this.inner().lastModifiedDate();
+ }
+
+ @Override
+ public ClusterEntityStatus provisioningState() {
+ return this.inner().provisioningState();
+ }
+
+ @Override
+ public ClusterSku sku() {
+ return this.inner().sku();
+ }
+
+ @Override
+ public ClusterImpl withAssociatedWorkspaces(List associatedWorkspaces) {
+ this.inner().withAssociatedWorkspaces(associatedWorkspaces);
+ return this;
+ }
+
+ @Override
+ public ClusterImpl withBillingType(BillingType billingType) {
+ this.inner().withBillingType(billingType);
+ return this;
+ }
+
+ @Override
+ public ClusterImpl withCapacityReservationProperties(CapacityReservationProperties capacityReservationProperties) {
+ this.inner().withCapacityReservationProperties(capacityReservationProperties);
+ return this;
+ }
+
+ @Override
+ public ClusterImpl withIsAvailabilityZonesEnabled(Boolean isAvailabilityZonesEnabled) {
+ this.inner().withIsAvailabilityZonesEnabled(isAvailabilityZonesEnabled);
+ return this;
+ }
+
+ @Override
+ public ClusterImpl withIsDoubleEncryptionEnabled(Boolean isDoubleEncryptionEnabled) {
+ this.inner().withIsDoubleEncryptionEnabled(isDoubleEncryptionEnabled);
+ return this;
+ }
+
+ @Override
+ public ClusterImpl withIdentity(Identity identity) {
+ if (isInCreateMode()) {
+ this.inner().withIdentity(identity);
+ } else {
+ this.updateParameter.withIdentity(identity);
+ }
+ return this;
+ }
+
+ @Override
+ public ClusterImpl withKeyVaultProperties(KeyVaultProperties keyVaultProperties) {
+ if (isInCreateMode()) {
+ this.inner().withKeyVaultProperties(keyVaultProperties);
+ } else {
+ this.updateParameter.withKeyVaultProperties(keyVaultProperties);
+ }
+ return this;
+ }
+
+ @Override
+ public ClusterImpl withSku(ClusterSku sku) {
+ if (isInCreateMode()) {
+ this.inner().withSku(sku);
+ } else {
+ this.updateParameter.withSku(sku);
+ }
+ return this;
+ }
+
+}
diff --git a/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/implementation/ClusterInner.java b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/implementation/ClusterInner.java
new file mode 100644
index 000000000000..5fc6c2566145
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/implementation/ClusterInner.java
@@ -0,0 +1,305 @@
+/**
+ * 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.v2020_10_01.implementation;
+
+import com.microsoft.azure.management.loganalytics.v2020_10_01.Identity;
+import com.microsoft.azure.management.loganalytics.v2020_10_01.ClusterSku;
+import com.microsoft.azure.management.loganalytics.v2020_10_01.ClusterEntityStatus;
+import com.microsoft.azure.management.loganalytics.v2020_10_01.BillingType;
+import com.microsoft.azure.management.loganalytics.v2020_10_01.KeyVaultProperties;
+import java.util.List;
+import com.microsoft.azure.management.loganalytics.v2020_10_01.AssociatedWorkspace;
+import com.microsoft.azure.management.loganalytics.v2020_10_01.CapacityReservationProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.rest.serializer.JsonFlatten;
+import com.microsoft.azure.Resource;
+
+/**
+ * The top level Log Analytics cluster resource container.
+ */
+@JsonFlatten
+public class ClusterInner extends Resource {
+ /**
+ * The identity of the resource.
+ */
+ @JsonProperty(value = "identity")
+ private Identity identity;
+
+ /**
+ * The sku properties.
+ */
+ @JsonProperty(value = "sku")
+ private ClusterSku sku;
+
+ /**
+ * 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', 'Updating'.
+ */
+ @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ClusterEntityStatus provisioningState;
+
+ /**
+ * Configures whether cluster will use double encryption. This Property can
+ * not be modified after cluster creation. Default value is 'true'.
+ */
+ @JsonProperty(value = "properties.isDoubleEncryptionEnabled")
+ private Boolean isDoubleEncryptionEnabled;
+
+ /**
+ * Sets whether the cluster will support availability zones. This can be
+ * set as true only in regions where Azure Data Explorer support
+ * Availability Zones. This Property can not be modified after cluster
+ * creation. Default value is 'true' if region supports Availability Zones.
+ */
+ @JsonProperty(value = "properties.isAvailabilityZonesEnabled")
+ private Boolean isAvailabilityZonesEnabled;
+
+ /**
+ * Configures whether billing will be only on the cluster or each workspace
+ * will be billed by its proportional use. This does not change the overall
+ * billing, only how it will be distributed. Default value is 'Cluster'.
+ * Possible values include: 'Cluster', 'Workspaces'.
+ */
+ @JsonProperty(value = "properties.billingType")
+ private BillingType billingType;
+
+ /**
+ * The associated key properties.
+ */
+ @JsonProperty(value = "properties.keyVaultProperties")
+ private KeyVaultProperties keyVaultProperties;
+
+ /**
+ * The last time the cluster was updated.
+ */
+ @JsonProperty(value = "properties.lastModifiedDate", access = JsonProperty.Access.WRITE_ONLY)
+ private String lastModifiedDate;
+
+ /**
+ * The cluster creation time.
+ */
+ @JsonProperty(value = "properties.createdDate", access = JsonProperty.Access.WRITE_ONLY)
+ private String createdDate;
+
+ /**
+ * The list of Log Analytics workspaces associated with the cluster.
+ */
+ @JsonProperty(value = "properties.associatedWorkspaces")
+ private List associatedWorkspaces;
+
+ /**
+ * Additional properties for capacity reservation.
+ */
+ @JsonProperty(value = "properties.capacityReservationProperties")
+ private CapacityReservationProperties capacityReservationProperties;
+
+ /**
+ * 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 ClusterSku sku() {
+ return this.sku;
+ }
+
+ /**
+ * Set the sku properties.
+ *
+ * @param sku the sku value to set
+ * @return the ClusterInner object itself.
+ */
+ public ClusterInner withSku(ClusterSku sku) {
+ this.sku = sku;
+ 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', 'Updating'.
+ *
+ * @return the provisioningState value
+ */
+ public ClusterEntityStatus provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Get configures whether cluster will use double encryption. This Property can not be modified after cluster creation. Default value is 'true'.
+ *
+ * @return the isDoubleEncryptionEnabled value
+ */
+ public Boolean isDoubleEncryptionEnabled() {
+ return this.isDoubleEncryptionEnabled;
+ }
+
+ /**
+ * Set configures whether cluster will use double encryption. This Property can not be modified after cluster creation. Default value is 'true'.
+ *
+ * @param isDoubleEncryptionEnabled the isDoubleEncryptionEnabled value to set
+ * @return the ClusterInner object itself.
+ */
+ public ClusterInner withIsDoubleEncryptionEnabled(Boolean isDoubleEncryptionEnabled) {
+ this.isDoubleEncryptionEnabled = isDoubleEncryptionEnabled;
+ return this;
+ }
+
+ /**
+ * Get sets whether the cluster will support availability zones. This can be set as true only in regions where Azure Data Explorer support Availability Zones. This Property can not be modified after cluster creation. Default value is 'true' if region supports Availability Zones.
+ *
+ * @return the isAvailabilityZonesEnabled value
+ */
+ public Boolean isAvailabilityZonesEnabled() {
+ return this.isAvailabilityZonesEnabled;
+ }
+
+ /**
+ * Set sets whether the cluster will support availability zones. This can be set as true only in regions where Azure Data Explorer support Availability Zones. This Property can not be modified after cluster creation. Default value is 'true' if region supports Availability Zones.
+ *
+ * @param isAvailabilityZonesEnabled the isAvailabilityZonesEnabled value to set
+ * @return the ClusterInner object itself.
+ */
+ public ClusterInner withIsAvailabilityZonesEnabled(Boolean isAvailabilityZonesEnabled) {
+ this.isAvailabilityZonesEnabled = isAvailabilityZonesEnabled;
+ return this;
+ }
+
+ /**
+ * Get configures whether billing will be only on the cluster or each workspace will be billed by its proportional use. This does not change the overall billing, only how it will be distributed. Default value is 'Cluster'. Possible values include: 'Cluster', 'Workspaces'.
+ *
+ * @return the billingType value
+ */
+ public BillingType billingType() {
+ return this.billingType;
+ }
+
+ /**
+ * Set configures whether billing will be only on the cluster or each workspace will be billed by its proportional use. This does not change the overall billing, only how it will be distributed. Default value is 'Cluster'. Possible values include: 'Cluster', 'Workspaces'.
+ *
+ * @param billingType the billingType value to set
+ * @return the ClusterInner object itself.
+ */
+ public ClusterInner withBillingType(BillingType billingType) {
+ this.billingType = billingType;
+ return this;
+ }
+
+ /**
+ * 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;
+ }
+
+ /**
+ * Get the last time the cluster was updated.
+ *
+ * @return the lastModifiedDate value
+ */
+ public String lastModifiedDate() {
+ return this.lastModifiedDate;
+ }
+
+ /**
+ * Get the cluster creation time.
+ *
+ * @return the createdDate value
+ */
+ public String createdDate() {
+ return this.createdDate;
+ }
+
+ /**
+ * Get the list of Log Analytics workspaces associated with the cluster.
+ *
+ * @return the associatedWorkspaces value
+ */
+ public List associatedWorkspaces() {
+ return this.associatedWorkspaces;
+ }
+
+ /**
+ * Set the list of Log Analytics workspaces associated with the cluster.
+ *
+ * @param associatedWorkspaces the associatedWorkspaces value to set
+ * @return the ClusterInner object itself.
+ */
+ public ClusterInner withAssociatedWorkspaces(List associatedWorkspaces) {
+ this.associatedWorkspaces = associatedWorkspaces;
+ return this;
+ }
+
+ /**
+ * Get additional properties for capacity reservation.
+ *
+ * @return the capacityReservationProperties value
+ */
+ public CapacityReservationProperties capacityReservationProperties() {
+ return this.capacityReservationProperties;
+ }
+
+ /**
+ * Set additional properties for capacity reservation.
+ *
+ * @param capacityReservationProperties the capacityReservationProperties value to set
+ * @return the ClusterInner object itself.
+ */
+ public ClusterInner withCapacityReservationProperties(CapacityReservationProperties capacityReservationProperties) {
+ this.capacityReservationProperties = capacityReservationProperties;
+ return this;
+ }
+
+}
diff --git a/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/implementation/ClustersImpl.java b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/implementation/ClustersImpl.java
new file mode 100644
index 000000000000..a0b7aa26331f
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/implementation/ClustersImpl.java
@@ -0,0 +1,138 @@
+/**
+ * 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.v2020_10_01.implementation;
+
+import com.microsoft.azure.arm.resources.collection.implementation.GroupableResourcesCoreImpl;
+import com.microsoft.azure.management.loganalytics.v2020_10_01.Clusters;
+import com.microsoft.azure.management.loganalytics.v2020_10_01.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 ClusterImpl define(String name) {
+ return wrapModel(name);
+ }
+
+ @Override
+ protected ClusterImpl wrapModel(ClusterInner inner) {
+ return new ClusterImpl(inner.name(), inner, manager());
+ }
+
+ @Override
+ protected ClusterImpl wrapModel(String name) {
+ return new ClusterImpl(name, new ClusterInner(), this.manager());
+ }
+
+}
diff --git a/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/implementation/ClustersInner.java b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/implementation/ClustersInner.java
new file mode 100644
index 000000000000..c731e8f7438c
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2020_10_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_10_01/implementation/ClustersInner.java
@@ -0,0 +1,1062 @@
+/**
+ * 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.v2020_10_01.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.v2020_10_01.ClusterPatch;
+import com.microsoft.azure.management.loganalytics.v2020_10_01.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.v2020_10_01.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.v2020_10_01.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.v2020_10_01.Clusters createOrUpdate" })
+ @PUT("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters/{clusterName}")
+ Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("clusterName") String clusterName, @Query("api-version") String apiVersion, @Body ClusterInner parameters, @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.v2020_10_01.Clusters beginCreateOrUpdate" })
+ @PUT("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters/{clusterName}")
+ Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Path("clusterName") String clusterName, @Query("api-version") String apiVersion, @Body ClusterInner parameters, @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.v2020_10_01.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.v2020_10_01.Clusters beginDelete" })
+ @HTTP(path = "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters/{clusterName}", method = "DELETE", hasBody = true)
+ Observable> beginDelete(@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.v2020_10_01.Clusters getByResourceGroup" })
+ @GET("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters/{clusterName}")
+ Observable> getByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("clusterName") String clusterName, @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.v2020_10_01.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.v2020_10_01.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.v2020_10_01.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 name of the resource group. The name is case insensitive.
+ * @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 name of the resource group. The name is case insensitive.
+ * @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 name of the resource group. The name is case insensitive.
+ * @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 name of the resource group. The name is case insensitive.
+ * @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 name of the resource group. The name is case insensitive.
+ * @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 name of the resource group. The name is case insensitive.
+ * @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
+ * @return the ClusterInner object if successful.
+ */
+ public ClusterInner createOrUpdate(String resourceGroupName, String clusterName, ClusterInner parameters) {
+ return createOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, parameters).toBlocking().last().body();
+ }
+
+ /**
+ * Create or update a Log Analytics cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 name of the resource group. The name is case insensitive.
+ * @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, ClusterInner>() {
+ @Override
+ public ClusterInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Create or update a Log Analytics cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (clusterName == null) {
+ throw new IllegalArgumentException("Parameter clusterName is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ if (parameters == null) {
+ throw new IllegalArgumentException("Parameter parameters is required and cannot be null.");
+ }
+ Validator.validate(parameters);
+ Observable> observable = service.createOrUpdate(resourceGroupName, this.client.subscriptionId(), clusterName, this.client.apiVersion(), parameters, this.client.acceptLanguage(), this.client.userAgent());
+ return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType());
+ }
+
+ /**
+ * Create or update a Log Analytics cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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
+ * @return the ClusterInner object if successful.
+ */
+ public ClusterInner beginCreateOrUpdate(String resourceGroupName, String clusterName, ClusterInner parameters) {
+ return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, parameters).toBlocking().single().body();
+ }
+
+ /**
+ * Create or update a Log Analytics cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 name of the resource group. The name is case insensitive.
+ * @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 to the ClusterInner object
+ */
+ public Observable beginCreateOrUpdateAsync(String resourceGroupName, String clusterName, ClusterInner parameters) {
+ return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, clusterName, parameters).map(new Func1, ClusterInner>() {
+ @Override
+ public ClusterInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Create or update a Log Analytics cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 to the ClusterInner object
+ */
+ public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String clusterName, ClusterInner parameters) {
+ 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 (clusterName == null) {
+ throw new IllegalArgumentException("Parameter clusterName is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ if (parameters == null) {
+ throw new IllegalArgumentException("Parameter parameters is required and cannot be null.");
+ }
+ Validator.validate(parameters);
+ return service.beginCreateOrUpdate(resourceGroupName, this.client.subscriptionId(), clusterName, this.client.apiVersion(), parameters, 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(200, new TypeToken() { }.getType())
+ .register(201, new TypeToken() { }.getType())
+ .register(202, new TypeToken() { }.getType())
+ .registerError(ErrorResponseException.class)
+ .build(response);
+ }
+
+ /**
+ * Deletes a cluster instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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().last().body();
+ }
+
+ /**
+ * Deletes a cluster instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 name of the resource group. The name is case insensitive.
+ * @param clusterName Name of the Log Analytics Cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ 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 name of the resource group. The name is case insensitive.
+ * @param clusterName Name of the Log Analytics Cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ 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.");
+ }
+ Observable> observable = service.delete(resourceGroupName, clusterName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent());
+ return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType());
+ }
+
+ /**
+ * Deletes a cluster instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 beginDelete(String resourceGroupName, String clusterName) {
+ beginDeleteWithServiceResponseAsync(resourceGroupName, clusterName).toBlocking().single().body();
+ }
+
+ /**
+ * Deletes a cluster instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 beginDeleteAsync(String resourceGroupName, String clusterName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, clusterName), serviceCallback);
+ }
+
+ /**
+ * Deletes a cluster instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 beginDeleteAsync(String resourceGroupName, String clusterName) {
+ return beginDeleteWithServiceResponseAsync(resourceGroupName, clusterName).map(new Func1, Void>() {
+ @Override
+ public Void call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Deletes a cluster instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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> beginDeleteWithServiceResponseAsync(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.beginDelete(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 = beginDeleteDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse beginDeleteDelegate(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 name of the resource group. The name is case insensitive.
+ * @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 name of the resource group. The name is case insensitive.
+ * @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 name of the resource group. The name is case insensitive.
+ * @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 name of the resource group. The name is case insensitive.
+ * @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 (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ 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.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ return service.getByResourceGroup(this.client.subscriptionId(), resourceGroupName, clusterName, 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 name of the resource group. The name is case insensitive.
+ * @param clusterName Name of the Log Analytics 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 name of the resource group. The name is case insensitive.
+ * @param clusterName Name of the Log Analytics 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 name of the resource group. The name is case insensitive.
+ * @param clusterName Name of the Log Analytics 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 name of the resource group. The name is case insensitive.
+ * @param clusterName Name of the Log Analytics 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