PurchaseRequest Class
- java.
lang. Object - com.
azure. resourcemanager. billing. models. PurchaseRequest
- com.
Implements
public final class PurchaseRequest
implements JsonSerializable<PurchaseRequest>
Purchase request.
Constructor Summary
| Constructor | Description |
|---|---|
| PurchaseRequest() |
Creates an instance of Purchase |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
Applied |
appliedScopeProperties()
Get the applied |
|
Applied |
appliedScopeType()
Get the applied |
|
Billing |
billingPlan()
Get the billing |
| String |
billingScopeId()
Get the billing |
| Commitment |
commitment()
Get the commitment property: Commitment towards the benefit. |
| String |
displayName()
Get the display |
|
static
Purchase |
fromJson(JsonReader jsonReader)
Reads an instance of Purchase |
| Boolean |
renew()
Get the renew property: Setting this to true will automatically purchase a new benefit on the expiration date time. |
| Sku |
sku()
Get the sku property: The SKU to be applied for this resource. |
|
Savings |
term()
Get the term property: Represents the Savings plan term in ISO 8601 format. |
|
Json |
toJson(JsonWriter jsonWriter) |
| void |
validate()
Validates the instance. |
|
Purchase |
withAppliedScopeProperties(AppliedScopeProperties appliedScopeProperties)
Set the applied |
|
Purchase |
withAppliedScopeType(AppliedScopeType appliedScopeType)
Set the applied |
|
Purchase |
withBillingPlan(BillingPlan billingPlan)
Set the billing |
|
Purchase |
withBillingScopeId(String billingScopeId)
Set the billing |
|
Purchase |
withCommitment(Commitment commitment)
Set the commitment property: Commitment towards the benefit. |
|
Purchase |
withDisplayName(String displayName)
Set the display |
|
Purchase |
withRenew(Boolean renew)
Set the renew property: Setting this to true will automatically purchase a new benefit on the expiration date time. |
|
Purchase |
withSku(Sku sku)
Set the sku property: The SKU to be applied for this resource. |
|
Purchase |
withTerm(SavingsPlanTerm term)
Set the term property: Represents the Savings plan term in ISO 8601 format. |
Methods inherited from java.lang.Object
Constructor Details
PurchaseRequest
public PurchaseRequest()
Creates an instance of PurchaseRequest class.
Method Details
appliedScopeProperties
public AppliedScopeProperties appliedScopeProperties()
Get the appliedScopeProperties property: Properties specific to applied scope type. Not required if not applicable.
Returns:
appliedScopeType
public AppliedScopeType appliedScopeType()
Get the appliedScopeType property: Type of the Applied Scope.
Returns:
billingPlan
public BillingPlan billingPlan()
Get the billingPlan property: Represents the billing plan in ISO 8601 format. Required only for monthly purchases.
Returns:
billingScopeId
public String billingScopeId()
Get the billingScopeId property: Subscription that will be charged for purchasing SavingsPlan.
Returns:
commitment
public Commitment commitment()
Get the commitment property: Commitment towards the benefit.
Returns:
displayName
public String displayName()
Get the displayName property: Friendly name of the savings plan.
Returns:
fromJson
public static PurchaseRequest fromJson(JsonReader jsonReader)
Reads an instance of PurchaseRequest from the JsonReader.
Parameters:
Returns:
Throws:
renew
public Boolean renew()
Get the renew property: Setting this to true will automatically purchase a new benefit on the expiration date time.
Returns:
sku
public Sku sku()
Get the sku property: The SKU to be applied for this resource.
Returns:
term
public SavingsPlanTerm term()
Get the term property: Represents the Savings plan term in ISO 8601 format.
Returns:
toJson
validate
public void validate()
Validates the instance.
withAppliedScopeProperties
public PurchaseRequest withAppliedScopeProperties(AppliedScopeProperties appliedScopeProperties)
Set the appliedScopeProperties property: Properties specific to applied scope type. Not required if not applicable.
Parameters:
Returns:
withAppliedScopeType
public PurchaseRequest withAppliedScopeType(AppliedScopeType appliedScopeType)
Set the appliedScopeType property: Type of the Applied Scope.
Parameters:
Returns:
withBillingPlan
public PurchaseRequest withBillingPlan(BillingPlan billingPlan)
Set the billingPlan property: Represents the billing plan in ISO 8601 format. Required only for monthly purchases.
Parameters:
Returns:
withBillingScopeId
public PurchaseRequest withBillingScopeId(String billingScopeId)
Set the billingScopeId property: Subscription that will be charged for purchasing SavingsPlan.
Parameters:
Returns:
withCommitment
public PurchaseRequest withCommitment(Commitment commitment)
Set the commitment property: Commitment towards the benefit.
Parameters:
Returns:
withDisplayName
public PurchaseRequest withDisplayName(String displayName)
Set the displayName property: Friendly name of the savings plan.
Parameters:
Returns:
withRenew
public PurchaseRequest withRenew(Boolean renew)
Set the renew property: Setting this to true will automatically purchase a new benefit on the expiration date time.
Parameters:
Returns:
withSku
public PurchaseRequest withSku(Sku sku)
Set the sku property: The SKU to be applied for this resource.
Parameters:
Returns:
withTerm
public PurchaseRequest withTerm(SavingsPlanTerm term)
Set the term property: Represents the Savings plan term in ISO 8601 format.
Parameters:
Returns: