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/codestar-notifications/CodeStarNotifications_EXPORTS.h> 8 #include <aws/codestar-notifications/CodeStarNotificationsRequest.h> 9 #include <aws/core/utils/memory/stl/AWSString.h> 10 #include <aws/core/utils/memory/stl/AWSMap.h> 11 #include <utility> 12 13 namespace Aws 14 { 15 namespace CodeStarNotifications 16 { 17 namespace Model 18 { 19 20 /** 21 */ 22 class AWS_CODESTARNOTIFICATIONS_API TagResourceRequest : public CodeStarNotificationsRequest 23 { 24 public: 25 TagResourceRequest(); 26 27 // Service request name is the Operation name which will send this request out, 28 // each operation should has unique request name, so that we can get operation's name from this request. 29 // Note: this is not true for response, multiple operations may have the same response name, 30 // so we can not get operation's name from response. GetServiceRequestName()31 inline virtual const char* GetServiceRequestName() const override { return "TagResource"; } 32 33 Aws::String SerializePayload() const override; 34 35 36 /** 37 * <p>The Amazon Resource Name (ARN) of the notification rule to tag.</p> 38 */ GetArn()39 inline const Aws::String& GetArn() const{ return m_arn; } 40 41 /** 42 * <p>The Amazon Resource Name (ARN) of the notification rule to tag.</p> 43 */ ArnHasBeenSet()44 inline bool ArnHasBeenSet() const { return m_arnHasBeenSet; } 45 46 /** 47 * <p>The Amazon Resource Name (ARN) of the notification rule to tag.</p> 48 */ SetArn(const Aws::String & value)49 inline void SetArn(const Aws::String& value) { m_arnHasBeenSet = true; m_arn = value; } 50 51 /** 52 * <p>The Amazon Resource Name (ARN) of the notification rule to tag.</p> 53 */ SetArn(Aws::String && value)54 inline void SetArn(Aws::String&& value) { m_arnHasBeenSet = true; m_arn = std::move(value); } 55 56 /** 57 * <p>The Amazon Resource Name (ARN) of the notification rule to tag.</p> 58 */ SetArn(const char * value)59 inline void SetArn(const char* value) { m_arnHasBeenSet = true; m_arn.assign(value); } 60 61 /** 62 * <p>The Amazon Resource Name (ARN) of the notification rule to tag.</p> 63 */ WithArn(const Aws::String & value)64 inline TagResourceRequest& WithArn(const Aws::String& value) { SetArn(value); return *this;} 65 66 /** 67 * <p>The Amazon Resource Name (ARN) of the notification rule to tag.</p> 68 */ WithArn(Aws::String && value)69 inline TagResourceRequest& WithArn(Aws::String&& value) { SetArn(std::move(value)); return *this;} 70 71 /** 72 * <p>The Amazon Resource Name (ARN) of the notification rule to tag.</p> 73 */ WithArn(const char * value)74 inline TagResourceRequest& WithArn(const char* value) { SetArn(value); return *this;} 75 76 77 /** 78 * <p>The list of tags to associate with the resource. Tag key names cannot start 79 * with "aws".</p> 80 */ GetTags()81 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const{ return m_tags; } 82 83 /** 84 * <p>The list of tags to associate with the resource. Tag key names cannot start 85 * with "aws".</p> 86 */ TagsHasBeenSet()87 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } 88 89 /** 90 * <p>The list of tags to associate with the resource. Tag key names cannot start 91 * with "aws".</p> 92 */ SetTags(const Aws::Map<Aws::String,Aws::String> & value)93 inline void SetTags(const Aws::Map<Aws::String, Aws::String>& value) { m_tagsHasBeenSet = true; m_tags = value; } 94 95 /** 96 * <p>The list of tags to associate with the resource. Tag key names cannot start 97 * with "aws".</p> 98 */ SetTags(Aws::Map<Aws::String,Aws::String> && value)99 inline void SetTags(Aws::Map<Aws::String, Aws::String>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } 100 101 /** 102 * <p>The list of tags to associate with the resource. Tag key names cannot start 103 * with "aws".</p> 104 */ WithTags(const Aws::Map<Aws::String,Aws::String> & value)105 inline TagResourceRequest& WithTags(const Aws::Map<Aws::String, Aws::String>& value) { SetTags(value); return *this;} 106 107 /** 108 * <p>The list of tags to associate with the resource. Tag key names cannot start 109 * with "aws".</p> 110 */ WithTags(Aws::Map<Aws::String,Aws::String> && value)111 inline TagResourceRequest& WithTags(Aws::Map<Aws::String, Aws::String>&& value) { SetTags(std::move(value)); return *this;} 112 113 /** 114 * <p>The list of tags to associate with the resource. Tag key names cannot start 115 * with "aws".</p> 116 */ AddTags(const Aws::String & key,const Aws::String & value)117 inline TagResourceRequest& AddTags(const Aws::String& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; } 118 119 /** 120 * <p>The list of tags to associate with the resource. Tag key names cannot start 121 * with "aws".</p> 122 */ AddTags(Aws::String && key,const Aws::String & value)123 inline TagResourceRequest& AddTags(Aws::String&& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; } 124 125 /** 126 * <p>The list of tags to associate with the resource. Tag key names cannot start 127 * with "aws".</p> 128 */ AddTags(const Aws::String & key,Aws::String && value)129 inline TagResourceRequest& AddTags(const Aws::String& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; } 130 131 /** 132 * <p>The list of tags to associate with the resource. Tag key names cannot start 133 * with "aws".</p> 134 */ AddTags(Aws::String && key,Aws::String && value)135 inline TagResourceRequest& AddTags(Aws::String&& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), std::move(value)); return *this; } 136 137 /** 138 * <p>The list of tags to associate with the resource. Tag key names cannot start 139 * with "aws".</p> 140 */ AddTags(const char * key,Aws::String && value)141 inline TagResourceRequest& AddTags(const char* key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; } 142 143 /** 144 * <p>The list of tags to associate with the resource. Tag key names cannot start 145 * with "aws".</p> 146 */ AddTags(Aws::String && key,const char * value)147 inline TagResourceRequest& AddTags(Aws::String&& key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; } 148 149 /** 150 * <p>The list of tags to associate with the resource. Tag key names cannot start 151 * with "aws".</p> 152 */ AddTags(const char * key,const char * value)153 inline TagResourceRequest& AddTags(const char* key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; } 154 155 private: 156 157 Aws::String m_arn; 158 bool m_arnHasBeenSet; 159 160 Aws::Map<Aws::String, Aws::String> m_tags; 161 bool m_tagsHasBeenSet; 162 }; 163 164 } // namespace Model 165 } // namespace CodeStarNotifications 166 } // namespace Aws 167