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/mediaconnect/MediaConnect_EXPORTS.h>
8 #include <aws/mediaconnect/MediaConnectRequest.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 MediaConnect
16 {
17 namespace Model
18 {
19 
20   /**
21    * The tags to add to the resource. A tag is an array of key-value pairs. Tag keys
22    * can have a maximum character length of 128 characters, and tag values can have a
23    * maximum length of 256 characters.<p><h3>See Also:</h3>   <a
24    * href="http://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/TagResourceRequest">AWS
25    * API Reference</a></p>
26    */
27   class AWS_MEDIACONNECT_API TagResourceRequest : public MediaConnectRequest
28   {
29   public:
30     TagResourceRequest();
31 
32     // Service request name is the Operation name which will send this request out,
33     // each operation should has unique request name, so that we can get operation's name from this request.
34     // Note: this is not true for response, multiple operations may have the same response name,
35     // so we can not get operation's name from response.
GetServiceRequestName()36     inline virtual const char* GetServiceRequestName() const override { return "TagResource"; }
37 
38     Aws::String SerializePayload() const override;
39 
40 
41     /**
42      * The Amazon Resource Name (ARN) that identifies the AWS Elemental MediaConnect
43      * resource to which to add tags.
44      */
GetResourceArn()45     inline const Aws::String& GetResourceArn() const{ return m_resourceArn; }
46 
47     /**
48      * The Amazon Resource Name (ARN) that identifies the AWS Elemental MediaConnect
49      * resource to which to add tags.
50      */
ResourceArnHasBeenSet()51     inline bool ResourceArnHasBeenSet() const { return m_resourceArnHasBeenSet; }
52 
53     /**
54      * The Amazon Resource Name (ARN) that identifies the AWS Elemental MediaConnect
55      * resource to which to add tags.
56      */
SetResourceArn(const Aws::String & value)57     inline void SetResourceArn(const Aws::String& value) { m_resourceArnHasBeenSet = true; m_resourceArn = value; }
58 
59     /**
60      * The Amazon Resource Name (ARN) that identifies the AWS Elemental MediaConnect
61      * resource to which to add tags.
62      */
SetResourceArn(Aws::String && value)63     inline void SetResourceArn(Aws::String&& value) { m_resourceArnHasBeenSet = true; m_resourceArn = std::move(value); }
64 
65     /**
66      * The Amazon Resource Name (ARN) that identifies the AWS Elemental MediaConnect
67      * resource to which to add tags.
68      */
SetResourceArn(const char * value)69     inline void SetResourceArn(const char* value) { m_resourceArnHasBeenSet = true; m_resourceArn.assign(value); }
70 
71     /**
72      * The Amazon Resource Name (ARN) that identifies the AWS Elemental MediaConnect
73      * resource to which to add tags.
74      */
WithResourceArn(const Aws::String & value)75     inline TagResourceRequest& WithResourceArn(const Aws::String& value) { SetResourceArn(value); return *this;}
76 
77     /**
78      * The Amazon Resource Name (ARN) that identifies the AWS Elemental MediaConnect
79      * resource to which to add tags.
80      */
WithResourceArn(Aws::String && value)81     inline TagResourceRequest& WithResourceArn(Aws::String&& value) { SetResourceArn(std::move(value)); return *this;}
82 
83     /**
84      * The Amazon Resource Name (ARN) that identifies the AWS Elemental MediaConnect
85      * resource to which to add tags.
86      */
WithResourceArn(const char * value)87     inline TagResourceRequest& WithResourceArn(const char* value) { SetResourceArn(value); return *this;}
88 
89 
90     /**
91      * A map from tag keys to values. Tag keys can have a maximum character length of
92      * 128 characters, and tag values can have a maximum length of 256 characters.
93      */
GetTags()94     inline const Aws::Map<Aws::String, Aws::String>& GetTags() const{ return m_tags; }
95 
96     /**
97      * A map from tag keys to values. Tag keys can have a maximum character length of
98      * 128 characters, and tag values can have a maximum length of 256 characters.
99      */
TagsHasBeenSet()100     inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
101 
102     /**
103      * A map from tag keys to values. Tag keys can have a maximum character length of
104      * 128 characters, and tag values can have a maximum length of 256 characters.
105      */
SetTags(const Aws::Map<Aws::String,Aws::String> & value)106     inline void SetTags(const Aws::Map<Aws::String, Aws::String>& value) { m_tagsHasBeenSet = true; m_tags = value; }
107 
108     /**
109      * A map from tag keys to values. Tag keys can have a maximum character length of
110      * 128 characters, and tag values can have a maximum length of 256 characters.
111      */
SetTags(Aws::Map<Aws::String,Aws::String> && value)112     inline void SetTags(Aws::Map<Aws::String, Aws::String>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
113 
114     /**
115      * A map from tag keys to values. Tag keys can have a maximum character length of
116      * 128 characters, and tag values can have a maximum length of 256 characters.
117      */
WithTags(const Aws::Map<Aws::String,Aws::String> & value)118     inline TagResourceRequest& WithTags(const Aws::Map<Aws::String, Aws::String>& value) { SetTags(value); return *this;}
119 
120     /**
121      * A map from tag keys to values. Tag keys can have a maximum character length of
122      * 128 characters, and tag values can have a maximum length of 256 characters.
123      */
WithTags(Aws::Map<Aws::String,Aws::String> && value)124     inline TagResourceRequest& WithTags(Aws::Map<Aws::String, Aws::String>&& value) { SetTags(std::move(value)); return *this;}
125 
126     /**
127      * A map from tag keys to values. Tag keys can have a maximum character length of
128      * 128 characters, and tag values can have a maximum length of 256 characters.
129      */
AddTags(const Aws::String & key,const Aws::String & value)130     inline TagResourceRequest& AddTags(const Aws::String& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; }
131 
132     /**
133      * A map from tag keys to values. Tag keys can have a maximum character length of
134      * 128 characters, and tag values can have a maximum length of 256 characters.
135      */
AddTags(Aws::String && key,const Aws::String & value)136     inline TagResourceRequest& AddTags(Aws::String&& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; }
137 
138     /**
139      * A map from tag keys to values. Tag keys can have a maximum character length of
140      * 128 characters, and tag values can have a maximum length of 256 characters.
141      */
AddTags(const Aws::String & key,Aws::String && value)142     inline TagResourceRequest& AddTags(const Aws::String& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; }
143 
144     /**
145      * A map from tag keys to values. Tag keys can have a maximum character length of
146      * 128 characters, and tag values can have a maximum length of 256 characters.
147      */
AddTags(Aws::String && key,Aws::String && value)148     inline TagResourceRequest& AddTags(Aws::String&& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), std::move(value)); return *this; }
149 
150     /**
151      * A map from tag keys to values. Tag keys can have a maximum character length of
152      * 128 characters, and tag values can have a maximum length of 256 characters.
153      */
AddTags(const char * key,Aws::String && value)154     inline TagResourceRequest& AddTags(const char* key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; }
155 
156     /**
157      * A map from tag keys to values. Tag keys can have a maximum character length of
158      * 128 characters, and tag values can have a maximum length of 256 characters.
159      */
AddTags(Aws::String && key,const char * value)160     inline TagResourceRequest& AddTags(Aws::String&& key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; }
161 
162     /**
163      * A map from tag keys to values. Tag keys can have a maximum character length of
164      * 128 characters, and tag values can have a maximum length of 256 characters.
165      */
AddTags(const char * key,const char * value)166     inline TagResourceRequest& AddTags(const char* key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; }
167 
168   private:
169 
170     Aws::String m_resourceArn;
171     bool m_resourceArnHasBeenSet;
172 
173     Aws::Map<Aws::String, Aws::String> m_tags;
174     bool m_tagsHasBeenSet;
175   };
176 
177 } // namespace Model
178 } // namespace MediaConnect
179 } // namespace Aws
180