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

from darabonba.model import DaraModel

class ModifyApiGroupResponseBody(DaraModel):
    def __init__(
        self,
        base_path: str = None,
        description: str = None,
        group_id: str = None,
        group_name: str = None,
        request_id: str = None,
        sub_domain: str = None,
    ):
        # The root path of the API.
        self.base_path = base_path
        # The description of the API group.
        self.description = description
        # The ID of the API group. This ID is generated by the system and globally unique.
        self.group_id = group_id
        # The name of the group to which an API belongs.
        self.group_name = group_name
        # The ID of the request.
        self.request_id = request_id
        # The second-level domain name automatically assigned to the API group.
        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.base_path is not None:
            result['BasePath'] = self.base_path

        if self.description is not None:
            result['Description'] = self.description

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

        if self.group_name is not None:
            result['GroupName'] = self.group_name

        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('BasePath') is not None:
            self.base_path = m.get('BasePath')

        if m.get('Description') is not None:
            self.description = m.get('Description')

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

        if m.get('GroupName') is not None:
            self.group_name = m.get('GroupName')

        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

