# coding: utf-8

"""
    Managed Ray API

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: 0.1.0
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from openapi_client.configuration import Configuration


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

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_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.
    """
    openapi_types = {
        'id': 'str',
        'name': 'str',
        'contract_type': 'str',
        'starting_at': 'datetime',
        'ending_before': 'datetime',
        'is_archived': 'bool'
    }

    attribute_map = {
        'id': 'id',
        'name': 'name',
        'contract_type': 'contract_type',
        'starting_at': 'starting_at',
        'ending_before': 'ending_before',
        'is_archived': 'is_archived'
    }

    def __init__(self, id=None, name=None, contract_type=None, starting_at=None, ending_before=None, is_archived=False, local_vars_configuration=None):  # noqa: E501
        """ContractInfo - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._id = None
        self._name = None
        self._contract_type = None
        self._starting_at = None
        self._ending_before = None
        self._is_archived = None
        self.discriminator = None

        self.id = id
        if name is not None:
            self.name = name
        if contract_type is not None:
            self.contract_type = contract_type
        if starting_at is not None:
            self.starting_at = starting_at
        if ending_before is not None:
            self.ending_before = ending_before
        if is_archived is not None:
            self.is_archived = is_archived

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

        Contract ID  # noqa: E501

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

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

        Contract ID  # noqa: E501

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

        self._id = id

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

        Contract name  # noqa: E501

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

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

        Contract name  # noqa: E501

        :param name: The name of this ContractInfo.  # noqa: E501
        :type: str
        """

        self._name = name

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

        Contract type  # noqa: E501

        :return: The contract_type of this ContractInfo.  # noqa: E501
        :rtype: str
        """
        return self._contract_type

    @contract_type.setter
    def contract_type(self, contract_type):
        """Sets the contract_type of this ContractInfo.

        Contract type  # noqa: E501

        :param contract_type: The contract_type of this ContractInfo.  # noqa: E501
        :type: str
        """

        self._contract_type = contract_type

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

        Contract start date  # noqa: E501

        :return: The starting_at of this ContractInfo.  # noqa: E501
        :rtype: datetime
        """
        return self._starting_at

    @starting_at.setter
    def starting_at(self, starting_at):
        """Sets the starting_at of this ContractInfo.

        Contract start date  # noqa: E501

        :param starting_at: The starting_at of this ContractInfo.  # noqa: E501
        :type: datetime
        """

        self._starting_at = starting_at

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

        Contract end date  # noqa: E501

        :return: The ending_before of this ContractInfo.  # noqa: E501
        :rtype: datetime
        """
        return self._ending_before

    @ending_before.setter
    def ending_before(self, ending_before):
        """Sets the ending_before of this ContractInfo.

        Contract end date  # noqa: E501

        :param ending_before: The ending_before of this ContractInfo.  # noqa: E501
        :type: datetime
        """

        self._ending_before = ending_before

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

        Whether contract is archived  # noqa: E501

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

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

        Whether contract is archived  # noqa: E501

        :param is_archived: The is_archived of this ContractInfo.  # noqa: E501
        :type: bool
        """

        self._is_archived = is_archived

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

        for attr, _ in six.iteritems(self.openapi_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

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

        return self.to_dict() == other.to_dict()

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

        return self.to_dict() != other.to_dict()
