Class PollOption


  • @Generated("org.openapitools.codegen.languages.JavaClientCodegen")
    public class PollOption
    extends Object
    Describes a choice in a Poll object.
    • Constructor Detail

      • PollOption

        public PollOption()
    • Method Detail

      • getLabel

        @Nonnull
        public String getLabel()
        The text of a poll choice.
        Returns:
        label
      • setLabel

        public void setLabel​(String label)
      • getPosition

        @Nonnull
        public Integer getPosition()
        Position of this choice in the poll.
        Returns:
        position
      • setPosition

        public void setPosition​(Integer position)
      • getVotes

        @Nonnull
        public Integer getVotes()
        Number of users who voted for this choice.
        Returns:
        votes
      • setVotes

        public void setVotes​(Integer votes)
      • 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 PollOption
      • fromJson

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

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