Class Poll


  • @Generated("org.openapitools.codegen.languages.JavaClientCodegen")
    public class Poll
    extends Object
    Represent a Poll attached to a Tweet.
    • Constructor Detail

      • Poll

        public Poll()
    • Method Detail

      • durationMinutes

        public Poll durationMinutes​(Integer durationMinutes)
      • getDurationMinutes

        @Nullable
        public Integer getDurationMinutes()
        Get durationMinutes minimum: 5 maximum: 10080
        Returns:
        durationMinutes
      • setDurationMinutes

        public void setDurationMinutes​(Integer durationMinutes)
      • setEndDatetime

        public void setEndDatetime​(OffsetDateTime endDatetime)
      • getId

        @Nonnull
        public String getId()
        Unique identifier of this poll.
        Returns:
        id
      • setId

        public void setId​(String id)
      • addOptionsItem

        public Poll addOptionsItem​(PollOption optionsItem)
      • 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 Poll
      • fromJson

        public static Poll fromJson​(String jsonString)
                             throws IOException
        Create an instance of Poll given an JSON string
        Parameters:
        jsonString - JSON string
        Returns:
        An instance of Poll
        Throws:
        IOException - if the JSON string is invalid with respect to Poll
      • toJson

        public String toJson()
        Convert an instance of Poll to an JSON string
        Returns:
        JSON string