Class Message

    • Field Detail

      • fileHandlerClass

        public static java.lang.Class<? extends FileHandler> fileHandlerClass
    • Constructor Detail

      • Message

        public Message()
    • Method Detail

      • getAdditionalFields

        public java.util.Map<java.lang.String,​java.lang.Object> getAdditionalFields()
      • setAdditionalField

        public void setAdditionalField​(java.lang.String name,
                                       java.lang.Object value)
      • send

        @NotNull
        public static @NotNull Message.MessageSendRequestData.MessageSendRequest send​(@NotNull
                                                                                      @NotNull java.lang.String channelType,
                                                                                      @NotNull
                                                                                      @NotNull java.lang.String channelId)
        Creates send request
        Parameters:
        channelType - the channel type
        channelId - the channel id
        Returns:
        the created request
      • get

        @NotNull
        public static @NotNull Message.MessageGetRequest get​(@NotNull
                                                             @NotNull java.lang.String id)
        Creates a get request
        Parameters:
        id - the message id
        Returns:
        the created request
      • delete

        @NotNull
        public static @NotNull Message.MessageDeleteRequest delete​(@NotNull
                                                                   @NotNull java.lang.String id)
        Creates an delete request
        Parameters:
        id - the message id
        Returns:
        the created request
      • hardDelete

        @NotNull
        public static @NotNull Message.MessageDeleteRequest hardDelete​(@NotNull
                                                                       @NotNull java.lang.String id)
        Creates a hard delete request
        Parameters:
        id - the message id
        Returns:
        the created request
      • deleteForMe

        @NotNull
        public static @NotNull Message.MessageDeleteRequest deleteForMe​(@NotNull
                                                                        @NotNull java.lang.String id,
                                                                        @NotNull
                                                                        @NotNull java.lang.String userId)
        Creates a delete for me request
        Parameters:
        id - the message id
        userId - the user id for whom the message should be deleted
        Returns:
        the created request
      • uploadFile

        @NotNull
        public static @NotNull Message.MessageUploadFileRequest uploadFile​(@NotNull
                                                                           @NotNull java.lang.String channelType,
                                                                           @NotNull
                                                                           @NotNull java.lang.String channelId,
                                                                           @NotNull
                                                                           @NotNull java.lang.String userId,
                                                                           @Nullable
                                                                           @Nullable java.lang.String contentType)
        Creates a file upload request
        Parameters:
        channelType - the channel type
        channelId - the channel id
        userId - the id of the user sending this file
        contentType - the content type of the file to send
        Returns:
        the created request
      • uploadImage

        @NotNull
        public static @NotNull Message.MessageUploadImageRequest uploadImage​(@NotNull
                                                                             @NotNull java.lang.String channelType,
                                                                             @NotNull
                                                                             @NotNull java.lang.String channelId,
                                                                             @NotNull
                                                                             @NotNull java.lang.String userId,
                                                                             @NotNull
                                                                             @NotNull java.lang.String contentType)
        Creates an image upload request
        Parameters:
        channelType - the channel type
        channelId - the channel id
        userId - the id of the user sending this image
        contentType - the content type of the image to send
        Returns:
        the created request
      • deleteFile

        @NotNull
        public static @NotNull Message.MessageDeleteFileRequest deleteFile​(@NotNull
                                                                           @NotNull java.lang.String channelType,
                                                                           @NotNull
                                                                           @NotNull java.lang.String channelId,
                                                                           @NotNull
                                                                           @NotNull java.lang.String url)
        Creates a delete file request
        Parameters:
        channelType - the channel type
        channelId - the channel id
        url - the file url
        Returns:
        the created request
      • deleteImage

        @NotNull
        public static @NotNull Message.MessageDeleteImageRequest deleteImage​(@NotNull
                                                                             @NotNull java.lang.String channelType,
                                                                             @NotNull
                                                                             @NotNull java.lang.String channelId,
                                                                             @NotNull
                                                                             @NotNull java.lang.String url)
        Creates a delete image request
        Parameters:
        channelType - the channel type
        channelId - the channel id
        url - the image url
        Returns:
        the created request
      • getMany

        @NotNull
        public static @NotNull Message.MessageGetManyRequest getMany​(@NotNull
                                                                     @NotNull java.lang.String channelType,
                                                                     @NotNull
                                                                     @NotNull java.lang.String channelId,
                                                                     @NotNull
                                                                     @NotNull java.util.List<java.lang.String> messageIds)
        Creates a get many request
        Parameters:
        channelType - the channel type
        channelId - the channel id
        messageIds - the message ids
        Returns:
        the created request
      • getReplies

        @NotNull
        public static @NotNull Message.MessageGetRepliesRequest getReplies​(@NotNull
                                                                           @NotNull java.lang.String parentMessageId)
        Creates a get replies request
        Parameters:
        parentMessageId - the parent message id
        Returns:
        the created request
      • commit

        @NotNull
        public static @NotNull Message.MessageCommitRequestData.MessageCommitRequest commit​(@NotNull
                                                                                            @NotNull java.lang.String messageId)
        Creates a commit message request
        Parameters:
        messageId - the pending message id to commit
        Returns:
        the created request
      • flag

        @NotNull
        public static @NotNull Flag.FlagCreateRequestData.FlagCreateRequest flag​(@NotNull
                                                                                 @NotNull java.lang.String messageId)
        Creates a flag request
        Parameters:
        messageId - the message id to flag
        Returns:
        the created request
      • unflag

        @NotNull
        public static @NotNull Flag.FlagDeleteRequestData.FlagDeleteRequest unflag​(@NotNull
                                                                                   @NotNull java.lang.String messageId)
        Creates a unflag request
        Parameters:
        messageId - the message id to unflag
        Returns:
        the created request
      • pinMessage

        @NotNull
        public static @NotNull Message.MessagePartialUpdateRequestData.MessagePartialUpdateRequest pinMessage​(@NotNull
                                                                                                              @NotNull java.lang.String id,
                                                                                                              @NotNull
                                                                                                              @NotNull java.lang.String userId)
        Creates a pin message request without expiration. It invokes message partial update under the hood.
        Parameters:
        id - the message id
        userId - id of the user who pins the message
        Returns:
        the created request
      • pinMessage

        @NotNull
        public static @NotNull Message.MessagePartialUpdateRequestData.MessagePartialUpdateRequest pinMessage​(@NotNull
                                                                                                              @NotNull java.lang.String id,
                                                                                                              @NotNull
                                                                                                              @NotNull java.lang.String userId,
                                                                                                              @NotNull
                                                                                                              @NotNull java.util.Date expiration)
        Creates a pin message request with expiration. It invokes message partial update under the hood.
        Parameters:
        id - the message id
        userId - id of the user who pins the message
        expiration - expiration of the pin
        Returns:
        the created request
      • unpinMessage

        @NotNull
        public static @NotNull Message.MessagePartialUpdateRequestData.MessagePartialUpdateRequest unpinMessage​(@NotNull
                                                                                                                @NotNull java.lang.String id,
                                                                                                                @NotNull
                                                                                                                @NotNull java.lang.String userId)
        Creates an unpin message request. It invokes message partial update under the hood.
        Parameters:
        id - the message id
        userId - id of the user who unpins the message
        Returns:
        the created request
      • getId

        @NotNull
        public @NotNull java.lang.String getId()
      • getText

        @Nullable
        public @Nullable java.lang.String getText()
      • getMml

        @Nullable
        public @Nullable java.lang.String getMml()
      • getCommand

        @Nullable
        public @Nullable java.lang.String getCommand()
      • getHtml

        @Nullable
        public @Nullable java.lang.String getHtml()
      • getSilent

        @Nullable
        public @Nullable java.lang.Boolean getSilent()
      • getUser

        @Nullable
        public @Nullable User getUser()
      • getRestrictedVisibility

        @Nullable
        public @Nullable java.util.List<java.lang.String> getRestrictedVisibility()
      • getAttachments

        @Nullable
        public @Nullable java.util.List<Message.Attachment> getAttachments()
      • getLatestReactions

        @Nullable
        public @Nullable java.util.List<Reaction> getLatestReactions()
      • getOwnReactions

        @Nullable
        public @Nullable java.util.List<Reaction> getOwnReactions()
      • getReactionCounts

        @Nullable
        public @Nullable java.util.Map<java.lang.String,​java.lang.Integer> getReactionCounts()
      • getReactionScores

        @Nullable
        public @Nullable java.util.Map<java.lang.String,​java.lang.Integer> getReactionScores()
      • getParentId

        @Nullable
        public @Nullable java.lang.String getParentId()
      • getShowInChannel

        @Nullable
        public @Nullable java.lang.Boolean getShowInChannel()
      • getReplyCount

        @Nullable
        public @Nullable java.lang.Integer getReplyCount()
      • getDeletedReplyCount

        @Nullable
        public @Nullable java.lang.Integer getDeletedReplyCount()
      • getQuotedMessageId

        @Nullable
        public @Nullable java.lang.String getQuotedMessageId()
      • getQuoted_message

        @Nullable
        public @Nullable Message getQuoted_message()
      • getThreadParticipants

        @Nullable
        public @Nullable java.util.List<User> getThreadParticipants()
      • getCid

        @NotNull
        public @NotNull java.lang.String getCid()
      • getMentionedUsers

        @Nullable
        public @Nullable java.util.List<User> getMentionedUsers()
      • getCreatedAt

        @Nullable
        public @Nullable java.util.Date getCreatedAt()
      • getUpdatedAt

        @Nullable
        public @Nullable java.util.Date getUpdatedAt()
      • getDeletedAt

        @Nullable
        public @Nullable java.util.Date getDeletedAt()
      • getShadowed

        @Nullable
        public @Nullable java.lang.Boolean getShadowed()
      • getImageLabels

        @Nullable
        public @Nullable java.util.Map<java.lang.String,​java.util.List<java.lang.String>> getImageLabels()
      • getI18n

        @Nullable
        public @Nullable java.util.Map<java.lang.String,​java.lang.String> getI18n()
      • getBefore_message_send_failed

        public java.lang.Boolean getBefore_message_send_failed()
      • getPinned

        @Nullable
        public @Nullable java.lang.Boolean getPinned()
      • getPinExpires

        @Nullable
        public @Nullable java.util.Date getPinExpires()
      • getPinnedBy

        @Nullable
        public @Nullable User getPinnedBy()
      • getPinnedAt

        @Nullable
        public @Nullable java.util.Date getPinnedAt()
      • getSharedLocation

        @Nullable
        public @Nullable SharedLocation getSharedLocation()
      • setId

        public void setId​(@NotNull
                          @NotNull java.lang.String id)
      • setText

        public void setText​(@Nullable
                            @Nullable java.lang.String text)
      • setMml

        public void setMml​(@Nullable
                           @Nullable java.lang.String mml)
      • setCommand

        public void setCommand​(@Nullable
                               @Nullable java.lang.String command)
      • setHtml

        public void setHtml​(@Nullable
                            @Nullable java.lang.String html)
      • setSilent

        public void setSilent​(@Nullable
                              @Nullable java.lang.Boolean silent)
      • setUser

        public void setUser​(@Nullable
                            @Nullable User user)
      • setRestrictedVisibility

        public void setRestrictedVisibility​(@Nullable
                                            @Nullable java.util.List<java.lang.String> restrictedVisibility)
      • setAttachments

        public void setAttachments​(@Nullable
                                   @Nullable java.util.List<Message.Attachment> attachments)
      • setLatestReactions

        public void setLatestReactions​(@Nullable
                                       @Nullable java.util.List<Reaction> latestReactions)
      • setOwnReactions

        public void setOwnReactions​(@Nullable
                                    @Nullable java.util.List<Reaction> ownReactions)
      • setReactionCounts

        public void setReactionCounts​(@Nullable
                                      @Nullable java.util.Map<java.lang.String,​java.lang.Integer> reactionCounts)
      • setReactionScores

        public void setReactionScores​(@Nullable
                                      @Nullable java.util.Map<java.lang.String,​java.lang.Integer> reactionScores)
      • setParentId

        public void setParentId​(@Nullable
                                @Nullable java.lang.String parentId)
      • setShowInChannel

        public void setShowInChannel​(@Nullable
                                     @Nullable java.lang.Boolean showInChannel)
      • setReplyCount

        public void setReplyCount​(@Nullable
                                  @Nullable java.lang.Integer replyCount)
      • setDeletedReplyCount

        public void setDeletedReplyCount​(@Nullable
                                         @Nullable java.lang.Integer deletedReplyCount)
      • setQuotedMessageId

        public void setQuotedMessageId​(@Nullable
                                       @Nullable java.lang.String quotedMessageId)
      • setQuoted_message

        public void setQuoted_message​(@Nullable
                                      @Nullable Message quoted_message)
      • setThreadParticipants

        public void setThreadParticipants​(@Nullable
                                          @Nullable java.util.List<User> threadParticipants)
      • setCid

        public void setCid​(@NotNull
                           @NotNull java.lang.String cid)
      • setMentionedUsers

        public void setMentionedUsers​(@Nullable
                                      @Nullable java.util.List<User> mentionedUsers)
      • setCreatedAt

        public void setCreatedAt​(@Nullable
                                 @Nullable java.util.Date createdAt)
      • setUpdatedAt

        public void setUpdatedAt​(@Nullable
                                 @Nullable java.util.Date updatedAt)
      • setDeletedAt

        public void setDeletedAt​(@Nullable
                                 @Nullable java.util.Date deletedAt)
      • setShadowed

        public void setShadowed​(@Nullable
                                @Nullable java.lang.Boolean shadowed)
      • setImageLabels

        public void setImageLabels​(@Nullable
                                   @Nullable java.util.Map<java.lang.String,​java.util.List<java.lang.String>> imageLabels)
      • setI18n

        public void setI18n​(@Nullable
                            @Nullable java.util.Map<java.lang.String,​java.lang.String> i18n)
      • setBefore_message_send_failed

        public void setBefore_message_send_failed​(java.lang.Boolean before_message_send_failed)
      • setPinned

        public void setPinned​(@Nullable
                              @Nullable java.lang.Boolean pinned)
      • setPinExpires

        public void setPinExpires​(@Nullable
                                  @Nullable java.util.Date pinExpires)
      • setPinnedBy

        public void setPinnedBy​(@Nullable
                                @Nullable User pinnedBy)
      • setPinnedAt

        public void setPinnedAt​(@Nullable
                                @Nullable java.util.Date pinnedAt)
      • setSharedLocation

        public void setSharedLocation​(@Nullable
                                      @Nullable SharedLocation sharedLocation)
      • setAdditionalFields

        public void setAdditionalFields​(@NotNull
                                        @NotNull java.util.Map<java.lang.String,​java.lang.Object> additionalFields)
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • canEqual

        protected boolean canEqual​(java.lang.Object other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object