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

A container for specifying rule filters. The filters determine the subset of * objects to which the rule applies. This element is required only if you specify * more than one filter.

For example:

  • If you specify both * a Prefix and a Tag filter, wrap these filters in an * And tag.

  • If you specify a filter based on * multiple tags, wrap the Tag elements in an And * tag.

See Also:

AWS * API Reference

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

An object key name prefix that identifies the subset of objects to which the * rule applies.

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

An object key name prefix that identifies the subset of objects to which the * rule applies.

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

An object key name prefix that identifies the subset of objects to which the * rule applies.

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

An object key name prefix that identifies the subset of objects to which the * rule applies.

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

An object key name prefix that identifies the subset of objects to which the * rule applies.

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

An object key name prefix that identifies the subset of objects to which the * rule applies.

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

An object key name prefix that identifies the subset of objects to which the * rule applies.

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

An object key name prefix that identifies the subset of objects to which the * rule applies.

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

An array of tags containing key and value pairs.

*/ inline const Aws::Vector& GetTags() const{ return m_tags; } /** *

An array of tags containing key and value pairs.

*/ inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } /** *

An array of tags containing key and value pairs.

*/ inline void SetTags(const Aws::Vector& value) { m_tagsHasBeenSet = true; m_tags = value; } /** *

An array of tags containing key and value pairs.

*/ inline void SetTags(Aws::Vector&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } /** *

An array of tags containing key and value pairs.

*/ inline ReplicationRuleAndOperator& WithTags(const Aws::Vector& value) { SetTags(value); return *this;} /** *

An array of tags containing key and value pairs.

*/ inline ReplicationRuleAndOperator& WithTags(Aws::Vector&& value) { SetTags(std::move(value)); return *this;} /** *

An array of tags containing key and value pairs.

*/ inline ReplicationRuleAndOperator& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; } /** *

An array of tags containing key and value pairs.

*/ inline ReplicationRuleAndOperator& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } private: Aws::String m_prefix; bool m_prefixHasBeenSet; Aws::Vector m_tags; bool m_tagsHasBeenSet; }; } // namespace Model } // namespace S3 } // namespace Aws