Price Class
- java.
lang. Object - com.
azure. resourcemanager. reservations. models. Price
- com.
Implements
public class Price
implements JsonSerializable<Price>
Pricing information containing the amount and the currency code.
Constructor Summary
| Constructor | Description |
|---|---|
| Price() |
Creates an instance of Price class. |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| Double |
amount()
Get the amount property: The amount property. |
| String |
currencyCode()
Get the currency |
| static Price |
fromJson(JsonReader jsonReader)
Reads an instance of Price from the Json |
|
Json |
toJson(JsonWriter jsonWriter) |
| void |
validate()
Validates the instance. |
| Price |
withAmount(Double amount)
Set the amount property: The amount property. |
| Price |
withCurrencyCode(String currencyCode)
Set the currency |
Methods inherited from java.lang.Object
Constructor Details
Price
public Price()
Creates an instance of Price class.
Method Details
amount
public Double amount()
Get the amount property: The amount property.
Returns:
currencyCode
public String currencyCode()
Get the currencyCode property: The ISO 4217 3-letter currency code for the currency used by this purchase record.
Returns:
fromJson
public static Price fromJson(JsonReader jsonReader)
Reads an instance of Price from the JsonReader.
Parameters:
Returns:
Throws:
toJson
validate
public void validate()
Validates the instance.
withAmount
public Price withAmount(Double amount)
Set the amount property: The amount property.
Parameters:
Returns:
withCurrencyCode
public Price withCurrencyCode(String currencyCode)
Set the currencyCode property: The ISO 4217 3-letter currency code for the currency used by this purchase record.
Parameters:
Returns: