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/backup/Backup_EXPORTS.h>
8 #include <aws/backup/BackupRequest.h>
9 #include <aws/backup/model/BackupPlanInput.h>
10 #include <aws/core/utils/memory/stl/AWSMap.h>
11 #include <aws/core/utils/memory/stl/AWSString.h>
12 #include <utility>
13 
14 namespace Aws
15 {
16 namespace Backup
17 {
18 namespace Model
19 {
20 
21   /**
22    */
23   class AWS_BACKUP_API CreateBackupPlanRequest : public BackupRequest
24   {
25   public:
26     CreateBackupPlanRequest();
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 "CreateBackupPlan"; }
33 
34     Aws::String SerializePayload() const override;
35 
36 
37     /**
38      * <p>Specifies the body of a backup plan. Includes a <code>BackupPlanName</code>
39      * and one or more sets of <code>Rules</code>.</p>
40      */
GetBackupPlan()41     inline const BackupPlanInput& GetBackupPlan() const{ return m_backupPlan; }
42 
43     /**
44      * <p>Specifies the body of a backup plan. Includes a <code>BackupPlanName</code>
45      * and one or more sets of <code>Rules</code>.</p>
46      */
BackupPlanHasBeenSet()47     inline bool BackupPlanHasBeenSet() const { return m_backupPlanHasBeenSet; }
48 
49     /**
50      * <p>Specifies the body of a backup plan. Includes a <code>BackupPlanName</code>
51      * and one or more sets of <code>Rules</code>.</p>
52      */
SetBackupPlan(const BackupPlanInput & value)53     inline void SetBackupPlan(const BackupPlanInput& value) { m_backupPlanHasBeenSet = true; m_backupPlan = value; }
54 
55     /**
56      * <p>Specifies the body of a backup plan. Includes a <code>BackupPlanName</code>
57      * and one or more sets of <code>Rules</code>.</p>
58      */
SetBackupPlan(BackupPlanInput && value)59     inline void SetBackupPlan(BackupPlanInput&& value) { m_backupPlanHasBeenSet = true; m_backupPlan = std::move(value); }
60 
61     /**
62      * <p>Specifies the body of a backup plan. Includes a <code>BackupPlanName</code>
63      * and one or more sets of <code>Rules</code>.</p>
64      */
WithBackupPlan(const BackupPlanInput & value)65     inline CreateBackupPlanRequest& WithBackupPlan(const BackupPlanInput& value) { SetBackupPlan(value); return *this;}
66 
67     /**
68      * <p>Specifies the body of a backup plan. Includes a <code>BackupPlanName</code>
69      * and one or more sets of <code>Rules</code>.</p>
70      */
WithBackupPlan(BackupPlanInput && value)71     inline CreateBackupPlanRequest& WithBackupPlan(BackupPlanInput&& value) { SetBackupPlan(std::move(value)); return *this;}
72 
73 
74     /**
75      * <p>To help organize your resources, you can assign your own metadata to the
76      * resources that you create. Each tag is a key-value pair. The specified tags are
77      * assigned to all backups created with this plan.</p>
78      */
GetBackupPlanTags()79     inline const Aws::Map<Aws::String, Aws::String>& GetBackupPlanTags() const{ return m_backupPlanTags; }
80 
81     /**
82      * <p>To help organize your resources, you can assign your own metadata to the
83      * resources that you create. Each tag is a key-value pair. The specified tags are
84      * assigned to all backups created with this plan.</p>
85      */
BackupPlanTagsHasBeenSet()86     inline bool BackupPlanTagsHasBeenSet() const { return m_backupPlanTagsHasBeenSet; }
87 
88     /**
89      * <p>To help organize your resources, you can assign your own metadata to the
90      * resources that you create. Each tag is a key-value pair. The specified tags are
91      * assigned to all backups created with this plan.</p>
92      */
SetBackupPlanTags(const Aws::Map<Aws::String,Aws::String> & value)93     inline void SetBackupPlanTags(const Aws::Map<Aws::String, Aws::String>& value) { m_backupPlanTagsHasBeenSet = true; m_backupPlanTags = value; }
94 
95     /**
96      * <p>To help organize your resources, you can assign your own metadata to the
97      * resources that you create. Each tag is a key-value pair. The specified tags are
98      * assigned to all backups created with this plan.</p>
99      */
SetBackupPlanTags(Aws::Map<Aws::String,Aws::String> && value)100     inline void SetBackupPlanTags(Aws::Map<Aws::String, Aws::String>&& value) { m_backupPlanTagsHasBeenSet = true; m_backupPlanTags = std::move(value); }
101 
102     /**
103      * <p>To help organize your resources, you can assign your own metadata to the
104      * resources that you create. Each tag is a key-value pair. The specified tags are
105      * assigned to all backups created with this plan.</p>
106      */
WithBackupPlanTags(const Aws::Map<Aws::String,Aws::String> & value)107     inline CreateBackupPlanRequest& WithBackupPlanTags(const Aws::Map<Aws::String, Aws::String>& value) { SetBackupPlanTags(value); return *this;}
108 
109     /**
110      * <p>To help organize your resources, you can assign your own metadata to the
111      * resources that you create. Each tag is a key-value pair. The specified tags are
112      * assigned to all backups created with this plan.</p>
113      */
WithBackupPlanTags(Aws::Map<Aws::String,Aws::String> && value)114     inline CreateBackupPlanRequest& WithBackupPlanTags(Aws::Map<Aws::String, Aws::String>&& value) { SetBackupPlanTags(std::move(value)); return *this;}
115 
116     /**
117      * <p>To help organize your resources, you can assign your own metadata to the
118      * resources that you create. Each tag is a key-value pair. The specified tags are
119      * assigned to all backups created with this plan.</p>
120      */
AddBackupPlanTags(const Aws::String & key,const Aws::String & value)121     inline CreateBackupPlanRequest& AddBackupPlanTags(const Aws::String& key, const Aws::String& value) { m_backupPlanTagsHasBeenSet = true; m_backupPlanTags.emplace(key, value); return *this; }
122 
123     /**
124      * <p>To help organize your resources, you can assign your own metadata to the
125      * resources that you create. Each tag is a key-value pair. The specified tags are
126      * assigned to all backups created with this plan.</p>
127      */
AddBackupPlanTags(Aws::String && key,const Aws::String & value)128     inline CreateBackupPlanRequest& AddBackupPlanTags(Aws::String&& key, const Aws::String& value) { m_backupPlanTagsHasBeenSet = true; m_backupPlanTags.emplace(std::move(key), value); return *this; }
129 
130     /**
131      * <p>To help organize your resources, you can assign your own metadata to the
132      * resources that you create. Each tag is a key-value pair. The specified tags are
133      * assigned to all backups created with this plan.</p>
134      */
AddBackupPlanTags(const Aws::String & key,Aws::String && value)135     inline CreateBackupPlanRequest& AddBackupPlanTags(const Aws::String& key, Aws::String&& value) { m_backupPlanTagsHasBeenSet = true; m_backupPlanTags.emplace(key, std::move(value)); return *this; }
136 
137     /**
138      * <p>To help organize your resources, you can assign your own metadata to the
139      * resources that you create. Each tag is a key-value pair. The specified tags are
140      * assigned to all backups created with this plan.</p>
141      */
AddBackupPlanTags(Aws::String && key,Aws::String && value)142     inline CreateBackupPlanRequest& AddBackupPlanTags(Aws::String&& key, Aws::String&& value) { m_backupPlanTagsHasBeenSet = true; m_backupPlanTags.emplace(std::move(key), std::move(value)); return *this; }
143 
144     /**
145      * <p>To help organize your resources, you can assign your own metadata to the
146      * resources that you create. Each tag is a key-value pair. The specified tags are
147      * assigned to all backups created with this plan.</p>
148      */
AddBackupPlanTags(const char * key,Aws::String && value)149     inline CreateBackupPlanRequest& AddBackupPlanTags(const char* key, Aws::String&& value) { m_backupPlanTagsHasBeenSet = true; m_backupPlanTags.emplace(key, std::move(value)); return *this; }
150 
151     /**
152      * <p>To help organize your resources, you can assign your own metadata to the
153      * resources that you create. Each tag is a key-value pair. The specified tags are
154      * assigned to all backups created with this plan.</p>
155      */
AddBackupPlanTags(Aws::String && key,const char * value)156     inline CreateBackupPlanRequest& AddBackupPlanTags(Aws::String&& key, const char* value) { m_backupPlanTagsHasBeenSet = true; m_backupPlanTags.emplace(std::move(key), value); return *this; }
157 
158     /**
159      * <p>To help organize your resources, you can assign your own metadata to the
160      * resources that you create. Each tag is a key-value pair. The specified tags are
161      * assigned to all backups created with this plan.</p>
162      */
AddBackupPlanTags(const char * key,const char * value)163     inline CreateBackupPlanRequest& AddBackupPlanTags(const char* key, const char* value) { m_backupPlanTagsHasBeenSet = true; m_backupPlanTags.emplace(key, value); return *this; }
164 
165 
166     /**
167      * <p>Identifies the request and allows failed requests to be retried without the
168      * risk of running the operation twice. If the request includes a
169      * <code>CreatorRequestId</code> that matches an existing backup plan, that plan is
170      * returned. This parameter is optional.</p>
171      */
GetCreatorRequestId()172     inline const Aws::String& GetCreatorRequestId() const{ return m_creatorRequestId; }
173 
174     /**
175      * <p>Identifies the request and allows failed requests to be retried without the
176      * risk of running the operation twice. If the request includes a
177      * <code>CreatorRequestId</code> that matches an existing backup plan, that plan is
178      * returned. This parameter is optional.</p>
179      */
CreatorRequestIdHasBeenSet()180     inline bool CreatorRequestIdHasBeenSet() const { return m_creatorRequestIdHasBeenSet; }
181 
182     /**
183      * <p>Identifies the request and allows failed requests to be retried without the
184      * risk of running the operation twice. If the request includes a
185      * <code>CreatorRequestId</code> that matches an existing backup plan, that plan is
186      * returned. This parameter is optional.</p>
187      */
SetCreatorRequestId(const Aws::String & value)188     inline void SetCreatorRequestId(const Aws::String& value) { m_creatorRequestIdHasBeenSet = true; m_creatorRequestId = value; }
189 
190     /**
191      * <p>Identifies the request and allows failed requests to be retried without the
192      * risk of running the operation twice. If the request includes a
193      * <code>CreatorRequestId</code> that matches an existing backup plan, that plan is
194      * returned. This parameter is optional.</p>
195      */
SetCreatorRequestId(Aws::String && value)196     inline void SetCreatorRequestId(Aws::String&& value) { m_creatorRequestIdHasBeenSet = true; m_creatorRequestId = std::move(value); }
197 
198     /**
199      * <p>Identifies the request and allows failed requests to be retried without the
200      * risk of running the operation twice. If the request includes a
201      * <code>CreatorRequestId</code> that matches an existing backup plan, that plan is
202      * returned. This parameter is optional.</p>
203      */
SetCreatorRequestId(const char * value)204     inline void SetCreatorRequestId(const char* value) { m_creatorRequestIdHasBeenSet = true; m_creatorRequestId.assign(value); }
205 
206     /**
207      * <p>Identifies the request and allows failed requests to be retried without the
208      * risk of running the operation twice. If the request includes a
209      * <code>CreatorRequestId</code> that matches an existing backup plan, that plan is
210      * returned. This parameter is optional.</p>
211      */
WithCreatorRequestId(const Aws::String & value)212     inline CreateBackupPlanRequest& WithCreatorRequestId(const Aws::String& value) { SetCreatorRequestId(value); return *this;}
213 
214     /**
215      * <p>Identifies the request and allows failed requests to be retried without the
216      * risk of running the operation twice. If the request includes a
217      * <code>CreatorRequestId</code> that matches an existing backup plan, that plan is
218      * returned. This parameter is optional.</p>
219      */
WithCreatorRequestId(Aws::String && value)220     inline CreateBackupPlanRequest& WithCreatorRequestId(Aws::String&& value) { SetCreatorRequestId(std::move(value)); return *this;}
221 
222     /**
223      * <p>Identifies the request and allows failed requests to be retried without the
224      * risk of running the operation twice. If the request includes a
225      * <code>CreatorRequestId</code> that matches an existing backup plan, that plan is
226      * returned. This parameter is optional.</p>
227      */
WithCreatorRequestId(const char * value)228     inline CreateBackupPlanRequest& WithCreatorRequestId(const char* value) { SetCreatorRequestId(value); return *this;}
229 
230   private:
231 
232     BackupPlanInput m_backupPlan;
233     bool m_backupPlanHasBeenSet;
234 
235     Aws::Map<Aws::String, Aws::String> m_backupPlanTags;
236     bool m_backupPlanTagsHasBeenSet;
237 
238     Aws::String m_creatorRequestId;
239     bool m_creatorRequestIdHasBeenSet;
240   };
241 
242 } // namespace Model
243 } // namespace Backup
244 } // namespace Aws
245