Class MessageRequest


  • @Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
               date="2023-08-29T14:24:34.966664-04: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 OffsetDateTime 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. Must be a date-time in the future. Not supported on MMS.
        Returns:
        expiration
      • setExpiration

        public void setExpiration​(OffsetDateTime expiration)
      • putAdditionalProperty

        public MessageRequest 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 MessageRequest 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
      • hashCode

        public int hashCode()
        Overrides:
        hashCode 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 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