RestartRecoveryPolicy Class

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

Implements

public final class RestartRecoveryPolicy
implements JsonSerializable<RestartRecoveryPolicy>

The configuration parameters used while performing restart recovery.

Constructor Summary

Constructor Description
RestartRecoveryPolicy()

Creates an instance of RestartRecoveryPolicy class.

Method Summary

Modifier and Type Method and Description
Boolean enabled()

Get the enabled property: Specifies whether restart recovery should be enabled.

static RestartRecoveryPolicy fromJson(JsonReader jsonReader)

Reads an instance of RestartRecoveryPolicy from the JsonReader.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

RestartRecoveryPolicy withEnabled(Boolean enabled)

Set the enabled property: Specifies whether restart recovery should be enabled.

Methods inherited from java.lang.Object

Constructor Details

RestartRecoveryPolicy

public RestartRecoveryPolicy()

Creates an instance of RestartRecoveryPolicy class.

Method Details

enabled

public Boolean enabled()

Get the enabled property: Specifies whether restart recovery should be enabled. The default value is false.

Returns:

the enabled value.

fromJson

public static RestartRecoveryPolicy fromJson(JsonReader jsonReader)

Reads an instance of RestartRecoveryPolicy from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withEnabled

public RestartRecoveryPolicy withEnabled(Boolean enabled)

Set the enabled property: Specifies whether restart recovery should be enabled. The default value is false.

Parameters:

enabled - the enabled value to set.

Returns:

the RestartRecoveryPolicy object itself.

Applies to