Class TrustPolicy


  • public final class TrustPolicy
    extends Object
    The content trust policy for a container registry.
    • Constructor Detail

      • TrustPolicy

        public TrustPolicy()
    • 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.