Class SmsMessage
- java.lang.Object
-
- pl.gsmservice.gateway.models.components.SmsMessage
-
public class SmsMessage extends java.lang.ObjectSmsMessageAn object with a new SMS message properties
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSmsMessage.Builder
-
Constructor Summary
Constructors Constructor Description SmsMessage(SmsMessageRecipients recipients, java.lang.String message)SmsMessage(SmsMessageRecipients recipients, java.lang.String message, java.util.Optional<java.lang.String> sender, java.util.Optional<? extends SmsType> type, java.util.Optional<java.lang.Boolean> unicode, java.util.Optional<java.lang.Boolean> flash, org.openapitools.jackson.nullable.JsonNullable<java.time.OffsetDateTime> date)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SmsMessage.Builderbuilder()org.openapitools.jackson.nullable.JsonNullable<java.time.OffsetDateTime>date()Scheduled future date and time of sending the message (in ISO 8601 format).booleanequals(java.lang.Object o)java.util.Optional<java.lang.Boolean>flash()Should the message to be sent with class 0 (FLASH)?inthashCode()java.lang.Stringmessage()SMS message contentSmsMessageRecipientsrecipients()The recipient number or multiple recipients numbers of single message.java.util.Optional<java.lang.String>sender()SMS sender namejava.lang.StringtoString()java.util.Optional<SmsType>type()SMS type (SmsType.SmsPro -> SMS PRO, SmsType.SmsEco -> SMS ECO, SmsType.SmsTwoWay -> SMS 2WAY)java.util.Optional<java.lang.Boolean>unicode()Should the message be sent with special characters, e.g.SmsMessagewithDate(java.time.OffsetDateTime date)Scheduled future date and time of sending the message (in ISO 8601 format).SmsMessagewithDate(org.openapitools.jackson.nullable.JsonNullable<java.time.OffsetDateTime> date)Scheduled future date and time of sending the message (in ISO 8601 format).SmsMessagewithFlash(boolean flash)Should the message to be sent with class 0 (FLASH)?SmsMessagewithFlash(java.util.Optional<java.lang.Boolean> flash)Should the message to be sent with class 0 (FLASH)?SmsMessagewithMessage(java.lang.String message)SMS message contentSmsMessagewithRecipients(SmsMessageRecipients recipients)The recipient number or multiple recipients numbers of single message.SmsMessagewithSender(java.lang.String sender)SMS sender nameSmsMessagewithSender(java.util.Optional<java.lang.String> sender)SMS sender nameSmsMessagewithType(java.util.Optional<? extends SmsType> type)SMS type (SmsType.SmsPro -> SMS PRO, SmsType.SmsEco -> SMS ECO, SmsType.SmsTwoWay -> SMS 2WAY)SmsMessagewithType(SmsType type)SMS type (SmsType.SmsPro -> SMS PRO, SmsType.SmsEco -> SMS ECO, SmsType.SmsTwoWay -> SMS 2WAY)SmsMessagewithUnicode(boolean unicode)Should the message be sent with special characters, e.g.SmsMessagewithUnicode(java.util.Optional<java.lang.Boolean> unicode)Should the message be sent with special characters, e.g.
-
-
-
Constructor Detail
-
SmsMessage
public SmsMessage(SmsMessageRecipients recipients, java.lang.String message, java.util.Optional<java.lang.String> sender, java.util.Optional<? extends SmsType> type, java.util.Optional<java.lang.Boolean> unicode, java.util.Optional<java.lang.Boolean> flash, org.openapitools.jackson.nullable.JsonNullable<java.time.OffsetDateTime> date)
-
SmsMessage
public SmsMessage(SmsMessageRecipients recipients, java.lang.String message)
-
-
Method Detail
-
recipients
public SmsMessageRecipients recipients()
The recipient number or multiple recipients numbers of single message. To set one recipient, please useSmsMessageRecipients.of(String)method simply passing to it astringwith his phone number. To set multiple recipients, please useSmsMessageRecipients.ofArrayOfStrings(List.of(String,...))method passing to itList<string>. Optionally you can also set custom id (user identifier) for each message - useSmsMessageRecipients.of(PhoneNumberWithCid)method passingPhoneNumberWithCidobject (in case of single recipient) orSmsMessageRecipients.ofArrayOfPhoneNumberWithCids(Recipients.of(PhoneNumberWithCid,...))method passing List<PhoneNumberWithCid> (in case of multiple recipients).
-
message
public java.lang.String message()
SMS message content
-
sender
public java.util.Optional<java.lang.String> sender()
SMS sender name
-
type
public java.util.Optional<SmsType> type()
SMS type (SmsType.SmsPro -> SMS PRO, SmsType.SmsEco -> SMS ECO, SmsType.SmsTwoWay -> SMS 2WAY)
-
unicode
public java.util.Optional<java.lang.Boolean> unicode()
Should the message be sent with special characters, e.g. Polish diacritics (if any)? If false, those characters will be automatically replaced with their equivalents. If true your message will be sent as unicode but the message will be able to consist of fewer characters.
-
flash
public java.util.Optional<java.lang.Boolean> flash()
Should the message to be sent with class 0 (FLASH)?
-
date
public org.openapitools.jackson.nullable.JsonNullable<java.time.OffsetDateTime> date()
Scheduled future date and time of sending the message (in ISO 8601 format). If missing or null - message will be sent immediately
-
builder
public static SmsMessage.Builder builder()
-
withRecipients
public SmsMessage withRecipients(SmsMessageRecipients recipients)
The recipient number or multiple recipients numbers of single message. To set one recipient, please useSmsMessageRecipients.of(String)method simply passing to it astringwith his phone number. To set multiple recipients, please useSmsMessageRecipients.ofArrayOfStrings(List.of(String,...))method passing to itList<string>. Optionally you can also set custom id (user identifier) for each message - useSmsMessageRecipients.of(PhoneNumberWithCid)method passingPhoneNumberWithCidobject (in case of single recipient) orSmsMessageRecipients.ofArrayOfPhoneNumberWithCids(Recipients.of(PhoneNumberWithCid,...))method passing List<PhoneNumberWithCid> (in case of multiple recipients).
-
withMessage
public SmsMessage withMessage(java.lang.String message)
SMS message content
-
withSender
public SmsMessage withSender(java.lang.String sender)
SMS sender name
-
withSender
public SmsMessage withSender(java.util.Optional<java.lang.String> sender)
SMS sender name
-
withType
public SmsMessage withType(SmsType type)
SMS type (SmsType.SmsPro -> SMS PRO, SmsType.SmsEco -> SMS ECO, SmsType.SmsTwoWay -> SMS 2WAY)
-
withType
public SmsMessage withType(java.util.Optional<? extends SmsType> type)
SMS type (SmsType.SmsPro -> SMS PRO, SmsType.SmsEco -> SMS ECO, SmsType.SmsTwoWay -> SMS 2WAY)
-
withUnicode
public SmsMessage withUnicode(boolean unicode)
Should the message be sent with special characters, e.g. Polish diacritics (if any)? If false, those characters will be automatically replaced with their equivalents. If true your message will be sent as unicode but the message will be able to consist of fewer characters.
-
withUnicode
public SmsMessage withUnicode(java.util.Optional<java.lang.Boolean> unicode)
Should the message be sent with special characters, e.g. Polish diacritics (if any)? If false, those characters will be automatically replaced with their equivalents. If true your message will be sent as unicode but the message will be able to consist of fewer characters.
-
withFlash
public SmsMessage withFlash(boolean flash)
Should the message to be sent with class 0 (FLASH)?
-
withFlash
public SmsMessage withFlash(java.util.Optional<java.lang.Boolean> flash)
Should the message to be sent with class 0 (FLASH)?
-
withDate
public SmsMessage withDate(java.time.OffsetDateTime date)
Scheduled future date and time of sending the message (in ISO 8601 format). If missing or null - message will be sent immediately
-
withDate
public SmsMessage withDate(org.openapitools.jackson.nullable.JsonNullable<java.time.OffsetDateTime> date)
Scheduled future date and time of sending the message (in ISO 8601 format). If missing or null - message will be sent immediately
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-