Commitment Class
- java.
lang. Object - com.
azure. resourcemanager. billing. models. Price - com.
azure. resourcemanager. billing. models. Commitment
- com.
- com.
public final class Commitment
extends Price
Commitment towards the benefit.
Constructor Summary
| Constructor | Description |
|---|---|
| Commitment() |
Creates an instance of Commitment class. |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| static Commitment |
fromJson(JsonReader jsonReader)
Reads an instance of Commitment from the Json |
|
Commitment |
grain()
Get the grain property: Commitment grain. |
|
Json |
toJson(JsonWriter jsonWriter) |
| void |
validate()
Validates the instance. |
| Commitment |
withAmount(Double amount)
Set the amount property: The amount property. |
| Commitment |
withCurrencyCode(String currencyCode)
Set the currency |
| Commitment |
withGrain(CommitmentGrain grain)
Set the grain property: Commitment grain. |
Methods inherited from Price
Methods inherited from java.lang.Object
Constructor Details
Commitment
public Commitment()
Creates an instance of Commitment class.
Method Details
fromJson
public static Commitment fromJson(JsonReader jsonReader)
Reads an instance of Commitment from the JsonReader.
Parameters:
Returns:
Throws:
grain
public CommitmentGrain grain()
Get the grain property: Commitment grain.
Returns:
toJson
public JsonWriter toJson(JsonWriter jsonWriter)
Overrides:
Commitment.toJson(JsonWriter jsonWriter)Parameters:
Throws:
validate
public void validate()
Validates the instance.
Overrides:
Commitment.validate()withAmount
public Commitment withAmount(Double amount)
Set the amount property: The amount property.
Overrides:
Commitment.withAmount(Double amount)Parameters:
withCurrencyCode
public Commitment withCurrencyCode(String currencyCode)
Set the currencyCode property: The ISO 4217 3-letter currency code for the currency used by this purchase record.
Overrides:
Commitment.withCurrencyCode(String currencyCode)Parameters:
withGrain
public Commitment withGrain(CommitmentGrain grain)
Set the grain property: Commitment grain.
Parameters:
Returns: