Class NamespaceTool.Tool.Function
-
- All Implemented Interfaces:
public final class NamespaceTool.Tool.Function
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classNamespaceTool.Tool.Function.BuilderA builder for Function.
-
Method Summary
Modifier and Type Method Description final Stringname()final JsonValue_type()Expected to always return the following:
However, this method can be useful for debugging and logging (e.g.JsonValue.from("function")final Optional<Boolean>deferLoading()Whether this function should be deferred and discovered via tool search. final Optional<String>description()final JsonValue_parameters()This arbitrary value can be deserialized into a custom type using the convertmethod:MyClass myObject = function.parameters().convert(MyClass.class);final Optional<Boolean>strict()final JsonField<String>_name()Returns the raw JSON value of name. final JsonField<Boolean>_deferLoading()Returns the raw JSON value of deferLoading. final JsonField<String>_description()Returns the raw JSON value of description. final JsonField<Boolean>_strict()Returns the raw JSON value of strict. final Map<String, JsonValue>_additionalProperties()final NamespaceTool.Tool.Function.BuildertoBuilder()final NamespaceTool.Tool.Functionvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static NamespaceTool.Tool.Function.Builderbuilder()Returns a mutable builder for constructing an instance of Function. -
-
Method Detail
-
_type
final JsonValue _type()
Expected to always return the following:
JsonValue.from("function")However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
deferLoading
final Optional<Boolean> deferLoading()
Whether this function should be deferred and discovered via tool search.
-
description
final Optional<String> description()
-
_parameters
final JsonValue _parameters()
This arbitrary value can be deserialized into a custom type using the
convertmethod:MyClass myObject = function.parameters().convert(MyClass.class);
-
_name
final JsonField<String> _name()
Returns the raw JSON value of name.
Unlike name, this method doesn't throw if the JSON field has an unexpected type.
-
_deferLoading
final JsonField<Boolean> _deferLoading()
Returns the raw JSON value of deferLoading.
Unlike deferLoading, this method doesn't throw if the JSON field has an unexpected type.
-
_description
final JsonField<String> _description()
Returns the raw JSON value of description.
Unlike description, this method doesn't throw if the JSON field has an unexpected type.
-
_strict
final JsonField<Boolean> _strict()
Returns the raw JSON value of strict.
Unlike strict, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final NamespaceTool.Tool.Function.Builder toBuilder()
-
validate
final NamespaceTool.Tool.Function validate()
Validates that the types of all values in this object match their expected types recursively.
This method is not forwards compatible with new types from the API for existing fields.
-
builder
final static NamespaceTool.Tool.Function.Builder builder()
Returns a mutable builder for constructing an instance of Function.
The following fields are required:
.name()
-
-
-
-