SpendingLimitDetails Class

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

Implements

public final class SpendingLimitDetails
implements JsonSerializable<SpendingLimitDetails>

The billing profile spending limit.

Constructor Summary

Constructor Description
SpendingLimitDetails()

Creates an instance of SpendingLimitDetails class.

Method Summary

Modifier and Type Method and Description
Float amount()

Get the amount property: The initial amount for the billing profile.

String currency()

Get the currency property: The currency in which the charges for the billing profile are billed.

OffsetDateTime endDate()

Get the endDate property: The date when this spending limit is no longer in effect.

static SpendingLimitDetails fromJson(JsonReader jsonReader)

Reads an instance of SpendingLimitDetails from the JsonReader.

OffsetDateTime startDate()

Get the startDate property: The date when this spending limit goes into effect.

SpendingLimitStatus status()

Get the status property: The status of current spending limit.

JsonWriter toJson(JsonWriter jsonWriter)
SpendingLimitType type()

Get the type property: The type of spending limit.

void validate()

Validates the instance.

SpendingLimitDetails withAmount(Float amount)

Set the amount property: The initial amount for the billing profile.

SpendingLimitDetails withCurrency(String currency)

Set the currency property: The currency in which the charges for the billing profile are billed.

SpendingLimitDetails withEndDate(OffsetDateTime endDate)

Set the endDate property: The date when this spending limit is no longer in effect.

SpendingLimitDetails withStartDate(OffsetDateTime startDate)

Set the startDate property: The date when this spending limit goes into effect.

SpendingLimitDetails withStatus(SpendingLimitStatus status)

Set the status property: The status of current spending limit.

SpendingLimitDetails withType(SpendingLimitType type)

Set the type property: The type of spending limit.

Methods inherited from java.lang.Object

Constructor Details

SpendingLimitDetails

public SpendingLimitDetails()

Creates an instance of SpendingLimitDetails class.

Method Details

amount

public Float amount()

Get the amount property: The initial amount for the billing profile.

Returns:

the amount value.

currency

public String currency()

Get the currency property: The currency in which the charges for the billing profile are billed.

Returns:

the currency value.

endDate

public OffsetDateTime endDate()

Get the endDate property: The date when this spending limit is no longer in effect.

Returns:

the endDate value.

fromJson

public static SpendingLimitDetails fromJson(JsonReader jsonReader)

Reads an instance of SpendingLimitDetails from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

startDate

public OffsetDateTime startDate()

Get the startDate property: The date when this spending limit goes into effect.

Returns:

the startDate value.

status

public SpendingLimitStatus status()

Get the status property: The status of current spending limit.

Returns:

the status value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

type

public SpendingLimitType type()

Get the type property: The type of spending limit.

Returns:

the type value.

validate

public void validate()

Validates the instance.

withAmount

public SpendingLimitDetails withAmount(Float amount)

Set the amount property: The initial amount for the billing profile.

Parameters:

amount - the amount value to set.

Returns:

the SpendingLimitDetails object itself.

withCurrency

public SpendingLimitDetails withCurrency(String currency)

Set the currency property: The currency in which the charges for the billing profile are billed.

Parameters:

currency - the currency value to set.

Returns:

the SpendingLimitDetails object itself.

withEndDate

public SpendingLimitDetails withEndDate(OffsetDateTime endDate)

Set the endDate property: The date when this spending limit is no longer in effect.

Parameters:

endDate - the endDate value to set.

Returns:

the SpendingLimitDetails object itself.

withStartDate

public SpendingLimitDetails withStartDate(OffsetDateTime startDate)

Set the startDate property: The date when this spending limit goes into effect.

Parameters:

startDate - the startDate value to set.

Returns:

the SpendingLimitDetails object itself.

withStatus

public SpendingLimitDetails withStatus(SpendingLimitStatus status)

Set the status property: The status of current spending limit.

Parameters:

status - the status value to set.

Returns:

the SpendingLimitDetails object itself.

withType

public SpendingLimitDetails withType(SpendingLimitType type)

Set the type property: The type of spending limit.

Parameters:

type - the type value to set.

Returns:

the SpendingLimitDetails object itself.

Applies to