Class EntityReference

    • Method Detail

      • unspecified

        public final Boolean unspecified()

        Used to indicate that a principal or resource is not specified. This can be used to search for policies that are not associated with a specific principal or resource.

        Returns:
        Used to indicate that a principal or resource is not specified. This can be used to search for policies that are not associated with a specific principal or resource.
      • identifier

        public final EntityIdentifier identifier()

        The identifier of the entity. It can consist of either an EntityType and EntityId, a principal, or a resource.

        Returns:
        The identifier of the entity. It can consist of either an EntityType and EntityId, a principal, or a resource.
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class Object
      • equals

        public final boolean equals​(Object obj)
        Overrides:
        equals in class Object
      • toString

        public final String toString()
        Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
        Overrides:
        toString in class Object
      • getValueForField

        public final <T> Optional<T> getValueForField​(String fieldName,
                                                      Class<T> clazz)
      • fromUnspecified

        public static EntityReference fromUnspecified​(Boolean unspecified)
        Create an instance of this class with unspecified() initialized to the given value.

        Used to indicate that a principal or resource is not specified. This can be used to search for policies that are not associated with a specific principal or resource.

        Parameters:
        unspecified - Used to indicate that a principal or resource is not specified. This can be used to search for policies that are not associated with a specific principal or resource.
      • fromIdentifier

        public static EntityReference fromIdentifier​(EntityIdentifier identifier)
        Create an instance of this class with identifier() initialized to the given value.

        The identifier of the entity. It can consist of either an EntityType and EntityId, a principal, or a resource.

        Parameters:
        identifier - The identifier of the entity. It can consist of either an EntityType and EntityId, a principal, or a resource.
      • fromIdentifier

        public static EntityReference fromIdentifier​(Consumer<EntityIdentifier.Builder> identifier)
        Create an instance of this class with identifier() initialized to the given value.

        The identifier of the entity. It can consist of either an EntityType and EntityId, a principal, or a resource.

        Parameters:
        identifier - The identifier of the entity. It can consist of either an EntityType and EntityId, a principal, or a resource.