Class Comment

    • Method Detail

      • commentId

        public final String commentId()

        The ID of the comment.

        Returns:
        The ID of the comment.
      • parentId

        public final String parentId()

        The ID of the parent comment.

        Returns:
        The ID of the parent comment.
      • threadId

        public final String threadId()

        The ID of the root comment in the thread.

        Returns:
        The ID of the root comment in the thread.
      • text

        public final String text()

        The text of the comment.

        Returns:
        The text of the comment.
      • contributor

        public final User contributor()

        The details of the user who made the comment.

        Returns:
        The details of the user who made the comment.
      • createdTimestamp

        public final Instant createdTimestamp()

        The time that the comment was created.

        Returns:
        The time that the comment was created.
      • visibility

        public final CommentVisibilityType visibility()

        The visibility of the comment. Options are either PRIVATE, where the comment is visible only to the comment author and document owner and co-owners, or PUBLIC, where the comment is visible to document owners, co-owners, and contributors.

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

        Returns:
        The visibility of the comment. Options are either PRIVATE, where the comment is visible only to the comment author and document owner and co-owners, or PUBLIC, where the comment is visible to document owners, co-owners, and contributors.
        See Also:
        CommentVisibilityType
      • visibilityAsString

        public final String visibilityAsString()

        The visibility of the comment. Options are either PRIVATE, where the comment is visible only to the comment author and document owner and co-owners, or PUBLIC, where the comment is visible to document owners, co-owners, and contributors.

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

        Returns:
        The visibility of the comment. Options are either PRIVATE, where the comment is visible only to the comment author and document owner and co-owners, or PUBLIC, where the comment is visible to document owners, co-owners, and contributors.
        See Also:
        CommentVisibilityType
      • recipientId

        public final String recipientId()

        If the comment is a reply to another user's comment, this field contains the user ID of the user being replied to.

        Returns:
        If the comment is a reply to another user's comment, this field contains the user ID of the user being replied to.
      • serializableBuilderClass

        public static Class<? extends Comment.Builder> serializableBuilderClass()
      • 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)