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/medialive/MediaLive_EXPORTS.h>
8 #include <aws/medialive/MediaLiveRequest.h>
9 #include <aws/core/utils/memory/stl/AWSString.h>
10 #include <aws/core/utils/memory/stl/AWSMap.h>
11 #include <aws/core/utils/memory/stl/AWSVector.h>
12 #include <aws/medialive/model/InputWhitelistRuleCidr.h>
13 #include <utility>
14 
15 namespace Aws
16 {
17 namespace MediaLive
18 {
19 namespace Model
20 {
21 
22   /**
23    * The request to update some combination of the Input Security Group name and the
24    * IPv4 CIDRs the Input Security Group should allow.<p><h3>See Also:</h3>   <a
25    * href="http://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/UpdateInputSecurityGroupRequest">AWS
26    * API Reference</a></p>
27    */
28   class AWS_MEDIALIVE_API UpdateInputSecurityGroupRequest : public MediaLiveRequest
29   {
30   public:
31     UpdateInputSecurityGroupRequest();
32 
33     // Service request name is the Operation name which will send this request out,
34     // each operation should has unique request name, so that we can get operation's name from this request.
35     // Note: this is not true for response, multiple operations may have the same response name,
36     // so we can not get operation's name from response.
GetServiceRequestName()37     inline virtual const char* GetServiceRequestName() const override { return "UpdateInputSecurityGroup"; }
38 
39     Aws::String SerializePayload() const override;
40 
41 
42     /**
43      * The id of the Input Security Group to update.
44      */
GetInputSecurityGroupId()45     inline const Aws::String& GetInputSecurityGroupId() const{ return m_inputSecurityGroupId; }
46 
47     /**
48      * The id of the Input Security Group to update.
49      */
InputSecurityGroupIdHasBeenSet()50     inline bool InputSecurityGroupIdHasBeenSet() const { return m_inputSecurityGroupIdHasBeenSet; }
51 
52     /**
53      * The id of the Input Security Group to update.
54      */
SetInputSecurityGroupId(const Aws::String & value)55     inline void SetInputSecurityGroupId(const Aws::String& value) { m_inputSecurityGroupIdHasBeenSet = true; m_inputSecurityGroupId = value; }
56 
57     /**
58      * The id of the Input Security Group to update.
59      */
SetInputSecurityGroupId(Aws::String && value)60     inline void SetInputSecurityGroupId(Aws::String&& value) { m_inputSecurityGroupIdHasBeenSet = true; m_inputSecurityGroupId = std::move(value); }
61 
62     /**
63      * The id of the Input Security Group to update.
64      */
SetInputSecurityGroupId(const char * value)65     inline void SetInputSecurityGroupId(const char* value) { m_inputSecurityGroupIdHasBeenSet = true; m_inputSecurityGroupId.assign(value); }
66 
67     /**
68      * The id of the Input Security Group to update.
69      */
WithInputSecurityGroupId(const Aws::String & value)70     inline UpdateInputSecurityGroupRequest& WithInputSecurityGroupId(const Aws::String& value) { SetInputSecurityGroupId(value); return *this;}
71 
72     /**
73      * The id of the Input Security Group to update.
74      */
WithInputSecurityGroupId(Aws::String && value)75     inline UpdateInputSecurityGroupRequest& WithInputSecurityGroupId(Aws::String&& value) { SetInputSecurityGroupId(std::move(value)); return *this;}
76 
77     /**
78      * The id of the Input Security Group to update.
79      */
WithInputSecurityGroupId(const char * value)80     inline UpdateInputSecurityGroupRequest& WithInputSecurityGroupId(const char* value) { SetInputSecurityGroupId(value); return *this;}
81 
82 
83     /**
84      * A collection of key-value pairs.
85      */
GetTags()86     inline const Aws::Map<Aws::String, Aws::String>& GetTags() const{ return m_tags; }
87 
88     /**
89      * A collection of key-value pairs.
90      */
TagsHasBeenSet()91     inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
92 
93     /**
94      * A collection of key-value pairs.
95      */
SetTags(const Aws::Map<Aws::String,Aws::String> & value)96     inline void SetTags(const Aws::Map<Aws::String, Aws::String>& value) { m_tagsHasBeenSet = true; m_tags = value; }
97 
98     /**
99      * A collection of key-value pairs.
100      */
SetTags(Aws::Map<Aws::String,Aws::String> && value)101     inline void SetTags(Aws::Map<Aws::String, Aws::String>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
102 
103     /**
104      * A collection of key-value pairs.
105      */
WithTags(const Aws::Map<Aws::String,Aws::String> & value)106     inline UpdateInputSecurityGroupRequest& WithTags(const Aws::Map<Aws::String, Aws::String>& value) { SetTags(value); return *this;}
107 
108     /**
109      * A collection of key-value pairs.
110      */
WithTags(Aws::Map<Aws::String,Aws::String> && value)111     inline UpdateInputSecurityGroupRequest& WithTags(Aws::Map<Aws::String, Aws::String>&& value) { SetTags(std::move(value)); return *this;}
112 
113     /**
114      * A collection of key-value pairs.
115      */
AddTags(const Aws::String & key,const Aws::String & value)116     inline UpdateInputSecurityGroupRequest& AddTags(const Aws::String& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; }
117 
118     /**
119      * A collection of key-value pairs.
120      */
AddTags(Aws::String && key,const Aws::String & value)121     inline UpdateInputSecurityGroupRequest& AddTags(Aws::String&& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; }
122 
123     /**
124      * A collection of key-value pairs.
125      */
AddTags(const Aws::String & key,Aws::String && value)126     inline UpdateInputSecurityGroupRequest& AddTags(const Aws::String& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; }
127 
128     /**
129      * A collection of key-value pairs.
130      */
AddTags(Aws::String && key,Aws::String && value)131     inline UpdateInputSecurityGroupRequest& AddTags(Aws::String&& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), std::move(value)); return *this; }
132 
133     /**
134      * A collection of key-value pairs.
135      */
AddTags(const char * key,Aws::String && value)136     inline UpdateInputSecurityGroupRequest& AddTags(const char* key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; }
137 
138     /**
139      * A collection of key-value pairs.
140      */
AddTags(Aws::String && key,const char * value)141     inline UpdateInputSecurityGroupRequest& AddTags(Aws::String&& key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; }
142 
143     /**
144      * A collection of key-value pairs.
145      */
AddTags(const char * key,const char * value)146     inline UpdateInputSecurityGroupRequest& AddTags(const char* key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; }
147 
148 
149     /**
150      * List of IPv4 CIDR addresses to whitelist
151      */
GetWhitelistRules()152     inline const Aws::Vector<InputWhitelistRuleCidr>& GetWhitelistRules() const{ return m_whitelistRules; }
153 
154     /**
155      * List of IPv4 CIDR addresses to whitelist
156      */
WhitelistRulesHasBeenSet()157     inline bool WhitelistRulesHasBeenSet() const { return m_whitelistRulesHasBeenSet; }
158 
159     /**
160      * List of IPv4 CIDR addresses to whitelist
161      */
SetWhitelistRules(const Aws::Vector<InputWhitelistRuleCidr> & value)162     inline void SetWhitelistRules(const Aws::Vector<InputWhitelistRuleCidr>& value) { m_whitelistRulesHasBeenSet = true; m_whitelistRules = value; }
163 
164     /**
165      * List of IPv4 CIDR addresses to whitelist
166      */
SetWhitelistRules(Aws::Vector<InputWhitelistRuleCidr> && value)167     inline void SetWhitelistRules(Aws::Vector<InputWhitelistRuleCidr>&& value) { m_whitelistRulesHasBeenSet = true; m_whitelistRules = std::move(value); }
168 
169     /**
170      * List of IPv4 CIDR addresses to whitelist
171      */
WithWhitelistRules(const Aws::Vector<InputWhitelistRuleCidr> & value)172     inline UpdateInputSecurityGroupRequest& WithWhitelistRules(const Aws::Vector<InputWhitelistRuleCidr>& value) { SetWhitelistRules(value); return *this;}
173 
174     /**
175      * List of IPv4 CIDR addresses to whitelist
176      */
WithWhitelistRules(Aws::Vector<InputWhitelistRuleCidr> && value)177     inline UpdateInputSecurityGroupRequest& WithWhitelistRules(Aws::Vector<InputWhitelistRuleCidr>&& value) { SetWhitelistRules(std::move(value)); return *this;}
178 
179     /**
180      * List of IPv4 CIDR addresses to whitelist
181      */
AddWhitelistRules(const InputWhitelistRuleCidr & value)182     inline UpdateInputSecurityGroupRequest& AddWhitelistRules(const InputWhitelistRuleCidr& value) { m_whitelistRulesHasBeenSet = true; m_whitelistRules.push_back(value); return *this; }
183 
184     /**
185      * List of IPv4 CIDR addresses to whitelist
186      */
AddWhitelistRules(InputWhitelistRuleCidr && value)187     inline UpdateInputSecurityGroupRequest& AddWhitelistRules(InputWhitelistRuleCidr&& value) { m_whitelistRulesHasBeenSet = true; m_whitelistRules.push_back(std::move(value)); return *this; }
188 
189   private:
190 
191     Aws::String m_inputSecurityGroupId;
192     bool m_inputSecurityGroupIdHasBeenSet;
193 
194     Aws::Map<Aws::String, Aws::String> m_tags;
195     bool m_tagsHasBeenSet;
196 
197     Aws::Vector<InputWhitelistRuleCidr> m_whitelistRules;
198     bool m_whitelistRulesHasBeenSet;
199   };
200 
201 } // namespace Model
202 } // namespace MediaLive
203 } // namespace Aws
204