diff --git a/hdinsight/resource-manager/v2015_03_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2015_03_01_preview/ApplicationGetHttpsEndpoint.java b/hdinsight/resource-manager/v2015_03_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2015_03_01_preview/ApplicationGetHttpsEndpoint.java index dd239dd523b7..6a89a2083f70 100644 --- a/hdinsight/resource-manager/v2015_03_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2015_03_01_preview/ApplicationGetHttpsEndpoint.java +++ b/hdinsight/resource-manager/v2015_03_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2015_03_01_preview/ApplicationGetHttpsEndpoint.java @@ -19,7 +19,7 @@ public class ApplicationGetHttpsEndpoint { * The list of access modes for the application. */ @JsonProperty(value = "accessModes") - private List accessModes; + private List accessModes; /** * The location of the endpoint. @@ -39,12 +39,25 @@ public class ApplicationGetHttpsEndpoint { @JsonProperty(value = "publicPort") private Integer publicPort; + /** + * The subDomainSuffix of the application and can not greater than 3 + * characters. + */ + @JsonProperty(value = "subDomainSuffix") + private String subDomainSuffix; + + /** + * The value indicates whether to disable GatewayAuth. + */ + @JsonProperty(value = "disableGatewayAuth") + private Boolean disableGatewayAuth; + /** * Get the list of access modes for the application. * * @return the accessModes value */ - public List accessModes() { + public List accessModes() { return this.accessModes; } @@ -54,7 +67,7 @@ public List accessModes() { * @param accessModes the accessModes value to set * @return the ApplicationGetHttpsEndpoint object itself. */ - public ApplicationGetHttpsEndpoint withAccessModes(List accessModes) { + public ApplicationGetHttpsEndpoint withAccessModes(List accessModes) { this.accessModes = accessModes; return this; } @@ -119,4 +132,44 @@ public ApplicationGetHttpsEndpoint withPublicPort(Integer publicPort) { return this; } + /** + * Get the subDomainSuffix of the application and can not greater than 3 characters. + * + * @return the subDomainSuffix value + */ + public String subDomainSuffix() { + return this.subDomainSuffix; + } + + /** + * Set the subDomainSuffix of the application and can not greater than 3 characters. + * + * @param subDomainSuffix the subDomainSuffix value to set + * @return the ApplicationGetHttpsEndpoint object itself. + */ + public ApplicationGetHttpsEndpoint withSubDomainSuffix(String subDomainSuffix) { + this.subDomainSuffix = subDomainSuffix; + return this; + } + + /** + * Get the value indicates whether to disable GatewayAuth. + * + * @return the disableGatewayAuth value + */ + public Boolean disableGatewayAuth() { + return this.disableGatewayAuth; + } + + /** + * Set the value indicates whether to disable GatewayAuth. + * + * @param disableGatewayAuth the disableGatewayAuth value to set + * @return the ApplicationGetHttpsEndpoint object itself. + */ + public ApplicationGetHttpsEndpoint withDisableGatewayAuth(Boolean disableGatewayAuth) { + this.disableGatewayAuth = disableGatewayAuth; + return this; + } + } diff --git a/hdinsight/resource-manager/v2015_03_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2015_03_01_preview/ApplicationHttpsEndpointAccessMode.java b/hdinsight/resource-manager/v2015_03_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2015_03_01_preview/ApplicationHttpsEndpointAccessMode.java new file mode 100644 index 000000000000..0a535ac28af4 --- /dev/null +++ b/hdinsight/resource-manager/v2015_03_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2015_03_01_preview/ApplicationHttpsEndpointAccessMode.java @@ -0,0 +1,38 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.hdinsight.v2015_03_01_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ApplicationHttpsEndpointAccessMode. + */ +public final class ApplicationHttpsEndpointAccessMode extends ExpandableStringEnum { + /** Static value WebPage for ApplicationHttpsEndpointAccessMode. */ + public static final ApplicationHttpsEndpointAccessMode WEB_PAGE = fromString("WebPage"); + + /** + * Creates or finds a ApplicationHttpsEndpointAccessMode from its string representation. + * @param name a name to look for + * @return the corresponding ApplicationHttpsEndpointAccessMode + */ + @JsonCreator + public static ApplicationHttpsEndpointAccessMode fromString(String name) { + return fromString(name, ApplicationHttpsEndpointAccessMode.class); + } + + /** + * @return known ApplicationHttpsEndpointAccessMode values + */ + public static Collection values() { + return values(ApplicationHttpsEndpointAccessMode.class); + } +} diff --git a/hdinsight/resource-manager/v2015_03_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2015_03_01_preview/ApplicationProperties.java b/hdinsight/resource-manager/v2015_03_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2015_03_01_preview/ApplicationProperties.java index d675073be994..118eb914225e 100644 --- a/hdinsight/resource-manager/v2015_03_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2015_03_01_preview/ApplicationProperties.java +++ b/hdinsight/resource-manager/v2015_03_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2015_03_01_preview/ApplicationProperties.java @@ -52,10 +52,11 @@ public class ApplicationProperties { private String provisioningState; /** - * The application type. + * The application type. Possible values include: 'CustomApplication', + * 'RServer'. */ @JsonProperty(value = "applicationType") - private String applicationType; + private ApplicationType applicationType; /** * The application state. @@ -191,21 +192,21 @@ public String provisioningState() { } /** - * Get the application type. + * Get the application type. Possible values include: 'CustomApplication', 'RServer'. * * @return the applicationType value */ - public String applicationType() { + public ApplicationType applicationType() { return this.applicationType; } /** - * Set the application type. + * Set the application type. Possible values include: 'CustomApplication', 'RServer'. * * @param applicationType the applicationType value to set * @return the ApplicationProperties object itself. */ - public ApplicationProperties withApplicationType(String applicationType) { + public ApplicationProperties withApplicationType(ApplicationType applicationType) { this.applicationType = applicationType; return this; } diff --git a/hdinsight/resource-manager/v2015_03_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2015_03_01_preview/ApplicationType.java b/hdinsight/resource-manager/v2015_03_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2015_03_01_preview/ApplicationType.java new file mode 100644 index 000000000000..eea897ee932f --- /dev/null +++ b/hdinsight/resource-manager/v2015_03_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2015_03_01_preview/ApplicationType.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.hdinsight.v2015_03_01_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ApplicationType. + */ +public final class ApplicationType extends ExpandableStringEnum { + /** Static value CustomApplication for ApplicationType. */ + public static final ApplicationType CUSTOM_APPLICATION = fromString("CustomApplication"); + + /** Static value RServer for ApplicationType. */ + public static final ApplicationType RSERVER = fromString("RServer"); + + /** + * Creates or finds a ApplicationType from its string representation. + * @param name a name to look for + * @return the corresponding ApplicationType + */ + @JsonCreator + public static ApplicationType fromString(String name) { + return fromString(name, ApplicationType.class); + } + + /** + * @return known ApplicationType values + */ + public static Collection values() { + return values(ApplicationType.class); + } +} diff --git a/hdinsight/resource-manager/v2015_03_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2015_03_01_preview/QuotaCapability.java b/hdinsight/resource-manager/v2015_03_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2015_03_01_preview/QuotaCapability.java index 617b9f05f32f..6c459b739d09 100644 --- a/hdinsight/resource-manager/v2015_03_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2015_03_01_preview/QuotaCapability.java +++ b/hdinsight/resource-manager/v2015_03_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2015_03_01_preview/QuotaCapability.java @@ -15,12 +15,64 @@ * The regional quota capability. */ public class QuotaCapability { + /** + * The number of cores used in the subscription. + */ + @JsonProperty(value = "cores_used") + private Long coresUsed; + + /** + * The number of cores that the subscription allowed. + */ + @JsonProperty(value = "max_cores_allowed") + private Long maxCoresAllowed; + /** * The list of region quota capabilities. */ @JsonProperty(value = "regionalQuotas") private List regionalQuotas; + /** + * Get the number of cores used in the subscription. + * + * @return the coresUsed value + */ + public Long coresUsed() { + return this.coresUsed; + } + + /** + * Set the number of cores used in the subscription. + * + * @param coresUsed the coresUsed value to set + * @return the QuotaCapability object itself. + */ + public QuotaCapability withCoresUsed(Long coresUsed) { + this.coresUsed = coresUsed; + return this; + } + + /** + * Get the number of cores that the subscription allowed. + * + * @return the maxCoresAllowed value + */ + public Long maxCoresAllowed() { + return this.maxCoresAllowed; + } + + /** + * Set the number of cores that the subscription allowed. + * + * @param maxCoresAllowed the maxCoresAllowed value to set + * @return the QuotaCapability object itself. + */ + public QuotaCapability withMaxCoresAllowed(Long maxCoresAllowed) { + this.maxCoresAllowed = maxCoresAllowed; + return this; + } + /** * Get the list of region quota capabilities. * diff --git a/hdinsight/resource-manager/v2015_03_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2015_03_01_preview/RegionalQuotaCapability.java b/hdinsight/resource-manager/v2015_03_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2015_03_01_preview/RegionalQuotaCapability.java index 24ce926a8128..ef45cbae68e9 100644 --- a/hdinsight/resource-manager/v2015_03_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2015_03_01_preview/RegionalQuotaCapability.java +++ b/hdinsight/resource-manager/v2015_03_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2015_03_01_preview/RegionalQuotaCapability.java @@ -27,7 +27,7 @@ public class RegionalQuotaCapability { private Long coresUsed; /** - * The number of courses available in the region. + * The number of cores available in the region. */ @JsonProperty(value = "cores_available") private Long coresAvailable; @@ -73,7 +73,7 @@ public RegionalQuotaCapability withCoresUsed(Long coresUsed) { } /** - * Get the number of courses available in the region. + * Get the number of cores available in the region. * * @return the coresAvailable value */ @@ -82,7 +82,7 @@ public Long coresAvailable() { } /** - * Set the number of courses available in the region. + * Set the number of cores available in the region. * * @param coresAvailable the coresAvailable value to set * @return the RegionalQuotaCapability object itself. diff --git a/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/ApplicationGetHttpsEndpoint.java b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/ApplicationGetHttpsEndpoint.java index bf7dd2218bd2..60e2340ee71d 100644 --- a/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/ApplicationGetHttpsEndpoint.java +++ b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/ApplicationGetHttpsEndpoint.java @@ -19,7 +19,7 @@ public class ApplicationGetHttpsEndpoint { * The list of access modes for the application. */ @JsonProperty(value = "accessModes") - private List accessModes; + private List accessModes; /** * The location of the endpoint. @@ -56,7 +56,7 @@ public class ApplicationGetHttpsEndpoint { * * @return the accessModes value */ - public List accessModes() { + public List accessModes() { return this.accessModes; } @@ -66,7 +66,7 @@ public List accessModes() { * @param accessModes the accessModes value to set * @return the ApplicationGetHttpsEndpoint object itself. */ - public ApplicationGetHttpsEndpoint withAccessModes(List accessModes) { + public ApplicationGetHttpsEndpoint withAccessModes(List accessModes) { this.accessModes = accessModes; return this; } diff --git a/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/ApplicationHttpsEndpointAccessMode.java b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/ApplicationHttpsEndpointAccessMode.java new file mode 100644 index 000000000000..c45fc0427a39 --- /dev/null +++ b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/ApplicationHttpsEndpointAccessMode.java @@ -0,0 +1,38 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.hdinsight.v2018_06_01_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ApplicationHttpsEndpointAccessMode. + */ +public final class ApplicationHttpsEndpointAccessMode extends ExpandableStringEnum { + /** Static value WebPage for ApplicationHttpsEndpointAccessMode. */ + public static final ApplicationHttpsEndpointAccessMode WEB_PAGE = fromString("WebPage"); + + /** + * Creates or finds a ApplicationHttpsEndpointAccessMode from its string representation. + * @param name a name to look for + * @return the corresponding ApplicationHttpsEndpointAccessMode + */ + @JsonCreator + public static ApplicationHttpsEndpointAccessMode fromString(String name) { + return fromString(name, ApplicationHttpsEndpointAccessMode.class); + } + + /** + * @return known ApplicationHttpsEndpointAccessMode values + */ + public static Collection values() { + return values(ApplicationHttpsEndpointAccessMode.class); + } +} diff --git a/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/ApplicationProperties.java b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/ApplicationProperties.java index 792ab60fea4c..6acc7600b67e 100644 --- a/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/ApplicationProperties.java +++ b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/ApplicationProperties.java @@ -52,10 +52,11 @@ public class ApplicationProperties { private String provisioningState; /** - * The application type. + * The application type. Possible values include: 'CustomApplication', + * 'RServer'. */ @JsonProperty(value = "applicationType") - private String applicationType; + private ApplicationType applicationType; /** * The application state. @@ -191,21 +192,21 @@ public String provisioningState() { } /** - * Get the application type. + * Get the application type. Possible values include: 'CustomApplication', 'RServer'. * * @return the applicationType value */ - public String applicationType() { + public ApplicationType applicationType() { return this.applicationType; } /** - * Set the application type. + * Set the application type. Possible values include: 'CustomApplication', 'RServer'. * * @param applicationType the applicationType value to set * @return the ApplicationProperties object itself. */ - public ApplicationProperties withApplicationType(String applicationType) { + public ApplicationProperties withApplicationType(ApplicationType applicationType) { this.applicationType = applicationType; return this; } diff --git a/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/ApplicationType.java b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/ApplicationType.java new file mode 100644 index 000000000000..8a403be5546f --- /dev/null +++ b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/ApplicationType.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.hdinsight.v2018_06_01_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ApplicationType. + */ +public final class ApplicationType extends ExpandableStringEnum { + /** Static value CustomApplication for ApplicationType. */ + public static final ApplicationType CUSTOM_APPLICATION = fromString("CustomApplication"); + + /** Static value RServer for ApplicationType. */ + public static final ApplicationType RSERVER = fromString("RServer"); + + /** + * Creates or finds a ApplicationType from its string representation. + * @param name a name to look for + * @return the corresponding ApplicationType + */ + @JsonCreator + public static ApplicationType fromString(String name) { + return fromString(name, ApplicationType.class); + } + + /** + * @return known ApplicationType values + */ + public static Collection values() { + return values(ApplicationType.class); + } +} diff --git a/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/CapabilitiesResult.java b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/CapabilitiesResult.java new file mode 100644 index 000000000000..eda0cf30f15f --- /dev/null +++ b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/CapabilitiesResult.java @@ -0,0 +1,52 @@ +/** + * 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.hdinsight.v2018_06_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.hdinsight.v2018_06_01_preview.implementation.HDInsightManager; +import com.microsoft.azure.management.hdinsight.v2018_06_01_preview.implementation.CapabilitiesResultInner; +import java.util.List; +import java.util.Map; + +/** + * Type representing CapabilitiesResult. + */ +public interface CapabilitiesResult extends HasInner, HasManager { + /** + * @return the features value. + */ + List features(); + + /** + * @return the quota value. + */ + QuotaCapability quota(); + + /** + * @return the regions value. + */ + Map regions(); + + /** + * @return the versions value. + */ + Map versions(); + + /** + * @return the vmSizeFilters value. + */ + List vmSizeFilters(); + + /** + * @return the vmSizes value. + */ + Map vmSizes(); + +} diff --git a/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/Locations.java b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/Locations.java index 66acca970af8..c93d7ec3cebd 100644 --- a/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/Locations.java +++ b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/Locations.java @@ -14,6 +14,15 @@ * Type representing Locations. */ public interface Locations { + /** + * Gets the capabilities for the specified location. + * + * @param location The Azure location (region) for which to make the request. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getCapabilitiesAsync(String location); + /** * Lists the usages for the specified location. * diff --git a/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/QuotaCapability.java b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/QuotaCapability.java new file mode 100644 index 000000000000..077067cafa17 --- /dev/null +++ b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/QuotaCapability.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.hdinsight.v2018_06_01_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The regional quota capability. + */ +public class QuotaCapability { + /** + * The number of cores used in the subscription. + */ + @JsonProperty(value = "cores_used") + private Long coresUsed; + + /** + * The number of cores that the subscription allowed. + */ + @JsonProperty(value = "max_cores_allowed") + private Long maxCoresAllowed; + + /** + * The list of region quota capabilities. + */ + @JsonProperty(value = "regionalQuotas") + private List regionalQuotas; + + /** + * Get the number of cores used in the subscription. + * + * @return the coresUsed value + */ + public Long coresUsed() { + return this.coresUsed; + } + + /** + * Set the number of cores used in the subscription. + * + * @param coresUsed the coresUsed value to set + * @return the QuotaCapability object itself. + */ + public QuotaCapability withCoresUsed(Long coresUsed) { + this.coresUsed = coresUsed; + return this; + } + + /** + * Get the number of cores that the subscription allowed. + * + * @return the maxCoresAllowed value + */ + public Long maxCoresAllowed() { + return this.maxCoresAllowed; + } + + /** + * Set the number of cores that the subscription allowed. + * + * @param maxCoresAllowed the maxCoresAllowed value to set + * @return the QuotaCapability object itself. + */ + public QuotaCapability withMaxCoresAllowed(Long maxCoresAllowed) { + this.maxCoresAllowed = maxCoresAllowed; + return this; + } + + /** + * Get the list of region quota capabilities. + * + * @return the regionalQuotas value + */ + public List regionalQuotas() { + return this.regionalQuotas; + } + + /** + * Set the list of region quota capabilities. + * + * @param regionalQuotas the regionalQuotas value to set + * @return the QuotaCapability object itself. + */ + public QuotaCapability withRegionalQuotas(List regionalQuotas) { + this.regionalQuotas = regionalQuotas; + return this; + } + +} diff --git a/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/RegionalQuotaCapability.java b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/RegionalQuotaCapability.java new file mode 100644 index 000000000000..2828f5129635 --- /dev/null +++ b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/RegionalQuotaCapability.java @@ -0,0 +1,95 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.hdinsight.v2018_06_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The regional quota capacity. + */ +public class RegionalQuotaCapability { + /** + * The region name. + */ + @JsonProperty(value = "region_name") + private String regionName; + + /** + * The number of cores used in the region. + */ + @JsonProperty(value = "cores_used") + private Long coresUsed; + + /** + * The number of cores available in the region. + */ + @JsonProperty(value = "cores_available") + private Long coresAvailable; + + /** + * Get the region name. + * + * @return the regionName value + */ + public String regionName() { + return this.regionName; + } + + /** + * Set the region name. + * + * @param regionName the regionName value to set + * @return the RegionalQuotaCapability object itself. + */ + public RegionalQuotaCapability withRegionName(String regionName) { + this.regionName = regionName; + return this; + } + + /** + * Get the number of cores used in the region. + * + * @return the coresUsed value + */ + public Long coresUsed() { + return this.coresUsed; + } + + /** + * Set the number of cores used in the region. + * + * @param coresUsed the coresUsed value to set + * @return the RegionalQuotaCapability object itself. + */ + public RegionalQuotaCapability withCoresUsed(Long coresUsed) { + this.coresUsed = coresUsed; + return this; + } + + /** + * Get the number of cores available in the region. + * + * @return the coresAvailable value + */ + public Long coresAvailable() { + return this.coresAvailable; + } + + /** + * Set the number of cores available in the region. + * + * @param coresAvailable the coresAvailable value to set + * @return the RegionalQuotaCapability object itself. + */ + public RegionalQuotaCapability withCoresAvailable(Long coresAvailable) { + this.coresAvailable = coresAvailable; + return this; + } + +} diff --git a/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/RegionsCapability.java b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/RegionsCapability.java new file mode 100644 index 000000000000..1cbe61192a3e --- /dev/null +++ b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/RegionsCapability.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.hdinsight.v2018_06_01_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The regions capability. + */ +public class RegionsCapability { + /** + * The list of region capabilities. + */ + @JsonProperty(value = "available") + private List available; + + /** + * Get the list of region capabilities. + * + * @return the available value + */ + public List available() { + return this.available; + } + + /** + * Set the list of region capabilities. + * + * @param available the available value to set + * @return the RegionsCapability object itself. + */ + public RegionsCapability withAvailable(List available) { + this.available = available; + return this; + } + +} diff --git a/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/VersionSpec.java b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/VersionSpec.java new file mode 100644 index 000000000000..9502ec2fa88a --- /dev/null +++ b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/VersionSpec.java @@ -0,0 +1,122 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.hdinsight.v2018_06_01_preview; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The version properties. + */ +public class VersionSpec { + /** + * The friendly name. + */ + @JsonProperty(value = "friendlyName") + private String friendlyName; + + /** + * The display name. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /** + * Whether or not the version is the default version. + */ + @JsonProperty(value = "isDefault") + private String isDefault; + + /** + * The component version property. + */ + @JsonProperty(value = "componentVersions") + private Map componentVersions; + + /** + * Get the friendly name. + * + * @return the friendlyName value + */ + public String friendlyName() { + return this.friendlyName; + } + + /** + * Set the friendly name. + * + * @param friendlyName the friendlyName value to set + * @return the VersionSpec object itself. + */ + public VersionSpec withFriendlyName(String friendlyName) { + this.friendlyName = friendlyName; + return this; + } + + /** + * Get the display name. + * + * @return the displayName value + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the display name. + * + * @param displayName the displayName value to set + * @return the VersionSpec object itself. + */ + public VersionSpec withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get whether or not the version is the default version. + * + * @return the isDefault value + */ + public String isDefault() { + return this.isDefault; + } + + /** + * Set whether or not the version is the default version. + * + * @param isDefault the isDefault value to set + * @return the VersionSpec object itself. + */ + public VersionSpec withIsDefault(String isDefault) { + this.isDefault = isDefault; + return this; + } + + /** + * Get the component version property. + * + * @return the componentVersions value + */ + public Map componentVersions() { + return this.componentVersions; + } + + /** + * Set the component version property. + * + * @param componentVersions the componentVersions value to set + * @return the VersionSpec object itself. + */ + public VersionSpec withComponentVersions(Map componentVersions) { + this.componentVersions = componentVersions; + return this; + } + +} diff --git a/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/VersionsCapability.java b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/VersionsCapability.java new file mode 100644 index 000000000000..d60c56864825 --- /dev/null +++ b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/VersionsCapability.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.hdinsight.v2018_06_01_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The version capability. + */ +public class VersionsCapability { + /** + * The list of version capabilities. + */ + @JsonProperty(value = "available") + private List available; + + /** + * Get the list of version capabilities. + * + * @return the available value + */ + public List available() { + return this.available; + } + + /** + * Set the list of version capabilities. + * + * @param available the available value to set + * @return the VersionsCapability object itself. + */ + public VersionsCapability withAvailable(List available) { + this.available = available; + return this; + } + +} diff --git a/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/VmSizeCompatibilityFilter.java b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/VmSizeCompatibilityFilter.java new file mode 100644 index 000000000000..47d62cacd1f3 --- /dev/null +++ b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/VmSizeCompatibilityFilter.java @@ -0,0 +1,174 @@ +/** + * 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.hdinsight.v2018_06_01_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The virtual machine type compatibility filter. + */ +public class VmSizeCompatibilityFilter { + /** + * The mode for the filter. + */ + @JsonProperty(value = "FilterMode") + private String filterMode; + + /** + * The list of regions. + */ + @JsonProperty(value = "Regions") + private List regions; + + /** + * The list of cluster types available. + */ + @JsonProperty(value = "ClusterFlavors") + private List clusterFlavors; + + /** + * The list of node types. + */ + @JsonProperty(value = "NodeTypes") + private List nodeTypes; + + /** + * The list of cluster versions. + */ + @JsonProperty(value = "ClusterVersions") + private List clusterVersions; + + /** + * The list of virtual machine sizes. + */ + @JsonProperty(value = "vmsizes") + private List vmsizes; + + /** + * Get the mode for the filter. + * + * @return the filterMode value + */ + public String filterMode() { + return this.filterMode; + } + + /** + * Set the mode for the filter. + * + * @param filterMode the filterMode value to set + * @return the VmSizeCompatibilityFilter object itself. + */ + public VmSizeCompatibilityFilter withFilterMode(String filterMode) { + this.filterMode = filterMode; + return this; + } + + /** + * Get the list of regions. + * + * @return the regions value + */ + public List regions() { + return this.regions; + } + + /** + * Set the list of regions. + * + * @param regions the regions value to set + * @return the VmSizeCompatibilityFilter object itself. + */ + public VmSizeCompatibilityFilter withRegions(List regions) { + this.regions = regions; + return this; + } + + /** + * Get the list of cluster types available. + * + * @return the clusterFlavors value + */ + public List clusterFlavors() { + return this.clusterFlavors; + } + + /** + * Set the list of cluster types available. + * + * @param clusterFlavors the clusterFlavors value to set + * @return the VmSizeCompatibilityFilter object itself. + */ + public VmSizeCompatibilityFilter withClusterFlavors(List clusterFlavors) { + this.clusterFlavors = clusterFlavors; + return this; + } + + /** + * Get the list of node types. + * + * @return the nodeTypes value + */ + public List nodeTypes() { + return this.nodeTypes; + } + + /** + * Set the list of node types. + * + * @param nodeTypes the nodeTypes value to set + * @return the VmSizeCompatibilityFilter object itself. + */ + public VmSizeCompatibilityFilter withNodeTypes(List nodeTypes) { + this.nodeTypes = nodeTypes; + return this; + } + + /** + * Get the list of cluster versions. + * + * @return the clusterVersions value + */ + public List clusterVersions() { + return this.clusterVersions; + } + + /** + * Set the list of cluster versions. + * + * @param clusterVersions the clusterVersions value to set + * @return the VmSizeCompatibilityFilter object itself. + */ + public VmSizeCompatibilityFilter withClusterVersions(List clusterVersions) { + this.clusterVersions = clusterVersions; + return this; + } + + /** + * Get the list of virtual machine sizes. + * + * @return the vmsizes value + */ + public List vmsizes() { + return this.vmsizes; + } + + /** + * Set the list of virtual machine sizes. + * + * @param vmsizes the vmsizes value to set + * @return the VmSizeCompatibilityFilter object itself. + */ + public VmSizeCompatibilityFilter withVmsizes(List vmsizes) { + this.vmsizes = vmsizes; + return this; + } + +} diff --git a/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/VmSizesCapability.java b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/VmSizesCapability.java new file mode 100644 index 000000000000..d59e0a36a3ff --- /dev/null +++ b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/VmSizesCapability.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.hdinsight.v2018_06_01_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The virtual machine sizes capability. + */ +public class VmSizesCapability { + /** + * The list of virtual machine size capabilities. + */ + @JsonProperty(value = "available") + private List available; + + /** + * Get the list of virtual machine size capabilities. + * + * @return the available value + */ + public List available() { + return this.available; + } + + /** + * Set the list of virtual machine size capabilities. + * + * @param available the available value to set + * @return the VmSizesCapability object itself. + */ + public VmSizesCapability withAvailable(List available) { + this.available = available; + return this; + } + +} diff --git a/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/CapabilitiesResultImpl.java b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/CapabilitiesResultImpl.java new file mode 100644 index 000000000000..8f47024d08e4 --- /dev/null +++ b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/CapabilitiesResultImpl.java @@ -0,0 +1,63 @@ +/** + * 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.hdinsight.v2018_06_01_preview.implementation; + +import com.microsoft.azure.management.hdinsight.v2018_06_01_preview.CapabilitiesResult; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; +import com.microsoft.azure.management.hdinsight.v2018_06_01_preview.QuotaCapability; +import java.util.Map; +import com.microsoft.azure.management.hdinsight.v2018_06_01_preview.RegionsCapability; +import com.microsoft.azure.management.hdinsight.v2018_06_01_preview.VersionsCapability; +import com.microsoft.azure.management.hdinsight.v2018_06_01_preview.VmSizeCompatibilityFilter; +import com.microsoft.azure.management.hdinsight.v2018_06_01_preview.VmSizesCapability; + +class CapabilitiesResultImpl extends WrapperImpl implements CapabilitiesResult { + private final HDInsightManager manager; + CapabilitiesResultImpl(CapabilitiesResultInner inner, HDInsightManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public HDInsightManager manager() { + return this.manager; + } + + @Override + public List features() { + return this.inner().features(); + } + + @Override + public QuotaCapability quota() { + return this.inner().quota(); + } + + @Override + public Map regions() { + return this.inner().regions(); + } + + @Override + public Map versions() { + return this.inner().versions(); + } + + @Override + public List vmSizeFilters() { + return this.inner().vmSizeFilters(); + } + + @Override + public Map vmSizes() { + return this.inner().vmSizes(); + } + +} diff --git a/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/CapabilitiesResultInner.java b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/CapabilitiesResultInner.java new file mode 100644 index 000000000000..5b4c6f96c5dc --- /dev/null +++ b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/CapabilitiesResultInner.java @@ -0,0 +1,180 @@ +/** + * 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.hdinsight.v2018_06_01_preview.implementation; + +import java.util.Map; +import com.microsoft.azure.management.hdinsight.v2018_06_01_preview.VersionsCapability; +import com.microsoft.azure.management.hdinsight.v2018_06_01_preview.RegionsCapability; +import com.microsoft.azure.management.hdinsight.v2018_06_01_preview.VmSizesCapability; +import java.util.List; +import com.microsoft.azure.management.hdinsight.v2018_06_01_preview.VmSizeCompatibilityFilter; +import com.microsoft.azure.management.hdinsight.v2018_06_01_preview.QuotaCapability; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The Get Capabilities operation response. + */ +public class CapabilitiesResultInner { + /** + * The version capability. + */ + @JsonProperty(value = "versions") + private Map versions; + + /** + * The virtual machine size compatibility features. + */ + @JsonProperty(value = "regions") + private Map regions; + + /** + * The virtual machine sizes. + */ + @JsonProperty(value = "vmSizes") + private Map vmSizes; + + /** + * The virtual machine size compatibility filters. + */ + @JsonProperty(value = "vmSize_filters") + private List vmSizeFilters; + + /** + * The capability features. + */ + @JsonProperty(value = "features") + private List features; + + /** + * The quota capability. + */ + @JsonProperty(value = "quota") + private QuotaCapability quota; + + /** + * Get the version capability. + * + * @return the versions value + */ + public Map versions() { + return this.versions; + } + + /** + * Set the version capability. + * + * @param versions the versions value to set + * @return the CapabilitiesResultInner object itself. + */ + public CapabilitiesResultInner withVersions(Map versions) { + this.versions = versions; + return this; + } + + /** + * Get the virtual machine size compatibility features. + * + * @return the regions value + */ + public Map regions() { + return this.regions; + } + + /** + * Set the virtual machine size compatibility features. + * + * @param regions the regions value to set + * @return the CapabilitiesResultInner object itself. + */ + public CapabilitiesResultInner withRegions(Map regions) { + this.regions = regions; + return this; + } + + /** + * Get the virtual machine sizes. + * + * @return the vmSizes value + */ + public Map vmSizes() { + return this.vmSizes; + } + + /** + * Set the virtual machine sizes. + * + * @param vmSizes the vmSizes value to set + * @return the CapabilitiesResultInner object itself. + */ + public CapabilitiesResultInner withVmSizes(Map vmSizes) { + this.vmSizes = vmSizes; + return this; + } + + /** + * Get the virtual machine size compatibility filters. + * + * @return the vmSizeFilters value + */ + public List vmSizeFilters() { + return this.vmSizeFilters; + } + + /** + * Set the virtual machine size compatibility filters. + * + * @param vmSizeFilters the vmSizeFilters value to set + * @return the CapabilitiesResultInner object itself. + */ + public CapabilitiesResultInner withVmSizeFilters(List vmSizeFilters) { + this.vmSizeFilters = vmSizeFilters; + return this; + } + + /** + * Get the capability features. + * + * @return the features value + */ + public List features() { + return this.features; + } + + /** + * Set the capability features. + * + * @param features the features value to set + * @return the CapabilitiesResultInner object itself. + */ + public CapabilitiesResultInner withFeatures(List features) { + this.features = features; + return this; + } + + /** + * Get the quota capability. + * + * @return the quota value + */ + public QuotaCapability quota() { + return this.quota; + } + + /** + * Set the quota capability. + * + * @param quota the quota value to set + * @return the CapabilitiesResultInner object itself. + */ + public CapabilitiesResultInner withQuota(QuotaCapability quota) { + this.quota = quota; + return this; + } + +} diff --git a/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/LocationsImpl.java b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/LocationsImpl.java index 001001d9e085..f86af386c853 100644 --- a/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/LocationsImpl.java +++ b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/LocationsImpl.java @@ -13,6 +13,7 @@ import com.microsoft.azure.management.hdinsight.v2018_06_01_preview.Locations; import rx.functions.Func1; import rx.Observable; +import com.microsoft.azure.management.hdinsight.v2018_06_01_preview.CapabilitiesResult; import com.microsoft.azure.management.hdinsight.v2018_06_01_preview.UsagesListResult; import com.microsoft.azure.management.hdinsight.v2018_06_01_preview.BillingResponseListResult; @@ -28,6 +29,18 @@ public HDInsightManager manager() { return this.manager; } + @Override + public Observable getCapabilitiesAsync(String location) { + LocationsInner client = this.inner(); + return client.getCapabilitiesAsync(location) + .map(new Func1() { + @Override + public CapabilitiesResult call(CapabilitiesResultInner inner) { + return new CapabilitiesResultImpl(inner, manager()); + } + }); + } + @Override public Observable listUsagesAsync(String location) { LocationsInner client = this.inner(); diff --git a/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/LocationsInner.java b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/LocationsInner.java index c4e704b50b87..0d13b02b5bc9 100644 --- a/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/LocationsInner.java +++ b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/LocationsInner.java @@ -51,6 +51,10 @@ public LocationsInner(Retrofit retrofit, HDInsightManagementClientImpl client) { * used by Retrofit to perform actually REST calls. */ interface LocationsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.hdinsight.v2018_06_01_preview.Locations getCapabilities" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/locations/{location}/capabilities") + Observable> getCapabilities(@Path("subscriptionId") String subscriptionId, @Path("location") String location, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.hdinsight.v2018_06_01_preview.Locations listUsages" }) @GET("subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/locations/{location}/usages") Observable> listUsages(@Path("subscriptionId") String subscriptionId, @Path("location") String location, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -61,6 +65,85 @@ interface LocationsService { } + /** + * Gets the capabilities for the specified location. + * + * @param location The Azure location (region) for which to make the request. + * @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 CapabilitiesResultInner object if successful. + */ + public CapabilitiesResultInner getCapabilities(String location) { + return getCapabilitiesWithServiceResponseAsync(location).toBlocking().single().body(); + } + + /** + * Gets the capabilities for the specified location. + * + * @param location The Azure location (region) for which to make the request. + * @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 getCapabilitiesAsync(String location, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getCapabilitiesWithServiceResponseAsync(location), serviceCallback); + } + + /** + * Gets the capabilities for the specified location. + * + * @param location The Azure location (region) for which to make the request. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CapabilitiesResultInner object + */ + public Observable getCapabilitiesAsync(String location) { + return getCapabilitiesWithServiceResponseAsync(location).map(new Func1, CapabilitiesResultInner>() { + @Override + public CapabilitiesResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the capabilities for the specified location. + * + * @param location The Azure location (region) for which to make the request. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the CapabilitiesResultInner object + */ + public Observable> getCapabilitiesWithServiceResponseAsync(String location) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (location == null) { + throw new IllegalArgumentException("Parameter location 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.getCapabilities(this.client.subscriptionId(), location, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getCapabilitiesDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getCapabilitiesDelegate(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 usages for the specified location. *