/** * 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 namespace Aws { template class AmazonWebServiceResult; namespace Utils { namespace Xml { class XmlDocument; } // namespace Xml } // namespace Utils namespace S3Crt { namespace Model { class ListObjectsResult { public: AWS_S3CRT_API ListObjectsResult(); AWS_S3CRT_API ListObjectsResult(const Aws::AmazonWebServiceResult& result); AWS_S3CRT_API ListObjectsResult& operator=(const Aws::AmazonWebServiceResult& result); /** *

A flag that indicates whether Amazon S3 returned all of the results that * satisfied the search criteria.

*/ inline bool GetIsTruncated() const{ return m_isTruncated; } /** *

A flag that indicates whether Amazon S3 returned all of the results that * satisfied the search criteria.

*/ inline void SetIsTruncated(bool value) { m_isTruncated = value; } /** *

A flag that indicates whether Amazon S3 returned all of the results that * satisfied the search criteria.

*/ inline ListObjectsResult& WithIsTruncated(bool value) { SetIsTruncated(value); return *this;} /** *

Indicates where in the bucket listing begins. Marker is included in the * response if it was sent with the request.

*/ inline const Aws::String& GetMarker() const{ return m_marker; } /** *

Indicates where in the bucket listing begins. Marker is included in the * response if it was sent with the request.

*/ inline void SetMarker(const Aws::String& value) { m_marker = value; } /** *

Indicates where in the bucket listing begins. Marker is included in the * response if it was sent with the request.

*/ inline void SetMarker(Aws::String&& value) { m_marker = std::move(value); } /** *

Indicates where in the bucket listing begins. Marker is included in the * response if it was sent with the request.

*/ inline void SetMarker(const char* value) { m_marker.assign(value); } /** *

Indicates where in the bucket listing begins. Marker is included in the * response if it was sent with the request.

*/ inline ListObjectsResult& WithMarker(const Aws::String& value) { SetMarker(value); return *this;} /** *

Indicates where in the bucket listing begins. Marker is included in the * response if it was sent with the request.

*/ inline ListObjectsResult& WithMarker(Aws::String&& value) { SetMarker(std::move(value)); return *this;} /** *

Indicates where in the bucket listing begins. Marker is included in the * response if it was sent with the request.

*/ inline ListObjectsResult& WithMarker(const char* value) { SetMarker(value); return *this;} /** *

When the response is truncated (the IsTruncated element value in * the response is true), you can use the key name in this field as * the marker parameter in the subsequent request to get the next set * of objects. Amazon S3 lists objects in alphabetical order.

This * element is returned only if you have the delimiter request * parameter specified. If the response does not include the * NextMarker element and it is truncated, you can use the value of * the last Key element in the response as the marker * parameter in the subsequent request to get the next set of object keys.

* */ inline const Aws::String& GetNextMarker() const{ return m_nextMarker; } /** *

When the response is truncated (the IsTruncated element value in * the response is true), you can use the key name in this field as * the marker parameter in the subsequent request to get the next set * of objects. Amazon S3 lists objects in alphabetical order.

This * element is returned only if you have the delimiter request * parameter specified. If the response does not include the * NextMarker element and it is truncated, you can use the value of * the last Key element in the response as the marker * parameter in the subsequent request to get the next set of object keys.

* */ inline void SetNextMarker(const Aws::String& value) { m_nextMarker = value; } /** *

When the response is truncated (the IsTruncated element value in * the response is true), you can use the key name in this field as * the marker parameter in the subsequent request to get the next set * of objects. Amazon S3 lists objects in alphabetical order.

This * element is returned only if you have the delimiter request * parameter specified. If the response does not include the * NextMarker element and it is truncated, you can use the value of * the last Key element in the response as the marker * parameter in the subsequent request to get the next set of object keys.

* */ inline void SetNextMarker(Aws::String&& value) { m_nextMarker = std::move(value); } /** *

When the response is truncated (the IsTruncated element value in * the response is true), you can use the key name in this field as * the marker parameter in the subsequent request to get the next set * of objects. Amazon S3 lists objects in alphabetical order.

This * element is returned only if you have the delimiter request * parameter specified. If the response does not include the * NextMarker element and it is truncated, you can use the value of * the last Key element in the response as the marker * parameter in the subsequent request to get the next set of object keys.

* */ inline void SetNextMarker(const char* value) { m_nextMarker.assign(value); } /** *

When the response is truncated (the IsTruncated element value in * the response is true), you can use the key name in this field as * the marker parameter in the subsequent request to get the next set * of objects. Amazon S3 lists objects in alphabetical order.

This * element is returned only if you have the delimiter request * parameter specified. If the response does not include the * NextMarker element and it is truncated, you can use the value of * the last Key element in the response as the marker * parameter in the subsequent request to get the next set of object keys.

* */ inline ListObjectsResult& WithNextMarker(const Aws::String& value) { SetNextMarker(value); return *this;} /** *

When the response is truncated (the IsTruncated element value in * the response is true), you can use the key name in this field as * the marker parameter in the subsequent request to get the next set * of objects. Amazon S3 lists objects in alphabetical order.

This * element is returned only if you have the delimiter request * parameter specified. If the response does not include the * NextMarker element and it is truncated, you can use the value of * the last Key element in the response as the marker * parameter in the subsequent request to get the next set of object keys.

* */ inline ListObjectsResult& WithNextMarker(Aws::String&& value) { SetNextMarker(std::move(value)); return *this;} /** *

When the response is truncated (the IsTruncated element value in * the response is true), you can use the key name in this field as * the marker parameter in the subsequent request to get the next set * of objects. Amazon S3 lists objects in alphabetical order.

This * element is returned only if you have the delimiter request * parameter specified. If the response does not include the * NextMarker element and it is truncated, you can use the value of * the last Key element in the response as the marker * parameter in the subsequent request to get the next set of object keys.

* */ inline ListObjectsResult& WithNextMarker(const char* value) { SetNextMarker(value); return *this;} /** *

Metadata about each object returned.

*/ inline const Aws::Vector& GetContents() const{ return m_contents; } /** *

Metadata about each object returned.

*/ inline void SetContents(const Aws::Vector& value) { m_contents = value; } /** *

Metadata about each object returned.

*/ inline void SetContents(Aws::Vector&& value) { m_contents = std::move(value); } /** *

Metadata about each object returned.

*/ inline ListObjectsResult& WithContents(const Aws::Vector& value) { SetContents(value); return *this;} /** *

Metadata about each object returned.

*/ inline ListObjectsResult& WithContents(Aws::Vector&& value) { SetContents(std::move(value)); return *this;} /** *

Metadata about each object returned.

*/ inline ListObjectsResult& AddContents(const Object& value) { m_contents.push_back(value); return *this; } /** *

Metadata about each object returned.

*/ inline ListObjectsResult& AddContents(Object&& value) { m_contents.push_back(std::move(value)); return *this; } /** *

The bucket name.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

The bucket name.

*/ inline void SetName(const Aws::String& value) { m_name = value; } /** *

The bucket name.

*/ inline void SetName(Aws::String&& value) { m_name = std::move(value); } /** *

The bucket name.

*/ inline void SetName(const char* value) { m_name.assign(value); } /** *

The bucket name.

*/ inline ListObjectsResult& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

