Class MainError.Builder
java.lang.Object
org.opensearch.client.opensearch._types.ErrorCause.AbstractBuilder<MainError.Builder>
org.opensearch.client.opensearch._types.MainError.Builder
- All Implemented Interfaces:
ObjectBuilder<MainError>
- Enclosing class:
- MainError
public static class MainError.Builder extends ErrorCause.AbstractBuilder<MainError.Builder> implements ObjectBuilder<MainError>
Builder for
MainError.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.opensearch.client.util.ObjectBuilder
ObjectBuilder.Constant<V> -
Constructor Summary
Constructors Constructor Description Builder() -
Method Summary
Modifier and Type Method Description MainError.BuilderaddRootCause(java.util.function.Function<ErrorCause.Builder,ObjectBuilder<ErrorCause>> fn)Add a value torootCause(List), creating the list if needed.MainError.BuilderaddRootCause(ErrorCause value)Add a value torootCause(List), creating the list if needed.MainErrorbuild()Builds aMainError.MainError.Builderheaders(java.util.Map<java.lang.String,java.lang.String> value)API name:headersMainError.BuilderputHeaders(java.lang.String key, java.lang.String value)Add a key/value toheaders(Map), creating the map if needed.MainError.BuilderrootCause(java.util.function.Function<ErrorCause.Builder,ObjectBuilder<ErrorCause>> fn)SetrootCause(List)to a singleton list.MainError.BuilderrootCause(java.util.List<ErrorCause> value)API name:root_causeMainError.BuilderrootCause(ErrorCause... value)API name:root_causeprotected MainError.Builderself()Methods inherited from class org.opensearch.client.opensearch._types.ErrorCause.AbstractBuilder
addFailedShards, addFailedShards, addResourceId, addScriptStack, bytesLimit, bytesWanted, causedBy, causedBy, col, column, failedShards, failedShards, failedShards, grouped, header, index, indexUuid, lang, language, licensedExpiredFeature, line, maxBuckets, phase, position, position, processorType, propertyName, putHeader, reason, resourceId, resourceId, resourceType, script, scriptStack, scriptStack, shard, stackTrace, type
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
headers
public MainError.Builder headers(@Nullable java.util.Map<java.lang.String,java.lang.String> value)API name:headers -
putHeaders
Add a key/value toheaders(Map), creating the map if needed. -
rootCause
API name:root_cause- Overrides:
rootCausein classErrorCause.AbstractBuilder<MainError.Builder>
-
rootCause
API name:root_cause- Overrides:
rootCausein classErrorCause.AbstractBuilder<MainError.Builder>
-
addRootCause
Add a value torootCause(List), creating the list if needed.- Overrides:
addRootCausein classErrorCause.AbstractBuilder<MainError.Builder>
-
rootCause
public MainError.Builder rootCause(java.util.function.Function<ErrorCause.Builder,ObjectBuilder<ErrorCause>> fn)SetrootCause(List)to a singleton list.- Overrides:
rootCausein classErrorCause.AbstractBuilder<MainError.Builder>
-
addRootCause
public MainError.Builder addRootCause(java.util.function.Function<ErrorCause.Builder,ObjectBuilder<ErrorCause>> fn)Add a value torootCause(List), creating the list if needed.- Overrides:
addRootCausein classErrorCause.AbstractBuilder<MainError.Builder>
-
self
- Specified by:
selfin classErrorCause.AbstractBuilder<MainError.Builder>
-
build
Builds aMainError.- Specified by:
buildin interfaceObjectBuilder<MainError>- Throws:
java.lang.NullPointerException- if some of the required fields are null.
-