diff --git a/sdk/loganalytics/mgmt-v2015_11_01_preview/pom.xml b/sdk/loganalytics/mgmt-v2015_11_01_preview/pom.xml
new file mode 100644
index 000000000000..ab9d4eb61203
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2015_11_01_preview/pom.xml
@@ -0,0 +1,135 @@
+
+
+ 4.0.0
+ com.microsoft.azure.loganalytics.v2015_11_01_preview
+
+ com.microsoft.azure
+ azure-arm-parent
+ 1.1.0
+ ../../../pom.management.xml
+
+ azure-mgmt-loganalytics
+ 1.0.0-beta
+ jar
+ Microsoft Azure SDK for LogAnalytics Management
+ This package contains Microsoft LogAnalytics Management SDK.
+ https://github.com/Azure/azure-sdk-for-java
+
+
+ The MIT License (MIT)
+ http://opensource.org/licenses/MIT
+ repo
+
+
+
+ scm:git:https://github.com/Azure/azure-sdk-for-java
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ HEAD
+
+
+ UTF-8
+
+
+
+
+ microsoft
+ Microsoft
+
+
+
+
+ com.microsoft.azure
+ azure-client-runtime
+
+
+ com.microsoft.azure
+ azure-arm-client-runtime
+
+
+ junit
+ junit
+ test
+
+
+ com.microsoft.azure
+ azure-client-authentication
+ test
+
+
+ com.microsoft.azure
+ azure-mgmt-resources
+ test
+
+
+ com.microsoft.azure
+ azure-arm-client-runtime
+ test-jar
+ test
+
+ 1.6.5
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+
+
+
+ true
+ true
+
+
+
+
+
+ org.codehaus.mojo
+ build-helper-maven-plugin
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.1
+
+ 1.7
+ 1.7
+
+
+ com.microsoft.azure.management.apigeneration.LangDefinitionProcessor
+
+
+ true
+ true
+
+ true
+ true
+
+
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ 2.8
+
+ *.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search
+
+
+ /**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ */
+ ]]>
+
+
+
+
+
+
diff --git a/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/DataSource.java b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/DataSource.java
new file mode 100644
index 000000000000..c90d14ee637b
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/DataSource.java
@@ -0,0 +1,181 @@
+/**
+ * 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.v2015_11_01_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.loganalytics.v2015_11_01_preview.implementation.DataSourceInner;
+import com.microsoft.azure.arm.model.Indexable;
+import com.microsoft.azure.arm.model.Refreshable;
+import com.microsoft.azure.arm.model.Updatable;
+import com.microsoft.azure.arm.model.Appliable;
+import com.microsoft.azure.arm.model.Creatable;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.loganalytics.v2015_11_01_preview.implementation.LogAnalyticsManager;
+import java.util.Map;
+
+/**
+ * Type representing DataSource.
+ */
+public interface DataSource extends HasInner, Indexable, Refreshable, Updatable, HasManager {
+ /**
+ * @return the eTag value.
+ */
+ String eTag();
+
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the kind value.
+ */
+ DataSourceKind kind();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the properties value.
+ */
+ Object properties();
+
+ /**
+ * @return the tags value.
+ */
+ Map tags();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * The entirety of the DataSource definition.
+ */
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithWorkspace, DefinitionStages.WithKind, DefinitionStages.WithProperties, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * Grouping of DataSource definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of a DataSource definition.
+ */
+ interface Blank extends WithWorkspace {
+ }
+
+ /**
+ * The stage of the datasource definition allowing to specify Workspace.
+ */
+ interface WithWorkspace {
+ /**
+ * Specifies resourceGroupName, workspaceName.
+ * @param resourceGroupName The name of the resource group to get. The name is case insensitive
+ * @param workspaceName Name of the Log Analytics Workspace that will contain the datasource
+ * @return the next definition stage
+ */
+ WithKind withExistingWorkspace(String resourceGroupName, String workspaceName);
+ }
+
+ /**
+ * The stage of the datasource definition allowing to specify Kind.
+ */
+ interface WithKind {
+ /**
+ * Specifies kind.
+ * @param kind Possible values include: 'AzureActivityLog', 'ChangeTrackingPath', 'ChangeTrackingDefaultPath', 'ChangeTrackingDefaultRegistry', 'ChangeTrackingCustomRegistry', 'CustomLog', 'CustomLogCollection', 'GenericDataSource', 'IISLogs', 'LinuxPerformanceObject', 'LinuxPerformanceCollection', 'LinuxSyslog', 'LinuxSyslogCollection', 'WindowsEvent', 'WindowsPerformanceCounter'
+ * @return the next definition stage
+ */
+ WithProperties withKind(DataSourceKind kind);
+ }
+
+ /**
+ * The stage of the datasource definition allowing to specify Properties.
+ */
+ interface WithProperties {
+ /**
+ * Specifies properties.
+ * @param properties The data source properties in raw json format, each kind of data source have it's own schema
+ * @return the next definition stage
+ */
+ WithCreate withProperties(Object properties);
+ }
+
+ /**
+ * The stage of the datasource definition allowing to specify ETag.
+ */
+ interface WithETag {
+ /**
+ * Specifies eTag.
+ * @param eTag The ETag of the data source
+ * @return the next definition stage
+ */
+ WithCreate withETag(String eTag);
+ }
+
+ /**
+ * The stage of the datasource definition allowing to specify Tags.
+ */
+ interface WithTags {
+ /**
+ * Specifies tags.
+ * @param tags Resource tags
+ * @return the next definition stage
+ */
+ WithCreate withTags(Map tags);
+ }
+
+ /**
+ * The stage of the definition which contains all the minimum required inputs for
+ * the resource to be created (via {@link WithCreate#create()}), but also allows
+ * for any other optional settings to be specified.
+ */
+ interface WithCreate extends Creatable, DefinitionStages.WithETag, DefinitionStages.WithTags {
+ }
+ }
+ /**
+ * The template for a DataSource update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, UpdateStages.WithETag, UpdateStages.WithTags {
+ }
+
+ /**
+ * Grouping of DataSource update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the datasource update allowing to specify ETag.
+ */
+ interface WithETag {
+ /**
+ * Specifies eTag.
+ * @param eTag The ETag of the data source
+ * @return the next update stage
+ */
+ Update withETag(String eTag);
+ }
+
+ /**
+ * The stage of the datasource update allowing to specify Tags.
+ */
+ interface WithTags {
+ /**
+ * Specifies tags.
+ * @param tags Resource tags
+ * @return the next update stage
+ */
+ Update withTags(Map tags);
+ }
+
+ }
+}
diff --git a/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/DataSourceFilter.java b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/DataSourceFilter.java
new file mode 100644
index 000000000000..1551a30f9761
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/DataSourceFilter.java
@@ -0,0 +1,48 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.loganalytics.v2015_11_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * DataSource filter. Right now, only filter by kind is supported.
+ */
+public class DataSourceFilter {
+ /**
+ * Possible values include: 'AzureActivityLog', 'ChangeTrackingPath',
+ * 'ChangeTrackingDefaultPath', 'ChangeTrackingDefaultRegistry',
+ * 'ChangeTrackingCustomRegistry', 'CustomLog', 'CustomLogCollection',
+ * 'GenericDataSource', 'IISLogs', 'LinuxPerformanceObject',
+ * 'LinuxPerformanceCollection', 'LinuxSyslog', 'LinuxSyslogCollection',
+ * 'WindowsEvent', 'WindowsPerformanceCounter'.
+ */
+ @JsonProperty(value = "kind")
+ private DataSourceKind kind;
+
+ /**
+ * Get possible values include: 'AzureActivityLog', 'ChangeTrackingPath', 'ChangeTrackingDefaultPath', 'ChangeTrackingDefaultRegistry', 'ChangeTrackingCustomRegistry', 'CustomLog', 'CustomLogCollection', 'GenericDataSource', 'IISLogs', 'LinuxPerformanceObject', 'LinuxPerformanceCollection', 'LinuxSyslog', 'LinuxSyslogCollection', 'WindowsEvent', 'WindowsPerformanceCounter'.
+ *
+ * @return the kind value
+ */
+ public DataSourceKind kind() {
+ return this.kind;
+ }
+
+ /**
+ * Set possible values include: 'AzureActivityLog', 'ChangeTrackingPath', 'ChangeTrackingDefaultPath', 'ChangeTrackingDefaultRegistry', 'ChangeTrackingCustomRegistry', 'CustomLog', 'CustomLogCollection', 'GenericDataSource', 'IISLogs', 'LinuxPerformanceObject', 'LinuxPerformanceCollection', 'LinuxSyslog', 'LinuxSyslogCollection', 'WindowsEvent', 'WindowsPerformanceCounter'.
+ *
+ * @param kind the kind value to set
+ * @return the DataSourceFilter object itself.
+ */
+ public DataSourceFilter withKind(DataSourceKind kind) {
+ this.kind = kind;
+ return this;
+ }
+
+}
diff --git a/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/DataSourceKind.java b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/DataSourceKind.java
new file mode 100644
index 000000000000..39fa9242d6d0
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/DataSourceKind.java
@@ -0,0 +1,80 @@
+/**
+ * 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.v2015_11_01_preview;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for DataSourceKind.
+ */
+public final class DataSourceKind extends ExpandableStringEnum {
+ /** Static value AzureActivityLog for DataSourceKind. */
+ public static final DataSourceKind AZURE_ACTIVITY_LOG = fromString("AzureActivityLog");
+
+ /** Static value ChangeTrackingPath for DataSourceKind. */
+ public static final DataSourceKind CHANGE_TRACKING_PATH = fromString("ChangeTrackingPath");
+
+ /** Static value ChangeTrackingDefaultPath for DataSourceKind. */
+ public static final DataSourceKind CHANGE_TRACKING_DEFAULT_PATH = fromString("ChangeTrackingDefaultPath");
+
+ /** Static value ChangeTrackingDefaultRegistry for DataSourceKind. */
+ public static final DataSourceKind CHANGE_TRACKING_DEFAULT_REGISTRY = fromString("ChangeTrackingDefaultRegistry");
+
+ /** Static value ChangeTrackingCustomRegistry for DataSourceKind. */
+ public static final DataSourceKind CHANGE_TRACKING_CUSTOM_REGISTRY = fromString("ChangeTrackingCustomRegistry");
+
+ /** Static value CustomLog for DataSourceKind. */
+ public static final DataSourceKind CUSTOM_LOG = fromString("CustomLog");
+
+ /** Static value CustomLogCollection for DataSourceKind. */
+ public static final DataSourceKind CUSTOM_LOG_COLLECTION = fromString("CustomLogCollection");
+
+ /** Static value GenericDataSource for DataSourceKind. */
+ public static final DataSourceKind GENERIC_DATA_SOURCE = fromString("GenericDataSource");
+
+ /** Static value IISLogs for DataSourceKind. */
+ public static final DataSourceKind IISLOGS = fromString("IISLogs");
+
+ /** Static value LinuxPerformanceObject for DataSourceKind. */
+ public static final DataSourceKind LINUX_PERFORMANCE_OBJECT = fromString("LinuxPerformanceObject");
+
+ /** Static value LinuxPerformanceCollection for DataSourceKind. */
+ public static final DataSourceKind LINUX_PERFORMANCE_COLLECTION = fromString("LinuxPerformanceCollection");
+
+ /** Static value LinuxSyslog for DataSourceKind. */
+ public static final DataSourceKind LINUX_SYSLOG = fromString("LinuxSyslog");
+
+ /** Static value LinuxSyslogCollection for DataSourceKind. */
+ public static final DataSourceKind LINUX_SYSLOG_COLLECTION = fromString("LinuxSyslogCollection");
+
+ /** Static value WindowsEvent for DataSourceKind. */
+ public static final DataSourceKind WINDOWS_EVENT = fromString("WindowsEvent");
+
+ /** Static value WindowsPerformanceCounter for DataSourceKind. */
+ public static final DataSourceKind WINDOWS_PERFORMANCE_COUNTER = fromString("WindowsPerformanceCounter");
+
+ /**
+ * Creates or finds a DataSourceKind from its string representation.
+ * @param name a name to look for
+ * @return the corresponding DataSourceKind
+ */
+ @JsonCreator
+ public static DataSourceKind fromString(String name) {
+ return fromString(name, DataSourceKind.class);
+ }
+
+ /**
+ * @return known DataSourceKind values
+ */
+ public static Collection values() {
+ return values(DataSourceKind.class);
+ }
+}
diff --git a/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/DataSources.java b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/DataSources.java
new file mode 100644
index 000000000000..e425f3154cd9
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/DataSources.java
@@ -0,0 +1,54 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.loganalytics.v2015_11_01_preview;
+
+import com.microsoft.azure.arm.collection.SupportsCreating;
+import rx.Completable;
+import rx.Observable;
+import com.microsoft.azure.management.loganalytics.v2015_11_01_preview.implementation.DataSourcesInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing DataSources.
+ */
+public interface DataSources extends SupportsCreating, HasInner {
+ /**
+ * Gets a datasource instance.
+ *
+ * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
+ * @param workspaceName Name of the Log Analytics Workspace that contains the datasource.
+ * @param dataSourceName Name of the datasource
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAsync(String resourceGroupName, String workspaceName, String dataSourceName);
+
+ /**
+ * Gets the first page of data source instances in a workspace with the link to the next page.
+ *
+ * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
+ * @param workspaceName The workspace that contains the data sources.
+ * @param filter The filter to apply on the operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listByWorkspaceAsync(final String resourceGroupName, final String workspaceName, final String filter);
+
+ /**
+ * Deletes a data source instance.
+ *
+ * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
+ * @param workspaceName Name of the Log Analytics Workspace that contains the datasource.
+ * @param dataSourceName Name of the datasource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable deleteAsync(String resourceGroupName, String workspaceName, String dataSourceName);
+
+}
diff --git a/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/EntityStatus.java b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/EntityStatus.java
new file mode 100644
index 000000000000..4b9821e606ea
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/EntityStatus.java
@@ -0,0 +1,53 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.loganalytics.v2015_11_01_preview;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for EntityStatus.
+ */
+public final class EntityStatus extends ExpandableStringEnum {
+ /** Static value Creating for EntityStatus. */
+ public static final EntityStatus CREATING = fromString("Creating");
+
+ /** Static value Succeeded for EntityStatus. */
+ public static final EntityStatus SUCCEEDED = fromString("Succeeded");
+
+ /** Static value Failed for EntityStatus. */
+ public static final EntityStatus FAILED = fromString("Failed");
+
+ /** Static value Canceled for EntityStatus. */
+ public static final EntityStatus CANCELED = fromString("Canceled");
+
+ /** Static value Deleting for EntityStatus. */
+ public static final EntityStatus DELETING = fromString("Deleting");
+
+ /** Static value ProvisioningAccount for EntityStatus. */
+ public static final EntityStatus PROVISIONING_ACCOUNT = fromString("ProvisioningAccount");
+
+ /**
+ * Creates or finds a EntityStatus from its string representation.
+ * @param name a name to look for
+ * @return the corresponding EntityStatus
+ */
+ @JsonCreator
+ public static EntityStatus fromString(String name) {
+ return fromString(name, EntityStatus.class);
+ }
+
+ /**
+ * @return known EntityStatus values
+ */
+ public static Collection values() {
+ return values(EntityStatus.class);
+ }
+}
diff --git a/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/ErrorResponse.java b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/ErrorResponse.java
new file mode 100644
index 000000000000..1744de96bbba
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/ErrorResponse.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.v2015_11_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Describes the format of Error response.
+ */
+public class ErrorResponse {
+ /**
+ * Error code.
+ */
+ @JsonProperty(value = "code")
+ private String code;
+
+ /**
+ * Error message indicating why the operation failed.
+ */
+ @JsonProperty(value = "message")
+ private String message;
+
+ /**
+ * Get error code.
+ *
+ * @return the code value
+ */
+ public String code() {
+ return this.code;
+ }
+
+ /**
+ * Set error code.
+ *
+ * @param code the code value to set
+ * @return the ErrorResponse object itself.
+ */
+ public ErrorResponse withCode(String code) {
+ this.code = code;
+ return this;
+ }
+
+ /**
+ * Get error message indicating why the operation failed.
+ *
+ * @return the message value
+ */
+ public String message() {
+ return this.message;
+ }
+
+ /**
+ * Set error message indicating why the operation failed.
+ *
+ * @param message the message value to set
+ * @return the ErrorResponse object itself.
+ */
+ public ErrorResponse withMessage(String message) {
+ this.message = message;
+ return this;
+ }
+
+}
diff --git a/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/IntelligencePack.java b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/IntelligencePack.java
new file mode 100644
index 000000000000..98e778109061
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/IntelligencePack.java
@@ -0,0 +1,35 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.loganalytics.v2015_11_01_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.loganalytics.v2015_11_01_preview.implementation.IntelligencePackInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.loganalytics.v2015_11_01_preview.implementation.LogAnalyticsManager;
+
+/**
+ * Type representing IntelligencePack.
+ */
+public interface IntelligencePack extends HasInner, HasManager {
+ /**
+ * @return the displayName value.
+ */
+ String displayName();
+
+ /**
+ * @return the enabled value.
+ */
+ Boolean enabled();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+}
diff --git a/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/LinkedService.java b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/LinkedService.java
new file mode 100644
index 000000000000..c6a9be0a8bcc
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/LinkedService.java
@@ -0,0 +1,135 @@
+/**
+ * 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.v2015_11_01_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.loganalytics.v2015_11_01_preview.implementation.LinkedServiceInner;
+import com.microsoft.azure.arm.model.Indexable;
+import com.microsoft.azure.arm.model.Refreshable;
+import com.microsoft.azure.arm.model.Updatable;
+import com.microsoft.azure.arm.model.Appliable;
+import com.microsoft.azure.arm.model.Creatable;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.loganalytics.v2015_11_01_preview.implementation.LogAnalyticsManager;
+import java.util.Map;
+
+/**
+ * Type representing LinkedService.
+ */
+public interface LinkedService extends HasInner, Indexable, Refreshable, Updatable, HasManager {
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the resourceId value.
+ */
+ String resourceId();
+
+ /**
+ * @return the tags value.
+ */
+ Map tags();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * The entirety of the LinkedService definition.
+ */
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithWorkspace, DefinitionStages.WithResourceId, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * Grouping of LinkedService definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of a LinkedService definition.
+ */
+ interface Blank extends WithWorkspace {
+ }
+
+ /**
+ * The stage of the linkedservice definition allowing to specify Workspace.
+ */
+ interface WithWorkspace {
+ /**
+ * Specifies resourceGroupName, workspaceName.
+ * @param resourceGroupName The name of the resource group to get. The name is case insensitive
+ * @param workspaceName Name of the Log Analytics Workspace that will contain the linkedServices resource
+ * @return the next definition stage
+ */
+ WithResourceId withExistingWorkspace(String resourceGroupName, String workspaceName);
+ }
+
+ /**
+ * The stage of the linkedservice definition allowing to specify ResourceId.
+ */
+ interface WithResourceId {
+ /**
+ * Specifies resourceId.
+ * @param resourceId The resource id of the resource that will be linked to the workspace
+ * @return the next definition stage
+ */
+ WithCreate withResourceId(String resourceId);
+ }
+
+ /**
+ * The stage of the linkedservice definition allowing to specify Tags.
+ */
+ interface WithTags {
+ /**
+ * Specifies tags.
+ * @param tags Resource tags
+ * @return the next definition stage
+ */
+ WithCreate withTags(Map tags);
+ }
+
+ /**
+ * The stage of the definition which contains all the minimum required inputs for
+ * the resource to be created (via {@link WithCreate#create()}), but also allows
+ * for any other optional settings to be specified.
+ */
+ interface WithCreate extends Creatable, DefinitionStages.WithTags {
+ }
+ }
+ /**
+ * The template for a LinkedService update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, UpdateStages.WithTags {
+ }
+
+ /**
+ * Grouping of LinkedService update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the linkedservice update allowing to specify Tags.
+ */
+ interface WithTags {
+ /**
+ * Specifies tags.
+ * @param tags Resource tags
+ * @return the next update stage
+ */
+ Update withTags(Map tags);
+ }
+
+ }
+}
diff --git a/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/LinkedServices.java b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/LinkedServices.java
new file mode 100644
index 000000000000..36545b986195
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/LinkedServices.java
@@ -0,0 +1,53 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.loganalytics.v2015_11_01_preview;
+
+import com.microsoft.azure.arm.collection.SupportsCreating;
+import rx.Completable;
+import rx.Observable;
+import com.microsoft.azure.management.loganalytics.v2015_11_01_preview.implementation.LinkedServicesInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing LinkedServices.
+ */
+public interface LinkedServices extends SupportsCreating, HasInner {
+ /**
+ * Gets a linked service instance.
+ *
+ * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
+ * @param workspaceName Name of the Log Analytics Workspace that contains the linkedServices resource
+ * @param linkedServiceName Name of the linked service.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAsync(String resourceGroupName, String workspaceName, String linkedServiceName);
+
+ /**
+ * Gets the linked services instances in a workspace.
+ *
+ * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
+ * @param workspaceName Name of the Log Analytics Workspace that contains the linked services.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listByWorkspaceAsync(String resourceGroupName, String workspaceName);
+
+ /**
+ * Deletes a linked service instance.
+ *
+ * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
+ * @param workspaceName Name of the Log Analytics Workspace that contains the linkedServices resource
+ * @param linkedServiceName Name of the linked service.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable deleteAsync(String resourceGroupName, String workspaceName, String linkedServiceName);
+
+}
diff --git a/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/ManagementGroup.java b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/ManagementGroup.java
new file mode 100644
index 000000000000..c93fbadd9a3e
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/ManagementGroup.java
@@ -0,0 +1,61 @@
+/**
+ * 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.v2015_11_01_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.loganalytics.v2015_11_01_preview.implementation.ManagementGroupInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.loganalytics.v2015_11_01_preview.implementation.LogAnalyticsManager;
+import org.joda.time.DateTime;
+
+/**
+ * Type representing ManagementGroup.
+ */
+public interface ManagementGroup extends HasInner, HasManager {
+ /**
+ * @return the created value.
+ */
+ DateTime created();
+
+ /**
+ * @return the dataReceived value.
+ */
+ DateTime dataReceived();
+
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the isGateway value.
+ */
+ Boolean isGateway();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the serverCount value.
+ */
+ Integer serverCount();
+
+ /**
+ * @return the sku value.
+ */
+ String sku();
+
+ /**
+ * @return the version value.
+ */
+ String version();
+
+}
diff --git a/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/MetricName.java b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/MetricName.java
new file mode 100644
index 000000000000..3067a34771c5
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/MetricName.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.v2015_11_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The name of a metric.
+ */
+public class MetricName {
+ /**
+ * The system name of the metric.
+ */
+ @JsonProperty(value = "value")
+ private String value;
+
+ /**
+ * The localized name of the metric.
+ */
+ @JsonProperty(value = "localizedValue")
+ private String localizedValue;
+
+ /**
+ * Get the system name of the metric.
+ *
+ * @return the value value
+ */
+ public String value() {
+ return this.value;
+ }
+
+ /**
+ * Set the system name of the metric.
+ *
+ * @param value the value value to set
+ * @return the MetricName object itself.
+ */
+ public MetricName withValue(String value) {
+ this.value = value;
+ return this;
+ }
+
+ /**
+ * Get the localized name of the metric.
+ *
+ * @return the localizedValue value
+ */
+ public String localizedValue() {
+ return this.localizedValue;
+ }
+
+ /**
+ * Set the localized name of the metric.
+ *
+ * @param localizedValue the localizedValue value to set
+ * @return the MetricName object itself.
+ */
+ public MetricName withLocalizedValue(String localizedValue) {
+ this.localizedValue = localizedValue;
+ return this;
+ }
+
+}
diff --git a/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/Operation.java b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/Operation.java
new file mode 100644
index 000000000000..6f1b99befe5d
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/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.v2015_11_01_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.loganalytics.v2015_11_01_preview.implementation.LogAnalyticsManager;
+import com.microsoft.azure.management.loganalytics.v2015_11_01_preview.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-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/OperationDisplay.java b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/OperationDisplay.java
new file mode 100644
index 000000000000..6b817d4191d1
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/OperationDisplay.java
@@ -0,0 +1,95 @@
+/**
+ * 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.v2015_11_01_preview;
+
+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;
+
+ /**
+ * 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;
+ }
+
+}
diff --git a/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/Operations.java b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/Operations.java
new file mode 100644
index 000000000000..1be87f98df60
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/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.v2015_11_01_preview;
+
+import rx.Observable;
+import com.microsoft.azure.management.loganalytics.v2015_11_01_preview.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-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/SharedKeys.java b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/SharedKeys.java
new file mode 100644
index 000000000000..4febb0d9d20f
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/SharedKeys.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.v2015_11_01_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.loganalytics.v2015_11_01_preview.implementation.LogAnalyticsManager;
+import com.microsoft.azure.management.loganalytics.v2015_11_01_preview.implementation.SharedKeysInner;
+
+/**
+ * Type representing SharedKeys.
+ */
+public interface SharedKeys extends HasInner, HasManager {
+ /**
+ * @return the primarySharedKey value.
+ */
+ String primarySharedKey();
+
+ /**
+ * @return the secondarySharedKey value.
+ */
+ String secondarySharedKey();
+
+}
diff --git a/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/Sku.java b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/Sku.java
new file mode 100644
index 000000000000..9ab5029c4f20
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/Sku.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.v2015_11_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The SKU (tier) of a workspace.
+ */
+public class Sku {
+ /**
+ * The name of the SKU. Possible values include: 'Free', 'Standard',
+ * 'Premium', 'PerNode', 'PerGB2018', 'Standalone', 'CapacityReservation'.
+ */
+ @JsonProperty(value = "name", required = true)
+ private SkuNameEnum name;
+
+ /**
+ * Get the name of the SKU. Possible values include: 'Free', 'Standard', 'Premium', 'PerNode', 'PerGB2018', 'Standalone', 'CapacityReservation'.
+ *
+ * @return the name value
+ */
+ public SkuNameEnum name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name of the SKU. Possible values include: 'Free', 'Standard', 'Premium', 'PerNode', 'PerGB2018', 'Standalone', 'CapacityReservation'.
+ *
+ * @param name the name value to set
+ * @return the Sku object itself.
+ */
+ public Sku withName(SkuNameEnum name) {
+ this.name = name;
+ return this;
+ }
+
+}
diff --git a/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/SkuNameEnum.java b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/SkuNameEnum.java
new file mode 100644
index 000000000000..2293d8129dd1
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/SkuNameEnum.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.v2015_11_01_preview;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for SkuNameEnum.
+ */
+public final class SkuNameEnum extends ExpandableStringEnum {
+ /** Static value Free for SkuNameEnum. */
+ public static final SkuNameEnum FREE = fromString("Free");
+
+ /** Static value Standard for SkuNameEnum. */
+ public static final SkuNameEnum STANDARD = fromString("Standard");
+
+ /** Static value Premium for SkuNameEnum. */
+ public static final SkuNameEnum PREMIUM = fromString("Premium");
+
+ /** Static value PerNode for SkuNameEnum. */
+ public static final SkuNameEnum PER_NODE = fromString("PerNode");
+
+ /** Static value PerGB2018 for SkuNameEnum. */
+ public static final SkuNameEnum PER_GB2018 = fromString("PerGB2018");
+
+ /** Static value Standalone for SkuNameEnum. */
+ public static final SkuNameEnum STANDALONE = fromString("Standalone");
+
+ /** Static value CapacityReservation for SkuNameEnum. */
+ public static final SkuNameEnum CAPACITY_RESERVATION = fromString("CapacityReservation");
+
+ /**
+ * Creates or finds a SkuNameEnum from its string representation.
+ * @param name a name to look for
+ * @return the corresponding SkuNameEnum
+ */
+ @JsonCreator
+ public static SkuNameEnum fromString(String name) {
+ return fromString(name, SkuNameEnum.class);
+ }
+
+ /**
+ * @return known SkuNameEnum values
+ */
+ public static Collection values() {
+ return values(SkuNameEnum.class);
+ }
+}
diff --git a/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/UsageMetric.java b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/UsageMetric.java
new file mode 100644
index 000000000000..a656e617d8f7
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/UsageMetric.java
@@ -0,0 +1,51 @@
+/**
+ * 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.v2015_11_01_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.loganalytics.v2015_11_01_preview.implementation.UsageMetricInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.loganalytics.v2015_11_01_preview.implementation.LogAnalyticsManager;
+import org.joda.time.DateTime;
+
+/**
+ * Type representing UsageMetric.
+ */
+public interface UsageMetric extends HasInner, HasManager {
+ /**
+ * @return the currentValue value.
+ */
+ Double currentValue();
+
+ /**
+ * @return the limit value.
+ */
+ Double limit();
+
+ /**
+ * @return the name value.
+ */
+ MetricName name();
+
+ /**
+ * @return the nextResetTime value.
+ */
+ DateTime nextResetTime();
+
+ /**
+ * @return the quotaPeriod value.
+ */
+ String quotaPeriod();
+
+ /**
+ * @return the unit value.
+ */
+ String unit();
+
+}
diff --git a/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/Workspace.java b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/Workspace.java
new file mode 100644
index 000000000000..e11be00dfcec
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/Workspace.java
@@ -0,0 +1,199 @@
+/**
+ * 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.v2015_11_01_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.Resource;
+import com.microsoft.azure.arm.resources.models.GroupableResourceCore;
+import com.microsoft.azure.arm.resources.models.HasResourceGroup;
+import com.microsoft.azure.arm.model.Refreshable;
+import com.microsoft.azure.arm.model.Updatable;
+import com.microsoft.azure.arm.model.Appliable;
+import com.microsoft.azure.arm.model.Creatable;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.loganalytics.v2015_11_01_preview.implementation.LogAnalyticsManager;
+import com.microsoft.azure.management.loganalytics.v2015_11_01_preview.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 portalUrl value.
+ */
+ String portalUrl();
+
+ /**
+ * @return the provisioningState value.
+ */
+ EntityStatus provisioningState();
+
+ /**
+ * @return the retentionInDays value.
+ */
+ Integer retentionInDays();
+
+ /**
+ * @return the sku value.
+ */
+ Sku sku();
+
+ /**
+ * @return the source value.
+ */
+ String source();
+
+ /**
+ * 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 ProvisioningState.
+ */
+ interface WithProvisioningState {
+ /**
+ * Specifies provisioningState.
+ * @param provisioningState The provisioning state of the workspace. Possible values include: 'Creating', 'Succeeded', 'Failed', 'Canceled', 'Deleting', 'ProvisioningAccount'
+ * @return the next definition stage
+ */
+ WithCreate withProvisioningState(EntityStatus provisioningState);
+ }
+
+ /**
+ * The stage of the workspace definition allowing to specify RetentionInDays.
+ */
+ interface WithRetentionInDays {
+ /**
+ * Specifies retentionInDays.
+ * @param retentionInDays The workspace data retention in days. -1 means Unlimited retention for the Unlimited Sku. 730 days is the maximum allowed for all other Skus
+ * @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(Sku sku);
+ }
+
+ /**
+ * The stage of the definition which contains all the minimum required inputs for
+ * the resource to be created (via {@link WithCreate#create()}), but also allows
+ * for any other optional settings to be specified.
+ */
+ interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithETag, DefinitionStages.WithProvisioningState, DefinitionStages.WithRetentionInDays, DefinitionStages.WithSku {
+ }
+ }
+ /**
+ * The template for a Workspace update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithETag, UpdateStages.WithProvisioningState, UpdateStages.WithRetentionInDays, UpdateStages.WithSku {
+ }
+
+ /**
+ * Grouping of Workspace update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the workspace update allowing to specify ETag.
+ */
+ interface WithETag {
+ /**
+ * Specifies eTag.
+ * @param eTag The ETag of the workspace
+ * @return the next update stage
+ */
+ Update withETag(String eTag);
+ }
+
+ /**
+ * 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'
+ * @return the next update stage
+ */
+ Update withProvisioningState(EntityStatus provisioningState);
+ }
+
+ /**
+ * The stage of the workspace update allowing to specify RetentionInDays.
+ */
+ interface WithRetentionInDays {
+ /**
+ * Specifies retentionInDays.
+ * @param retentionInDays The workspace data retention in days. -1 means Unlimited retention for the Unlimited Sku. 730 days is the maximum allowed for all other Skus
+ * @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(Sku sku);
+ }
+
+ }
+}
diff --git a/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/Workspaces.java b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/Workspaces.java
new file mode 100644
index 000000000000..ae28c2831fc4
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/Workspaces.java
@@ -0,0 +1,91 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.loganalytics.v2015_11_01_preview;
+
+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.v2015_11_01_preview.implementation.WorkspacesInner;
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.loganalytics.v2015_11_01_preview.IntelligencePack;
+import rx.Completable;
+import com.microsoft.azure.management.loganalytics.v2015_11_01_preview.UsageMetric;
+import com.microsoft.azure.management.loganalytics.v2015_11_01_preview.ManagementGroup;
+
+/**
+ * Type representing Workspaces.
+ */
+public interface Workspaces extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner {
+ /**
+ * Gets the shared keys for a workspace.
+ *
+ * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
+ * @param workspaceName Name of the Log Analytics Workspace.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getSharedKeysAsync(String resourceGroupName, String workspaceName);
+
+ /**
+ * Lists all the intelligence packs possible and whether they are enabled or disabled for a given workspace.
+ *
+ * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
+ * @param workspaceName Name of the Log Analytics Workspace.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listIntelligencePacksAsync(String resourceGroupName, String workspaceName);
+
+ /**
+ * Disables an intelligence pack for a given workspace.
+ *
+ * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
+ * @param workspaceName Name of the Log Analytics Workspace.
+ * @param intelligencePackName The name of the intelligence pack to be disabled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable disableIntelligencePackAsync(String resourceGroupName, String workspaceName, String intelligencePackName);
+
+ /**
+ * Enables an intelligence pack for a given workspace.
+ *
+ * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
+ * @param workspaceName Name of the Log Analytics Workspace.
+ * @param intelligencePackName The name of the intelligence pack to be enabled.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable enableIntelligencePackAsync(String resourceGroupName, String workspaceName, String intelligencePackName);
+
+ /**
+ * Gets a list of usage metrics for a workspace.
+ *
+ * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listUsagesAsync(String resourceGroupName, String workspaceName);
+
+ /**
+ * Gets a list of management groups connected to a workspace.
+ *
+ * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listManagementGroupsAsync(String resourceGroupName, String workspaceName);
+
+}
diff --git a/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/implementation/DataSourceImpl.java b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/implementation/DataSourceImpl.java
new file mode 100644
index 000000000000..3a492847b4dc
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/implementation/DataSourceImpl.java
@@ -0,0 +1,140 @@
+/**
+ * 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.v2015_11_01_preview.implementation;
+
+import com.microsoft.azure.management.loganalytics.v2015_11_01_preview.DataSource;
+import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl;
+import rx.Observable;
+import java.util.Map;
+import com.microsoft.azure.management.loganalytics.v2015_11_01_preview.DataSourceKind;
+
+class DataSourceImpl extends CreatableUpdatableImpl implements DataSource, DataSource.Definition, DataSource.Update {
+ private final LogAnalyticsManager manager;
+ private String resourceGroupName;
+ private String workspaceName;
+ private String dataSourceName;
+
+ DataSourceImpl(String name, LogAnalyticsManager manager) {
+ super(name, new DataSourceInner());
+ this.manager = manager;
+ // Set resource name
+ this.dataSourceName = name;
+ //
+ }
+
+ DataSourceImpl(DataSourceInner inner, LogAnalyticsManager manager) {
+ super(inner.name(), inner);
+ this.manager = manager;
+ // Set resource name
+ this.dataSourceName = inner.name();
+ // set resource ancestor and positional variables
+ this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourcegroups");
+ this.workspaceName = IdParsingUtils.getValueFromIdByName(inner.id(), "workspaces");
+ this.dataSourceName = IdParsingUtils.getValueFromIdByName(inner.id(), "dataSources");
+ //
+ }
+
+ @Override
+ public LogAnalyticsManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public Observable createResourceAsync() {
+ DataSourcesInner client = this.manager().inner().dataSources();
+ return client.createOrUpdateAsync(this.resourceGroupName, this.workspaceName, this.dataSourceName, this.inner())
+ .map(innerToFluentMap(this));
+ }
+
+ @Override
+ public Observable updateResourceAsync() {
+ DataSourcesInner client = this.manager().inner().dataSources();
+ return client.createOrUpdateAsync(this.resourceGroupName, this.workspaceName, this.dataSourceName, this.inner())
+ .map(innerToFluentMap(this));
+ }
+
+ @Override
+ protected Observable getInnerAsync() {
+ DataSourcesInner client = this.manager().inner().dataSources();
+ return client.getAsync(this.resourceGroupName, this.workspaceName, this.dataSourceName);
+ }
+
+ @Override
+ public boolean isInCreateMode() {
+ return this.inner().id() == null;
+ }
+
+
+ @Override
+ public String eTag() {
+ return this.inner().eTag();
+ }
+
+ @Override
+ public String id() {
+ return this.inner().id();
+ }
+
+ @Override
+ public DataSourceKind kind() {
+ return this.inner().kind();
+ }
+
+ @Override
+ public String name() {
+ return this.inner().name();
+ }
+
+ @Override
+ public Object properties() {
+ return this.inner().properties();
+ }
+
+ @Override
+ public Map tags() {
+ return this.inner().tags();
+ }
+
+ @Override
+ public String type() {
+ return this.inner().type();
+ }
+
+ @Override
+ public DataSourceImpl withExistingWorkspace(String resourceGroupName, String workspaceName) {
+ this.resourceGroupName = resourceGroupName;
+ this.workspaceName = workspaceName;
+ return this;
+ }
+
+ @Override
+ public DataSourceImpl withKind(DataSourceKind kind) {
+ this.inner().withKind(kind);
+ return this;
+ }
+
+ @Override
+ public DataSourceImpl withProperties(Object properties) {
+ this.inner().withProperties(properties);
+ return this;
+ }
+
+ @Override
+ public DataSourceImpl withETag(String eTag) {
+ this.inner().withETag(eTag);
+ return this;
+ }
+
+ @Override
+ public DataSourceImpl withTags(Map tags) {
+ this.inner().withTags(tags);
+ return this;
+ }
+
+}
diff --git a/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/implementation/DataSourceInner.java b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/implementation/DataSourceInner.java
new file mode 100644
index 000000000000..af380f98b85a
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/implementation/DataSourceInner.java
@@ -0,0 +1,130 @@
+/**
+ * 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.v2015_11_01_preview.implementation;
+
+import com.microsoft.azure.management.loganalytics.v2015_11_01_preview.DataSourceKind;
+import java.util.Map;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.azure.ProxyResource;
+
+/**
+ * Datasources under OMS Workspace.
+ */
+public class DataSourceInner extends ProxyResource {
+ /**
+ * The data source properties in raw json format, each kind of data source
+ * have it's own schema.
+ */
+ @JsonProperty(value = "properties", required = true)
+ private Object properties;
+
+ /**
+ * The ETag of the data source.
+ */
+ @JsonProperty(value = "eTag")
+ private String eTag;
+
+ /**
+ * Possible values include: 'AzureActivityLog', 'ChangeTrackingPath',
+ * 'ChangeTrackingDefaultPath', 'ChangeTrackingDefaultRegistry',
+ * 'ChangeTrackingCustomRegistry', 'CustomLog', 'CustomLogCollection',
+ * 'GenericDataSource', 'IISLogs', 'LinuxPerformanceObject',
+ * 'LinuxPerformanceCollection', 'LinuxSyslog', 'LinuxSyslogCollection',
+ * 'WindowsEvent', 'WindowsPerformanceCounter'.
+ */
+ @JsonProperty(value = "kind", required = true)
+ private DataSourceKind kind;
+
+ /**
+ * Resource tags.
+ */
+ @JsonProperty(value = "tags")
+ private Map tags;
+
+ /**
+ * Get the data source properties in raw json format, each kind of data source have it's own schema.
+ *
+ * @return the properties value
+ */
+ public Object properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the data source properties in raw json format, each kind of data source have it's own schema.
+ *
+ * @param properties the properties value to set
+ * @return the DataSourceInner object itself.
+ */
+ public DataSourceInner withProperties(Object properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the ETag of the data source.
+ *
+ * @return the eTag value
+ */
+ public String eTag() {
+ return this.eTag;
+ }
+
+ /**
+ * Set the ETag of the data source.
+ *
+ * @param eTag the eTag value to set
+ * @return the DataSourceInner object itself.
+ */
+ public DataSourceInner withETag(String eTag) {
+ this.eTag = eTag;
+ return this;
+ }
+
+ /**
+ * Get possible values include: 'AzureActivityLog', 'ChangeTrackingPath', 'ChangeTrackingDefaultPath', 'ChangeTrackingDefaultRegistry', 'ChangeTrackingCustomRegistry', 'CustomLog', 'CustomLogCollection', 'GenericDataSource', 'IISLogs', 'LinuxPerformanceObject', 'LinuxPerformanceCollection', 'LinuxSyslog', 'LinuxSyslogCollection', 'WindowsEvent', 'WindowsPerformanceCounter'.
+ *
+ * @return the kind value
+ */
+ public DataSourceKind kind() {
+ return this.kind;
+ }
+
+ /**
+ * Set possible values include: 'AzureActivityLog', 'ChangeTrackingPath', 'ChangeTrackingDefaultPath', 'ChangeTrackingDefaultRegistry', 'ChangeTrackingCustomRegistry', 'CustomLog', 'CustomLogCollection', 'GenericDataSource', 'IISLogs', 'LinuxPerformanceObject', 'LinuxPerformanceCollection', 'LinuxSyslog', 'LinuxSyslogCollection', 'WindowsEvent', 'WindowsPerformanceCounter'.
+ *
+ * @param kind the kind value to set
+ * @return the DataSourceInner object itself.
+ */
+ public DataSourceInner withKind(DataSourceKind kind) {
+ this.kind = kind;
+ 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 DataSourceInner object itself.
+ */
+ public DataSourceInner withTags(Map tags) {
+ this.tags = tags;
+ return this;
+ }
+
+}
diff --git a/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/implementation/DataSourcesImpl.java b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/implementation/DataSourcesImpl.java
new file mode 100644
index 000000000000..ff7eae59a030
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/implementation/DataSourcesImpl.java
@@ -0,0 +1,85 @@
+/**
+ * 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.v2015_11_01_preview.implementation;
+
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import com.microsoft.azure.management.loganalytics.v2015_11_01_preview.DataSources;
+import rx.Completable;
+import rx.Observable;
+import rx.functions.Func1;
+import com.microsoft.azure.Page;
+import com.microsoft.azure.management.loganalytics.v2015_11_01_preview.DataSource;
+
+class DataSourcesImpl extends WrapperImpl implements DataSources {
+ private final LogAnalyticsManager manager;
+
+ DataSourcesImpl(LogAnalyticsManager manager) {
+ super(manager.inner().dataSources());
+ this.manager = manager;
+ }
+
+ public LogAnalyticsManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public DataSourceImpl define(String name) {
+ return wrapModel(name);
+ }
+
+ private DataSourceImpl wrapModel(DataSourceInner inner) {
+ return new DataSourceImpl(inner, manager());
+ }
+
+ private DataSourceImpl wrapModel(String name) {
+ return new DataSourceImpl(name, this.manager());
+ }
+
+ @Override
+ public Observable listByWorkspaceAsync(final String resourceGroupName, final String workspaceName, final String filter) {
+ DataSourcesInner client = this.inner();
+ return client.listByWorkspaceAsync(resourceGroupName, workspaceName, filter)
+ .flatMapIterable(new Func1, Iterable>() {
+ @Override
+ public Iterable call(Page page) {
+ return page.items();
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public DataSource call(DataSourceInner inner) {
+ return wrapModel(inner);
+ }
+ });
+ }
+
+ @Override
+ public Observable getAsync(String resourceGroupName, String workspaceName, String dataSourceName) {
+ DataSourcesInner client = this.inner();
+ return client.getAsync(resourceGroupName, workspaceName, dataSourceName)
+ .flatMap(new Func1>() {
+ @Override
+ public Observable call(DataSourceInner inner) {
+ if (inner == null) {
+ return Observable.empty();
+ } else {
+ return Observable.just((DataSource)wrapModel(inner));
+ }
+ }
+ });
+ }
+
+ @Override
+ public Completable deleteAsync(String resourceGroupName, String workspaceName, String dataSourceName) {
+ DataSourcesInner client = this.inner();
+ return client.deleteAsync(resourceGroupName, workspaceName, dataSourceName).toCompletable();
+ }
+
+}
diff --git a/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/implementation/DataSourcesInner.java b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/implementation/DataSourcesInner.java
new file mode 100644
index 000000000000..c002f10179b9
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/implementation/DataSourcesInner.java
@@ -0,0 +1,746 @@
+/**
+ * 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.v2015_11_01_preview.implementation;
+
+import retrofit2.Retrofit;
+import com.google.common.reflect.TypeToken;
+import com.microsoft.azure.AzureServiceFuture;
+import com.microsoft.azure.CloudException;
+import com.microsoft.azure.ListOperationCallback;
+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.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 DataSources.
+ */
+public class DataSourcesInner {
+ /** The Retrofit service to perform REST calls. */
+ private DataSourcesService service;
+ /** The service client containing this operation class. */
+ private OperationalInsightsManagementClientImpl client;
+
+ /**
+ * Initializes an instance of DataSourcesInner.
+ *
+ * @param retrofit the Retrofit instance built from a Retrofit Builder.
+ * @param client the instance of the service client containing this operation class.
+ */
+ public DataSourcesInner(Retrofit retrofit, OperationalInsightsManagementClientImpl client) {
+ this.service = retrofit.create(DataSourcesService.class);
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for DataSources to be
+ * used by Retrofit to perform actually REST calls.
+ */
+ interface DataSourcesService {
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2015_11_01_preview.DataSources createOrUpdate" })
+ @PUT("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources/{dataSourceName}")
+ Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("dataSourceName") String dataSourceName, @Path("subscriptionId") String subscriptionId, @Body DataSourceInner 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.v2015_11_01_preview.DataSources delete" })
+ @HTTP(path = "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources/{dataSourceName}", method = "DELETE", hasBody = true)
+ Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("dataSourceName") String dataSourceName, @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.v2015_11_01_preview.DataSources get" })
+ @GET("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources/{dataSourceName}")
+ Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("dataSourceName") String dataSourceName, @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.v2015_11_01_preview.DataSources listByWorkspace" })
+ @GET("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources")
+ Observable> listByWorkspace(@Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("$skiptoken") String skiptoken, @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.v2015_11_01_preview.DataSources listByWorkspaceNext" })
+ @GET
+ Observable> listByWorkspaceNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ }
+
+ /**
+ * Create or update a data source.
+ *
+ * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
+ * @param workspaceName Name of the Log Analytics Workspace that will contain the datasource
+ * @param dataSourceName The name of the datasource resource.
+ * @param parameters The parameters required to create or update a datasource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the DataSourceInner object if successful.
+ */
+ public DataSourceInner createOrUpdate(String resourceGroupName, String workspaceName, String dataSourceName, DataSourceInner parameters) {
+ return createOrUpdateWithServiceResponseAsync(resourceGroupName, workspaceName, dataSourceName, parameters).toBlocking().single().body();
+ }
+
+ /**
+ * Create or update a data source.
+ *
+ * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
+ * @param workspaceName Name of the Log Analytics Workspace that will contain the datasource
+ * @param dataSourceName The name of the datasource resource.
+ * @param parameters The parameters required to create or update a datasource.
+ * @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 workspaceName, String dataSourceName, DataSourceInner parameters, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, workspaceName, dataSourceName, parameters), serviceCallback);
+ }
+
+ /**
+ * Create or update a data source.
+ *
+ * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
+ * @param workspaceName Name of the Log Analytics Workspace that will contain the datasource
+ * @param dataSourceName The name of the datasource resource.
+ * @param parameters The parameters required to create or update a datasource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the DataSourceInner object
+ */
+ public Observable createOrUpdateAsync(String resourceGroupName, String workspaceName, String dataSourceName, DataSourceInner parameters) {
+ return createOrUpdateWithServiceResponseAsync(resourceGroupName, workspaceName, dataSourceName, parameters).map(new Func1, DataSourceInner>() {
+ @Override
+ public DataSourceInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Create or update a data source.
+ *
+ * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
+ * @param workspaceName Name of the Log Analytics Workspace that will contain the datasource
+ * @param dataSourceName The name of the datasource resource.
+ * @param parameters The parameters required to create or update a datasource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the DataSourceInner object
+ */
+ public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String workspaceName, String dataSourceName, DataSourceInner parameters) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (workspaceName == null) {
+ throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null.");
+ }
+ if (dataSourceName == null) {
+ throw new IllegalArgumentException("Parameter dataSourceName 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.createOrUpdate(resourceGroupName, workspaceName, dataSourceName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = createOrUpdateDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .register(201, new TypeToken() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
+ /**
+ * Deletes a data source instance.
+ *
+ * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
+ * @param workspaceName Name of the Log Analytics Workspace that contains the datasource.
+ * @param dataSourceName Name of the datasource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ */
+ public void delete(String resourceGroupName, String workspaceName, String dataSourceName) {
+ deleteWithServiceResponseAsync(resourceGroupName, workspaceName, dataSourceName).toBlocking().single().body();
+ }
+
+ /**
+ * Deletes a data source instance.
+ *
+ * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
+ * @param workspaceName Name of the Log Analytics Workspace that contains the datasource.
+ * @param dataSourceName Name of the datasource.
+ * @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 workspaceName, String dataSourceName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, workspaceName, dataSourceName), serviceCallback);
+ }
+
+ /**
+ * Deletes a data source instance.
+ *
+ * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
+ * @param workspaceName Name of the Log Analytics Workspace that contains the datasource.
+ * @param dataSourceName Name of the datasource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceResponse} object if successful.
+ */
+ public Observable deleteAsync(String resourceGroupName, String workspaceName, String dataSourceName) {
+ return deleteWithServiceResponseAsync(resourceGroupName, workspaceName, dataSourceName).map(new Func1, Void>() {
+ @Override
+ public Void call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Deletes a data source instance.
+ *
+ * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
+ * @param workspaceName Name of the Log Analytics Workspace that contains the datasource.
+ * @param dataSourceName Name of the datasource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceResponse} object if successful.
+ */
+ public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String workspaceName, String dataSourceName) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (workspaceName == null) {
+ throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null.");
+ }
+ if (dataSourceName == null) {
+ throw new IllegalArgumentException("Parameter dataSourceName is required and cannot be null.");
+ }
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ return service.delete(resourceGroupName, workspaceName, dataSourceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = deleteDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .register(204, new TypeToken() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
+ /**
+ * Gets a datasource instance.
+ *
+ * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
+ * @param workspaceName Name of the Log Analytics Workspace that contains the datasource.
+ * @param dataSourceName Name of the datasource
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the DataSourceInner object if successful.
+ */
+ public DataSourceInner get(String resourceGroupName, String workspaceName, String dataSourceName) {
+ return getWithServiceResponseAsync(resourceGroupName, workspaceName, dataSourceName).toBlocking().single().body();
+ }
+
+ /**
+ * Gets a datasource instance.
+ *
+ * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
+ * @param workspaceName Name of the Log Analytics Workspace that contains the datasource.
+ * @param dataSourceName Name of the datasource
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture getAsync(String resourceGroupName, String workspaceName, String dataSourceName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, workspaceName, dataSourceName), serviceCallback);
+ }
+
+ /**
+ * Gets a datasource instance.
+ *
+ * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
+ * @param workspaceName Name of the Log Analytics Workspace that contains the datasource.
+ * @param dataSourceName Name of the datasource
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the DataSourceInner object
+ */
+ public Observable getAsync(String resourceGroupName, String workspaceName, String dataSourceName) {
+ return getWithServiceResponseAsync(resourceGroupName, workspaceName, dataSourceName).map(new Func1, DataSourceInner>() {
+ @Override
+ public DataSourceInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Gets a datasource instance.
+ *
+ * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
+ * @param workspaceName Name of the Log Analytics Workspace that contains the datasource.
+ * @param dataSourceName Name of the datasource
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the DataSourceInner object
+ */
+ public Observable> getWithServiceResponseAsync(String resourceGroupName, String workspaceName, String dataSourceName) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (workspaceName == null) {
+ throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null.");
+ }
+ if (dataSourceName == null) {
+ throw new IllegalArgumentException("Parameter dataSourceName 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.get(resourceGroupName, workspaceName, dataSourceName, 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 = getDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
+ /**
+ * Gets the first page of data source instances in a workspace with the link to the next page.
+ *
+ * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
+ * @param workspaceName The workspace that contains the data sources.
+ * @param filter The filter to apply on the operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the PagedList<DataSourceInner> object if successful.
+ */
+ public PagedList listByWorkspace(final String resourceGroupName, final String workspaceName, final String filter) {
+ ServiceResponse> response = listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName, filter).toBlocking().single();
+ return new PagedList(response.body()) {
+ @Override
+ public Page nextPage(String nextPageLink) {
+ return listByWorkspaceNextSinglePageAsync(nextPageLink).toBlocking().single().body();
+ }
+ };
+ }
+
+ /**
+ * Gets the first page of data source instances in a workspace with the link to the next page.
+ *
+ * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
+ * @param workspaceName The workspace that contains the data sources.
+ * @param filter The filter to apply on the operation.
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture> listByWorkspaceAsync(final String resourceGroupName, final String workspaceName, final String filter, final ListOperationCallback serviceCallback) {
+ return AzureServiceFuture.fromPageResponse(
+ listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName, filter),
+ new Func1>>>() {
+ @Override
+ public Observable>> call(String nextPageLink) {
+ return listByWorkspaceNextSinglePageAsync(nextPageLink);
+ }
+ },
+ serviceCallback);
+ }
+
+ /**
+ * Gets the first page of data source instances in a workspace with the link to the next page.
+ *
+ * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
+ * @param workspaceName The workspace that contains the data sources.
+ * @param filter The filter to apply on the operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<DataSourceInner> object
+ */
+ public Observable> listByWorkspaceAsync(final String resourceGroupName, final String workspaceName, final String filter) {
+ return listByWorkspaceWithServiceResponseAsync(resourceGroupName, workspaceName, filter)
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Gets the first page of data source instances in a workspace with the link to the next page.
+ *
+ * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
+ * @param workspaceName The workspace that contains the data sources.
+ * @param filter The filter to apply on the operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<DataSourceInner> object
+ */
+ public Observable>> listByWorkspaceWithServiceResponseAsync(final String resourceGroupName, final String workspaceName, final String filter) {
+ return listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName, filter)
+ .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(listByWorkspaceNextWithServiceResponseAsync(nextPageLink));
+ }
+ });
+ }
+
+ /**
+ * Gets the first page of data source instances in a workspace with the link to the next page.
+ *
+ * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
+ * @param workspaceName The workspace that contains the data sources.
+ * @param filter The filter to apply on the operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the PagedList<DataSourceInner> object wrapped in {@link ServiceResponse} if successful.
+ */
+ public Observable>> listByWorkspaceSinglePageAsync(final String resourceGroupName, final String workspaceName, final String filter) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (workspaceName == null) {
+ throw new IllegalArgumentException("Parameter workspaceName 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 (filter == null) {
+ throw new IllegalArgumentException("Parameter filter is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ final String skiptoken = null;
+ return service.listByWorkspace(resourceGroupName, workspaceName, this.client.subscriptionId(), filter, skiptoken, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>>() {
+ @Override
+ public Observable>> call(Response response) {
+ try {
+ ServiceResponse> result = listByWorkspaceDelegate(response);
+ return Observable.just(new ServiceResponse>(result.body(), result.response()));
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ /**
+ * Gets the first page of data source instances in a workspace with the link to the next page.
+ *
+ * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
+ * @param workspaceName The workspace that contains the data sources.
+ * @param filter The filter to apply on the operation.
+ * @param skiptoken Starting point of the collection of data source instances.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the PagedList<DataSourceInner> object if successful.
+ */
+ public PagedList listByWorkspace(final String resourceGroupName, final String workspaceName, final String filter, final String skiptoken) {
+ ServiceResponse> response = listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName, filter, skiptoken).toBlocking().single();
+ return new PagedList(response.body()) {
+ @Override
+ public Page nextPage(String nextPageLink) {
+ return listByWorkspaceNextSinglePageAsync(nextPageLink).toBlocking().single().body();
+ }
+ };
+ }
+
+ /**
+ * Gets the first page of data source instances in a workspace with the link to the next page.
+ *
+ * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
+ * @param workspaceName The workspace that contains the data sources.
+ * @param filter The filter to apply on the operation.
+ * @param skiptoken Starting point of the collection of data source instances.
+ * @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> listByWorkspaceAsync(final String resourceGroupName, final String workspaceName, final String filter, final String skiptoken, final ListOperationCallback serviceCallback) {
+ return AzureServiceFuture.fromPageResponse(
+ listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName, filter, skiptoken),
+ new Func1>>>() {
+ @Override
+ public Observable>> call(String nextPageLink) {
+ return listByWorkspaceNextSinglePageAsync(nextPageLink);
+ }
+ },
+ serviceCallback);
+ }
+
+ /**
+ * Gets the first page of data source instances in a workspace with the link to the next page.
+ *
+ * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
+ * @param workspaceName The workspace that contains the data sources.
+ * @param filter The filter to apply on the operation.
+ * @param skiptoken Starting point of the collection of data source instances.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<DataSourceInner> object
+ */
+ public Observable> listByWorkspaceAsync(final String resourceGroupName, final String workspaceName, final String filter, final String skiptoken) {
+ return listByWorkspaceWithServiceResponseAsync(resourceGroupName, workspaceName, filter, skiptoken)
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Gets the first page of data source instances in a workspace with the link to the next page.
+ *
+ * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
+ * @param workspaceName The workspace that contains the data sources.
+ * @param filter The filter to apply on the operation.
+ * @param skiptoken Starting point of the collection of data source instances.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<DataSourceInner> object
+ */
+ public Observable>> listByWorkspaceWithServiceResponseAsync(final String resourceGroupName, final String workspaceName, final String filter, final String skiptoken) {
+ return listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName, filter, skiptoken)
+ .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(listByWorkspaceNextWithServiceResponseAsync(nextPageLink));
+ }
+ });
+ }
+
+ /**
+ * Gets the first page of data source instances in a workspace with the link to the next page.
+ *
+ ServiceResponse> * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
+ ServiceResponse> * @param workspaceName The workspace that contains the data sources.
+ ServiceResponse> * @param filter The filter to apply on the operation.
+ ServiceResponse> * @param skiptoken Starting point of the collection of data source instances.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the PagedList<DataSourceInner> object wrapped in {@link ServiceResponse} if successful.
+ */
+ public Observable>> listByWorkspaceSinglePageAsync(final String resourceGroupName, final String workspaceName, final String filter, final String skiptoken) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (workspaceName == null) {
+ throw new IllegalArgumentException("Parameter workspaceName 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 (filter == null) {
+ throw new IllegalArgumentException("Parameter filter 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.listByWorkspace(resourceGroupName, workspaceName, this.client.subscriptionId(), filter, skiptoken, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>>() {
+ @Override
+ public Observable>> call(Response response) {
+ try {
+ ServiceResponse> result = listByWorkspaceDelegate(response);
+ return Observable.just(new ServiceResponse>(result.body(), result.response()));
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse> listByWorkspaceDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken>() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
+ /**
+ * Gets the first page of data source instances in a workspace with the link to the next page.
+ *
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the PagedList<DataSourceInner> object if successful.
+ */
+ public PagedList listByWorkspaceNext(final String nextPageLink) {
+ ServiceResponse> response = listByWorkspaceNextSinglePageAsync(nextPageLink).toBlocking().single();
+ return new PagedList(response.body()) {
+ @Override
+ public Page nextPage(String nextPageLink) {
+ return listByWorkspaceNextSinglePageAsync(nextPageLink).toBlocking().single().body();
+ }
+ };
+ }
+
+ /**
+ * Gets the first page of data source instances in a workspace with the link to the next page.
+ *
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param serviceFuture the ServiceFuture object tracking the Retrofit calls
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture> listByWorkspaceNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) {
+ return AzureServiceFuture.fromPageResponse(
+ listByWorkspaceNextSinglePageAsync(nextPageLink),
+ new Func1>>>() {
+ @Override
+ public Observable>> call(String nextPageLink) {
+ return listByWorkspaceNextSinglePageAsync(nextPageLink);
+ }
+ },
+ serviceCallback);
+ }
+
+ /**
+ * Gets the first page of data source instances in a workspace with the link to the next page.
+ *
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<DataSourceInner> object
+ */
+ public Observable> listByWorkspaceNextAsync(final String nextPageLink) {
+ return listByWorkspaceNextWithServiceResponseAsync(nextPageLink)
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Gets the first page of data source instances in a workspace with the link to the next page.
+ *
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<DataSourceInner> object
+ */
+ public Observable>> listByWorkspaceNextWithServiceResponseAsync(final String nextPageLink) {
+ return listByWorkspaceNextSinglePageAsync(nextPageLink)
+ .concatMap(new Func1>, Observable>>>() {
+ @Override
+ public Observable>> call(ServiceResponse> page) {
+ String nextPageLink = page.body().nextPageLink();
+ if (nextPageLink == null) {
+ return Observable.just(page);
+ }
+ return Observable.just(page).concatWith(listByWorkspaceNextWithServiceResponseAsync(nextPageLink));
+ }
+ });
+ }
+
+ /**
+ * Gets the first page of data source instances in a workspace with the link to the next page.
+ *
+ ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the PagedList<DataSourceInner> object wrapped in {@link ServiceResponse} if successful.
+ */
+ public Observable>> listByWorkspaceNextSinglePageAsync(final String nextPageLink) {
+ if (nextPageLink == null) {
+ throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null.");
+ }
+ String nextUrl = String.format("%s", nextPageLink);
+ return service.listByWorkspaceNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>>() {
+ @Override
+ public Observable>> call(Response response) {
+ try {
+ ServiceResponse> result = listByWorkspaceNextDelegate(response);
+ return Observable.just(new ServiceResponse>(result.body(), result.response()));
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse> listByWorkspaceNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken>() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
+}
diff --git a/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/implementation/IdParsingUtils.java b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/implementation/IdParsingUtils.java
new file mode 100644
index 000000000000..bdb1228c2bb3
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/implementation/IdParsingUtils.java
@@ -0,0 +1,57 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.loganalytics.v2015_11_01_preview.implementation;
+import java.util.Arrays;
+import java.util.Iterator;
+
+class IdParsingUtils {
+ public static String getValueFromIdByName(String id, String name) {
+ if (id == null) {
+ return null;
+ }
+ Iterable iterable = Arrays.asList(id.split("/"));
+ Iterator itr = iterable.iterator();
+ while (itr.hasNext()) {
+ String part = itr.next();
+ if (part != null && part.trim() != "") {
+ if (part.equalsIgnoreCase(name)) {
+ if (itr.hasNext()) {
+ return itr.next();
+ } else {
+ return null;
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+ public static String getValueFromIdByPosition(String id, int pos) {
+ if (id == null) {
+ return null;
+ }
+ Iterable iterable = Arrays.asList(id.split("/"));
+ Iterator itr = iterable.iterator();
+ int index = 0;
+ while (itr.hasNext()) {
+ String part = itr.next();
+ if (part != null && part.trim() != "") {
+ if (index == pos) {
+ if (itr.hasNext()) {
+ return itr.next();
+ } else {
+ return null;
+ }
+ }
+ }
+ index++;
+ }
+ return null;
+ }
+}
diff --git a/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/implementation/IntelligencePackImpl.java b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/implementation/IntelligencePackImpl.java
new file mode 100644
index 000000000000..4158587cbcf2
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/implementation/IntelligencePackImpl.java
@@ -0,0 +1,45 @@
+/**
+ * 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.v2015_11_01_preview.implementation;
+
+import com.microsoft.azure.management.loganalytics.v2015_11_01_preview.IntelligencePack;
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import rx.Observable;
+
+class IntelligencePackImpl extends WrapperImpl implements IntelligencePack {
+ private final LogAnalyticsManager manager;
+
+ IntelligencePackImpl(IntelligencePackInner inner, LogAnalyticsManager manager) {
+ super(inner);
+ this.manager = manager;
+ }
+
+ @Override
+ public LogAnalyticsManager manager() {
+ return this.manager;
+ }
+
+
+
+ @Override
+ public String displayName() {
+ return this.inner().displayName();
+ }
+
+ @Override
+ public Boolean enabled() {
+ return this.inner().enabled();
+ }
+
+ @Override
+ public String name() {
+ return this.inner().name();
+ }
+
+}
diff --git a/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/implementation/IntelligencePackInner.java b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/implementation/IntelligencePackInner.java
new file mode 100644
index 000000000000..219ad96f3f56
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/implementation/IntelligencePackInner.java
@@ -0,0 +1,96 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.loganalytics.v2015_11_01_preview.implementation;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Intelligence Pack containing a string name and boolean indicating if it's
+ * enabled.
+ */
+public class IntelligencePackInner {
+ /**
+ * The name of the intelligence pack.
+ */
+ @JsonProperty(value = "name")
+ private String name;
+
+ /**
+ * The enabled boolean for the intelligence pack.
+ */
+ @JsonProperty(value = "enabled")
+ private Boolean enabled;
+
+ /**
+ * The display name of the intelligence pack.
+ */
+ @JsonProperty(value = "displayName")
+ private String displayName;
+
+ /**
+ * Get the name of the intelligence pack.
+ *
+ * @return the name value
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name of the intelligence pack.
+ *
+ * @param name the name value to set
+ * @return the IntelligencePackInner object itself.
+ */
+ public IntelligencePackInner withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the enabled boolean for the intelligence pack.
+ *
+ * @return the enabled value
+ */
+ public Boolean enabled() {
+ return this.enabled;
+ }
+
+ /**
+ * Set the enabled boolean for the intelligence pack.
+ *
+ * @param enabled the enabled value to set
+ * @return the IntelligencePackInner object itself.
+ */
+ public IntelligencePackInner withEnabled(Boolean enabled) {
+ this.enabled = enabled;
+ return this;
+ }
+
+ /**
+ * Get the display name of the intelligence pack.
+ *
+ * @return the displayName value
+ */
+ public String displayName() {
+ return this.displayName;
+ }
+
+ /**
+ * Set the display name of the intelligence pack.
+ *
+ * @param displayName the displayName value to set
+ * @return the IntelligencePackInner object itself.
+ */
+ public IntelligencePackInner withDisplayName(String displayName) {
+ this.displayName = displayName;
+ return this;
+ }
+
+}
diff --git a/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/implementation/LinkedServiceImpl.java b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/implementation/LinkedServiceImpl.java
new file mode 100644
index 000000000000..51ef197dd97b
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/implementation/LinkedServiceImpl.java
@@ -0,0 +1,117 @@
+/**
+ * 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.v2015_11_01_preview.implementation;
+
+import com.microsoft.azure.management.loganalytics.v2015_11_01_preview.LinkedService;
+import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl;
+import rx.Observable;
+import java.util.Map;
+
+class LinkedServiceImpl extends CreatableUpdatableImpl implements LinkedService, LinkedService.Definition, LinkedService.Update {
+ private final LogAnalyticsManager manager;
+ private String resourceGroupName;
+ private String workspaceName;
+ private String linkedServiceName;
+
+ LinkedServiceImpl(String name, LogAnalyticsManager manager) {
+ super(name, new LinkedServiceInner());
+ this.manager = manager;
+ // Set resource name
+ this.linkedServiceName = name;
+ //
+ }
+
+ LinkedServiceImpl(LinkedServiceInner inner, LogAnalyticsManager manager) {
+ super(inner.name(), inner);
+ this.manager = manager;
+ // Set resource name
+ this.linkedServiceName = inner.name();
+ // set resource ancestor and positional variables
+ this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourcegroups");
+ this.workspaceName = IdParsingUtils.getValueFromIdByName(inner.id(), "workspaces");
+ this.linkedServiceName = IdParsingUtils.getValueFromIdByName(inner.id(), "linkedServices");
+ //
+ }
+
+ @Override
+ public LogAnalyticsManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public Observable createResourceAsync() {
+ LinkedServicesInner client = this.manager().inner().linkedServices();
+ return client.createOrUpdateAsync(this.resourceGroupName, this.workspaceName, this.linkedServiceName, this.inner())
+ .map(innerToFluentMap(this));
+ }
+
+ @Override
+ public Observable updateResourceAsync() {
+ LinkedServicesInner client = this.manager().inner().linkedServices();
+ return client.createOrUpdateAsync(this.resourceGroupName, this.workspaceName, this.linkedServiceName, this.inner())
+ .map(innerToFluentMap(this));
+ }
+
+ @Override
+ protected Observable getInnerAsync() {
+ LinkedServicesInner client = this.manager().inner().linkedServices();
+ return client.getAsync(this.resourceGroupName, this.workspaceName, this.linkedServiceName);
+ }
+
+ @Override
+ public boolean isInCreateMode() {
+ return this.inner().id() == null;
+ }
+
+
+ @Override
+ public String id() {
+ return this.inner().id();
+ }
+
+ @Override
+ public String name() {
+ return this.inner().name();
+ }
+
+ @Override
+ public String resourceId() {
+ return this.inner().resourceId();
+ }
+
+ @Override
+ public Map tags() {
+ return this.inner().tags();
+ }
+
+ @Override
+ public String type() {
+ return this.inner().type();
+ }
+
+ @Override
+ public LinkedServiceImpl withExistingWorkspace(String resourceGroupName, String workspaceName) {
+ this.resourceGroupName = resourceGroupName;
+ this.workspaceName = workspaceName;
+ return this;
+ }
+
+ @Override
+ public LinkedServiceImpl withResourceId(String resourceId) {
+ this.inner().withResourceId(resourceId);
+ return this;
+ }
+
+ @Override
+ public LinkedServiceImpl withTags(Map tags) {
+ this.inner().withTags(tags);
+ return this;
+ }
+
+}
diff --git a/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/implementation/LinkedServiceInner.java b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/implementation/LinkedServiceInner.java
new file mode 100644
index 000000000000..1b74ec254f08
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/implementation/LinkedServiceInner.java
@@ -0,0 +1,73 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.loganalytics.v2015_11_01_preview.implementation;
+
+import java.util.Map;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.rest.serializer.JsonFlatten;
+import com.microsoft.azure.ProxyResource;
+
+/**
+ * The top level Linked service resource container.
+ */
+@JsonFlatten
+public class LinkedServiceInner extends ProxyResource {
+ /**
+ * The resource id of the resource that will be linked to the workspace.
+ */
+ @JsonProperty(value = "properties.resourceId", required = true)
+ private String resourceId;
+
+ /**
+ * Resource tags.
+ */
+ @JsonProperty(value = "tags")
+ private Map tags;
+
+ /**
+ * Get the resource id of the resource that will be linked to the workspace.
+ *
+ * @return the resourceId value
+ */
+ public String resourceId() {
+ return this.resourceId;
+ }
+
+ /**
+ * Set the resource id of the resource that will be linked to the workspace.
+ *
+ * @param resourceId the resourceId value to set
+ * @return the LinkedServiceInner object itself.
+ */
+ public LinkedServiceInner withResourceId(String resourceId) {
+ this.resourceId = resourceId;
+ 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 LinkedServiceInner object itself.
+ */
+ public LinkedServiceInner withTags(Map tags) {
+ this.tags = tags;
+ return this;
+ }
+
+}
diff --git a/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/implementation/LinkedServicesImpl.java b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/implementation/LinkedServicesImpl.java
new file mode 100644
index 000000000000..e6128322bd32
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/implementation/LinkedServicesImpl.java
@@ -0,0 +1,85 @@
+/**
+ * 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.v2015_11_01_preview.implementation;
+
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import com.microsoft.azure.management.loganalytics.v2015_11_01_preview.LinkedServices;
+import rx.Completable;
+import rx.Observable;
+import rx.functions.Func1;
+import java.util.List;
+import com.microsoft.azure.management.loganalytics.v2015_11_01_preview.LinkedService;
+
+class LinkedServicesImpl extends WrapperImpl implements LinkedServices {
+ private final LogAnalyticsManager manager;
+
+ LinkedServicesImpl(LogAnalyticsManager manager) {
+ super(manager.inner().linkedServices());
+ this.manager = manager;
+ }
+
+ public LogAnalyticsManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public LinkedServiceImpl define(String name) {
+ return wrapModel(name);
+ }
+
+ private LinkedServiceImpl wrapModel(LinkedServiceInner inner) {
+ return new LinkedServiceImpl(inner, manager());
+ }
+
+ private LinkedServiceImpl wrapModel(String name) {
+ return new LinkedServiceImpl(name, this.manager());
+ }
+
+ @Override
+ public Observable listByWorkspaceAsync(String resourceGroupName, String workspaceName) {
+ LinkedServicesInner client = this.inner();
+ return client.listByWorkspaceAsync(resourceGroupName, workspaceName)
+ .flatMap(new Func1, Observable>() {
+ @Override
+ public Observable call(List innerList) {
+ return Observable.from(innerList);
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public LinkedService call(LinkedServiceInner inner) {
+ return wrapModel(inner);
+ }
+ });
+ }
+
+ @Override
+ public Observable getAsync(String resourceGroupName, String workspaceName, String linkedServiceName) {
+ LinkedServicesInner client = this.inner();
+ return client.getAsync(resourceGroupName, workspaceName, linkedServiceName)
+ .flatMap(new Func1>() {
+ @Override
+ public Observable call(LinkedServiceInner inner) {
+ if (inner == null) {
+ return Observable.empty();
+ } else {
+ return Observable.just((LinkedService)wrapModel(inner));
+ }
+ }
+ });
+ }
+
+ @Override
+ public Completable deleteAsync(String resourceGroupName, String workspaceName, String linkedServiceName) {
+ LinkedServicesInner client = this.inner();
+ return client.deleteAsync(resourceGroupName, workspaceName, linkedServiceName).toCompletable();
+ }
+
+}
diff --git a/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/implementation/LinkedServicesInner.java b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/implementation/LinkedServicesInner.java
new file mode 100644
index 000000000000..7dbe755d9e91
--- /dev/null
+++ b/sdk/loganalytics/mgmt-v2015_11_01_preview/src/main/java/com/microsoft/azure/management/loganalytics/v2015_11_01_preview/implementation/LinkedServicesInner.java
@@ -0,0 +1,456 @@
+/**
+ * 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.v2015_11_01_preview.implementation;
+
+import retrofit2.Retrofit;
+import com.google.common.reflect.TypeToken;
+import com.microsoft.azure.CloudException;
+import com.microsoft.rest.ServiceCallback;
+import com.microsoft.rest.ServiceFuture;
+import com.microsoft.rest.ServiceResponse;
+import 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.Path;
+import retrofit2.http.PUT;
+import retrofit2.http.Query;
+import retrofit2.Response;
+import rx.functions.Func1;
+import rx.Observable;
+
+/**
+ * An instance of this class provides access to all the operations defined
+ * in LinkedServices.
+ */
+public class LinkedServicesInner {
+ /** The Retrofit service to perform REST calls. */
+ private LinkedServicesService service;
+ /** The service client containing this operation class. */
+ private OperationalInsightsManagementClientImpl client;
+
+ /**
+ * Initializes an instance of LinkedServicesInner.
+ *
+ * @param retrofit the Retrofit instance built from a Retrofit Builder.
+ * @param client the instance of the service client containing this operation class.
+ */
+ public LinkedServicesInner(Retrofit retrofit, OperationalInsightsManagementClientImpl client) {
+ this.service = retrofit.create(LinkedServicesService.class);
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for LinkedServices to be
+ * used by Retrofit to perform actually REST calls.
+ */
+ interface LinkedServicesService {
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.loganalytics.v2015_11_01_preview.LinkedServices createOrUpdate" })
+ @PUT("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices/{linkedServiceName}")
+ Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("linkedServiceName") String linkedServiceName, @Path("subscriptionId") String subscriptionId, @Body LinkedServiceInner 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.v2015_11_01_preview.LinkedServices delete" })
+ @HTTP(path = "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices/{linkedServiceName}", method = "DELETE", hasBody = true)
+ Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("linkedServiceName") String linkedServiceName, @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.v2015_11_01_preview.LinkedServices get" })
+ @GET("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices/{linkedServiceName}")
+ Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("linkedServiceName") String linkedServiceName, @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.v2015_11_01_preview.LinkedServices listByWorkspace" })
+ @GET("subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices")
+ Observable> listByWorkspace(@Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ }
+
+ /**
+ * Create or update a linked service.
+ *
+ * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
+ * @param workspaceName Name of the Log Analytics Workspace that will contain the linkedServices resource
+ * @param linkedServiceName Name of the linkedServices resource
+ * @param parameters The parameters required to create or update a linked service.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the LinkedServiceInner object if successful.
+ */
+ public LinkedServiceInner createOrUpdate(String resourceGroupName, String workspaceName, String linkedServiceName, LinkedServiceInner parameters) {
+ return createOrUpdateWithServiceResponseAsync(resourceGroupName, workspaceName, linkedServiceName, parameters).toBlocking().single().body();
+ }
+
+ /**
+ * Create or update a linked service.
+ *
+ * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
+ * @param workspaceName Name of the Log Analytics Workspace that will contain the linkedServices resource
+ * @param linkedServiceName Name of the linkedServices resource
+ * @param parameters The parameters required to create or update a linked service.
+ * @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 workspaceName, String linkedServiceName, LinkedServiceInner parameters, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, workspaceName, linkedServiceName, parameters), serviceCallback);
+ }
+
+ /**
+ * Create or update a linked service.
+ *
+ * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
+ * @param workspaceName Name of the Log Analytics Workspace that will contain the linkedServices resource
+ * @param linkedServiceName Name of the linkedServices resource
+ * @param parameters The parameters required to create or update a linked service.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the LinkedServiceInner object
+ */
+ public Observable