Amount Class

  • java.lang.Object
    • com.azure.resourcemanager.billing.models.Amount

Implements

public class Amount
implements JsonSerializable<Amount>

The amount.

Constructor Summary

Constructor Description
Amount()

Creates an instance of Amount class.

Method Summary

Modifier and Type Method and Description
String currency()

Get the currency property: The currency for the amount value.

static Amount fromJson(JsonReader jsonReader)

Reads an instance of Amount from the JsonReader.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

Float value()

Get the value property: The amount value.

Methods inherited from java.lang.Object

Constructor Details

Amount

public Amount()

Creates an instance of Amount class.

Method Details

currency

public String currency()

Get the currency property: The currency for the amount value.

Returns:

the currency value.

fromJson

public static Amount fromJson(JsonReader jsonReader)

Reads an instance of Amount from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of Amount 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 Amount.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

value

public Float value()

Get the value property: The amount value. For example, if the currency is USD, then a value of 600 would be $600.00.

Returns:

the value value.

Applies to