@Generated(value="software.amazon.awssdk:codegen") public final class GetObjectResponse extends S3Response implements ToCopyableBuilder<GetObjectResponse.Builder,GetObjectResponse>
Modifier and Type | Class and Description |
---|---|
static interface |
GetObjectResponse.Builder |
Modifier and Type | Method and Description |
---|---|
String |
acceptRanges()
Indicates that a range of bytes was specified.
|
static GetObjectResponse.Builder |
builder() |
String |
cacheControl()
Specifies caching behavior along the request/reply chain.
|
String |
contentDisposition()
Specifies presentational information for the object.
|
String |
contentEncoding()
Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be
applied to obtain the media-type referenced by the Content-Type header field.
|
String |
contentLanguage()
The language the content is in.
|
Long |
contentLength()
Size of the body in bytes.
|
String |
contentRange()
The portion of the object returned in the response.
|
String |
contentType()
A standard MIME type describing the format of the object data.
|
Boolean |
deleteMarker()
Specifies whether the object retrieved was (true) or was not (false) a Delete Marker.
|
boolean |
equals(Object obj) |
boolean |
equalsBySdkFields(Object obj) |
String |
eTag()
An ETag is an opaque identifier assigned by a web server to a specific version of a resource found at a URL.
|
String |
expiration()
If the object expiration is configured (see PUT Bucket lifecycle), the response includes this header.
|
Instant |
expires()
The date and time at which the object is no longer cacheable.
|
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz) |
int |
hashCode() |
boolean |
hasMetadata()
Returns true if the Metadata property was specified by the sender (it may be empty), or false if the sender did
not specify the value (it will be empty).
|
Instant |
lastModified()
Last modified date of the object
|
Map<String,String> |
metadata()
A map of metadata to store with the object in S3.
|
Integer |
missingMeta()
This is set to the number of metadata entries not returned in
x-amz-meta headers. |
ObjectLockLegalHoldStatus |
objectLockLegalHoldStatus()
Indicates whether this object has an active legal hold.
|
String |
objectLockLegalHoldStatusAsString()
Indicates whether this object has an active legal hold.
|
ObjectLockMode |
objectLockMode()
The Object Lock mode currently in place for this object.
|
String |
objectLockModeAsString()
The Object Lock mode currently in place for this object.
|
Instant |
objectLockRetainUntilDate()
The date and time when this object's Object Lock will expire.
|
Integer |
partsCount()
The count of parts this object has.
|
ReplicationStatus |
replicationStatus()
Amazon S3 can return this if your request involves a bucket that is either a source or destination in a
replication rule.
|
String |
replicationStatusAsString()
Amazon S3 can return this if your request involves a bucket that is either a source or destination in a
replication rule.
|
RequestCharged |
requestCharged()
Returns the value of the RequestCharged property for this object.
|
String |
requestChargedAsString()
Returns the value of the RequestCharged property for this object.
|
String |
restore()
Provides information about object restoration operation and expiration time of the restored object copy.
|
List<SdkField<?>> |
sdkFields() |
static Class<? extends GetObjectResponse.Builder> |
serializableBuilderClass() |
ServerSideEncryption |
serverSideEncryption()
The server-side encryption algorithm used when storing this object in Amazon S3 (for example, AES256, aws:kms).
|
String |
serverSideEncryptionAsString()
The server-side encryption algorithm used when storing this object in Amazon S3 (for example, AES256, aws:kms).
|
String |
sseCustomerAlgorithm()
If server-side encryption with a customer-provided encryption key was requested, the response will include this
header confirming the encryption algorithm used.
|
String |
sseCustomerKeyMD5()
If server-side encryption with a customer-provided encryption key was requested, the response will include this
header to provide round-trip message integrity verification of the customer-provided encryption key.
|
String |
ssekmsKeyId()
If present, specifies the ID of the AWS Key Management Service (AWS KMS) customer master key (CMK) that was used
for the object.
|
StorageClass |
storageClass()
Provides storage class information of the object.
|
String |
storageClassAsString()
Provides storage class information of the object.
|
Integer |
tagCount()
The number of tags, if any, on the object.
|
GetObjectResponse.Builder |
toBuilder() |
String |
toString()
Returns a string representation of this object.
|
String |
versionId()
Version of the object.
|
String |
websiteRedirectLocation()
If the bucket is configured as a website, redirects requests for this object to another object in the same bucket
or to an external URL.
|
responseMetadata
sdkHttpResponse
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
copy
public Boolean deleteMarker()
Specifies whether the object retrieved was (true) or was not (false) a Delete Marker. If false, this response header does not appear in the response.
public String acceptRanges()
Indicates that a range of bytes was specified.
public String expiration()
If the object expiration is configured (see PUT Bucket lifecycle), the response includes this header. It includes the expiry-date and rule-id key-value pairs providing object expiration information. The value of the rule-id is URL encoded.
public String restore()
Provides information about object restoration operation and expiration time of the restored object copy.
public Instant lastModified()
Last modified date of the object
public Long contentLength()
Size of the body in bytes.
public String eTag()
An ETag is an opaque identifier assigned by a web server to a specific version of a resource found at a URL.
public Integer missingMeta()
This is set to the number of metadata entries not returned in x-amz-meta
headers. This can happen if
you create metadata using an API like SOAP that supports more flexible metadata than the REST API. For example,
using SOAP, you can create metadata whose values are not legal HTTP headers.
x-amz-meta
headers. This can
happen if you create metadata using an API like SOAP that supports more flexible metadata than the REST
API. For example, using SOAP, you can create metadata whose values are not legal HTTP headers.public String versionId()
Version of the object.
public String cacheControl()
Specifies caching behavior along the request/reply chain.
public String contentDisposition()
Specifies presentational information for the object.
public String contentEncoding()
Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.
public String contentLanguage()
The language the content is in.
public String contentRange()
The portion of the object returned in the response.
public String contentType()
A standard MIME type describing the format of the object data.
public Instant expires()
The date and time at which the object is no longer cacheable.
public String websiteRedirectLocation()
If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata.
public ServerSideEncryption serverSideEncryption()
The server-side encryption algorithm used when storing this object in Amazon S3 (for example, AES256, aws:kms).
If the service returns an enum value that is not available in the current SDK version,
serverSideEncryption
will return ServerSideEncryption.UNKNOWN_TO_SDK_VERSION
. The raw value
returned by the service is available from serverSideEncryptionAsString()
.
ServerSideEncryption
public String serverSideEncryptionAsString()
The server-side encryption algorithm used when storing this object in Amazon S3 (for example, AES256, aws:kms).
If the service returns an enum value that is not available in the current SDK version,
serverSideEncryption
will return ServerSideEncryption.UNKNOWN_TO_SDK_VERSION
. The raw value
returned by the service is available from serverSideEncryptionAsString()
.
ServerSideEncryption
public boolean hasMetadata()
public Map<String,String> metadata()
A map of metadata to store with the object in S3.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
You can use hasMetadata()
to see if a value was sent in this field.
public String sseCustomerAlgorithm()
If server-side encryption with a customer-provided encryption key was requested, the response will include this header confirming the encryption algorithm used.
public String sseCustomerKeyMD5()
If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide round-trip message integrity verification of the customer-provided encryption key.
public String ssekmsKeyId()
If present, specifies the ID of the AWS Key Management Service (AWS KMS) customer master key (CMK) that was used for the object.
public StorageClass storageClass()
Provides storage class information of the object. Amazon S3 returns this header for all objects except for Standard storage class objects.
If the service returns an enum value that is not available in the current SDK version, storageClass
will
return StorageClass.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available from
storageClassAsString()
.
StorageClass
public String storageClassAsString()
Provides storage class information of the object. Amazon S3 returns this header for all objects except for Standard storage class objects.
If the service returns an enum value that is not available in the current SDK version, storageClass
will
return StorageClass.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available from
storageClassAsString()
.
StorageClass
public RequestCharged requestCharged()
If the service returns an enum value that is not available in the current SDK version, requestCharged
will return RequestCharged.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available
from requestChargedAsString()
.
RequestCharged
public String requestChargedAsString()
If the service returns an enum value that is not available in the current SDK version, requestCharged
will return RequestCharged.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available
from requestChargedAsString()
.
RequestCharged
public ReplicationStatus replicationStatus()
Amazon S3 can return this if your request involves a bucket that is either a source or destination in a replication rule.
If the service returns an enum value that is not available in the current SDK version, replicationStatus
will return ReplicationStatus.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available
from replicationStatusAsString()
.
ReplicationStatus
public String replicationStatusAsString()
Amazon S3 can return this if your request involves a bucket that is either a source or destination in a replication rule.
If the service returns an enum value that is not available in the current SDK version, replicationStatus
will return ReplicationStatus.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available
from replicationStatusAsString()
.
ReplicationStatus
public Integer partsCount()
The count of parts this object has.
public Integer tagCount()
The number of tags, if any, on the object.
public ObjectLockMode objectLockMode()
The Object Lock mode currently in place for this object.
If the service returns an enum value that is not available in the current SDK version, objectLockMode
will return ObjectLockMode.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available
from objectLockModeAsString()
.
ObjectLockMode
public String objectLockModeAsString()
The Object Lock mode currently in place for this object.
If the service returns an enum value that is not available in the current SDK version, objectLockMode
will return ObjectLockMode.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available
from objectLockModeAsString()
.
ObjectLockMode
public Instant objectLockRetainUntilDate()
The date and time when this object's Object Lock will expire.
public ObjectLockLegalHoldStatus objectLockLegalHoldStatus()
Indicates whether this object has an active legal hold. This field is only returned if you have permission to view an object's legal hold status.
If the service returns an enum value that is not available in the current SDK version,
objectLockLegalHoldStatus
will return ObjectLockLegalHoldStatus.UNKNOWN_TO_SDK_VERSION
. The raw
value returned by the service is available from objectLockLegalHoldStatusAsString()
.
ObjectLockLegalHoldStatus
public String objectLockLegalHoldStatusAsString()
Indicates whether this object has an active legal hold. This field is only returned if you have permission to view an object's legal hold status.
If the service returns an enum value that is not available in the current SDK version,
objectLockLegalHoldStatus
will return ObjectLockLegalHoldStatus.UNKNOWN_TO_SDK_VERSION
. The raw
value returned by the service is available from objectLockLegalHoldStatusAsString()
.
ObjectLockLegalHoldStatus
public GetObjectResponse.Builder toBuilder()
toBuilder
in interface ToCopyableBuilder<GetObjectResponse.Builder,GetObjectResponse>
toBuilder
in class AwsResponse
public static GetObjectResponse.Builder builder()
public static Class<? extends GetObjectResponse.Builder> serializableBuilderClass()
public int hashCode()
hashCode
in class AwsResponse
public boolean equals(Object obj)
equals
in class AwsResponse
public boolean equalsBySdkFields(Object obj)
equalsBySdkFields
in interface SdkPojo
public String toString()
public <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
getValueForField
in class SdkResponse
Copyright © 2019. All rights reserved.