Class GetSnapshotRequest.Builder

java.lang.Object
co.elastic.clients.elasticsearch.snapshot.GetSnapshotRequest.Builder
All Implemented Interfaces:
ObjectBuilder<GetSnapshotRequest>
Enclosing class:
GetSnapshotRequest

public static class GetSnapshotRequest.Builder
extends java.lang.Object
implements ObjectBuilder<GetSnapshotRequest>
Builder for GetSnapshotRequest.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • repository

      public GetSnapshotRequest.Builder repository​(java.lang.String value)
      Required - Comma-separated list of snapshot repository names used to limit the request. Wildcard (*) expressions are supported.

      API name: repository

    • snapshot

      public GetSnapshotRequest.Builder snapshot​(java.util.List<java.lang.String> value)
      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

    • snapshot

      public GetSnapshotRequest.Builder snapshot​(java.lang.String... value)
      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

    • addSnapshot

      public GetSnapshotRequest.Builder addSnapshot​(java.lang.String value)
      Add a value to snapshot(List), creating the list if needed.
    • ignoreUnavailable

      public GetSnapshotRequest.Builder ignoreUnavailable​(@Nullable java.lang.Boolean value)
      If false, the request returns an error for any snapshots that are unavailable.

      API name: ignore_unavailable

    • masterTimeout

      public GetSnapshotRequest.Builder masterTimeout​(@Nullable java.lang.String value)
      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

    • verbose

      public GetSnapshotRequest.Builder verbose​(@Nullable 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.

      API name: verbose

    • indexDetails

      public GetSnapshotRequest.Builder indexDetails​(@Nullable 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. Defaults to false, meaning that this information is omitted.

      API name: index_details

    • human

      public GetSnapshotRequest.Builder human​(@Nullable java.lang.Boolean value)
      API name: human
    • includeRepository

      public GetSnapshotRequest.Builder includeRepository​(@Nullable java.lang.Boolean value)
      Whether to include the repository name in the snapshot info. Defaults to true.

      API name: include_repository

    • build

      public GetSnapshotRequest build()
      Specified by:
      build in interface ObjectBuilder<GetSnapshotRequest>
      Throws:
      java.lang.NullPointerException - if some of the required fields are null.