# coding: utf-8

"""
    Cloudera Manager API

    <h1>Cloudera Manager API v50</h1>       <p>Introduced in Cloudera Manager 7.8.1</p>       <p><a href=\"http://www.cloudera.com/documentation.html\">Cloudera Product Documentation</a></p>

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


from pprint import pformat
from six import iteritems
import re


class ApiClusterTemplateInstantiator(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 = {
        'cluster_name': 'str',
        'hosts': 'list[ApiClusterTemplateHostInfo]',
        'variables': 'list[ApiClusterTemplateVariable]',
        'role_config_groups': 'list[ApiClusterTemplateRoleConfigGroupInfo]',
        'cluster_spec': 'ApiClusterTemplateClusterSpec',
        'keep_host_templates': 'bool',
        'lenient': 'bool',
        'enable_kerberos': 'ApiConfigureForKerberosArguments'
    }

    attribute_map = {
        'cluster_name': 'clusterName',
        'hosts': 'hosts',
        'variables': 'variables',
        'role_config_groups': 'roleConfigGroups',
        'cluster_spec': 'clusterSpec',
        'keep_host_templates': 'keepHostTemplates',
        'lenient': 'lenient',
        'enable_kerberos': 'enableKerberos'
    }

    def __init__(self, cluster_name=None, hosts=None, variables=None, role_config_groups=None, cluster_spec=None, keep_host_templates=None, lenient=None, enable_kerberos=None):
        """
        ApiClusterTemplateInstantiator - a model defined in Swagger
        """

        self._cluster_name = None
        self._hosts = None
        self._variables = None
        self._role_config_groups = None
        self._cluster_spec = None
        self._keep_host_templates = None
        self._lenient = None
        self._enable_kerberos = None

        if cluster_name is not None:
          self.cluster_name = cluster_name
        if hosts is not None:
          self.hosts = hosts
        if variables is not None:
          self.variables = variables
        if role_config_groups is not None:
          self.role_config_groups = role_config_groups
        if cluster_spec is not None:
          self.cluster_spec = cluster_spec
        if keep_host_templates is not None:
          self.keep_host_templates = keep_host_templates
        if lenient is not None:
          self.lenient = lenient
        if enable_kerberos is not None:
          self.enable_kerberos = enable_kerberos

    @property
    def cluster_name(self):
        """
        Gets the cluster_name of this ApiClusterTemplateInstantiator.
        Cluster name

        :return: The cluster_name of this ApiClusterTemplateInstantiator.
        :rtype: str
        """
        return self._cluster_name

    @cluster_name.setter
    def cluster_name(self, cluster_name):
        """
        Sets the cluster_name of this ApiClusterTemplateInstantiator.
        Cluster name

        :param cluster_name: The cluster_name of this ApiClusterTemplateInstantiator.
        :type: str
        """

        self._cluster_name = cluster_name

    @property
    def hosts(self):
        """
        Gets the hosts of this ApiClusterTemplateInstantiator.
        All the hosts that are part of that cluster

        :return: The hosts of this ApiClusterTemplateInstantiator.
        :rtype: list[ApiClusterTemplateHostInfo]
        """
        return self._hosts

    @hosts.setter
    def hosts(self, hosts):
        """
        Sets the hosts of this ApiClusterTemplateInstantiator.
        All the hosts that are part of that cluster

        :param hosts: The hosts of this ApiClusterTemplateInstantiator.
        :type: list[ApiClusterTemplateHostInfo]
        """

        self._hosts = hosts

    @property
    def variables(self):
        """
        Gets the variables of this ApiClusterTemplateInstantiator.
        All the variables the are referred by the cluster template

        :return: The variables of this ApiClusterTemplateInstantiator.
        :rtype: list[ApiClusterTemplateVariable]
        """
        return self._variables

    @variables.setter
    def variables(self, variables):
        """
        Sets the variables of this ApiClusterTemplateInstantiator.
        All the variables the are referred by the cluster template

        :param variables: The variables of this ApiClusterTemplateInstantiator.
        :type: list[ApiClusterTemplateVariable]
        """

        self._variables = variables

    @property
    def role_config_groups(self):
        """
        Gets the role_config_groups of this ApiClusterTemplateInstantiator.
        All the role config group informations for non-base RCGs.

        :return: The role_config_groups of this ApiClusterTemplateInstantiator.
        :rtype: list[ApiClusterTemplateRoleConfigGroupInfo]
        """
        return self._role_config_groups

    @role_config_groups.setter
    def role_config_groups(self, role_config_groups):
        """
        Sets the role_config_groups of this ApiClusterTemplateInstantiator.
        All the role config group informations for non-base RCGs.

        :param role_config_groups: The role_config_groups of this ApiClusterTemplateInstantiator.
        :type: list[ApiClusterTemplateRoleConfigGroupInfo]
        """

        self._role_config_groups = role_config_groups

    @property
    def cluster_spec(self):
        """
        Gets the cluster_spec of this ApiClusterTemplateInstantiator.
        Cluster specification.

        :return: The cluster_spec of this ApiClusterTemplateInstantiator.
        :rtype: ApiClusterTemplateClusterSpec
        """
        return self._cluster_spec

    @cluster_spec.setter
    def cluster_spec(self, cluster_spec):
        """
        Sets the cluster_spec of this ApiClusterTemplateInstantiator.
        Cluster specification.

        :param cluster_spec: The cluster_spec of this ApiClusterTemplateInstantiator.
        :type: ApiClusterTemplateClusterSpec
        """

        self._cluster_spec = cluster_spec

    @property
    def keep_host_templates(self):
        """
        Gets the keep_host_templates of this ApiClusterTemplateInstantiator.
        Keep the hosts templates from cluster template.

        :return: The keep_host_templates of this ApiClusterTemplateInstantiator.
        :rtype: bool
        """
        return self._keep_host_templates

    @keep_host_templates.setter
    def keep_host_templates(self, keep_host_templates):
        """
        Sets the keep_host_templates of this ApiClusterTemplateInstantiator.
        Keep the hosts templates from cluster template.

        :param keep_host_templates: The keep_host_templates of this ApiClusterTemplateInstantiator.
        :type: bool
        """

        self._keep_host_templates = keep_host_templates

    @property
    def lenient(self):
        """
        Gets the lenient of this ApiClusterTemplateInstantiator.
        Allow setting service parameters that may not currently be supported by the current CM version but will be in the future.

        :return: The lenient of this ApiClusterTemplateInstantiator.
        :rtype: bool
        """
        return self._lenient

    @lenient.setter
    def lenient(self, lenient):
        """
        Sets the lenient of this ApiClusterTemplateInstantiator.
        Allow setting service parameters that may not currently be supported by the current CM version but will be in the future.

        :param lenient: The lenient of this ApiClusterTemplateInstantiator.
        :type: bool
        """

        self._lenient = lenient

    @property
    def enable_kerberos(self):
        """
        Gets the enable_kerberos of this ApiClusterTemplateInstantiator.
        Enable kerberos authentication

        :return: The enable_kerberos of this ApiClusterTemplateInstantiator.
        :rtype: ApiConfigureForKerberosArguments
        """
        return self._enable_kerberos

    @enable_kerberos.setter
    def enable_kerberos(self, enable_kerberos):
        """
        Sets the enable_kerberos of this ApiClusterTemplateInstantiator.
        Enable kerberos authentication

        :param enable_kerberos: The enable_kerberos of this ApiClusterTemplateInstantiator.
        :type: ApiConfigureForKerberosArguments
        """

        self._enable_kerberos = enable_kerberos

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

        for attr, _ in 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

        return result

    def to_str(self):
        """
        Returns the string representation of the model
        """
        return 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, ApiClusterTemplateInstantiator):
            return False

        return self.__dict__ == other.__dict__

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