BudgetTimePeriod Class

  • java.lang.Object
    • com.azure.resourcemanager.consumption.models.BudgetTimePeriod

Implements

public final class BudgetTimePeriod
implements JsonSerializable<BudgetTimePeriod>

The start and end date for a budget.

Constructor Summary

Constructor Description
BudgetTimePeriod()

Creates an instance of BudgetTimePeriod class.

Method Summary

Modifier and Type Method and Description
OffsetDateTime endDate()

Get the endDate property: The end date for the budget.

static BudgetTimePeriod fromJson(JsonReader jsonReader)

Reads an instance of BudgetTimePeriod from the JsonReader.

OffsetDateTime startDate()

Get the startDate property: The start date for the budget.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

BudgetTimePeriod withEndDate(OffsetDateTime endDate)

Set the endDate property: The end date for the budget.

BudgetTimePeriod withStartDate(OffsetDateTime startDate)

Set the startDate property: The start date for the budget.

Methods inherited from java.lang.Object

Constructor Details

BudgetTimePeriod

public BudgetTimePeriod()

Creates an instance of BudgetTimePeriod class.

Method Details

endDate

public OffsetDateTime endDate()

Get the endDate property: The end date for the budget. If not provided, we default this to 10 years from the start date.

Returns:

the endDate value.

fromJson

public static BudgetTimePeriod fromJson(JsonReader jsonReader)

Reads an instance of BudgetTimePeriod from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

startDate

public OffsetDateTime startDate()

Get the startDate property: The start date for the budget.

Returns:

the startDate value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withEndDate

public BudgetTimePeriod withEndDate(OffsetDateTime endDate)

Set the endDate property: The end date for the budget. If not provided, we default this to 10 years from the start date.

Parameters:

endDate - the endDate value to set.

Returns:

the BudgetTimePeriod object itself.

withStartDate

public BudgetTimePeriod withStartDate(OffsetDateTime startDate)

Set the startDate property: The start date for the budget.

Parameters:

startDate - the startDate value to set.

Returns:

the BudgetTimePeriod object itself.

Applies to