# coding: utf-8

"""
    Octopus Server API

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

    OpenAPI spec version: 2019.6.7+Branch.tags-2019.6.7.Sha.aa18dc6809953218c66f57eff7d26481d9b23d6a
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six


class X509Certificate(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 = {
        'subject_distinguished_name': 'str',
        'issuer_distinguished_name': 'str',
        'thumbprint': 'str',
        'not_after': 'datetime',
        'not_before': 'datetime',
        'version': 'int',
        'serial_number': 'str',
        'signature_algorithm_name': 'str'
    }

    attribute_map = {
        'subject_distinguished_name': 'SubjectDistinguishedName',
        'issuer_distinguished_name': 'IssuerDistinguishedName',
        'thumbprint': 'Thumbprint',
        'not_after': 'NotAfter',
        'not_before': 'NotBefore',
        'version': 'Version',
        'serial_number': 'SerialNumber',
        'signature_algorithm_name': 'SignatureAlgorithmName'
    }

    def __init__(self, subject_distinguished_name=None, issuer_distinguished_name=None, thumbprint=None, not_after=None, not_before=None, version=None, serial_number=None, signature_algorithm_name=None):  # noqa: E501
        """X509Certificate - a model defined in Swagger"""  # noqa: E501

        self._subject_distinguished_name = None
        self._issuer_distinguished_name = None
        self._thumbprint = None
        self._not_after = None
        self._not_before = None
        self._version = None
        self._serial_number = None
        self._signature_algorithm_name = None
        self.discriminator = None

        if subject_distinguished_name is not None:
            self.subject_distinguished_name = subject_distinguished_name
        if issuer_distinguished_name is not None:
            self.issuer_distinguished_name = issuer_distinguished_name
        if thumbprint is not None:
            self.thumbprint = thumbprint
        if not_after is not None:
            self.not_after = not_after
        if not_before is not None:
            self.not_before = not_before
        if version is not None:
            self.version = version
        if serial_number is not None:
            self.serial_number = serial_number
        if signature_algorithm_name is not None:
            self.signature_algorithm_name = signature_algorithm_name

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


        :return: The subject_distinguished_name of this X509Certificate.  # noqa: E501
        :rtype: str
        """
        return self._subject_distinguished_name

    @subject_distinguished_name.setter
    def subject_distinguished_name(self, subject_distinguished_name):
        """Sets the subject_distinguished_name of this X509Certificate.


        :param subject_distinguished_name: The subject_distinguished_name of this X509Certificate.  # noqa: E501
        :type: str
        """

        self._subject_distinguished_name = subject_distinguished_name

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


        :return: The issuer_distinguished_name of this X509Certificate.  # noqa: E501
        :rtype: str
        """
        return self._issuer_distinguished_name

    @issuer_distinguished_name.setter
    def issuer_distinguished_name(self, issuer_distinguished_name):
        """Sets the issuer_distinguished_name of this X509Certificate.


        :param issuer_distinguished_name: The issuer_distinguished_name of this X509Certificate.  # noqa: E501
        :type: str
        """

        self._issuer_distinguished_name = issuer_distinguished_name

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


        :return: The thumbprint of this X509Certificate.  # noqa: E501
        :rtype: str
        """
        return self._thumbprint

    @thumbprint.setter
    def thumbprint(self, thumbprint):
        """Sets the thumbprint of this X509Certificate.


        :param thumbprint: The thumbprint of this X509Certificate.  # noqa: E501
        :type: str
        """

        self._thumbprint = thumbprint

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


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

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


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

        self._not_after = not_after

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


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

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


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

        self._not_before = not_before

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


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

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


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

        self._version = version

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


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

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


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

        self._serial_number = serial_number

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


        :return: The signature_algorithm_name of this X509Certificate.  # 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 X509Certificate.


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

        self._signature_algorithm_name = signature_algorithm_name

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

        return self.__dict__ == other.__dict__

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