Class ThingPrincipalObject

    • Method Detail

      • principal

        public final String principal()

        The principal of the thing principal object.

        Returns:
        The principal of the thing principal object.
      • thingPrincipalType

        public final ThingPrincipalType thingPrincipalType()

        The type of the relation you want to specify when you attach a principal to a thing. The value defaults to NON_EXCLUSIVE_THING.

        • EXCLUSIVE_THING - Attaches the specified principal to the specified thing, exclusively. The thing will be the only thing that’s attached to the principal.

        • NON_EXCLUSIVE_THING - Attaches the specified principal to the specified thing. Multiple things can be attached to the principal.

        If the service returns an enum value that is not available in the current SDK version, thingPrincipalType will return ThingPrincipalType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from thingPrincipalTypeAsString().

        Returns:
        The type of the relation you want to specify when you attach a principal to a thing. The value defaults to NON_EXCLUSIVE_THING.

        • EXCLUSIVE_THING - Attaches the specified principal to the specified thing, exclusively. The thing will be the only thing that’s attached to the principal.

        • NON_EXCLUSIVE_THING - Attaches the specified principal to the specified thing. Multiple things can be attached to the principal.

        See Also:
        ThingPrincipalType
      • thingPrincipalTypeAsString

        public final String thingPrincipalTypeAsString()

        The type of the relation you want to specify when you attach a principal to a thing. The value defaults to NON_EXCLUSIVE_THING.

        • EXCLUSIVE_THING - Attaches the specified principal to the specified thing, exclusively. The thing will be the only thing that’s attached to the principal.

        • NON_EXCLUSIVE_THING - Attaches the specified principal to the specified thing. Multiple things can be attached to the principal.

        If the service returns an enum value that is not available in the current SDK version, thingPrincipalType will return ThingPrincipalType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from thingPrincipalTypeAsString().

        Returns:
        The type of the relation you want to specify when you attach a principal to a thing. The value defaults to NON_EXCLUSIVE_THING.

        • EXCLUSIVE_THING - Attaches the specified principal to the specified thing, exclusively. The thing will be the only thing that’s attached to the principal.

        • NON_EXCLUSIVE_THING - Attaches the specified principal to the specified thing. Multiple things can be attached to the principal.

        See Also:
        ThingPrincipalType
      • 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)