Class GetSnapshotRequest.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.elasticsearch.snapshot.GetSnapshotRequest.Builder
- All Implemented Interfaces:
ObjectBuilder<GetSnapshotRequest>
- Enclosing class:
- GetSnapshotRequest
public static class GetSnapshotRequest.Builder extends ObjectBuilderBase implements ObjectBuilder<GetSnapshotRequest>
Builder for
GetSnapshotRequest
.-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description GetSnapshotRequest
build()
Builds aGetSnapshotRequest
.GetSnapshotRequest.Builder
human(java.lang.Boolean value)
API name:human
GetSnapshotRequest.Builder
ignoreUnavailable(java.lang.Boolean value)
If false, the request returns an error for any snapshots that are unavailable.GetSnapshotRequest.Builder
includeRepository(java.lang.Boolean value)
Whether to include the repository name in the snapshot info.GetSnapshotRequest.Builder
indexDetails(java.lang.Boolean value)
If true, returns additional information about each index in the snapshot comprising the number of shards in the index, the total size of the index in bytes, and the maximum number of segments per shard in the index.GetSnapshotRequest.Builder
masterTimeout(Time value)
Period to wait for a connection to the master node.GetSnapshotRequest.Builder
masterTimeout(java.util.function.Function<Time.Builder,ObjectBuilder<Time>> fn)
Period to wait for a connection to the master node.GetSnapshotRequest.Builder
repository(java.lang.String value)
Required - Comma-separated list of snapshot repository names used to limit the request.GetSnapshotRequest.Builder
snapshot(java.lang.String value, java.lang.String... values)
Required - Comma-separated list of snapshot names to retrieve.GetSnapshotRequest.Builder
snapshot(java.util.List<java.lang.String> list)
Required - Comma-separated list of snapshot names to retrieve.GetSnapshotRequest.Builder
verbose(java.lang.Boolean value)
If true, returns additional information about each snapshot such as the version of Elasticsearch which took the snapshot, the start and end times of the snapshot, and the number of shards snapshotted.Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
human
API name:human
-
includeRepository
Whether to include the repository name in the snapshot info. Defaults to true.API name:
include_repository
-
indexDetails
If true, returns additional information about each index in the snapshot comprising the number of shards in the index, the total size of the index in bytes, and the maximum number of segments per shard in the index. Defaults to false, meaning that this information is omitted.API name:
index_details
-
masterTimeout
Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.API name:
master_timeout
-
masterTimeout
public final GetSnapshotRequest.Builder masterTimeout(java.util.function.Function<Time.Builder,ObjectBuilder<Time>> fn)Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.API name:
master_timeout
-
repository
Required - Comma-separated list of snapshot repository names used to limit the request. Wildcard (*) expressions are supported.API name:
repository
-
snapshot
Required - Comma-separated list of snapshot names to retrieve. Also accepts wildcards (*).- To get information about all snapshots in a registered repository, use a wildcard (*) or _all.
- To get information about any snapshots that are currently running, use _current.
API name:
snapshot
Adds all elements of
list
tosnapshot
. -
snapshot
public final GetSnapshotRequest.Builder snapshot(java.lang.String value, java.lang.String... values)Required - Comma-separated list of snapshot names to retrieve. Also accepts wildcards (*).- To get information about all snapshots in a registered repository, use a wildcard (*) or _all.
- To get information about any snapshots that are currently running, use _current.
API name:
snapshot
Adds one or more values to
snapshot
. -
verbose
If true, returns additional information about each snapshot such as the version of Elasticsearch which took the snapshot, the start and end times of the snapshot, and the number of shards snapshotted.API name:
verbose
-
build
Builds aGetSnapshotRequest
.- Specified by:
build
in interfaceObjectBuilder<GetSnapshotRequest>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-