# 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
from cm_client.models.base_api_ssh_cmd_arguments import BaseApiSshCmdArguments  # noqa: F401,E501

class ApiGenerateCmcaArguments(BaseApiSshCmdArguments):
    """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 = {
        'location': 'str',
        'custom_ca': 'bool',
        'interpret_as_filenames': 'bool',
        'cm_host_cert': 'str',
        'cm_host_key': 'str',
        'ca_cert': 'str',
        'keystore_passwd': 'str',
        'truststore_passwd': 'str',
        'trusted_ca_certs': 'str',
        'additional_arguments': 'list[str]',
        'host_certs': 'list[ApiHostCertInfo]',
        'configure_all_services': 'bool'
    }
    if hasattr(BaseApiSshCmdArguments, "swagger_types"):
        swagger_types.update(BaseApiSshCmdArguments.swagger_types)

    attribute_map = {
        'location': 'location',
        'custom_ca': 'customCA',
        'interpret_as_filenames': 'interpretAsFilenames',
        'cm_host_cert': 'cmHostCert',
        'cm_host_key': 'cmHostKey',
        'ca_cert': 'caCert',
        'keystore_passwd': 'keystorePasswd',
        'truststore_passwd': 'truststorePasswd',
        'trusted_ca_certs': 'trustedCaCerts',
        'additional_arguments': 'additionalArguments',
        'host_certs': 'hostCerts',
        'configure_all_services': 'configureAllServices'
    }
    if hasattr(BaseApiSshCmdArguments, "attribute_map"):
        attribute_map.update(BaseApiSshCmdArguments.attribute_map)

    def __init__(self, location=None, custom_ca=None, interpret_as_filenames=None, cm_host_cert=None, cm_host_key=None, ca_cert=None, keystore_passwd=None, truststore_passwd=None, trusted_ca_certs=None, additional_arguments=None, host_certs=None, configure_all_services=None, *args, **kwargs):  # noqa: E501
        """ApiGenerateCmcaArguments - a model defined in Swagger"""  # noqa: E501
        self._location = None
        self._custom_ca = None
        self._interpret_as_filenames = None
        self._cm_host_cert = None
        self._cm_host_key = None
        self._ca_cert = None
        self._keystore_passwd = None
        self._truststore_passwd = None
        self._trusted_ca_certs = None
        self._additional_arguments = None
        self._host_certs = None
        self._configure_all_services = None
        self.discriminator = None
        if location is not None:
            self.location = location
        if custom_ca is not None:
            self.custom_ca = custom_ca
        if interpret_as_filenames is not None:
            self.interpret_as_filenames = interpret_as_filenames
        if cm_host_cert is not None:
            self.cm_host_cert = cm_host_cert
        if cm_host_key is not None:
            self.cm_host_key = cm_host_key
        if ca_cert is not None:
            self.ca_cert = ca_cert
        if keystore_passwd is not None:
            self.keystore_passwd = keystore_passwd
        if truststore_passwd is not None:
            self.truststore_passwd = truststore_passwd
        if trusted_ca_certs is not None:
            self.trusted_ca_certs = trusted_ca_certs
        if additional_arguments is not None:
            self.additional_arguments = additional_arguments
        if host_certs is not None:
            self.host_certs = host_certs
        if configure_all_services is not None:
            self.configure_all_services = configure_all_services
        BaseApiSshCmdArguments.__init__(self, *args, **kwargs)

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

        The location on disk to store the CMCA directory. If there is already a CMCA created there, it will be backed up, and a new one will be created in its place.  # noqa: E501

        :return: The location of this ApiGenerateCmcaArguments.  # noqa: E501
        :rtype: str
        """
        return self._location

    @location.setter
    def location(self, location):
        """Sets the location of this ApiGenerateCmcaArguments.

        The location on disk to store the CMCA directory. If there is already a CMCA created there, it will be backed up, and a new one will be created in its place.  # noqa: E501

        :param location: The location of this ApiGenerateCmcaArguments.  # noqa: E501
        :type: str
        """

        self._location = location

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

        Whether to generate an internal CMCA (false) or use user-provided certificates (true).  When set to true (user-provided certificates), the following other arguments must be given: * cmHostCert * cmHostKey * caCert * keystorePasswd * truststorePasswd  # noqa: E501

        :return: The custom_ca of this ApiGenerateCmcaArguments.  # noqa: E501
        :rtype: bool
        """
        return self._custom_ca

    @custom_ca.setter
    def custom_ca(self, custom_ca):
        """Sets the custom_ca of this ApiGenerateCmcaArguments.

        Whether to generate an internal CMCA (false) or use user-provided certificates (true).  When set to true (user-provided certificates), the following other arguments must be given: * cmHostCert * cmHostKey * caCert * keystorePasswd * truststorePasswd  # noqa: E501

        :param custom_ca: The custom_ca of this ApiGenerateCmcaArguments.  # noqa: E501
        :type: bool
        """

        self._custom_ca = custom_ca

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

        Whether the following arguments are interpreted as filenames local to the Cloudera Manager host (true, default) or as the actual data for that argument: * cmHostCert * cmHostKey * caCert * keystorePasswd * truststorePasswd * trustedCaCerts * hostCerts.hostCert * hostCerts.hostKey  If HTTPS has not been enabled on the Cloudera Manager Admin Console and API, we *strongly* recommend that you pass the arguments as filenames local to the Cloudera Manager host (i.e. set to true) to avoid leaking sensitive information over the wire in plaintext.  # noqa: E501

        :return: The interpret_as_filenames of this ApiGenerateCmcaArguments.  # noqa: E501
        :rtype: bool
        """
        return self._interpret_as_filenames

    @interpret_as_filenames.setter
    def interpret_as_filenames(self, interpret_as_filenames):
        """Sets the interpret_as_filenames of this ApiGenerateCmcaArguments.

        Whether the following arguments are interpreted as filenames local to the Cloudera Manager host (true, default) or as the actual data for that argument: * cmHostCert * cmHostKey * caCert * keystorePasswd * truststorePasswd * trustedCaCerts * hostCerts.hostCert * hostCerts.hostKey  If HTTPS has not been enabled on the Cloudera Manager Admin Console and API, we *strongly* recommend that you pass the arguments as filenames local to the Cloudera Manager host (i.e. set to true) to avoid leaking sensitive information over the wire in plaintext.  # noqa: E501

        :param interpret_as_filenames: The interpret_as_filenames of this ApiGenerateCmcaArguments.  # noqa: E501
        :type: bool
        """

        self._interpret_as_filenames = interpret_as_filenames

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

        The certificate for the CM host in PEM format. Only used if customCA == true.  # noqa: E501

        :return: The cm_host_cert of this ApiGenerateCmcaArguments.  # noqa: E501
        :rtype: str
        """
        return self._cm_host_cert

    @cm_host_cert.setter
    def cm_host_cert(self, cm_host_cert):
        """Sets the cm_host_cert of this ApiGenerateCmcaArguments.

        The certificate for the CM host in PEM format. Only used if customCA == true.  # noqa: E501

        :param cm_host_cert: The cm_host_cert of this ApiGenerateCmcaArguments.  # noqa: E501
        :type: str
        """

        self._cm_host_cert = cm_host_cert

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

        The private key for the CM host in PEM format. Only used if customCA == true.  # noqa: E501

        :return: The cm_host_key of this ApiGenerateCmcaArguments.  # noqa: E501
        :rtype: str
        """
        return self._cm_host_key

    @cm_host_key.setter
    def cm_host_key(self, cm_host_key):
        """Sets the cm_host_key of this ApiGenerateCmcaArguments.

        The private key for the CM host in PEM format. Only used if customCA == true.  # noqa: E501

        :param cm_host_key: The cm_host_key of this ApiGenerateCmcaArguments.  # noqa: E501
        :type: str
        """

        self._cm_host_key = cm_host_key

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

        The certificate for the user-provided certificate authority in PEM format. Only used if customCA == true.  # noqa: E501

        :return: The ca_cert of this ApiGenerateCmcaArguments.  # noqa: E501
        :rtype: str
        """
        return self._ca_cert

    @ca_cert.setter
    def ca_cert(self, ca_cert):
        """Sets the ca_cert of this ApiGenerateCmcaArguments.

        The certificate for the user-provided certificate authority in PEM format. Only used if customCA == true.  # noqa: E501

        :param ca_cert: The ca_cert of this ApiGenerateCmcaArguments.  # noqa: E501
        :type: str
        """

        self._ca_cert = ca_cert

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

        The password used for all Auto-TLS keystores. Only used if customCA == true.  # noqa: E501

        :return: The keystore_passwd of this ApiGenerateCmcaArguments.  # noqa: E501
        :rtype: str
        """
        return self._keystore_passwd

    @keystore_passwd.setter
    def keystore_passwd(self, keystore_passwd):
        """Sets the keystore_passwd of this ApiGenerateCmcaArguments.

        The password used for all Auto-TLS keystores. Only used if customCA == true.  # noqa: E501

        :param keystore_passwd: The keystore_passwd of this ApiGenerateCmcaArguments.  # noqa: E501
        :type: str
        """

        self._keystore_passwd = keystore_passwd

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

        The password used for all Auto-TLS truststores. Only used if customCA == true.  # noqa: E501

        :return: The truststore_passwd of this ApiGenerateCmcaArguments.  # noqa: E501
        :rtype: str
        """
        return self._truststore_passwd

    @truststore_passwd.setter
    def truststore_passwd(self, truststore_passwd):
        """Sets the truststore_passwd of this ApiGenerateCmcaArguments.

        The password used for all Auto-TLS truststores. Only used if customCA == true.  # noqa: E501

        :param truststore_passwd: The truststore_passwd of this ApiGenerateCmcaArguments.  # noqa: E501
        :type: str
        """

        self._truststore_passwd = truststore_passwd

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

        A list of CA certificates that will be imported into the Auto-TLS truststore and distributed to all hosts.  # noqa: E501

        :return: The trusted_ca_certs of this ApiGenerateCmcaArguments.  # noqa: E501
        :rtype: str
        """
        return self._trusted_ca_certs

    @trusted_ca_certs.setter
    def trusted_ca_certs(self, trusted_ca_certs):
        """Sets the trusted_ca_certs of this ApiGenerateCmcaArguments.

        A list of CA certificates that will be imported into the Auto-TLS truststore and distributed to all hosts.  # noqa: E501

        :param trusted_ca_certs: The trusted_ca_certs of this ApiGenerateCmcaArguments.  # noqa: E501
        :type: str
        """

        self._trusted_ca_certs = trusted_ca_certs

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

        A list of additional arguments that can be passed to the certificate manager  # noqa: E501

        :return: The additional_arguments of this ApiGenerateCmcaArguments.  # noqa: E501
        :rtype: list[str]
        """
        return self._additional_arguments

    @additional_arguments.setter
    def additional_arguments(self, additional_arguments):
        """Sets the additional_arguments of this ApiGenerateCmcaArguments.

        A list of additional arguments that can be passed to the certificate manager  # noqa: E501

        :param additional_arguments: The additional_arguments of this ApiGenerateCmcaArguments.  # noqa: E501
        :type: list[str]
        """

        self._additional_arguments = additional_arguments

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

        A list of HostCertInfo objects, which associate a hostname with the corresponding certificate and private key. Only used if customCA == true.  # noqa: E501

        :return: The host_certs of this ApiGenerateCmcaArguments.  # noqa: E501
        :rtype: list[ApiHostCertInfo]
        """
        return self._host_certs

    @host_certs.setter
    def host_certs(self, host_certs):
        """Sets the host_certs of this ApiGenerateCmcaArguments.

        A list of HostCertInfo objects, which associate a hostname with the corresponding certificate and private key. Only used if customCA == true.  # noqa: E501

        :param host_certs: The host_certs of this ApiGenerateCmcaArguments.  # noqa: E501
        :type: list[ApiHostCertInfo]
        """

        self._host_certs = host_certs

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

        Whether to configure all existing services to use Auto-TLS. Defaults to false.  If false, only MGMT services will be configured to use Auto-TLS. Use the cluster-level ConfigureAutoTlsServices command to configure Auto-TLS services for a single cluster only.  All future services will be configured to use Auto-TLS regardless of this setting.  # noqa: E501

        :return: The configure_all_services of this ApiGenerateCmcaArguments.  # noqa: E501
        :rtype: bool
        """
        return self._configure_all_services

    @configure_all_services.setter
    def configure_all_services(self, configure_all_services):
        """Sets the configure_all_services of this ApiGenerateCmcaArguments.

        Whether to configure all existing services to use Auto-TLS. Defaults to false.  If false, only MGMT services will be configured to use Auto-TLS. Use the cluster-level ConfigureAutoTlsServices command to configure Auto-TLS services for a single cluster only.  All future services will be configured to use Auto-TLS regardless of this setting.  # noqa: E501

        :param configure_all_services: The configure_all_services of this ApiGenerateCmcaArguments.  # noqa: E501
        :type: bool
        """

        self._configure_all_services = configure_all_services

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

        return self.__dict__ == other.__dict__

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