# 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 .label import Label
from .label import Label


class EnvironmentVariable(object):
    _types = {
        "api_name": str,
        "label": Label,
        "description": str,
        "value": str,
        "is_encrypted": bool,
        "object_api_name": str,
        "object_label": Label,
        "created_at": int,
        "updated_at": int,
        "type": str,
    }

    def __init__(self, d=None):
        self.api_name: Optional[str] = None
        self.label: Optional[Label] = None
        self.description: Optional[str] = None
        self.value: Optional[str] = None
        self.is_encrypted: Optional[bool] = None
        self.object_api_name: Optional[str] = None
        self.object_label: Optional[Label] = None
        self.created_at: Optional[int] = None
        self.updated_at: Optional[int] = None
        self.type: Optional[str] = None
        init(self, d, self._types)

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


class EnvironmentVariableBuilder(object):
    def __init__(self) -> None:
        self._environment_variable = EnvironmentVariable()

    def api_name(self, api_name: str) -> "EnvironmentVariableBuilder":
        self._environment_variable.api_name = api_name
        return self

    def label(self, label: Label) -> "EnvironmentVariableBuilder":
        self._environment_variable.label = label
        return self

    def description(self, description: str) -> "EnvironmentVariableBuilder":
        self._environment_variable.description = description
        return self

    def value(self, value: str) -> "EnvironmentVariableBuilder":
        self._environment_variable.value = value
        return self

    def is_encrypted(self, is_encrypted: bool) -> "EnvironmentVariableBuilder":
        self._environment_variable.is_encrypted = is_encrypted
        return self

    def object_api_name(self, object_api_name: str) -> "EnvironmentVariableBuilder":
        self._environment_variable.object_api_name = object_api_name
        return self

    def object_label(self, object_label: Label) -> "EnvironmentVariableBuilder":
        self._environment_variable.object_label = object_label
        return self

    def created_at(self, created_at: int) -> "EnvironmentVariableBuilder":
        self._environment_variable.created_at = created_at
        return self

    def updated_at(self, updated_at: int) -> "EnvironmentVariableBuilder":
        self._environment_variable.updated_at = updated_at
        return self

    def type(self, type: str) -> "EnvironmentVariableBuilder":
        self._environment_variable.type = type
        return self

    def build(self) -> "EnvironmentVariable":
        return self._environment_variable
