# 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 ApiDeployment(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 = {
        'timestamp': 'str',
        'clusters': 'list[ApiCluster]',
        'hosts': 'list[ApiHost]',
        'users': 'list[ApiUser]',
        'version_info': 'ApiVersionInfo',
        'management_service': 'ApiService',
        'manager_settings': 'ApiConfigList',
        'all_hosts_config': 'ApiConfigList',
        'peers': 'list[ApiCmPeer]',
        'host_templates': 'ApiHostTemplateList'
    }

    attribute_map = {
        'timestamp': 'timestamp',
        'clusters': 'clusters',
        'hosts': 'hosts',
        'users': 'users',
        'version_info': 'versionInfo',
        'management_service': 'managementService',
        'manager_settings': 'managerSettings',
        'all_hosts_config': 'allHostsConfig',
        'peers': 'peers',
        'host_templates': 'hostTemplates'
    }

    def __init__(self, timestamp=None, clusters=None, hosts=None, users=None, version_info=None, management_service=None, manager_settings=None, all_hosts_config=None, peers=None, host_templates=None):  # noqa: E501
        """ApiDeployment - a model defined in Swagger"""  # noqa: E501
        self._timestamp = None
        self._clusters = None
        self._hosts = None
        self._users = None
        self._version_info = None
        self._management_service = None
        self._manager_settings = None
        self._all_hosts_config = None
        self._peers = None
        self._host_templates = None
        self.discriminator = None
        if timestamp is not None:
            self.timestamp = timestamp
        if clusters is not None:
            self.clusters = clusters
        if hosts is not None:
            self.hosts = hosts
        if users is not None:
            self.users = users
        if version_info is not None:
            self.version_info = version_info
        if management_service is not None:
            self.management_service = management_service
        if manager_settings is not None:
            self.manager_settings = manager_settings
        if all_hosts_config is not None:
            self.all_hosts_config = all_hosts_config
        if peers is not None:
            self.peers = peers
        if host_templates is not None:
            self.host_templates = host_templates

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

        Readonly. This timestamp is provided when you request a deployment and is not required (or even read) when creating a deployment. This timestamp is useful if you have multiple deployments saved and want to determine which one to use as a restore point.  # noqa: E501

        :return: The timestamp of this ApiDeployment.  # noqa: E501
        :rtype: str
        """
        return self._timestamp

    @timestamp.setter
    def timestamp(self, timestamp):
        """Sets the timestamp of this ApiDeployment.

        Readonly. This timestamp is provided when you request a deployment and is not required (or even read) when creating a deployment. This timestamp is useful if you have multiple deployments saved and want to determine which one to use as a restore point.  # noqa: E501

        :param timestamp: The timestamp of this ApiDeployment.  # noqa: E501
        :type: str
        """

        self._timestamp = timestamp

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

        List of clusters in the system including their services, roles and complete config values.  # noqa: E501

        :return: The clusters of this ApiDeployment.  # noqa: E501
        :rtype: list[ApiCluster]
        """
        return self._clusters

    @clusters.setter
    def clusters(self, clusters):
        """Sets the clusters of this ApiDeployment.

        List of clusters in the system including their services, roles and complete config values.  # noqa: E501

        :param clusters: The clusters of this ApiDeployment.  # noqa: E501
        :type: list[ApiCluster]
        """

        self._clusters = clusters

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

        List of hosts in the system  # noqa: E501

        :return: The hosts of this ApiDeployment.  # noqa: E501
        :rtype: list[ApiHost]
        """
        return self._hosts

    @hosts.setter
    def hosts(self, hosts):
        """Sets the hosts of this ApiDeployment.

        List of hosts in the system  # noqa: E501

        :param hosts: The hosts of this ApiDeployment.  # noqa: E501
        :type: list[ApiHost]
        """

        self._hosts = hosts

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

        List of all users in the system  # noqa: E501

        :return: The users of this ApiDeployment.  # noqa: E501
        :rtype: list[ApiUser]
        """
        return self._users

    @users.setter
    def users(self, users):
        """Sets the users of this ApiDeployment.

        List of all users in the system  # noqa: E501

        :param users: The users of this ApiDeployment.  # noqa: E501
        :type: list[ApiUser]
        """

        self._users = users

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


        :return: The version_info of this ApiDeployment.  # noqa: E501
        :rtype: ApiVersionInfo
        """
        return self._version_info

    @version_info.setter
    def version_info(self, version_info):
        """Sets the version_info of this ApiDeployment.


        :param version_info: The version_info of this ApiDeployment.  # noqa: E501
        :type: ApiVersionInfo
        """

        self._version_info = version_info

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


        :return: The management_service of this ApiDeployment.  # noqa: E501
        :rtype: ApiService
        """
        return self._management_service

    @management_service.setter
    def management_service(self, management_service):
        """Sets the management_service of this ApiDeployment.


        :param management_service: The management_service of this ApiDeployment.  # noqa: E501
        :type: ApiService
        """

        self._management_service = management_service

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


        :return: The manager_settings of this ApiDeployment.  # noqa: E501
        :rtype: ApiConfigList
        """
        return self._manager_settings

    @manager_settings.setter
    def manager_settings(self, manager_settings):
        """Sets the manager_settings of this ApiDeployment.


        :param manager_settings: The manager_settings of this ApiDeployment.  # noqa: E501
        :type: ApiConfigList
        """

        self._manager_settings = manager_settings

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


        :return: The all_hosts_config of this ApiDeployment.  # noqa: E501
        :rtype: ApiConfigList
        """
        return self._all_hosts_config

    @all_hosts_config.setter
    def all_hosts_config(self, all_hosts_config):
        """Sets the all_hosts_config of this ApiDeployment.


        :param all_hosts_config: The all_hosts_config of this ApiDeployment.  # noqa: E501
        :type: ApiConfigList
        """

        self._all_hosts_config = all_hosts_config

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

        The list of peers configured in Cloudera Manager. Available since API v3.  # noqa: E501

        :return: The peers of this ApiDeployment.  # noqa: E501
        :rtype: list[ApiCmPeer]
        """
        return self._peers

    @peers.setter
    def peers(self, peers):
        """Sets the peers of this ApiDeployment.

        The list of peers configured in Cloudera Manager. Available since API v3.  # noqa: E501

        :param peers: The peers of this ApiDeployment.  # noqa: E501
        :type: list[ApiCmPeer]
        """

        self._peers = peers

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


        :return: The host_templates of this ApiDeployment.  # noqa: E501
        :rtype: ApiHostTemplateList
        """
        return self._host_templates

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


        :param host_templates: The host_templates of this ApiDeployment.  # noqa: E501
        :type: ApiHostTemplateList
        """

        self._host_templates = host_templates

    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(ApiDeployment, 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, ApiDeployment):
            return False

        return self.__dict__ == other.__dict__

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