SavingsPlanValidResponseProperty Class

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

Implements

public final class SavingsPlanValidResponseProperty
implements JsonSerializable<SavingsPlanValidResponseProperty>

Benefit scope response property.

Constructor Summary

Constructor Description
SavingsPlanValidResponseProperty()

Creates an instance of SavingsPlanValidResponseProperty class.

Method Summary

Modifier and Type Method and Description
static SavingsPlanValidResponseProperty fromJson(JsonReader jsonReader)

Reads an instance of SavingsPlanValidResponseProperty from the JsonReader.

String reason()

Get the reason property: Failure reason if the provided input is invalid.

String reasonCode()

Get the reasonCode property: Failure reason code if the provided input is invalid.

JsonWriter toJson(JsonWriter jsonWriter)
Boolean valid()

Get the valid property: Indicates if the provided input is valid.

void validate()

Validates the instance.

SavingsPlanValidResponseProperty withReason(String reason)

Set the reason property: Failure reason if the provided input is invalid.

SavingsPlanValidResponseProperty withReasonCode(String reasonCode)

Set the reasonCode property: Failure reason code if the provided input is invalid.

SavingsPlanValidResponseProperty withValid(Boolean valid)

Set the valid property: Indicates if the provided input is valid.

Methods inherited from java.lang.Object

Constructor Details

SavingsPlanValidResponseProperty

public SavingsPlanValidResponseProperty()

Creates an instance of SavingsPlanValidResponseProperty class.

Method Details

fromJson

public static SavingsPlanValidResponseProperty fromJson(JsonReader jsonReader)

Reads an instance of SavingsPlanValidResponseProperty from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

reason

public String reason()

Get the reason property: Failure reason if the provided input is invalid.

Returns:

the reason value.

reasonCode

public String reasonCode()

Get the reasonCode property: Failure reason code if the provided input is invalid.

Returns:

the reasonCode value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

valid

public Boolean valid()

Get the valid property: Indicates if the provided input is valid.

Returns:

the valid value.

validate

public void validate()

Validates the instance.

withReason

public SavingsPlanValidResponseProperty withReason(String reason)

Set the reason property: Failure reason if the provided input is invalid.

Parameters:

reason - the reason value to set.

Returns:

the SavingsPlanValidResponseProperty object itself.

withReasonCode

public SavingsPlanValidResponseProperty withReasonCode(String reasonCode)

Set the reasonCode property: Failure reason code if the provided input is invalid.

Parameters:

reasonCode - the reasonCode value to set.

Returns:

the SavingsPlanValidResponseProperty object itself.

withValid

public SavingsPlanValidResponseProperty withValid(Boolean valid)

Set the valid property: Indicates if the provided input is valid.

Parameters:

valid - the valid value to set.

Returns:

the SavingsPlanValidResponseProperty object itself.

Applies to