com.amazonaws.services.s3.model

## クラス GetObjectRequest

- java.lang.Object
- - com.amazonaws.AmazonWebServiceRequest
  - - com.amazonaws.services.s3.model.GetObjectRequest

-     public class GetObjectRequest
      extends AmazonWebServiceRequest

  Provides options for downloading an Amazon S3 object.

  All `GetObjectRequests` must specify a bucket name and key. Beyond that, requests can also specify:

  - The range of bytes within the object to download,
  - Constraints controlling if the object will be downloaded or not.
  関連項目:
    `GetObjectRequest(String, String)`, `GetObjectRequest(String, String, String)`, `GetObjectMetadataRequest`

- - ### コンストラクタの概要

    コンストラクタ
    コンストラクタと説明
    `GetObjectRequest(java.lang.String bucketName, java.lang.String key)` Constructs a new `GetObjectRequest` with all the required parameters.
    `GetObjectRequest(java.lang.String bucketName, java.lang.String key, java.lang.String versionId)` Constructs a new `GetObjectRequest` with all the required parameters.

  - ### メソッドの概要

    メソッド
    修飾子とタイプ | メソッドと説明
    --- | ---
    `java.lang.String` | `getBucketName()` Gets the name of the bucket containing the object to be downloaded.
    `java.lang.String` | `getKey()` Gets the key under which the object to be downloaded is stored.
    `java.util.List<java.lang.String>` | `getMatchingETagConstraints()` Gets the optional list of ETag constraints that, when present, must include a match for the object's current ETag in order for this request to be executed.
    `java.util.Date` | `getModifiedSinceConstraint()` Gets the optional modified constraint that restricts this request to executing only if the object has been modified after the specified date.
    `java.util.List<java.lang.String>` | `getNonmatchingETagConstraints()` Gets the optional list of ETag constraints that when present, must not include a match for the object's current ETag in order for this request to be executed.
    `ProgressListener` | `getProgressListener()` Returns the optional progress listener for receiving updates about object download status.
    `long[]` | `getRange()` Gets the optional inclusive byte range within the desired object that will be downloaded by this request.
    `ResponseHeaderOverrides` | `getResponseHeaders()` Returns the headers to be overridden in the service response.
    `java.util.Date` | `getUnmodifiedSinceConstraint()` Gets the optional unmodified constraint that restricts this request to executing only if the object has not been modified after the specified date.
    `java.lang.String` | `getVersionId()` Gets the optional version ID specifying which version of the object to download.
    `void` | `setBucketName(java.lang.String bucketName)` Sets the name of the bucket containing the object to be downloaded.
    `void` | `setKey(java.lang.String key)` Sets the key under which the object to be downloaded is stored.
    `void` | `setMatchingETagConstraints(java.util.List<java.lang.String> eTagList)` Sets the optional list of ETag constraints that when present must include a match for the object's current ETag in order for this request to be executed.
    `void` | `setModifiedSinceConstraint(java.util.Date date)` Sets the optional modified constraint that restricts this request to executing only if the object has been modified after the specified date.
    `void` | `setNonmatchingETagConstraints(java.util.List<java.lang.String> eTagList)` Sets the optional list of ETag constraints that when present must not include a match for the object's current ETag in order for this request to be executed.
    `void` | `setProgressListener(ProgressListener progressListener)` Sets the optional progress listener for receiving updates about object download status.
    `void` | `setRange(long start, long end)` Sets the optional inclusive byte range within the desired object that will be downloaded by this request.
    `void` | `setResponseHeaders(ResponseHeaderOverrides responseHeaders)` Sets the headers to be overridden in the service response.
    `void` | `setUnmodifiedSinceConstraint(java.util.Date date)` Sets the optional unmodified constraint that restricts this request to executing only if the object has not been modified after the specified date.
    `void` | `setVersionId(java.lang.String versionId)` Sets the optional version ID specifying which version of the object to download.
    `GetObjectRequest` | `withBucketName(java.lang.String bucketName)` Sets the name of the bucket containing the object to be downloaded.
    `GetObjectRequest` | `withKey(java.lang.String key)` Sets the key under which the object to be downloaded is stored.
    `GetObjectRequest` | `withMatchingETagConstraint(java.lang.String eTag)` Sets a single ETag constraint to this request.
    `GetObjectRequest` | `withModifiedSinceConstraint(java.util.Date date)` Sets the optional modified constraint that restricts this request to executing only if the object has been modified after the specified date.
    `GetObjectRequest` | `withNonmatchingETagConstraint(java.lang.String eTag)` Sets a single ETag constraint to this request.
    `GetObjectRequest` | `withProgressListener(ProgressListener progressListener)` Sets the optional progress listener for receiving updates about object download status, and returns this updated object so that additional method calls can be chained together.
    `GetObjectRequest` | `withRange(long start, long end)` Sets the optional inclusive byte range within the desired object that will be downloaded by this request.
    `GetObjectRequest` | `withResponseHeaders(ResponseHeaderOverrides responseHeaders)` Sets the headers to be overridden in the service response and returns this object, for method chaining.
    `GetObjectRequest` | `withUnmodifiedSinceConstraint(java.util.Date date)` Sets the optional unmodified constraint that restricts this request to executing only if the object has not been modified after the specified date.
    `GetObjectRequest` | `withVersionId(java.lang.String versionId)` Sets the optional version ID specifying which version of the object to download and returns this object, enabling additional method calls to be chained together.

    - ### クラスから継承されたメソッド com.amazonaws.AmazonWebServiceRequest

      `copyPrivateRequestParameters, getRequestClientOptions, getRequestCredentials, setRequestCredentials`

    - ### クラスから継承されたメソッド java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### コンストラクタの詳細

    - #### GetObjectRequest

          public GetObjectRequest(java.lang.String bucketName,
                          java.lang.String key)

      Constructs a new `GetObjectRequest` with all the required parameters.
      パラメータ:
        `bucketName` - The name of the bucket containing the desired object.
        `key` - The key in the specified bucket under which the object is stored.
      関連項目:
        `GetObjectRequest(String, String, String)`

    - #### GetObjectRequest

          public GetObjectRequest(java.lang.String bucketName,
                          java.lang.String key,
                          java.lang.String versionId)

      Constructs a new `GetObjectRequest` with all the required parameters.
      パラメータ:
        `bucketName` - The name of the bucket containing the desired object.
        `key` - The key in the specified bucket under which the object is stored.
        `versionId` - The Amazon S3 version ID specifying a specific version of the object to download.
      関連項目:
        `GetObjectRequest(String, String)`

  - ### メソッドの詳細

    - #### getBucketName

          public java.lang.String getBucketName()

      Gets the name of the bucket containing the object to be downloaded.
      戻り値:
        The name of the bucket containing the object to be downloaded.
      関連項目:
        `setBucketName(String)`, `withBucketName(String)`

    - #### setBucketName

          public void setBucketName(java.lang.String bucketName)

      Sets the name of the bucket containing the object to be downloaded.
      パラメータ:
        `bucketName` - The name of the bucket containing the object to be downloaded.
      関連項目:
        `getBucketName()`, `withBucketName(String)`

    - #### withBucketName

          public GetObjectRequest withBucketName(java.lang.String bucketName)

      Sets the name of the bucket containing the object to be downloaded. Returns this `GetObjectRequest`, enabling additional method calls to be chained together.
      パラメータ:
        `bucketName` - The name of the bucket containing the object to be downloaded.
      戻り値:
        This `GetObjectRequest`, enabling additional method calls to be chained together.
      関連項目:
        `getBucketName()`, `setBucketName(String)`

    - #### getKey

          public java.lang.String getKey()

      Gets the key under which the object to be downloaded is stored.
      戻り値:
        The key under which the object to be downloaded is stored.
      関連項目:
        `setKey(String)`, `withKey(String)`

    - #### setKey

          public void setKey(java.lang.String key)

      Sets the key under which the object to be downloaded is stored.
      パラメータ:
        `key` - The key under which the object to be downloaded is stored.
      関連項目:
        `getKey()`, `withKey(String)`

    - #### withKey

          public GetObjectRequest withKey(java.lang.String key)

      Sets the key under which the object to be downloaded is stored. Returns this `GetObjectRequest`, enabling additional method calls to be chained together.
      パラメータ:
        `key` - The key under which the object to be downloaded is stored.
      戻り値:
        This `GetObjectRequest`, enabling additional method calls to be chained together.
      関連項目:
        `getKey()`, `setKey(String)`

    - #### getVersionId

          public java.lang.String getVersionId()

      Gets the optional version ID specifying which version of the object to download. If not specified, the most recent version will be downloaded.

      Objects created before versioning was enabled or when versioning is suspended are given the default `null` version ID (see `Constants.NULL_VERSION_ID`). Note that the `null` version ID is a valid version ID and is not the same as not having a version ID.

      For more information about enabling versioning for a bucket, see `AmazonS3.setBucketVersioningConfiguration(SetBucketVersioningConfigurationRequest)`.

      戻り値:
        The optional version ID specifying which version of the object to download. If not specified, the most recent version will be downloaded.
      関連項目:
        `setVersionId(String)`, `withVersionId(String)`

    - #### setVersionId

          public void setVersionId(java.lang.String versionId)

      Sets the optional version ID specifying which version of the object to download. If not specified, the most recent version will be downloaded.

      Objects created before versioning was enabled or when versioning is suspended will be given the default `null` version ID (see `Constants.NULL_VERSION_ID`). Note that the `null` version ID is a valid version ID and is not the same as not having a version ID.

      For more information about enabling versioning for a bucket, see `AmazonS3.setBucketVersioningConfiguration(SetBucketVersioningConfigurationRequest)`.

      パラメータ:
        `versionId` - The optional version ID specifying which version of the object to download.
      関連項目:
        `getVersionId()`, `withVersionId(String)`

    - #### withVersionId

          public GetObjectRequest withVersionId(java.lang.String versionId)

      Sets the optional version ID specifying which version of the object to download and returns this object, enabling additional method calls to be chained together. If not specified, the most recent version will be downloaded.

      Objects created before versioning was enabled or when versioning is suspended will be given the default or `null` version ID (see `Constants.NULL_VERSION_ID`). Note that the `null` version ID is a valid version ID and is not the same as not having a version ID.

      For more information about enabling versioning for a bucket, see `AmazonS3.setBucketVersioningConfiguration(SetBucketVersioningConfigurationRequest)`.

      パラメータ:
        `versionId` - The optional version ID specifying which version of the object to download.
      戻り値:
        The updated request object, enabling additional method calls to be chained together.
      関連項目:
        `getVersionId()`, `setVersionId(String)`

    - #### getRange

          public long[] getRange()

      Gets the optional inclusive byte range within the desired object that will be downloaded by this request.

      The range is returned as a two element array, containing the start and end index of the byte range. If no byte range has been specified, the entire object is downloaded and this method returns `null`.

      戻り値:
        A two element array indicating the inclusive start index and end index within the object being downloaded by this request. Returns `null` if no range has been specified, and the whole object is to be downloaded.
      関連項目:
        `GetObjectMetadataRequest#setRange(long, long)`, `withRange(long, long)`

    - #### setRange

          public void setRange(long start,
                      long end)

      Sets the optional inclusive byte range within the desired object that will be downloaded by this request.

      The first byte in an object has position 0; as an example, the first ten bytes of an object can be downloaded by specifying a range of 0 to 9.

      If no byte range is specified, this request downloads the entire object from Amazon S3.

      パラメータ:
        `start` - The start of the inclusive byte range to download.
        `end` - The end of the inclusive byte range to download.
      関連項目:
        `GetObjectMetadataRequest#getRange()`, `withRange(long, long)`

    - #### withRange

          public GetObjectRequest withRange(long start,
                                   long end)

      Sets the optional inclusive byte range within the desired object that will be downloaded by this request. Returns this `GetObjectRequest`, enabling additional method calls to be chained together.

      The first byte in an object has position 0; as an example, the first ten bytes of an object can be downloaded by specifying a range of 0 to 9.

      If no byte range is specified, this request downloads the entire object from Amazon S3.

      パラメータ:
        `start` - The start of the inclusive byte range to download.
        `end` - The end of the inclusive byte range to download.
      戻り値:
        This `GetObjectRequest`, enabling additional method calls to be chained together.
      関連項目:
        `getRange()`, `setRange(long, long)`

    - #### getMatchingETagConstraints

          public java.util.List<java.lang.String> getMatchingETagConstraints()

      Gets the optional list of ETag constraints that, when present, must include a match for the object's current ETag in order for this request to be executed. Only one ETag in the list needs to match for this request to be executed by Amazon S3.
      戻り値:
        The optional list of ETag constraints that when present must include a match for the object's current ETag in order for this request to be executed.
      関連項目:
        `setMatchingETagConstraints(List)`, `withMatchingETagConstraint(String)`

    - #### setMatchingETagConstraints

          public void setMatchingETagConstraints(java.util.List<java.lang.String> eTagList)

      Sets the optional list of ETag constraints that when present must include a match for the object's current ETag in order for this request to be executed. If none of the specified ETags match the object's current ETag, this request will not be executed. Only one ETag in the list needs to match for the request to be executed by Amazon S3.
      パラメータ:
        `eTagList` - The optional list of ETag constraints that must include a match for the object's current ETag in order for this request to be executed.
      関連項目:
        `getMatchingETagConstraints()`, `withMatchingETagConstraint(String)`

    - #### withMatchingETagConstraint

          public GetObjectRequest withMatchingETagConstraint(java.lang.String eTag)

      Sets a single ETag constraint to this request. Returns this `GetObjectRequest`, enabling additional method calls to be chained together.

      Multiple ETag constraints can be added to a request, but one must match the object's current ETag in order for this request to be executed. If none of the ETag constraints added to this request match the object's current ETag, this request will not be executed by Amazon S3.

      パラメータ:
        `eTag` - The matching ETag constraint to add to this request.
      戻り値:
        This `GetObjectRequest`, enabling additional method calls to be chained together.
      関連項目:
        `getMatchingETagConstraints()`, `setMatchingETagConstraints(List)`

    - #### getNonmatchingETagConstraints

          public java.util.List<java.lang.String> getNonmatchingETagConstraints()

      Gets the optional list of ETag constraints that when present, must not include a match for the object's current ETag in order for this request to be executed. If any entry in the non-matching ETag constraint list matches the object's current ETag, this request will not be executed by Amazon S3.
      戻り値:
        The optional list of ETag constraints that when present, must not include a match for the object's current ETag in order for this request to be executed.
      関連項目:
        `setNonmatchingETagConstraints(List)`, `withNonmatchingETagConstraint(String)`

    - #### setNonmatchingETagConstraints

          public void setNonmatchingETagConstraints(java.util.List<java.lang.String> eTagList)

      Sets the optional list of ETag constraints that when present must not include a match for the object's current ETag in order for this request to be executed. If any entry in the non-matching ETag constraint list matches the object's current ETag, this request will not be executed by Amazon S3.
      パラメータ:
        `eTagList` - The list of ETag constraints that, when present, must not include a match for the object's current ETag in order for this request to be executed.
      関連項目:
        `getNonmatchingETagConstraints()`, `withNonmatchingETagConstraint(String)`

    - #### withNonmatchingETagConstraint

          public GetObjectRequest withNonmatchingETagConstraint(java.lang.String eTag)

      Sets a single ETag constraint to this request. Returns this `GetObjectRequest`, enabling additional method calls to be chained together.

      Multiple ETag constraints can be added to a request, but all ETag constraints must not match the object's current ETag in order for this request to be executed. If any entry in the non-matching ETag constraint list matches the object's current ETag, this request will not be executed by Amazon S3.

      パラメータ:
        `eTag` - The non-matching ETag constraint to add to this request.
      戻り値:
        This `GetObjectRequest`, enabling additional method calls to be chained together.
      関連項目:
        `getNonmatchingETagConstraints()`, `setNonmatchingETagConstraints(List)`

    - #### getUnmodifiedSinceConstraint

          public java.util.Date getUnmodifiedSinceConstraint()

      Gets the optional unmodified constraint that restricts this request to executing only if the object has not been modified after the specified date.
      戻り値:
        The optional unmodified constraint that restricts this request to executing only if the object has not been modified after the specified date.
      関連項目:
        `setUnmodifiedSinceConstraint(Date)`, `withUnmodifiedSinceConstraint(Date)`

    - #### setUnmodifiedSinceConstraint

          public void setUnmodifiedSinceConstraint(java.util.Date date)

      Sets the optional unmodified constraint that restricts this request to executing only if the object has not been modified after the specified date.

      Note that Amazon S3 will ignore any dates occurring in the future.

      パラメータ:
        `date` - The unmodified constraint that restricts this request to executing only if the object has not been modified after this date.
      関連項目:
        `getUnmodifiedSinceConstraint()`, `withUnmodifiedSinceConstraint(Date)`

    - #### withUnmodifiedSinceConstraint

          public GetObjectRequest withUnmodifiedSinceConstraint(java.util.Date date)

      Sets the optional unmodified constraint that restricts this request to executing only if the object has not been modified after the specified date. Returns this `GetObjectRequest`, enabling additional method calls to be chained together.

      Note that Amazon S3 will ignore any dates occurring in the future.

      パラメータ:
        `date` - The unmodified constraint that restricts this request to executing only if the object has not been modified after this date.
      戻り値:
        This `GetObjectRequest`, enabling additional method calls to be chained together.
      関連項目:
        `getUnmodifiedSinceConstraint()`, `setUnmodifiedSinceConstraint(Date)`

    - #### getModifiedSinceConstraint

          public java.util.Date getModifiedSinceConstraint()

      Gets the optional modified constraint that restricts this request to executing only if the object has been modified after the specified date.
      戻り値:
        The optional modified constraint that restricts this request to executing only if the object has been modified after the specified date.
      関連項目:
        `setModifiedSinceConstraint(Date)`, `withModifiedSinceConstraint(Date)`

    - #### setModifiedSinceConstraint

          public void setModifiedSinceConstraint(java.util.Date date)

      Sets the optional modified constraint that restricts this request to executing only if the object has been modified after the specified date.

      Note that Amazon S3 will ignore any dates occurring in the future.

      パラメータ:
        `date` - The modified constraint that restricts this request to executing only if the object has been modified after the specified date.
      関連項目:
        `getModifiedSinceConstraint()`, `withModifiedSinceConstraint(Date)`

    - #### withModifiedSinceConstraint

          public GetObjectRequest withModifiedSinceConstraint(java.util.Date date)

      Sets the optional modified constraint that restricts this request to executing only if the object has been modified after the specified date. Returns this `GetObjectRequest`, enabling additional method calls to be chained together.

      Note that Amazon S3 will ignore any dates occurring in the future.

      パラメータ:
        `date` - The modified constraint that restricts this request to executing only if the object has been modified after the specified date.
      戻り値:
        This `GetObjectRequest`, enabling additional method calls to be chained together.
      関連項目:
        `getModifiedSinceConstraint()`, `setModifiedSinceConstraint(Date)`

    - #### getResponseHeaders

          public ResponseHeaderOverrides getResponseHeaders()

      Returns the headers to be overridden in the service response.
      戻り値:
        the headers to be overridden in the service response.

    - #### setResponseHeaders

          public void setResponseHeaders(ResponseHeaderOverrides responseHeaders)

      Sets the headers to be overridden in the service response.
      パラメータ:
        `responseHeaders` - The headers to be overridden in the service response.

    - #### withResponseHeaders

          public GetObjectRequest withResponseHeaders(ResponseHeaderOverrides responseHeaders)

      Sets the headers to be overridden in the service response and returns this object, for method chaining.
      パラメータ:
        `responseHeaders` - The headers to be overridden in the service response.
      戻り値:
        This `GetObjectRequest` for method chaining.

    - #### setProgressListener

          public void setProgressListener(ProgressListener progressListener)

      Sets the optional progress listener for receiving updates about object download status.
      パラメータ:
        `progressListener` - The new progress listener.

    - #### getProgressListener

          public ProgressListener getProgressListener()

      Returns the optional progress listener for receiving updates about object download status.
      戻り値:
        the optional progress listener for receiving updates about object download status.

    - #### withProgressListener

          public GetObjectRequest withProgressListener(ProgressListener progressListener)

      Sets the optional progress listener for receiving updates about object download status, and returns this updated object so that additional method calls can be chained together.
      パラメータ:
        `progressListener` - The new progress listener.
      戻り値:
        This updated GetObjectRequest object.