from datetime import date, datetime  # noqa: F401

from typing import List, Dict  # noqa: F401

from chromestatus_openapi.models.base_model import Model
from chromestatus_openapi import util


class PostVoteRequest(Model):
    """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

    Do not edit the class manually.
    """

    def __init__(self, state=None):  # noqa: E501
        """PostVoteRequest - a model defined in OpenAPI

        :param state: The state of this PostVoteRequest.  # noqa: E501
        :type state: int
        """
        self.openapi_types = {
            'state': int
        }

        self.attribute_map = {
            'state': 'state'
        }

        self._state = state

    @classmethod
    def from_dict(cls, dikt) -> 'PostVoteRequest':
        """Returns the dict as a model

        :param dikt: A dict.
        :type: dict
        :return: The PostVoteRequest of this PostVoteRequest.  # noqa: E501
        :rtype: PostVoteRequest
        """
        return util.deserialize_model(dikt, cls)

    @property
    def state(self) -> int:
        """Gets the state of this PostVoteRequest.

        The vote value to set. E.g., 2 to request a review, 5 to approve.  # noqa: E501

        :return: The state of this PostVoteRequest.
        :rtype: int
        """
        return self._state

    @state.setter
    def state(self, state: int):
        """Sets the state of this PostVoteRequest.

        The vote value to set. E.g., 2 to request a review, 5 to approve.  # noqa: E501

        :param state: The state of this PostVoteRequest.
        :type state: int
        """
        if state is None:
            raise ValueError("Invalid value for `state`, must not be `None`")  # noqa: E501

        self._state = state
