# 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 ApiHostCertInfo(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 = {
        'hostname': 'str',
        'certificate': 'str',
        'key': 'str',
        'subject_alt_names': 'list[str]'
    }

    attribute_map = {
        'hostname': 'hostname',
        'certificate': 'certificate',
        'key': 'key',
        'subject_alt_names': 'subjectAltNames'
    }

    def __init__(self, hostname=None, certificate=None, key=None, subject_alt_names=None):  # noqa: E501
        """ApiHostCertInfo - a model defined in Swagger"""  # noqa: E501
        self._hostname = None
        self._certificate = None
        self._key = None
        self._subject_alt_names = None
        self.discriminator = None
        if hostname is not None:
            self.hostname = hostname
        if certificate is not None:
            self.certificate = certificate
        if key is not None:
            self.key = key
        if subject_alt_names is not None:
            self.subject_alt_names = subject_alt_names

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

        The FQDN of a host in the deployment.  # noqa: E501

        :return: The hostname of this ApiHostCertInfo.  # noqa: E501
        :rtype: str
        """
        return self._hostname

    @hostname.setter
    def hostname(self, hostname):
        """Sets the hostname of this ApiHostCertInfo.

        The FQDN of a host in the deployment.  # noqa: E501

        :param hostname: The hostname of this ApiHostCertInfo.  # noqa: E501
        :type: str
        """

        self._hostname = hostname

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

        The certificate for this host in PEM format.  # noqa: E501

        :return: The certificate of this ApiHostCertInfo.  # noqa: E501
        :rtype: str
        """
        return self._certificate

    @certificate.setter
    def certificate(self, certificate):
        """Sets the certificate of this ApiHostCertInfo.

        The certificate for this host in PEM format.  # noqa: E501

        :param certificate: The certificate of this ApiHostCertInfo.  # noqa: E501
        :type: str
        """

        self._certificate = certificate

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

        The private key for this host in PEM format.  # noqa: E501

        :return: The key of this ApiHostCertInfo.  # noqa: E501
        :rtype: str
        """
        return self._key

    @key.setter
    def key(self, key):
        """Sets the key of this ApiHostCertInfo.

        The private key for this host in PEM format.  # noqa: E501

        :param key: The key of this ApiHostCertInfo.  # noqa: E501
        :type: str
        """

        self._key = key

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

        A list of alt names for a host.  # noqa: E501

        :return: The subject_alt_names of this ApiHostCertInfo.  # noqa: E501
        :rtype: list[str]
        """
        return self._subject_alt_names

    @subject_alt_names.setter
    def subject_alt_names(self, subject_alt_names):
        """Sets the subject_alt_names of this ApiHostCertInfo.

        A list of alt names for a host.  # noqa: E501

        :param subject_alt_names: The subject_alt_names of this ApiHostCertInfo.  # noqa: E501
        :type: list[str]
        """

        self._subject_alt_names = subject_alt_names

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

        return self.__dict__ == other.__dict__

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