gravitino.dto.function.function_param_dto.FunctionParamDTO¶
- class gravitino.dto.function.function_param_dto.FunctionParamDTO(_name: str, _data_type: Type, _comment: str | None = None, _default_value: FunctionArg | None = None)¶
Bases:
FunctionParam,DataClassJsonMixinDTO for function parameter.
- __init__(_name: str, _data_type: Type, _comment: str | None = None, _default_value: FunctionArg | None = None) None¶
Methods
__init__(_name, _data_type[, _comment, ...])comment()Returns the optional parameter comment.
Returns the parameter data type.
Returns the default value of the parameter if provided, otherwise None.
from_dict(kvs, *[, infer_missing])from_function_param(param)Create a FunctionParamDTO from a FunctionParam instance.
from_json(s, *[, parse_float, parse_int, ...])name()Returns the parameter name.
schema(*[, infer_missing, only, exclude, ...])to_dict([encode_json])Convert this DTO to a FunctionParam instance.
to_json(*[, skipkeys, ensure_ascii, ...])Attributes
dataclass_json_config- comment() str | None¶
Returns the optional parameter comment.
- default_value() Expression | None¶
Returns the default value of the parameter if provided, otherwise None.
- classmethod from_function_param(param: FunctionParam) FunctionParamDTO¶
Create a FunctionParamDTO from a FunctionParam instance.
- name() str¶
Returns the parameter name.
- to_function_param() FunctionParam¶
Convert this DTO to a FunctionParam instance.