Class CreatePolicyOptions.Builder

  • Enclosing class:
    CreatePolicyOptions

    public static class CreatePolicyOptions.Builder
    extends java.lang.Object
    Builder.
    • Constructor Detail

      • Builder

        public Builder()
        Instantiates a new builder.
      • Builder

        public Builder​(java.lang.String type,
                       java.util.List<PolicySubject> subjects,
                       java.util.List<PolicyRole> roles,
                       java.util.List<PolicyResource> resources)
        Instantiates a new builder with required properties.
        Parameters:
        type - the type
        subjects - the subjects
        roles - the roles
        resources - the resources
    • Method Detail

      • build

        public CreatePolicyOptions build()
        Builds a CreatePolicyOptions.
        Returns:
        the new CreatePolicyOptions instance
      • addSubjects

        public CreatePolicyOptions.Builder addSubjects​(PolicySubject subjects)
        Adds a new element to subjects.
        Parameters:
        subjects - the new element to be added
        Returns:
        the CreatePolicyOptions builder
      • addRoles

        public CreatePolicyOptions.Builder addRoles​(PolicyRole roles)
        Adds a new element to roles.
        Parameters:
        roles - the new element to be added
        Returns:
        the CreatePolicyOptions builder
      • addResources

        public CreatePolicyOptions.Builder addResources​(PolicyResource resources)
        Adds a new element to resources.
        Parameters:
        resources - the new element to be added
        Returns:
        the CreatePolicyOptions builder
      • type

        public CreatePolicyOptions.Builder type​(java.lang.String type)
        Set the type.
        Parameters:
        type - the type
        Returns:
        the CreatePolicyOptions builder
      • subjects

        public CreatePolicyOptions.Builder subjects​(java.util.List<PolicySubject> subjects)
        Set the subjects. Existing subjects will be replaced.
        Parameters:
        subjects - the subjects
        Returns:
        the CreatePolicyOptions builder
      • roles

        public CreatePolicyOptions.Builder roles​(java.util.List<PolicyRole> roles)
        Set the roles. Existing roles will be replaced.
        Parameters:
        roles - the roles
        Returns:
        the CreatePolicyOptions builder
      • resources

        public CreatePolicyOptions.Builder resources​(java.util.List<PolicyResource> resources)
        Set the resources. Existing resources will be replaced.
        Parameters:
        resources - the resources
        Returns:
        the CreatePolicyOptions builder
      • description

        public CreatePolicyOptions.Builder description​(java.lang.String description)
        Set the description.
        Parameters:
        description - the description
        Returns:
        the CreatePolicyOptions builder
      • acceptLanguage

        public CreatePolicyOptions.Builder acceptLanguage​(java.lang.String acceptLanguage)
        Set the acceptLanguage.
        Parameters:
        acceptLanguage - the acceptLanguage
        Returns:
        the CreatePolicyOptions builder