ReservationPurchaseRequest Class
- java.
lang. Object - com.
azure. resourcemanager. billing. models. ReservationPurchaseRequest
- com.
Implements
public final class ReservationPurchaseRequest
implements JsonSerializable<ReservationPurchaseRequest>
The request for reservation purchase.
Constructor Summary
| Constructor | Description |
|---|---|
| ReservationPurchaseRequest() |
Creates an instance of Reservation |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
Reservation |
appliedScopeProperties()
Get the applied |
| List<String> |
appliedScopes()
Get the applied |
|
Applied |
appliedScopeType()
Get the applied |
|
Reservation |
billingPlan()
Get the billing |
| String |
billingScopeId()
Get the billing |
| String |
displayName()
Get the display |
|
static
Reservation |
fromJson(JsonReader jsonReader)
Reads an instance of Reservation |
|
Instance |
instanceFlexibility()
Get the instance |
|
Instance |
instanceFlexibilityReservedResourcePropertiesInstanceFlexibility()
Get the instance |
| String |
location()
Get the location property: The Azure region where the reserved resource lives. |
| Integer |
quantity()
Get the quantity property: Quantity of the skus that are part of the reservation. |
| Boolean |
renew()
Get the renew property: Setting this to true will automatically purchase a new benefit on the expiration date time. |
| String |
reservedResourceType()
Get the reserved |
|
Offset |
reviewDateTime()
Get the review |
|
Sku |
sku()
Get the sku property: The name of sku. |
| String |
term()
Get the term property: The term of the reservation, e. |
|
Json |
toJson(JsonWriter jsonWriter) |
| void |
validate()
Validates the instance. |
|
Reservation |
withAppliedScopeProperties(ReservationAppliedScopeProperties appliedScopeProperties)
Set the applied |
|
Reservation |
withAppliedScopes(List<String> appliedScopes)
Set the applied |
|
Reservation |
withAppliedScopeType(AppliedScopeType appliedScopeType)
Set the applied |
|
Reservation |
withBillingPlan(ReservationBillingPlan billingPlan)
Set the billing |
|
Reservation |
withDisplayName(String displayName)
Set the display |
|
Reservation |
withInstanceFlexibility(InstanceFlexibility instanceFlexibility)
Set the instance |
|
Reservation |
withInstanceFlexibilityReservedResourcePropertiesInstanceFlexibility(InstanceFlexibility instanceFlexibilityReservedResourcePropertiesInstanceFlexibility)
Set the instance |
|
Reservation |
withLocation(String location)
Set the location property: The Azure region where the reserved resource lives. |
|
Reservation |
withQuantity(Integer quantity)
Set the quantity property: Quantity of the skus that are part of the reservation. |
|
Reservation |
withRenew(Boolean renew)
Set the renew property: Setting this to true will automatically purchase a new benefit on the expiration date time. |
|
Reservation |
withReviewDateTime(OffsetDateTime reviewDateTime)
Set the review |
|
Reservation |
withSku(SkuName sku)
Set the sku property: The name of sku. |
Methods inherited from java.lang.Object
Constructor Details
ReservationPurchaseRequest
public ReservationPurchaseRequest()
Creates an instance of ReservationPurchaseRequest class.
Method Details
appliedScopeProperties
public ReservationAppliedScopeProperties appliedScopeProperties()
Get the appliedScopeProperties property: Properties specific to applied scope type. Not required if not applicable. Required and need to provide tenantId and managementGroupId if AppliedScopeType is ManagementGroup.
Returns:
appliedScopes
public List<String> appliedScopes()
Get the appliedScopes property: List of the subscriptions that the benefit will be applied. Do not specify if AppliedScopeType is Shared.
Returns:
appliedScopeType
public AppliedScopeType appliedScopeType()
Get the appliedScopeType property: Type of the Applied Scope.
Returns:
billingPlan
public ReservationBillingPlan billingPlan()
Get the billingPlan property: Represent the billing plans.
Returns:
billingScopeId
public String billingScopeId()
Get the billingScopeId property: Subscription that will be charged for purchasing reservation or savings plan.
Returns:
displayName
public String displayName()
Get the displayName property: Friendly name of the reservation.
Returns:
fromJson
public static ReservationPurchaseRequest fromJson(JsonReader jsonReader)
Reads an instance of ReservationPurchaseRequest from the JsonReader.
Parameters:
Returns:
Throws:
instanceFlexibility
public InstanceFlexibility instanceFlexibility()
Get the instanceFlexibility property: Allows reservation discount to be applied across skus within the same auto fit group. Not all skus support instance size flexibility.
Returns:
instanceFlexibilityReservedResourcePropertiesInstanceFlexibility
public InstanceFlexibility instanceFlexibilityReservedResourcePropertiesInstanceFlexibility()
Get the instanceFlexibilityReservedResourcePropertiesInstanceFlexibility property: Turning this on will apply the reservation discount to other VMs in the same VM size group. Only specify for VirtualMachines reserved resource type.
Returns:
location
public String location()
Get the location property: The Azure region where the reserved resource lives.
Returns:
quantity
public Integer quantity()
Get the quantity property: Quantity of the skus that are part of the reservation. Must be greater than zero.
Returns:
renew
public Boolean renew()
Get the renew property: Setting this to true will automatically purchase a new benefit on the expiration date time.
Returns:
reservedResourceType
public String reservedResourceType()
Get the reservedResourceType property: The reserved source type of the reservation, e.g. virtual machine.
Returns:
reviewDateTime
public OffsetDateTime reviewDateTime()
Get the reviewDateTime property: This is the date-time when the Azure hybrid benefit needs to be reviewed.
Returns:
sku
public SkuName sku()
Get the sku property: The name of sku.
Returns:
term
public String term()
Get the term property: The term of the reservation, e.g. P1Y.
Returns:
toJson
validate
public void validate()
Validates the instance.
withAppliedScopeProperties
public ReservationPurchaseRequest withAppliedScopeProperties(ReservationAppliedScopeProperties appliedScopeProperties)
Set the appliedScopeProperties property: Properties specific to applied scope type. Not required if not applicable. Required and need to provide tenantId and managementGroupId if AppliedScopeType is ManagementGroup.
Parameters:
Returns:
withAppliedScopes
public ReservationPurchaseRequest withAppliedScopes(List<String> appliedScopes)
Set the appliedScopes property: List of the subscriptions that the benefit will be applied. Do not specify if AppliedScopeType is Shared.
Parameters:
Returns:
withAppliedScopeType
public ReservationPurchaseRequest withAppliedScopeType(AppliedScopeType appliedScopeType)
Set the appliedScopeType property: Type of the Applied Scope.
Parameters:
Returns:
withBillingPlan
public ReservationPurchaseRequest withBillingPlan(ReservationBillingPlan billingPlan)
Set the billingPlan property: Represent the billing plans.
Parameters:
Returns:
withDisplayName
public ReservationPurchaseRequest withDisplayName(String displayName)
Set the displayName property: Friendly name of the reservation.
Parameters:
Returns:
withInstanceFlexibility
public ReservationPurchaseRequest withInstanceFlexibility(InstanceFlexibility instanceFlexibility)
Set the instanceFlexibility property: Allows reservation discount to be applied across skus within the same auto fit group. Not all skus support instance size flexibility.
Parameters:
Returns:
withInstanceFlexibilityReservedResourcePropertiesInstanceFlexibility
public ReservationPurchaseRequest withInstanceFlexibilityReservedResourcePropertiesInstanceFlexibility(InstanceFlexibility instanceFlexibilityReservedResourcePropertiesInstanceFlexibility)
Set the instanceFlexibilityReservedResourcePropertiesInstanceFlexibility property: Turning this on will apply the reservation discount to other VMs in the same VM size group. Only specify for VirtualMachines reserved resource type.
Parameters:
Returns:
withLocation
public ReservationPurchaseRequest withLocation(String location)
Set the location property: The Azure region where the reserved resource lives.
Parameters:
Returns:
withQuantity
public ReservationPurchaseRequest withQuantity(Integer quantity)
Set the quantity property: Quantity of the skus that are part of the reservation. Must be greater than zero.
Parameters:
Returns:
withRenew
public ReservationPurchaseRequest withRenew(Boolean renew)
Set the renew property: Setting this to true will automatically purchase a new benefit on the expiration date time.
Parameters:
Returns:
withReviewDateTime
public ReservationPurchaseRequest withReviewDateTime(OffsetDateTime reviewDateTime)
Set the reviewDateTime property: This is the date-time when the Azure hybrid benefit needs to be reviewed.
Parameters:
Returns:
withSku
public ReservationPurchaseRequest withSku(SkuName sku)
Set the sku property: The name of sku.
Parameters:
Returns: