# 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 CreateExperimentalWorkspace(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 = {
        'name': 'str',
        'description': 'str',
        'cloud_id': 'str',
        'compute_config_id': 'str',
        'base_snapshot': 'str',
        'cluster_environment_build_id': 'str',
        'idle_timeout_minutes': 'int',
        'cloned_job_id': 'str',
        'cloned_workspace_id': 'str'
    }

    attribute_map = {
        'name': 'name',
        'description': 'description',
        'cloud_id': 'cloud_id',
        'compute_config_id': 'compute_config_id',
        'base_snapshot': 'base_snapshot',
        'cluster_environment_build_id': 'cluster_environment_build_id',
        'idle_timeout_minutes': 'idle_timeout_minutes',
        'cloned_job_id': 'cloned_job_id',
        'cloned_workspace_id': 'cloned_workspace_id'
    }

    def __init__(self, name=None, description=None, cloud_id=None, compute_config_id=None, base_snapshot=None, cluster_environment_build_id=None, idle_timeout_minutes=120, cloned_job_id=None, cloned_workspace_id=None, local_vars_configuration=None):  # noqa: E501
        """CreateExperimentalWorkspace - 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._name = None
        self._description = None
        self._cloud_id = None
        self._compute_config_id = None
        self._base_snapshot = None
        self._cluster_environment_build_id = None
        self._idle_timeout_minutes = None
        self._cloned_job_id = None
        self._cloned_workspace_id = None
        self.discriminator = None

        self.name = name
        if description is not None:
            self.description = description
        self.cloud_id = cloud_id
        self.compute_config_id = compute_config_id
        if base_snapshot is not None:
            self.base_snapshot = base_snapshot
        self.cluster_environment_build_id = cluster_environment_build_id
        if idle_timeout_minutes is not None:
            self.idle_timeout_minutes = idle_timeout_minutes
        if cloned_job_id is not None:
            self.cloned_job_id = cloned_job_id
        if cloned_workspace_id is not None:
            self.cloned_workspace_id = cloned_workspace_id

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

        Name of the workspace to be created.  # noqa: E501

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

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

        Name of the workspace to be created.  # noqa: E501

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

        self._name = name

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

        Description of Workspace.  # noqa: E501

        :return: The description of this CreateExperimentalWorkspace.  # noqa: E501
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """Sets the description of this CreateExperimentalWorkspace.

        Description of Workspace.  # noqa: E501

        :param description: The description of this CreateExperimentalWorkspace.  # noqa: E501
        :type: str
        """

        self._description = description

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

        The cloud id for the workspace  # noqa: E501

        :return: The cloud_id of this CreateExperimentalWorkspace.  # noqa: E501
        :rtype: str
        """
        return self._cloud_id

    @cloud_id.setter
    def cloud_id(self, cloud_id):
        """Sets the cloud_id of this CreateExperimentalWorkspace.

        The cloud id for the workspace  # noqa: E501

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

        self._cloud_id = cloud_id

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

        The compute config id for the workspace  # noqa: E501

        :return: The compute_config_id of this CreateExperimentalWorkspace.  # noqa: E501
        :rtype: str
        """
        return self._compute_config_id

    @compute_config_id.setter
    def compute_config_id(self, compute_config_id):
        """Sets the compute_config_id of this CreateExperimentalWorkspace.

        The compute config id for the workspace  # noqa: E501

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

        self._compute_config_id = compute_config_id

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

        Metadata on base snapshot  # noqa: E501

        :return: The base_snapshot of this CreateExperimentalWorkspace.  # noqa: E501
        :rtype: str
        """
        return self._base_snapshot

    @base_snapshot.setter
    def base_snapshot(self, base_snapshot):
        """Sets the base_snapshot of this CreateExperimentalWorkspace.

        Metadata on base snapshot  # noqa: E501

        :param base_snapshot: The base_snapshot of this CreateExperimentalWorkspace.  # noqa: E501
        :type: str
        """

        self._base_snapshot = base_snapshot

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

        The cluster environment build id for the cluster used by the workspace  # noqa: E501

        :return: The cluster_environment_build_id of this CreateExperimentalWorkspace.  # noqa: E501
        :rtype: str
        """
        return self._cluster_environment_build_id

    @cluster_environment_build_id.setter
    def cluster_environment_build_id(self, cluster_environment_build_id):
        """Sets the cluster_environment_build_id of this CreateExperimentalWorkspace.

        The cluster environment build id for the cluster used by the workspace  # noqa: E501

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

        self._cluster_environment_build_id = cluster_environment_build_id

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

        Idle timeout (in minutes), after which the Cluster is terminated. Idle time is defined as the time during which a Cluster is not running a user command (through 'anyscale exec' or the Web UI), and does not have an attached driver. Time spent running Jupyter commands, or commands run through ssh, is still considered 'idle'.  # noqa: E501

        :return: The idle_timeout_minutes of this CreateExperimentalWorkspace.  # noqa: E501
        :rtype: int
        """
        return self._idle_timeout_minutes

    @idle_timeout_minutes.setter
    def idle_timeout_minutes(self, idle_timeout_minutes):
        """Sets the idle_timeout_minutes of this CreateExperimentalWorkspace.

        Idle timeout (in minutes), after which the Cluster is terminated. Idle time is defined as the time during which a Cluster is not running a user command (through 'anyscale exec' or the Web UI), and does not have an attached driver. Time spent running Jupyter commands, or commands run through ssh, is still considered 'idle'.  # noqa: E501

        :param idle_timeout_minutes: The idle_timeout_minutes of this CreateExperimentalWorkspace.  # noqa: E501
        :type: int
        """

        self._idle_timeout_minutes = idle_timeout_minutes

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

        Id of the associated job.  # noqa: E501

        :return: The cloned_job_id of this CreateExperimentalWorkspace.  # noqa: E501
        :rtype: str
        """
        return self._cloned_job_id

    @cloned_job_id.setter
    def cloned_job_id(self, cloned_job_id):
        """Sets the cloned_job_id of this CreateExperimentalWorkspace.

        Id of the associated job.  # noqa: E501

        :param cloned_job_id: The cloned_job_id of this CreateExperimentalWorkspace.  # noqa: E501
        :type: str
        """

        self._cloned_job_id = cloned_job_id

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

        Id of the cloned workspace.  # noqa: E501

        :return: The cloned_workspace_id of this CreateExperimentalWorkspace.  # noqa: E501
        :rtype: str
        """
        return self._cloned_workspace_id

    @cloned_workspace_id.setter
    def cloned_workspace_id(self, cloned_workspace_id):
        """Sets the cloned_workspace_id of this CreateExperimentalWorkspace.

        Id of the cloned workspace.  # noqa: E501

        :param cloned_workspace_id: The cloned_workspace_id of this CreateExperimentalWorkspace.  # noqa: E501
        :type: str
        """

        self._cloned_workspace_id = cloned_workspace_id

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

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