Class MessageRequest


  • @Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
               date="2023-02-21T09:43:53.001100-05:00[America/New_York]")
    public class MessageRequest
    extends Object
    MessageRequest
    • Constructor Detail

      • MessageRequest

        public MessageRequest()
    • Method Detail

      • getApplicationId

        @Nonnull
        public String getApplicationId()
        The ID of the Application your from number is associated with in the Bandwidth Phone Number Dashboard.
        Returns:
        applicationId
      • setApplicationId

        public void setApplicationId​(String applicationId)
      • getTo

        @Nonnull
        public Set<String> getTo()
        The phone number(s) the message should be sent to in E164 format.
        Returns:
        to
      • setTo

        public void setTo​(Set<String> to)
      • getFrom

        @Nonnull
        public String getFrom()
        One of your telephone numbers the message should come from in E164 format.
        Returns:
        from
      • setFrom

        public void setFrom​(String from)
      • getText

        @Nullable
        public String getText()
        The contents of the text message. Must be 2048 characters or less.
        Returns:
        text
      • setText

        public void setText​(String text)
      • getMedia

        @Nullable
        public List<URI> getMedia()
        A list of URLs to include as media attachments as part of the message. Each URL can be at most 4096 characters.
        Returns:
        media
      • setMedia

        public void setMedia​(List<URI> media)
      • getTag

        @Nullable
        public String getTag()
        A custom string that will be included in callback events of the message. Max 1024 characters.
        Returns:
        tag
      • setTag

        public void setTag​(String tag)
      • getPriority

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

        public void setPriority​(PriorityEnum priority)
      • getExpiration

        @Nullable
        public String getExpiration()
        A string with the date/time value that the message will automatically expire by. This must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00.
        Returns:
        expiration
      • setExpiration

        public void setExpiration​(String expiration)
      • hashCode

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

        public static void validateJsonObject​(com.google.gson.JsonObject jsonObj)
                                       throws IOException
        Validates the JSON Object and throws an exception if issues found
        Parameters:
        jsonObj - JSON Object
        Throws:
        IOException - if the JSON Object is invalid with respect to MessageRequest
      • fromJson

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

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