All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.sinch.sdk.domains.conversation.models.v1.messages.ContactMessage Maven / Gradle / Ivy

There is a newer version: 1.4.0
Show newest version
package com.sinch.sdk.domains.conversation.models.v1.messages;

/**
 * Message originating from a Contact
 *
 * @param  Body type for message
 * @since 1.3
 */
public interface ContactMessage extends ConversationMessageBody {

  /**
   * Get message body
   *
   * @return Message body
   */
  T getBody();

  /**
   * Get replyTo
   *
   * @see ReplyTo
   * @return reply to
   */
  ReplyTo getReplyTo();

  /**
   * Getting Builder
   *
   * @return New Builder instance
   * @since 1.0
   */
  static  Builder builder() {
    return new ContactMessageImpl.Builder<>();
  }

  /** Dedicated Builder */
  interface Builder {

    /**
     * see getter
     *
     * @param message see getter
     * @return Current builder
     * @see #getBody()
     */
    Builder setBody(T message);

    /**
     * see getter
     *
     * @param replyTo see getter
     * @return Current builder
     * @see #getReplyTo()
     */
    Builder setReplyTo(ReplyTo replyTo);

    ContactMessage build();
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy