Policies Class

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

Implements

public final class Policies
implements JsonSerializable<Policies>

The policies for a container registry.

Constructor Summary

Constructor Description
Policies()

Creates an instance of Policies class.

Method Summary

Modifier and Type Method and Description
ExportPolicy exportPolicy()

Get the exportPolicy property: The export policy for a container registry.

static Policies fromJson(JsonReader jsonReader)

Reads an instance of Policies from the JsonReader.

QuarantinePolicy quarantinePolicy()

Get the quarantinePolicy property: The quarantine policy for a container registry.

RetentionPolicy retentionPolicy()

Get the retentionPolicy property: The retention policy for a container registry.

JsonWriter toJson(JsonWriter jsonWriter)
TrustPolicy trustPolicy()

Get the trustPolicy property: The content trust policy for a container registry.

void validate()

Validates the instance.

Policies withExportPolicy(ExportPolicy exportPolicy)

Set the exportPolicy property: The export policy for a container registry.

Policies withQuarantinePolicy(QuarantinePolicy quarantinePolicy)

Set the quarantinePolicy property: The quarantine policy for a container registry.

Policies withRetentionPolicy(RetentionPolicy retentionPolicy)

Set the retentionPolicy property: The retention policy for a container registry.

Policies withTrustPolicy(TrustPolicy trustPolicy)

Set the trustPolicy property: The content trust policy for a container registry.

Methods inherited from java.lang.Object

Constructor Details

Policies

public Policies()

Creates an instance of Policies class.

Method Details

exportPolicy

public ExportPolicy exportPolicy()

Get the exportPolicy property: The export policy for a container registry.

Returns:

the exportPolicy value.

fromJson

public static Policies fromJson(JsonReader jsonReader)

Reads an instance of Policies from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

quarantinePolicy

public QuarantinePolicy quarantinePolicy()

Get the quarantinePolicy property: The quarantine policy for a container registry.

Returns:

the quarantinePolicy value.

retentionPolicy

public RetentionPolicy retentionPolicy()

Get the retentionPolicy property: The retention policy for a container registry.

Returns:

the retentionPolicy value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

trustPolicy

public TrustPolicy trustPolicy()

Get the trustPolicy property: The content trust policy for a container registry.

Returns:

the trustPolicy value.

validate

public void validate()

Validates the instance.

withExportPolicy

public Policies withExportPolicy(ExportPolicy exportPolicy)

Set the exportPolicy property: The export policy for a container registry.

Parameters:

exportPolicy - the exportPolicy value to set.

Returns:

the Policies object itself.

withQuarantinePolicy

public Policies withQuarantinePolicy(QuarantinePolicy quarantinePolicy)

Set the quarantinePolicy property: The quarantine policy for a container registry.

Parameters:

quarantinePolicy - the quarantinePolicy value to set.

Returns:

the Policies object itself.

withRetentionPolicy

public Policies withRetentionPolicy(RetentionPolicy retentionPolicy)

Set the retentionPolicy property: The retention policy for a container registry.

Parameters:

retentionPolicy - the retentionPolicy value to set.

Returns:

the Policies object itself.

withTrustPolicy

public Policies withTrustPolicy(TrustPolicy trustPolicy)

Set the trustPolicy property: The content trust policy for a container registry.

Parameters:

trustPolicy - the trustPolicy value to set.

Returns:

the Policies object itself.

Applies to