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

from darabonba.model import DaraModel

class SetDomainResponseBody(DaraModel):
    def __init__(
        self,
        domain_binding_status: str = None,
        domain_legal_status: str = None,
        domain_name: str = None,
        domain_remark: str = None,
        domain_web_socket_status: str = None,
        group_id: str = None,
        request_id: str = None,
        sub_domain: str = None,
    ):
        # The binding status of the custom domain name. Valid values:
        # 
        # *   **BINDING**: The domain name has been bound.
        # *   **BOUND**: The domain name has not been bound.
        self.domain_binding_status = domain_binding_status
        # The validity status of the domain name. Valid values:
        # 
        # *   **NORMAL**: The domain name is valid.
        # *   **ABNORMAL**: The domain name is invalid. This status affects API calls and must be resolved as soon as possible.
        self.domain_legal_status = domain_legal_status
        # The custom domain name.
        self.domain_name = domain_name
        # The remarks on the domain name, such as the cause of an exception.
        self.domain_remark = domain_remark
        # The status of the domain name that uses the WebSocket feature.
        self.domain_web_socket_status = domain_web_socket_status
        # The ID of the API group. This ID is generated by the system and globally unique.
        self.group_id = group_id
        # The ID of the request.
        self.request_id = request_id
        # The second-level domain name assigned to the API group. This domain name is used to test API calls.
        self.sub_domain = sub_domain

    def validate(self):
        pass

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

        if self.domain_legal_status is not None:
            result['DomainLegalStatus'] = self.domain_legal_status

        if self.domain_name is not None:
            result['DomainName'] = self.domain_name

        if self.domain_remark is not None:
            result['DomainRemark'] = self.domain_remark

        if self.domain_web_socket_status is not None:
            result['DomainWebSocketStatus'] = self.domain_web_socket_status

        if self.group_id is not None:
            result['GroupId'] = self.group_id

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

        if self.sub_domain is not None:
            result['SubDomain'] = self.sub_domain

        return result

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

        if m.get('DomainLegalStatus') is not None:
            self.domain_legal_status = m.get('DomainLegalStatus')

        if m.get('DomainName') is not None:
            self.domain_name = m.get('DomainName')

        if m.get('DomainRemark') is not None:
            self.domain_remark = m.get('DomainRemark')

        if m.get('DomainWebSocketStatus') is not None:
            self.domain_web_socket_status = m.get('DomainWebSocketStatus')

        if m.get('GroupId') is not None:
            self.group_id = m.get('GroupId')

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

        if m.get('SubDomain') is not None:
            self.sub_domain = m.get('SubDomain')

        return self

