# Code generated by Lark OpenAPI.

from typing import Optional

from lark_oapi.core.construct import init


class ImageFieldSetting(object):
    _types = {
        "image_type": int,
        "display_style": int,
    }

    def __init__(self, d=None):
        self.image_type: Optional[int] = None
        self.display_style: Optional[int] = None
        init(self, d, self._types)

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


class ImageFieldSettingBuilder(object):
    def __init__(self) -> None:
        self._image_field_setting = ImageFieldSetting()

    def image_type(self, image_type: int) -> "ImageFieldSettingBuilder":
        self._image_field_setting.image_type = image_type
        return self

    def display_style(self, display_style: int) -> "ImageFieldSettingBuilder":
        self._image_field_setting.display_style = display_style
        return self

    def build(self) -> "ImageFieldSetting":
        return self._image_field_setting
