# Code generated by Lark OpenAPI.

from typing import Any, Optional, Union, Dict, List, Set, IO, Callable, Type
from lark_oapi.core.model import BaseRequest
from lark_oapi.core.enum import HttpMethod, AccessTokenType
from .create_aily_session_run_request_body import CreateAilySessionRunRequestBody


class CreateAilySessionRunRequest(BaseRequest):
    def __init__(self) -> None:
        super().__init__()
        self.aily_session_id: Optional[str] = None
        self.request_body: Optional[CreateAilySessionRunRequestBody] = None

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


class CreateAilySessionRunRequestBuilder(object):

    def __init__(self) -> None:
        create_aily_session_run_request = CreateAilySessionRunRequest()
        create_aily_session_run_request.http_method = HttpMethod.POST
        create_aily_session_run_request.uri = "/open-apis/aily/v1/sessions/:aily_session_id/runs"
        create_aily_session_run_request.token_types = {AccessTokenType.USER, AccessTokenType.TENANT}
        self._create_aily_session_run_request: CreateAilySessionRunRequest = create_aily_session_run_request

    def aily_session_id(self, aily_session_id: str) -> "CreateAilySessionRunRequestBuilder":
        self._create_aily_session_run_request.aily_session_id = aily_session_id
        self._create_aily_session_run_request.paths["aily_session_id"] = str(aily_session_id)
        return self

    def request_body(self, request_body: CreateAilySessionRunRequestBody) -> "CreateAilySessionRunRequestBuilder":
        self._create_aily_session_run_request.request_body = request_body
        self._create_aily_session_run_request.body = request_body
        return self

    def build(self) -> CreateAilySessionRunRequest:
        return self._create_aily_session_run_request
