# Code generated by Lark OpenAPI.

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


class FeedGroupUpdater(object):
    _types = {
        "group_id": str,
        "name": str,
        "rules": FeedGroupRules,
        "update_fields": List[str],
    }

    def __init__(self, d=None):
        self.group_id: Optional[str] = None
        self.name: Optional[str] = None
        self.rules: Optional[FeedGroupRules] = None
        self.update_fields: Optional[List[str]] = None
        init(self, d, self._types)

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


class FeedGroupUpdaterBuilder(object):
    def __init__(self) -> None:
        self._feed_group_updater = FeedGroupUpdater()

    def group_id(self, group_id: str) -> "FeedGroupUpdaterBuilder":
        self._feed_group_updater.group_id = group_id
        return self

    def name(self, name: str) -> "FeedGroupUpdaterBuilder":
        self._feed_group_updater.name = name
        return self

    def rules(self, rules: FeedGroupRules) -> "FeedGroupUpdaterBuilder":
        self._feed_group_updater.rules = rules
        return self

    def update_fields(self, update_fields: List[str]) -> "FeedGroupUpdaterBuilder":
        self._feed_group_updater.update_fields = update_fields
        return self

    def build(self) -> "FeedGroupUpdater":
        return self._feed_group_updater
