/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include namespace Aws { namespace Utils { namespace Xml { class XmlNode; } // namespace Xml } // namespace Utils namespace S3 { namespace Model { /** *

Container for all (if there are any) keys between Prefix and the next * occurrence of the string specified by a 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/.

See Also:

* AWS * API Reference

*/ class CommonPrefix { public: AWS_S3_API CommonPrefix(); AWS_S3_API CommonPrefix(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_S3_API CommonPrefix& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_S3_API void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const; /** *

Container for the specified common prefix.

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

Container for the specified common prefix.

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

Container for the specified common prefix.

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

Container for the specified common prefix.

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

Container for the specified common prefix.

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

Container for the specified common prefix.

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

Container for the specified common prefix.

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

Container for the specified common prefix.

*/ inline CommonPrefix& WithPrefix(const char* value) { SetPrefix(value); return *this;} private: Aws::String m_prefix; bool m_prefixHasBeenSet = false; }; } // namespace Model } // namespace S3 } // namespace Aws