diff --git a/azure-mgmt-reservations/src/main/java/com/microsoft/azure/management/reservations/AppliedScopeType.java b/azure-mgmt-reservations/src/main/java/com/microsoft/azure/management/reservations/AppliedScopeType.java new file mode 100644 index 00000000000..6bcb3cad042 --- /dev/null +++ b/azure-mgmt-reservations/src/main/java/com/microsoft/azure/management/reservations/AppliedScopeType.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.reservations; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for AppliedScopeType. + */ +public final class AppliedScopeType extends ExpandableStringEnum { + /** Static value Single for AppliedScopeType. */ + public static final AppliedScopeType SINGLE = fromString("Single"); + + /** Static value Shared for AppliedScopeType. */ + public static final AppliedScopeType SHARED = fromString("Shared"); + + /** + * Creates or finds a AppliedScopeType from its string representation. + * @param name a name to look for + * @return the corresponding AppliedScopeType + */ + @JsonCreator + public static AppliedScopeType fromString(String name) { + return fromString(name, AppliedScopeType.class); + } + + /** + * @return known AppliedScopeType values + */ + public static Collection values() { + return values(AppliedScopeType.class); + } +} diff --git a/azure-mgmt-reservations/src/main/java/com/microsoft/azure/management/reservations/InstanceFlexibility.java b/azure-mgmt-reservations/src/main/java/com/microsoft/azure/management/reservations/InstanceFlexibility.java new file mode 100644 index 00000000000..a0ef2dc5365 --- /dev/null +++ b/azure-mgmt-reservations/src/main/java/com/microsoft/azure/management/reservations/InstanceFlexibility.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.reservations; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for InstanceFlexibility. + */ +public final class InstanceFlexibility extends ExpandableStringEnum { + /** Static value On for InstanceFlexibility. */ + public static final InstanceFlexibility ON = fromString("On"); + + /** Static value Off for InstanceFlexibility. */ + public static final InstanceFlexibility OFF = fromString("Off"); + + /** Static value NotSupported for InstanceFlexibility. */ + public static final InstanceFlexibility NOT_SUPPORTED = fromString("NotSupported"); + + /** + * Creates or finds a InstanceFlexibility from its string representation. + * @param name a name to look for + * @return the corresponding InstanceFlexibility + */ + @JsonCreator + public static InstanceFlexibility fromString(String name) { + return fromString(name, InstanceFlexibility.class); + } + + /** + * @return known InstanceFlexibility values + */ + public static Collection values() { + return values(InstanceFlexibility.class); + } +} diff --git a/azure-mgmt-reservations/src/main/java/com/microsoft/azure/management/reservations/Patch.java b/azure-mgmt-reservations/src/main/java/com/microsoft/azure/management/reservations/Patch.java index 3124fa737e3..59fcf695674 100644 --- a/azure-mgmt-reservations/src/main/java/com/microsoft/azure/management/reservations/Patch.java +++ b/azure-mgmt-reservations/src/main/java/com/microsoft/azure/management/reservations/Patch.java @@ -21,7 +21,7 @@ public class Patch { * Possible values include: 'Single', 'Shared'. */ @JsonProperty(value = "properties.appliedScopeType") - private String appliedScopeType; + private AppliedScopeType appliedScopeType; /** * The appliedScopes property. @@ -33,14 +33,14 @@ public class Patch { * Possible values include: 'On', 'Off', 'NotSupported'. */ @JsonProperty(value = "properties.instanceFlexibility") - private String instanceFlexibility; + private InstanceFlexibility instanceFlexibility; /** * Get possible values include: 'Single', 'Shared'. * * @return the appliedScopeType value */ - public String appliedScopeType() { + public AppliedScopeType appliedScopeType() { return this.appliedScopeType; } @@ -50,7 +50,7 @@ public String appliedScopeType() { * @param appliedScopeType the appliedScopeType value to set * @return the Patch object itself. */ - public Patch withAppliedScopeType(String appliedScopeType) { + public Patch withAppliedScopeType(AppliedScopeType appliedScopeType) { this.appliedScopeType = appliedScopeType; return this; } @@ -80,7 +80,7 @@ public Patch withAppliedScopes(List appliedScopes) { * * @return the instanceFlexibility value */ - public String instanceFlexibility() { + public InstanceFlexibility instanceFlexibility() { return this.instanceFlexibility; } @@ -90,7 +90,7 @@ public String instanceFlexibility() { * @param instanceFlexibility the instanceFlexibility value to set * @return the Patch object itself. */ - public Patch withInstanceFlexibility(String instanceFlexibility) { + public Patch withInstanceFlexibility(InstanceFlexibility instanceFlexibility) { this.instanceFlexibility = instanceFlexibility; return this; } diff --git a/azure-mgmt-reservations/src/main/java/com/microsoft/azure/management/reservations/ReservationProperties.java b/azure-mgmt-reservations/src/main/java/com/microsoft/azure/management/reservations/ReservationProperties.java index bceb8615010..272466f45c6 100644 --- a/azure-mgmt-reservations/src/main/java/com/microsoft/azure/management/reservations/ReservationProperties.java +++ b/azure-mgmt-reservations/src/main/java/com/microsoft/azure/management/reservations/ReservationProperties.java @@ -21,13 +21,13 @@ public class ReservationProperties { * Possible values include: 'VirtualMachines', 'SqlDatabases', 'SuseLinux'. */ @JsonProperty(value = "reservedResourceType") - private String reservedResourceType; + private ReservedResourceType reservedResourceType; /** * Possible values include: 'On', 'Off', 'NotSupported'. */ @JsonProperty(value = "instanceFlexibility") - private String instanceFlexibility; + private InstanceFlexibility instanceFlexibility; /** * Friendly name for user to easily identify the reservation. @@ -45,7 +45,7 @@ public class ReservationProperties { * Possible values include: 'Single', 'Shared'. */ @JsonProperty(value = "appliedScopeType") - private String appliedScopeType; + private AppliedScopeType appliedScopeType; /** * Quantity of the SKUs that are part of the Reservation. @@ -110,7 +110,7 @@ public class ReservationProperties { * * @return the reservedResourceType value */ - public String reservedResourceType() { + public ReservedResourceType reservedResourceType() { return this.reservedResourceType; } @@ -120,7 +120,7 @@ public String reservedResourceType() { * @param reservedResourceType the reservedResourceType value to set * @return the ReservationProperties object itself. */ - public ReservationProperties withReservedResourceType(String reservedResourceType) { + public ReservationProperties withReservedResourceType(ReservedResourceType reservedResourceType) { this.reservedResourceType = reservedResourceType; return this; } @@ -130,7 +130,7 @@ public ReservationProperties withReservedResourceType(String reservedResourceTyp * * @return the instanceFlexibility value */ - public String instanceFlexibility() { + public InstanceFlexibility instanceFlexibility() { return this.instanceFlexibility; } @@ -140,7 +140,7 @@ public String instanceFlexibility() { * @param instanceFlexibility the instanceFlexibility value to set * @return the ReservationProperties object itself. */ - public ReservationProperties withInstanceFlexibility(String instanceFlexibility) { + public ReservationProperties withInstanceFlexibility(InstanceFlexibility instanceFlexibility) { this.instanceFlexibility = instanceFlexibility; return this; } @@ -190,7 +190,7 @@ public ReservationProperties withAppliedScopes(List appliedScopes) { * * @return the appliedScopeType value */ - public String appliedScopeType() { + public AppliedScopeType appliedScopeType() { return this.appliedScopeType; } @@ -200,7 +200,7 @@ public String appliedScopeType() { * @param appliedScopeType the appliedScopeType value to set * @return the ReservationProperties object itself. */ - public ReservationProperties withAppliedScopeType(String appliedScopeType) { + public ReservationProperties withAppliedScopeType(AppliedScopeType appliedScopeType) { this.appliedScopeType = appliedScopeType; return this; } diff --git a/azure-mgmt-reservations/src/main/java/com/microsoft/azure/management/reservations/ReservedResourceType.java b/azure-mgmt-reservations/src/main/java/com/microsoft/azure/management/reservations/ReservedResourceType.java new file mode 100644 index 00000000000..e73711cbc17 --- /dev/null +++ b/azure-mgmt-reservations/src/main/java/com/microsoft/azure/management/reservations/ReservedResourceType.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.reservations; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ReservedResourceType. + */ +public final class ReservedResourceType extends ExpandableStringEnum { + /** Static value VirtualMachines for ReservedResourceType. */ + public static final ReservedResourceType VIRTUAL_MACHINES = fromString("VirtualMachines"); + + /** Static value SqlDatabases for ReservedResourceType. */ + public static final ReservedResourceType SQL_DATABASES = fromString("SqlDatabases"); + + /** Static value SuseLinux for ReservedResourceType. */ + public static final ReservedResourceType SUSE_LINUX = fromString("SuseLinux"); + + /** + * Creates or finds a ReservedResourceType from its string representation. + * @param name a name to look for + * @return the corresponding ReservedResourceType + */ + @JsonCreator + public static ReservedResourceType fromString(String name) { + return fromString(name, ReservedResourceType.class); + } + + /** + * @return known ReservedResourceType values + */ + public static Collection values() { + return values(ReservedResourceType.class); + } +} diff --git a/azure-mgmt-reservations/src/main/java/com/microsoft/azure/management/reservations/implementation/AzureReservationAPIImpl.java b/azure-mgmt-reservations/src/main/java/com/microsoft/azure/management/reservations/implementation/AzureReservationAPIImpl.java index 284087f9956..9c7c5df1bb5 100644 --- a/azure-mgmt-reservations/src/main/java/com/microsoft/azure/management/reservations/implementation/AzureReservationAPIImpl.java +++ b/azure-mgmt-reservations/src/main/java/com/microsoft/azure/management/reservations/implementation/AzureReservationAPIImpl.java @@ -229,7 +229,7 @@ private void initializeService() { interface AzureReservationAPIService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.reservations.AzureReservationAPI getCatalog" }) @GET("subscriptions/{subscriptionId}/providers/Microsoft.Capacity/catalogs") - Observable> getCatalog(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("reservedResourceType") String reservedResourceType, @Query("location") String location, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> getCatalog(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("reservedResourceType") String reservedResourceType1, @Query("location") String location, @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.reservations.AzureReservationAPI getAppliedReservationList" }) @GET("subscriptions/{subscriptionId}/providers/Microsoft.Capacity/appliedReservations")