Class 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.
    • Constructor Detail

      • CreateTweetRequestPoll

        public CreateTweetRequestPoll()
    • Method Detail

      • setOptions

        public void setOptions​(List<String> options)
      • getDurationMinutes

        @Nullable
        public Integer getDurationMinutes()
        Duration of the poll in minutes. minimum: 5 maximum: 10080
        Returns:
        durationMinutes
      • setDurationMinutes

        public void setDurationMinutes​(Integer durationMinutes)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • 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 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