# coding: utf-8

"""
    Akeyless API

    The purpose of this application is to provide access to Akeyless API.  # noqa: E501

    The version of the OpenAPI document: 2.0
    Contact: support@akeyless.io
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from akeyless.configuration import Configuration


class CertificateInfo(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_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.
    """
    openapi_types = {
        'ext_key_usage': 'list[int]',
        'key_usage': 'int',
        'dns_names': 'list[str]',
        'email_addresses': 'list[str]',
        'extensions': 'list[Extension]',
        'ip_addresses': 'list[str]',
        'is_ca': 'bool',
        'issuer': 'Name',
        'issuing_certificate_url': 'list[str]',
        'key_size': 'int',
        'not_after': 'datetime',
        'not_before': 'datetime',
        'ocsp_server': 'list[str]',
        'public_key_algorithm_name': 'str',
        'serial_number': 'str',
        'sha_1_fingerprint': 'str',
        'sha_256_fingerprint': 'str',
        'signature': 'str',
        'signature_algorithm_name': 'str',
        'subject': 'Name',
        'subject_public_key': 'str',
        'uris': 'list[str]',
        'version': 'int'
    }

    attribute_map = {
        'ext_key_usage': 'ExtKeyUsage',
        'key_usage': 'KeyUsage',
        'dns_names': 'dns_names',
        'email_addresses': 'email_addresses',
        'extensions': 'extensions',
        'ip_addresses': 'ip_addresses',
        'is_ca': 'is_ca',
        'issuer': 'issuer',
        'issuing_certificate_url': 'issuing_certificate_url',
        'key_size': 'key_size',
        'not_after': 'not_after',
        'not_before': 'not_before',
        'ocsp_server': 'ocsp_server',
        'public_key_algorithm_name': 'public_key_algorithm_name',
        'serial_number': 'serial_number',
        'sha_1_fingerprint': 'sha_1_fingerprint',
        'sha_256_fingerprint': 'sha_256_fingerprint',
        'signature': 'signature',
        'signature_algorithm_name': 'signature_algorithm_name',
        'subject': 'subject',
        'subject_public_key': 'subject_public_key',
        'uris': 'uris',
        'version': 'version'
    }

    def __init__(self, ext_key_usage=None, key_usage=None, dns_names=None, email_addresses=None, extensions=None, ip_addresses=None, is_ca=None, issuer=None, issuing_certificate_url=None, key_size=None, not_after=None, not_before=None, ocsp_server=None, public_key_algorithm_name=None, serial_number=None, sha_1_fingerprint=None, sha_256_fingerprint=None, signature=None, signature_algorithm_name=None, subject=None, subject_public_key=None, uris=None, version=None, local_vars_configuration=None):  # noqa: E501
        """CertificateInfo - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._ext_key_usage = None
        self._key_usage = None
        self._dns_names = None
        self._email_addresses = None
        self._extensions = None
        self._ip_addresses = None
        self._is_ca = None
        self._issuer = None
        self._issuing_certificate_url = None
        self._key_size = None
        self._not_after = None
        self._not_before = None
        self._ocsp_server = None
        self._public_key_algorithm_name = None
        self._serial_number = None
        self._sha_1_fingerprint = None
        self._sha_256_fingerprint = None
        self._signature = None
        self._signature_algorithm_name = None
        self._subject = None
        self._subject_public_key = None
        self._uris = None
        self._version = None
        self.discriminator = None

        if ext_key_usage is not None:
            self.ext_key_usage = ext_key_usage
        if key_usage is not None:
            self.key_usage = key_usage
        if dns_names is not None:
            self.dns_names = dns_names
        if email_addresses is not None:
            self.email_addresses = email_addresses
        if extensions is not None:
            self.extensions = extensions
        if ip_addresses is not None:
            self.ip_addresses = ip_addresses
        if is_ca is not None:
            self.is_ca = is_ca
        if issuer is not None:
            self.issuer = issuer
        if issuing_certificate_url is not None:
            self.issuing_certificate_url = issuing_certificate_url
        if key_size is not None:
            self.key_size = key_size
        if not_after is not None:
            self.not_after = not_after
        if not_before is not None:
            self.not_before = not_before
        if ocsp_server is not None:
            self.ocsp_server = ocsp_server
        if public_key_algorithm_name is not None:
            self.public_key_algorithm_name = public_key_algorithm_name
        if serial_number is not None:
            self.serial_number = serial_number
        if sha_1_fingerprint is not None:
            self.sha_1_fingerprint = sha_1_fingerprint
        if sha_256_fingerprint is not None:
            self.sha_256_fingerprint = sha_256_fingerprint
        if signature is not None:
            self.signature = signature
        if signature_algorithm_name is not None:
            self.signature_algorithm_name = signature_algorithm_name
        if subject is not None:
            self.subject = subject
        if subject_public_key is not None:
            self.subject_public_key = subject_public_key
        if uris is not None:
            self.uris = uris
        if version is not None:
            self.version = version

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


        :return: The ext_key_usage of this CertificateInfo.  # noqa: E501
        :rtype: list[int]
        """
        return self._ext_key_usage

    @ext_key_usage.setter
    def ext_key_usage(self, ext_key_usage):
        """Sets the ext_key_usage of this CertificateInfo.


        :param ext_key_usage: The ext_key_usage of this CertificateInfo.  # noqa: E501
        :type: list[int]
        """

        self._ext_key_usage = ext_key_usage

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

        KeyUsage represents the set of actions that are valid for a given key. It's a bitmap of the KeyUsage* constants.  # noqa: E501

        :return: The key_usage of this CertificateInfo.  # noqa: E501
        :rtype: int
        """
        return self._key_usage

    @key_usage.setter
    def key_usage(self, key_usage):
        """Sets the key_usage of this CertificateInfo.

        KeyUsage represents the set of actions that are valid for a given key. It's a bitmap of the KeyUsage* constants.  # noqa: E501

        :param key_usage: The key_usage of this CertificateInfo.  # noqa: E501
        :type: int
        """

        self._key_usage = key_usage

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


        :return: The dns_names of this CertificateInfo.  # noqa: E501
        :rtype: list[str]
        """
        return self._dns_names

    @dns_names.setter
    def dns_names(self, dns_names):
        """Sets the dns_names of this CertificateInfo.


        :param dns_names: The dns_names of this CertificateInfo.  # noqa: E501
        :type: list[str]
        """

        self._dns_names = dns_names

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


        :return: The email_addresses of this CertificateInfo.  # noqa: E501
        :rtype: list[str]
        """
        return self._email_addresses

    @email_addresses.setter
    def email_addresses(self, email_addresses):
        """Sets the email_addresses of this CertificateInfo.


        :param email_addresses: The email_addresses of this CertificateInfo.  # noqa: E501
        :type: list[str]
        """

        self._email_addresses = email_addresses

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


        :return: The extensions of this CertificateInfo.  # noqa: E501
        :rtype: list[Extension]
        """
        return self._extensions

    @extensions.setter
    def extensions(self, extensions):
        """Sets the extensions of this CertificateInfo.


        :param extensions: The extensions of this CertificateInfo.  # noqa: E501
        :type: list[Extension]
        """

        self._extensions = extensions

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


        :return: The ip_addresses of this CertificateInfo.  # noqa: E501
        :rtype: list[str]
        """
        return self._ip_addresses

    @ip_addresses.setter
    def ip_addresses(self, ip_addresses):
        """Sets the ip_addresses of this CertificateInfo.


        :param ip_addresses: The ip_addresses of this CertificateInfo.  # noqa: E501
        :type: list[str]
        """

        self._ip_addresses = ip_addresses

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


        :return: The is_ca of this CertificateInfo.  # noqa: E501
        :rtype: bool
        """
        return self._is_ca

    @is_ca.setter
    def is_ca(self, is_ca):
        """Sets the is_ca of this CertificateInfo.


        :param is_ca: The is_ca of this CertificateInfo.  # noqa: E501
        :type: bool
        """

        self._is_ca = is_ca

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


        :return: The issuer of this CertificateInfo.  # noqa: E501
        :rtype: Name
        """
        return self._issuer

    @issuer.setter
    def issuer(self, issuer):
        """Sets the issuer of this CertificateInfo.


        :param issuer: The issuer of this CertificateInfo.  # noqa: E501
        :type: Name
        """

        self._issuer = issuer

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


        :return: The issuing_certificate_url of this CertificateInfo.  # noqa: E501
        :rtype: list[str]
        """
        return self._issuing_certificate_url

    @issuing_certificate_url.setter
    def issuing_certificate_url(self, issuing_certificate_url):
        """Sets the issuing_certificate_url of this CertificateInfo.


        :param issuing_certificate_url: The issuing_certificate_url of this CertificateInfo.  # noqa: E501
        :type: list[str]
        """

        self._issuing_certificate_url = issuing_certificate_url

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


        :return: The key_size of this CertificateInfo.  # noqa: E501
        :rtype: int
        """
        return self._key_size

    @key_size.setter
    def key_size(self, key_size):
        """Sets the key_size of this CertificateInfo.


        :param key_size: The key_size of this CertificateInfo.  # noqa: E501
        :type: int
        """

        self._key_size = key_size

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


        :return: The not_after of this CertificateInfo.  # noqa: E501
        :rtype: datetime
        """
        return self._not_after

    @not_after.setter
    def not_after(self, not_after):
        """Sets the not_after of this CertificateInfo.


        :param not_after: The not_after of this CertificateInfo.  # noqa: E501
        :type: datetime
        """

        self._not_after = not_after

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


        :return: The not_before of this CertificateInfo.  # noqa: E501
        :rtype: datetime
        """
        return self._not_before

    @not_before.setter
    def not_before(self, not_before):
        """Sets the not_before of this CertificateInfo.


        :param not_before: The not_before of this CertificateInfo.  # noqa: E501
        :type: datetime
        """

        self._not_before = not_before

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


        :return: The ocsp_server of this CertificateInfo.  # noqa: E501
        :rtype: list[str]
        """
        return self._ocsp_server

    @ocsp_server.setter
    def ocsp_server(self, ocsp_server):
        """Sets the ocsp_server of this CertificateInfo.


        :param ocsp_server: The ocsp_server of this CertificateInfo.  # noqa: E501
        :type: list[str]
        """

        self._ocsp_server = ocsp_server

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


        :return: The public_key_algorithm_name of this CertificateInfo.  # noqa: E501
        :rtype: str
        """
        return self._public_key_algorithm_name

    @public_key_algorithm_name.setter
    def public_key_algorithm_name(self, public_key_algorithm_name):
        """Sets the public_key_algorithm_name of this CertificateInfo.


        :param public_key_algorithm_name: The public_key_algorithm_name of this CertificateInfo.  # noqa: E501
        :type: str
        """

        self._public_key_algorithm_name = public_key_algorithm_name

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


        :return: The serial_number of this CertificateInfo.  # noqa: E501
        :rtype: str
        """
        return self._serial_number

    @serial_number.setter
    def serial_number(self, serial_number):
        """Sets the serial_number of this CertificateInfo.


        :param serial_number: The serial_number of this CertificateInfo.  # noqa: E501
        :type: str
        """

        self._serial_number = serial_number

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


        :return: The sha_1_fingerprint of this CertificateInfo.  # noqa: E501
        :rtype: str
        """
        return self._sha_1_fingerprint

    @sha_1_fingerprint.setter
    def sha_1_fingerprint(self, sha_1_fingerprint):
        """Sets the sha_1_fingerprint of this CertificateInfo.


        :param sha_1_fingerprint: The sha_1_fingerprint of this CertificateInfo.  # noqa: E501
        :type: str
        """

        self._sha_1_fingerprint = sha_1_fingerprint

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


        :return: The sha_256_fingerprint of this CertificateInfo.  # noqa: E501
        :rtype: str
        """
        return self._sha_256_fingerprint

    @sha_256_fingerprint.setter
    def sha_256_fingerprint(self, sha_256_fingerprint):
        """Sets the sha_256_fingerprint of this CertificateInfo.


        :param sha_256_fingerprint: The sha_256_fingerprint of this CertificateInfo.  # noqa: E501
        :type: str
        """

        self._sha_256_fingerprint = sha_256_fingerprint

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


        :return: The signature of this CertificateInfo.  # noqa: E501
        :rtype: str
        """
        return self._signature

    @signature.setter
    def signature(self, signature):
        """Sets the signature of this CertificateInfo.


        :param signature: The signature of this CertificateInfo.  # noqa: E501
        :type: str
        """

        self._signature = signature

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


        :return: The signature_algorithm_name of this CertificateInfo.  # noqa: E501
        :rtype: str
        """
        return self._signature_algorithm_name

    @signature_algorithm_name.setter
    def signature_algorithm_name(self, signature_algorithm_name):
        """Sets the signature_algorithm_name of this CertificateInfo.


        :param signature_algorithm_name: The signature_algorithm_name of this CertificateInfo.  # noqa: E501
        :type: str
        """

        self._signature_algorithm_name = signature_algorithm_name

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


        :return: The subject of this CertificateInfo.  # noqa: E501
        :rtype: Name
        """
        return self._subject

    @subject.setter
    def subject(self, subject):
        """Sets the subject of this CertificateInfo.


        :param subject: The subject of this CertificateInfo.  # noqa: E501
        :type: Name
        """

        self._subject = subject

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


        :return: The subject_public_key of this CertificateInfo.  # noqa: E501
        :rtype: str
        """
        return self._subject_public_key

    @subject_public_key.setter
    def subject_public_key(self, subject_public_key):
        """Sets the subject_public_key of this CertificateInfo.


        :param subject_public_key: The subject_public_key of this CertificateInfo.  # noqa: E501
        :type: str
        """

        self._subject_public_key = subject_public_key

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


        :return: The uris of this CertificateInfo.  # noqa: E501
        :rtype: list[str]
        """
        return self._uris

    @uris.setter
    def uris(self, uris):
        """Sets the uris of this CertificateInfo.


        :param uris: The uris of this CertificateInfo.  # noqa: E501
        :type: list[str]
        """

        self._uris = uris

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


        :return: The version of this CertificateInfo.  # noqa: E501
        :rtype: int
        """
        return self._version

    @version.setter
    def version(self, version):
        """Sets the version of this CertificateInfo.


        :param version: The version of this CertificateInfo.  # noqa: E501
        :type: int
        """

        self._version = version

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

        for attr, _ in six.iteritems(self.openapi_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 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, CertificateInfo):
            return False

        return self.to_dict() == other.to_dict()

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

        return self.to_dict() != other.to_dict()
