Class TrustPolicy
- java.lang.Object
-
- com.azure.resourcemanager.containerregistry.models.TrustPolicy
-
public final class TrustPolicy extends Object
The content trust policy for a container registry.
-
-
Constructor Summary
Constructors Constructor Description TrustPolicy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PolicyStatusstatus()Get the status property: The value that indicates whether the policy is enabled or not.TrustPolicyTypetype()Get the type property: The type of trust policy.voidvalidate()Validates the instance.TrustPolicywithStatus(PolicyStatus status)Set the status property: The value that indicates whether the policy is enabled or not.TrustPolicywithType(TrustPolicyType type)Set the type property: The type of trust policy.
-
-
-
Method Detail
-
type
public TrustPolicyType type()
Get the type property: The type of trust policy.- Returns:
- the type value.
-
withType
public TrustPolicy withType(TrustPolicyType type)
Set the type property: The type of trust policy.- Parameters:
type- the type value to set.- Returns:
- the TrustPolicy object itself.
-
status
public PolicyStatus status()
Get the status property: The value that indicates whether the policy is enabled or not.- Returns:
- the status value.
-
withStatus
public TrustPolicy 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 TrustPolicy object itself.
-
validate
public void validate()
Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
-