# 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 CreateWorkspaceTemplate(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',
        'mins_to_complete': 'int',
        'icon_type': 'WorkspaceTemplateIconType',
        'icon_bg_color': 'WorkspaceTemplateIconBackgroundColor',
        'complexity': 'WorkspaceTemplateComplexity',
        'category': 'WorkspaceTemplateCategory',
        'labels': 'list[str]',
        'published_version_id': 'str',
        'cloud_id': 'str',
        'is_global': 'bool'
    }

    attribute_map = {
        'name': 'name',
        'description': 'description',
        'mins_to_complete': 'mins_to_complete',
        'icon_type': 'icon_type',
        'icon_bg_color': 'icon_bg_color',
        'complexity': 'complexity',
        'category': 'category',
        'labels': 'labels',
        'published_version_id': 'published_version_id',
        'cloud_id': 'cloud_id',
        'is_global': 'is_global'
    }

    def __init__(self, name=None, description=None, mins_to_complete=None, icon_type=None, icon_bg_color=None, complexity=None, category=None, labels=None, published_version_id=None, cloud_id=None, is_global=False, local_vars_configuration=None):  # noqa: E501
        """CreateWorkspaceTemplate - 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._mins_to_complete = None
        self._icon_type = None
        self._icon_bg_color = None
        self._complexity = None
        self._category = None
        self._labels = None
        self._published_version_id = None
        self._cloud_id = None
        self._is_global = None
        self.discriminator = None

        self.name = name
        if description is not None:
            self.description = description
        if mins_to_complete is not None:
            self.mins_to_complete = mins_to_complete
        if icon_type is not None:
            self.icon_type = icon_type
        if icon_bg_color is not None:
            self.icon_bg_color = icon_bg_color
        if complexity is not None:
            self.complexity = complexity
        if category is not None:
            self.category = category
        if labels is not None:
            self.labels = labels
        if published_version_id is not None:
            self.published_version_id = published_version_id
        self.cloud_id = cloud_id
        if is_global is not None:
            self.is_global = is_global

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

        Name of the template  # noqa: E501

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

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

        Name of the template  # noqa: E501

        :param name: The name of this CreateWorkspaceTemplate.  # 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 CreateWorkspaceTemplate.  # noqa: E501

        Description of the template  # noqa: E501

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

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

        Description of the template  # noqa: E501

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

        self._description = description

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

        Estimated minutes to complete this template  # noqa: E501

        :return: The mins_to_complete of this CreateWorkspaceTemplate.  # noqa: E501
        :rtype: int
        """
        return self._mins_to_complete

    @mins_to_complete.setter
    def mins_to_complete(self, mins_to_complete):
        """Sets the mins_to_complete of this CreateWorkspaceTemplate.

        Estimated minutes to complete this template  # noqa: E501

        :param mins_to_complete: The mins_to_complete of this CreateWorkspaceTemplate.  # noqa: E501
        :type: int
        """

        self._mins_to_complete = mins_to_complete

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

        Icon type for the template  # noqa: E501

        :return: The icon_type of this CreateWorkspaceTemplate.  # noqa: E501
        :rtype: WorkspaceTemplateIconType
        """
        return self._icon_type

    @icon_type.setter
    def icon_type(self, icon_type):
        """Sets the icon_type of this CreateWorkspaceTemplate.

        Icon type for the template  # noqa: E501

        :param icon_type: The icon_type of this CreateWorkspaceTemplate.  # noqa: E501
        :type: WorkspaceTemplateIconType
        """

        self._icon_type = icon_type

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

        Background color for the icon  # noqa: E501

        :return: The icon_bg_color of this CreateWorkspaceTemplate.  # noqa: E501
        :rtype: WorkspaceTemplateIconBackgroundColor
        """
        return self._icon_bg_color

    @icon_bg_color.setter
    def icon_bg_color(self, icon_bg_color):
        """Sets the icon_bg_color of this CreateWorkspaceTemplate.

        Background color for the icon  # noqa: E501

        :param icon_bg_color: The icon_bg_color of this CreateWorkspaceTemplate.  # noqa: E501
        :type: WorkspaceTemplateIconBackgroundColor
        """

        self._icon_bg_color = icon_bg_color

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

        Complexity level of the template  # noqa: E501

        :return: The complexity of this CreateWorkspaceTemplate.  # noqa: E501
        :rtype: WorkspaceTemplateComplexity
        """
        return self._complexity

    @complexity.setter
    def complexity(self, complexity):
        """Sets the complexity of this CreateWorkspaceTemplate.

        Complexity level of the template  # noqa: E501

        :param complexity: The complexity of this CreateWorkspaceTemplate.  # noqa: E501
        :type: WorkspaceTemplateComplexity
        """

        self._complexity = complexity

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

        Category of the template  # noqa: E501

        :return: The category of this CreateWorkspaceTemplate.  # noqa: E501
        :rtype: WorkspaceTemplateCategory
        """
        return self._category

    @category.setter
    def category(self, category):
        """Sets the category of this CreateWorkspaceTemplate.

        Category of the template  # noqa: E501

        :param category: The category of this CreateWorkspaceTemplate.  # noqa: E501
        :type: WorkspaceTemplateCategory
        """

        self._category = category

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

        Searchable labels for the template  # noqa: E501

        :return: The labels of this CreateWorkspaceTemplate.  # noqa: E501
        :rtype: list[str]
        """
        return self._labels

    @labels.setter
    def labels(self, labels):
        """Sets the labels of this CreateWorkspaceTemplate.

        Searchable labels for the template  # noqa: E501

        :param labels: The labels of this CreateWorkspaceTemplate.  # noqa: E501
        :type: list[str]
        """

        self._labels = labels

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

        ID of the published version  # noqa: E501

        :return: The published_version_id of this CreateWorkspaceTemplate.  # noqa: E501
        :rtype: str
        """
        return self._published_version_id

    @published_version_id.setter
    def published_version_id(self, published_version_id):
        """Sets the published_version_id of this CreateWorkspaceTemplate.

        ID of the published version  # noqa: E501

        :param published_version_id: The published_version_id of this CreateWorkspaceTemplate.  # noqa: E501
        :type: str
        """

        self._published_version_id = published_version_id

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

        Cloud ID this template is associated with  # noqa: E501

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

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

        Cloud ID this template is associated with  # noqa: E501

        :param cloud_id: The cloud_id of this CreateWorkspaceTemplate.  # 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 is_global(self):
        """Gets the is_global of this CreateWorkspaceTemplate.  # noqa: E501

        Whether this is a global template  # noqa: E501

        :return: The is_global of this CreateWorkspaceTemplate.  # noqa: E501
        :rtype: bool
        """
        return self._is_global

    @is_global.setter
    def is_global(self, is_global):
        """Sets the is_global of this CreateWorkspaceTemplate.

        Whether this is a global template  # noqa: E501

        :param is_global: The is_global of this CreateWorkspaceTemplate.  # noqa: E501
        :type: bool
        """

        self._is_global = is_global

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

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