Class Message

java.lang.Object
com.bandwidth.sdk.model.Message

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", comments="Generator version: 7.6.0") public class Message extends Object
Message
  • Field Details

  • Constructor Details

    • Message

      public Message()
  • Method Details

    • id

      public Message id(String id)
    • getId

      @Nullable public String getId()
      The id of the message.
      Returns:
      id
    • setId

      public void setId(String id)
    • owner

      public Message owner(String owner)
    • getOwner

      @Nullable public String getOwner()
      The Bandwidth phone number associated with the message.
      Returns:
      owner
    • setOwner

      public void setOwner(String owner)
    • applicationId

      public Message applicationId(String applicationId)
    • getApplicationId

      @Nullable public String getApplicationId()
      The application ID associated with the message.
      Returns:
      applicationId
    • setApplicationId

      public void setApplicationId(String applicationId)
    • time

      public Message time(OffsetDateTime time)
    • getTime

      @Nullable public OffsetDateTime getTime()
      The datetime stamp of the message in ISO 8601
      Returns:
      time
    • setTime

      public void setTime(OffsetDateTime time)
    • segmentCount

      public Message segmentCount(Integer segmentCount)
    • getSegmentCount

      @Nullable public Integer getSegmentCount()
      The number of segments the original message from the user is broken into before sending over to carrier networks.
      Returns:
      segmentCount
    • setSegmentCount

      public void setSegmentCount(Integer segmentCount)
    • direction

      public Message direction(MessageDirectionEnum direction)
    • getDirection

      @Nullable public MessageDirectionEnum getDirection()
      Get direction
      Returns:
      direction
    • setDirection

      public void setDirection(MessageDirectionEnum direction)
    • to

      public Message to(Set<String> to)
    • addToItem

      public Message addToItem(String toItem)
    • getTo

      @Nullable public Set<String> getTo()
      The phone number recipients of the message.
      Returns:
      to
    • setTo

      public void setTo(Set<String> to)
    • from

      public Message from(String from)
    • getFrom

      @Nullable public String getFrom()
      The phone number the message was sent from.
      Returns:
      from
    • setFrom

      public void setFrom(String from)
    • media

      public Message media(Set<String> media)
    • addMediaItem

      public Message addMediaItem(String mediaItem)
    • getMedia

      @Nullable public Set<String> getMedia()
      The list of media URLs sent in the message. Including a `filename` field in the `Content-Disposition` header of the media linked with a URL will set the displayed file name. This is a best practice to ensure that your media has a readable file name.
      Returns:
      media
    • setMedia

      public void setMedia(Set<String> media)
    • text

      public Message text(String text)
    • getText

      @Nullable public String getText()
      The contents of the message.
      Returns:
      text
    • setText

      public void setText(String text)
    • tag

      public Message tag(String tag)
    • getTag

      @Nullable public String getTag()
      The custom string set by the user.
      Returns:
      tag
    • setTag

      public void setTag(String tag)
    • priority

      public Message priority(PriorityEnum priority)
    • getPriority

      @Nullable public PriorityEnum getPriority()
      Get priority
      Returns:
      priority
    • setPriority

      public void setPriority(PriorityEnum priority)
    • expiration

      public Message expiration(OffsetDateTime expiration)
    • getExpiration

      @Nullable public OffsetDateTime getExpiration()
      The expiration date-time set by the user.
      Returns:
      expiration
    • setExpiration

      public void setExpiration(OffsetDateTime expiration)
    • putAdditionalProperty

      public Message putAdditionalProperty(String key, Object value)
      Set the additional (undeclared) property with the specified name and value. If the property does not already exist, create it otherwise replace it.
      Parameters:
      key - name of the property
      value - value of the property
      Returns:
      the Message instance itself
    • getAdditionalProperties

      public Map<String,Object> getAdditionalProperties()
      Return the additional (undeclared) property.
      Returns:
      a map of objects
    • getAdditionalProperty

      public Object getAdditionalProperty(String key)
      Return the additional (undeclared) property with the specified name.
      Parameters:
      key - name of the property
      Returns:
      an object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

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

      public String toString()
      Overrides:
      toString in class Object
    • validateJsonElement

      public static void validateJsonElement(com.google.gson.JsonElement jsonElement) throws IOException
      Validates the JSON Element and throws an exception if issues found
      Parameters:
      jsonElement - JSON Element
      Throws:
      IOException - if the JSON Element is invalid with respect to Message
    • fromJson

      public static Message fromJson(String jsonString) throws IOException
      Create an instance of Message given an JSON string
      Parameters:
      jsonString - JSON string
      Returns:
      An instance of Message
      Throws:
      IOException - if the JSON string is invalid with respect to Message
    • toJson

      public String toJson()
      Convert an instance of Message to an JSON string
      Returns:
      JSON string