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 classTweetCreateRequestPoll.CustomTypeAdapterFactorystatic classTweetCreateRequestPoll.ReplySettingsEnumSettings to indicate who can reply to the Tweet.
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>openapiFieldsstatic HashSet<String>openapiRequiredFieldsstatic StringSERIALIZED_NAME_DURATION_MINUTESstatic StringSERIALIZED_NAME_OPTIONSstatic StringSERIALIZED_NAME_REPLY_SETTINGS
-
Constructor Summary
Constructors Constructor Description TweetCreateRequestPoll()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TweetCreateRequestPolladdOptionsItem(String optionsItem)TweetCreateRequestPolldurationMinutes(Integer durationMinutes)booleanequals(Object o)static TweetCreateRequestPollfromJson(String jsonString)Create an instance of TweetCreateRequestPoll given an JSON stringIntegergetDurationMinutes()Duration of the poll in minutes.List<String>getOptions()Get optionsTweetCreateRequestPoll.ReplySettingsEnumgetReplySettings()Settings to indicate who can reply to the Tweet.inthashCode()TweetCreateRequestPolloptions(List<String> options)TweetCreateRequestPollreplySettings(TweetCreateRequestPoll.ReplySettingsEnum replySettings)voidsetDurationMinutes(Integer durationMinutes)voidsetOptions(List<String> options)voidsetReplySettings(TweetCreateRequestPoll.ReplySettingsEnum replySettings)StringtoJson()Convert an instance of TweetCreateRequestPoll to an JSON stringStringtoString()static voidvalidateJsonObject(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 IOExceptionValidates 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
-
-