# Code generated by Lark OpenAPI.

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


class Minute(object):
    _types = {
        "token": str,
        "owner_id": str,
        "create_time": str,
        "title": str,
        "cover": str,
        "duration": str,
        "url": str,
    }

    def __init__(self, d=None):
        self.token: Optional[str] = None
        self.owner_id: Optional[str] = None
        self.create_time: Optional[str] = None
        self.title: Optional[str] = None
        self.cover: Optional[str] = None
        self.duration: Optional[str] = None
        self.url: Optional[str] = None
        init(self, d, self._types)

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


class MinuteBuilder(object):
    def __init__(self) -> None:
        self._minute = Minute()

    def token(self, token: str) -> "MinuteBuilder":
        self._minute.token = token
        return self

    def owner_id(self, owner_id: str) -> "MinuteBuilder":
        self._minute.owner_id = owner_id
        return self

    def create_time(self, create_time: str) -> "MinuteBuilder":
        self._minute.create_time = create_time
        return self

    def title(self, title: str) -> "MinuteBuilder":
        self._minute.title = title
        return self

    def cover(self, cover: str) -> "MinuteBuilder":
        self._minute.cover = cover
        return self

    def duration(self, duration: str) -> "MinuteBuilder":
        self._minute.duration = duration
        return self

    def url(self, url: str) -> "MinuteBuilder":
        self._minute.url = url
        return self

    def build(self) -> "Minute":
        return self._minute
