# coding: utf-8

"""
    pca20251001

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

    OpenAPI spec version: common-version
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from volcenginesdkcore.configuration import Configuration


class GetLeafInstanceResponse(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 = {
        'certificate': 'CertificateForGetLeafInstanceOutput',
        'common_name': 'str',
        'contact': 'ContactForGetLeafInstanceOutput',
        'create_at': 'str',
        'duration': 'str',
        'encryption_algorithm': 'str',
        'extension': 'ExtensionForGetLeafInstanceOutput',
        'instance_id': 'str',
        'instance_status': 'int',
        'not_after': 'int',
        'not_before': 'int',
        'plan': 'str',
        'project_name': 'str',
        'root_ca_id': 'str',
        'serial_number': 'str',
        'signature_algorithm': 'str',
        'source_type': 'int',
        'sub_ca_id': 'str',
        'subject': 'SubjectForGetLeafInstanceOutput',
        'tag': 'str',
        'tags': 'list[TagForGetLeafInstanceOutput]'
    }

    attribute_map = {
        'certificate': 'Certificate',
        'common_name': 'CommonName',
        'contact': 'Contact',
        'create_at': 'CreateAt',
        'duration': 'Duration',
        'encryption_algorithm': 'EncryptionAlgorithm',
        'extension': 'Extension',
        'instance_id': 'InstanceId',
        'instance_status': 'InstanceStatus',
        'not_after': 'NotAfter',
        'not_before': 'NotBefore',
        'plan': 'Plan',
        'project_name': 'ProjectName',
        'root_ca_id': 'RootCaId',
        'serial_number': 'SerialNumber',
        'signature_algorithm': 'SignatureAlgorithm',
        'source_type': 'SourceType',
        'sub_ca_id': 'SubCaId',
        'subject': 'Subject',
        'tag': 'Tag',
        'tags': 'Tags'
    }

    def __init__(self, certificate=None, common_name=None, contact=None, create_at=None, duration=None, encryption_algorithm=None, extension=None, instance_id=None, instance_status=None, not_after=None, not_before=None, plan=None, project_name=None, root_ca_id=None, serial_number=None, signature_algorithm=None, source_type=None, sub_ca_id=None, subject=None, tag=None, tags=None, _configuration=None):  # noqa: E501
        """GetLeafInstanceResponse - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._certificate = None
        self._common_name = None
        self._contact = None
        self._create_at = None
        self._duration = None
        self._encryption_algorithm = None
        self._extension = None
        self._instance_id = None
        self._instance_status = None
        self._not_after = None
        self._not_before = None
        self._plan = None
        self._project_name = None
        self._root_ca_id = None
        self._serial_number = None
        self._signature_algorithm = None
        self._source_type = None
        self._sub_ca_id = None
        self._subject = None
        self._tag = None
        self._tags = None
        self.discriminator = None

        if certificate is not None:
            self.certificate = certificate
        if common_name is not None:
            self.common_name = common_name
        if contact is not None:
            self.contact = contact
        if create_at is not None:
            self.create_at = create_at
        if duration is not None:
            self.duration = duration
        if encryption_algorithm is not None:
            self.encryption_algorithm = encryption_algorithm
        if extension is not None:
            self.extension = extension
        if instance_id is not None:
            self.instance_id = instance_id
        if instance_status is not None:
            self.instance_status = instance_status
        if not_after is not None:
            self.not_after = not_after
        if not_before is not None:
            self.not_before = not_before
        if plan is not None:
            self.plan = plan
        if project_name is not None:
            self.project_name = project_name
        if root_ca_id is not None:
            self.root_ca_id = root_ca_id
        if serial_number is not None:
            self.serial_number = serial_number
        if signature_algorithm is not None:
            self.signature_algorithm = signature_algorithm
        if source_type is not None:
            self.source_type = source_type
        if sub_ca_id is not None:
            self.sub_ca_id = sub_ca_id
        if subject is not None:
            self.subject = subject
        if tag is not None:
            self.tag = tag
        if tags is not None:
            self.tags = tags

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


        :return: The certificate of this GetLeafInstanceResponse.  # noqa: E501
        :rtype: CertificateForGetLeafInstanceOutput
        """
        return self._certificate

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


        :param certificate: The certificate of this GetLeafInstanceResponse.  # noqa: E501
        :type: CertificateForGetLeafInstanceOutput
        """

        self._certificate = certificate

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


        :return: The common_name of this GetLeafInstanceResponse.  # noqa: E501
        :rtype: str
        """
        return self._common_name

    @common_name.setter
    def common_name(self, common_name):
        """Sets the common_name of this GetLeafInstanceResponse.


        :param common_name: The common_name of this GetLeafInstanceResponse.  # noqa: E501
        :type: str
        """

        self._common_name = common_name

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


        :return: The contact of this GetLeafInstanceResponse.  # noqa: E501
        :rtype: ContactForGetLeafInstanceOutput
        """
        return self._contact

    @contact.setter
    def contact(self, contact):
        """Sets the contact of this GetLeafInstanceResponse.


        :param contact: The contact of this GetLeafInstanceResponse.  # noqa: E501
        :type: ContactForGetLeafInstanceOutput
        """

        self._contact = contact

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


        :return: The create_at of this GetLeafInstanceResponse.  # noqa: E501
        :rtype: str
        """
        return self._create_at

    @create_at.setter
    def create_at(self, create_at):
        """Sets the create_at of this GetLeafInstanceResponse.


        :param create_at: The create_at of this GetLeafInstanceResponse.  # noqa: E501
        :type: str
        """

        self._create_at = create_at

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


        :return: The duration of this GetLeafInstanceResponse.  # noqa: E501
        :rtype: str
        """
        return self._duration

    @duration.setter
    def duration(self, duration):
        """Sets the duration of this GetLeafInstanceResponse.


        :param duration: The duration of this GetLeafInstanceResponse.  # noqa: E501
        :type: str
        """

        self._duration = duration

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


        :return: The encryption_algorithm of this GetLeafInstanceResponse.  # noqa: E501
        :rtype: str
        """
        return self._encryption_algorithm

    @encryption_algorithm.setter
    def encryption_algorithm(self, encryption_algorithm):
        """Sets the encryption_algorithm of this GetLeafInstanceResponse.


        :param encryption_algorithm: The encryption_algorithm of this GetLeafInstanceResponse.  # noqa: E501
        :type: str
        """

        self._encryption_algorithm = encryption_algorithm

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


        :return: The extension of this GetLeafInstanceResponse.  # noqa: E501
        :rtype: ExtensionForGetLeafInstanceOutput
        """
        return self._extension

    @extension.setter
    def extension(self, extension):
        """Sets the extension of this GetLeafInstanceResponse.


        :param extension: The extension of this GetLeafInstanceResponse.  # noqa: E501
        :type: ExtensionForGetLeafInstanceOutput
        """

        self._extension = extension

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


        :return: The instance_id of this GetLeafInstanceResponse.  # noqa: E501
        :rtype: str
        """
        return self._instance_id

    @instance_id.setter
    def instance_id(self, instance_id):
        """Sets the instance_id of this GetLeafInstanceResponse.


        :param instance_id: The instance_id of this GetLeafInstanceResponse.  # noqa: E501
        :type: str
        """

        self._instance_id = instance_id

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


        :return: The instance_status of this GetLeafInstanceResponse.  # noqa: E501
        :rtype: int
        """
        return self._instance_status

    @instance_status.setter
    def instance_status(self, instance_status):
        """Sets the instance_status of this GetLeafInstanceResponse.


        :param instance_status: The instance_status of this GetLeafInstanceResponse.  # noqa: E501
        :type: int
        """

        self._instance_status = instance_status

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


        :return: The not_after of this GetLeafInstanceResponse.  # noqa: E501
        :rtype: int
        """
        return self._not_after

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


        :param not_after: The not_after of this GetLeafInstanceResponse.  # noqa: E501
        :type: int
        """

        self._not_after = not_after

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


        :return: The not_before of this GetLeafInstanceResponse.  # noqa: E501
        :rtype: int
        """
        return self._not_before

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


        :param not_before: The not_before of this GetLeafInstanceResponse.  # noqa: E501
        :type: int
        """

        self._not_before = not_before

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


        :return: The plan of this GetLeafInstanceResponse.  # noqa: E501
        :rtype: str
        """
        return self._plan

    @plan.setter
    def plan(self, plan):
        """Sets the plan of this GetLeafInstanceResponse.


        :param plan: The plan of this GetLeafInstanceResponse.  # noqa: E501
        :type: str
        """

        self._plan = plan

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


        :return: The project_name of this GetLeafInstanceResponse.  # noqa: E501
        :rtype: str
        """
        return self._project_name

    @project_name.setter
    def project_name(self, project_name):
        """Sets the project_name of this GetLeafInstanceResponse.


        :param project_name: The project_name of this GetLeafInstanceResponse.  # noqa: E501
        :type: str
        """

        self._project_name = project_name

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


        :return: The root_ca_id of this GetLeafInstanceResponse.  # noqa: E501
        :rtype: str
        """
        return self._root_ca_id

    @root_ca_id.setter
    def root_ca_id(self, root_ca_id):
        """Sets the root_ca_id of this GetLeafInstanceResponse.


        :param root_ca_id: The root_ca_id of this GetLeafInstanceResponse.  # noqa: E501
        :type: str
        """

        self._root_ca_id = root_ca_id

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


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

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


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

        self._serial_number = serial_number

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


        :return: The signature_algorithm of this GetLeafInstanceResponse.  # noqa: E501
        :rtype: str
        """
        return self._signature_algorithm

    @signature_algorithm.setter
    def signature_algorithm(self, signature_algorithm):
        """Sets the signature_algorithm of this GetLeafInstanceResponse.


        :param signature_algorithm: The signature_algorithm of this GetLeafInstanceResponse.  # noqa: E501
        :type: str
        """

        self._signature_algorithm = signature_algorithm

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


        :return: The source_type of this GetLeafInstanceResponse.  # noqa: E501
        :rtype: int
        """
        return self._source_type

    @source_type.setter
    def source_type(self, source_type):
        """Sets the source_type of this GetLeafInstanceResponse.


        :param source_type: The source_type of this GetLeafInstanceResponse.  # noqa: E501
        :type: int
        """

        self._source_type = source_type

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


        :return: The sub_ca_id of this GetLeafInstanceResponse.  # noqa: E501
        :rtype: str
        """
        return self._sub_ca_id

    @sub_ca_id.setter
    def sub_ca_id(self, sub_ca_id):
        """Sets the sub_ca_id of this GetLeafInstanceResponse.


        :param sub_ca_id: The sub_ca_id of this GetLeafInstanceResponse.  # noqa: E501
        :type: str
        """

        self._sub_ca_id = sub_ca_id

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


        :return: The subject of this GetLeafInstanceResponse.  # noqa: E501
        :rtype: SubjectForGetLeafInstanceOutput
        """
        return self._subject

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


        :param subject: The subject of this GetLeafInstanceResponse.  # noqa: E501
        :type: SubjectForGetLeafInstanceOutput
        """

        self._subject = subject

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


        :return: The tag of this GetLeafInstanceResponse.  # noqa: E501
        :rtype: str
        """
        return self._tag

    @tag.setter
    def tag(self, tag):
        """Sets the tag of this GetLeafInstanceResponse.


        :param tag: The tag of this GetLeafInstanceResponse.  # noqa: E501
        :type: str
        """

        self._tag = tag

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


        :return: The tags of this GetLeafInstanceResponse.  # noqa: E501
        :rtype: list[TagForGetLeafInstanceOutput]
        """
        return self._tags

    @tags.setter
    def tags(self, tags):
        """Sets the tags of this GetLeafInstanceResponse.


        :param tags: The tags of this GetLeafInstanceResponse.  # noqa: E501
        :type: list[TagForGetLeafInstanceOutput]
        """

        self._tags = tags

    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(GetLeafInstanceResponse, 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, GetLeafInstanceResponse):
            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, GetLeafInstanceResponse):
            return True

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