Share via


CancellationReason Class

  • java.lang.Object
    • com.azure.resourcemanager.databox.models.CancellationReason

Implements

public final class CancellationReason
implements JsonSerializable<CancellationReason>

Reason for cancellation.

Constructor Summary

Constructor Description
CancellationReason()

Creates an instance of CancellationReason class.

Method Summary

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

Reads an instance of CancellationReason from the JsonReader.

String reason()

Get the reason property: Reason for cancellation.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

CancellationReason withReason(String reason)

Set the reason property: Reason for cancellation.

Methods inherited from java.lang.Object

Constructor Details

CancellationReason

public CancellationReason()

Creates an instance of CancellationReason class.

Method Details

fromJson

public static CancellationReason fromJson(JsonReader jsonReader)

Reads an instance of CancellationReason from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

reason

public String reason()

Get the reason property: Reason for cancellation.

Returns:

the reason value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withReason

public CancellationReason withReason(String reason)

Set the reason property: Reason for cancellation.

Parameters:

reason - the reason value to set.

Returns:

the CancellationReason object itself.

Applies to