diff --git a/sdk/workloadmonitor/mgmt-v2018_08_31_preview/pom.xml b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/pom.xml
new file mode 100644
index 000000000000..a2c7313e8619
--- /dev/null
+++ b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/pom.xml
@@ -0,0 +1,135 @@
+
+
+ 4.0.0
+ com.microsoft.azure.workloadmonitor.v2018_08_31_preview
+
+ com.microsoft.azure
+ azure-arm-parent
+ 1.1.0
+ ../../../pom.management.xml
+
+ azure-mgmt-workloadmonitor
+ 1.0.0-beta
+ jar
+ Microsoft Azure SDK for WorkloadMonitor Management
+ This package contains Microsoft WorkloadMonitor 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/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/AlertGeneration.java b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/AlertGeneration.java
new file mode 100644
index 000000000000..07bee7f242cf
--- /dev/null
+++ b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/AlertGeneration.java
@@ -0,0 +1,41 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.workloadmonitor.v2018_08_31_preview;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for AlertGeneration.
+ */
+public final class AlertGeneration extends ExpandableStringEnum {
+ /** Static value Enabled for AlertGeneration. */
+ public static final AlertGeneration ENABLED = fromString("Enabled");
+
+ /** Static value Disabled for AlertGeneration. */
+ public static final AlertGeneration DISABLED = fromString("Disabled");
+
+ /**
+ * Creates or finds a AlertGeneration from its string representation.
+ * @param name a name to look for
+ * @return the corresponding AlertGeneration
+ */
+ @JsonCreator
+ public static AlertGeneration fromString(String name) {
+ return fromString(name, AlertGeneration.class);
+ }
+
+ /**
+ * @return known AlertGeneration values
+ */
+ public static Collection values() {
+ return values(AlertGeneration.class);
+ }
+}
diff --git a/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/AzureEntityResource.java b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/AzureEntityResource.java
new file mode 100644
index 000000000000..9644fcb969bb
--- /dev/null
+++ b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/AzureEntityResource.java
@@ -0,0 +1,34 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.workloadmonitor.v2018_08_31_preview;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.azure.ProxyResource;
+
+/**
+ * The resource model definition for a Azure Resource Manager resource with an
+ * etag.
+ */
+public class AzureEntityResource extends ProxyResource {
+ /**
+ * Resource Etag.
+ */
+ @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY)
+ private String etag;
+
+ /**
+ * Get resource Etag.
+ *
+ * @return the etag value
+ */
+ public String etag() {
+ return this.etag;
+ }
+
+}
diff --git a/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/Component.java b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/Component.java
new file mode 100644
index 000000000000..b0270d586e35
--- /dev/null
+++ b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/Component.java
@@ -0,0 +1,128 @@
+/**
+ * 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.workloadmonitor.v2018_08_31_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.workloadmonitor.v2018_08_31_preview.implementation.WorkloadMonitorManager;
+import com.microsoft.azure.management.workloadmonitor.v2018_08_31_preview.implementation.ComponentInner;
+import java.util.Map;
+import java.util.List;
+import org.joda.time.DateTime;
+
+/**
+ * Type representing Component.
+ */
+public interface Component extends HasInner, HasManager {
+ /**
+ * @return the aggregateProperties value.
+ */
+ Map aggregateProperties();
+
+ /**
+ * @return the children value.
+ */
+ List children();
+
+ /**
+ * @return the componentName value.
+ */
+ String componentName();
+
+ /**
+ * @return the componentTypeGroupCategory value.
+ */
+ String componentTypeGroupCategory();
+
+ /**
+ * @return the componentTypeId value.
+ */
+ String componentTypeId();
+
+ /**
+ * @return the componentTypeName value.
+ */
+ String componentTypeName();
+
+ /**
+ * @return the etag value.
+ */
+ String etag();
+
+ /**
+ * @return the healthState value.
+ */
+ HealthState healthState();
+
+ /**
+ * @return the healthStateCategory value.
+ */
+ HealthStateCategory healthStateCategory();
+
+ /**
+ * @return the healthStateChangesEndTime value.
+ */
+ DateTime healthStateChangesEndTime();
+
+ /**
+ * @return the healthStateChangesStartTime value.
+ */
+ DateTime healthStateChangesStartTime();
+
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the lastHealthStateChangeTime value.
+ */
+ DateTime lastHealthStateChangeTime();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the solutionId value.
+ */
+ String solutionId();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * @return the vmId value.
+ */
+ String vmId();
+
+ /**
+ * @return the vmName value.
+ */
+ String vmName();
+
+ /**
+ * @return the vmTags value.
+ */
+ Map vmTags();
+
+ /**
+ * @return the workloadType value.
+ */
+ WorkloadType workloadType();
+
+ /**
+ * @return the workspaceId value.
+ */
+ String workspaceId();
+
+}
diff --git a/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/Components.java b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/Components.java
new file mode 100644
index 000000000000..007fb1f3fdc3
--- /dev/null
+++ b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/Components.java
@@ -0,0 +1,43 @@
+/**
+ * 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.workloadmonitor.v2018_08_31_preview;
+
+import rx.Observable;
+import java.util.UUID;
+
+/**
+ * Type representing Components.
+ */
+public interface Components {
+ /**
+ * Get list of components for a resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceNamespace The Namespace of the resource.
+ * @param resourceType The type of the resource.
+ * @param resourceName Name of the resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listByResourceAsync(final String resourceGroupName, final String resourceNamespace, final String resourceType, final String resourceName);
+
+ /**
+ * Get details of a component.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceNamespace The Namespace of the resource.
+ * @param resourceType The type of the resource.
+ * @param resourceName Name of the resource.
+ * @param componentId Component Id.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAsync(String resourceGroupName, String resourceNamespace, String resourceType, String resourceName, UUID componentId);
+
+}
diff --git a/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/ComponentsSummarys.java b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/ComponentsSummarys.java
new file mode 100644
index 000000000000..3bbfc08d62fa
--- /dev/null
+++ b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/ComponentsSummarys.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.workloadmonitor.v2018_08_31_preview;
+
+import rx.Observable;
+import com.microsoft.azure.management.workloadmonitor.v2018_08_31_preview.implementation.ComponentsSummarysInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing ComponentsSummarys.
+ */
+public interface ComponentsSummarys extends HasInner {
+ /**
+ * Get subscription wide details of components.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listAsync();
+
+}
diff --git a/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/ErrorFieldContract.java b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/ErrorFieldContract.java
new file mode 100644
index 000000000000..0db39d629dbb
--- /dev/null
+++ b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/ErrorFieldContract.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.workloadmonitor.v2018_08_31_preview;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Error field contract.
+ */
+public class ErrorFieldContract {
+ /**
+ * Property level error code.
+ */
+ @JsonProperty(value = "code")
+ private String code;
+
+ /**
+ * Human-readable representation of property-level error.
+ */
+ @JsonProperty(value = "message")
+ private String message;
+
+ /**
+ * Property name.
+ */
+ @JsonProperty(value = "target")
+ private String target;
+
+ /**
+ * Get property level error code.
+ *
+ * @return the code value
+ */
+ public String code() {
+ return this.code;
+ }
+
+ /**
+ * Set property level error code.
+ *
+ * @param code the code value to set
+ * @return the ErrorFieldContract object itself.
+ */
+ public ErrorFieldContract withCode(String code) {
+ this.code = code;
+ return this;
+ }
+
+ /**
+ * Get human-readable representation of property-level error.
+ *
+ * @return the message value
+ */
+ public String message() {
+ return this.message;
+ }
+
+ /**
+ * Set human-readable representation of property-level error.
+ *
+ * @param message the message value to set
+ * @return the ErrorFieldContract object itself.
+ */
+ public ErrorFieldContract withMessage(String message) {
+ this.message = message;
+ return this;
+ }
+
+ /**
+ * Get property name.
+ *
+ * @return the target value
+ */
+ public String target() {
+ return this.target;
+ }
+
+ /**
+ * Set property name.
+ *
+ * @param target the target value to set
+ * @return the ErrorFieldContract object itself.
+ */
+ public ErrorFieldContract withTarget(String target) {
+ this.target = target;
+ return this;
+ }
+
+}
diff --git a/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/ErrorResponse.java b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/ErrorResponse.java
new file mode 100644
index 000000000000..cb71ac127f61
--- /dev/null
+++ b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/ErrorResponse.java
@@ -0,0 +1,97 @@
+/**
+ * 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.workloadmonitor.v2018_08_31_preview;
+
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Error body contract.
+ */
+public class ErrorResponse {
+ /**
+ * Service-defined error code. This code serves as a sub-status for the
+ * HTTP error code specified in the response.
+ */
+ @JsonProperty(value = "code")
+ private String code;
+
+ /**
+ * Human-readable representation of the error.
+ */
+ @JsonProperty(value = "message")
+ private String message;
+
+ /**
+ * The list of invalid fields send in request, in case of validation error.
+ */
+ @JsonProperty(value = "details")
+ private List details;
+
+ /**
+ * Get service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.
+ *
+ * @return the code value
+ */
+ public String code() {
+ return this.code;
+ }
+
+ /**
+ * Set service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.
+ *
+ * @param code the code value to set
+ * @return the ErrorResponse object itself.
+ */
+ public ErrorResponse withCode(String code) {
+ this.code = code;
+ return this;
+ }
+
+ /**
+ * Get human-readable representation of the error.
+ *
+ * @return the message value
+ */
+ public String message() {
+ return this.message;
+ }
+
+ /**
+ * Set human-readable representation of the error.
+ *
+ * @param message the message value to set
+ * @return the ErrorResponse object itself.
+ */
+ public ErrorResponse withMessage(String message) {
+ this.message = message;
+ return this;
+ }
+
+ /**
+ * Get the list of invalid fields send in request, in case of validation error.
+ *
+ * @return the details value
+ */
+ public List details() {
+ return this.details;
+ }
+
+ /**
+ * Set the list of invalid fields send in request, in case of validation error.
+ *
+ * @param details the details value to set
+ * @return the ErrorResponse object itself.
+ */
+ public ErrorResponse withDetails(List details) {
+ this.details = details;
+ return this;
+ }
+
+}
diff --git a/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/ErrorResponseException.java b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/ErrorResponseException.java
new file mode 100644
index 000000000000..d2a618d5111c
--- /dev/null
+++ b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/ErrorResponseException.java
@@ -0,0 +1,44 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.workloadmonitor.v2018_08_31_preview;
+
+import com.microsoft.rest.RestException;
+import okhttp3.ResponseBody;
+import retrofit2.Response;
+
+/**
+ * Exception thrown for an invalid response with ErrorResponse information.
+ */
+public class ErrorResponseException extends RestException {
+ /**
+ * Initializes a new instance of the ErrorResponseException class.
+ *
+ * @param message the exception message or the response content if a message is not available
+ * @param response the HTTP response
+ */
+ public ErrorResponseException(final String message, final Response response) {
+ super(message, response);
+ }
+
+ /**
+ * Initializes a new instance of the ErrorResponseException class.
+ *
+ * @param message the exception message or the response content if a message is not available
+ * @param response the HTTP response
+ * @param body the deserialized response body
+ */
+ public ErrorResponseException(final String message, final Response response, final ErrorResponse body) {
+ super(message, response, body);
+ }
+
+ @Override
+ public ErrorResponse body() {
+ return (ErrorResponse) super.body();
+ }
+}
diff --git a/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/HealthState.java b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/HealthState.java
new file mode 100644
index 000000000000..9129e594ab7e
--- /dev/null
+++ b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/HealthState.java
@@ -0,0 +1,62 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.workloadmonitor.v2018_08_31_preview;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Defines values for HealthState.
+ */
+public enum HealthState {
+ /** Enum value Error. */
+ ERROR("Error"),
+
+ /** Enum value Warning. */
+ WARNING("Warning"),
+
+ /** Enum value Success. */
+ SUCCESS("Success"),
+
+ /** Enum value Unknown. */
+ UNKNOWN("Unknown"),
+
+ /** Enum value Uninitialized. */
+ UNINITIALIZED("Uninitialized");
+
+ /** The actual serialized value for a HealthState instance. */
+ private String value;
+
+ HealthState(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Parses a serialized value to a HealthState instance.
+ *
+ * @param value the serialized value to parse.
+ * @return the parsed HealthState object, or null if unable to parse.
+ */
+ @JsonCreator
+ public static HealthState fromString(String value) {
+ HealthState[] items = HealthState.values();
+ for (HealthState item : items) {
+ if (item.toString().equalsIgnoreCase(value)) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ @JsonValue
+ @Override
+ public String toString() {
+ return this.value;
+ }
+}
diff --git a/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/HealthStateCategory.java b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/HealthStateCategory.java
new file mode 100644
index 000000000000..b8d721b4339d
--- /dev/null
+++ b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/HealthStateCategory.java
@@ -0,0 +1,41 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.workloadmonitor.v2018_08_31_preview;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for HealthStateCategory.
+ */
+public final class HealthStateCategory extends ExpandableStringEnum {
+ /** Static value Identity for HealthStateCategory. */
+ public static final HealthStateCategory IDENTITY = fromString("Identity");
+
+ /** Static value CustomGroup for HealthStateCategory. */
+ public static final HealthStateCategory CUSTOM_GROUP = fromString("CustomGroup");
+
+ /**
+ * Creates or finds a HealthStateCategory from its string representation.
+ * @param name a name to look for
+ * @return the corresponding HealthStateCategory
+ */
+ @JsonCreator
+ public static HealthStateCategory fromString(String name) {
+ return fromString(name, HealthStateCategory.class);
+ }
+
+ /**
+ * @return known HealthStateCategory values
+ */
+ public static Collection values() {
+ return values(HealthStateCategory.class);
+ }
+}
diff --git a/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/HealthStateChange.java b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/HealthStateChange.java
new file mode 100644
index 000000000000..982196aa3bc6
--- /dev/null
+++ b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/HealthStateChange.java
@@ -0,0 +1,49 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.workloadmonitor.v2018_08_31_preview;
+
+import org.joda.time.DateTime;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Model for health state change.
+ */
+public class HealthStateChange {
+ /**
+ * Health state of monitor instance. Possible values include: 'Error',
+ * 'Warning', 'Success', 'Unknown', 'Uninitialized'.
+ */
+ @JsonProperty(value = "healthState", access = JsonProperty.Access.WRITE_ONLY)
+ private HealthState healthState;
+
+ /**
+ * Time at which this Health state was reached.
+ */
+ @JsonProperty(value = "healthStateChangeTime", access = JsonProperty.Access.WRITE_ONLY)
+ private DateTime healthStateChangeTime;
+
+ /**
+ * Get health state of monitor instance. Possible values include: 'Error', 'Warning', 'Success', 'Unknown', 'Uninitialized'.
+ *
+ * @return the healthState value
+ */
+ public HealthState healthState() {
+ return this.healthState;
+ }
+
+ /**
+ * Get time at which this Health state was reached.
+ *
+ * @return the healthStateChangeTime value
+ */
+ public DateTime healthStateChangeTime() {
+ return this.healthStateChangeTime;
+ }
+
+}
diff --git a/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/Monitor.java b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/Monitor.java
new file mode 100644
index 000000000000..116f45f33a83
--- /dev/null
+++ b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/Monitor.java
@@ -0,0 +1,150 @@
+/**
+ * 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.workloadmonitor.v2018_08_31_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.workloadmonitor.v2018_08_31_preview.implementation.MonitorInner;
+import com.microsoft.azure.arm.model.Indexable;
+import com.microsoft.azure.arm.model.Updatable;
+import com.microsoft.azure.arm.model.Appliable;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.workloadmonitor.v2018_08_31_preview.implementation.WorkloadMonitorManager;
+import java.util.List;
+
+/**
+ * Type representing Monitor.
+ */
+public interface Monitor extends HasInner, Indexable, Updatable, HasManager {
+ /**
+ * @return the alertGeneration value.
+ */
+ AlertGeneration alertGeneration();
+
+ /**
+ * @return the componentTypeDisplayName value.
+ */
+ String componentTypeDisplayName();
+
+ /**
+ * @return the componentTypeId value.
+ */
+ String componentTypeId();
+
+ /**
+ * @return the componentTypeName value.
+ */
+ String componentTypeName();
+
+ /**
+ * @return the criteria value.
+ */
+ List criteria();
+
+ /**
+ * @return the description value.
+ */
+ String description();
+
+ /**
+ * @return the documentationURL value.
+ */
+ String documentationURL();
+
+ /**
+ * @return the etag value.
+ */
+ String etag();
+
+ /**
+ * @return the frequency value.
+ */
+ Integer frequency();
+
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the lookbackDuration value.
+ */
+ Integer lookbackDuration();
+
+ /**
+ * @return the monitorCategory value.
+ */
+ MonitorCategory monitorCategory();
+
+ /**
+ * @return the monitorDisplayName value.
+ */
+ String monitorDisplayName();
+
+ /**
+ * @return the monitorId value.
+ */
+ String monitorId();
+
+ /**
+ * @return the monitorName value.
+ */
+ String monitorName();
+
+ /**
+ * @return the monitorState value.
+ */
+ MonitorState monitorState();
+
+ /**
+ * @return the monitorType value.
+ */
+ MonitorType monitorType();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the parentMonitorDisplayName value.
+ */
+ String parentMonitorDisplayName();
+
+ /**
+ * @return the parentMonitorName value.
+ */
+ String parentMonitorName();
+
+ /**
+ * @return the signalName value.
+ */
+ String signalName();
+
+ /**
+ * @return the signalType value.
+ */
+ String signalType();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * The template for a Monitor update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable {
+ }
+
+ /**
+ * Grouping of Monitor update stages.
+ */
+ interface UpdateStages {
+ }
+}
diff --git a/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/MonitorCategory.java b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/MonitorCategory.java
new file mode 100644
index 000000000000..a50d16e75b20
--- /dev/null
+++ b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/MonitorCategory.java
@@ -0,0 +1,62 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.workloadmonitor.v2018_08_31_preview;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Defines values for MonitorCategory.
+ */
+public enum MonitorCategory {
+ /** Enum value AvailabilityHealth. */
+ AVAILABILITY_HEALTH("AvailabilityHealth"),
+
+ /** Enum value Configuration. */
+ CONFIGURATION("Configuration"),
+
+ /** Enum value EntityHealth. */
+ ENTITY_HEALTH("EntityHealth"),
+
+ /** Enum value PerformanceHealth. */
+ PERFORMANCE_HEALTH("PerformanceHealth"),
+
+ /** Enum value Security. */
+ SECURITY("Security");
+
+ /** The actual serialized value for a MonitorCategory instance. */
+ private String value;
+
+ MonitorCategory(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Parses a serialized value to a MonitorCategory instance.
+ *
+ * @param value the serialized value to parse.
+ * @return the parsed MonitorCategory object, or null if unable to parse.
+ */
+ @JsonCreator
+ public static MonitorCategory fromString(String value) {
+ MonitorCategory[] items = MonitorCategory.values();
+ for (MonitorCategory item : items) {
+ if (item.toString().equalsIgnoreCase(value)) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ @JsonValue
+ @Override
+ public String toString() {
+ return this.value;
+ }
+}
diff --git a/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/MonitorCriteria.java b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/MonitorCriteria.java
new file mode 100644
index 000000000000..3f6c9fb50edd
--- /dev/null
+++ b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/MonitorCriteria.java
@@ -0,0 +1,65 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.workloadmonitor.v2018_08_31_preview;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Criteria for monitor configuration.
+ */
+public class MonitorCriteria {
+ /**
+ * Target health state of the criteria. Possible values include: 'Error',
+ * 'Warning', 'Success', 'Unknown', 'Uninitialized'.
+ */
+ @JsonProperty(value = "healthState", access = JsonProperty.Access.WRITE_ONLY)
+ private HealthState healthState;
+
+ /**
+ * Threshold value for this criteria.
+ */
+ @JsonProperty(value = "threshold", access = JsonProperty.Access.WRITE_ONLY)
+ private Double threshold;
+
+ /**
+ * Comparison enum on threshold of this criteria. Possible values include:
+ * 'Equals', 'GreaterThan', 'GreaterThanOrEqual', 'LessThan',
+ * 'LessThanOrEqual', 'NotEquals'.
+ */
+ @JsonProperty(value = "comparisonOperator", access = JsonProperty.Access.WRITE_ONLY)
+ private Operator comparisonOperator;
+
+ /**
+ * Get target health state of the criteria. Possible values include: 'Error', 'Warning', 'Success', 'Unknown', 'Uninitialized'.
+ *
+ * @return the healthState value
+ */
+ public HealthState healthState() {
+ return this.healthState;
+ }
+
+ /**
+ * Get threshold value for this criteria.
+ *
+ * @return the threshold value
+ */
+ public Double threshold() {
+ return this.threshold;
+ }
+
+ /**
+ * Get comparison enum on threshold of this criteria. Possible values include: 'Equals', 'GreaterThan', 'GreaterThanOrEqual', 'LessThan', 'LessThanOrEqual', 'NotEquals'.
+ *
+ * @return the comparisonOperator value
+ */
+ public Operator comparisonOperator() {
+ return this.comparisonOperator;
+ }
+
+}
diff --git a/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/MonitorInstance.java b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/MonitorInstance.java
new file mode 100644
index 000000000000..08b82c413b09
--- /dev/null
+++ b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/MonitorInstance.java
@@ -0,0 +1,143 @@
+/**
+ * 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.workloadmonitor.v2018_08_31_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.workloadmonitor.v2018_08_31_preview.implementation.WorkloadMonitorManager;
+import com.microsoft.azure.management.workloadmonitor.v2018_08_31_preview.implementation.MonitorInstanceInner;
+import java.util.Map;
+import java.util.List;
+import org.joda.time.DateTime;
+
+/**
+ * Type representing MonitorInstance.
+ */
+public interface MonitorInstance extends HasInner, HasManager {
+ /**
+ * @return the aggregateProperties value.
+ */
+ Map aggregateProperties();
+
+ /**
+ * @return the alertGeneration value.
+ */
+ AlertGeneration alertGeneration();
+
+ /**
+ * @return the children value.
+ */
+ List children();
+
+ /**
+ * @return the componentId value.
+ */
+ String componentId();
+
+ /**
+ * @return the componentName value.
+ */
+ String componentName();
+
+ /**
+ * @return the componentTypeId value.
+ */
+ String componentTypeId();
+
+ /**
+ * @return the componentTypeName value.
+ */
+ String componentTypeName();
+
+ /**
+ * @return the etag value.
+ */
+ String etag();
+
+ /**
+ * @return the healthState value.
+ */
+ HealthState healthState();
+
+ /**
+ * @return the healthStateCategory value.
+ */
+ HealthStateCategory healthStateCategory();
+
+ /**
+ * @return the healthStateChanges value.
+ */
+ List healthStateChanges();
+
+ /**
+ * @return the healthStateChangesEndTime value.
+ */
+ DateTime healthStateChangesEndTime();
+
+ /**
+ * @return the healthStateChangesStartTime value.
+ */
+ DateTime healthStateChangesStartTime();
+
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the lastHealthStateChangeTime value.
+ */
+ DateTime lastHealthStateChangeTime();
+
+ /**
+ * @return the monitorCategory value.
+ */
+ MonitorCategory monitorCategory();
+
+ /**
+ * @return the monitorId value.
+ */
+ String monitorId();
+
+ /**
+ * @return the monitorName value.
+ */
+ String monitorName();
+
+ /**
+ * @return the monitorType value.
+ */
+ MonitorType monitorType();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the solutionId value.
+ */
+ String solutionId();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * @return the workloadType value.
+ */
+ WorkloadType workloadType();
+
+ /**
+ * @return the workspaceId value.
+ */
+ String workspaceId();
+
+}
diff --git a/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/MonitorInstances.java b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/MonitorInstances.java
new file mode 100644
index 000000000000..f5664cf55776
--- /dev/null
+++ b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/MonitorInstances.java
@@ -0,0 +1,43 @@
+/**
+ * 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.workloadmonitor.v2018_08_31_preview;
+
+import rx.Observable;
+import java.util.UUID;
+
+/**
+ * Type representing MonitorInstances.
+ */
+public interface MonitorInstances {
+ /**
+ * Get list of monitor instances for a resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceNamespace The Namespace of the resource.
+ * @param resourceType The type of the resource.
+ * @param resourceName Name of the resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listByResourceAsync(final String resourceGroupName, final String resourceNamespace, final String resourceType, final String resourceName);
+
+ /**
+ * Get details of a monitorInstance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceNamespace The Namespace of the resource.
+ * @param resourceType The type of the resource.
+ * @param resourceName Name of the resource.
+ * @param monitorInstanceId MonitorInstance Id.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAsync(String resourceGroupName, String resourceNamespace, String resourceType, String resourceName, UUID monitorInstanceId);
+
+}
diff --git a/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/MonitorInstancesSummarys.java b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/MonitorInstancesSummarys.java
new file mode 100644
index 000000000000..95080795a93f
--- /dev/null
+++ b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/MonitorInstancesSummarys.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.workloadmonitor.v2018_08_31_preview;
+
+import rx.Observable;
+import com.microsoft.azure.management.workloadmonitor.v2018_08_31_preview.implementation.MonitorInstancesSummarysInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing MonitorInstancesSummarys.
+ */
+public interface MonitorInstancesSummarys extends HasInner {
+ /**
+ * Get subscription wide health instances.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listAsync();
+
+}
diff --git a/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/MonitorState.java b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/MonitorState.java
new file mode 100644
index 000000000000..3619079b4f4b
--- /dev/null
+++ b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/MonitorState.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.workloadmonitor.v2018_08_31_preview;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Defines values for MonitorState.
+ */
+public enum MonitorState {
+ /** Enum value Enabled. */
+ ENABLED("Enabled"),
+
+ /** Enum value Disabled. */
+ DISABLED("Disabled");
+
+ /** The actual serialized value for a MonitorState instance. */
+ private String value;
+
+ MonitorState(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Parses a serialized value to a MonitorState instance.
+ *
+ * @param value the serialized value to parse.
+ * @return the parsed MonitorState object, or null if unable to parse.
+ */
+ @JsonCreator
+ public static MonitorState fromString(String value) {
+ MonitorState[] items = MonitorState.values();
+ for (MonitorState item : items) {
+ if (item.toString().equalsIgnoreCase(value)) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ @JsonValue
+ @Override
+ public String toString() {
+ return this.value;
+ }
+}
diff --git a/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/MonitorType.java b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/MonitorType.java
new file mode 100644
index 000000000000..08727b91dc06
--- /dev/null
+++ b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/MonitorType.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.workloadmonitor.v2018_08_31_preview;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Defines values for MonitorType.
+ */
+public enum MonitorType {
+ /** Enum value Aggregate. */
+ AGGREGATE("Aggregate"),
+
+ /** Enum value Dependency. */
+ DEPENDENCY("Dependency"),
+
+ /** Enum value Unit. */
+ UNIT("Unit");
+
+ /** The actual serialized value for a MonitorType instance. */
+ private String value;
+
+ MonitorType(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Parses a serialized value to a MonitorType instance.
+ *
+ * @param value the serialized value to parse.
+ * @return the parsed MonitorType object, or null if unable to parse.
+ */
+ @JsonCreator
+ public static MonitorType fromString(String value) {
+ MonitorType[] items = MonitorType.values();
+ for (MonitorType item : items) {
+ if (item.toString().equalsIgnoreCase(value)) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ @JsonValue
+ @Override
+ public String toString() {
+ return this.value;
+ }
+}
diff --git a/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/Monitors.java b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/Monitors.java
new file mode 100644
index 000000000000..b9b82eaf0ca6
--- /dev/null
+++ b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/Monitors.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.workloadmonitor.v2018_08_31_preview;
+
+import rx.Observable;
+import com.microsoft.azure.management.workloadmonitor.v2018_08_31_preview.implementation.MonitorsInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing Monitors.
+ */
+public interface Monitors extends HasInner {
+ /**
+ * Get list of a monitors of a resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceNamespace The Namespace of the resource.
+ * @param resourceType The type of the resource.
+ * @param resourceName Name of the resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listByResourceAsync(final String resourceGroupName, final String resourceNamespace, final String resourceType, final String resourceName);
+
+ /**
+ * Get details of a single monitor.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceNamespace The Namespace of the resource.
+ * @param resourceType The type of the resource.
+ * @param resourceName Name of the resource.
+ * @param monitorId Monitor Id.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAsync(String resourceGroupName, String resourceNamespace, String resourceType, String resourceName, String monitorId);
+
+}
diff --git a/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/NotificationSetting.java b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/NotificationSetting.java
new file mode 100644
index 000000000000..daabc0b5a14e
--- /dev/null
+++ b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/NotificationSetting.java
@@ -0,0 +1,60 @@
+/**
+ * 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.workloadmonitor.v2018_08_31_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.workloadmonitor.v2018_08_31_preview.implementation.NotificationSettingInner;
+import com.microsoft.azure.arm.model.Indexable;
+import com.microsoft.azure.arm.model.Updatable;
+import com.microsoft.azure.arm.model.Appliable;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.workloadmonitor.v2018_08_31_preview.implementation.WorkloadMonitorManager;
+import java.util.List;
+
+/**
+ * Type representing NotificationSetting.
+ */
+public interface NotificationSetting extends HasInner, Indexable, Updatable, HasManager {
+ /**
+ * @return the actionGroupResourceIds value.
+ */
+ List actionGroupResourceIds();
+
+ /**
+ * @return the etag value.
+ */
+ String etag();
+
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * The template for a NotificationSetting update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable {
+ }
+
+ /**
+ * Grouping of NotificationSetting update stages.
+ */
+ interface UpdateStages {
+ }
+}
diff --git a/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/NotificationSettings.java b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/NotificationSettings.java
new file mode 100644
index 000000000000..de4cf0523d1b
--- /dev/null
+++ b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/NotificationSettings.java
@@ -0,0 +1,43 @@
+/**
+ * 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.workloadmonitor.v2018_08_31_preview;
+
+import rx.Observable;
+import com.microsoft.azure.management.workloadmonitor.v2018_08_31_preview.implementation.NotificationSettingsInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing NotificationSettings.
+ */
+public interface NotificationSettings extends HasInner {
+ /**
+ * Get list of notification settings for a resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceNamespace The Namespace of the resource.
+ * @param resourceType The type of the resource.
+ * @param resourceName Name of the resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listByResourceAsync(final String resourceGroupName, final String resourceNamespace, final String resourceType, final String resourceName);
+
+ /**
+ * Get a of notification setting for a resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceNamespace The Namespace of the resource.
+ * @param resourceType The type of the resource.
+ * @param resourceName Name of the resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAsync(String resourceGroupName, String resourceNamespace, String resourceType, String resourceName);
+
+}
diff --git a/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/Operation.java b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/Operation.java
new file mode 100644
index 000000000000..fcd3d66deecb
--- /dev/null
+++ b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/Operation.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.workloadmonitor.v2018_08_31_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.workloadmonitor.v2018_08_31_preview.implementation.WorkloadMonitorManager;
+import com.microsoft.azure.management.workloadmonitor.v2018_08_31_preview.implementation.OperationInner;
+
+/**
+ * Type representing Operation.
+ */
+public interface Operation extends HasInner, HasManager {
+ /**
+ * @return the display value.
+ */
+ OperationProperties display();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the origin value.
+ */
+ String origin();
+
+}
diff --git a/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/OperationProperties.java b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/OperationProperties.java
new file mode 100644
index 000000000000..6b719601f8fe
--- /dev/null
+++ b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/OperationProperties.java
@@ -0,0 +1,77 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.workloadmonitor.v2018_08_31_preview;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Properties of an operation supported by the resource provider.
+ */
+public class OperationProperties {
+ /**
+ * The description of the resource provider.
+ */
+ @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY)
+ private String description;
+
+ /**
+ * This operation name.
+ */
+ @JsonProperty(value = "operation", access = JsonProperty.Access.WRITE_ONLY)
+ private String operation;
+
+ /**
+ * The provider name.
+ */
+ @JsonProperty(value = "provider", access = JsonProperty.Access.WRITE_ONLY)
+ private String provider;
+
+ /**
+ * The resource name.
+ */
+ @JsonProperty(value = "resource", access = JsonProperty.Access.WRITE_ONLY)
+ private String resource;
+
+ /**
+ * Get the description of the resource provider.
+ *
+ * @return the description value
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Get this operation name.
+ *
+ * @return the operation value
+ */
+ public String operation() {
+ return this.operation;
+ }
+
+ /**
+ * Get the provider name.
+ *
+ * @return the provider value
+ */
+ public String provider() {
+ return this.provider;
+ }
+
+ /**
+ * Get the resource name.
+ *
+ * @return the resource value
+ */
+ public String resource() {
+ return this.resource;
+ }
+
+}
diff --git a/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/Operations.java b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/Operations.java
new file mode 100644
index 000000000000..8e3d2d1a4a89
--- /dev/null
+++ b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_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.workloadmonitor.v2018_08_31_preview;
+
+import rx.Observable;
+import com.microsoft.azure.management.workloadmonitor.v2018_08_31_preview.implementation.OperationsInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing Operations.
+ */
+public interface Operations extends HasInner {
+ /**
+ * Gets the details of all operations possible on the resource provider.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listAsync();
+
+}
diff --git a/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/Operator.java b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/Operator.java
new file mode 100644
index 000000000000..0df6aa36b688
--- /dev/null
+++ b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/Operator.java
@@ -0,0 +1,65 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.workloadmonitor.v2018_08_31_preview;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Defines values for Operator.
+ */
+public enum Operator {
+ /** Enum value Equals. */
+ EQUALS("Equals"),
+
+ /** Enum value GreaterThan. */
+ GREATER_THAN("GreaterThan"),
+
+ /** Enum value GreaterThanOrEqual. */
+ GREATER_THAN_OR_EQUAL("GreaterThanOrEqual"),
+
+ /** Enum value LessThan. */
+ LESS_THAN("LessThan"),
+
+ /** Enum value LessThanOrEqual. */
+ LESS_THAN_OR_EQUAL("LessThanOrEqual"),
+
+ /** Enum value NotEquals. */
+ NOT_EQUALS("NotEquals");
+
+ /** The actual serialized value for a Operator instance. */
+ private String value;
+
+ Operator(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Parses a serialized value to a Operator instance.
+ *
+ * @param value the serialized value to parse.
+ * @return the parsed Operator object, or null if unable to parse.
+ */
+ @JsonCreator
+ public static Operator fromString(String value) {
+ Operator[] items = Operator.values();
+ for (Operator item : items) {
+ if (item.toString().equalsIgnoreCase(value)) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ @JsonValue
+ @Override
+ public String toString() {
+ return this.value;
+ }
+}
diff --git a/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/WorkloadType.java b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/WorkloadType.java
new file mode 100644
index 000000000000..73cd8880bb7e
--- /dev/null
+++ b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/WorkloadType.java
@@ -0,0 +1,47 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.workloadmonitor.v2018_08_31_preview;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for WorkloadType.
+ */
+public final class WorkloadType extends ExpandableStringEnum {
+ /** Static value BaseOS for WorkloadType. */
+ public static final WorkloadType BASE_OS = fromString("BaseOS");
+
+ /** Static value SQL for WorkloadType. */
+ public static final WorkloadType SQL = fromString("SQL");
+
+ /** Static value IIS for WorkloadType. */
+ public static final WorkloadType IIS = fromString("IIS");
+
+ /** Static value Apache for WorkloadType. */
+ public static final WorkloadType APACHE = fromString("Apache");
+
+ /**
+ * Creates or finds a WorkloadType from its string representation.
+ * @param name a name to look for
+ * @return the corresponding WorkloadType
+ */
+ @JsonCreator
+ public static WorkloadType fromString(String name) {
+ return fromString(name, WorkloadType.class);
+ }
+
+ /**
+ * @return known WorkloadType values
+ */
+ public static Collection values() {
+ return values(WorkloadType.class);
+ }
+}
diff --git a/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/implementation/ComponentImpl.java b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/implementation/ComponentImpl.java
new file mode 100644
index 000000000000..4f0416064078
--- /dev/null
+++ b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/implementation/ComponentImpl.java
@@ -0,0 +1,137 @@
+/**
+ * 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.workloadmonitor.v2018_08_31_preview.implementation;
+
+import com.microsoft.azure.management.workloadmonitor.v2018_08_31_preview.Component;
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import java.util.Map;
+import java.util.List;
+import com.microsoft.azure.management.workloadmonitor.v2018_08_31_preview.HealthState;
+import com.microsoft.azure.management.workloadmonitor.v2018_08_31_preview.HealthStateCategory;
+import org.joda.time.DateTime;
+import com.microsoft.azure.management.workloadmonitor.v2018_08_31_preview.WorkloadType;
+
+class ComponentImpl extends WrapperImpl implements Component {
+ private final WorkloadMonitorManager manager;
+ ComponentImpl(ComponentInner inner, WorkloadMonitorManager manager) {
+ super(inner);
+ this.manager = manager;
+ }
+
+ @Override
+ public WorkloadMonitorManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public Map aggregateProperties() {
+ return this.inner().aggregateProperties();
+ }
+
+ @Override
+ public List children() {
+ return this.inner().children();
+ }
+
+ @Override
+ public String componentName() {
+ return this.inner().componentName();
+ }
+
+ @Override
+ public String componentTypeGroupCategory() {
+ return this.inner().componentTypeGroupCategory();
+ }
+
+ @Override
+ public String componentTypeId() {
+ return this.inner().componentTypeId();
+ }
+
+ @Override
+ public String componentTypeName() {
+ return this.inner().componentTypeName();
+ }
+
+ @Override
+ public String etag() {
+ return this.inner().etag();
+ }
+
+ @Override
+ public HealthState healthState() {
+ return this.inner().healthState();
+ }
+
+ @Override
+ public HealthStateCategory healthStateCategory() {
+ return this.inner().healthStateCategory();
+ }
+
+ @Override
+ public DateTime healthStateChangesEndTime() {
+ return this.inner().healthStateChangesEndTime();
+ }
+
+ @Override
+ public DateTime healthStateChangesStartTime() {
+ return this.inner().healthStateChangesStartTime();
+ }
+
+ @Override
+ public String id() {
+ return this.inner().id();
+ }
+
+ @Override
+ public DateTime lastHealthStateChangeTime() {
+ return this.inner().lastHealthStateChangeTime();
+ }
+
+ @Override
+ public String name() {
+ return this.inner().name();
+ }
+
+ @Override
+ public String solutionId() {
+ return this.inner().solutionId();
+ }
+
+ @Override
+ public String type() {
+ return this.inner().type();
+ }
+
+ @Override
+ public String vmId() {
+ return this.inner().vmId();
+ }
+
+ @Override
+ public String vmName() {
+ return this.inner().vmName();
+ }
+
+ @Override
+ public Map vmTags() {
+ return this.inner().vmTags();
+ }
+
+ @Override
+ public WorkloadType workloadType() {
+ return this.inner().workloadType();
+ }
+
+ @Override
+ public String workspaceId() {
+ return this.inner().workspaceId();
+ }
+
+}
diff --git a/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/implementation/ComponentInner.java b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/implementation/ComponentInner.java
new file mode 100644
index 000000000000..0d0ec452ccf7
--- /dev/null
+++ b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/implementation/ComponentInner.java
@@ -0,0 +1,301 @@
+/**
+ * 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.workloadmonitor.v2018_08_31_preview.implementation;
+
+import com.microsoft.azure.management.workloadmonitor.v2018_08_31_preview.WorkloadType;
+import com.microsoft.azure.management.workloadmonitor.v2018_08_31_preview.HealthState;
+import com.microsoft.azure.management.workloadmonitor.v2018_08_31_preview.HealthStateCategory;
+import org.joda.time.DateTime;
+import java.util.Map;
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.rest.serializer.JsonFlatten;
+import com.microsoft.azure.ProxyResource;
+
+/**
+ * Model for component.
+ */
+@JsonFlatten
+public class ComponentInner extends ProxyResource {
+ /**
+ * For optimistic concurrency control.
+ */
+ @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY)
+ private String etag;
+
+ /**
+ * ID of the workspace.
+ */
+ @JsonProperty(value = "properties.workspaceId", access = JsonProperty.Access.WRITE_ONLY)
+ private String workspaceId;
+
+ /**
+ * ID of the OMS solution this component belong to.
+ */
+ @JsonProperty(value = "properties.solutionId", access = JsonProperty.Access.WRITE_ONLY)
+ private String solutionId;
+
+ /**
+ * Type of the workload. Possible values include: 'BaseOS', 'SQL', 'IIS',
+ * 'Apache'.
+ */
+ @JsonProperty(value = "properties.workloadType", access = JsonProperty.Access.WRITE_ONLY)
+ private WorkloadType workloadType;
+
+ /**
+ * Name of the component.
+ */
+ @JsonProperty(value = "properties.componentName", access = JsonProperty.Access.WRITE_ONLY)
+ private String componentName;
+
+ /**
+ * ID of the component type.
+ */
+ @JsonProperty(value = "properties.componentTypeId", access = JsonProperty.Access.WRITE_ONLY)
+ private String componentTypeId;
+
+ /**
+ * Name of the component type. Qualifies the type of component such as
+ * whether it is a SQL database, logical disk, website, etc.
+ */
+ @JsonProperty(value = "properties.componentTypeName", access = JsonProperty.Access.WRITE_ONLY)
+ private String componentTypeName;
+
+ /**
+ * Component type group category. Classification of component type groups
+ * into a logical category. e.g. Network, Disk, Memory, CPU.
+ */
+ @JsonProperty(value = "properties.componentTypeGroupCategory", access = JsonProperty.Access.WRITE_ONLY)
+ private String componentTypeGroupCategory;
+
+ /**
+ * Health state of the component. Possible values include: 'Error',
+ * 'Warning', 'Success', 'Unknown', 'Uninitialized'.
+ */
+ @JsonProperty(value = "properties.healthState", access = JsonProperty.Access.WRITE_ONLY)
+ private HealthState healthState;
+
+ /**
+ * Category of component's health state. Possible values include:
+ * 'Identity', 'CustomGroup'.
+ */
+ @JsonProperty(value = "properties.healthStateCategory", access = JsonProperty.Access.WRITE_ONLY)
+ private HealthStateCategory healthStateCategory;
+
+ /**
+ * Start time for health state changes.
+ */
+ @JsonProperty(value = "properties.healthStateChangesStartTime", access = JsonProperty.Access.WRITE_ONLY)
+ private DateTime healthStateChangesStartTime;
+
+ /**
+ * End time for health state changes.
+ */
+ @JsonProperty(value = "properties.healthStateChangesEndTime", access = JsonProperty.Access.WRITE_ONLY)
+ private DateTime healthStateChangesEndTime;
+
+ /**
+ * Time of last health state change.
+ */
+ @JsonProperty(value = "properties.lastHealthStateChangeTime", access = JsonProperty.Access.WRITE_ONLY)
+ private DateTime lastHealthStateChangeTime;
+
+ /**
+ * ID of the VM this component belongs to.
+ */
+ @JsonProperty(value = "properties.vmId", access = JsonProperty.Access.WRITE_ONLY)
+ private String vmId;
+
+ /**
+ * Name of the VM this component belongs to.
+ */
+ @JsonProperty(value = "properties.vmName", access = JsonProperty.Access.WRITE_ONLY)
+ private String vmName;
+
+ /**
+ * Tags on the VM this component belongs to.
+ */
+ @JsonProperty(value = "properties.vmTags", access = JsonProperty.Access.WRITE_ONLY)
+ private Map vmTags;
+
+ /**
+ * Properties requested in aggregation queries.
+ */
+ @JsonProperty(value = "properties.aggregateProperties", access = JsonProperty.Access.WRITE_ONLY)
+ private Map aggregateProperties;
+
+ /**
+ * component children.
+ */
+ @JsonProperty(value = "properties.children", access = JsonProperty.Access.WRITE_ONLY)
+ private List children;
+
+ /**
+ * Get for optimistic concurrency control.
+ *
+ * @return the etag value
+ */
+ public String etag() {
+ return this.etag;
+ }
+
+ /**
+ * Get iD of the workspace.
+ *
+ * @return the workspaceId value
+ */
+ public String workspaceId() {
+ return this.workspaceId;
+ }
+
+ /**
+ * Get iD of the OMS solution this component belong to.
+ *
+ * @return the solutionId value
+ */
+ public String solutionId() {
+ return this.solutionId;
+ }
+
+ /**
+ * Get type of the workload. Possible values include: 'BaseOS', 'SQL', 'IIS', 'Apache'.
+ *
+ * @return the workloadType value
+ */
+ public WorkloadType workloadType() {
+ return this.workloadType;
+ }
+
+ /**
+ * Get name of the component.
+ *
+ * @return the componentName value
+ */
+ public String componentName() {
+ return this.componentName;
+ }
+
+ /**
+ * Get iD of the component type.
+ *
+ * @return the componentTypeId value
+ */
+ public String componentTypeId() {
+ return this.componentTypeId;
+ }
+
+ /**
+ * Get name of the component type. Qualifies the type of component such as whether it is a SQL database, logical disk, website, etc.
+ *
+ * @return the componentTypeName value
+ */
+ public String componentTypeName() {
+ return this.componentTypeName;
+ }
+
+ /**
+ * Get component type group category. Classification of component type groups into a logical category. e.g. Network, Disk, Memory, CPU.
+ *
+ * @return the componentTypeGroupCategory value
+ */
+ public String componentTypeGroupCategory() {
+ return this.componentTypeGroupCategory;
+ }
+
+ /**
+ * Get health state of the component. Possible values include: 'Error', 'Warning', 'Success', 'Unknown', 'Uninitialized'.
+ *
+ * @return the healthState value
+ */
+ public HealthState healthState() {
+ return this.healthState;
+ }
+
+ /**
+ * Get category of component's health state. Possible values include: 'Identity', 'CustomGroup'.
+ *
+ * @return the healthStateCategory value
+ */
+ public HealthStateCategory healthStateCategory() {
+ return this.healthStateCategory;
+ }
+
+ /**
+ * Get start time for health state changes.
+ *
+ * @return the healthStateChangesStartTime value
+ */
+ public DateTime healthStateChangesStartTime() {
+ return this.healthStateChangesStartTime;
+ }
+
+ /**
+ * Get end time for health state changes.
+ *
+ * @return the healthStateChangesEndTime value
+ */
+ public DateTime healthStateChangesEndTime() {
+ return this.healthStateChangesEndTime;
+ }
+
+ /**
+ * Get time of last health state change.
+ *
+ * @return the lastHealthStateChangeTime value
+ */
+ public DateTime lastHealthStateChangeTime() {
+ return this.lastHealthStateChangeTime;
+ }
+
+ /**
+ * Get iD of the VM this component belongs to.
+ *
+ * @return the vmId value
+ */
+ public String vmId() {
+ return this.vmId;
+ }
+
+ /**
+ * Get name of the VM this component belongs to.
+ *
+ * @return the vmName value
+ */
+ public String vmName() {
+ return this.vmName;
+ }
+
+ /**
+ * Get tags on the VM this component belongs to.
+ *
+ * @return the vmTags value
+ */
+ public Map vmTags() {
+ return this.vmTags;
+ }
+
+ /**
+ * Get properties requested in aggregation queries.
+ *
+ * @return the aggregateProperties value
+ */
+ public Map aggregateProperties() {
+ return this.aggregateProperties;
+ }
+
+ /**
+ * Get component children.
+ *
+ * @return the children value
+ */
+ public List children() {
+ return this.children;
+ }
+
+}
diff --git a/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/implementation/ComponentsImpl.java b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/implementation/ComponentsImpl.java
new file mode 100644
index 000000000000..bb18edd011d7
--- /dev/null
+++ b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/implementation/ComponentsImpl.java
@@ -0,0 +1,62 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * abc
+ */
+
+package com.microsoft.azure.management.workloadmonitor.v2018_08_31_preview.implementation;
+
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import com.microsoft.azure.management.workloadmonitor.v2018_08_31_preview.Components;
+import rx.functions.Func1;
+import rx.Observable;
+import com.microsoft.azure.Page;
+import com.microsoft.azure.management.workloadmonitor.v2018_08_31_preview.Component;
+import java.util.UUID;
+
+class ComponentsImpl extends WrapperImpl implements Components {
+ private final WorkloadMonitorManager manager;
+
+ ComponentsImpl(WorkloadMonitorManager manager) {
+ super(manager.inner().components());
+ this.manager = manager;
+ }
+
+ public WorkloadMonitorManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public Observable listByResourceAsync(final String resourceGroupName, final String resourceNamespace, final String resourceType, final String resourceName) {
+ ComponentsInner client = this.inner();
+ return client.listByResourceAsync(resourceGroupName, resourceNamespace, resourceType, resourceName)
+ .flatMapIterable(new Func1, Iterable>() {
+ @Override
+ public Iterable call(Page page) {
+ return page.items();
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public Component call(ComponentInner inner) {
+ return new ComponentImpl(inner, manager());
+ }
+ });
+ }
+
+ @Override
+ public Observable getAsync(String resourceGroupName, String resourceNamespace, String resourceType, String resourceName, UUID componentId) {
+ ComponentsInner client = this.inner();
+ return client.getAsync(resourceGroupName, resourceNamespace, resourceType, resourceName, componentId)
+ .map(new Func1() {
+ @Override
+ public Component call(ComponentInner inner) {
+ return new ComponentImpl(inner, manager());
+ }
+ });
+ }
+
+}
diff --git a/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/implementation/ComponentsInner.java b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/implementation/ComponentsInner.java
new file mode 100644
index 000000000000..e9a90f97cc93
--- /dev/null
+++ b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/implementation/ComponentsInner.java
@@ -0,0 +1,704 @@
+/**
+ * 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.workloadmonitor.v2018_08_31_preview.implementation;
+
+import retrofit2.Retrofit;
+import com.google.common.reflect.TypeToken;
+import com.microsoft.azure.AzureServiceFuture;
+import com.microsoft.azure.ListOperationCallback;
+import com.microsoft.azure.management.workloadmonitor.v2018_08_31_preview.ErrorResponseException;
+import com.microsoft.azure.Page;
+import com.microsoft.azure.PagedList;
+import com.microsoft.rest.ServiceCallback;
+import com.microsoft.rest.ServiceFuture;
+import com.microsoft.rest.ServiceResponse;
+import java.io.IOException;
+import java.util.List;
+import java.util.UUID;
+import okhttp3.ResponseBody;
+import retrofit2.http.GET;
+import retrofit2.http.Header;
+import retrofit2.http.Headers;
+import retrofit2.http.Path;
+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 Components.
+ */
+public class ComponentsInner {
+ /** The Retrofit service to perform REST calls. */
+ private ComponentsService service;
+ /** The service client containing this operation class. */
+ private WorkloadMonitorAPIImpl client;
+
+ /**
+ * Initializes an instance of ComponentsInner.
+ *
+ * @param retrofit the Retrofit instance built from a Retrofit Builder.
+ * @param client the instance of the service client containing this operation class.
+ */
+ public ComponentsInner(Retrofit retrofit, WorkloadMonitorAPIImpl client) {
+ this.service = retrofit.create(ComponentsService.class);
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for Components to be
+ * used by Retrofit to perform actually REST calls.
+ */
+ interface ComponentsService {
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.workloadmonitor.v2018_08_31_preview.Components listByResource" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.WorkloadMonitor/components")
+ Observable> listByResource(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceNamespace") String resourceNamespace, @Path("resourceType") String resourceType, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Query("$select") String select, @Query("$filter") String filter, @Query("$apply") String apply, @Query("$orderby") String orderby, @Query("$expand") String expand, @Query("$top") String top, @Query("$skiptoken") String skiptoken, @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.workloadmonitor.v2018_08_31_preview.Components get" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.WorkloadMonitor/components/{componentId}")
+ Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceNamespace") String resourceNamespace, @Path("resourceType") String resourceType, @Path("resourceName") String resourceName, @Path("componentId") UUID componentId, @Query("api-version") String apiVersion, @Query("$select") String select, @Query("$expand") String expand, @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.workloadmonitor.v2018_08_31_preview.Components listByResourceNext" })
+ @GET
+ Observable> listByResourceNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ }
+
+ /**
+ * Get list of components for a resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceNamespace The Namespace of the resource.
+ * @param resourceType The type of the resource.
+ * @param resourceName Name of the resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorResponseException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the PagedList<ComponentInner> object if successful.
+ */
+ public PagedList listByResource(final String resourceGroupName, final String resourceNamespace, final String resourceType, final String resourceName) {
+ ServiceResponse> response = listByResourceSinglePageAsync(resourceGroupName, resourceNamespace, resourceType, resourceName).toBlocking().single();
+ return new PagedList(response.body()) {
+ @Override
+ public Page nextPage(String nextPageLink) {
+ return listByResourceNextSinglePageAsync(nextPageLink).toBlocking().single().body();
+ }
+ };
+ }
+
+ /**
+ * Get list of components for a resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceNamespace The Namespace of the resource.
+ * @param resourceType The type of the resource.
+ * @param resourceName Name of the resource.
+ * @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> listByResourceAsync(final String resourceGroupName, final String resourceNamespace, final String resourceType, final String resourceName, final ListOperationCallback serviceCallback) {
+ return AzureServiceFuture.fromPageResponse(
+ listByResourceSinglePageAsync(resourceGroupName, resourceNamespace, resourceType, resourceName),
+ new Func1>>>() {
+ @Override
+ public Observable>> call(String nextPageLink) {
+ return listByResourceNextSinglePageAsync(nextPageLink);
+ }
+ },
+ serviceCallback);
+ }
+
+ /**
+ * Get list of components for a resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceNamespace The Namespace of the resource.
+ * @param resourceType The type of the resource.
+ * @param resourceName Name of the resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<ComponentInner> object
+ */
+ public Observable> listByResourceAsync(final String resourceGroupName, final String resourceNamespace, final String resourceType, final String resourceName) {
+ return listByResourceWithServiceResponseAsync(resourceGroupName, resourceNamespace, resourceType, resourceName)
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Get list of components for a resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceNamespace The Namespace of the resource.
+ * @param resourceType The type of the resource.
+ * @param resourceName Name of the resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<ComponentInner> object
+ */
+ public Observable>> listByResourceWithServiceResponseAsync(final String resourceGroupName, final String resourceNamespace, final String resourceType, final String resourceName) {
+ return listByResourceSinglePageAsync(resourceGroupName, resourceNamespace, resourceType, resourceName)
+ .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(listByResourceNextWithServiceResponseAsync(nextPageLink));
+ }
+ });
+ }
+
+ /**
+ * Get list of components for a resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceNamespace The Namespace of the resource.
+ * @param resourceType The type of the resource.
+ * @param resourceName Name of the resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the PagedList<ComponentInner> object wrapped in {@link ServiceResponse} if successful.
+ */
+ public Observable>> listByResourceSinglePageAsync(final String resourceGroupName, final String resourceNamespace, final String resourceType, final String resourceName) {
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (resourceNamespace == null) {
+ throw new IllegalArgumentException("Parameter resourceNamespace is required and cannot be null.");
+ }
+ if (resourceType == null) {
+ throw new IllegalArgumentException("Parameter resourceType is required and cannot be null.");
+ }
+ if (resourceName == null) {
+ throw new IllegalArgumentException("Parameter resourceName is required and cannot be null.");
+ }
+ final String select = null;
+ final String filter = null;
+ final String apply = null;
+ final String orderby = null;
+ final String expand = null;
+ final String top = null;
+ final String skiptoken = null;
+ return service.listByResource(this.client.subscriptionId(), resourceGroupName, resourceNamespace, resourceType, resourceName, this.client.apiVersion(), select, filter, apply, orderby, expand, top, skiptoken, this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>>() {
+ @Override
+ public Observable>> call(Response response) {
+ try {
+ ServiceResponse> result = listByResourceDelegate(response);
+ return Observable.just(new ServiceResponse>(result.body(), result.response()));
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ /**
+ * Get list of components for a resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceNamespace The Namespace of the resource.
+ * @param resourceType The type of the resource.
+ * @param resourceName Name of the resource.
+ * @param select Properties to be returned in the response.
+ * @param filter Filter to be applied on the operation.
+ * @param apply Apply aggregation.
+ * @param orderby Sort the result on one or more properties.
+ * @param expand Include properties inline in the response.
+ * @param top Limit the result to the specified number of rows.
+ * @param skiptoken The page-continuation token to use with a paged version of this API.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorResponseException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the PagedList<ComponentInner> object if successful.
+ */
+ public PagedList listByResource(final String resourceGroupName, final String resourceNamespace, final String resourceType, final String resourceName, final String select, final String filter, final String apply, final String orderby, final String expand, final String top, final String skiptoken) {
+ ServiceResponse> response = listByResourceSinglePageAsync(resourceGroupName, resourceNamespace, resourceType, resourceName, select, filter, apply, orderby, expand, top, skiptoken).toBlocking().single();
+ return new PagedList(response.body()) {
+ @Override
+ public Page nextPage(String nextPageLink) {
+ return listByResourceNextSinglePageAsync(nextPageLink).toBlocking().single().body();
+ }
+ };
+ }
+
+ /**
+ * Get list of components for a resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceNamespace The Namespace of the resource.
+ * @param resourceType The type of the resource.
+ * @param resourceName Name of the resource.
+ * @param select Properties to be returned in the response.
+ * @param filter Filter to be applied on the operation.
+ * @param apply Apply aggregation.
+ * @param orderby Sort the result on one or more properties.
+ * @param expand Include properties inline in the response.
+ * @param top Limit the result to the specified number of rows.
+ * @param skiptoken The page-continuation token to use with a paged version of this API.
+ * @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> listByResourceAsync(final String resourceGroupName, final String resourceNamespace, final String resourceType, final String resourceName, final String select, final String filter, final String apply, final String orderby, final String expand, final String top, final String skiptoken, final ListOperationCallback serviceCallback) {
+ return AzureServiceFuture.fromPageResponse(
+ listByResourceSinglePageAsync(resourceGroupName, resourceNamespace, resourceType, resourceName, select, filter, apply, orderby, expand, top, skiptoken),
+ new Func1>>>() {
+ @Override
+ public Observable>> call(String nextPageLink) {
+ return listByResourceNextSinglePageAsync(nextPageLink);
+ }
+ },
+ serviceCallback);
+ }
+
+ /**
+ * Get list of components for a resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceNamespace The Namespace of the resource.
+ * @param resourceType The type of the resource.
+ * @param resourceName Name of the resource.
+ * @param select Properties to be returned in the response.
+ * @param filter Filter to be applied on the operation.
+ * @param apply Apply aggregation.
+ * @param orderby Sort the result on one or more properties.
+ * @param expand Include properties inline in the response.
+ * @param top Limit the result to the specified number of rows.
+ * @param skiptoken The page-continuation token to use with a paged version of this API.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<ComponentInner> object
+ */
+ public Observable> listByResourceAsync(final String resourceGroupName, final String resourceNamespace, final String resourceType, final String resourceName, final String select, final String filter, final String apply, final String orderby, final String expand, final String top, final String skiptoken) {
+ return listByResourceWithServiceResponseAsync(resourceGroupName, resourceNamespace, resourceType, resourceName, select, filter, apply, orderby, expand, top, skiptoken)
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Get list of components for a resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceNamespace The Namespace of the resource.
+ * @param resourceType The type of the resource.
+ * @param resourceName Name of the resource.
+ * @param select Properties to be returned in the response.
+ * @param filter Filter to be applied on the operation.
+ * @param apply Apply aggregation.
+ * @param orderby Sort the result on one or more properties.
+ * @param expand Include properties inline in the response.
+ * @param top Limit the result to the specified number of rows.
+ * @param skiptoken The page-continuation token to use with a paged version of this API.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<ComponentInner> object
+ */
+ public Observable>> listByResourceWithServiceResponseAsync(final String resourceGroupName, final String resourceNamespace, final String resourceType, final String resourceName, final String select, final String filter, final String apply, final String orderby, final String expand, final String top, final String skiptoken) {
+ return listByResourceSinglePageAsync(resourceGroupName, resourceNamespace, resourceType, resourceName, select, filter, apply, orderby, expand, top, 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(listByResourceNextWithServiceResponseAsync(nextPageLink));
+ }
+ });
+ }
+
+ /**
+ * Get list of components for a resource.
+ *
+ ServiceResponse> * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ ServiceResponse> * @param resourceNamespace The Namespace of the resource.
+ ServiceResponse> * @param resourceType The type of the resource.
+ ServiceResponse> * @param resourceName Name of the resource.
+ ServiceResponse> * @param select Properties to be returned in the response.
+ ServiceResponse> * @param filter Filter to be applied on the operation.
+ ServiceResponse> * @param apply Apply aggregation.
+ ServiceResponse> * @param orderby Sort the result on one or more properties.
+ ServiceResponse> * @param expand Include properties inline in the response.
+ ServiceResponse> * @param top Limit the result to the specified number of rows.
+ ServiceResponse> * @param skiptoken The page-continuation token to use with a paged version of this API.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the PagedList<ComponentInner> object wrapped in {@link ServiceResponse} if successful.
+ */
+ public Observable>> listByResourceSinglePageAsync(final String resourceGroupName, final String resourceNamespace, final String resourceType, final String resourceName, final String select, final String filter, final String apply, final String orderby, final String expand, final String top, final String skiptoken) {
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (resourceNamespace == null) {
+ throw new IllegalArgumentException("Parameter resourceNamespace is required and cannot be null.");
+ }
+ if (resourceType == null) {
+ throw new IllegalArgumentException("Parameter resourceType is required and cannot be null.");
+ }
+ if (resourceName == null) {
+ throw new IllegalArgumentException("Parameter resourceName is required and cannot be null.");
+ }
+ return service.listByResource(this.client.subscriptionId(), resourceGroupName, resourceNamespace, resourceType, resourceName, this.client.apiVersion(), select, filter, apply, orderby, expand, top, skiptoken, this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>>() {
+ @Override
+ public Observable>> call(Response response) {
+ try {
+ ServiceResponse> result = listByResourceDelegate(response);
+ return Observable.just(new ServiceResponse>(result.body(), result.response()));
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse> listByResourceDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken>() { }.getType())
+ .registerError(ErrorResponseException.class)
+ .build(response);
+ }
+
+ /**
+ * Get details of a component.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceNamespace The Namespace of the resource.
+ * @param resourceType The type of the resource.
+ * @param resourceName Name of the resource.
+ * @param componentId Component Id.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorResponseException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the ComponentInner object if successful.
+ */
+ public ComponentInner get(String resourceGroupName, String resourceNamespace, String resourceType, String resourceName, UUID componentId) {
+ return getWithServiceResponseAsync(resourceGroupName, resourceNamespace, resourceType, resourceName, componentId).toBlocking().single().body();
+ }
+
+ /**
+ * Get details of a component.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceNamespace The Namespace of the resource.
+ * @param resourceType The type of the resource.
+ * @param resourceName Name of the resource.
+ * @param componentId Component Id.
+ * @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 resourceNamespace, String resourceType, String resourceName, UUID componentId, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, resourceNamespace, resourceType, resourceName, componentId), serviceCallback);
+ }
+
+ /**
+ * Get details of a component.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceNamespace The Namespace of the resource.
+ * @param resourceType The type of the resource.
+ * @param resourceName Name of the resource.
+ * @param componentId Component Id.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the ComponentInner object
+ */
+ public Observable getAsync(String resourceGroupName, String resourceNamespace, String resourceType, String resourceName, UUID componentId) {
+ return getWithServiceResponseAsync(resourceGroupName, resourceNamespace, resourceType, resourceName, componentId).map(new Func1, ComponentInner>() {
+ @Override
+ public ComponentInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Get details of a component.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceNamespace The Namespace of the resource.
+ * @param resourceType The type of the resource.
+ * @param resourceName Name of the resource.
+ * @param componentId Component Id.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the ComponentInner object
+ */
+ public Observable> getWithServiceResponseAsync(String resourceGroupName, String resourceNamespace, String resourceType, String resourceName, UUID componentId) {
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (resourceNamespace == null) {
+ throw new IllegalArgumentException("Parameter resourceNamespace is required and cannot be null.");
+ }
+ if (resourceType == null) {
+ throw new IllegalArgumentException("Parameter resourceType is required and cannot be null.");
+ }
+ if (resourceName == null) {
+ throw new IllegalArgumentException("Parameter resourceName is required and cannot be null.");
+ }
+ if (componentId == null) {
+ throw new IllegalArgumentException("Parameter componentId is required and cannot be null.");
+ }
+ final String select = null;
+ final String expand = null;
+ return service.get(this.client.subscriptionId(), resourceGroupName, resourceNamespace, resourceType, resourceName, componentId, this.client.apiVersion(), select, expand, 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);
+ }
+ }
+ });
+ }
+
+ /**
+ * Get details of a component.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceNamespace The Namespace of the resource.
+ * @param resourceType The type of the resource.
+ * @param resourceName Name of the resource.
+ * @param componentId Component Id.
+ * @param select Properties to be returned in the response.
+ * @param expand Include properties inline in the response.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorResponseException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the ComponentInner object if successful.
+ */
+ public ComponentInner get(String resourceGroupName, String resourceNamespace, String resourceType, String resourceName, UUID componentId, String select, String expand) {
+ return getWithServiceResponseAsync(resourceGroupName, resourceNamespace, resourceType, resourceName, componentId, select, expand).toBlocking().single().body();
+ }
+
+ /**
+ * Get details of a component.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceNamespace The Namespace of the resource.
+ * @param resourceType The type of the resource.
+ * @param resourceName Name of the resource.
+ * @param componentId Component Id.
+ * @param select Properties to be returned in the response.
+ * @param expand Include properties inline in the response.
+ * @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 resourceNamespace, String resourceType, String resourceName, UUID componentId, String select, String expand, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, resourceNamespace, resourceType, resourceName, componentId, select, expand), serviceCallback);
+ }
+
+ /**
+ * Get details of a component.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceNamespace The Namespace of the resource.
+ * @param resourceType The type of the resource.
+ * @param resourceName Name of the resource.
+ * @param componentId Component Id.
+ * @param select Properties to be returned in the response.
+ * @param expand Include properties inline in the response.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the ComponentInner object
+ */
+ public Observable getAsync(String resourceGroupName, String resourceNamespace, String resourceType, String resourceName, UUID componentId, String select, String expand) {
+ return getWithServiceResponseAsync(resourceGroupName, resourceNamespace, resourceType, resourceName, componentId, select, expand).map(new Func1, ComponentInner>() {
+ @Override
+ public ComponentInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Get details of a component.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceNamespace The Namespace of the resource.
+ * @param resourceType The type of the resource.
+ * @param resourceName Name of the resource.
+ * @param componentId Component Id.
+ * @param select Properties to be returned in the response.
+ * @param expand Include properties inline in the response.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the ComponentInner object
+ */
+ public Observable> getWithServiceResponseAsync(String resourceGroupName, String resourceNamespace, String resourceType, String resourceName, UUID componentId, String select, String expand) {
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (resourceNamespace == null) {
+ throw new IllegalArgumentException("Parameter resourceNamespace is required and cannot be null.");
+ }
+ if (resourceType == null) {
+ throw new IllegalArgumentException("Parameter resourceType is required and cannot be null.");
+ }
+ if (resourceName == null) {
+ throw new IllegalArgumentException("Parameter resourceName is required and cannot be null.");
+ }
+ if (componentId == null) {
+ throw new IllegalArgumentException("Parameter componentId is required and cannot be null.");
+ }
+ return service.get(this.client.subscriptionId(), resourceGroupName, resourceNamespace, resourceType, resourceName, componentId, this.client.apiVersion(), select, expand, 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 ErrorResponseException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .registerError(ErrorResponseException.class)
+ .build(response);
+ }
+
+ /**
+ * Get list of components for a resource.
+ *
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorResponseException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the PagedList<ComponentInner> object if successful.
+ */
+ public PagedList listByResourceNext(final String nextPageLink) {
+ ServiceResponse> response = listByResourceNextSinglePageAsync(nextPageLink).toBlocking().single();
+ return new PagedList(response.body()) {
+ @Override
+ public Page nextPage(String nextPageLink) {
+ return listByResourceNextSinglePageAsync(nextPageLink).toBlocking().single().body();
+ }
+ };
+ }
+
+ /**
+ * Get list of components for a resource.
+ *
+ * @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> listByResourceNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) {
+ return AzureServiceFuture.fromPageResponse(
+ listByResourceNextSinglePageAsync(nextPageLink),
+ new Func1>>>() {
+ @Override
+ public Observable>> call(String nextPageLink) {
+ return listByResourceNextSinglePageAsync(nextPageLink);
+ }
+ },
+ serviceCallback);
+ }
+
+ /**
+ * Get list of components for a resource.
+ *
+ * @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<ComponentInner> object
+ */
+ public Observable> listByResourceNextAsync(final String nextPageLink) {
+ return listByResourceNextWithServiceResponseAsync(nextPageLink)
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Get list of components for a resource.
+ *
+ * @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<ComponentInner> object
+ */
+ public Observable>> listByResourceNextWithServiceResponseAsync(final String nextPageLink) {
+ return listByResourceNextSinglePageAsync(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(listByResourceNextWithServiceResponseAsync(nextPageLink));
+ }
+ });
+ }
+
+ /**
+ * Get list of components for a resource.
+ *
+ ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the PagedList<ComponentInner> object wrapped in {@link ServiceResponse} if successful.
+ */
+ public Observable>> listByResourceNextSinglePageAsync(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.listByResourceNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>>() {
+ @Override
+ public Observable>> call(Response response) {
+ try {
+ ServiceResponse> result = listByResourceNextDelegate(response);
+ return Observable.just(new ServiceResponse>(result.body(), result.response()));
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse> listByResourceNextDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken>() { }.getType())
+ .registerError(ErrorResponseException.class)
+ .build(response);
+ }
+
+}
diff --git a/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/implementation/ComponentsSummarysImpl.java b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/implementation/ComponentsSummarysImpl.java
new file mode 100644
index 000000000000..9838d3f3e1db
--- /dev/null
+++ b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/implementation/ComponentsSummarysImpl.java
@@ -0,0 +1,49 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * abc
+ */
+
+package com.microsoft.azure.management.workloadmonitor.v2018_08_31_preview.implementation;
+
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import com.microsoft.azure.management.workloadmonitor.v2018_08_31_preview.ComponentsSummarys;
+import rx.functions.Func1;
+import rx.Observable;
+import com.microsoft.azure.Page;
+import com.microsoft.azure.management.workloadmonitor.v2018_08_31_preview.Component;
+
+class ComponentsSummarysImpl extends WrapperImpl implements ComponentsSummarys {
+ private final WorkloadMonitorManager manager;
+
+ ComponentsSummarysImpl(WorkloadMonitorManager manager) {
+ super(manager.inner().componentsSummarys());
+ this.manager = manager;
+ }
+
+ public WorkloadMonitorManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public Observable listAsync() {
+ ComponentsSummarysInner client = this.inner();
+ return client.listAsync()
+ .flatMapIterable(new Func1, Iterable>() {
+ @Override
+ public Iterable call(Page page) {
+ return page.items();
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public Component call(ComponentInner inner) {
+ return new ComponentImpl(inner, manager());
+ }
+ });
+ }
+
+}
diff --git a/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/implementation/ComponentsSummarysInner.java b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/implementation/ComponentsSummarysInner.java
new file mode 100644
index 000000000000..7ffc7fb9ca42
--- /dev/null
+++ b/sdk/workloadmonitor/mgmt-v2018_08_31_preview/src/main/java/com/microsoft/azure/management/workloadmonitor/v2018_08_31_preview/implementation/ComponentsSummarysInner.java
@@ -0,0 +1,423 @@
+/**
+ * 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.workloadmonitor.v2018_08_31_preview.implementation;
+
+import retrofit2.Retrofit;
+import com.google.common.reflect.TypeToken;
+import com.microsoft.azure.AzureServiceFuture;
+import com.microsoft.azure.ListOperationCallback;
+import com.microsoft.azure.management.workloadmonitor.v2018_08_31_preview.ErrorResponseException;
+import com.microsoft.azure.Page;
+import com.microsoft.azure.PagedList;
+import com.microsoft.rest.ServiceFuture;
+import com.microsoft.rest.ServiceResponse;
+import java.io.IOException;
+import java.util.List;
+import okhttp3.ResponseBody;
+import retrofit2.http.GET;
+import retrofit2.http.Header;
+import retrofit2.http.Headers;
+import retrofit2.http.Path;
+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 ComponentsSummarys.
+ */
+public class ComponentsSummarysInner {
+ /** The Retrofit service to perform REST calls. */
+ private ComponentsSummarysService service;
+ /** The service client containing this operation class. */
+ private WorkloadMonitorAPIImpl client;
+
+ /**
+ * Initializes an instance of ComponentsSummarysInner.
+ *
+ * @param retrofit the Retrofit instance built from a Retrofit Builder.
+ * @param client the instance of the service client containing this operation class.
+ */
+ public ComponentsSummarysInner(Retrofit retrofit, WorkloadMonitorAPIImpl client) {
+ this.service = retrofit.create(ComponentsSummarysService.class);
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for ComponentsSummarys to be
+ * used by Retrofit to perform actually REST calls.
+ */
+ interface ComponentsSummarysService {
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.workloadmonitor.v2018_08_31_preview.ComponentsSummarys list" })
+ @GET("subscriptions/{subscriptionId}/providers/Microsoft.WorkloadMonitor/componentsSummary")
+ Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$select") String select, @Query("$filter") String filter, @Query("$apply") String apply, @Query("$orderby") String orderby, @Query("$expand") String expand, @Query("$top") String top, @Query("$skiptoken") String skiptoken, @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.workloadmonitor.v2018_08_31_preview.ComponentsSummarys listNext" })
+ @GET
+ Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ }
+
+ /**
+ * Get subscription wide details of components.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorResponseException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the PagedList<ComponentInner> object if successful.
+ */
+ public PagedList list() {
+ ServiceResponse> response = listSinglePageAsync().toBlocking().single();
+ return new PagedList(response.body()) {
+ @Override
+ public Page nextPage(String nextPageLink) {
+ return listNextSinglePageAsync(nextPageLink).toBlocking().single().body();
+ }
+ };
+ }
+
+ /**
+ * Get subscription wide details of components.
+ *
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) {
+ return AzureServiceFuture.fromPageResponse(
+ listSinglePageAsync(),
+ new Func1>>>() {
+ @Override
+ public Observable>> call(String nextPageLink) {
+ return listNextSinglePageAsync(nextPageLink);
+ }
+ },
+ serviceCallback);
+ }
+
+ /**
+ * Get subscription wide details of components.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<ComponentInner> object
+ */
+ public Observable> listAsync() {
+ return listWithServiceResponseAsync()
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Get subscription wide details of components.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<ComponentInner> object
+ */
+ public Observable>> listWithServiceResponseAsync() {
+ return listSinglePageAsync()
+ .concatMap(new Func1>, Observable>>>() {
+ @Override
+ public Observable>> call(ServiceResponse> page) {
+ String nextPageLink = page.body().nextPageLink();
+ if (nextPageLink == null) {
+ return Observable.just(page);
+ }
+ return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink));
+ }
+ });
+ }
+
+ /**
+ * Get subscription wide details of components.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the PagedList<ComponentInner> object wrapped in {@link ServiceResponse} if successful.
+ */
+ public Observable>> listSinglePageAsync() {
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ final String select = null;
+ final String filter = null;
+ final String apply = null;
+ final String orderby = null;
+ final String expand = null;
+ final String top = null;
+ final String skiptoken = null;
+ return service.list(this.client.subscriptionId(), this.client.apiVersion(), select, filter, apply, orderby, expand, top, skiptoken, this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>>() {
+ @Override
+ public Observable>> call(Response response) {
+ try {
+ ServiceResponse> result = listDelegate(response);
+ return Observable.just(new ServiceResponse>(result.body(), result.response()));
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ /**
+ * Get subscription wide details of components.
+ *
+ * @param select Properties to be returned in the response.
+ * @param filter Filter to be applied on the operation.
+ * @param apply Apply aggregation.
+ * @param orderby Sort the result on one or more properties.
+ * @param expand Include properties inline in the response.
+ * @param top Limit the result to the specified number of rows.
+ * @param skiptoken The page-continuation token to use with a paged version of this API.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorResponseException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the PagedList<ComponentInner> object if successful.
+ */
+ public PagedList list(final String select, final String filter, final String apply, final String orderby, final String expand, final String top, final String skiptoken) {
+ ServiceResponse> response = listSinglePageAsync(select, filter, apply, orderby, expand, top, skiptoken).toBlocking().single();
+ return new PagedList(response.body()) {
+ @Override
+ public Page nextPage(String nextPageLink) {
+ return listNextSinglePageAsync(nextPageLink).toBlocking().single().body();
+ }
+ };
+ }
+
+ /**
+ * Get subscription wide details of components.
+ *
+ * @param select Properties to be returned in the response.
+ * @param filter Filter to be applied on the operation.
+ * @param apply Apply aggregation.
+ * @param orderby Sort the result on one or more properties.
+ * @param expand Include properties inline in the response.
+ * @param top Limit the result to the specified number of rows.
+ * @param skiptoken The page-continuation token to use with a paged version of this API.
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture> listAsync(final String select, final String filter, final String apply, final String orderby, final String expand, final String top, final String skiptoken, final ListOperationCallback serviceCallback) {
+ return AzureServiceFuture.fromPageResponse(
+ listSinglePageAsync(select, filter, apply, orderby, expand, top, skiptoken),
+ new Func1>>>() {
+ @Override
+ public Observable>> call(String nextPageLink) {
+ return listNextSinglePageAsync(nextPageLink);
+ }
+ },
+ serviceCallback);
+ }
+
+ /**
+ * Get subscription wide details of components.
+ *
+ * @param select Properties to be returned in the response.
+ * @param filter Filter to be applied on the operation.
+ * @param apply Apply aggregation.
+ * @param orderby Sort the result on one or more properties.
+ * @param expand Include properties inline in the response.
+ * @param top Limit the result to the specified number of rows.
+ * @param skiptoken The page-continuation token to use with a paged version of this API.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<ComponentInner> object
+ */
+ public Observable> listAsync(final String select, final String filter, final String apply, final String orderby, final String expand, final String top, final String skiptoken) {
+ return listWithServiceResponseAsync(select, filter, apply, orderby, expand, top, skiptoken)
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Get subscription wide details of components.
+ *
+ * @param select Properties to be returned in the response.
+ * @param filter Filter to be applied on the operation.
+ * @param apply Apply aggregation.
+ * @param orderby Sort the result on one or more properties.
+ * @param expand Include properties inline in the response.
+ * @param top Limit the result to the specified number of rows.
+ * @param skiptoken The page-continuation token to use with a paged version of this API.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<ComponentInner> object
+ */
+ public Observable>> listWithServiceResponseAsync(final String select, final String filter, final String apply, final String orderby, final String expand, final String top, final String skiptoken) {
+ return listSinglePageAsync(select, filter, apply, orderby, expand, top, 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(listNextWithServiceResponseAsync(nextPageLink));
+ }
+ });
+ }
+
+ /**
+ * Get subscription wide details of components.
+ *
+ ServiceResponse> * @param select Properties to be returned in the response.
+ ServiceResponse> * @param filter Filter to be applied on the operation.
+ ServiceResponse> * @param apply Apply aggregation.
+ ServiceResponse> * @param orderby Sort the result on one or more properties.
+ ServiceResponse> * @param expand Include properties inline in the response.
+ ServiceResponse> * @param top Limit the result to the specified number of rows.
+ ServiceResponse> * @param skiptoken The page-continuation token to use with a paged version of this API.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the PagedList<ComponentInner> object wrapped in {@link ServiceResponse} if successful.
+ */
+ public Observable>> listSinglePageAsync(final String select, final String filter, final String apply, final String orderby, final String expand, final String top, final String skiptoken) {
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ return service.list(this.client.subscriptionId(), this.client.apiVersion(), select, filter, apply, orderby, expand, top, skiptoken, this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable