# coding: utf-8

"""
    DagsHub API

    The api docs are made with SwaggerUI using the OpenAPI 3 specification.   # noqa: E501

    OpenAPI spec version: 1.0.1
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

class Issue(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    """
    """
    Attributes:
      swagger_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    """
    swagger_types = {
        'id': 'int',
        'number': 'int',
        'user': 'User',
        'title': 'Title',
        'body': 'Body',
        'labels': 'list[IssueLabels]',
        'milestone': 'IssueMilestone',
        'assignee': 'IssueAssignee',
        'state': 'str',
        'comments': 'int',
        'created_at': 'str',
        'updated_at': 'str',
        'pull_request': 'object',
        'closed': 'bool'
    }

    attribute_map = {
        'id': 'id',
        'number': 'number',
        'user': 'user',
        'title': 'title',
        'body': 'body',
        'labels': 'labels',
        'milestone': 'milestone',
        'assignee': 'assignee',
        'state': 'state',
        'comments': 'comments',
        'created_at': 'created_at',
        'updated_at': 'updated_at',
        'pull_request': 'pull_request',
        'closed': 'closed'
    }

    def __init__(self, id=None, number=None, user=None, title=None, body=None, labels=None, milestone=None, assignee=None, state=None, comments=None, created_at=None, updated_at=None, pull_request=None, closed=None):  # noqa: E501
        """Issue - a model defined in Swagger"""  # noqa: E501
        self._id = None
        self._number = None
        self._user = None
        self._title = None
        self._body = None
        self._labels = None
        self._milestone = None
        self._assignee = None
        self._state = None
        self._comments = None
        self._created_at = None
        self._updated_at = None
        self._pull_request = None
        self._closed = None
        self.discriminator = None
        if id is not None:
            self.id = id
        if number is not None:
            self.number = number
        if user is not None:
            self.user = user
        self.title = title
        self.body = body
        self.labels = labels
        self.milestone = milestone
        self.assignee = assignee
        if state is not None:
            self.state = state
        if comments is not None:
            self.comments = comments
        if created_at is not None:
            self.created_at = created_at
        if updated_at is not None:
            self.updated_at = updated_at
        if pull_request is not None:
            self.pull_request = pull_request
        self.closed = closed

    @property
    def id(self):
        """Gets the id of this Issue.  # noqa: E501


        :return: The id of this Issue.  # noqa: E501
        :rtype: int
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this Issue.


        :param id: The id of this Issue.  # noqa: E501
        :type: int
        """

        self._id = id

    @property
    def number(self):
        """Gets the number of this Issue.  # noqa: E501


        :return: The number of this Issue.  # noqa: E501
        :rtype: int
        """
        return self._number

    @number.setter
    def number(self, number):
        """Sets the number of this Issue.


        :param number: The number of this Issue.  # noqa: E501
        :type: int
        """

        self._number = number

    @property
    def user(self):
        """Gets the user of this Issue.  # noqa: E501


        :return: The user of this Issue.  # noqa: E501
        :rtype: User
        """
        return self._user

    @user.setter
    def user(self, user):
        """Sets the user of this Issue.


        :param user: The user of this Issue.  # noqa: E501
        :type: User
        """

        self._user = user

    @property
    def title(self):
        """Gets the title of this Issue.  # noqa: E501


        :return: The title of this Issue.  # noqa: E501
        :rtype: Title
        """
        return self._title

    @title.setter
    def title(self, title):
        """Sets the title of this Issue.


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

        self._title = title

    @property
    def body(self):
        """Gets the body of this Issue.  # noqa: E501


        :return: The body of this Issue.  # noqa: E501
        :rtype: Body
        """
        return self._body

    @body.setter
    def body(self, body):
        """Sets the body of this Issue.


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

        self._body = body

    @property
    def labels(self):
        """Gets the labels of this Issue.  # noqa: E501


        :return: The labels of this Issue.  # noqa: E501
        :rtype: list[IssueLabels]
        """
        return self._labels

    @labels.setter
    def labels(self, labels):
        """Sets the labels of this Issue.


        :param labels: The labels of this Issue.  # noqa: E501
        :type: list[IssueLabels]
        """
        if labels is None:
            raise ValueError("Invalid value for `labels`, must not be `None`")  # noqa: E501

        self._labels = labels

    @property
    def milestone(self):
        """Gets the milestone of this Issue.  # noqa: E501


        :return: The milestone of this Issue.  # noqa: E501
        :rtype: IssueMilestone
        """
        return self._milestone

    @milestone.setter
    def milestone(self, milestone):
        """Sets the milestone of this Issue.


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

        self._milestone = milestone

    @property
    def assignee(self):
        """Gets the assignee of this Issue.  # noqa: E501


        :return: The assignee of this Issue.  # noqa: E501
        :rtype: IssueAssignee
        """
        return self._assignee

    @assignee.setter
    def assignee(self, assignee):
        """Sets the assignee of this Issue.


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

        self._assignee = assignee

    @property
    def state(self):
        """Gets the state of this Issue.  # noqa: E501


        :return: The state of this Issue.  # noqa: E501
        :rtype: str
        """
        return self._state

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


        :param state: The state of this Issue.  # noqa: E501
        :type: str
        """

        self._state = state

    @property
    def comments(self):
        """Gets the comments of this Issue.  # noqa: E501


        :return: The comments of this Issue.  # noqa: E501
        :rtype: int
        """
        return self._comments

    @comments.setter
    def comments(self, comments):
        """Sets the comments of this Issue.


        :param comments: The comments of this Issue.  # noqa: E501
        :type: int
        """

        self._comments = comments

    @property
    def created_at(self):
        """Gets the created_at of this Issue.  # noqa: E501


        :return: The created_at of this Issue.  # noqa: E501
        :rtype: str
        """
        return self._created_at

    @created_at.setter
    def created_at(self, created_at):
        """Sets the created_at of this Issue.


        :param created_at: The created_at of this Issue.  # noqa: E501
        :type: str
        """

        self._created_at = created_at

    @property
    def updated_at(self):
        """Gets the updated_at of this Issue.  # noqa: E501


        :return: The updated_at of this Issue.  # noqa: E501
        :rtype: str
        """
        return self._updated_at

    @updated_at.setter
    def updated_at(self, updated_at):
        """Sets the updated_at of this Issue.


        :param updated_at: The updated_at of this Issue.  # noqa: E501
        :type: str
        """

        self._updated_at = updated_at

    @property
    def pull_request(self):
        """Gets the pull_request of this Issue.  # noqa: E501


        :return: The pull_request of this Issue.  # noqa: E501
        :rtype: object
        """
        return self._pull_request

    @pull_request.setter
    def pull_request(self, pull_request):
        """Sets the pull_request of this Issue.


        :param pull_request: The pull_request of this Issue.  # noqa: E501
        :type: object
        """

        self._pull_request = pull_request

    @property
    def closed(self):
        """Gets the closed of this Issue.  # noqa: E501


        :return: The closed of this Issue.  # noqa: E501
        :rtype: bool
        """
        return self._closed

    @closed.setter
    def closed(self, closed):
        """Sets the closed of this Issue.


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

        self._closed = closed

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.swagger_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            else:
                result[attr] = value
        if issubclass(Issue, dict):
            for key, value in self.items():
                result[key] = value

        return result

    def to_str(self):
        """Returns the string representation of the model"""
        return pprint.pformat(self.to_dict())

    def __repr__(self):
        """For `print` and `pprint`"""
        return self.to_str()

    def __eq__(self, other):
        """Returns true if both objects are equal"""
        if not isinstance(other, Issue):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        return not self == other
