QuarantinePolicy Class

  • java.lang.Object
    • com.azure.resourcemanager.containerregistry.models.QuarantinePolicy

Implements

public final class QuarantinePolicy
implements JsonSerializable<QuarantinePolicy>

The quarantine policy for a container registry.

Constructor Summary

Constructor Description
QuarantinePolicy()

Creates an instance of QuarantinePolicy class.

Method Summary

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

Reads an instance of QuarantinePolicy from the JsonReader.

PolicyStatus status()

Get the status property: The value that indicates whether the policy is enabled or not.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

QuarantinePolicy withStatus(PolicyStatus status)

Set the status property: The value that indicates whether the policy is enabled or not.

Methods inherited from java.lang.Object

Constructor Details

QuarantinePolicy

public QuarantinePolicy()

Creates an instance of QuarantinePolicy class.

Method Details

fromJson

public static QuarantinePolicy fromJson(JsonReader jsonReader)

Reads an instance of QuarantinePolicy from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

status

public PolicyStatus status()

Get the status property: The value that indicates whether the policy is enabled or not.

Returns:

the status value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withStatus

public QuarantinePolicy withStatus(PolicyStatus status)

Set the status property: The value that indicates whether the policy is enabled or not.

Parameters:

status - the status value to set.

Returns:

the QuarantinePolicy object itself.

Applies to