diff --git a/hdinsight/resource-manager/v2018_06_01_preview/pom.xml b/hdinsight/resource-manager/v2018_06_01_preview/pom.xml index 5119b5767671..7776ba4b4725 100644 --- a/hdinsight/resource-manager/v2018_06_01_preview/pom.xml +++ b/hdinsight/resource-manager/v2018_06_01_preview/pom.xml @@ -11,11 +11,11 @@ com.microsoft.azure azure-arm-parent - 1.1.0 - ../../../pom.management.xml + 0.0.3-beta + ../../../pom.xml azure-mgmt-hdinsight - 1.1.0 + 1.0.0-beta jar Microsoft Azure SDK for HDInsight Management This package contains Microsoft HDInsight Management SDK. @@ -72,36 +72,6 @@ test-jar test - - com.microsoft.azure - azure-mgmt-storage - 1.18.0 - test - - - com.microsoft.azure - azure-mgmt-msi - 1.18.0 - test - - - com.microsoft.azure - azure-mgmt-keyvault - 1.18.0 - test - - - com.microsoft.azure - azure-keyvault - 1.2.0 - test - - - org.assertj - assertj-core - 2.9.1 - test - 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..7431b6a0079e 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 @@ -40,7 +40,7 @@ public class ApplicationGetHttpsEndpoint { private Integer publicPort; /** - * The subDomainSuffix of the application. + * The subdomain suffix of the application. */ @JsonProperty(value = "subDomainSuffix") private String subDomainSuffix; @@ -132,7 +132,7 @@ public ApplicationGetHttpsEndpoint withPublicPort(Integer publicPort) { } /** - * Get the subDomainSuffix of the application. + * Get the subdomain suffix of the application. * * @return the subDomainSuffix value */ @@ -141,7 +141,7 @@ public String subDomainSuffix() { } /** - * Set the subDomainSuffix of the application. + * Set the subdomain suffix of the application. * * @param subDomainSuffix the subDomainSuffix value to set * @return the ApplicationGetHttpsEndpoint object itself. diff --git a/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/Autoscale.java b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/Autoscale.java new file mode 100644 index 000000000000..df317ce72ca2 --- /dev/null +++ b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/Autoscale.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.hdinsight.v2018_06_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The autoscale request parameters. + */ +public class Autoscale { + /** + * Parameters for load-based autoscale. + */ + @JsonProperty(value = "capacity") + private AutoscaleCapacity capacity; + + /** + * Parameters for schedule-based autoscale. + */ + @JsonProperty(value = "recurrence") + private AutoscaleRecurrence recurrence; + + /** + * Get parameters for load-based autoscale. + * + * @return the capacity value + */ + public AutoscaleCapacity capacity() { + return this.capacity; + } + + /** + * Set parameters for load-based autoscale. + * + * @param capacity the capacity value to set + * @return the Autoscale object itself. + */ + public Autoscale withCapacity(AutoscaleCapacity capacity) { + this.capacity = capacity; + return this; + } + + /** + * Get parameters for schedule-based autoscale. + * + * @return the recurrence value + */ + public AutoscaleRecurrence recurrence() { + return this.recurrence; + } + + /** + * Set parameters for schedule-based autoscale. + * + * @param recurrence the recurrence value to set + * @return the Autoscale object itself. + */ + public Autoscale withRecurrence(AutoscaleRecurrence recurrence) { + this.recurrence = recurrence; + return this; + } + +} diff --git a/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/AutoscaleCapacity.java b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/AutoscaleCapacity.java new file mode 100644 index 000000000000..01b5fbcdc2be --- /dev/null +++ b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/AutoscaleCapacity.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.hdinsight.v2018_06_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The load-based autoscale request parameters. + */ +public class AutoscaleCapacity { + /** + * The minimum instance count of the cluster. + */ + @JsonProperty(value = "minInstanceCount") + private Integer minInstanceCount; + + /** + * The maximum instance count of the cluster. + */ + @JsonProperty(value = "maxInstanceCount") + private Integer maxInstanceCount; + + /** + * Get the minimum instance count of the cluster. + * + * @return the minInstanceCount value + */ + public Integer minInstanceCount() { + return this.minInstanceCount; + } + + /** + * Set the minimum instance count of the cluster. + * + * @param minInstanceCount the minInstanceCount value to set + * @return the AutoscaleCapacity object itself. + */ + public AutoscaleCapacity withMinInstanceCount(Integer minInstanceCount) { + this.minInstanceCount = minInstanceCount; + return this; + } + + /** + * Get the maximum instance count of the cluster. + * + * @return the maxInstanceCount value + */ + public Integer maxInstanceCount() { + return this.maxInstanceCount; + } + + /** + * Set the maximum instance count of the cluster. + * + * @param maxInstanceCount the maxInstanceCount value to set + * @return the AutoscaleCapacity object itself. + */ + public AutoscaleCapacity withMaxInstanceCount(Integer maxInstanceCount) { + this.maxInstanceCount = maxInstanceCount; + return this; + } + +} diff --git a/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/AutoscaleRecurrence.java b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/AutoscaleRecurrence.java new file mode 100644 index 000000000000..addbf5debb35 --- /dev/null +++ b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/AutoscaleRecurrence.java @@ -0,0 +1,70 @@ +/** + * 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; + +/** + * Schedule-based autoscale request parameters. + */ +public class AutoscaleRecurrence { + /** + * The time zone for the autoscale schedule times. + */ + @JsonProperty(value = "timeZone") + private String timeZone; + + /** + * Array of schedule-based autoscale rules. + */ + @JsonProperty(value = "schedule") + private List schedule; + + /** + * Get the time zone for the autoscale schedule times. + * + * @return the timeZone value + */ + public String timeZone() { + return this.timeZone; + } + + /** + * Set the time zone for the autoscale schedule times. + * + * @param timeZone the timeZone value to set + * @return the AutoscaleRecurrence object itself. + */ + public AutoscaleRecurrence withTimeZone(String timeZone) { + this.timeZone = timeZone; + return this; + } + + /** + * Get array of schedule-based autoscale rules. + * + * @return the schedule value + */ + public List schedule() { + return this.schedule; + } + + /** + * Set array of schedule-based autoscale rules. + * + * @param schedule the schedule value to set + * @return the AutoscaleRecurrence object itself. + */ + public AutoscaleRecurrence withSchedule(List schedule) { + this.schedule = schedule; + return this; + } + +} diff --git a/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/AutoscaleSchedule.java b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/AutoscaleSchedule.java new file mode 100644 index 000000000000..fdad8b302d0f --- /dev/null +++ b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/AutoscaleSchedule.java @@ -0,0 +1,71 @@ +/** + * 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; + +/** + * Parameters for a schedule-based autoscale rule, consisting of an array of + * days + a time and capacity. + */ +public class AutoscaleSchedule { + /** + * Days of the week for a schedule-based autoscale rule. + */ + @JsonProperty(value = "days") + private List days; + + /** + * Time and capacity for a schedule-based autoscale rule. + */ + @JsonProperty(value = "timeAndCapacity") + private AutoscaleTimeAndCapacity timeAndCapacity; + + /** + * Get days of the week for a schedule-based autoscale rule. + * + * @return the days value + */ + public List days() { + return this.days; + } + + /** + * Set days of the week for a schedule-based autoscale rule. + * + * @param days the days value to set + * @return the AutoscaleSchedule object itself. + */ + public AutoscaleSchedule withDays(List days) { + this.days = days; + return this; + } + + /** + * Get time and capacity for a schedule-based autoscale rule. + * + * @return the timeAndCapacity value + */ + public AutoscaleTimeAndCapacity timeAndCapacity() { + return this.timeAndCapacity; + } + + /** + * Set time and capacity for a schedule-based autoscale rule. + * + * @param timeAndCapacity the timeAndCapacity value to set + * @return the AutoscaleSchedule object itself. + */ + public AutoscaleSchedule withTimeAndCapacity(AutoscaleTimeAndCapacity timeAndCapacity) { + this.timeAndCapacity = timeAndCapacity; + return this; + } + +} diff --git a/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/AutoscaleTimeAndCapacity.java b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/AutoscaleTimeAndCapacity.java new file mode 100644 index 000000000000..d8bdf29a06c3 --- /dev/null +++ b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/AutoscaleTimeAndCapacity.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; + +/** + * Time and capacity request parameters. + */ +public class AutoscaleTimeAndCapacity { + /** + * 24-hour time in the form xx:xx. + */ + @JsonProperty(value = "time") + private String time; + + /** + * The minimum instance count of the cluster. + */ + @JsonProperty(value = "minInstanceCount") + private Integer minInstanceCount; + + /** + * The maximum instance count of the cluster. + */ + @JsonProperty(value = "maxInstanceCount") + private Integer maxInstanceCount; + + /** + * Get 24-hour time in the form xx:xx. + * + * @return the time value + */ + public String time() { + return this.time; + } + + /** + * Set 24-hour time in the form xx:xx. + * + * @param time the time value to set + * @return the AutoscaleTimeAndCapacity object itself. + */ + public AutoscaleTimeAndCapacity withTime(String time) { + this.time = time; + return this; + } + + /** + * Get the minimum instance count of the cluster. + * + * @return the minInstanceCount value + */ + public Integer minInstanceCount() { + return this.minInstanceCount; + } + + /** + * Set the minimum instance count of the cluster. + * + * @param minInstanceCount the minInstanceCount value to set + * @return the AutoscaleTimeAndCapacity object itself. + */ + public AutoscaleTimeAndCapacity withMinInstanceCount(Integer minInstanceCount) { + this.minInstanceCount = minInstanceCount; + return this; + } + + /** + * Get the maximum instance count of the cluster. + * + * @return the maxInstanceCount value + */ + public Integer maxInstanceCount() { + return this.maxInstanceCount; + } + + /** + * Set the maximum instance count of the cluster. + * + * @param maxInstanceCount the maxInstanceCount value to set + * @return the AutoscaleTimeAndCapacity object itself. + */ + public AutoscaleTimeAndCapacity withMaxInstanceCount(Integer maxInstanceCount) { + this.maxInstanceCount = maxInstanceCount; + return this; + } + +} diff --git a/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/BillingMeters.java b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/BillingMeters.java new file mode 100644 index 000000000000..fb5d9cba8323 --- /dev/null +++ b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/BillingMeters.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 billing meters. + */ +public class BillingMeters { + /** + * The virtual machine sizes. + */ + @JsonProperty(value = "meterParameter") + private String meterParameter; + + /** + * The HDInsight meter guid. + */ + @JsonProperty(value = "meter") + private String meter; + + /** + * The unit of meter, VMHours or CoreHours. + */ + @JsonProperty(value = "unit") + private String unit; + + /** + * Get the virtual machine sizes. + * + * @return the meterParameter value + */ + public String meterParameter() { + return this.meterParameter; + } + + /** + * Set the virtual machine sizes. + * + * @param meterParameter the meterParameter value to set + * @return the BillingMeters object itself. + */ + public BillingMeters withMeterParameter(String meterParameter) { + this.meterParameter = meterParameter; + return this; + } + + /** + * Get the HDInsight meter guid. + * + * @return the meter value + */ + public String meter() { + return this.meter; + } + + /** + * Set the HDInsight meter guid. + * + * @param meter the meter value to set + * @return the BillingMeters object itself. + */ + public BillingMeters withMeter(String meter) { + this.meter = meter; + return this; + } + + /** + * Get the unit of meter, VMHours or CoreHours. + * + * @return the unit value + */ + public String unit() { + return this.unit; + } + + /** + * Set the unit of meter, VMHours or CoreHours. + * + * @param unit the unit value to set + * @return the BillingMeters object itself. + */ + public BillingMeters withUnit(String unit) { + this.unit = unit; + return this; + } + +} diff --git a/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/BillingResources.java b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/BillingResources.java new file mode 100644 index 000000000000..4e3cb53f2cf8 --- /dev/null +++ b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/BillingResources.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 billing resources. + */ +public class BillingResources { + /** + * The region or location. + */ + @JsonProperty(value = "region") + private String region; + + /** + * The billing meter information. + */ + @JsonProperty(value = "billingMeters") + private List billingMeters; + + /** + * The managed disk billing information. + */ + @JsonProperty(value = "diskBillingMeters") + private List diskBillingMeters; + + /** + * Get the region or location. + * + * @return the region value + */ + public String region() { + return this.region; + } + + /** + * Set the region or location. + * + * @param region the region value to set + * @return the BillingResources object itself. + */ + public BillingResources withRegion(String region) { + this.region = region; + return this; + } + + /** + * Get the billing meter information. + * + * @return the billingMeters value + */ + public List billingMeters() { + return this.billingMeters; + } + + /** + * Set the billing meter information. + * + * @param billingMeters the billingMeters value to set + * @return the BillingResources object itself. + */ + public BillingResources withBillingMeters(List billingMeters) { + this.billingMeters = billingMeters; + return this; + } + + /** + * Get the managed disk billing information. + * + * @return the diskBillingMeters value + */ + public List diskBillingMeters() { + return this.diskBillingMeters; + } + + /** + * Set the managed disk billing information. + * + * @param diskBillingMeters the diskBillingMeters value to set + * @return the BillingResources object itself. + */ + public BillingResources withDiskBillingMeters(List diskBillingMeters) { + this.diskBillingMeters = diskBillingMeters; + return this; + } + +} diff --git a/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/BillingResponseListResult.java b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/BillingResponseListResult.java new file mode 100644 index 000000000000..b6c874c0d072 --- /dev/null +++ b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/BillingResponseListResult.java @@ -0,0 +1,36 @@ +/** + * 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.BillingResponseListResultInner; +import java.util.List; + +/** + * Type representing BillingResponseListResult. + */ +public interface BillingResponseListResult extends HasInner, HasManager { + /** + * @return the billingResources value. + */ + List billingResources(); + + /** + * @return the vmSizeFilters value. + */ + List vmSizeFilters(); + + /** + * @return the vmSizes value. + */ + List vmSizes(); + +} 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/DaysOfWeek.java b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/DaysOfWeek.java new file mode 100644 index 000000000000..85a890ed846f --- /dev/null +++ b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/DaysOfWeek.java @@ -0,0 +1,68 @@ +/** + * 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.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for DaysOfWeek. + */ +public enum DaysOfWeek { + /** Enum value Monday. */ + MONDAY("Monday"), + + /** Enum value Tuesday. */ + TUESDAY("Tuesday"), + + /** Enum value Wednesday. */ + WEDNESDAY("Wednesday"), + + /** Enum value Thursday. */ + THURSDAY("Thursday"), + + /** Enum value Friday. */ + FRIDAY("Friday"), + + /** Enum value Saturday. */ + SATURDAY("Saturday"), + + /** Enum value Sunday. */ + SUNDAY("Sunday"); + + /** The actual serialized value for a DaysOfWeek instance. */ + private String value; + + DaysOfWeek(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a DaysOfWeek instance. + * + * @param value the serialized value to parse. + * @return the parsed DaysOfWeek object, or null if unable to parse. + */ + @JsonCreator + public static DaysOfWeek fromString(String value) { + DaysOfWeek[] items = DaysOfWeek.values(); + for (DaysOfWeek item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/DiskBillingMeters.java b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/DiskBillingMeters.java new file mode 100644 index 000000000000..045712dbddc7 --- /dev/null +++ b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/DiskBillingMeters.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 com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The disk billing meters. + */ +public class DiskBillingMeters { + /** + * The managed disk meter guid. + */ + @JsonProperty(value = "diskRpMeter") + private String diskRpMeter; + + /** + * The managed disk billing sku, P30 or S30. + */ + @JsonProperty(value = "sku") + private String sku; + + /** + * The managed disk billing tier, Standard or Premium. Possible values + * include: 'Standard', 'Premium'. + */ + @JsonProperty(value = "tier") + private Tier tier; + + /** + * Get the managed disk meter guid. + * + * @return the diskRpMeter value + */ + public String diskRpMeter() { + return this.diskRpMeter; + } + + /** + * Set the managed disk meter guid. + * + * @param diskRpMeter the diskRpMeter value to set + * @return the DiskBillingMeters object itself. + */ + public DiskBillingMeters withDiskRpMeter(String diskRpMeter) { + this.diskRpMeter = diskRpMeter; + return this; + } + + /** + * Get the managed disk billing sku, P30 or S30. + * + * @return the sku value + */ + public String sku() { + return this.sku; + } + + /** + * Set the managed disk billing sku, P30 or S30. + * + * @param sku the sku value to set + * @return the DiskBillingMeters object itself. + */ + public DiskBillingMeters withSku(String sku) { + this.sku = sku; + return this; + } + + /** + * Get the managed disk billing tier, Standard or Premium. Possible values include: 'Standard', 'Premium'. + * + * @return the tier value + */ + public Tier tier() { + return this.tier; + } + + /** + * Set the managed disk billing tier, Standard or Premium. Possible values include: 'Standard', 'Premium'. + * + * @param tier the tier value to set + * @return the DiskBillingMeters object itself. + */ + public DiskBillingMeters withTier(Tier tier) { + this.tier = tier; + return this; + } + +} diff --git a/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/FilterMode.java b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/FilterMode.java new file mode 100644 index 000000000000..f416029c5326 --- /dev/null +++ b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/FilterMode.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 FilterMode. + */ +public final class FilterMode extends ExpandableStringEnum { + /** Static value Exclude for FilterMode. */ + public static final FilterMode EXCLUDE = fromString("Exclude"); + + /** Static value Include for FilterMode. */ + public static final FilterMode INCLUDE = fromString("Include"); + + /** + * Creates or finds a FilterMode from its string representation. + * @param name a name to look for + * @return the corresponding FilterMode + */ + @JsonCreator + public static FilterMode fromString(String name) { + return fromString(name, FilterMode.class); + } + + /** + * @return known FilterMode values + */ + public static Collection values() { + return values(FilterMode.class); + } +} 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 9bd76b3ec75c..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,13 +14,31 @@ * 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. * - * @param location The location to get capabilities for. + * @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 listUsagesAsync(String location); + /** + * Lists the billingSpecs for the specified subscription and 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 listBillingSpecsAsync(String 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/Role.java b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/Role.java index 069ad311501d..6a0dc92b3c5a 100644 --- a/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/Role.java +++ b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/Role.java @@ -34,6 +34,12 @@ public class Role { @JsonProperty(value = "targetInstanceCount") private Integer targetInstanceCount; + /** + * The autoscale configurations. + */ + @JsonProperty(value = "autoscale") + private Autoscale autoscaleConfiguration; + /** * The hardware profile. */ @@ -124,6 +130,26 @@ public Role withTargetInstanceCount(Integer targetInstanceCount) { return this; } + /** + * Get the autoscale configurations. + * + * @return the autoscaleConfiguration value + */ + public Autoscale autoscaleConfiguration() { + return this.autoscaleConfiguration; + } + + /** + * Set the autoscale configurations. + * + * @param autoscaleConfiguration the autoscaleConfiguration value to set + * @return the Role object itself. + */ + public Role withAutoscaleConfiguration(Autoscale autoscaleConfiguration) { + this.autoscaleConfiguration = autoscaleConfiguration; + return this; + } + /** * Get the hardware profile. * 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/VmSizeCompatibilityFilterV2.java b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/VmSizeCompatibilityFilterV2.java new file mode 100644 index 000000000000..f7e35ca964c4 --- /dev/null +++ b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/VmSizeCompatibilityFilterV2.java @@ -0,0 +1,207 @@ +/** + * 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; + +/** + * This class represent a single filter object that defines a multidimensional + * set. The dimensions of this set are Regions, ClusterFlavors, NodeTypes and + * ClusterVersions. The constraint should be defined based on the following: + * FilterMode (Exclude vs Include), VMSizes (the vm sizes in affect of + * exclusion/inclusion) and the ordering of the Filters. Later filters override + * previous settings if conflicted. + */ +public class VmSizeCompatibilityFilterV2 { + /** + * The filtering mode. Effectively this can enabling or disabling the VM + * sizes in a particular set. Possible values include: 'Exclude', + * 'Include'. + */ + @JsonProperty(value = "filterMode") + private FilterMode filterMode; + + /** + * The list of regions under the effect of the filter. + */ + @JsonProperty(value = "regions") + private List regions; + + /** + * The list of cluster flavors under the effect of the filter. + */ + @JsonProperty(value = "clusterFlavors") + private List clusterFlavors; + + /** + * The list of node types affected by the filter. + */ + @JsonProperty(value = "nodeTypes") + private List nodeTypes; + + /** + * The list of cluster versions affected in Major.Minor format. + */ + @JsonProperty(value = "clusterVersions") + private List clusterVersions; + + /** + * The OSType affected, Windows or Linux. + */ + @JsonProperty(value = "osType") + private List osType; + + /** + * The list of virtual machine sizes to include or exclude. + */ + @JsonProperty(value = "vmSizes") + private List vmSizes; + + /** + * Get the filtering mode. Effectively this can enabling or disabling the VM sizes in a particular set. Possible values include: 'Exclude', 'Include'. + * + * @return the filterMode value + */ + public FilterMode filterMode() { + return this.filterMode; + } + + /** + * Set the filtering mode. Effectively this can enabling or disabling the VM sizes in a particular set. Possible values include: 'Exclude', 'Include'. + * + * @param filterMode the filterMode value to set + * @return the VmSizeCompatibilityFilterV2 object itself. + */ + public VmSizeCompatibilityFilterV2 withFilterMode(FilterMode filterMode) { + this.filterMode = filterMode; + return this; + } + + /** + * Get the list of regions under the effect of the filter. + * + * @return the regions value + */ + public List regions() { + return this.regions; + } + + /** + * Set the list of regions under the effect of the filter. + * + * @param regions the regions value to set + * @return the VmSizeCompatibilityFilterV2 object itself. + */ + public VmSizeCompatibilityFilterV2 withRegions(List regions) { + this.regions = regions; + return this; + } + + /** + * Get the list of cluster flavors under the effect of the filter. + * + * @return the clusterFlavors value + */ + public List clusterFlavors() { + return this.clusterFlavors; + } + + /** + * Set the list of cluster flavors under the effect of the filter. + * + * @param clusterFlavors the clusterFlavors value to set + * @return the VmSizeCompatibilityFilterV2 object itself. + */ + public VmSizeCompatibilityFilterV2 withClusterFlavors(List clusterFlavors) { + this.clusterFlavors = clusterFlavors; + return this; + } + + /** + * Get the list of node types affected by the filter. + * + * @return the nodeTypes value + */ + public List nodeTypes() { + return this.nodeTypes; + } + + /** + * Set the list of node types affected by the filter. + * + * @param nodeTypes the nodeTypes value to set + * @return the VmSizeCompatibilityFilterV2 object itself. + */ + public VmSizeCompatibilityFilterV2 withNodeTypes(List nodeTypes) { + this.nodeTypes = nodeTypes; + return this; + } + + /** + * Get the list of cluster versions affected in Major.Minor format. + * + * @return the clusterVersions value + */ + public List clusterVersions() { + return this.clusterVersions; + } + + /** + * Set the list of cluster versions affected in Major.Minor format. + * + * @param clusterVersions the clusterVersions value to set + * @return the VmSizeCompatibilityFilterV2 object itself. + */ + public VmSizeCompatibilityFilterV2 withClusterVersions(List clusterVersions) { + this.clusterVersions = clusterVersions; + return this; + } + + /** + * Get the OSType affected, Windows or Linux. + * + * @return the osType value + */ + public List osType() { + return this.osType; + } + + /** + * Set the OSType affected, Windows or Linux. + * + * @param osType the osType value to set + * @return the VmSizeCompatibilityFilterV2 object itself. + */ + public VmSizeCompatibilityFilterV2 withOsType(List osType) { + this.osType = osType; + return this; + } + + /** + * Get the list of virtual machine sizes to include or exclude. + * + * @return the vmSizes value + */ + public List vmSizes() { + return this.vmSizes; + } + + /** + * Set the list of virtual machine sizes to include or exclude. + * + * @param vmSizes the vmSizes value to set + * @return the VmSizeCompatibilityFilterV2 object itself. + */ + public VmSizeCompatibilityFilterV2 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/BillingResponseListResultImpl.java b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/BillingResponseListResultImpl.java new file mode 100644 index 000000000000..d2fd560889c4 --- /dev/null +++ b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/BillingResponseListResultImpl.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.implementation; + +import com.microsoft.azure.management.hdinsight.v2018_06_01_preview.BillingResponseListResult; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; +import com.microsoft.azure.management.hdinsight.v2018_06_01_preview.BillingResources; +import com.microsoft.azure.management.hdinsight.v2018_06_01_preview.VmSizeCompatibilityFilterV2; + +class BillingResponseListResultImpl extends WrapperImpl implements BillingResponseListResult { + private final HDInsightManager manager; + BillingResponseListResultImpl(BillingResponseListResultInner inner, HDInsightManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public HDInsightManager manager() { + return this.manager; + } + + @Override + public List billingResources() { + return this.inner().billingResources(); + } + + @Override + public List vmSizeFilters() { + return this.inner().vmSizeFilters(); + } + + @Override + public List 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/BillingResponseListResultInner.java b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/BillingResponseListResultInner.java new file mode 100644 index 000000000000..961d83868f09 --- /dev/null +++ b/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/BillingResponseListResultInner.java @@ -0,0 +1,100 @@ +/** + * 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.List; +import com.microsoft.azure.management.hdinsight.v2018_06_01_preview.VmSizeCompatibilityFilterV2; +import com.microsoft.azure.management.hdinsight.v2018_06_01_preview.BillingResources; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The response for the operation to get regional billingSpecs for a + * subscription. + */ +public class BillingResponseListResultInner { + /** + * The virtual machine sizes to include or exclude. + */ + @JsonProperty(value = "vmSizes") + private List vmSizes; + + /** + * The virtual machine filtering mode. Effectively this can enabling or + * disabling the virtual machine sizes in a particular set. + */ + @JsonProperty(value = "vmSizeFilters") + private List vmSizeFilters; + + /** + * The billing and managed disk billing resources for a region. + */ + @JsonProperty(value = "billingResources") + private List billingResources; + + /** + * Get the virtual machine sizes to include or exclude. + * + * @return the vmSizes value + */ + public List vmSizes() { + return this.vmSizes; + } + + /** + * Set the virtual machine sizes to include or exclude. + * + * @param vmSizes the vmSizes value to set + * @return the BillingResponseListResultInner object itself. + */ + public BillingResponseListResultInner withVmSizes(List vmSizes) { + this.vmSizes = vmSizes; + return this; + } + + /** + * Get the virtual machine filtering mode. Effectively this can enabling or disabling the virtual machine sizes in a particular set. + * + * @return the vmSizeFilters value + */ + public List vmSizeFilters() { + return this.vmSizeFilters; + } + + /** + * Set the virtual machine filtering mode. Effectively this can enabling or disabling the virtual machine sizes in a particular set. + * + * @param vmSizeFilters the vmSizeFilters value to set + * @return the BillingResponseListResultInner object itself. + */ + public BillingResponseListResultInner withVmSizeFilters(List vmSizeFilters) { + this.vmSizeFilters = vmSizeFilters; + return this; + } + + /** + * Get the billing and managed disk billing resources for a region. + * + * @return the billingResources value + */ + public List billingResources() { + return this.billingResources; + } + + /** + * Set the billing and managed disk billing resources for a region. + * + * @param billingResources the billingResources value to set + * @return the BillingResponseListResultInner object itself. + */ + public BillingResponseListResultInner withBillingResources(List billingResources) { + this.billingResources = billingResources; + 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 7dfe32719674..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,7 +13,9 @@ 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; class LocationsImpl extends WrapperImpl implements Locations { private final HDInsightManager manager; @@ -27,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(); @@ -39,4 +53,16 @@ public UsagesListResult call(UsagesListResultInner inner) { }); } + @Override + public Observable listBillingSpecsAsync(String location) { + LocationsInner client = this.inner(); + return client.listBillingSpecsAsync(location) + .map(new Func1() { + @Override + public BillingResponseListResult call(BillingResponseListResultInner inner) { + return new BillingResponseListResultImpl(inner, manager()); + } + }); + } + } 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 f3ccae61412e..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,16 +51,103 @@ 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); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.hdinsight.v2018_06_01_preview.Locations listBillingSpecs" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/locations/{location}/billingSpecs") + Observable> listBillingSpecs(@Path("subscriptionId") String subscriptionId, @Path("location") String location, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * 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. * - * @param location The location to get capabilities for. + * @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 @@ -73,7 +160,7 @@ public UsagesListResultInner listUsages(String location) { /** * Lists the usages for the specified location. * - * @param location The location to get capabilities for. + * @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 @@ -85,7 +172,7 @@ public ServiceFuture listUsagesAsync(String location, fin /** * Lists the usages for the specified location. * - * @param location The location to get capabilities for. + * @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 UsagesListResultInner object */ @@ -101,7 +188,7 @@ public UsagesListResultInner call(ServiceResponse respons /** * Lists the usages for the specified location. * - * @param location The location to get capabilities for. + * @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 UsagesListResultInner object */ @@ -136,4 +223,83 @@ private ServiceResponse listUsagesDelegate(Response listBillingSpecsAsync(String location, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listBillingSpecsWithServiceResponseAsync(location), serviceCallback); + } + + /** + * Lists the billingSpecs for the specified subscription and 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 BillingResponseListResultInner object + */ + public Observable listBillingSpecsAsync(String location) { + return listBillingSpecsWithServiceResponseAsync(location).map(new Func1, BillingResponseListResultInner>() { + @Override + public BillingResponseListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Lists the billingSpecs for the specified subscription and 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 BillingResponseListResultInner object + */ + public Observable> listBillingSpecsWithServiceResponseAsync(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.listBillingSpecs(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 = listBillingSpecsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listBillingSpecsDelegate(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); + } + }