Class Attachments
- java.lang.Object
-
- pl.gsmservice.gateway.models.components.Attachments
-
public class Attachments extends java.lang.ObjectAttachmentsAttachments for the message. You can pass here images, audio and video files bodies. To set one attachment please use
Attachments.of(String)method simply passing to it astringwith attachment body encoded bybase64. To set multiple attachments please useAttachments.of(List.of(String,...))method passing to itList<string>with attachments bodies encoded bybase64. Max 3 attachments per message.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAttachments._Deserializer
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)inthashCode()static Attachmentsof(java.lang.String value)static Attachmentsof(java.util.List<java.lang.String> value)java.lang.StringtoString()java.lang.Objectvalue()Returns an instance of one of these types:java.lang.Stringjava.util.List<java.lang.String>
-
-
-
Method Detail
-
of
public static Attachments of(java.lang.String value)
-
of
public static Attachments of(java.util.List<java.lang.String> value)
-
value
public java.lang.Object value()
Returns an instance of one of these types:java.lang.Stringjava.util.List<java.lang.String>
Use
instanceofto determine what type is returned. For example:if (obj.value() instanceof String) { String answer = (String) obj.value(); System.out.println("answer=" + answer); }- Returns:
- value of oneOf type
-
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
-
-