# 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 DecoratedRuntimeEnv(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',
        'ray_env_hash': 'str',
        'name': 'str',
        'working_dir': 'str',
        'py_modules': 'list[str]',
        'pip_packages': 'str',
        'conda_env_name': 'str',
        'conda_values': 'object',
        'env_variables': 'dict(str, str)',
        'created_at': 'datetime',
        'creator_id': 'str',
        'creator': 'MiniUser',
        'num_jobs': 'int',
        'num_named_actors': 'int'
    }

    attribute_map = {
        'id': 'id',
        'ray_env_hash': 'ray_env_hash',
        'name': 'name',
        'working_dir': 'working_dir',
        'py_modules': 'py_modules',
        'pip_packages': 'pip_packages',
        'conda_env_name': 'conda_env_name',
        'conda_values': 'conda_values',
        'env_variables': 'env_variables',
        'created_at': 'created_at',
        'creator_id': 'creator_id',
        'creator': 'creator',
        'num_jobs': 'num_jobs',
        'num_named_actors': 'num_named_actors'
    }

    def __init__(self, id=None, ray_env_hash=None, name=None, working_dir=None, py_modules=None, pip_packages=None, conda_env_name=None, conda_values=None, env_variables=None, created_at=None, creator_id=None, creator=None, num_jobs=None, num_named_actors=None, local_vars_configuration=None):  # noqa: E501
        """DecoratedRuntimeEnv - 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._ray_env_hash = None
        self._name = None
        self._working_dir = None
        self._py_modules = None
        self._pip_packages = None
        self._conda_env_name = None
        self._conda_values = None
        self._env_variables = None
        self._created_at = None
        self._creator_id = None
        self._creator = None
        self._num_jobs = None
        self._num_named_actors = None
        self.discriminator = None

        self.id = id
        self.ray_env_hash = ray_env_hash
        if name is not None:
            self.name = name
        if working_dir is not None:
            self.working_dir = working_dir
        if py_modules is not None:
            self.py_modules = py_modules
        if pip_packages is not None:
            self.pip_packages = pip_packages
        if conda_env_name is not None:
            self.conda_env_name = conda_env_name
        if conda_values is not None:
            self.conda_values = conda_values
        if env_variables is not None:
            self.env_variables = env_variables
        self.created_at = created_at
        self.creator_id = creator_id
        self.creator = creator
        self.num_jobs = num_jobs
        self.num_named_actors = num_named_actors

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


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

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


        :param id: The id of this DecoratedRuntimeEnv.  # 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 ray_env_hash(self):
        """Gets the ray_env_hash of this DecoratedRuntimeEnv.  # noqa: E501


        :return: The ray_env_hash of this DecoratedRuntimeEnv.  # noqa: E501
        :rtype: str
        """
        return self._ray_env_hash

    @ray_env_hash.setter
    def ray_env_hash(self, ray_env_hash):
        """Sets the ray_env_hash of this DecoratedRuntimeEnv.


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

        self._ray_env_hash = ray_env_hash

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


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

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


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

        self._name = name

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


        :return: The working_dir of this DecoratedRuntimeEnv.  # noqa: E501
        :rtype: str
        """
        return self._working_dir

    @working_dir.setter
    def working_dir(self, working_dir):
        """Sets the working_dir of this DecoratedRuntimeEnv.


        :param working_dir: The working_dir of this DecoratedRuntimeEnv.  # noqa: E501
        :type: str
        """

        self._working_dir = working_dir

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


        :return: The py_modules of this DecoratedRuntimeEnv.  # noqa: E501
        :rtype: list[str]
        """
        return self._py_modules

    @py_modules.setter
    def py_modules(self, py_modules):
        """Sets the py_modules of this DecoratedRuntimeEnv.


        :param py_modules: The py_modules of this DecoratedRuntimeEnv.  # noqa: E501
        :type: list[str]
        """

        self._py_modules = py_modules

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


        :return: The pip_packages of this DecoratedRuntimeEnv.  # noqa: E501
        :rtype: str
        """
        return self._pip_packages

    @pip_packages.setter
    def pip_packages(self, pip_packages):
        """Sets the pip_packages of this DecoratedRuntimeEnv.


        :param pip_packages: The pip_packages of this DecoratedRuntimeEnv.  # noqa: E501
        :type: str
        """

        self._pip_packages = pip_packages

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


        :return: The conda_env_name of this DecoratedRuntimeEnv.  # noqa: E501
        :rtype: str
        """
        return self._conda_env_name

    @conda_env_name.setter
    def conda_env_name(self, conda_env_name):
        """Sets the conda_env_name of this DecoratedRuntimeEnv.


        :param conda_env_name: The conda_env_name of this DecoratedRuntimeEnv.  # noqa: E501
        :type: str
        """

        self._conda_env_name = conda_env_name

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


        :return: The conda_values of this DecoratedRuntimeEnv.  # noqa: E501
        :rtype: object
        """
        return self._conda_values

    @conda_values.setter
    def conda_values(self, conda_values):
        """Sets the conda_values of this DecoratedRuntimeEnv.


        :param conda_values: The conda_values of this DecoratedRuntimeEnv.  # noqa: E501
        :type: object
        """

        self._conda_values = conda_values

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


        :return: The env_variables of this DecoratedRuntimeEnv.  # noqa: E501
        :rtype: dict(str, str)
        """
        return self._env_variables

    @env_variables.setter
    def env_variables(self, env_variables):
        """Sets the env_variables of this DecoratedRuntimeEnv.


        :param env_variables: The env_variables of this DecoratedRuntimeEnv.  # noqa: E501
        :type: dict(str, str)
        """

        self._env_variables = env_variables

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


        :return: The created_at of this DecoratedRuntimeEnv.  # noqa: E501
        :rtype: datetime
        """
        return self._created_at

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


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

        self._created_at = created_at

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


        :return: The creator_id of this DecoratedRuntimeEnv.  # noqa: E501
        :rtype: str
        """
        return self._creator_id

    @creator_id.setter
    def creator_id(self, creator_id):
        """Sets the creator_id of this DecoratedRuntimeEnv.


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

        self._creator_id = creator_id

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


        :return: The creator of this DecoratedRuntimeEnv.  # noqa: E501
        :rtype: MiniUser
        """
        return self._creator

    @creator.setter
    def creator(self, creator):
        """Sets the creator of this DecoratedRuntimeEnv.


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

        self._creator = creator

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


        :return: The num_jobs of this DecoratedRuntimeEnv.  # noqa: E501
        :rtype: int
        """
        return self._num_jobs

    @num_jobs.setter
    def num_jobs(self, num_jobs):
        """Sets the num_jobs of this DecoratedRuntimeEnv.


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

        self._num_jobs = num_jobs

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


        :return: The num_named_actors of this DecoratedRuntimeEnv.  # noqa: E501
        :rtype: int
        """
        return self._num_named_actors

    @num_named_actors.setter
    def num_named_actors(self, num_named_actors):
        """Sets the num_named_actors of this DecoratedRuntimeEnv.


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

        self._num_named_actors = num_named_actors

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

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