# 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_talent_external_info_request_body import CreateTalentExternalInfoRequestBody


class CreateTalentExternalInfoRequest(BaseRequest):
    def __init__(self) -> None:
        super().__init__()
        self.talent_id: Optional[str] = None
        self.request_body: Optional[CreateTalentExternalInfoRequestBody] = None

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


class CreateTalentExternalInfoRequestBuilder(object):

    def __init__(self) -> None:
        create_talent_external_info_request = CreateTalentExternalInfoRequest()
        create_talent_external_info_request.http_method = HttpMethod.POST
        create_talent_external_info_request.uri = "/open-apis/hire/v1/talents/:talent_id/external_info"
        create_talent_external_info_request.token_types = {AccessTokenType.TENANT}
        self._create_talent_external_info_request: CreateTalentExternalInfoRequest = create_talent_external_info_request

    def talent_id(self, talent_id: str) -> "CreateTalentExternalInfoRequestBuilder":
        self._create_talent_external_info_request.talent_id = talent_id
        self._create_talent_external_info_request.paths["talent_id"] = str(talent_id)
        return self

    def request_body(self,
                     request_body: CreateTalentExternalInfoRequestBody) -> "CreateTalentExternalInfoRequestBuilder":
        self._create_talent_external_info_request.request_body = request_body
        self._create_talent_external_info_request.body = request_body
        return self

    def build(self) -> CreateTalentExternalInfoRequest:
        return self._create_talent_external_info_request
