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/secretsmanager/SecretsManager_EXPORTS.h>
8 #include <aws/secretsmanager/SecretsManagerRequest.h>
9 #include <aws/core/utils/memory/stl/AWSString.h>
10 #include <aws/core/utils/memory/stl/AWSVector.h>
11 #include <aws/secretsmanager/model/Tag.h>
12 #include <utility>
13 
14 namespace Aws
15 {
16 namespace SecretsManager
17 {
18 namespace Model
19 {
20 
21   /**
22    */
23   class AWS_SECRETSMANAGER_API TagResourceRequest : public SecretsManagerRequest
24   {
25   public:
26     TagResourceRequest();
27 
28     // Service request name is the Operation name which will send this request out,
29     // each operation should has unique request name, so that we can get operation's name from this request.
30     // Note: this is not true for response, multiple operations may have the same response name,
31     // so we can not get operation's name from response.
GetServiceRequestName()32     inline virtual const char* GetServiceRequestName() const override { return "TagResource"; }
33 
34     Aws::String SerializePayload() const override;
35 
36     Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
37 
38 
39     /**
40      * <p>The identifier for the secret that you want to attach tags to. You can
41      * specify either the Amazon Resource Name (ARN) or the friendly name of the
42      * secret.</p> <p>For an ARN, we recommend that you specify a complete ARN rather
43      * than a partial ARN.</p>
44      */
GetSecretId()45     inline const Aws::String& GetSecretId() const{ return m_secretId; }
46 
47     /**
48      * <p>The identifier for the secret that you want to attach tags to. You can
49      * specify either the Amazon Resource Name (ARN) or the friendly name of the
50      * secret.</p> <p>For an ARN, we recommend that you specify a complete ARN rather
51      * than a partial ARN.</p>
52      */
SecretIdHasBeenSet()53     inline bool SecretIdHasBeenSet() const { return m_secretIdHasBeenSet; }
54 
55     /**
56      * <p>The identifier for the secret that you want to attach tags to. You can
57      * specify either the Amazon Resource Name (ARN) or the friendly name of the
58      * secret.</p> <p>For an ARN, we recommend that you specify a complete ARN rather
59      * than a partial ARN.</p>
60      */
SetSecretId(const Aws::String & value)61     inline void SetSecretId(const Aws::String& value) { m_secretIdHasBeenSet = true; m_secretId = value; }
62 
63     /**
64      * <p>The identifier for the secret that you want to attach tags to. You can
65      * specify either the Amazon Resource Name (ARN) or the friendly name of the
66      * secret.</p> <p>For an ARN, we recommend that you specify a complete ARN rather
67      * than a partial ARN.</p>
68      */
SetSecretId(Aws::String && value)69     inline void SetSecretId(Aws::String&& value) { m_secretIdHasBeenSet = true; m_secretId = std::move(value); }
70 
71     /**
72      * <p>The identifier for the secret that you want to attach tags to. You can
73      * specify either the Amazon Resource Name (ARN) or the friendly name of the
74      * secret.</p> <p>For an ARN, we recommend that you specify a complete ARN rather
75      * than a partial ARN.</p>
76      */
SetSecretId(const char * value)77     inline void SetSecretId(const char* value) { m_secretIdHasBeenSet = true; m_secretId.assign(value); }
78 
79     /**
80      * <p>The identifier for the secret that you want to attach tags to. You can
81      * specify either the Amazon Resource Name (ARN) or the friendly name of the
82      * secret.</p> <p>For an ARN, we recommend that you specify a complete ARN rather
83      * than a partial ARN.</p>
84      */
WithSecretId(const Aws::String & value)85     inline TagResourceRequest& WithSecretId(const Aws::String& value) { SetSecretId(value); return *this;}
86 
87     /**
88      * <p>The identifier for the secret that you want to attach tags to. You can
89      * specify either the Amazon Resource Name (ARN) or the friendly name of the
90      * secret.</p> <p>For an ARN, we recommend that you specify a complete ARN rather
91      * than a partial ARN.</p>
92      */
WithSecretId(Aws::String && value)93     inline TagResourceRequest& WithSecretId(Aws::String&& value) { SetSecretId(std::move(value)); return *this;}
94 
95     /**
96      * <p>The identifier for the secret that you want to attach tags to. You can
97      * specify either the Amazon Resource Name (ARN) or the friendly name of the
98      * secret.</p> <p>For an ARN, we recommend that you specify a complete ARN rather
99      * than a partial ARN.</p>
100      */
WithSecretId(const char * value)101     inline TagResourceRequest& WithSecretId(const char* value) { SetSecretId(value); return *this;}
102 
103 
104     /**
105      * <p>The tags to attach to the secret. Each element in the list consists of a
106      * <code>Key</code> and a <code>Value</code>.</p> <p>This parameter to the API
107      * requires a JSON text string argument.</p> <p>For storing multiple values, we
108      * recommend that you use a JSON text string argument and specify key/value pairs.
109      * For more information, see <a
110      * href="https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-parameters.html">Specifying
111      * parameter values for the Amazon Web Services CLI</a> in the Amazon Web Services
112      * CLI User Guide.</p>
113      */
GetTags()114     inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
115 
116     /**
117      * <p>The tags to attach to the secret. Each element in the list consists of a
118      * <code>Key</code> and a <code>Value</code>.</p> <p>This parameter to the API
119      * requires a JSON text string argument.</p> <p>For storing multiple values, we
120      * recommend that you use a JSON text string argument and specify key/value pairs.
121      * For more information, see <a
122      * href="https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-parameters.html">Specifying
123      * parameter values for the Amazon Web Services CLI</a> in the Amazon Web Services
124      * CLI User Guide.</p>
125      */
TagsHasBeenSet()126     inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
127 
128     /**
129      * <p>The tags to attach to the secret. Each element in the list consists of a
130      * <code>Key</code> and a <code>Value</code>.</p> <p>This parameter to the API
131      * requires a JSON text string argument.</p> <p>For storing multiple values, we
132      * recommend that you use a JSON text string argument and specify key/value pairs.
133      * For more information, see <a
134      * href="https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-parameters.html">Specifying
135      * parameter values for the Amazon Web Services CLI</a> in the Amazon Web Services
136      * CLI User Guide.</p>
137      */
SetTags(const Aws::Vector<Tag> & value)138     inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
139 
140     /**
141      * <p>The tags to attach to the secret. Each element in the list consists of a
142      * <code>Key</code> and a <code>Value</code>.</p> <p>This parameter to the API
143      * requires a JSON text string argument.</p> <p>For storing multiple values, we
144      * recommend that you use a JSON text string argument and specify key/value pairs.
145      * For more information, see <a
146      * href="https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-parameters.html">Specifying
147      * parameter values for the Amazon Web Services CLI</a> in the Amazon Web Services
148      * CLI User Guide.</p>
149      */
SetTags(Aws::Vector<Tag> && value)150     inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
151 
152     /**
153      * <p>The tags to attach to the secret. Each element in the list consists of a
154      * <code>Key</code> and a <code>Value</code>.</p> <p>This parameter to the API
155      * requires a JSON text string argument.</p> <p>For storing multiple values, we
156      * recommend that you use a JSON text string argument and specify key/value pairs.
157      * For more information, see <a
158      * href="https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-parameters.html">Specifying
159      * parameter values for the Amazon Web Services CLI</a> in the Amazon Web Services
160      * CLI User Guide.</p>
161      */
WithTags(const Aws::Vector<Tag> & value)162     inline TagResourceRequest& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
163 
164     /**
165      * <p>The tags to attach to the secret. Each element in the list consists of a
166      * <code>Key</code> and a <code>Value</code>.</p> <p>This parameter to the API
167      * requires a JSON text string argument.</p> <p>For storing multiple values, we
168      * recommend that you use a JSON text string argument and specify key/value pairs.
169      * For more information, see <a
170      * href="https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-parameters.html">Specifying
171      * parameter values for the Amazon Web Services CLI</a> in the Amazon Web Services
172      * CLI User Guide.</p>
173      */
WithTags(Aws::Vector<Tag> && value)174     inline TagResourceRequest& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;}
175 
176     /**
177      * <p>The tags to attach to the secret. Each element in the list consists of a
178      * <code>Key</code> and a <code>Value</code>.</p> <p>This parameter to the API
179      * requires a JSON text string argument.</p> <p>For storing multiple values, we
180      * recommend that you use a JSON text string argument and specify key/value pairs.
181      * For more information, see <a
182      * href="https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-parameters.html">Specifying
183      * parameter values for the Amazon Web Services CLI</a> in the Amazon Web Services
184      * CLI User Guide.</p>
185      */
AddTags(const Tag & value)186     inline TagResourceRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
187 
188     /**
189      * <p>The tags to attach to the secret. Each element in the list consists of a
190      * <code>Key</code> and a <code>Value</code>.</p> <p>This parameter to the API
191      * requires a JSON text string argument.</p> <p>For storing multiple values, we
192      * recommend that you use a JSON text string argument and specify key/value pairs.
193      * For more information, see <a
194      * href="https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-parameters.html">Specifying
195      * parameter values for the Amazon Web Services CLI</a> in the Amazon Web Services
196      * CLI User Guide.</p>
197      */
AddTags(Tag && value)198     inline TagResourceRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; }
199 
200   private:
201 
202     Aws::String m_secretId;
203     bool m_secretIdHasBeenSet;
204 
205     Aws::Vector<Tag> m_tags;
206     bool m_tagsHasBeenSet;
207   };
208 
209 } // namespace Model
210 } // namespace SecretsManager
211 } // namespace Aws
212