Package com.twitter.clientlib.model
Class CreateTweetRequestPoll
- java.lang.Object
-
- com.twitter.clientlib.model.CreateTweetRequestPoll
-
@Generated("org.openapitools.codegen.languages.JavaClientCodegen") public class CreateTweetRequestPoll 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 classCreateTweetRequestPoll.CustomTypeAdapterFactory
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>openapiFieldsstatic HashSet<String>openapiRequiredFieldsstatic StringSERIALIZED_NAME_DURATION_MINUTESstatic StringSERIALIZED_NAME_OPTIONS
-
Constructor Summary
Constructors Constructor Description CreateTweetRequestPoll()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CreateTweetRequestPolladdOptionsItem(String optionsItem)CreateTweetRequestPolldurationMinutes(Integer durationMinutes)booleanequals(Object o)static CreateTweetRequestPollfromJson(String jsonString)Create an instance of CreateTweetRequestPoll given an JSON stringIntegergetDurationMinutes()Duration of the poll in minutes.List<String>getOptions()Get optionsinthashCode()CreateTweetRequestPolloptions(List<String> options)voidsetDurationMinutes(Integer durationMinutes)voidsetOptions(List<String> options)StringtoJson()Convert an instance of CreateTweetRequestPoll 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_OPTIONS
public static final String SERIALIZED_NAME_OPTIONS
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_DURATION_MINUTES
public static final String SERIALIZED_NAME_DURATION_MINUTES
- See Also:
- Constant Field Values
-
-
Method Detail
-
options
public CreateTweetRequestPoll options(List<String> options)
-
addOptionsItem
public CreateTweetRequestPoll addOptionsItem(String optionsItem)
-
durationMinutes
public CreateTweetRequestPoll durationMinutes(Integer durationMinutes)
-
getDurationMinutes
@Nullable public Integer getDurationMinutes()
Duration of the poll in minutes. minimum: 5 maximum: 10080- Returns:
- durationMinutes
-
setDurationMinutes
public void setDurationMinutes(Integer durationMinutes)
-
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 CreateTweetRequestPoll
-
fromJson
public static CreateTweetRequestPoll fromJson(String jsonString) throws IOException
Create an instance of CreateTweetRequestPoll given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of CreateTweetRequestPoll
- Throws:
IOException- if the JSON string is invalid with respect to CreateTweetRequestPoll
-
toJson
public String toJson()
Convert an instance of CreateTweetRequestPoll to an JSON string- Returns:
- JSON string
-
-