/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include #include namespace Aws { namespace Http { class URI; } //namespace Http namespace S3 { namespace Model { /** */ class ListObjectVersionsRequest : public S3Request { public: AWS_S3_API ListObjectVersionsRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "ListObjectVersions"; } AWS_S3_API Aws::String SerializePayload() const override; AWS_S3_API void AddQueryStringParameters(Aws::Http::URI& uri) const override; AWS_S3_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** * Helper function to collect parameters (configurable and static hardcoded) required for endpoint computation. */ AWS_S3_API EndpointParameters GetEndpointContextParams() const override; /** *

The bucket name that contains the objects.

*/ inline const Aws::String& GetBucket() const{ return m_bucket; } /** *

The bucket name that contains the objects.

*/ inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; } /** *

The bucket name that contains the objects.

*/ inline void SetBucket(const Aws::String& value) { m_bucketHasBeenSet = true; m_bucket = value; } /** *

The bucket name that contains the objects.

*/ inline void SetBucket(Aws::String&& value) { m_bucketHasBeenSet = true; m_bucket = std::move(value); } /** *

The bucket name that contains the objects.

*/ inline void SetBucket(const char* value) { m_bucketHasBeenSet = true; m_bucket.assign(value); } /** *

The bucket name that contains the objects.

*/ inline ListObjectVersionsRequest& WithBucket(const Aws::String& value) { SetBucket(value); return *this;} /** *

The bucket name that contains the objects.

*/ inline ListObjectVersionsRequest& WithBucket(Aws::String&& value) { SetBucket(std::move(value)); return *this;} /** *

The bucket name that contains the objects.

*/ inline ListObjectVersionsRequest& WithBucket(const char* value) { SetBucket(value); return *this;} /** *

A delimiter is a character that you specify to group keys. All keys that * contain the same string between the prefix and the first occurrence * of the delimiter are grouped under a single result element in * CommonPrefixes. These groups are counted as one result against the * max-keys limitation. These keys are not returned elsewhere in the * response.

*/ inline const Aws::String& GetDelimiter() const{ return m_delimiter; } /** *

A delimiter is a character that you specify to group keys. All keys that * contain the same string between the prefix and the first occurrence * of the delimiter are grouped under a single result element in * CommonPrefixes. These groups are counted as one result against the * max-keys limitation. These keys are not returned elsewhere in the * response.

*/ inline bool DelimiterHasBeenSet() const { return m_delimiterHasBeenSet; } /** *

A delimiter is a character that you specify to group keys. All keys that * contain the same string between the prefix and the first occurrence * of the delimiter are grouped under a single result element in * CommonPrefixes. These groups are counted as one result against the * max-keys limitation. These keys are not returned elsewhere in the * response.

*/ inline void SetDelimiter(const Aws::String& value) { m_delimiterHasBeenSet = true; m_delimiter = value; } /** *

A delimiter is a character that you specify to group keys. All keys that * contain the same string between the prefix and the first occurrence * of the delimiter are grouped under a single result element in * CommonPrefixes. These groups are counted as one result against the * max-keys limitation. These keys are not returned elsewhere in the * response.

*/ inline void SetDelimiter(Aws::String&& value) { m_delimiterHasBeenSet = true; m_delimiter = std::move(value); } /** *

A delimiter is a character that you specify to group keys. All keys that * contain the same string between the prefix and the first occurrence * of the delimiter are grouped under a single result element in * CommonPrefixes. These groups are counted as one result against the * max-keys limitation. These keys are not returned elsewhere in the * response.

*/ inline void SetDelimiter(const char* value) { m_delimiterHasBeenSet = true; m_delimiter.assign(value); } /** *

A delimiter is a character that you specify to group keys. All keys that * contain the same string between the prefix and the first occurrence * of the delimiter are grouped under a single result element in * CommonPrefixes. These groups are counted as one result against the * max-keys limitation. These keys are not returned elsewhere in the * response.

*/ inline ListObjectVersionsRequest& WithDelimiter(const Aws::String& value) { SetDelimiter(value); return *this;} /** *

A delimiter is a character that you specify to group keys. All keys that * contain the same string between the prefix and the first occurrence * of the delimiter are grouped under a single result element in * CommonPrefixes. These groups are counted as one result against the * max-keys limitation. These keys are not returned elsewhere in the * response.

*/ inline ListObjectVersionsRequest& WithDelimiter(Aws::String&& value) { SetDelimiter(std::move(value)); return *this;} /** *

A delimiter is a character that you specify to group keys. All keys that * contain the same string between the prefix and the first occurrence * of the delimiter are grouped under a single result element in * CommonPrefixes. These groups are counted as one result against the * max-keys limitation. These keys are not returned elsewhere in the * response.

*/ inline ListObjectVersionsRequest& WithDelimiter(const char* value) { SetDelimiter(value); return *this;} inline const EncodingType& GetEncodingType() const{ return m_encodingType; } inline bool EncodingTypeHasBeenSet() const { return m_encodingTypeHasBeenSet; } inline void SetEncodingType(const EncodingType& value) { m_encodingTypeHasBeenSet = true; m_encodingType = value; } inline void SetEncodingType(EncodingType&& value) { m_encodingTypeHasBeenSet = true; m_encodingType = std::move(value); } inline ListObjectVersionsRequest& WithEncodingType(const EncodingType& value) { SetEncodingType(value); return *this;} inline ListObjectVersionsRequest& WithEncodingType(EncodingType&& value) { SetEncodingType(std::move(value)); return *this;} /** *

Specifies the key to start with when listing objects in a bucket.

*/ inline const Aws::String& GetKeyMarker() const{ return m_keyMarker; } /** *

Specifies the key to start with when listing objects in a bucket.

*/ inline bool KeyMarkerHasBeenSet() const { return m_keyMarkerHasBeenSet; } /** *

Specifies the key to start with when listing objects in a bucket.

*/ inline void SetKeyMarker(const Aws::String& value) { m_keyMarkerHasBeenSet = true; m_keyMarker = value; } /** *

Specifies the key to start with when listing objects in a bucket.

*/ inline void SetKeyMarker(Aws::String&& value) { m_keyMarkerHasBeenSet = true; m_keyMarker = std::move(value); } /** *

Specifies the key to start with when listing objects in a bucket.

*/ inline void SetKeyMarker(const char* value) { m_keyMarkerHasBeenSet = true; m_keyMarker.assign(value); } /** *

Specifies the key to start with when listing objects in a bucket.

*/ inline ListObjectVersionsRequest& WithKeyMarker(const Aws::String& value) { SetKeyMarker(value); return *this;} /** *

Specifies the key to start with when listing objects in a bucket.

*/ inline ListObjectVersionsRequest& WithKeyMarker(Aws::String&& value) { SetKeyMarker(std::move(value)); return *this;} /** *

Specifies the key to start with when listing objects in a bucket.

*/ inline ListObjectVersionsRequest& WithKeyMarker(const char* value) { SetKeyMarker(value); return *this;} /** *

Sets the maximum number of keys returned in the response. By default, the * action returns up to 1,000 key names. The response might contain fewer keys but * will never contain more. If additional keys satisfy the search criteria, but * were not returned because max-keys was exceeded, the response * contains <isTruncated>true</isTruncated>. To return the * additional keys, see key-marker and * version-id-marker.

*/ inline int GetMaxKeys() const{ return m_maxKeys; } /** *

Sets the maximum number of keys returned in the response. By default, the * action returns up to 1,000 key names. The response might contain fewer keys but * will never contain more. If additional keys satisfy the search criteria, but * were not returned because max-keys was exceeded, the response * contains <isTruncated>true</isTruncated>. To return the * additional keys, see key-marker and * version-id-marker.

*/ inline bool MaxKeysHasBeenSet() const { return m_maxKeysHasBeenSet; } /** *

Sets the maximum number of keys returned in the response. By default, the * action returns up to 1,000 key names. The response might contain fewer keys but * will never contain more. If additional keys satisfy the search criteria, but * were not returned because max-keys was exceeded, the response * contains <isTruncated>true</isTruncated>. To return the * additional keys, see key-marker and * version-id-marker.

*/ inline void SetMaxKeys(int value) { m_maxKeysHasBeenSet = true; m_maxKeys = value; } /** *

Sets the maximum number of keys returned in the response. By default, the * action returns up to 1,000 key names. The response might contain fewer keys but * will never contain more. If additional keys satisfy the search criteria, but * were not returned because max-keys was exceeded, the response * contains <isTruncated>true</isTruncated>. To return the * additional keys, see key-marker and * version-id-marker.

*/ inline ListObjectVersionsRequest& WithMaxKeys(int value) { SetMaxKeys(value); return *this;} /** *

Use this parameter to select only those keys that begin with the specified * prefix. You can use prefixes to separate a bucket into different groupings of * keys. (You can think of using prefix to make groups in the same way * that you'd use a folder in a file system.) You can use prefix with * delimiter to roll up numerous objects into a single result under * CommonPrefixes.

*/ inline const Aws::String& GetPrefix() const{ return m_prefix; } /** *

Use this parameter to select only those keys that begin with the specified * prefix. You can use prefixes to separate a bucket into different groupings of * keys. (You can think of using prefix to make groups in the same way * that you'd use a folder in a file system.) You can use prefix with * delimiter to roll up numerous objects into a single result under * CommonPrefixes.

*/ inline bool PrefixHasBeenSet() const { return m_prefixHasBeenSet; } /** *

Use this parameter to select only those keys that begin with the specified * prefix. You can use prefixes to separate a bucket into different groupings of * keys. (You can think of using prefix to make groups in the same way * that you'd use a folder in a file system.) You can use prefix with * delimiter to roll up numerous objects into a single result under * CommonPrefixes.

*/ inline void SetPrefix(const Aws::String& value) { m_prefixHasBeenSet = true; m_prefix = value; } /** *

Use this parameter to select only those keys that begin with the specified * prefix. You can use prefixes to separate a bucket into different groupings of * keys. (You can think of using prefix to make groups in the same way * that you'd use a folder in a file system.) You can use prefix with * delimiter to roll up numerous objects into a single result under * CommonPrefixes.

*/ inline void SetPrefix(Aws::String&& value) { m_prefixHasBeenSet = true; m_prefix = std::move(value); } /** *

Use this parameter to select only those keys that begin with the specified * prefix. You can use prefixes to separate a bucket into different groupings of * keys. (You can think of using prefix to make groups in the same way * that you'd use a folder in a file system.) You can use prefix with * delimiter to roll up numerous objects into a single result under * CommonPrefixes.

*/ inline void SetPrefix(const char* value) { m_prefixHasBeenSet = true; m_prefix.assign(value); } /** *

Use this parameter to select only those keys that begin with the specified * prefix. You can use prefixes to separate a bucket into different groupings of * keys. (You can think of using prefix to make groups in the same way * that you'd use a folder in a file system.) You can use prefix with * delimiter to roll up numerous objects into a single result under * CommonPrefixes.

*/ inline ListObjectVersionsRequest& WithPrefix(const Aws::String& value) { SetPrefix(value); return *this;} /** *

Use this parameter to select only those keys that begin with the specified * prefix. You can use prefixes to separate a bucket into different groupings of * keys. (You can think of using prefix to make groups in the same way * that you'd use a folder in a file system.) You can use prefix with * delimiter to roll up numerous objects into a single result under * CommonPrefixes.

*/ inline ListObjectVersionsRequest& WithPrefix(Aws::String&& value) { SetPrefix(std::move(value)); return *this;} /** *

Use this parameter to select only those keys that begin with the specified * prefix. You can use prefixes to separate a bucket into different groupings of * keys. (You can think of using prefix to make groups in the same way * that you'd use a folder in a file system.) You can use prefix with * delimiter to roll up numerous objects into a single result under * CommonPrefixes.

*/ inline ListObjectVersionsRequest& WithPrefix(const char* value) { SetPrefix(value); return *this;} /** *

Specifies the object version you want to start listing from.

*/ inline const Aws::String& GetVersionIdMarker() const{ return m_versionIdMarker; } /** *

Specifies the object version you want to start listing from.

*/ inline bool VersionIdMarkerHasBeenSet() const { return m_versionIdMarkerHasBeenSet; } /** *

Specifies the object version you want to start listing from.

*/ inline void SetVersionIdMarker(const Aws::String& value) { m_versionIdMarkerHasBeenSet = true; m_versionIdMarker = value; } /** *

Specifies the object version you want to start listing from.

*/ inline void SetVersionIdMarker(Aws::String&& value) { m_versionIdMarkerHasBeenSet = true; m_versionIdMarker = std::move(value); } /** *

Specifies the object version you want to start listing from.

*/ inline void SetVersionIdMarker(const char* value) { m_versionIdMarkerHasBeenSet = true; m_versionIdMarker.assign(value); } /** *

Specifies the object version you want to start listing from.

*/ inline ListObjectVersionsRequest& WithVersionIdMarker(const Aws::String& value) { SetVersionIdMarker(value); return *this;} /** *

Specifies the object version you want to start listing from.

*/ inline ListObjectVersionsRequest& WithVersionIdMarker(Aws::String&& value) { SetVersionIdMarker(std::move(value)); return *this;} /** *

Specifies the object version you want to start listing from.

*/ inline ListObjectVersionsRequest& WithVersionIdMarker(const char* value) { SetVersionIdMarker(value); return *this;} /** *

The account ID of the expected bucket owner. If the bucket is owned by a * different account, the request fails with the HTTP status code 403 * Forbidden (access denied).

*/ inline const Aws::String& GetExpectedBucketOwner() const{ return m_expectedBucketOwner; } /** *

The account ID of the expected bucket owner. If the bucket is owned by a * different account, the request fails with the HTTP status code 403 * Forbidden (access denied).

*/ inline bool ExpectedBucketOwnerHasBeenSet() const { return m_expectedBucketOwnerHasBeenSet; } /** *

The account ID of the expected bucket owner. If the bucket is owned by a * different account, the request fails with the HTTP status code 403 * Forbidden (access denied).

*/ inline void SetExpectedBucketOwner(const Aws::String& value) { m_expectedBucketOwnerHasBeenSet = true; m_expectedBucketOwner = value; } /** *

The account ID of the expected bucket owner. If the bucket is owned by a * different account, the request fails with the HTTP status code 403 * Forbidden (access denied).

*/ inline void SetExpectedBucketOwner(Aws::String&& value) { m_expectedBucketOwnerHasBeenSet = true; m_expectedBucketOwner = std::move(value); } /** *

The account ID of the expected bucket owner. If the bucket is owned by a * different account, the request fails with the HTTP status code 403 * Forbidden (access denied).

*/ inline void SetExpectedBucketOwner(const char* value) { m_expectedBucketOwnerHasBeenSet = true; m_expectedBucketOwner.assign(value); } /** *

The account ID of the expected bucket owner. If the bucket is owned by a * different account, the request fails with the HTTP status code 403 * Forbidden (access denied).

*/ inline ListObjectVersionsRequest& WithExpectedBucketOwner(const Aws::String& value) { SetExpectedBucketOwner(value); return *this;} /** *

The account ID of the expected bucket owner. If the bucket is owned by a * different account, the request fails with the HTTP status code 403 * Forbidden (access denied).

*/ inline ListObjectVersionsRequest& WithExpectedBucketOwner(Aws::String&& value) { SetExpectedBucketOwner(std::move(value)); return *this;} /** *

The account ID of the expected bucket owner. If the bucket is owned by a * different account, the request fails with the HTTP status code 403 * Forbidden (access denied).

*/ inline ListObjectVersionsRequest& WithExpectedBucketOwner(const char* value) { SetExpectedBucketOwner(value); return *this;} inline const RequestPayer& GetRequestPayer() const{ return m_requestPayer; } inline bool RequestPayerHasBeenSet() const { return m_requestPayerHasBeenSet; } inline void SetRequestPayer(const RequestPayer& value) { m_requestPayerHasBeenSet = true; m_requestPayer = value; } inline void SetRequestPayer(RequestPayer&& value) { m_requestPayerHasBeenSet = true; m_requestPayer = std::move(value); } inline ListObjectVersionsRequest& WithRequestPayer(const RequestPayer& value) { SetRequestPayer(value); return *this;} inline ListObjectVersionsRequest& WithRequestPayer(RequestPayer&& value) { SetRequestPayer(std::move(value)); return *this;} /** *

Specifies the optional fields that you want returned in the response. Fields * that you do not specify are not returned.

*/ inline const Aws::Vector& GetOptionalObjectAttributes() const{ return m_optionalObjectAttributes; } /** *

Specifies the optional fields that you want returned in the response. Fields * that you do not specify are not returned.

*/ inline bool OptionalObjectAttributesHasBeenSet() const { return m_optionalObjectAttributesHasBeenSet; } /** *

Specifies the optional fields that you want returned in the response. Fields * that you do not specify are not returned.

*/ inline void SetOptionalObjectAttributes(const Aws::Vector& value) { m_optionalObjectAttributesHasBeenSet = true; m_optionalObjectAttributes = value; } /** *

Specifies the optional fields that you want returned in the response. Fields * that you do not specify are not returned.

*/ inline void SetOptionalObjectAttributes(Aws::Vector&& value) { m_optionalObjectAttributesHasBeenSet = true; m_optionalObjectAttributes = std::move(value); } /** *

Specifies the optional fields that you want returned in the response. Fields * that you do not specify are not returned.

*/ inline ListObjectVersionsRequest& WithOptionalObjectAttributes(const Aws::Vector& value) { SetOptionalObjectAttributes(value); return *this;} /** *

Specifies the optional fields that you want returned in the response. Fields * that you do not specify are not returned.

*/ inline ListObjectVersionsRequest& WithOptionalObjectAttributes(Aws::Vector&& value) { SetOptionalObjectAttributes(std::move(value)); return *this;} /** *

Specifies the optional fields that you want returned in the response. Fields * that you do not specify are not returned.

*/ inline ListObjectVersionsRequest& AddOptionalObjectAttributes(const OptionalObjectAttributes& value) { m_optionalObjectAttributesHasBeenSet = true; m_optionalObjectAttributes.push_back(value); return *this; } /** *

Specifies the optional fields that you want returned in the response. Fields * that you do not specify are not returned.

*/ inline ListObjectVersionsRequest& AddOptionalObjectAttributes(OptionalObjectAttributes&& value) { m_optionalObjectAttributesHasBeenSet = true; m_optionalObjectAttributes.push_back(std::move(value)); return *this; } inline const Aws::Map& GetCustomizedAccessLogTag() const{ return m_customizedAccessLogTag; } inline bool CustomizedAccessLogTagHasBeenSet() const { return m_customizedAccessLogTagHasBeenSet; } inline void SetCustomizedAccessLogTag(const Aws::Map& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag = value; } inline void SetCustomizedAccessLogTag(Aws::Map&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag = std::move(value); } inline ListObjectVersionsRequest& WithCustomizedAccessLogTag(const Aws::Map& value) { SetCustomizedAccessLogTag(value); return *this;} inline ListObjectVersionsRequest& WithCustomizedAccessLogTag(Aws::Map&& value) { SetCustomizedAccessLogTag(std::move(value)); return *this;} inline ListObjectVersionsRequest& AddCustomizedAccessLogTag(const Aws::String& key, const Aws::String& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, value); return *this; } inline ListObjectVersionsRequest& AddCustomizedAccessLogTag(Aws::String&& key, const Aws::String& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::move(key), value); return *this; } inline ListObjectVersionsRequest& AddCustomizedAccessLogTag(const Aws::String& key, Aws::String&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, std::move(value)); return *this; } inline ListObjectVersionsRequest& AddCustomizedAccessLogTag(Aws::String&& key, Aws::String&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::move(key), std::move(value)); return *this; } inline ListObjectVersionsRequest& AddCustomizedAccessLogTag(const char* key, Aws::String&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, std::move(value)); return *this; } inline ListObjectVersionsRequest& AddCustomizedAccessLogTag(Aws::String&& key, const char* value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::move(key), value); return *this; } inline ListObjectVersionsRequest& AddCustomizedAccessLogTag(const char* key, const char* value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, value); return *this; } private: Aws::String m_bucket; bool m_bucketHasBeenSet = false; Aws::String m_delimiter; bool m_delimiterHasBeenSet = false; EncodingType m_encodingType; bool m_encodingTypeHasBeenSet = false; Aws::String m_keyMarker; bool m_keyMarkerHasBeenSet = false; int m_maxKeys; bool m_maxKeysHasBeenSet = false; Aws::String m_prefix; bool m_prefixHasBeenSet = false; Aws::String m_versionIdMarker; bool m_versionIdMarkerHasBeenSet = false; Aws::String m_expectedBucketOwner; bool m_expectedBucketOwnerHasBeenSet = false; RequestPayer m_requestPayer; bool m_requestPayerHasBeenSet = false; Aws::Vector m_optionalObjectAttributes; bool m_optionalObjectAttributesHasBeenSet = false; Aws::Map m_customizedAccessLogTag; bool m_customizedAccessLogTagHasBeenSet = false; }; } // namespace Model } // namespace S3 } // namespace Aws