# 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 ExternalCommonAttachment(object):
    _types = {
        "id": str,
        "name": str,
        "size": int,
    }

    def __init__(self, d=None):
        self.id: Optional[str] = None
        self.name: Optional[str] = None
        self.size: Optional[int] = None
        init(self, d, self._types)

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


class ExternalCommonAttachmentBuilder(object):
    def __init__(self) -> None:
        self._external_common_attachment = ExternalCommonAttachment()

    def id(self, id: str) -> "ExternalCommonAttachmentBuilder":
        self._external_common_attachment.id = id
        return self

    def name(self, name: str) -> "ExternalCommonAttachmentBuilder":
        self._external_common_attachment.name = name
        return self

    def size(self, size: int) -> "ExternalCommonAttachmentBuilder":
        self._external_common_attachment.size = size
        return self

    def build(self) -> "ExternalCommonAttachment":
        return self._external_common_attachment
