次の方法で共有


Price Class

  • java.lang.Object
    • com.azure.resourcemanager.reservations.models.Price

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 currencyCode property: The ISO 4217 3-letter currency code for the currency used by this purchase record.

static Price fromJson(JsonReader jsonReader)

Reads an instance of Price from the JsonReader.

JsonWriter 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 currencyCode property: The ISO 4217 3-letter currency code for the currency used by this purchase record.

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:

the amount value.

currencyCode

public String currencyCode()

Get the currencyCode property: The ISO 4217 3-letter currency code for the currency used by this purchase record.

Returns:

the currencyCode value.

fromJson

public static Price fromJson(JsonReader jsonReader)

Reads an instance of Price from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of Price if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the Price.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withAmount

public Price withAmount(Double amount)

Set the amount property: The amount property.

Parameters:

amount - the amount value to set.

Returns:

the Price object itself.

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:

currencyCode - the currencyCode value to set.

Returns:

the Price object itself.

Applies to