Class ComponentTemplatesResponse.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<ComponentTemplatesResponse.Builder>
co.elastic.clients.elasticsearch.cat.ComponentTemplatesResponse.Builder
- All Implemented Interfaces:
WithJson<ComponentTemplatesResponse.Builder>,ObjectBuilder<ComponentTemplatesResponse>
- Enclosing class:
- ComponentTemplatesResponse
public static class ComponentTemplatesResponse.Builder
extends WithJsonObjectBuilderBase<ComponentTemplatesResponse.Builder>
implements ObjectBuilder<ComponentTemplatesResponse>
Builder for
ComponentTemplatesResponse.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aComponentTemplatesResponse.componentTemplates(ComponentTemplate value, ComponentTemplate... values) Required - Response value.Required - Response value.Required - Response value.protected ComponentTemplatesResponse.Builderself()withJson(jakarta.json.stream.JsonParser parser, JsonpMapper mapper) Sets additional properties values on this object by reading from a JSON input.Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
componentTemplates
Required - Response value.Adds all elements of
listtocomponentTemplates. -
componentTemplates
public final ComponentTemplatesResponse.Builder componentTemplates(ComponentTemplate value, ComponentTemplate... values) Required - Response value.Adds one or more values to
componentTemplates. -
componentTemplates
public final ComponentTemplatesResponse.Builder componentTemplates(Function<ComponentTemplate.Builder, ObjectBuilder<ComponentTemplate>> fn) Required - Response value.Adds a value to
componentTemplatesusing a builder lambda. -
withJson
public ComponentTemplatesResponse.Builder withJson(jakarta.json.stream.JsonParser parser, JsonpMapper mapper) Description copied from interface:WithJsonSets additional properties values on this object by reading from a JSON input.This is a "partial deserialization": properties that were already set keep their value if they're not present in the JSON input, and properties can also be set after having called this method, including overriding those read from the JSON input.
This low level variant of
withJsongives full control on the json parser and object mapper. Most of the time usingWithJson.withJson(Reader)andWithJson.withJson(InputStream)will be more convenient.- Specified by:
withJsonin interfaceWithJson<ComponentTemplatesResponse.Builder>- Overrides:
withJsonin classWithJsonObjectBuilderBase<ComponentTemplatesResponse.Builder>- Parameters:
parser- the JSONP parsermapper- the JSONP mapper used to deserialize values and nested objects- Returns:
- this object
-
self
- Specified by:
selfin classWithJsonObjectBuilderBase<ComponentTemplatesResponse.Builder>
-
build
Builds aComponentTemplatesResponse.- Specified by:
buildin interfaceObjectBuilder<ComponentTemplatesResponse>- Throws:
NullPointerException- if some of the required fields are null.
-