Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR reservations/resource-manager] Reservations RP: adding x-ms-enum #250

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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<AppliedScopeType> {
/** 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<AppliedScopeType> values() {
return values(AppliedScopeType.class);
}
}
Original file line number Diff line number Diff line change
@@ -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<InstanceFlexibility> {
/** 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<InstanceFlexibility> values() {
return values(InstanceFlexibility.class);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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;
}

Expand All @@ -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;
}
Expand Down Expand Up @@ -80,7 +80,7 @@ public Patch withAppliedScopes(List<String> appliedScopes) {
*
* @return the instanceFlexibility value
*/
public String instanceFlexibility() {
public InstanceFlexibility instanceFlexibility() {
return this.instanceFlexibility;
}

Expand All @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand Down Expand Up @@ -110,7 +110,7 @@ public class ReservationProperties {
*
* @return the reservedResourceType value
*/
public String reservedResourceType() {
public ReservedResourceType reservedResourceType() {
return this.reservedResourceType;
}

Expand All @@ -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;
}
Expand All @@ -130,7 +130,7 @@ public ReservationProperties withReservedResourceType(String reservedResourceTyp
*
* @return the instanceFlexibility value
*/
public String instanceFlexibility() {
public InstanceFlexibility instanceFlexibility() {
return this.instanceFlexibility;
}

Expand All @@ -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;
}
Expand Down Expand Up @@ -190,7 +190,7 @@ public ReservationProperties withAppliedScopes(List<String> appliedScopes) {
*
* @return the appliedScopeType value
*/
public String appliedScopeType() {
public AppliedScopeType appliedScopeType() {
return this.appliedScopeType;
}

Expand All @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -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<ReservedResourceType> {
/** 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<ReservedResourceType> values() {
return values(ReservedResourceType.class);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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<Response<ResponseBody>> 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<Response<ResponseBody>> 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")
Expand Down