Class MessagesRequest.MessagesRequestBuilder

  • Enclosing class:
    MessagesRequest

    public static class MessagesRequest.MessagesRequestBuilder
    extends java.lang.Object
    Builder class to set various parameters to fetch list of Messages
    • Constructor Detail

      • MessagesRequestBuilder

        public MessagesRequestBuilder()
    • Method Detail

      • setLimit

        public MessagesRequest.MessagesRequestBuilder setLimit​(int limit)
        A method to set limit if default value in the builder is 30 and max value is 100
        Parameters:
        limit - Integer value specified by the Developer
        Returns:
        MessagesRequestBuilder object when is called
        Since:
        v1
      • setUID

        public MessagesRequest.MessagesRequestBuilder setUID​(java.lang.String UID)
        A method to set UID of a User to get messages of particular conversation
        Parameters:
        UID - Unique Identifier of a User
        Returns:
        MessagesRequestBuilder object when is called
        Since:
        v1
      • setGUID

        public MessagesRequest.MessagesRequestBuilder setGUID​(java.lang.String GUID)
        A method to set GUID of a Group to get messages of particular conversation
        Parameters:
        GUID - Unique Identifier of a Group
        Returns:
        MessagesRequestBuilder object when is called
        Since:
        v1
      • setMessageId

        public MessagesRequest.MessagesRequestBuilder setMessageId​(int messageId)
        A method to set Message Id of a particular message from which developer can call or fetchPrevious()
        Parameters:
        messageId - Unique Id of a message
        Returns:
        MessagesRequestBuilder object when is called
        Since:
        v1
      • setUnread

        public MessagesRequest.MessagesRequestBuilder setUnread​(boolean unread)
        Method to set unread message while fetching
        Parameters:
        unread - boolean parameter to consider or avoid unread messages while fetching messages using MessagesRequest
        Returns:
        MessagesRequestBuilder object when is called
        Since:
        v1
      • hideMessagesFromBlockedUsers

        public MessagesRequest.MessagesRequestBuilder hideMessagesFromBlockedUsers​(boolean hideMessagesFromBlockedUsers)
        Method to set parameters to hide or show message from blocked users while fetching
        Parameters:
        hideMessagesFromBlockedUsers - boolean parameter to consider or avoid messages from blocked users while fetching messages using MessagesRequest
        Returns:
        MessagesRequestBuilder object when is called
        Since:
        v1
      • setTimestamp

        public MessagesRequest.MessagesRequestBuilder setTimestamp​(long timestamp)
        A method to set timestamp from which developer can call or fetchPrevious()
        Parameters:
        timestamp - timestamp from which developer wants to fetch previous or next messsages
        Returns:
        MessagesRequestBuilder object when is called
        Since:
        v1
      • setSearchKeyword

        public MessagesRequest.MessagesRequestBuilder setSearchKeyword​(java.lang.String searchKeyword)
        A method set Search keyword while fetching the messages
        Parameters:
        searchKeyword - keyword which developer wants to search in the message list
        Returns:
        MessagesRequestBuilder object when is called
        Since:
        v1
      • setUpdatedAfter

        public MessagesRequest.MessagesRequestBuilder setUpdatedAfter​(long updatedAfter)
        A method set timestamp to get fetch messages updated/edited after that timestamp
        Parameters:
        updatedAfter - timestamp to get messages updated after the specified timestamp
        Returns:
        MessagesRequestBuilder object when is called
        Since:
        v1
      • updatesOnly

        public MessagesRequest.MessagesRequestBuilder updatesOnly​(boolean updatesOnly)
        A method to set parameter to get edited/updated messages
        Parameters:
        updatesOnly - boolean parameter show or hide edited/updated messages only
        Returns:
        MessagesRequestBuilder object when is called
        Since:
        v1
      • setCategory

        @Deprecated
        public MessagesRequest.MessagesRequestBuilder setCategory​(java.lang.String category)
        Deprecated.
        A method to set parameter to get the messages belonging to a specific category.
        Parameters:
        category - The category for which the messages are to be fetched.
        Returns:
        MessagesRequestBuilder object when is called
        Since:
        v1
      • setCategories

        public MessagesRequest.MessagesRequestBuilder setCategories​(java.util.List<java.lang.String> categories)
        A method to set parameter to get the messages belonging to a specific category.
        Parameters:
        categories - The list of categories for which the messages are to be fetched.
        Returns:
        MessagesRequestBuilder object when is called
        Since:
        v1
      • setType

        @Deprecated
        public MessagesRequest.MessagesRequestBuilder setType​(java.lang.String type)
        Deprecated.
        A method to set parameter to get the messages belonging to a specific type.
        Parameters:
        type - The type for which the messages are to be fetched.
        Returns:
        MessagesRequestBuilder object when is called
        Since:
        v1
      • setTypes

        public MessagesRequest.MessagesRequestBuilder setTypes​(java.util.List<java.lang.String> types)
        A method to set parameter to get the messages belonging to a specific type.
        Parameters:
        types - The list of types for which the messages are to be fetched.
        Returns:
        MessagesRequestBuilder object when is called
        Since:
        v1
      • setParentMessageId

        public MessagesRequest.MessagesRequestBuilder setParentMessageId​(int parentMessageId)
        A method to set parent id to retrieve messages only belonging to the particular thread.
        Parameters:
        parentMessageId - The id of the message for which the messages are to be fetched.
        Returns:
        MessagesRequestBuilder object when is called
        Since:
        v2
      • hideReplies

        public MessagesRequest.MessagesRequestBuilder hideReplies​(boolean hideReplies)
        A method to exclude threaded messages while fecthing messages for Users/Groups.
        Parameters:
        hideReplies - A boolean variable which when set to true excludes the threaded messages from the list of messages.
        Returns:
        MessagesRequestBuilder object when is called
        Since:
        v2
      • hideDeletedMessages

        public MessagesRequest.MessagesRequestBuilder hideDeletedMessages​(boolean hideDeleted)
        A method to hide deleted messages from list of messages to be fetched.
        Parameters:
        hideDeleted - A boolean variable which when set to true excludes the deleted messages from the list of messages.
        Returns:
        MessagesRequestBuilder object when is called
        Since:
        v2
      • setTags

        public MessagesRequest.MessagesRequestBuilder setTags​(java.util.List<java.lang.String> tags)
        A method set the tags for which the messages are to be fetched
        Parameters:
        tags - A list of strings that determines the list of tags for which the messages are to be fetched.
        Returns:
        MessagesRequestBuilder object when is called
        Since:
        v3
      • withTags

        public MessagesRequest.MessagesRequestBuilder withTags​(boolean withTags)
        A method to inform the SDK that the messages to be fetched are to be fetched along with the tags.
        Parameters:
        withTags - This boolean when set to true will fetch the message along with the tags else the messages will be fetched without tags.
        Returns:
        MessagesRequestBuilder object when is called
        Since:
        v3