# coding: utf-8

"""
    Internal API

    SmartDiagnostics REST API for internal users only  # noqa: E501

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

import pprint
import re  # noqa: F401

import six

class TicketResponse(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': 'str',
        'number': 'int',
        'name': 'str',
        'description': 'str',
        'created': 'datetime',
        'updated': 'datetime',
        'archived': 'datetime',
        'is_archived': 'bool',
        'board': 'BoardChild',
        'location': 'LocationChild',
        'created_by': 'UserChild',
        'status': 'StatusChild',
        'assets': 'list[GroupChild]'
    }

    attribute_map = {
        'id': 'Id',
        'number': 'Number',
        'name': 'Name',
        'description': 'Description',
        'created': 'Created',
        'updated': 'Updated',
        'archived': 'Archived',
        'is_archived': 'IsArchived',
        'board': 'Board',
        'location': 'Location',
        'created_by': 'CreatedBy',
        'status': 'Status',
        'assets': 'Assets'
    }

    def __init__(self, id=None, number=None, name=None, description=None, created=None, updated=None, archived=None, is_archived=None, board=None, location=None, created_by=None, status=None, assets=None):  # noqa: E501
        """TicketResponse - a model defined in Swagger"""  # noqa: E501
        self._id = None
        self._number = None
        self._name = None
        self._description = None
        self._created = None
        self._updated = None
        self._archived = None
        self._is_archived = None
        self._board = None
        self._location = None
        self._created_by = None
        self._status = None
        self._assets = None
        self.discriminator = None
        self.id = id
        self.number = number
        self.name = name
        if description is not None:
            self.description = description
        self.created = created
        self.updated = updated
        if archived is not None:
            self.archived = archived
        self.is_archived = is_archived
        self.board = board
        self.location = location
        self.created_by = created_by
        self.status = status
        self.assets = assets

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

        Ticket id  # noqa: E501

        :return: The id of this TicketResponse.  # noqa: E501
        :rtype: str
        """
        return self._id

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

        Ticket id  # noqa: E501

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

        self._id = id

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

        Ticket number  # noqa: E501

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

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

        Ticket number  # noqa: E501

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

        self._number = number

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

        Ticket name  # noqa: E501

        :return: The name of this TicketResponse.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this TicketResponse.

        Ticket name  # noqa: E501

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

        self._name = name

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

        Ticket description  # noqa: E501

        :return: The description of this TicketResponse.  # noqa: E501
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """Sets the description of this TicketResponse.

        Ticket description  # noqa: E501

        :param description: The description of this TicketResponse.  # noqa: E501
        :type: str
        """

        self._description = description

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

        When the ticket was created  # noqa: E501

        :return: The created of this TicketResponse.  # noqa: E501
        :rtype: datetime
        """
        return self._created

    @created.setter
    def created(self, created):
        """Sets the created of this TicketResponse.

        When the ticket was created  # noqa: E501

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

        self._created = created

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

        When the ticket was updated  # noqa: E501

        :return: The updated of this TicketResponse.  # noqa: E501
        :rtype: datetime
        """
        return self._updated

    @updated.setter
    def updated(self, updated):
        """Sets the updated of this TicketResponse.

        When the ticket was updated  # noqa: E501

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

        self._updated = updated

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

        When the ticket was archived. Will be null if the ticket  has not been archived.  # noqa: E501

        :return: The archived of this TicketResponse.  # noqa: E501
        :rtype: datetime
        """
        return self._archived

    @archived.setter
    def archived(self, archived):
        """Sets the archived of this TicketResponse.

        When the ticket was archived. Will be null if the ticket  has not been archived.  # noqa: E501

        :param archived: The archived of this TicketResponse.  # noqa: E501
        :type: datetime
        """

        self._archived = archived

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

        Whether the ticket is archived.  # noqa: E501

        :return: The is_archived of this TicketResponse.  # noqa: E501
        :rtype: bool
        """
        return self._is_archived

    @is_archived.setter
    def is_archived(self, is_archived):
        """Sets the is_archived of this TicketResponse.

        Whether the ticket is archived.  # noqa: E501

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

        self._is_archived = is_archived

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


        :return: The board of this TicketResponse.  # noqa: E501
        :rtype: BoardChild
        """
        return self._board

    @board.setter
    def board(self, board):
        """Sets the board of this TicketResponse.


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

        self._board = board

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


        :return: The location of this TicketResponse.  # noqa: E501
        :rtype: LocationChild
        """
        return self._location

    @location.setter
    def location(self, location):
        """Sets the location of this TicketResponse.


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

        self._location = location

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


        :return: The created_by of this TicketResponse.  # noqa: E501
        :rtype: UserChild
        """
        return self._created_by

    @created_by.setter
    def created_by(self, created_by):
        """Sets the created_by of this TicketResponse.


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

        self._created_by = created_by

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


        :return: The status of this TicketResponse.  # noqa: E501
        :rtype: StatusChild
        """
        return self._status

    @status.setter
    def status(self, status):
        """Sets the status of this TicketResponse.


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

        self._status = status

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

        The assets associated with the ticket  # noqa: E501

        :return: The assets of this TicketResponse.  # noqa: E501
        :rtype: list[GroupChild]
        """
        return self._assets

    @assets.setter
    def assets(self, assets):
        """Sets the assets of this TicketResponse.

        The assets associated with the ticket  # noqa: E501

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

        self._assets = assets

    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(TicketResponse, 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, TicketResponse):
            return False

        return self.__dict__ == other.__dict__

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