1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #pragma once 7 #include <aws/docdb/DocDB_EXPORTS.h> 8 #include <aws/core/utils/memory/stl/AWSStreamFwd.h> 9 #include <aws/core/utils/memory/stl/AWSString.h> 10 #include <aws/core/utils/memory/stl/AWSVector.h> 11 #include <utility> 12 13 namespace Aws 14 { 15 namespace Utils 16 { 17 namespace Xml 18 { 19 class XmlNode; 20 } // namespace Xml 21 } // namespace Utils 22 namespace DocDB 23 { 24 namespace Model 25 { 26 27 /** 28 * <p>An event source type, accompanied by one or more event category 29 * names.</p><p><h3>See Also:</h3> <a 30 * href="http://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/EventCategoriesMap">AWS 31 * API Reference</a></p> 32 */ 33 class AWS_DOCDB_API EventCategoriesMap 34 { 35 public: 36 EventCategoriesMap(); 37 EventCategoriesMap(const Aws::Utils::Xml::XmlNode& xmlNode); 38 EventCategoriesMap& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); 39 40 void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; 41 void OutputToStream(Aws::OStream& oStream, const char* location) const; 42 43 44 /** 45 * <p>The source type that the returned categories belong to.</p> 46 */ GetSourceType()47 inline const Aws::String& GetSourceType() const{ return m_sourceType; } 48 49 /** 50 * <p>The source type that the returned categories belong to.</p> 51 */ SourceTypeHasBeenSet()52 inline bool SourceTypeHasBeenSet() const { return m_sourceTypeHasBeenSet; } 53 54 /** 55 * <p>The source type that the returned categories belong to.</p> 56 */ SetSourceType(const Aws::String & value)57 inline void SetSourceType(const Aws::String& value) { m_sourceTypeHasBeenSet = true; m_sourceType = value; } 58 59 /** 60 * <p>The source type that the returned categories belong to.</p> 61 */ SetSourceType(Aws::String && value)62 inline void SetSourceType(Aws::String&& value) { m_sourceTypeHasBeenSet = true; m_sourceType = std::move(value); } 63 64 /** 65 * <p>The source type that the returned categories belong to.</p> 66 */ SetSourceType(const char * value)67 inline void SetSourceType(const char* value) { m_sourceTypeHasBeenSet = true; m_sourceType.assign(value); } 68 69 /** 70 * <p>The source type that the returned categories belong to.</p> 71 */ WithSourceType(const Aws::String & value)72 inline EventCategoriesMap& WithSourceType(const Aws::String& value) { SetSourceType(value); return *this;} 73 74 /** 75 * <p>The source type that the returned categories belong to.</p> 76 */ WithSourceType(Aws::String && value)77 inline EventCategoriesMap& WithSourceType(Aws::String&& value) { SetSourceType(std::move(value)); return *this;} 78 79 /** 80 * <p>The source type that the returned categories belong to.</p> 81 */ WithSourceType(const char * value)82 inline EventCategoriesMap& WithSourceType(const char* value) { SetSourceType(value); return *this;} 83 84 85 /** 86 * <p>The event categories for the specified source type.</p> 87 */ GetEventCategories()88 inline const Aws::Vector<Aws::String>& GetEventCategories() const{ return m_eventCategories; } 89 90 /** 91 * <p>The event categories for the specified source type.</p> 92 */ EventCategoriesHasBeenSet()93 inline bool EventCategoriesHasBeenSet() const { return m_eventCategoriesHasBeenSet; } 94 95 /** 96 * <p>The event categories for the specified source type.</p> 97 */ SetEventCategories(const Aws::Vector<Aws::String> & value)98 inline void SetEventCategories(const Aws::Vector<Aws::String>& value) { m_eventCategoriesHasBeenSet = true; m_eventCategories = value; } 99 100 /** 101 * <p>The event categories for the specified source type.</p> 102 */ SetEventCategories(Aws::Vector<Aws::String> && value)103 inline void SetEventCategories(Aws::Vector<Aws::String>&& value) { m_eventCategoriesHasBeenSet = true; m_eventCategories = std::move(value); } 104 105 /** 106 * <p>The event categories for the specified source type.</p> 107 */ WithEventCategories(const Aws::Vector<Aws::String> & value)108 inline EventCategoriesMap& WithEventCategories(const Aws::Vector<Aws::String>& value) { SetEventCategories(value); return *this;} 109 110 /** 111 * <p>The event categories for the specified source type.</p> 112 */ WithEventCategories(Aws::Vector<Aws::String> && value)113 inline EventCategoriesMap& WithEventCategories(Aws::Vector<Aws::String>&& value) { SetEventCategories(std::move(value)); return *this;} 114 115 /** 116 * <p>The event categories for the specified source type.</p> 117 */ AddEventCategories(const Aws::String & value)118 inline EventCategoriesMap& AddEventCategories(const Aws::String& value) { m_eventCategoriesHasBeenSet = true; m_eventCategories.push_back(value); return *this; } 119 120 /** 121 * <p>The event categories for the specified source type.</p> 122 */ AddEventCategories(Aws::String && value)123 inline EventCategoriesMap& AddEventCategories(Aws::String&& value) { m_eventCategoriesHasBeenSet = true; m_eventCategories.push_back(std::move(value)); return *this; } 124 125 /** 126 * <p>The event categories for the specified source type.</p> 127 */ AddEventCategories(const char * value)128 inline EventCategoriesMap& AddEventCategories(const char* value) { m_eventCategoriesHasBeenSet = true; m_eventCategories.push_back(value); return *this; } 129 130 private: 131 132 Aws::String m_sourceType; 133 bool m_sourceTypeHasBeenSet; 134 135 Aws::Vector<Aws::String> m_eventCategories; 136 bool m_eventCategoriesHasBeenSet; 137 }; 138 139 } // namespace Model 140 } // namespace DocDB 141 } // namespace Aws 142