AlternativeOption Class

  • java.lang.Object
    • com.azure.resourcemanager.compute.models.AlternativeOption

Implements

public final class AlternativeOption
implements JsonSerializable<AlternativeOption>

Describes the alternative option specified by the Publisher for this image when this image is deprecated.

Constructor Summary

Constructor Description
AlternativeOption()

Creates an instance of AlternativeOption class.

Method Summary

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

Reads an instance of AlternativeOption from the JsonReader.

JsonWriter toJson(JsonWriter jsonWriter)
AlternativeType type()

Get the type property: Describes the type of the alternative option.

void validate()

Validates the instance.

String value()

Get the value property: Indicates the alternative option value specified by the Publisher.

AlternativeOption withType(AlternativeType type)

Set the type property: Describes the type of the alternative option.

AlternativeOption withValue(String value)

Set the value property: Indicates the alternative option value specified by the Publisher.

Methods inherited from java.lang.Object

Constructor Details

AlternativeOption

public AlternativeOption()

Creates an instance of AlternativeOption class.

Method Details

fromJson

public static AlternativeOption fromJson(JsonReader jsonReader)

Reads an instance of AlternativeOption from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

type

public AlternativeType type()

Get the type property: Describes the type of the alternative option.

Returns:

the type value.

validate

public void validate()

Validates the instance.

value

public String value()

Get the value property: Indicates the alternative option value specified by the Publisher. This is the Offer name when the type is Offer or the Plan name when the type is Plan.

Returns:

the value value.

withType

public AlternativeOption withType(AlternativeType type)

Set the type property: Describes the type of the alternative option.

Parameters:

type - the type value to set.

Returns:

the AlternativeOption object itself.

withValue

public AlternativeOption withValue(String value)

Set the value property: Indicates the alternative option value specified by the Publisher. This is the Offer name when the type is Offer or the Plan name when the type is Plan.

Parameters:

value - the value value to set.

Returns:

the AlternativeOption object itself.

Applies to