# 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 CreateWorkspaceTemplateVersion(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 = {
        'image_uri': 'str',
        'compute_configs': 'dict(str, str)',
        'artifacts': 'WorkspaceSystemArtifacts',
        'source_workspace_id': 'str',
        'idle_termination_minutes': 'int'
    }

    attribute_map = {
        'image_uri': 'image_uri',
        'compute_configs': 'compute_configs',
        'artifacts': 'artifacts',
        'source_workspace_id': 'source_workspace_id',
        'idle_termination_minutes': 'idle_termination_minutes'
    }

    def __init__(self, image_uri=None, compute_configs=None, artifacts=None, source_workspace_id=None, idle_termination_minutes=None, local_vars_configuration=None):  # noqa: E501
        """CreateWorkspaceTemplateVersion - 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._image_uri = None
        self._compute_configs = None
        self._artifacts = None
        self._source_workspace_id = None
        self._idle_termination_minutes = None
        self.discriminator = None

        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 source_workspace_id is not None:
            self.source_workspace_id = source_workspace_id
        if idle_termination_minutes is not None:
            self.idle_termination_minutes = idle_termination_minutes

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

        Docker image URI for this version  # noqa: E501

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

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

        Docker image URI for this version  # noqa: E501

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

        self._image_uri = image_uri

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

        Cloud-specific compute config mapping  # noqa: E501

        :return: The compute_configs of this CreateWorkspaceTemplateVersion.  # 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 CreateWorkspaceTemplateVersion.

        Cloud-specific compute config mapping  # noqa: E501

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

        self._compute_configs = compute_configs

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

        Artifacts configuration for this version  # noqa: E501

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

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

        Artifacts configuration for this version  # noqa: E501

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

        self._artifacts = artifacts

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

        Source workspace ID to copy image_uri, compute_configs, and artifacts from. If both source_workspace_id and artifacts are provided, artifacts will take precedence.  # noqa: E501

        :return: The source_workspace_id of this CreateWorkspaceTemplateVersion.  # noqa: E501
        :rtype: str
        """
        return self._source_workspace_id

    @source_workspace_id.setter
    def source_workspace_id(self, source_workspace_id):
        """Sets the source_workspace_id of this CreateWorkspaceTemplateVersion.

        Source workspace ID to copy image_uri, compute_configs, and artifacts from. If both source_workspace_id and artifacts are provided, artifacts will take precedence.  # noqa: E501

        :param source_workspace_id: The source_workspace_id of this CreateWorkspaceTemplateVersion.  # noqa: E501
        :type: str
        """

        self._source_workspace_id = source_workspace_id

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

        Idle termination minutes for this version  # noqa: E501

        :return: The idle_termination_minutes of this CreateWorkspaceTemplateVersion.  # 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 CreateWorkspaceTemplateVersion.

        Idle termination minutes for this version  # noqa: E501

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

        self._idle_termination_minutes = idle_termination_minutes

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

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