# 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 ClusterConfigWithSessionIdleTimeout(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 = {
        'config': 'str',
        'config_with_defaults': 'str',
        'last_modified_at': 'datetime',
        'idle_timeout': 'int'
    }

    attribute_map = {
        'config': 'config',
        'config_with_defaults': 'config_with_defaults',
        'last_modified_at': 'last_modified_at',
        'idle_timeout': 'idle_timeout'
    }

    def __init__(self, config=None, config_with_defaults=None, last_modified_at=None, idle_timeout=None, local_vars_configuration=None):  # noqa: E501
        """ClusterConfigWithSessionIdleTimeout - 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._config = None
        self._config_with_defaults = None
        self._last_modified_at = None
        self._idle_timeout = None
        self.discriminator = None

        self.config = config
        self.config_with_defaults = config_with_defaults
        if last_modified_at is not None:
            self.last_modified_at = last_modified_at
        if idle_timeout is not None:
            self.idle_timeout = idle_timeout

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

        The cluster configuration in JSON format.  # noqa: E501

        :return: The config of this ClusterConfigWithSessionIdleTimeout.  # noqa: E501
        :rtype: str
        """
        return self._config

    @config.setter
    def config(self, config):
        """Sets the config of this ClusterConfigWithSessionIdleTimeout.

        The cluster configuration in JSON format.  # noqa: E501

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

        self._config = config

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

        The cluster configuration in JSON format with the defaults filled in.  # noqa: E501

        :return: The config_with_defaults of this ClusterConfigWithSessionIdleTimeout.  # noqa: E501
        :rtype: str
        """
        return self._config_with_defaults

    @config_with_defaults.setter
    def config_with_defaults(self, config_with_defaults):
        """Sets the config_with_defaults of this ClusterConfigWithSessionIdleTimeout.

        The cluster configuration in JSON format with the defaults filled in.  # noqa: E501

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

        self._config_with_defaults = config_with_defaults

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


        :return: The last_modified_at of this ClusterConfigWithSessionIdleTimeout.  # noqa: E501
        :rtype: datetime
        """
        return self._last_modified_at

    @last_modified_at.setter
    def last_modified_at(self, last_modified_at):
        """Sets the last_modified_at of this ClusterConfigWithSessionIdleTimeout.


        :param last_modified_at: The last_modified_at of this ClusterConfigWithSessionIdleTimeout.  # noqa: E501
        :type: datetime
        """

        self._last_modified_at = last_modified_at

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


        :return: The idle_timeout of this ClusterConfigWithSessionIdleTimeout.  # noqa: E501
        :rtype: int
        """
        return self._idle_timeout

    @idle_timeout.setter
    def idle_timeout(self, idle_timeout):
        """Sets the idle_timeout of this ClusterConfigWithSessionIdleTimeout.


        :param idle_timeout: The idle_timeout of this ClusterConfigWithSessionIdleTimeout.  # noqa: E501
        :type: int
        """

        self._idle_timeout = idle_timeout

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

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