Class Policies
java.lang.Object
com.azure.resourcemanager.containerregistry.models.Policies
- All Implemented Interfaces:
com.azure.json.JsonSerializable<Policies>
The policies for a container registry.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the exportPolicy property: The export policy for a container registry.static PoliciesfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of Policies from the JsonReader.Get the quarantinePolicy property: The quarantine policy for a container registry.Get the retentionPolicy property: The retention policy for a container registry.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Get the trustPolicy property: The content trust policy for a container registry.voidvalidate()Validates the instance.withExportPolicy(ExportPolicy exportPolicy) Set the exportPolicy property: The export policy for a container registry.withQuarantinePolicy(QuarantinePolicy quarantinePolicy) Set the quarantinePolicy property: The quarantine policy for a container registry.withRetentionPolicy(RetentionPolicy retentionPolicy) Set the retentionPolicy property: The retention policy for a container registry.withTrustPolicy(TrustPolicy trustPolicy) Set the trustPolicy property: The content trust policy for a container registry.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
Policies
public Policies()Creates an instance of Policies class.
-
-
Method Details
-
quarantinePolicy
Get the quarantinePolicy property: The quarantine policy for a container registry.- Returns:
- the quarantinePolicy value.
-
withQuarantinePolicy
Set the quarantinePolicy property: The quarantine policy for a container registry.- Parameters:
quarantinePolicy- the quarantinePolicy value to set.- Returns:
- the Policies object itself.
-
trustPolicy
Get the trustPolicy property: The content trust policy for a container registry.- Returns:
- the trustPolicy value.
-
withTrustPolicy
Set the trustPolicy property: The content trust policy for a container registry.- Parameters:
trustPolicy- the trustPolicy value to set.- Returns:
- the Policies object itself.
-
retentionPolicy
Get the retentionPolicy property: The retention policy for a container registry.- Returns:
- the retentionPolicy value.
-
withRetentionPolicy
Set the retentionPolicy property: The retention policy for a container registry.- Parameters:
retentionPolicy- the retentionPolicy value to set.- Returns:
- the Policies object itself.
-
exportPolicy
Get the exportPolicy property: The export policy for a container registry.- Returns:
- the exportPolicy value.
-
withExportPolicy
Set the exportPolicy property: The export policy for a container registry.- Parameters:
exportPolicy- the exportPolicy value to set.- Returns:
- the Policies object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<Policies>- Throws:
IOException
-
fromJson
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.
-