The bucket name.

*/ inline ListObjectsResult& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

The bucket name.

*/ inline ListObjectsResult& WithName(const char* value) { SetName(value); return *this;} /** *

Keys that begin with the indicated prefix.

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

Keys that begin with the indicated prefix.

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

Keys that begin with the indicated prefix.

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

Keys that begin with the indicated prefix.

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

Keys that begin with the indicated prefix.

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

Keys that begin with the indicated prefix.

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

Keys that begin with the indicated prefix.

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

Causes keys that contain the same string between the prefix and the first * occurrence of the delimiter to be rolled up into a single result element in the * CommonPrefixes collection. These rolled-up keys are not returned * elsewhere in the response. Each rolled-up result counts as only one return * against the MaxKeys value.

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

Causes keys that contain the same string between the prefix and the first * occurrence of the delimiter to be rolled up into a single result element in the * CommonPrefixes collection. These rolled-up keys are not returned * elsewhere in the response. Each rolled-up result counts as only one return * against the MaxKeys value.

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

Causes keys that contain the same string between the prefix and the first * occurrence of the delimiter to be rolled up into a single result element in the * CommonPrefixes collection. These rolled-up keys are not returned * elsewhere in the response. Each rolled-up result counts as only one return * against the MaxKeys value.

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

Causes keys that contain the same string between the prefix and the first * occurrence of the delimiter to be rolled up into a single result element in the * CommonPrefixes collection. These rolled-up keys are not returned * elsewhere in the response. Each rolled-up result counts as only one return * against the MaxKeys value.

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

Causes keys that contain the same string between the prefix and the first * occurrence of the delimiter to be rolled up into a single result element in the * CommonPrefixes collection. These rolled-up keys are not returned * elsewhere in the response. Each rolled-up result counts as only one return * against the MaxKeys value.

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

Causes keys that contain the same string between the prefix and the first * occurrence of the delimiter to be rolled up into a single result element in the * CommonPrefixes collection. These rolled-up keys are not returned * elsewhere in the response. Each rolled-up result counts as only one return * against the MaxKeys value.

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

Causes keys that contain the same string between the prefix and the first * occurrence of the delimiter to be rolled up into a single result element in the * CommonPrefixes collection. These rolled-up keys are not returned * elsewhere in the response. Each rolled-up result counts as only one return * against the MaxKeys value.

*/ inline ListObjectsResult& WithDelimiter(const char* value) { SetDelimiter(value); return *this;} /** *

The maximum number of keys returned in the response body.

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

The maximum number of keys returned in the response body.

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

The maximum number of keys returned in the response body.

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

All of the keys (up to 1,000) rolled up in a common prefix count as a single * return when calculating the number of returns.

A response can contain * CommonPrefixes only if you specify a delimiter.

* CommonPrefixes contains all (if there are any) keys between * Prefix and the next occurrence of the string specified by the * delimiter.

CommonPrefixes lists keys that act like * subdirectories in the directory specified by Prefix.

For * example, if the prefix is notes/ and the delimiter is a slash * (/), as in notes/summer/july, the common prefix is * notes/summer/. All of the keys that roll up into a common prefix * count as a single return when calculating the number of returns.

*/ inline const Aws::Vector& GetCommonPrefixes() const{ return m_commonPrefixes; } /** *

All of the keys (up to 1,000) rolled up in a common prefix count as a single * return when calculating the number of returns.

A response can contain * CommonPrefixes only if you specify a delimiter.

* CommonPrefixes contains all (if there are any) keys between * Prefix and the next occurrence of the string specified by the * delimiter.

CommonPrefixes lists keys that act like * subdirectories in the directory specified by Prefix.

For * example, if the prefix is notes/ and the delimiter is a slash * (/), as in notes/summer/july, the common prefix is * notes/summer/. All of the keys that roll up into a common prefix * count as a single return when calculating the number of returns.

*/ inline void SetCommonPrefixes(const Aws::Vector& value) { m_commonPrefixes = value; } /** *

All of the keys (up to 1,000) rolled up in a common prefix count as a single * return when calculating the number of returns.

A response can contain * CommonPrefixes only if you specify a delimiter.

* CommonPrefixes contains all (if there are any) keys between * Prefix and the next occurrence of the string specified by the * delimiter.

CommonPrefixes lists keys that act like * subdirectories in the directory specified by Prefix.

For * example, if the prefix is notes/ and the delimiter is a slash * (/), as in notes/summer/july, the common prefix is * notes/summer/. All of the keys that roll up into a common prefix * count as a single return when calculating the number of returns.

*/ inline void SetCommonPrefixes(Aws::Vector&& value) { m_commonPrefixes = std::move(value); } /** *

All of the keys (up to 1,000) rolled up in a common prefix count as a single * return when calculating the number of returns.

A response can contain * CommonPrefixes only if you specify a delimiter.

* CommonPrefixes contains all (if there are any) keys between * Prefix and the next occurrence of the string specified by the * delimiter.

CommonPrefixes lists keys that act like * subdirectories in the directory specified by Prefix.

For * example, if the prefix is notes/ and the delimiter is a slash * (/), as in notes/summer/july, the common prefix is * notes/summer/. All of the keys that roll up into a common prefix * count as a single return when calculating the number of returns.

*/ inline ListObjectsResult& WithCommonPrefixes(const Aws::Vector& value) { SetCommonPrefixes(value); return *this;} /** *

All of the keys (up to 1,000) rolled up in a common prefix count as a single * return when calculating the number of returns.

A response can contain * CommonPrefixes only if you specify a delimiter.

* CommonPrefixes contains all (if there are any) keys between * Prefix and the next occurrence of the string specified by the * delimiter.

CommonPrefixes lists keys that act like * subdirectories in the directory specified by Prefix.

For * example, if the prefix is notes/ and the delimiter is a slash * (/), as in notes/summer/july, the common prefix is * notes/summer/. All of the keys that roll up into a common prefix * count as a single return when calculating the number of returns.

*/ inline ListObjectsResult& WithCommonPrefixes(Aws::Vector&& value) { SetCommonPrefixes(std::move(value)); return *this;} /** *

All of the keys (up to 1,000) rolled up in a common prefix count as a single * return when calculating the number of returns.

A response can contain * CommonPrefixes only if you specify a delimiter.

* CommonPrefixes contains all (if there are any) keys between * Prefix and the next occurrence of the string specified by the * delimiter.

CommonPrefixes lists keys that act like * subdirectories in the directory specified by Prefix.

For * example, if the prefix is notes/ and the delimiter is a slash * (/), as in notes/summer/july, the common prefix is * notes/summer/. All of the keys that roll up into a common prefix * count as a single return when calculating the number of returns.

*/ inline ListObjectsResult& AddCommonPrefixes(const CommonPrefix& value) { m_commonPrefixes.push_back(value); return *this; } /** *

All of the keys (up to 1,000) rolled up in a common prefix count as a single * return when calculating the number of returns.

A response can contain * CommonPrefixes only if you specify a delimiter.

* CommonPrefixes contains all (if there are any) keys between * Prefix and the next occurrence of the string specified by the * delimiter.

CommonPrefixes lists keys that act like * subdirectories in the directory specified by Prefix.

For * example, if the prefix is notes/ and the delimiter is a slash * (/), as in notes/summer/july, the common prefix is * notes/summer/. All of the keys that roll up into a common prefix * count as a single return when calculating the number of returns.

*/ inline ListObjectsResult& AddCommonPrefixes(CommonPrefix&& value) { m_commonPrefixes.push_back(std::move(value)); return *this; } /** *

Encoding type used by Amazon S3 to encode object keys in the response.

*/ inline const EncodingType& GetEncodingType() const{ return m_encodingType; } /** *

Encoding type used by Amazon S3 to encode object keys in the response.

*/ inline void SetEncodingType(const EncodingType& value) { m_encodingType = value; } /** *

Encoding type used by Amazon S3 to encode object keys in the response.

*/ inline void SetEncodingType(EncodingType&& value) { m_encodingType = std::move(value); } /** *

Encoding type used by Amazon S3 to encode object keys in the response.

*/ inline ListObjectsResult& WithEncodingType(const EncodingType& value) { SetEncodingType(value); return *this;} /** *

Encoding type used by Amazon S3 to encode object keys in the response.

*/ inline ListObjectsResult& WithEncodingType(EncodingType&& value) { SetEncodingType(std::move(value)); return *this;} inline const RequestCharged& GetRequestCharged() const{ return m_requestCharged; } inline void SetRequestCharged(const RequestCharged& value) { m_requestCharged = value; } inline void SetRequestCharged(RequestCharged&& value) { m_requestCharged = std::move(value); } inline ListObjectsResult& WithRequestCharged(const RequestCharged& value) { SetRequestCharged(value); return *this;} inline ListObjectsResult& WithRequestCharged(RequestCharged&& value) { SetRequestCharged(std::move(value)); return *this;} inline const Aws::String& GetRequestId() const{ return m_requestId; } inline void SetRequestId(const Aws::String& value) { m_requestId = value; } inline void SetRequestId(Aws::String&& value) { m_requestId = std::move(value); } inline void SetRequestId(const char* value) { m_requestId.assign(value); } inline ListObjectsResult& WithRequestId(const Aws::String& value) { SetRequestId(value); return *this;} inline ListObjectsResult& WithRequestId(Aws::String&& value) { SetRequestId(std::move(value)); return *this;} inline ListObjectsResult& WithRequestId(const char* value) { SetRequestId(value); return *this;} private: bool m_isTruncated; Aws::String m_marker; Aws::String m_nextMarker; Aws::Vector m_contents; Aws::String m_name; Aws::String m_prefix; Aws::String m_delimiter; int m_maxKeys; Aws::Vector m_commonPrefixes; EncodingType m_encodingType; RequestCharged m_requestCharged; Aws::String m_requestId; }; } // namespace Model } // namespace S3Crt } // namespace Aws