# coding: utf-8

"""
    Cloudera Manager API

    <h1>Cloudera Manager API v57</h1>       <p>Introduced in Cloudera Manager 7.13.1</p>       <p><a href=\"http://www.cloudera.com/documentation.html\">Cloudera Product Documentation</a></p>  # noqa: E501

    OpenAPI spec version: 7.13.1
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

class ApiClusterTemplate(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    """
    """
    Attributes:
      swagger_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.
    """
    swagger_types = {
        'cdh_version': 'str',
        'experience_version': 'str',
        'data_services_version': 'str',
        'products': 'list[ApiProductVersion]',
        'services': 'list[ApiClusterTemplateService]',
        'host_templates': 'list[ApiClusterTemplateHostTemplate]',
        'display_name': 'str',
        'cm_version': 'str',
        'instantiator': 'ApiClusterTemplateInstantiator',
        'repositories': 'list[str]',
        'cluster_spec': 'ApiClusterTemplateClusterSpec',
        'tags': 'list[ApiEntityTag]'
    }

    attribute_map = {
        'cdh_version': 'cdhVersion',
        'experience_version': 'experienceVersion',
        'data_services_version': 'dataServicesVersion',
        'products': 'products',
        'services': 'services',
        'host_templates': 'hostTemplates',
        'display_name': 'displayName',
        'cm_version': 'cmVersion',
        'instantiator': 'instantiator',
        'repositories': 'repositories',
        'cluster_spec': 'clusterSpec',
        'tags': 'tags'
    }

    def __init__(self, cdh_version=None, experience_version=None, data_services_version=None, products=None, services=None, host_templates=None, display_name=None, cm_version=None, instantiator=None, repositories=None, cluster_spec=None, tags=None):  # noqa: E501
        """ApiClusterTemplate - a model defined in Swagger"""  # noqa: E501
        self._cdh_version = None
        self._experience_version = None
        self._data_services_version = None
        self._products = None
        self._services = None
        self._host_templates = None
        self._display_name = None
        self._cm_version = None
        self._instantiator = None
        self._repositories = None
        self._cluster_spec = None
        self._tags = None
        self.discriminator = None
        if cdh_version is not None:
            self.cdh_version = cdh_version
        if experience_version is not None:
            self.experience_version = experience_version
        if data_services_version is not None:
            self.data_services_version = data_services_version
        if products is not None:
            self.products = products
        if services is not None:
            self.services = services
        if host_templates is not None:
            self.host_templates = host_templates
        if display_name is not None:
            self.display_name = display_name
        if cm_version is not None:
            self.cm_version = cm_version
        if instantiator is not None:
            self.instantiator = instantiator
        if repositories is not None:
            self.repositories = repositories
        if cluster_spec is not None:
            self.cluster_spec = cluster_spec
        if tags is not None:
            self.tags = tags

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

        CDH version  # noqa: E501

        :return: The cdh_version of this ApiClusterTemplate.  # noqa: E501
        :rtype: str
        """
        return self._cdh_version

    @cdh_version.setter
    def cdh_version(self, cdh_version):
        """Sets the cdh_version of this ApiClusterTemplate.

        CDH version  # noqa: E501

        :param cdh_version: The cdh_version of this ApiClusterTemplate.  # noqa: E501
        :type: str
        """

        self._cdh_version = cdh_version

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

        Deprecated. Use dataServicesVersion instead.  # noqa: E501

        :return: The experience_version of this ApiClusterTemplate.  # noqa: E501
        :rtype: str
        """
        return self._experience_version

    @experience_version.setter
    def experience_version(self, experience_version):
        """Sets the experience_version of this ApiClusterTemplate.

        Deprecated. Use dataServicesVersion instead.  # noqa: E501

        :param experience_version: The experience_version of this ApiClusterTemplate.  # noqa: E501
        :type: str
        """

        self._experience_version = experience_version

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

        Data Services version  # noqa: E501

        :return: The data_services_version of this ApiClusterTemplate.  # noqa: E501
        :rtype: str
        """
        return self._data_services_version

    @data_services_version.setter
    def data_services_version(self, data_services_version):
        """Sets the data_services_version of this ApiClusterTemplate.

        Data Services version  # noqa: E501

        :param data_services_version: The data_services_version of this ApiClusterTemplate.  # noqa: E501
        :type: str
        """

        self._data_services_version = data_services_version

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

        All the parcels that needs to be deployed and activated  # noqa: E501

        :return: The products of this ApiClusterTemplate.  # noqa: E501
        :rtype: list[ApiProductVersion]
        """
        return self._products

    @products.setter
    def products(self, products):
        """Sets the products of this ApiClusterTemplate.

        All the parcels that needs to be deployed and activated  # noqa: E501

        :param products: The products of this ApiClusterTemplate.  # noqa: E501
        :type: list[ApiProductVersion]
        """

        self._products = products

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

        All the services that needs to be deployed  # noqa: E501

        :return: The services of this ApiClusterTemplate.  # noqa: E501
        :rtype: list[ApiClusterTemplateService]
        """
        return self._services

    @services.setter
    def services(self, services):
        """Sets the services of this ApiClusterTemplate.

        All the services that needs to be deployed  # noqa: E501

        :param services: The services of this ApiClusterTemplate.  # noqa: E501
        :type: list[ApiClusterTemplateService]
        """

        self._services = services

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

        All host templates  # noqa: E501

        :return: The host_templates of this ApiClusterTemplate.  # noqa: E501
        :rtype: list[ApiClusterTemplateHostTemplate]
        """
        return self._host_templates

    @host_templates.setter
    def host_templates(self, host_templates):
        """Sets the host_templates of this ApiClusterTemplate.

        All host templates  # noqa: E501

        :param host_templates: The host_templates of this ApiClusterTemplate.  # noqa: E501
        :type: list[ApiClusterTemplateHostTemplate]
        """

        self._host_templates = host_templates

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

        Cluster display name  # noqa: E501

        :return: The display_name of this ApiClusterTemplate.  # noqa: E501
        :rtype: str
        """
        return self._display_name

    @display_name.setter
    def display_name(self, display_name):
        """Sets the display_name of this ApiClusterTemplate.

        Cluster display name  # noqa: E501

        :param display_name: The display_name of this ApiClusterTemplate.  # noqa: E501
        :type: str
        """

        self._display_name = display_name

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

        CM version for which the template  # noqa: E501

        :return: The cm_version of this ApiClusterTemplate.  # noqa: E501
        :rtype: str
        """
        return self._cm_version

    @cm_version.setter
    def cm_version(self, cm_version):
        """Sets the cm_version of this ApiClusterTemplate.

        CM version for which the template  # noqa: E501

        :param cm_version: The cm_version of this ApiClusterTemplate.  # noqa: E501
        :type: str
        """

        self._cm_version = cm_version

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


        :return: The instantiator of this ApiClusterTemplate.  # noqa: E501
        :rtype: ApiClusterTemplateInstantiator
        """
        return self._instantiator

    @instantiator.setter
    def instantiator(self, instantiator):
        """Sets the instantiator of this ApiClusterTemplate.


        :param instantiator: The instantiator of this ApiClusterTemplate.  # noqa: E501
        :type: ApiClusterTemplateInstantiator
        """

        self._instantiator = instantiator

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

        List of all repositories registered with CM  # noqa: E501

        :return: The repositories of this ApiClusterTemplate.  # noqa: E501
        :rtype: list[str]
        """
        return self._repositories

    @repositories.setter
    def repositories(self, repositories):
        """Sets the repositories of this ApiClusterTemplate.

        List of all repositories registered with CM  # noqa: E501

        :param repositories: The repositories of this ApiClusterTemplate.  # noqa: E501
        :type: list[str]
        """

        self._repositories = repositories

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


        :return: The cluster_spec of this ApiClusterTemplate.  # noqa: E501
        :rtype: ApiClusterTemplateClusterSpec
        """
        return self._cluster_spec

    @cluster_spec.setter
    def cluster_spec(self, cluster_spec):
        """Sets the cluster_spec of this ApiClusterTemplate.


        :param cluster_spec: The cluster_spec of this ApiClusterTemplate.  # noqa: E501
        :type: ApiClusterTemplateClusterSpec
        """

        self._cluster_spec = cluster_spec

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

        Tags associated with the cluster  # noqa: E501

        :return: The tags of this ApiClusterTemplate.  # noqa: E501
        :rtype: list[ApiEntityTag]
        """
        return self._tags

    @tags.setter
    def tags(self, tags):
        """Sets the tags of this ApiClusterTemplate.

        Tags associated with the cluster  # noqa: E501

        :param tags: The tags of this ApiClusterTemplate.  # noqa: E501
        :type: list[ApiEntityTag]
        """

        self._tags = tags

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.swagger_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
        if issubclass(ApiClusterTemplate, dict):
            for key, value in self.items():
                result[key] = 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, ApiClusterTemplate):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        return not self == other
