# 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 Instance(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 = {
        'instance_id': 'str',
        'tags': 'dict(str, str)',
        'status': 'InstanceStatus',
        'status_updated_at': 'datetime',
        'updated_at': 'datetime',
        'external_ip': 'str',
        'internal_ip': 'str',
        'attributes': 'object',
        'conditions': 'object'
    }

    attribute_map = {
        'instance_id': 'instance_id',
        'tags': 'tags',
        'status': 'status',
        'status_updated_at': 'status_updated_at',
        'updated_at': 'updated_at',
        'external_ip': 'external_ip',
        'internal_ip': 'internal_ip',
        'attributes': 'attributes',
        'conditions': 'conditions'
    }

    def __init__(self, instance_id=None, tags=None, status=None, status_updated_at=None, updated_at=None, external_ip='', internal_ip='', attributes=None, conditions=None, local_vars_configuration=None):  # noqa: E501
        """Instance - 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._instance_id = None
        self._tags = None
        self._status = None
        self._status_updated_at = None
        self._updated_at = None
        self._external_ip = None
        self._internal_ip = None
        self._attributes = None
        self._conditions = None
        self.discriminator = None

        self.instance_id = instance_id
        self.tags = tags
        self.status = status
        self.status_updated_at = status_updated_at
        self.updated_at = updated_at
        if external_ip is not None:
            self.external_ip = external_ip
        if internal_ip is not None:
            self.internal_ip = internal_ip
        if attributes is not None:
            self.attributes = attributes
        if conditions is not None:
            self.conditions = conditions

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


        :return: The instance_id of this Instance.  # noqa: E501
        :rtype: str
        """
        return self._instance_id

    @instance_id.setter
    def instance_id(self, instance_id):
        """Sets the instance_id of this Instance.


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

        self._instance_id = instance_id

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


        :return: The tags of this Instance.  # noqa: E501
        :rtype: dict(str, str)
        """
        return self._tags

    @tags.setter
    def tags(self, tags):
        """Sets the tags of this Instance.


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

        self._tags = tags

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


        :return: The status of this Instance.  # noqa: E501
        :rtype: InstanceStatus
        """
        return self._status

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


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

        self._status = status

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


        :return: The status_updated_at of this Instance.  # noqa: E501
        :rtype: datetime
        """
        return self._status_updated_at

    @status_updated_at.setter
    def status_updated_at(self, status_updated_at):
        """Sets the status_updated_at of this Instance.


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

        self._status_updated_at = status_updated_at

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


        :return: The updated_at of this Instance.  # noqa: E501
        :rtype: datetime
        """
        return self._updated_at

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


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

        self._updated_at = updated_at

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


        :return: The external_ip of this Instance.  # noqa: E501
        :rtype: str
        """
        return self._external_ip

    @external_ip.setter
    def external_ip(self, external_ip):
        """Sets the external_ip of this Instance.


        :param external_ip: The external_ip of this Instance.  # noqa: E501
        :type: str
        """

        self._external_ip = external_ip

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


        :return: The internal_ip of this Instance.  # noqa: E501
        :rtype: str
        """
        return self._internal_ip

    @internal_ip.setter
    def internal_ip(self, internal_ip):
        """Sets the internal_ip of this Instance.


        :param internal_ip: The internal_ip of this Instance.  # noqa: E501
        :type: str
        """

        self._internal_ip = internal_ip

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


        :return: The attributes of this Instance.  # noqa: E501
        :rtype: object
        """
        return self._attributes

    @attributes.setter
    def attributes(self, attributes):
        """Sets the attributes of this Instance.


        :param attributes: The attributes of this Instance.  # noqa: E501
        :type: object
        """

        self._attributes = attributes

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


        :return: The conditions of this Instance.  # noqa: E501
        :rtype: object
        """
        return self._conditions

    @conditions.setter
    def conditions(self, conditions):
        """Sets the conditions of this Instance.


        :param conditions: The conditions of this Instance.  # noqa: E501
        :type: object
        """

        self._conditions = conditions

    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, Instance):
            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, Instance):
            return True

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