Class CreateRepositoryRequest.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch._types.RequestBase.AbstractBuilder<CreateRepositoryRequest.Builder>
co.elastic.clients.elasticsearch.snapshot.CreateRepositoryRequest.Builder
- All Implemented Interfaces:
WithJson<CreateRepositoryRequest.Builder>
,ObjectBuilder<CreateRepositoryRequest>
- Enclosing class:
- CreateRepositoryRequest
public static class CreateRepositoryRequest.Builder
extends RequestBase.AbstractBuilder<CreateRepositoryRequest.Builder>
implements ObjectBuilder<CreateRepositoryRequest>
Builder for
CreateRepositoryRequest
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds aCreateRepositoryRequest
.masterTimeout
(Time value) The period to wait for the master node.The period to wait for the master node.Required - The name of the snapshot repository to register or update.repository
(Repository value) Required - Request body.Required - Request body.protected CreateRepositoryRequest.Builder
self()
The period to wait for a response from all relevant nodes in the cluster after updating the cluster metadata.The period to wait for a response from all relevant nodes in the cluster after updating the cluster metadata.Iftrue
, the request verifies the repository is functional on all master and data nodes in the cluster.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
-
masterTimeout
The period to wait for the master node. If the master node is not available before the timeout expires, the request fails and returns an error. To indicate that the request should never timeout, set it to-1
.API name:
master_timeout
-
masterTimeout
public final CreateRepositoryRequest.Builder masterTimeout(Function<Time.Builder, ObjectBuilder<Time>> fn) The period to wait for the master node. If the master node is not available before the timeout expires, the request fails and returns an error. To indicate that the request should never timeout, set it to-1
.API name:
master_timeout
-
name
Required - The name of the snapshot repository to register or update.API name:
repository
-
timeout
The period to wait for a response from all relevant nodes in the cluster after updating the cluster metadata. If no response is received before the timeout expires, the cluster metadata update still applies but the response will indicate that it was not completely acknowledged. To indicate that the request should never timeout, set it to-1
.API name:
timeout
-
timeout
The period to wait for a response from all relevant nodes in the cluster after updating the cluster metadata. If no response is received before the timeout expires, the cluster metadata update still applies but the response will indicate that it was not completely acknowledged. To indicate that the request should never timeout, set it to-1
.API name:
timeout
-
verify
Iftrue
, the request verifies the repository is functional on all master and data nodes in the cluster. Iffalse
, this verification is skipped. You can also perform this verification with the verify snapshot repository API.API name:
verify
-
repository
Required - Request body. -
repository
public final CreateRepositoryRequest.Builder repository(Function<Repository.Builder, ObjectBuilder<Repository>> fn) Required - Request body. -
withJson
public CreateRepositoryRequest.Builder withJson(jakarta.json.stream.JsonParser parser, JsonpMapper mapper) Description copied from interface:WithJson
Sets 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
withJson
gives 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:
withJson
in interfaceWithJson<CreateRepositoryRequest.Builder>
- Overrides:
withJson
in classWithJsonObjectBuilderBase<CreateRepositoryRequest.Builder>
- Parameters:
parser
- the JSONP parsermapper
- the JSONP mapper used to deserialize values and nested objects- Returns:
- this object
-
self
- Specified by:
self
in classRequestBase.AbstractBuilder<CreateRepositoryRequest.Builder>
-
build
Builds aCreateRepositoryRequest
.- Specified by:
build
in interfaceObjectBuilder<CreateRepositoryRequest>
- Throws:
NullPointerException
- if some of the required fields are null.
-