# 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 RayRuntimeEnvConfig(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 = {
        'working_dir': 'str',
        'py_modules': 'list[str]',
        'relative_working_dir': 'str',
        'relative_py_modules': 'list[str]',
        'py_executable': 'str',
        'pip': 'list[str]',
        'conda': 'object',
        'env_vars': 'dict(str, str)',
        'config': 'object',
        'image_uri': 'str'
    }

    attribute_map = {
        'working_dir': 'working_dir',
        'py_modules': 'py_modules',
        'relative_working_dir': 'relative_working_dir',
        'relative_py_modules': 'relative_py_modules',
        'py_executable': 'py_executable',
        'pip': 'pip',
        'conda': 'conda',
        'env_vars': 'env_vars',
        'config': 'config',
        'image_uri': 'image_uri'
    }

    def __init__(self, working_dir=None, py_modules=None, relative_working_dir=None, relative_py_modules=None, py_executable=None, pip=None, conda=None, env_vars=None, config=None, image_uri=None, local_vars_configuration=None):  # noqa: E501
        """RayRuntimeEnvConfig - 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._working_dir = None
        self._py_modules = None
        self._relative_working_dir = None
        self._relative_py_modules = None
        self._py_executable = None
        self._pip = None
        self._conda = None
        self._env_vars = None
        self._config = None
        self._image_uri = None
        self.discriminator = None

        if working_dir is not None:
            self.working_dir = working_dir
        if py_modules is not None:
            self.py_modules = py_modules
        if relative_working_dir is not None:
            self.relative_working_dir = relative_working_dir
        if relative_py_modules is not None:
            self.relative_py_modules = relative_py_modules
        if py_executable is not None:
            self.py_executable = py_executable
        if pip is not None:
            self.pip = pip
        if conda is not None:
            self.conda = conda
        if env_vars is not None:
            self.env_vars = env_vars
        if config is not None:
            self.config = config
        if image_uri is not None:
            self.image_uri = image_uri

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

        The working directory that your code will run in. Must be a remote URI like an s3 or git path.  # noqa: E501

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

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

        The working directory that your code will run in. Must be a remote URI like an s3 or git path.  # noqa: E501

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

        self._working_dir = working_dir

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

        Python modules that will be installed along with your runtime env. These must be remote URIs.  # noqa: E501

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

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

        Python modules that will be installed along with your runtime env. These must be remote URIs.  # noqa: E501

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

        self._py_modules = py_modules

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

        Relative path to the working directory that your code will run in. The appropriate cloud deployment object storage will be prepended to this path.  # noqa: E501

        :return: The relative_working_dir of this RayRuntimeEnvConfig.  # noqa: E501
        :rtype: str
        """
        return self._relative_working_dir

    @relative_working_dir.setter
    def relative_working_dir(self, relative_working_dir):
        """Sets the relative_working_dir of this RayRuntimeEnvConfig.

        Relative path to the working directory that your code will run in. The appropriate cloud deployment object storage will be prepended to this path.  # noqa: E501

        :param relative_working_dir: The relative_working_dir of this RayRuntimeEnvConfig.  # noqa: E501
        :type: str
        """

        self._relative_working_dir = relative_working_dir

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

        Relative paths to python modules that will be installed along with your runtime env. The appropriate cloud deployment object storage will be prepended to these paths. If `py_modules` are specified, they will be also be installed.  # noqa: E501

        :return: The relative_py_modules of this RayRuntimeEnvConfig.  # noqa: E501
        :rtype: list[str]
        """
        return self._relative_py_modules

    @relative_py_modules.setter
    def relative_py_modules(self, relative_py_modules):
        """Sets the relative_py_modules of this RayRuntimeEnvConfig.

        Relative paths to python modules that will be installed along with your runtime env. The appropriate cloud deployment object storage will be prepended to these paths. If `py_modules` are specified, they will be also be installed.  # noqa: E501

        :param relative_py_modules: The relative_py_modules of this RayRuntimeEnvConfig.  # noqa: E501
        :type: list[str]
        """

        self._relative_py_modules = relative_py_modules

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

        Specifies the executable used for running the Ray workers. It can include arguments as well.  # noqa: E501

        :return: The py_executable of this RayRuntimeEnvConfig.  # noqa: E501
        :rtype: str
        """
        return self._py_executable

    @py_executable.setter
    def py_executable(self, py_executable):
        """Sets the py_executable of this RayRuntimeEnvConfig.

        Specifies the executable used for running the Ray workers. It can include arguments as well.  # noqa: E501

        :param py_executable: The py_executable of this RayRuntimeEnvConfig.  # noqa: E501
        :type: str
        """

        self._py_executable = py_executable

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

        A list of pip packages to install.  # noqa: E501

        :return: The pip of this RayRuntimeEnvConfig.  # noqa: E501
        :rtype: list[str]
        """
        return self._pip

    @pip.setter
    def pip(self, pip):
        """Sets the pip of this RayRuntimeEnvConfig.

        A list of pip packages to install.  # noqa: E501

        :param pip: The pip of this RayRuntimeEnvConfig.  # noqa: E501
        :type: list[str]
        """

        self._pip = pip

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

        [Union[Dict[str, Any], str]: Either the conda YAML config or the name of a local conda env (e.g., \"pytorch_p36\"),   # noqa: E501

        :return: The conda of this RayRuntimeEnvConfig.  # noqa: E501
        :rtype: object
        """
        return self._conda

    @conda.setter
    def conda(self, conda):
        """Sets the conda of this RayRuntimeEnvConfig.

        [Union[Dict[str, Any], str]: Either the conda YAML config or the name of a local conda env (e.g., \"pytorch_p36\"),   # noqa: E501

        :param conda: The conda of this RayRuntimeEnvConfig.  # noqa: E501
        :type: object
        """

        self._conda = conda

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

        Environment variables to set.  # noqa: E501

        :return: The env_vars of this RayRuntimeEnvConfig.  # noqa: E501
        :rtype: dict(str, str)
        """
        return self._env_vars

    @env_vars.setter
    def env_vars(self, env_vars):
        """Sets the env_vars of this RayRuntimeEnvConfig.

        Environment variables to set.  # noqa: E501

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

        self._env_vars = env_vars

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

        Config for runtime environment. Can be used to setup setup_timeout_seconds, the timeout of runtime environment creation.  # noqa: E501

        :return: The config of this RayRuntimeEnvConfig.  # noqa: E501
        :rtype: object
        """
        return self._config

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

        Config for runtime environment. Can be used to setup setup_timeout_seconds, the timeout of runtime environment creation.  # noqa: E501

        :param config: The config of this RayRuntimeEnvConfig.  # noqa: E501
        :type: object
        """

        self._config = config

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

        Specifies the image URI of the container in which the job will run.  # noqa: E501

        :return: The image_uri of this RayRuntimeEnvConfig.  # noqa: E501
        :rtype: str
        """
        return self._image_uri

    @image_uri.setter
    def image_uri(self, image_uri):
        """Sets the image_uri of this RayRuntimeEnvConfig.

        Specifies the image URI of the container in which the job will run.  # noqa: E501

        :param image_uri: The image_uri of this RayRuntimeEnvConfig.  # noqa: E501
        :type: str
        """

        self._image_uri = image_uri

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

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