diff --git a/api-specs.json b/api-specs.json
index ac05a230d3ec..e8fee0af8735 100644
--- a/api-specs.json
+++ b/api-specs.json
@@ -215,6 +215,10 @@
"source": "specification/resourcegraph/resource-manager/readme.md",
"args": "--multiapi --fluent"
},
+ "resourcehealth/resource-manager": {
+ "source": "specification/resourcehealth/resource-manager/readme.md",
+ "args": "--multiapi --fluent"
+ },
"resources/resource-manager": {
"source": "specification/resources/resource-manager/readme.md",
"args": "--multiapi --fluent"
diff --git a/resourcehealth/resource-manager/v2015_01_01/pom.xml b/resourcehealth/resource-manager/v2015_01_01/pom.xml
new file mode 100644
index 000000000000..b35fcde154c6
--- /dev/null
+++ b/resourcehealth/resource-manager/v2015_01_01/pom.xml
@@ -0,0 +1,133 @@
+
+
+ 4.0.0
+ com.microsoft.azure.resourcehealth.v2015_01_01
+
+ com.microsoft.azure
+ azure-arm-parent
+ 1.1.0
+ ../../../pom.management.xml
+
+ azure-mgmt-resourcehealth
+ 1.0.0-beta
+ jar
+ Microsoft Azure SDK for ResourceHealth Management
+ This package contains Microsoft ResourceHealth 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
+
+
+
+
+
+ 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/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/AvailabilityStateValues.java b/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/AvailabilityStateValues.java
new file mode 100644
index 000000000000..b797a8b6fe02
--- /dev/null
+++ b/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/AvailabilityStateValues.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.resourcehealth.v2015_01_01;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Defines values for AvailabilityStateValues.
+ */
+public enum AvailabilityStateValues {
+ /** Enum value Available. */
+ AVAILABLE("Available"),
+
+ /** Enum value Unavailable. */
+ UNAVAILABLE("Unavailable"),
+
+ /** Enum value Unknown. */
+ UNKNOWN("Unknown");
+
+ /** The actual serialized value for a AvailabilityStateValues instance. */
+ private String value;
+
+ AvailabilityStateValues(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Parses a serialized value to a AvailabilityStateValues instance.
+ *
+ * @param value the serialized value to parse.
+ * @return the parsed AvailabilityStateValues object, or null if unable to parse.
+ */
+ @JsonCreator
+ public static AvailabilityStateValues fromString(String value) {
+ AvailabilityStateValues[] items = AvailabilityStateValues.values();
+ for (AvailabilityStateValues item : items) {
+ if (item.toString().equalsIgnoreCase(value)) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ @JsonValue
+ @Override
+ public String toString() {
+ return this.value;
+ }
+}
diff --git a/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/AvailabilityStatus.java b/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/AvailabilityStatus.java
new file mode 100644
index 000000000000..b64fd1e49f49
--- /dev/null
+++ b/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/AvailabilityStatus.java
@@ -0,0 +1,45 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.resourcehealth.v2015_01_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.resourcehealth.v2015_01_01.implementation.AvailabilityStatusInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.resourcehealth.v2015_01_01.implementation.ResourceHealthManager;
+
+/**
+ * Type representing AvailabilityStatus.
+ */
+public interface AvailabilityStatus extends HasInner, HasManager {
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the location value.
+ */
+ String location();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the properties value.
+ */
+ AvailabilityStatusProperties properties();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+}
diff --git a/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/AvailabilityStatusProperties.java b/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/AvailabilityStatusProperties.java
new file mode 100644
index 000000000000..229220b92395
--- /dev/null
+++ b/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/AvailabilityStatusProperties.java
@@ -0,0 +1,367 @@
+/**
+ * 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.resourcehealth.v2015_01_01;
+
+import org.joda.time.DateTime;
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Properties of availability state.
+ */
+public class AvailabilityStatusProperties {
+ /**
+ * Availability status of the resource. Possible values include:
+ * 'Available', 'Unavailable', 'Unknown'.
+ */
+ @JsonProperty(value = "availabilityState")
+ private AvailabilityStateValues availabilityState;
+
+ /**
+ * Summary description of the availability state.
+ */
+ @JsonProperty(value = "summary")
+ private String summary;
+
+ /**
+ * Details of the availability status.
+ */
+ @JsonProperty(value = "detailedStatus")
+ private String detailedStatus;
+
+ /**
+ * When the resource's availabilityState is Unavailable, it describes where
+ * the health impacting event was originated. Examples are planned,
+ * unplanned, user initiated or an outage etc.
+ */
+ @JsonProperty(value = "reasonType")
+ private String reasonType;
+
+ /**
+ * When the resource's availabilityState is Unavailable, it provides the
+ * Timestamp for when the health impacting event was received.
+ */
+ @JsonProperty(value = "rootCauseAttributionTime")
+ private DateTime rootCauseAttributionTime;
+
+ /**
+ * When the resource's availabilityState is Unavailable and the reasonType
+ * is not User Initiated, it provides the date and time for when the issue
+ * is expected to be resolved.
+ */
+ @JsonProperty(value = "resolutionETA")
+ private DateTime resolutionETA;
+
+ /**
+ * Timestamp for when last change in health status occurred.
+ */
+ @JsonProperty(value = "occuredTime")
+ private DateTime occuredTime;
+
+ /**
+ * Chronicity of the availability transition. Possible values include:
+ * 'Transient', 'Persistent'.
+ */
+ @JsonProperty(value = "reasonChronicity")
+ private ReasonChronicityTypes reasonChronicity;
+
+ /**
+ * Timestamp for when the health was last checked.
+ */
+ @JsonProperty(value = "reportedTime")
+ private DateTime reportedTime;
+
+ /**
+ * flag to show if child resource need detail health.
+ */
+ @JsonProperty(value = "isArmResource")
+ private Boolean isArmResource;
+
+ /**
+ * An annotation describing a change in the availabilityState to Available
+ * from Unavailable with a reasonType of type Unplanned.
+ */
+ @JsonProperty(value = "recentlyResolvedState")
+ private AvailabilityStatusPropertiesRecentlyResolvedState recentlyResolvedState;
+
+ /**
+ * Lists actions the user can take based on the current availabilityState
+ * of the resource.
+ */
+ @JsonProperty(value = "recommendedActions")
+ private List recommendedActions;
+
+ /**
+ * Lists the service impacting events that may be affecting the health of
+ * the resource.
+ */
+ @JsonProperty(value = "serviceImpactingEvents")
+ private List serviceImpactingEvents;
+
+ /**
+ * Get availability status of the resource. Possible values include: 'Available', 'Unavailable', 'Unknown'.
+ *
+ * @return the availabilityState value
+ */
+ public AvailabilityStateValues availabilityState() {
+ return this.availabilityState;
+ }
+
+ /**
+ * Set availability status of the resource. Possible values include: 'Available', 'Unavailable', 'Unknown'.
+ *
+ * @param availabilityState the availabilityState value to set
+ * @return the AvailabilityStatusProperties object itself.
+ */
+ public AvailabilityStatusProperties withAvailabilityState(AvailabilityStateValues availabilityState) {
+ this.availabilityState = availabilityState;
+ return this;
+ }
+
+ /**
+ * Get summary description of the availability state.
+ *
+ * @return the summary value
+ */
+ public String summary() {
+ return this.summary;
+ }
+
+ /**
+ * Set summary description of the availability state.
+ *
+ * @param summary the summary value to set
+ * @return the AvailabilityStatusProperties object itself.
+ */
+ public AvailabilityStatusProperties withSummary(String summary) {
+ this.summary = summary;
+ return this;
+ }
+
+ /**
+ * Get details of the availability status.
+ *
+ * @return the detailedStatus value
+ */
+ public String detailedStatus() {
+ return this.detailedStatus;
+ }
+
+ /**
+ * Set details of the availability status.
+ *
+ * @param detailedStatus the detailedStatus value to set
+ * @return the AvailabilityStatusProperties object itself.
+ */
+ public AvailabilityStatusProperties withDetailedStatus(String detailedStatus) {
+ this.detailedStatus = detailedStatus;
+ return this;
+ }
+
+ /**
+ * Get when the resource's availabilityState is Unavailable, it describes where the health impacting event was originated. Examples are planned, unplanned, user initiated or an outage etc.
+ *
+ * @return the reasonType value
+ */
+ public String reasonType() {
+ return this.reasonType;
+ }
+
+ /**
+ * Set when the resource's availabilityState is Unavailable, it describes where the health impacting event was originated. Examples are planned, unplanned, user initiated or an outage etc.
+ *
+ * @param reasonType the reasonType value to set
+ * @return the AvailabilityStatusProperties object itself.
+ */
+ public AvailabilityStatusProperties withReasonType(String reasonType) {
+ this.reasonType = reasonType;
+ return this;
+ }
+
+ /**
+ * Get when the resource's availabilityState is Unavailable, it provides the Timestamp for when the health impacting event was received.
+ *
+ * @return the rootCauseAttributionTime value
+ */
+ public DateTime rootCauseAttributionTime() {
+ return this.rootCauseAttributionTime;
+ }
+
+ /**
+ * Set when the resource's availabilityState is Unavailable, it provides the Timestamp for when the health impacting event was received.
+ *
+ * @param rootCauseAttributionTime the rootCauseAttributionTime value to set
+ * @return the AvailabilityStatusProperties object itself.
+ */
+ public AvailabilityStatusProperties withRootCauseAttributionTime(DateTime rootCauseAttributionTime) {
+ this.rootCauseAttributionTime = rootCauseAttributionTime;
+ return this;
+ }
+
+ /**
+ * Get when the resource's availabilityState is Unavailable and the reasonType is not User Initiated, it provides the date and time for when the issue is expected to be resolved.
+ *
+ * @return the resolutionETA value
+ */
+ public DateTime resolutionETA() {
+ return this.resolutionETA;
+ }
+
+ /**
+ * Set when the resource's availabilityState is Unavailable and the reasonType is not User Initiated, it provides the date and time for when the issue is expected to be resolved.
+ *
+ * @param resolutionETA the resolutionETA value to set
+ * @return the AvailabilityStatusProperties object itself.
+ */
+ public AvailabilityStatusProperties withResolutionETA(DateTime resolutionETA) {
+ this.resolutionETA = resolutionETA;
+ return this;
+ }
+
+ /**
+ * Get timestamp for when last change in health status occurred.
+ *
+ * @return the occuredTime value
+ */
+ public DateTime occuredTime() {
+ return this.occuredTime;
+ }
+
+ /**
+ * Set timestamp for when last change in health status occurred.
+ *
+ * @param occuredTime the occuredTime value to set
+ * @return the AvailabilityStatusProperties object itself.
+ */
+ public AvailabilityStatusProperties withOccuredTime(DateTime occuredTime) {
+ this.occuredTime = occuredTime;
+ return this;
+ }
+
+ /**
+ * Get chronicity of the availability transition. Possible values include: 'Transient', 'Persistent'.
+ *
+ * @return the reasonChronicity value
+ */
+ public ReasonChronicityTypes reasonChronicity() {
+ return this.reasonChronicity;
+ }
+
+ /**
+ * Set chronicity of the availability transition. Possible values include: 'Transient', 'Persistent'.
+ *
+ * @param reasonChronicity the reasonChronicity value to set
+ * @return the AvailabilityStatusProperties object itself.
+ */
+ public AvailabilityStatusProperties withReasonChronicity(ReasonChronicityTypes reasonChronicity) {
+ this.reasonChronicity = reasonChronicity;
+ return this;
+ }
+
+ /**
+ * Get timestamp for when the health was last checked.
+ *
+ * @return the reportedTime value
+ */
+ public DateTime reportedTime() {
+ return this.reportedTime;
+ }
+
+ /**
+ * Set timestamp for when the health was last checked.
+ *
+ * @param reportedTime the reportedTime value to set
+ * @return the AvailabilityStatusProperties object itself.
+ */
+ public AvailabilityStatusProperties withReportedTime(DateTime reportedTime) {
+ this.reportedTime = reportedTime;
+ return this;
+ }
+
+ /**
+ * Get flag to show if child resource need detail health.
+ *
+ * @return the isArmResource value
+ */
+ public Boolean isArmResource() {
+ return this.isArmResource;
+ }
+
+ /**
+ * Set flag to show if child resource need detail health.
+ *
+ * @param isArmResource the isArmResource value to set
+ * @return the AvailabilityStatusProperties object itself.
+ */
+ public AvailabilityStatusProperties withIsArmResource(Boolean isArmResource) {
+ this.isArmResource = isArmResource;
+ return this;
+ }
+
+ /**
+ * Get an annotation describing a change in the availabilityState to Available from Unavailable with a reasonType of type Unplanned.
+ *
+ * @return the recentlyResolvedState value
+ */
+ public AvailabilityStatusPropertiesRecentlyResolvedState recentlyResolvedState() {
+ return this.recentlyResolvedState;
+ }
+
+ /**
+ * Set an annotation describing a change in the availabilityState to Available from Unavailable with a reasonType of type Unplanned.
+ *
+ * @param recentlyResolvedState the recentlyResolvedState value to set
+ * @return the AvailabilityStatusProperties object itself.
+ */
+ public AvailabilityStatusProperties withRecentlyResolvedState(AvailabilityStatusPropertiesRecentlyResolvedState recentlyResolvedState) {
+ this.recentlyResolvedState = recentlyResolvedState;
+ return this;
+ }
+
+ /**
+ * Get lists actions the user can take based on the current availabilityState of the resource.
+ *
+ * @return the recommendedActions value
+ */
+ public List recommendedActions() {
+ return this.recommendedActions;
+ }
+
+ /**
+ * Set lists actions the user can take based on the current availabilityState of the resource.
+ *
+ * @param recommendedActions the recommendedActions value to set
+ * @return the AvailabilityStatusProperties object itself.
+ */
+ public AvailabilityStatusProperties withRecommendedActions(List recommendedActions) {
+ this.recommendedActions = recommendedActions;
+ return this;
+ }
+
+ /**
+ * Get lists the service impacting events that may be affecting the health of the resource.
+ *
+ * @return the serviceImpactingEvents value
+ */
+ public List serviceImpactingEvents() {
+ return this.serviceImpactingEvents;
+ }
+
+ /**
+ * Set lists the service impacting events that may be affecting the health of the resource.
+ *
+ * @param serviceImpactingEvents the serviceImpactingEvents value to set
+ * @return the AvailabilityStatusProperties object itself.
+ */
+ public AvailabilityStatusProperties withServiceImpactingEvents(List serviceImpactingEvents) {
+ this.serviceImpactingEvents = serviceImpactingEvents;
+ return this;
+ }
+
+}
diff --git a/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/AvailabilityStatusPropertiesRecentlyResolvedState.java b/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/AvailabilityStatusPropertiesRecentlyResolvedState.java
new file mode 100644
index 000000000000..7b3a4227c3ea
--- /dev/null
+++ b/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/AvailabilityStatusPropertiesRecentlyResolvedState.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.resourcehealth.v2015_01_01;
+
+import org.joda.time.DateTime;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * An annotation describing a change in the availabilityState to Available from
+ * Unavailable with a reasonType of type Unplanned.
+ */
+public class AvailabilityStatusPropertiesRecentlyResolvedState {
+ /**
+ * Timestamp for when the availabilityState changed to Unavailable.
+ */
+ @JsonProperty(value = "unavailableOccurredTime")
+ private DateTime unavailableOccurredTime;
+
+ /**
+ * Timestamp when the availabilityState changes to Available.
+ */
+ @JsonProperty(value = "resolvedTime")
+ private DateTime resolvedTime;
+
+ /**
+ * Brief description of cause of the resource becoming unavailable.
+ */
+ @JsonProperty(value = "unavailabilitySummary")
+ private String unavailabilitySummary;
+
+ /**
+ * Get timestamp for when the availabilityState changed to Unavailable.
+ *
+ * @return the unavailableOccurredTime value
+ */
+ public DateTime unavailableOccurredTime() {
+ return this.unavailableOccurredTime;
+ }
+
+ /**
+ * Set timestamp for when the availabilityState changed to Unavailable.
+ *
+ * @param unavailableOccurredTime the unavailableOccurredTime value to set
+ * @return the AvailabilityStatusPropertiesRecentlyResolvedState object itself.
+ */
+ public AvailabilityStatusPropertiesRecentlyResolvedState withUnavailableOccurredTime(DateTime unavailableOccurredTime) {
+ this.unavailableOccurredTime = unavailableOccurredTime;
+ return this;
+ }
+
+ /**
+ * Get timestamp when the availabilityState changes to Available.
+ *
+ * @return the resolvedTime value
+ */
+ public DateTime resolvedTime() {
+ return this.resolvedTime;
+ }
+
+ /**
+ * Set timestamp when the availabilityState changes to Available.
+ *
+ * @param resolvedTime the resolvedTime value to set
+ * @return the AvailabilityStatusPropertiesRecentlyResolvedState object itself.
+ */
+ public AvailabilityStatusPropertiesRecentlyResolvedState withResolvedTime(DateTime resolvedTime) {
+ this.resolvedTime = resolvedTime;
+ return this;
+ }
+
+ /**
+ * Get brief description of cause of the resource becoming unavailable.
+ *
+ * @return the unavailabilitySummary value
+ */
+ public String unavailabilitySummary() {
+ return this.unavailabilitySummary;
+ }
+
+ /**
+ * Set brief description of cause of the resource becoming unavailable.
+ *
+ * @param unavailabilitySummary the unavailabilitySummary value to set
+ * @return the AvailabilityStatusPropertiesRecentlyResolvedState object itself.
+ */
+ public AvailabilityStatusPropertiesRecentlyResolvedState withUnavailabilitySummary(String unavailabilitySummary) {
+ this.unavailabilitySummary = unavailabilitySummary;
+ return this;
+ }
+
+}
diff --git a/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/AvailabilityStatuses.java b/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/AvailabilityStatuses.java
new file mode 100644
index 000000000000..7a4167fdc1ec
--- /dev/null
+++ b/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/AvailabilityStatuses.java
@@ -0,0 +1,39 @@
+/**
+ * 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.resourcehealth.v2015_01_01;
+
+import com.microsoft.azure.arm.resources.collection.SupportsListingByResourceGroup;
+import com.microsoft.azure.arm.collection.SupportsListing;
+import rx.Observable;
+import com.microsoft.azure.management.resourcehealth.v2015_01_01.implementation.AvailabilityStatusesInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing AvailabilityStatuses.
+ */
+public interface AvailabilityStatuses extends SupportsListingByResourceGroup, SupportsListing, HasInner {
+ /**
+ * Gets current availability status for a single resource.
+ *
+ * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type. Currently the API support not nested and one nesting level resource types : /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} and /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getByResourceAsync(String resourceUri);
+
+ /**
+ * Lists the historical availability statuses for a single resource. Use the nextLink property in the response to get the next page of availability status.
+ *
+ * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type. Currently the API support not nested and one nesting level resource types : /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} and /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable list1Async(final String resourceUri);
+
+}
diff --git a/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/ChildAvailabilityStatuses.java b/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/ChildAvailabilityStatuses.java
new file mode 100644
index 000000000000..eb469b6bfc92
--- /dev/null
+++ b/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/ChildAvailabilityStatuses.java
@@ -0,0 +1,37 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.resourcehealth.v2015_01_01;
+
+import rx.Observable;
+import com.microsoft.azure.management.resourcehealth.v2015_01_01.implementation.ChildAvailabilityStatusesInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing ChildAvailabilityStatuses.
+ */
+public interface ChildAvailabilityStatuses extends HasInner {
+ /**
+ * Gets current availability status for a single resource.
+ *
+ * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type. Currently the API only support one nesting level resource types : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getByResourceAsync(String resourceUri);
+
+ /**
+ * Lists the historical availability statuses for a single child resource. Use the nextLink property in the response to get the next page of availability status.
+ *
+ * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type. Currently the API only support one nesting level resource types : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listAsync(final String resourceUri);
+
+}
diff --git a/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/ChildResources.java b/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/ChildResources.java
new file mode 100644
index 000000000000..6a177870e124
--- /dev/null
+++ b/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/ChildResources.java
@@ -0,0 +1,28 @@
+/**
+ * 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.resourcehealth.v2015_01_01;
+
+import rx.Observable;
+import com.microsoft.azure.management.resourcehealth.v2015_01_01.implementation.ChildResourcesInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing ChildResources.
+ */
+public interface ChildResources extends HasInner {
+ /**
+ * Lists the all the children and its current health status for a parent resource. Use the nextLink property in the response to get the next page of children current health.
+ *
+ * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type. Currently the API only support not nested parent resource type: /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name}
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listAsync(final String resourceUri);
+
+}
diff --git a/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/ErrorResponse.java b/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/ErrorResponse.java
new file mode 100644
index 000000000000..7d72d5a582f5
--- /dev/null
+++ b/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/ErrorResponse.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.resourcehealth.v2015_01_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Error details.
+ */
+public class ErrorResponse {
+ /**
+ * The error code.
+ */
+ @JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY)
+ private String code;
+
+ /**
+ * The error message.
+ */
+ @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY)
+ private String message;
+
+ /**
+ * The error details.
+ */
+ @JsonProperty(value = "details", access = JsonProperty.Access.WRITE_ONLY)
+ private String details;
+
+ /**
+ * Get the error code.
+ *
+ * @return the code value
+ */
+ public String code() {
+ return this.code;
+ }
+
+ /**
+ * Get the error message.
+ *
+ * @return the message value
+ */
+ public String message() {
+ return this.message;
+ }
+
+ /**
+ * Get the error details.
+ *
+ * @return the details value
+ */
+ public String details() {
+ return this.details;
+ }
+
+}
diff --git a/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/ErrorResponseException.java b/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/ErrorResponseException.java
new file mode 100644
index 000000000000..d3f7116fac3e
--- /dev/null
+++ b/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/ErrorResponseException.java
@@ -0,0 +1,44 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.resourcehealth.v2015_01_01;
+
+import com.microsoft.rest.RestException;
+import okhttp3.ResponseBody;
+import retrofit2.Response;
+
+/**
+ * Exception thrown for an invalid response with ErrorResponse information.
+ */
+public class ErrorResponseException extends RestException {
+ /**
+ * Initializes a new instance of the ErrorResponseException class.
+ *
+ * @param message the exception message or the response content if a message is not available
+ * @param response the HTTP response
+ */
+ public ErrorResponseException(final String message, final Response response) {
+ super(message, response);
+ }
+
+ /**
+ * Initializes a new instance of the ErrorResponseException class.
+ *
+ * @param message the exception message or the response content if a message is not available
+ * @param response the HTTP response
+ * @param body the deserialized response body
+ */
+ public ErrorResponseException(final String message, final Response response, final ErrorResponse body) {
+ super(message, response, body);
+ }
+
+ @Override
+ public ErrorResponse body() {
+ return (ErrorResponse) super.body();
+ }
+}
diff --git a/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/OperationDisplay.java b/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/OperationDisplay.java
new file mode 100644
index 000000000000..23bcceb106fb
--- /dev/null
+++ b/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/OperationDisplay.java
@@ -0,0 +1,121 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.resourcehealth.v2015_01_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Properties of the operation.
+ */
+public class OperationDisplay {
+ /**
+ * Provider name.
+ */
+ @JsonProperty(value = "provider")
+ private String provider;
+
+ /**
+ * Resource name.
+ */
+ @JsonProperty(value = "resource")
+ private String resource;
+
+ /**
+ * Operation name.
+ */
+ @JsonProperty(value = "operation")
+ private String operation;
+
+ /**
+ * Description of the operation.
+ */
+ @JsonProperty(value = "description")
+ private String description;
+
+ /**
+ * Get provider name.
+ *
+ * @return the provider value
+ */
+ public String provider() {
+ return this.provider;
+ }
+
+ /**
+ * Set provider name.
+ *
+ * @param provider the provider value to set
+ * @return the OperationDisplay object itself.
+ */
+ public OperationDisplay withProvider(String provider) {
+ this.provider = provider;
+ return this;
+ }
+
+ /**
+ * Get resource name.
+ *
+ * @return the resource value
+ */
+ public String resource() {
+ return this.resource;
+ }
+
+ /**
+ * Set resource name.
+ *
+ * @param resource the resource value to set
+ * @return the OperationDisplay object itself.
+ */
+ public OperationDisplay withResource(String resource) {
+ this.resource = resource;
+ return this;
+ }
+
+ /**
+ * Get operation name.
+ *
+ * @return the operation value
+ */
+ public String operation() {
+ return this.operation;
+ }
+
+ /**
+ * Set operation name.
+ *
+ * @param operation the operation value to set
+ * @return the OperationDisplay object itself.
+ */
+ public OperationDisplay withOperation(String operation) {
+ this.operation = operation;
+ return this;
+ }
+
+ /**
+ * Get description of the operation.
+ *
+ * @return the description value
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Set description of the operation.
+ *
+ * @param description the description value to set
+ * @return the OperationDisplay object itself.
+ */
+ public OperationDisplay withDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+}
diff --git a/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/OperationListResult.java b/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/OperationListResult.java
new file mode 100644
index 000000000000..3a47786e7114
--- /dev/null
+++ b/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/OperationListResult.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.resourcehealth.v2015_01_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.resourcehealth.v2015_01_01.implementation.ResourceHealthManager;
+import com.microsoft.azure.management.resourcehealth.v2015_01_01.implementation.OperationListResultInner;
+import com.microsoft.azure.management.resourcehealth.v2015_01_01.implementation.OperationInner;
+import java.util.List;
+
+/**
+ * Type representing OperationListResult.
+ */
+public interface OperationListResult extends HasInner, HasManager {
+ /**
+ * @return the value value.
+ */
+ List value();
+
+}
diff --git a/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/Operations.java b/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/Operations.java
new file mode 100644
index 000000000000..ed7e0fb3c084
--- /dev/null
+++ b/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/Operations.java
@@ -0,0 +1,27 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.resourcehealth.v2015_01_01;
+
+import rx.Observable;
+import com.microsoft.azure.management.resourcehealth.v2015_01_01.implementation.OperationsInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing Operations.
+ */
+public interface Operations extends HasInner {
+ /**
+ * Lists available operations for the resourcehealth resource provider.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listAsync();
+
+}
diff --git a/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/ReasonChronicityTypes.java b/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/ReasonChronicityTypes.java
new file mode 100644
index 000000000000..d38e7582f717
--- /dev/null
+++ b/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/ReasonChronicityTypes.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.resourcehealth.v2015_01_01;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Defines values for ReasonChronicityTypes.
+ */
+public enum ReasonChronicityTypes {
+ /** Enum value Transient. */
+ TRANSIENT("Transient"),
+
+ /** Enum value Persistent. */
+ PERSISTENT("Persistent");
+
+ /** The actual serialized value for a ReasonChronicityTypes instance. */
+ private String value;
+
+ ReasonChronicityTypes(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Parses a serialized value to a ReasonChronicityTypes instance.
+ *
+ * @param value the serialized value to parse.
+ * @return the parsed ReasonChronicityTypes object, or null if unable to parse.
+ */
+ @JsonCreator
+ public static ReasonChronicityTypes fromString(String value) {
+ ReasonChronicityTypes[] items = ReasonChronicityTypes.values();
+ for (ReasonChronicityTypes item : items) {
+ if (item.toString().equalsIgnoreCase(value)) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ @JsonValue
+ @Override
+ public String toString() {
+ return this.value;
+ }
+}
diff --git a/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/RecommendedAction.java b/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/RecommendedAction.java
new file mode 100644
index 000000000000..466b41dee1c5
--- /dev/null
+++ b/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/RecommendedAction.java
@@ -0,0 +1,96 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.resourcehealth.v2015_01_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Lists actions the user can take based on the current availabilityState of
+ * the resource.
+ */
+public class RecommendedAction {
+ /**
+ * Recommended action.
+ */
+ @JsonProperty(value = "action")
+ private String action;
+
+ /**
+ * Link to the action.
+ */
+ @JsonProperty(value = "actionUrl")
+ private String actionUrl;
+
+ /**
+ * Substring of action, it describes which text should host the action url.
+ */
+ @JsonProperty(value = "actionUrlText")
+ private String actionUrlText;
+
+ /**
+ * Get recommended action.
+ *
+ * @return the action value
+ */
+ public String action() {
+ return this.action;
+ }
+
+ /**
+ * Set recommended action.
+ *
+ * @param action the action value to set
+ * @return the RecommendedAction object itself.
+ */
+ public RecommendedAction withAction(String action) {
+ this.action = action;
+ return this;
+ }
+
+ /**
+ * Get link to the action.
+ *
+ * @return the actionUrl value
+ */
+ public String actionUrl() {
+ return this.actionUrl;
+ }
+
+ /**
+ * Set link to the action.
+ *
+ * @param actionUrl the actionUrl value to set
+ * @return the RecommendedAction object itself.
+ */
+ public RecommendedAction withActionUrl(String actionUrl) {
+ this.actionUrl = actionUrl;
+ return this;
+ }
+
+ /**
+ * Get substring of action, it describes which text should host the action url.
+ *
+ * @return the actionUrlText value
+ */
+ public String actionUrlText() {
+ return this.actionUrlText;
+ }
+
+ /**
+ * Set substring of action, it describes which text should host the action url.
+ *
+ * @param actionUrlText the actionUrlText value to set
+ * @return the RecommendedAction object itself.
+ */
+ public RecommendedAction withActionUrlText(String actionUrlText) {
+ this.actionUrlText = actionUrlText;
+ return this;
+ }
+
+}
diff --git a/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/ServiceImpactingEvent.java b/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/ServiceImpactingEvent.java
new file mode 100644
index 000000000000..7ea8f5c1e535
--- /dev/null
+++ b/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/ServiceImpactingEvent.java
@@ -0,0 +1,149 @@
+/**
+ * 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.resourcehealth.v2015_01_01;
+
+import org.joda.time.DateTime;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Lists the service impacting events that may be affecting the health of the
+ * resource.
+ */
+public class ServiceImpactingEvent {
+ /**
+ * Timestamp for when the event started.
+ */
+ @JsonProperty(value = "eventStartTime")
+ private DateTime eventStartTime;
+
+ /**
+ * Timestamp for when event was submitted/detected.
+ */
+ @JsonProperty(value = "eventStatusLastModifiedTime")
+ private DateTime eventStatusLastModifiedTime;
+
+ /**
+ * Correlation id for the event.
+ */
+ @JsonProperty(value = "correlationId")
+ private String correlationId;
+
+ /**
+ * Status of the service impacting event.
+ */
+ @JsonProperty(value = "status")
+ private ServiceImpactingEventStatus status;
+
+ /**
+ * Properties of the service impacting event.
+ */
+ @JsonProperty(value = "incidentProperties")
+ private ServiceImpactingEventIncidentProperties incidentProperties;
+
+ /**
+ * Get timestamp for when the event started.
+ *
+ * @return the eventStartTime value
+ */
+ public DateTime eventStartTime() {
+ return this.eventStartTime;
+ }
+
+ /**
+ * Set timestamp for when the event started.
+ *
+ * @param eventStartTime the eventStartTime value to set
+ * @return the ServiceImpactingEvent object itself.
+ */
+ public ServiceImpactingEvent withEventStartTime(DateTime eventStartTime) {
+ this.eventStartTime = eventStartTime;
+ return this;
+ }
+
+ /**
+ * Get timestamp for when event was submitted/detected.
+ *
+ * @return the eventStatusLastModifiedTime value
+ */
+ public DateTime eventStatusLastModifiedTime() {
+ return this.eventStatusLastModifiedTime;
+ }
+
+ /**
+ * Set timestamp for when event was submitted/detected.
+ *
+ * @param eventStatusLastModifiedTime the eventStatusLastModifiedTime value to set
+ * @return the ServiceImpactingEvent object itself.
+ */
+ public ServiceImpactingEvent withEventStatusLastModifiedTime(DateTime eventStatusLastModifiedTime) {
+ this.eventStatusLastModifiedTime = eventStatusLastModifiedTime;
+ return this;
+ }
+
+ /**
+ * Get correlation id for the event.
+ *
+ * @return the correlationId value
+ */
+ public String correlationId() {
+ return this.correlationId;
+ }
+
+ /**
+ * Set correlation id for the event.
+ *
+ * @param correlationId the correlationId value to set
+ * @return the ServiceImpactingEvent object itself.
+ */
+ public ServiceImpactingEvent withCorrelationId(String correlationId) {
+ this.correlationId = correlationId;
+ return this;
+ }
+
+ /**
+ * Get status of the service impacting event.
+ *
+ * @return the status value
+ */
+ public ServiceImpactingEventStatus status() {
+ return this.status;
+ }
+
+ /**
+ * Set status of the service impacting event.
+ *
+ * @param status the status value to set
+ * @return the ServiceImpactingEvent object itself.
+ */
+ public ServiceImpactingEvent withStatus(ServiceImpactingEventStatus status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get properties of the service impacting event.
+ *
+ * @return the incidentProperties value
+ */
+ public ServiceImpactingEventIncidentProperties incidentProperties() {
+ return this.incidentProperties;
+ }
+
+ /**
+ * Set properties of the service impacting event.
+ *
+ * @param incidentProperties the incidentProperties value to set
+ * @return the ServiceImpactingEvent object itself.
+ */
+ public ServiceImpactingEvent withIncidentProperties(ServiceImpactingEventIncidentProperties incidentProperties) {
+ this.incidentProperties = incidentProperties;
+ return this;
+ }
+
+}
diff --git a/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/ServiceImpactingEventIncidentProperties.java b/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/ServiceImpactingEventIncidentProperties.java
new file mode 100644
index 000000000000..363dc8271c70
--- /dev/null
+++ b/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/ServiceImpactingEventIncidentProperties.java
@@ -0,0 +1,121 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.resourcehealth.v2015_01_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Properties of the service impacting event.
+ */
+public class ServiceImpactingEventIncidentProperties {
+ /**
+ * Title of the incident.
+ */
+ @JsonProperty(value = "title")
+ private String title;
+
+ /**
+ * Service impacted by the event.
+ */
+ @JsonProperty(value = "service")
+ private String service;
+
+ /**
+ * Region impacted by the event.
+ */
+ @JsonProperty(value = "region")
+ private String region;
+
+ /**
+ * Type of Event.
+ */
+ @JsonProperty(value = "incidentType")
+ private String incidentType;
+
+ /**
+ * Get title of the incident.
+ *
+ * @return the title value
+ */
+ public String title() {
+ return this.title;
+ }
+
+ /**
+ * Set title of the incident.
+ *
+ * @param title the title value to set
+ * @return the ServiceImpactingEventIncidentProperties object itself.
+ */
+ public ServiceImpactingEventIncidentProperties withTitle(String title) {
+ this.title = title;
+ return this;
+ }
+
+ /**
+ * Get service impacted by the event.
+ *
+ * @return the service value
+ */
+ public String service() {
+ return this.service;
+ }
+
+ /**
+ * Set service impacted by the event.
+ *
+ * @param service the service value to set
+ * @return the ServiceImpactingEventIncidentProperties object itself.
+ */
+ public ServiceImpactingEventIncidentProperties withService(String service) {
+ this.service = service;
+ return this;
+ }
+
+ /**
+ * Get region impacted by the event.
+ *
+ * @return the region value
+ */
+ public String region() {
+ return this.region;
+ }
+
+ /**
+ * Set region impacted by the event.
+ *
+ * @param region the region value to set
+ * @return the ServiceImpactingEventIncidentProperties object itself.
+ */
+ public ServiceImpactingEventIncidentProperties withRegion(String region) {
+ this.region = region;
+ return this;
+ }
+
+ /**
+ * Get type of Event.
+ *
+ * @return the incidentType value
+ */
+ public String incidentType() {
+ return this.incidentType;
+ }
+
+ /**
+ * Set type of Event.
+ *
+ * @param incidentType the incidentType value to set
+ * @return the ServiceImpactingEventIncidentProperties object itself.
+ */
+ public ServiceImpactingEventIncidentProperties withIncidentType(String incidentType) {
+ this.incidentType = incidentType;
+ return this;
+ }
+
+}
diff --git a/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/ServiceImpactingEventStatus.java b/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/ServiceImpactingEventStatus.java
new file mode 100644
index 000000000000..b8e3e85be917
--- /dev/null
+++ b/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/ServiceImpactingEventStatus.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.resourcehealth.v2015_01_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Status of the service impacting event.
+ */
+public class ServiceImpactingEventStatus {
+ /**
+ * Current status of the event.
+ */
+ @JsonProperty(value = "value")
+ private String value;
+
+ /**
+ * Get current status of the event.
+ *
+ * @return the value value
+ */
+ public String value() {
+ return this.value;
+ }
+
+ /**
+ * Set current status of the event.
+ *
+ * @param value the value value to set
+ * @return the ServiceImpactingEventStatus object itself.
+ */
+ public ServiceImpactingEventStatus withValue(String value) {
+ this.value = value;
+ return this;
+ }
+
+}
diff --git a/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/implementation/AvailabilityStatusImpl.java b/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/implementation/AvailabilityStatusImpl.java
new file mode 100644
index 000000000000..ebef24e69c24
--- /dev/null
+++ b/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/implementation/AvailabilityStatusImpl.java
@@ -0,0 +1,57 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ *
+ */
+
+package com.microsoft.azure.management.resourcehealth.v2015_01_01.implementation;
+
+import com.microsoft.azure.management.resourcehealth.v2015_01_01.AvailabilityStatus;
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import rx.Observable;
+import com.microsoft.azure.management.resourcehealth.v2015_01_01.AvailabilityStatusProperties;
+
+class AvailabilityStatusImpl extends WrapperImpl implements AvailabilityStatus {
+ private final ResourceHealthManager manager;
+
+ AvailabilityStatusImpl(AvailabilityStatusInner inner, ResourceHealthManager manager) {
+ super(inner);
+ this.manager = manager;
+ }
+
+ @Override
+ public ResourceHealthManager manager() {
+ return this.manager;
+ }
+
+
+
+ @Override
+ public String id() {
+ return this.inner().id();
+ }
+
+ @Override
+ public String location() {
+ return this.inner().location();
+ }
+
+ @Override
+ public String name() {
+ return this.inner().name();
+ }
+
+ @Override
+ public AvailabilityStatusProperties properties() {
+ return this.inner().properties();
+ }
+
+ @Override
+ public String type() {
+ return this.inner().type();
+ }
+
+}
diff --git a/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/implementation/AvailabilityStatusInner.java b/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/implementation/AvailabilityStatusInner.java
new file mode 100644
index 000000000000..bfc4cdadcce2
--- /dev/null
+++ b/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/implementation/AvailabilityStatusInner.java
@@ -0,0 +1,148 @@
+/**
+ * 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.resourcehealth.v2015_01_01.implementation;
+
+import com.microsoft.azure.management.resourcehealth.v2015_01_01.AvailabilityStatusProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * availabilityStatus of a resource.
+ */
+public class AvailabilityStatusInner {
+ /**
+ * Azure Resource Manager Identity for the availabilityStatuses resource.
+ */
+ @JsonProperty(value = "id")
+ private String id;
+
+ /**
+ * current.
+ */
+ @JsonProperty(value = "name")
+ private String name;
+
+ /**
+ * Microsoft.ResourceHealth/AvailabilityStatuses.
+ */
+ @JsonProperty(value = "type")
+ private String type;
+
+ /**
+ * Azure Resource Manager geo location of the resource.
+ */
+ @JsonProperty(value = "location")
+ private String location;
+
+ /**
+ * Properties of availability state.
+ */
+ @JsonProperty(value = "properties")
+ private AvailabilityStatusProperties properties;
+
+ /**
+ * Get azure Resource Manager Identity for the availabilityStatuses resource.
+ *
+ * @return the id value
+ */
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Set azure Resource Manager Identity for the availabilityStatuses resource.
+ *
+ * @param id the id value to set
+ * @return the AvailabilityStatusInner object itself.
+ */
+ public AvailabilityStatusInner withId(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Get current.
+ *
+ * @return the name value
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set current.
+ *
+ * @param name the name value to set
+ * @return the AvailabilityStatusInner object itself.
+ */
+ public AvailabilityStatusInner withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get microsoft.ResourceHealth/AvailabilityStatuses.
+ *
+ * @return the type value
+ */
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Set microsoft.ResourceHealth/AvailabilityStatuses.
+ *
+ * @param type the type value to set
+ * @return the AvailabilityStatusInner object itself.
+ */
+ public AvailabilityStatusInner withType(String type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * Get azure Resource Manager geo location of the resource.
+ *
+ * @return the location value
+ */
+ public String location() {
+ return this.location;
+ }
+
+ /**
+ * Set azure Resource Manager geo location of the resource.
+ *
+ * @param location the location value to set
+ * @return the AvailabilityStatusInner object itself.
+ */
+ public AvailabilityStatusInner withLocation(String location) {
+ this.location = location;
+ return this;
+ }
+
+ /**
+ * Get properties of availability state.
+ *
+ * @return the properties value
+ */
+ public AvailabilityStatusProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set properties of availability state.
+ *
+ * @param properties the properties value to set
+ * @return the AvailabilityStatusInner object itself.
+ */
+ public AvailabilityStatusInner withProperties(AvailabilityStatusProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+}
diff --git a/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/implementation/AvailabilityStatusesImpl.java b/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/implementation/AvailabilityStatusesImpl.java
new file mode 100644
index 000000000000..30dcb8196f80
--- /dev/null
+++ b/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/implementation/AvailabilityStatusesImpl.java
@@ -0,0 +1,122 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * jkl
+ */
+
+package com.microsoft.azure.management.resourcehealth.v2015_01_01.implementation;
+
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import com.microsoft.azure.management.resourcehealth.v2015_01_01.AvailabilityStatuses;
+import rx.Observable;
+import rx.functions.Func1;
+import com.microsoft.azure.PagedList;
+import com.microsoft.azure.Page;
+import com.microsoft.azure.management.resourcehealth.v2015_01_01.AvailabilityStatus;
+import com.microsoft.azure.arm.utils.PagedListConverter;
+
+class AvailabilityStatusesImpl extends WrapperImpl implements AvailabilityStatuses {
+ private PagedListConverter converter;
+ private final ResourceHealthManager manager;
+
+ AvailabilityStatusesImpl(ResourceHealthManager manager) {
+ super(manager.inner().availabilityStatuses());
+ this.manager = manager;
+ this.converter = new PagedListConverter() {
+ @Override
+ public Observable typeConvertAsync(AvailabilityStatusInner inner) {
+ return Observable.just((AvailabilityStatus) wrapModel(inner));
+ }
+ };
+ }
+
+ public ResourceHealthManager manager() {
+ return this.manager;
+ }
+
+ private AvailabilityStatusImpl wrapModel(AvailabilityStatusInner inner) {
+ return new AvailabilityStatusImpl(inner, manager());
+ }
+
+ @Override
+ public Observable getByResourceAsync(String resourceUri) {
+ AvailabilityStatusesInner client = this.inner();
+ return client.getByResourceAsync(resourceUri)
+ .map(new Func1() {
+ @Override
+ public AvailabilityStatus call(AvailabilityStatusInner inner) {
+ return new AvailabilityStatusImpl(inner, manager());
+ }
+ });
+ }
+
+ @Override
+ public Observable list1Async(final String resourceUri) {
+ AvailabilityStatusesInner client = this.inner();
+ return client.list1Async(resourceUri)
+ .flatMapIterable(new Func1, Iterable>() {
+ @Override
+ public Iterable call(Page page) {
+ return page.items();
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public AvailabilityStatus call(AvailabilityStatusInner inner) {
+ return new AvailabilityStatusImpl(inner, manager());
+ }
+ });
+ }
+
+ @Override
+ public PagedList list() {
+ AvailabilityStatusesInner client = this.inner();
+ return converter.convert(client.list());
+ }
+
+ @Override
+ public Observable listAsync() {
+ AvailabilityStatusesInner client = this.inner();
+ return client.listAsync()
+ .flatMapIterable(new Func1, Iterable>() {
+ @Override
+ public Iterable call(Page page) {
+ return page.items();
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public AvailabilityStatus call(AvailabilityStatusInner inner) {
+ return wrapModel(inner);
+ }
+ });
+ }
+
+ @Override
+ public PagedList listByResourceGroup(String resourceGroupName) {
+ AvailabilityStatusesInner client = this.inner();
+ return converter.convert(client.listByResourceGroup(resourceGroupName));
+ }
+
+ @Override
+ public Observable listByResourceGroupAsync(String resourceGroupName) {
+ AvailabilityStatusesInner client = this.inner();
+ return client.listByResourceGroupAsync(resourceGroupName)
+ .flatMapIterable(new Func1, Iterable>() {
+ @Override
+ public Iterable call(Page page) {
+ return page.items();
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public AvailabilityStatus call(AvailabilityStatusInner inner) {
+ return wrapModel(inner);
+ }
+ });
+ }
+
+}
diff --git a/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/implementation/AvailabilityStatusesInner.java b/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/implementation/AvailabilityStatusesInner.java
new file mode 100644
index 000000000000..a2bed791060d
--- /dev/null
+++ b/resourcehealth/resource-manager/v2015_01_01/src/main/java/com/microsoft/azure/management/resourcehealth/v2015_01_01/implementation/AvailabilityStatusesInner.java
@@ -0,0 +1,1262 @@
+/**
+ * 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.resourcehealth.v2015_01_01.implementation;
+
+import com.microsoft.azure.arm.collection.InnerSupportsListing;
+import retrofit2.Retrofit;
+import com.google.common.reflect.TypeToken;
+import com.microsoft.azure.AzureServiceFuture;
+import com.microsoft.azure.ListOperationCallback;
+import com.microsoft.azure.management.resourcehealth.v2015_01_01.ErrorResponseException;
+import com.microsoft.azure.Page;
+import com.microsoft.azure.PagedList;
+import com.microsoft.rest.ServiceCallback;
+import com.microsoft.rest.ServiceFuture;
+import com.microsoft.rest.ServiceResponse;
+import 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 AvailabilityStatuses.
+ */
+public class AvailabilityStatusesInner implements InnerSupportsListing {
+ /** The Retrofit service to perform REST calls. */
+ private AvailabilityStatusesService service;
+ /** The service client containing this operation class. */
+ private MicrosoftResourceHealthImpl client;
+
+ /**
+ * Initializes an instance of AvailabilityStatusesInner.
+ *
+ * @param retrofit the Retrofit instance built from a Retrofit Builder.
+ * @param client the instance of the service client containing this operation class.
+ */
+ public AvailabilityStatusesInner(Retrofit retrofit, MicrosoftResourceHealthImpl client) {
+ this.service = retrofit.create(AvailabilityStatusesService.class);
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for AvailabilityStatuses to be
+ * used by Retrofit to perform actually REST calls.
+ */
+ interface AvailabilityStatusesService {
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.resourcehealth.v2015_01_01.AvailabilityStatuses list" })
+ @GET("subscriptions/{subscriptionId}/providers/Microsoft.ResourceHealth/availabilityStatuses")
+ Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$filter") String filter, @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.resourcehealth.v2015_01_01.AvailabilityStatuses listByResourceGroup" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceHealth/availabilityStatuses")
+ Observable> listByResourceGroup(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Query("api-version") String apiVersion, @Query("$filter") String filter, @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.resourcehealth.v2015_01_01.AvailabilityStatuses getByResource" })
+ @GET("{resourceUri}/providers/Microsoft.ResourceHealth/availabilityStatuses/current")
+ Observable> getByResource(@Path(value = "resourceUri", encoded = true) String resourceUri, @Query("api-version") String apiVersion, @Query("$filter") String filter, @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.resourcehealth.v2015_01_01.AvailabilityStatuses list1" })
+ @GET("{resourceUri}/providers/Microsoft.ResourceHealth/availabilityStatuses")
+ Observable> list1(@Path(value = "resourceUri", encoded = true) String resourceUri, @Query("api-version") String apiVersion, @Query("$filter") String filter, @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.resourcehealth.v2015_01_01.AvailabilityStatuses listNext" })
+ @GET
+ Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.resourcehealth.v2015_01_01.AvailabilityStatuses listByResourceGroupNext" })
+ @GET
+ Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.resourcehealth.v2015_01_01.AvailabilityStatuses list1Next" })
+ @GET
+ Observable> list1Next(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ }
+
+ /**
+ * Lists the current availability status for all the resources in the subscription. Use the nextLink property in the response to get the next page of availability statuses.
+ *
+ * @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<AvailabilityStatusInner> 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();
+ }
+ };
+ }
+
+ /**
+ * Lists the current availability status for all the resources in the subscription. Use the nextLink property in the response to get the next page of availability statuses.
+ *
+ * @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);
+ }
+
+ /**
+ * Lists the current availability status for all the resources in the subscription. Use the nextLink property in the response to get the next page of availability statuses.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<AvailabilityStatusInner> object
+ */
+ public Observable> listAsync() {
+ return listWithServiceResponseAsync()
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Lists the current availability status for all the resources in the subscription. Use the nextLink property in the response to get the next page of availability statuses.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<AvailabilityStatusInner> 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));
+ }
+ });
+ }
+
+ /**
+ * Lists the current availability status for all the resources in the subscription. Use the nextLink property in the response to get the next page of availability statuses.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the PagedList<AvailabilityStatusInner> object wrapped in {@link ServiceResponse} if successful.
+ */
+ public Observable>> listSinglePageAsync() {
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ final String filter = null;
+ final String expand = null;
+ return service.list(this.client.subscriptionId(), this.client.apiVersion(), filter, expand, 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);
+ }
+ }
+ });
+ }
+
+ /**
+ * Lists the current availability status for all the resources in the subscription. Use the nextLink property in the response to get the next page of availability statuses.
+ *
+ * @param filter The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN
+ * @param expand Setting $expand=recommendedactions in url query expands the recommendedactions 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 PagedList<AvailabilityStatusInner> object if successful.
+ */
+ public PagedList list(final String filter, final String expand) {
+ ServiceResponse> response = listSinglePageAsync(filter, expand).toBlocking().single();
+ return new PagedList(response.body()) {
+ @Override
+ public Page nextPage(String nextPageLink) {
+ return listNextSinglePageAsync(nextPageLink).toBlocking().single().body();
+ }
+ };
+ }
+
+ /**
+ * Lists the current availability status for all the resources in the subscription. Use the nextLink property in the response to get the next page of availability statuses.
+ *
+ * @param filter The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN
+ * @param expand Setting $expand=recommendedactions in url query expands the recommendedactions 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> listAsync(final String filter, final String expand, final ListOperationCallback serviceCallback) {
+ return AzureServiceFuture.fromPageResponse(
+ listSinglePageAsync(filter, expand),
+ new Func1>>>() {
+ @Override
+ public Observable>> call(String nextPageLink) {
+ return listNextSinglePageAsync(nextPageLink);
+ }
+ },
+ serviceCallback);
+ }
+
+ /**
+ * Lists the current availability status for all the resources in the subscription. Use the nextLink property in the response to get the next page of availability statuses.
+ *
+ * @param filter The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN
+ * @param expand Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<AvailabilityStatusInner> object
+ */
+ public Observable> listAsync(final String filter, final String expand) {
+ return listWithServiceResponseAsync(filter, expand)
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Lists the current availability status for all the resources in the subscription. Use the nextLink property in the response to get the next page of availability statuses.
+ *
+ * @param filter The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN
+ * @param expand Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<AvailabilityStatusInner> object
+ */
+ public Observable>> listWithServiceResponseAsync(final String filter, final String expand) {
+ return listSinglePageAsync(filter, expand)
+ .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));
+ }
+ });
+ }
+
+ /**
+ * Lists the current availability status for all the resources in the subscription. Use the nextLink property in the response to get the next page of availability statuses.
+ *
+ ServiceResponse> * @param filter The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN
+ ServiceResponse> * @param expand Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the PagedList<AvailabilityStatusInner> object wrapped in {@link ServiceResponse} if successful.
+ */
+ public Observable>> listSinglePageAsync(final String filter, final String expand) {
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ return service.list(this.client.subscriptionId(), this.client.apiVersion(), filter, expand, this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>>() {
+ @Override
+ public Observable>> call(Response response) {
+ try {
+ ServiceResponse> result = listDelegate(response);
+ return Observable.just(new ServiceResponse>(result.body(), result.response()));
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken>() { }.getType())
+ .registerError(ErrorResponseException.class)
+ .build(response);
+ }
+
+ /**
+ * Lists the current availability status for all the resources in the resource group. Use the nextLink property in the response to get the next page of availability statuses.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @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<AvailabilityStatusInner> object if successful.
+ */
+ public PagedList listByResourceGroup(final String resourceGroupName) {
+ ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single();
+ return new PagedList(response.body()) {
+ @Override
+ public Page nextPage(String nextPageLink) {
+ return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body();
+ }
+ };
+ }
+
+ /**
+ * Lists the current availability status for all the resources in the resource group. Use the nextLink property in the response to get the next page of availability statuses.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) {
+ return AzureServiceFuture.fromPageResponse(
+ listByResourceGroupSinglePageAsync(resourceGroupName),
+ new Func1>>>() {
+ @Override
+ public Observable>> call(String nextPageLink) {
+ return listByResourceGroupNextSinglePageAsync(nextPageLink);
+ }
+ },
+ serviceCallback);
+ }
+
+ /**
+ * Lists the current availability status for all the resources in the resource group. Use the nextLink property in the response to get the next page of availability statuses.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<AvailabilityStatusInner> object
+ */
+ public Observable> listByResourceGroupAsync(final String resourceGroupName) {
+ return listByResourceGroupWithServiceResponseAsync(resourceGroupName)
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Lists the current availability status for all the resources in the resource group. Use the nextLink property in the response to get the next page of availability statuses.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<AvailabilityStatusInner> object
+ */
+ public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) {
+ return listByResourceGroupSinglePageAsync(resourceGroupName)
+ .concatMap(new Func1>, Observable>>>() {
+ @Override
+ public Observable>> call(ServiceResponse> page) {
+ String nextPageLink = page.body().nextPageLink();
+ if (nextPageLink == null) {
+ return Observable.just(page);
+ }
+ return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink));
+ }
+ });
+ }
+
+ /**
+ * Lists the current availability status for all the resources in the resource group. Use the nextLink property in the response to get the next page of availability statuses.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the PagedList<AvailabilityStatusInner> object wrapped in {@link ServiceResponse} if successful.
+ */
+ public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) {
+ 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 (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ final String filter = null;
+ final String expand = null;
+ return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, this.client.apiVersion(), filter, expand, this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>>() {
+ @Override
+ public Observable>> call(Response response) {
+ try {
+ ServiceResponse> result = listByResourceGroupDelegate(response);
+ return Observable.just(new ServiceResponse>(result.body(), result.response()));
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ /**
+ * Lists the current availability status for all the resources in the resource group. Use the nextLink property in the response to get the next page of availability statuses.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param filter The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN
+ * @param expand Setting $expand=recommendedactions in url query expands the recommendedactions 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 PagedList<AvailabilityStatusInner> object if successful.
+ */
+ public PagedList listByResourceGroup(final String resourceGroupName, final String filter, final String expand) {
+ ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName, filter, expand).toBlocking().single();
+ return new PagedList(response.body()) {
+ @Override
+ public Page nextPage(String nextPageLink) {
+ return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body();
+ }
+ };
+ }
+
+ /**
+ * Lists the current availability status for all the resources in the resource group. Use the nextLink property in the response to get the next page of availability statuses.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param filter The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN
+ * @param expand Setting $expand=recommendedactions in url query expands the recommendedactions 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> listByResourceGroupAsync(final String resourceGroupName, final String filter, final String expand, final ListOperationCallback serviceCallback) {
+ return AzureServiceFuture.fromPageResponse(
+ listByResourceGroupSinglePageAsync(resourceGroupName, filter, expand),
+ new Func1>>>() {
+ @Override
+ public Observable>> call(String nextPageLink) {
+ return listByResourceGroupNextSinglePageAsync(nextPageLink);
+ }
+ },
+ serviceCallback);
+ }
+
+ /**
+ * Lists the current availability status for all the resources in the resource group. Use the nextLink property in the response to get the next page of availability statuses.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param filter The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN
+ * @param expand Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<AvailabilityStatusInner> object
+ */
+ public Observable> listByResourceGroupAsync(final String resourceGroupName, final String filter, final String expand) {
+ return listByResourceGroupWithServiceResponseAsync(resourceGroupName, filter, expand)
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Lists the current availability status for all the resources in the resource group. Use the nextLink property in the response to get the next page of availability statuses.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param filter The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN
+ * @param expand Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<AvailabilityStatusInner> object
+ */
+ public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName, final String filter, final String expand) {
+ return listByResourceGroupSinglePageAsync(resourceGroupName, filter, expand)
+ .concatMap(new Func1>, Observable>>>() {
+ @Override
+ public Observable>> call(ServiceResponse> page) {
+ String nextPageLink = page.body().nextPageLink();
+ if (nextPageLink == null) {
+ return Observable.just(page);
+ }
+ return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink));
+ }
+ });
+ }
+
+ /**
+ * Lists the current availability status for all the resources in the resource group. Use the nextLink property in the response to get the next page of availability statuses.
+ *
+ ServiceResponse> * @param resourceGroupName The name of the resource group.
+ ServiceResponse> * @param filter The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN
+ ServiceResponse> * @param expand Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the PagedList<AvailabilityStatusInner> object wrapped in {@link ServiceResponse} if successful.
+ */
+ public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName, final String filter, final 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 (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, this.client.apiVersion(), filter, expand, this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>>() {
+ @Override
+ public Observable>> call(Response response) {
+ try {
+ ServiceResponse> result = listByResourceGroupDelegate(response);
+ return Observable.just(new ServiceResponse>(result.body(), result.response()));
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse> listByResourceGroupDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken>() { }.getType())
+ .registerError(ErrorResponseException.class)
+ .build(response);
+ }
+
+ /**
+ * Gets current availability status for a single resource.
+ *
+ * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type. Currently the API support not nested and one nesting level resource types : /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} and /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}
+ * @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 AvailabilityStatusInner object if successful.
+ */
+ public AvailabilityStatusInner getByResource(String resourceUri) {
+ return getByResourceWithServiceResponseAsync(resourceUri).toBlocking().single().body();
+ }
+
+ /**
+ * Gets current availability status for a single resource.
+ *
+ * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type. Currently the API support not nested and one nesting level resource types : /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} and /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}
+ * @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 getByResourceAsync(String resourceUri, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(getByResourceWithServiceResponseAsync(resourceUri), serviceCallback);
+ }
+
+ /**
+ * Gets current availability status for a single resource.
+ *
+ * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type. Currently the API support not nested and one nesting level resource types : /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} and /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the AvailabilityStatusInner object
+ */
+ public Observable getByResourceAsync(String resourceUri) {
+ return getByResourceWithServiceResponseAsync(resourceUri).map(new Func1, AvailabilityStatusInner>() {
+ @Override
+ public AvailabilityStatusInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Gets current availability status for a single resource.
+ *
+ * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type. Currently the API support not nested and one nesting level resource types : /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} and /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the AvailabilityStatusInner object
+ */
+ public Observable> getByResourceWithServiceResponseAsync(String resourceUri) {
+ if (resourceUri == null) {
+ throw new IllegalArgumentException("Parameter resourceUri is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ final String filter = null;
+ final String expand = null;
+ return service.getByResource(resourceUri, this.client.apiVersion(), filter, expand, this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = getByResourceDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ /**
+ * Gets current availability status for a single resource.
+ *
+ * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type. Currently the API support not nested and one nesting level resource types : /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} and /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}
+ * @param filter The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN
+ * @param expand Setting $expand=recommendedactions in url query expands the recommendedactions 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 AvailabilityStatusInner object if successful.
+ */
+ public AvailabilityStatusInner getByResource(String resourceUri, String filter, String expand) {
+ return getByResourceWithServiceResponseAsync(resourceUri, filter, expand).toBlocking().single().body();
+ }
+
+ /**
+ * Gets current availability status for a single resource.
+ *
+ * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type. Currently the API support not nested and one nesting level resource types : /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} and /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}
+ * @param filter The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN
+ * @param expand Setting $expand=recommendedactions in url query expands the recommendedactions 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 getByResourceAsync(String resourceUri, String filter, String expand, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(getByResourceWithServiceResponseAsync(resourceUri, filter, expand), serviceCallback);
+ }
+
+ /**
+ * Gets current availability status for a single resource.
+ *
+ * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type. Currently the API support not nested and one nesting level resource types : /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} and /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}
+ * @param filter The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN
+ * @param expand Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the AvailabilityStatusInner object
+ */
+ public Observable getByResourceAsync(String resourceUri, String filter, String expand) {
+ return getByResourceWithServiceResponseAsync(resourceUri, filter, expand).map(new Func1, AvailabilityStatusInner>() {
+ @Override
+ public AvailabilityStatusInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Gets current availability status for a single resource.
+ *
+ * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type. Currently the API support not nested and one nesting level resource types : /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} and /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}
+ * @param filter The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN
+ * @param expand Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the AvailabilityStatusInner object
+ */
+ public Observable> getByResourceWithServiceResponseAsync(String resourceUri, String filter, String expand) {
+ if (resourceUri == null) {
+ throw new IllegalArgumentException("Parameter resourceUri is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ return service.getByResource(resourceUri, this.client.apiVersion(), filter, expand, this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = getByResourceDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse getByResourceDelegate(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);
+ }
+
+ /**
+ * Lists the historical availability statuses for a single resource. Use the nextLink property in the response to get the next page of availability status.
+ *
+ * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type. Currently the API support not nested and one nesting level resource types : /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} and /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}
+ * @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<AvailabilityStatusInner> object if successful.
+ */
+ public PagedList list1(final String resourceUri) {
+ ServiceResponse> response = list1SinglePageAsync(resourceUri).toBlocking().single();
+ return new PagedList(response.body()) {
+ @Override
+ public Page nextPage(String nextPageLink) {
+ return list1NextSinglePageAsync(nextPageLink).toBlocking().single().body();
+ }
+ };
+ }
+
+ /**
+ * Lists the historical availability statuses for a single resource. Use the nextLink property in the response to get the next page of availability status.
+ *
+ * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type. Currently the API support not nested and one nesting level resource types : /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} and /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}
+ * @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> list1Async(final String resourceUri, final ListOperationCallback serviceCallback) {
+ return AzureServiceFuture.fromPageResponse(
+ list1SinglePageAsync(resourceUri),
+ new Func1>>>() {
+ @Override
+ public Observable>> call(String nextPageLink) {
+ return list1NextSinglePageAsync(nextPageLink);
+ }
+ },
+ serviceCallback);
+ }
+
+ /**
+ * Lists the historical availability statuses for a single resource. Use the nextLink property in the response to get the next page of availability status.
+ *
+ * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type. Currently the API support not nested and one nesting level resource types : /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} and /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<AvailabilityStatusInner> object
+ */
+ public Observable> list1Async(final String resourceUri) {
+ return list1WithServiceResponseAsync(resourceUri)
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Lists the historical availability statuses for a single resource. Use the nextLink property in the response to get the next page of availability status.
+ *
+ * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type. Currently the API support not nested and one nesting level resource types : /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} and /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<AvailabilityStatusInner> object
+ */
+ public Observable>> list1WithServiceResponseAsync(final String resourceUri) {
+ return list1SinglePageAsync(resourceUri)
+ .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(list1NextWithServiceResponseAsync(nextPageLink));
+ }
+ });
+ }
+
+ /**
+ * Lists the historical availability statuses for a single resource. Use the nextLink property in the response to get the next page of availability status.
+ *
+ * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type. Currently the API support not nested and one nesting level resource types : /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} and /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the PagedList<AvailabilityStatusInner> object wrapped in {@link ServiceResponse} if successful.
+ */
+ public Observable>> list1SinglePageAsync(final String resourceUri) {
+ if (resourceUri == null) {
+ throw new IllegalArgumentException("Parameter resourceUri is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ final String filter = null;
+ final String expand = null;
+ return service.list1(resourceUri, this.client.apiVersion(), filter, expand, this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>>() {
+ @Override
+ public Observable>> call(Response response) {
+ try {
+ ServiceResponse> result = list1Delegate(response);
+ return Observable.just(new ServiceResponse>(result.body(), result.response()));
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ /**
+ * Lists the historical availability statuses for a single resource. Use the nextLink property in the response to get the next page of availability status.
+ *
+ * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type. Currently the API support not nested and one nesting level resource types : /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} and /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}
+ * @param filter The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN
+ * @param expand Setting $expand=recommendedactions in url query expands the recommendedactions 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 PagedList<AvailabilityStatusInner> object if successful.
+ */
+ public PagedList list1(final String resourceUri, final String filter, final String expand) {
+ ServiceResponse> response = list1SinglePageAsync(resourceUri, filter, expand).toBlocking().single();
+ return new PagedList(response.body()) {
+ @Override
+ public Page nextPage(String nextPageLink) {
+ return list1NextSinglePageAsync(nextPageLink).toBlocking().single().body();
+ }
+ };
+ }
+
+ /**
+ * Lists the historical availability statuses for a single resource. Use the nextLink property in the response to get the next page of availability status.
+ *
+ * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type. Currently the API support not nested and one nesting level resource types : /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} and /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}
+ * @param filter The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN
+ * @param expand Setting $expand=recommendedactions in url query expands the recommendedactions 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> list1Async(final String resourceUri, final String filter, final String expand, final ListOperationCallback serviceCallback) {
+ return AzureServiceFuture.fromPageResponse(
+ list1SinglePageAsync(resourceUri, filter, expand),
+ new Func1>>>() {
+ @Override
+ public Observable>> call(String nextPageLink) {
+ return list1NextSinglePageAsync(nextPageLink);
+ }
+ },
+ serviceCallback);
+ }
+
+ /**
+ * Lists the historical availability statuses for a single resource. Use the nextLink property in the response to get the next page of availability status.
+ *
+ * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type. Currently the API support not nested and one nesting level resource types : /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} and /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}
+ * @param filter The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN
+ * @param expand Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<AvailabilityStatusInner> object
+ */
+ public Observable> list1Async(final String resourceUri, final String filter, final String expand) {
+ return list1WithServiceResponseAsync(resourceUri, filter, expand)
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Lists the historical availability statuses for a single resource. Use the nextLink property in the response to get the next page of availability status.
+ *
+ * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type. Currently the API support not nested and one nesting level resource types : /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} and /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}
+ * @param filter The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN
+ * @param expand Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<AvailabilityStatusInner> object
+ */
+ public Observable>> list1WithServiceResponseAsync(final String resourceUri, final String filter, final String expand) {
+ return list1SinglePageAsync(resourceUri, filter, expand)
+ .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(list1NextWithServiceResponseAsync(nextPageLink));
+ }
+ });
+ }
+
+ /**
+ * Lists the historical availability statuses for a single resource. Use the nextLink property in the response to get the next page of availability status.
+ *
+ ServiceResponse> * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type. Currently the API support not nested and one nesting level resource types : /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} and /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}
+ ServiceResponse> * @param filter The filter to apply on the operation. For more information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN
+ ServiceResponse> * @param expand Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the PagedList<AvailabilityStatusInner> object wrapped in {@link ServiceResponse} if successful.
+ */
+ public Observable>> list1SinglePageAsync(final String resourceUri, final String filter, final String expand) {
+ if (resourceUri == null) {
+ throw new IllegalArgumentException("Parameter resourceUri is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ return service.list1(resourceUri, this.client.apiVersion(), filter, expand, this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>>() {
+ @Override
+ public Observable>> call(Response response) {
+ try {
+ ServiceResponse> result = list1Delegate(response);
+ return Observable.just(new ServiceResponse>(result.body(), result.response()));
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse> list1Delegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().