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

from darabonba.model import DaraModel

class IsolateLeaderRequest(DaraModel):
    def __init__(
        self,
        instance_id: str = None,
        isolate_leader: bool = None,
    ):
        self.instance_id = instance_id
        self.isolate_leader = isolate_leader

    def validate(self):
        pass

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

        if self.isolate_leader is not None:
            result['IsolateLeader'] = self.isolate_leader

        return result

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

        if m.get('IsolateLeader') is not None:
            self.isolate_leader = m.get('IsolateLeader')

        return self

