# Code generated by Lark OpenAPI.

from typing import Any, Optional, Union, Dict, List, Set, IO, Callable, Type
from lark_oapi.core.construct import init
from .object_context import ObjectContext
from .my_ai_instance_detail_extra import MyAiInstanceDetailExtra


class InstanceDetailScenarioContext(object):
    _types = {
        "object": ObjectContext,
        "extra": MyAiInstanceDetailExtra,
    }

    def __init__(self, d=None):
        self.object: Optional[ObjectContext] = None
        self.extra: Optional[MyAiInstanceDetailExtra] = None
        init(self, d, self._types)

    @staticmethod
    def builder() -> "InstanceDetailScenarioContextBuilder":
        return InstanceDetailScenarioContextBuilder()


class InstanceDetailScenarioContextBuilder(object):
    def __init__(self) -> None:
        self._instance_detail_scenario_context = InstanceDetailScenarioContext()

    def object(self, object: ObjectContext) -> "InstanceDetailScenarioContextBuilder":
        self._instance_detail_scenario_context.object = object
        return self

    def extra(self, extra: MyAiInstanceDetailExtra) -> "InstanceDetailScenarioContextBuilder":
        self._instance_detail_scenario_context.extra = extra
        return self

    def build(self) -> "InstanceDetailScenarioContext":
        return self._instance_detail_scenario_context
