# 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 WorkspaceTemplateVersion(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 = {
        'template_id': 'str',
        'image_uri': 'str',
        'compute_configs': 'dict(str, str)',
        'artifacts': 'WorkspaceSystemArtifacts',
        'idle_termination_minutes': 'int',
        'id': 'str',
        'version': 'int',
        'creator_id': 'str',
        'creator_email': 'str',
        'created_at': 'datetime'
    }

    attribute_map = {
        'template_id': 'template_id',
        'image_uri': 'image_uri',
        'compute_configs': 'compute_configs',
        'artifacts': 'artifacts',
        'idle_termination_minutes': 'idle_termination_minutes',
        'id': 'id',
        'version': 'version',
        'creator_id': 'creator_id',
        'creator_email': 'creator_email',
        'created_at': 'created_at'
    }

    def __init__(self, template_id=None, image_uri=None, compute_configs=None, artifacts=None, idle_termination_minutes=None, id=None, version=None, creator_id=None, creator_email=None, created_at=None, local_vars_configuration=None):  # noqa: E501
        """WorkspaceTemplateVersion - 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._template_id = None
        self._image_uri = None
        self._compute_configs = None
        self._artifacts = None
        self._idle_termination_minutes = None
        self._id = None
        self._version = None
        self._creator_id = None
        self._creator_email = None
        self._created_at = None
        self.discriminator = None

        self.template_id = template_id
        if image_uri is not None:
            self.image_uri = image_uri
        if compute_configs is not None:
            self.compute_configs = compute_configs
        if artifacts is not None:
            self.artifacts = artifacts
        if idle_termination_minutes is not None:
            self.idle_termination_minutes = idle_termination_minutes
        self.id = id
        self.version = version
        self.creator_id = creator_id
        self.creator_email = creator_email
        self.created_at = created_at

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

        Parent workspace template ID  # noqa: E501

        :return: The template_id of this WorkspaceTemplateVersion.  # noqa: E501
        :rtype: str
        """
        return self._template_id

    @template_id.setter
    def template_id(self, template_id):
        """Sets the template_id of this WorkspaceTemplateVersion.

        Parent workspace template ID  # noqa: E501

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

        self._template_id = template_id

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

        Docker image URI for this version  # noqa: E501

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

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

        Docker image URI for this version  # noqa: E501

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

        self._image_uri = image_uri

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

        Cloud-specific compute config mapping  # noqa: E501

        :return: The compute_configs of this WorkspaceTemplateVersion.  # noqa: E501
        :rtype: dict(str, str)
        """
        return self._compute_configs

    @compute_configs.setter
    def compute_configs(self, compute_configs):
        """Sets the compute_configs of this WorkspaceTemplateVersion.

        Cloud-specific compute config mapping  # noqa: E501

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

        self._compute_configs = compute_configs

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

        Artifacts configuration for this version  # noqa: E501

        :return: The artifacts of this WorkspaceTemplateVersion.  # noqa: E501
        :rtype: WorkspaceSystemArtifacts
        """
        return self._artifacts

    @artifacts.setter
    def artifacts(self, artifacts):
        """Sets the artifacts of this WorkspaceTemplateVersion.

        Artifacts configuration for this version  # noqa: E501

        :param artifacts: The artifacts of this WorkspaceTemplateVersion.  # noqa: E501
        :type: WorkspaceSystemArtifacts
        """

        self._artifacts = artifacts

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

        Idle termination minutes for this version  # noqa: E501

        :return: The idle_termination_minutes of this WorkspaceTemplateVersion.  # noqa: E501
        :rtype: int
        """
        return self._idle_termination_minutes

    @idle_termination_minutes.setter
    def idle_termination_minutes(self, idle_termination_minutes):
        """Sets the idle_termination_minutes of this WorkspaceTemplateVersion.

        Idle termination minutes for this version  # noqa: E501

        :param idle_termination_minutes: The idle_termination_minutes of this WorkspaceTemplateVersion.  # noqa: E501
        :type: int
        """

        self._idle_termination_minutes = idle_termination_minutes

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

        Unique version ID  # noqa: E501

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

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

        Unique version ID  # noqa: E501

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

        Version number  # noqa: E501

        :return: The version of this WorkspaceTemplateVersion.  # noqa: E501
        :rtype: int
        """
        return self._version

    @version.setter
    def version(self, version):
        """Sets the version of this WorkspaceTemplateVersion.

        Version number  # noqa: E501

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

        self._version = version

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

        User ID who created this version  # noqa: E501

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

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

        User ID who created this version  # noqa: E501

        :param creator_id: The creator_id of this WorkspaceTemplateVersion.  # 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_email(self):
        """Gets the creator_email of this WorkspaceTemplateVersion.  # noqa: E501

        Email of the creator  # noqa: E501

        :return: The creator_email of this WorkspaceTemplateVersion.  # noqa: E501
        :rtype: str
        """
        return self._creator_email

    @creator_email.setter
    def creator_email(self, creator_email):
        """Sets the creator_email of this WorkspaceTemplateVersion.

        Email of the creator  # noqa: E501

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

        self._creator_email = creator_email

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

        When this version was created  # noqa: E501

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

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

        When this version was created  # noqa: E501

        :param created_at: The created_at of this WorkspaceTemplateVersion.  # 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

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

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