Package com.twitter.clientlib.model
Class TweetCreateRequestPoll
- java.lang.Object
-
- com.twitter.clientlib.model.TweetCreateRequestPoll
-
@Generated("org.openapitools.codegen.languages.JavaClientCodegen") public class TweetCreateRequestPoll extends Object
Poll options for a Tweet with a poll. This is mutually exclusive from Media and Quote Tweet Id.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TweetCreateRequestPoll.CustomTypeAdapterFactory
static class
TweetCreateRequestPoll.ReplySettingsEnum
Settings to indicate who can reply to the Tweet.
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>
openapiFields
static HashSet<String>
openapiRequiredFields
static String
SERIALIZED_NAME_DURATION_MINUTES
static String
SERIALIZED_NAME_OPTIONS
static String
SERIALIZED_NAME_REPLY_SETTINGS
-
Constructor Summary
Constructors Constructor Description TweetCreateRequestPoll()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TweetCreateRequestPoll
addOptionsItem(String optionsItem)
TweetCreateRequestPoll
durationMinutes(Integer durationMinutes)
boolean
equals(Object o)
static TweetCreateRequestPoll
fromJson(String jsonString)
Create an instance of TweetCreateRequestPoll given an JSON stringInteger
getDurationMinutes()
Duration of the poll in minutes.List<String>
getOptions()
Get optionsTweetCreateRequestPoll.ReplySettingsEnum
getReplySettings()
Settings to indicate who can reply to the Tweet.int
hashCode()
TweetCreateRequestPoll
options(List<String> options)
TweetCreateRequestPoll
replySettings(TweetCreateRequestPoll.ReplySettingsEnum replySettings)
void
setDurationMinutes(Integer durationMinutes)
void
setOptions(List<String> options)
void
setReplySettings(TweetCreateRequestPoll.ReplySettingsEnum replySettings)
String
toJson()
Convert an instance of TweetCreateRequestPoll to an JSON stringString
toString()
static void
validateJsonObject(com.google.gson.JsonObject jsonObj)
Validates the JSON Object and throws an exception if issues found
-
-
-
Field Detail
-
SERIALIZED_NAME_DURATION_MINUTES
public static final String SERIALIZED_NAME_DURATION_MINUTES
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_OPTIONS
public static final String SERIALIZED_NAME_OPTIONS
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_REPLY_SETTINGS
public static final String SERIALIZED_NAME_REPLY_SETTINGS
- See Also:
- Constant Field Values
-
-
Method Detail
-
durationMinutes
public TweetCreateRequestPoll durationMinutes(Integer durationMinutes)
-
getDurationMinutes
@Nonnull public Integer getDurationMinutes()
Duration of the poll in minutes. minimum: 5 maximum: 10080- Returns:
- durationMinutes
-
setDurationMinutes
public void setDurationMinutes(Integer durationMinutes)
-
options
public TweetCreateRequestPoll options(List<String> options)
-
addOptionsItem
public TweetCreateRequestPoll addOptionsItem(String optionsItem)
-
replySettings
public TweetCreateRequestPoll replySettings(TweetCreateRequestPoll.ReplySettingsEnum replySettings)
-
getReplySettings
@Nullable public TweetCreateRequestPoll.ReplySettingsEnum getReplySettings()
Settings to indicate who can reply to the Tweet.- Returns:
- replySettings
-
setReplySettings
public void setReplySettings(TweetCreateRequestPoll.ReplySettingsEnum replySettings)
-
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 TweetCreateRequestPoll
-
fromJson
public static TweetCreateRequestPoll fromJson(String jsonString) throws IOException
Create an instance of TweetCreateRequestPoll given an JSON string- Parameters:
jsonString
- JSON string- Returns:
- An instance of TweetCreateRequestPoll
- Throws:
IOException
- if the JSON string is invalid with respect to TweetCreateRequestPoll
-
toJson
public String toJson()
Convert an instance of TweetCreateRequestPoll to an JSON string- Returns:
- JSON string
-
-