# -*- coding: utf-8 -*-
# This file is auto-generated, don't edit it. Thanks.
from __future__ import annotations

from darabonba.model import DaraModel

class CreateWHClientCertificateResponseBody(DaraModel):
    def __init__(
        self,
        certificate_chain: str = None,
        identifier: str = None,
        parent_x509certificate: str = None,
        request_id: str = None,
        root_x509certificate: str = None,
        x_509certificate: str = None,
    ):
        self.certificate_chain = certificate_chain
        self.identifier = identifier
        self.parent_x509certificate = parent_x509certificate
        self.request_id = request_id
        self.root_x509certificate = root_x509certificate
        self.x_509certificate = x_509certificate

    def validate(self):
        pass

    def to_map(self):
        result = dict()
        _map = super().to_map()
        if _map is not None:
            result = _map
        if self.certificate_chain is not None:
            result['CertificateChain'] = self.certificate_chain

        if self.identifier is not None:
            result['Identifier'] = self.identifier

        if self.parent_x509certificate is not None:
            result['ParentX509Certificate'] = self.parent_x509certificate

        if self.request_id is not None:
            result['RequestId'] = self.request_id

        if self.root_x509certificate is not None:
            result['RootX509Certificate'] = self.root_x509certificate

        if self.x_509certificate is not None:
            result['X509Certificate'] = self.x_509certificate

        return result

    def from_map(self, m: dict = None):
        m = m or dict()
        if m.get('CertificateChain') is not None:
            self.certificate_chain = m.get('CertificateChain')

        if m.get('Identifier') is not None:
            self.identifier = m.get('Identifier')

        if m.get('ParentX509Certificate') is not None:
            self.parent_x509certificate = m.get('ParentX509Certificate')

        if m.get('RequestId') is not None:
            self.request_id = m.get('RequestId')

        if m.get('RootX509Certificate') is not None:
            self.root_x509certificate = m.get('RootX509Certificate')

        if m.get('X509Certificate') is not None:
            self.x_509certificate = m.get('X509Certificate')

        return self

