AWS SDK for C++  0.14.3
AWS SDK for C++
Command.h
Go to the documentation of this file.
1 /*
2 * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15 #pragma once
16 #include <aws/ssm/SSM_EXPORTS.h>
23 
24 namespace Aws
25 {
26 namespace Utils
27 {
28 namespace Json
29 {
30  class JsonValue;
31 } // namespace Json
32 } // namespace Utils
33 namespace SSM
34 {
35 namespace Model
36 {
37 
42  {
43  public:
44  Command();
45  Command(const Aws::Utils::Json::JsonValue& jsonValue);
46  Command& operator=(const Aws::Utils::Json::JsonValue& jsonValue);
47  Aws::Utils::Json::JsonValue Jsonize() const;
48 
52  inline const Aws::String& GetCommandId() const{ return m_commandId; }
53 
57  inline void SetCommandId(const Aws::String& value) { m_commandIdHasBeenSet = true; m_commandId = value; }
58 
62  inline void SetCommandId(Aws::String&& value) { m_commandIdHasBeenSet = true; m_commandId = value; }
63 
67  inline void SetCommandId(const char* value) { m_commandIdHasBeenSet = true; m_commandId.assign(value); }
68 
72  inline Command& WithCommandId(const Aws::String& value) { SetCommandId(value); return *this;}
73 
77  inline Command& WithCommandId(Aws::String&& value) { SetCommandId(value); return *this;}
78 
82  inline Command& WithCommandId(const char* value) { SetCommandId(value); return *this;}
83 
87  inline const Aws::String& GetDocumentName() const{ return m_documentName; }
88 
92  inline void SetDocumentName(const Aws::String& value) { m_documentNameHasBeenSet = true; m_documentName = value; }
93 
97  inline void SetDocumentName(Aws::String&& value) { m_documentNameHasBeenSet = true; m_documentName = value; }
98 
102  inline void SetDocumentName(const char* value) { m_documentNameHasBeenSet = true; m_documentName.assign(value); }
103 
107  inline Command& WithDocumentName(const Aws::String& value) { SetDocumentName(value); return *this;}
108 
112  inline Command& WithDocumentName(Aws::String&& value) { SetDocumentName(value); return *this;}
113 
117  inline Command& WithDocumentName(const char* value) { SetDocumentName(value); return *this;}
118 
123  inline const Aws::String& GetComment() const{ return m_comment; }
124 
129  inline void SetComment(const Aws::String& value) { m_commentHasBeenSet = true; m_comment = value; }
130 
135  inline void SetComment(Aws::String&& value) { m_commentHasBeenSet = true; m_comment = value; }
136 
141  inline void SetComment(const char* value) { m_commentHasBeenSet = true; m_comment.assign(value); }
142 
147  inline Command& WithComment(const Aws::String& value) { SetComment(value); return *this;}
148 
153  inline Command& WithComment(Aws::String&& value) { SetComment(value); return *this;}
154 
159  inline Command& WithComment(const char* value) { SetComment(value); return *this;}
160 
166  inline const Aws::Utils::DateTime& GetExpiresAfter() const{ return m_expiresAfter; }
167 
173  inline void SetExpiresAfter(const Aws::Utils::DateTime& value) { m_expiresAfterHasBeenSet = true; m_expiresAfter = value; }
174 
180  inline void SetExpiresAfter(Aws::Utils::DateTime&& value) { m_expiresAfterHasBeenSet = true; m_expiresAfter = value; }
181 
187  inline Command& WithExpiresAfter(const Aws::Utils::DateTime& value) { SetExpiresAfter(value); return *this;}
188 
194  inline Command& WithExpiresAfter(Aws::Utils::DateTime&& value) { SetExpiresAfter(value); return *this;}
195 
200  inline const Aws::Map<Aws::String, Aws::Vector<Aws::String>>& GetParameters() const{ return m_parameters; }
201 
206  inline void SetParameters(const Aws::Map<Aws::String, Aws::Vector<Aws::String>>& value) { m_parametersHasBeenSet = true; m_parameters = value; }
207 
212  inline void SetParameters(Aws::Map<Aws::String, Aws::Vector<Aws::String>>&& value) { m_parametersHasBeenSet = true; m_parameters = value; }
213 
218  inline Command& WithParameters(const Aws::Map<Aws::String, Aws::Vector<Aws::String>>& value) { SetParameters(value); return *this;}
219 
224  inline Command& WithParameters(Aws::Map<Aws::String, Aws::Vector<Aws::String>>&& value) { SetParameters(value); return *this;}
225 
230  inline Command& AddParameters(const Aws::String& key, const Aws::Vector<Aws::String>& value) { m_parametersHasBeenSet = true; m_parameters[key] = value; return *this; }
231 
236  inline Command& AddParameters(Aws::String&& key, const Aws::Vector<Aws::String>& value) { m_parametersHasBeenSet = true; m_parameters[key] = value; return *this; }
237 
242  inline Command& AddParameters(const Aws::String& key, Aws::Vector<Aws::String>&& value) { m_parametersHasBeenSet = true; m_parameters[key] = value; return *this; }
243 
248  inline Command& AddParameters(Aws::String&& key, Aws::Vector<Aws::String>&& value) { m_parametersHasBeenSet = true; m_parameters[key] = value; return *this; }
249 
254  inline Command& AddParameters(const char* key, Aws::Vector<Aws::String>&& value) { m_parametersHasBeenSet = true; m_parameters[key] = value; return *this; }
255 
260  inline Command& AddParameters(const char* key, const Aws::Vector<Aws::String>& value) { m_parametersHasBeenSet = true; m_parameters[key] = value; return *this; }
261 
265  inline const Aws::Vector<Aws::String>& GetInstanceIds() const{ return m_instanceIds; }
266 
270  inline void SetInstanceIds(const Aws::Vector<Aws::String>& value) { m_instanceIdsHasBeenSet = true; m_instanceIds = value; }
271 
275  inline void SetInstanceIds(Aws::Vector<Aws::String>&& value) { m_instanceIdsHasBeenSet = true; m_instanceIds = value; }
276 
280  inline Command& WithInstanceIds(const Aws::Vector<Aws::String>& value) { SetInstanceIds(value); return *this;}
281 
285  inline Command& WithInstanceIds(Aws::Vector<Aws::String>&& value) { SetInstanceIds(value); return *this;}
286 
290  inline Command& AddInstanceIds(const Aws::String& value) { m_instanceIdsHasBeenSet = true; m_instanceIds.push_back(value); return *this; }
291 
295  inline Command& AddInstanceIds(Aws::String&& value) { m_instanceIdsHasBeenSet = true; m_instanceIds.push_back(value); return *this; }
296 
300  inline Command& AddInstanceIds(const char* value) { m_instanceIdsHasBeenSet = true; m_instanceIds.push_back(value); return *this; }
301 
305  inline const Aws::Utils::DateTime& GetRequestedDateTime() const{ return m_requestedDateTime; }
306 
310  inline void SetRequestedDateTime(const Aws::Utils::DateTime& value) { m_requestedDateTimeHasBeenSet = true; m_requestedDateTime = value; }
311 
315  inline void SetRequestedDateTime(Aws::Utils::DateTime&& value) { m_requestedDateTimeHasBeenSet = true; m_requestedDateTime = value; }
316 
320  inline Command& WithRequestedDateTime(const Aws::Utils::DateTime& value) { SetRequestedDateTime(value); return *this;}
321 
325  inline Command& WithRequestedDateTime(Aws::Utils::DateTime&& value) { SetRequestedDateTime(value); return *this;}
326 
330  inline const CommandStatus& GetStatus() const{ return m_status; }
331 
335  inline void SetStatus(const CommandStatus& value) { m_statusHasBeenSet = true; m_status = value; }
336 
340  inline void SetStatus(CommandStatus&& value) { m_statusHasBeenSet = true; m_status = value; }
341 
345  inline Command& WithStatus(const CommandStatus& value) { SetStatus(value); return *this;}
346 
350  inline Command& WithStatus(CommandStatus&& value) { SetStatus(value); return *this;}
351 
356  inline const Aws::String& GetOutputS3BucketName() const{ return m_outputS3BucketName; }
357 
362  inline void SetOutputS3BucketName(const Aws::String& value) { m_outputS3BucketNameHasBeenSet = true; m_outputS3BucketName = value; }
363 
368  inline void SetOutputS3BucketName(Aws::String&& value) { m_outputS3BucketNameHasBeenSet = true; m_outputS3BucketName = value; }
369 
374  inline void SetOutputS3BucketName(const char* value) { m_outputS3BucketNameHasBeenSet = true; m_outputS3BucketName.assign(value); }
375 
380  inline Command& WithOutputS3BucketName(const Aws::String& value) { SetOutputS3BucketName(value); return *this;}
381 
386  inline Command& WithOutputS3BucketName(Aws::String&& value) { SetOutputS3BucketName(value); return *this;}
387 
392  inline Command& WithOutputS3BucketName(const char* value) { SetOutputS3BucketName(value); return *this;}
393 
398  inline const Aws::String& GetOutputS3KeyPrefix() const{ return m_outputS3KeyPrefix; }
399 
404  inline void SetOutputS3KeyPrefix(const Aws::String& value) { m_outputS3KeyPrefixHasBeenSet = true; m_outputS3KeyPrefix = value; }
405 
410  inline void SetOutputS3KeyPrefix(Aws::String&& value) { m_outputS3KeyPrefixHasBeenSet = true; m_outputS3KeyPrefix = value; }
411 
416  inline void SetOutputS3KeyPrefix(const char* value) { m_outputS3KeyPrefixHasBeenSet = true; m_outputS3KeyPrefix.assign(value); }
417 
422  inline Command& WithOutputS3KeyPrefix(const Aws::String& value) { SetOutputS3KeyPrefix(value); return *this;}
423 
428  inline Command& WithOutputS3KeyPrefix(Aws::String&& value) { SetOutputS3KeyPrefix(value); return *this;}
429 
434  inline Command& WithOutputS3KeyPrefix(const char* value) { SetOutputS3KeyPrefix(value); return *this;}
435 
440  inline const Aws::String& GetServiceRole() const{ return m_serviceRole; }
441 
446  inline void SetServiceRole(const Aws::String& value) { m_serviceRoleHasBeenSet = true; m_serviceRole = value; }
447 
452  inline void SetServiceRole(Aws::String&& value) { m_serviceRoleHasBeenSet = true; m_serviceRole = value; }
453 
458  inline void SetServiceRole(const char* value) { m_serviceRoleHasBeenSet = true; m_serviceRole.assign(value); }
459 
464  inline Command& WithServiceRole(const Aws::String& value) { SetServiceRole(value); return *this;}
465 
470  inline Command& WithServiceRole(Aws::String&& value) { SetServiceRole(value); return *this;}
471 
476  inline Command& WithServiceRole(const char* value) { SetServiceRole(value); return *this;}
477 
481  inline const NotificationConfig& GetNotificationConfig() const{ return m_notificationConfig; }
482 
486  inline void SetNotificationConfig(const NotificationConfig& value) { m_notificationConfigHasBeenSet = true; m_notificationConfig = value; }
487 
491  inline void SetNotificationConfig(NotificationConfig&& value) { m_notificationConfigHasBeenSet = true; m_notificationConfig = value; }
492 
496  inline Command& WithNotificationConfig(const NotificationConfig& value) { SetNotificationConfig(value); return *this;}
497 
501  inline Command& WithNotificationConfig(NotificationConfig&& value) { SetNotificationConfig(value); return *this;}
502 
503  private:
504  Aws::String m_commandId;
505  bool m_commandIdHasBeenSet;
506  Aws::String m_documentName;
507  bool m_documentNameHasBeenSet;
508  Aws::String m_comment;
509  bool m_commentHasBeenSet;
510  Aws::Utils::DateTime m_expiresAfter;
511  bool m_expiresAfterHasBeenSet;
513  bool m_parametersHasBeenSet;
514  Aws::Vector<Aws::String> m_instanceIds;
515  bool m_instanceIdsHasBeenSet;
516  Aws::Utils::DateTime m_requestedDateTime;
517  bool m_requestedDateTimeHasBeenSet;
518  CommandStatus m_status;
519  bool m_statusHasBeenSet;
520  Aws::String m_outputS3BucketName;
521  bool m_outputS3BucketNameHasBeenSet;
522  Aws::String m_outputS3KeyPrefix;
523  bool m_outputS3KeyPrefixHasBeenSet;
524  Aws::String m_serviceRole;
525  bool m_serviceRoleHasBeenSet;
526  NotificationConfig m_notificationConfig;
527  bool m_notificationConfigHasBeenSet;
528  };
529 
530 } // namespace Model
531 } // namespace SSM
532 } // namespace Aws
Command & AddParameters(const char *key, Aws::Vector< Aws::String > &&value)
Definition: Command.h:254
void SetInstanceIds(Aws::Vector< Aws::String > &&value)
Definition: Command.h:275
Command & WithDocumentName(Aws::String &&value)
Definition: Command.h:112
const Aws::Utils::DateTime & GetRequestedDateTime() const
Definition: Command.h:305
void SetRequestedDateTime(Aws::Utils::DateTime &&value)
Definition: Command.h:315
Command & AddParameters(Aws::String &&key, Aws::Vector< Aws::String > &&value)
Definition: Command.h:248
void SetDocumentName(const Aws::String &value)
Definition: Command.h:92
Command & WithParameters(const Aws::Map< Aws::String, Aws::Vector< Aws::String >> &value)
Definition: Command.h:218
Command & AddParameters(Aws::String &&key, const Aws::Vector< Aws::String > &value)
Definition: Command.h:236
void SetInstanceIds(const Aws::Vector< Aws::String > &value)
Definition: Command.h:270
Command & WithServiceRole(Aws::String &&value)
Definition: Command.h:470
void SetOutputS3KeyPrefix(Aws::String &&value)
Definition: Command.h:410
Command & WithOutputS3KeyPrefix(const char *value)
Definition: Command.h:434
void SetOutputS3KeyPrefix(const Aws::String &value)
Definition: Command.h:404
Command & AddInstanceIds(const Aws::String &value)
Definition: Command.h:290
Command & WithNotificationConfig(NotificationConfig &&value)
Definition: Command.h:501
void SetParameters(Aws::Map< Aws::String, Aws::Vector< Aws::String >> &&value)
Definition: Command.h:212
void SetDocumentName(const char *value)
Definition: Command.h:102
void SetExpiresAfter(const Aws::Utils::DateTime &value)
Definition: Command.h:173
Command & WithInstanceIds(const Aws::Vector< Aws::String > &value)
Definition: Command.h:280
void SetNotificationConfig(const NotificationConfig &value)
Definition: Command.h:486
const Aws::String & GetOutputS3BucketName() const
Definition: Command.h:356
void SetComment(const char *value)
Definition: Command.h:141
Command & WithOutputS3KeyPrefix(const Aws::String &value)
Definition: Command.h:422
Command & AddParameters(const Aws::String &key, const Aws::Vector< Aws::String > &value)
Definition: Command.h:230
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:27
Command & WithOutputS3BucketName(const Aws::String &value)
Definition: Command.h:380
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
Definition: AWSMap.h:28
Command & WithDocumentName(const Aws::String &value)
Definition: Command.h:107
void SetCommandId(const Aws::String &value)
Definition: Command.h:57
Command & WithComment(Aws::String &&value)
Definition: Command.h:153
const Aws::String & GetComment() const
Definition: Command.h:123
void SetServiceRole(const char *value)
Definition: Command.h:458
Command & WithStatus(CommandStatus &&value)
Definition: Command.h:350
void SetCommandId(Aws::String &&value)
Definition: Command.h:62
void SetComment(const Aws::String &value)
Definition: Command.h:129
Command & WithNotificationConfig(const NotificationConfig &value)
Definition: Command.h:496
Command & WithComment(const Aws::String &value)
Definition: Command.h:147
Command & WithParameters(Aws::Map< Aws::String, Aws::Vector< Aws::String >> &&value)
Definition: Command.h:224
void SetServiceRole(const Aws::String &value)
Definition: Command.h:446
const CommandStatus & GetStatus() const
Definition: Command.h:330
Command & AddParameters(const char *key, const Aws::Vector< Aws::String > &value)
Definition: Command.h:260
void SetOutputS3BucketName(Aws::String &&value)
Definition: Command.h:368
Command & WithOutputS3BucketName(const char *value)
Definition: Command.h:392
Command & AddInstanceIds(Aws::String &&value)
Definition: Command.h:295
void SetParameters(const Aws::Map< Aws::String, Aws::Vector< Aws::String >> &value)
Definition: Command.h:206
const Aws::String & GetServiceRole() const
Definition: Command.h:440
void SetOutputS3BucketName(const Aws::String &value)
Definition: Command.h:362
void SetStatus(const CommandStatus &value)
Definition: Command.h:335
const Aws::String & GetCommandId() const
Definition: Command.h:52
const Aws::Utils::DateTime & GetExpiresAfter() const
Definition: Command.h:166
Command & WithInstanceIds(Aws::Vector< Aws::String > &&value)
Definition: Command.h:285
Command & WithCommandId(const Aws::String &value)
Definition: Command.h:72
Command & WithComment(const char *value)
Definition: Command.h:159
Command & WithOutputS3KeyPrefix(Aws::String &&value)
Definition: Command.h:428
void SetDocumentName(Aws::String &&value)
Definition: Command.h:97
Command & WithRequestedDateTime(const Aws::Utils::DateTime &value)
Definition: Command.h:320
void SetCommandId(const char *value)
Definition: Command.h:67
void SetNotificationConfig(NotificationConfig &&value)
Definition: Command.h:491
Command & AddInstanceIds(const char *value)
Definition: Command.h:300
Command & WithDocumentName(const char *value)
Definition: Command.h:117
void SetOutputS3BucketName(const char *value)
Definition: Command.h:374
Command & WithServiceRole(const Aws::String &value)
Definition: Command.h:464
const Aws::String & GetDocumentName() const
Definition: Command.h:87
Command & WithRequestedDateTime(Aws::Utils::DateTime &&value)
Definition: Command.h:325
Command & WithCommandId(const char *value)
Definition: Command.h:82
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
const NotificationConfig & GetNotificationConfig() const
Definition: Command.h:481
const Aws::String & GetOutputS3KeyPrefix() const
Definition: Command.h:398
Command & WithExpiresAfter(const Aws::Utils::DateTime &value)
Definition: Command.h:187
Command & WithStatus(const CommandStatus &value)
Definition: Command.h:345
void SetExpiresAfter(Aws::Utils::DateTime &&value)
Definition: Command.h:180
void SetStatus(CommandStatus &&value)
Definition: Command.h:340
Command & AddParameters(const Aws::String &key, Aws::Vector< Aws::String > &&value)
Definition: Command.h:242
#define AWS_SSM_API
Definition: SSM_EXPORTS.h:37
Command & WithExpiresAfter(Aws::Utils::DateTime &&value)
Definition: Command.h:194
void SetOutputS3KeyPrefix(const char *value)
Definition: Command.h:416
void SetComment(Aws::String &&value)
Definition: Command.h:135
Command & WithOutputS3BucketName(Aws::String &&value)
Definition: Command.h:386
Command & WithCommandId(Aws::String &&value)
Definition: Command.h:77
const Aws::Vector< Aws::String > & GetInstanceIds() const
Definition: Command.h:265
void SetRequestedDateTime(const Aws::Utils::DateTime &value)
Definition: Command.h:310
void SetServiceRole(Aws::String &&value)
Definition: Command.h:452
Command & WithServiceRole(const char *value)
Definition: Command.h:476
JSON (JavaScript Object Notation).
const Aws::Map< Aws::String, Aws::Vector< Aws::String > > & GetParameters() const
Definition: Command.h:200