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/quicksight/QuickSight_EXPORTS.h>
8 #include <aws/quicksight/QuickSightRequest.h>
9 #include <aws/core/utils/memory/stl/AWSString.h>
10 #include <aws/core/utils/memory/stl/AWSVector.h>
11 #include <aws/quicksight/model/ResourcePermission.h>
12 #include <utility>
13 
14 namespace Aws
15 {
16 namespace QuickSight
17 {
18 namespace Model
19 {
20 
21   /**
22    */
23   class AWS_QUICKSIGHT_API UpdateDataSourcePermissionsRequest : public QuickSightRequest
24   {
25   public:
26     UpdateDataSourcePermissionsRequest();
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 "UpdateDataSourcePermissions"; }
33 
34     Aws::String SerializePayload() const override;
35 
36 
37     /**
38      * <p>The Amazon Web Services account ID.</p>
39      */
GetAwsAccountId()40     inline const Aws::String& GetAwsAccountId() const{ return m_awsAccountId; }
41 
42     /**
43      * <p>The Amazon Web Services account ID.</p>
44      */
AwsAccountIdHasBeenSet()45     inline bool AwsAccountIdHasBeenSet() const { return m_awsAccountIdHasBeenSet; }
46 
47     /**
48      * <p>The Amazon Web Services account ID.</p>
49      */
SetAwsAccountId(const Aws::String & value)50     inline void SetAwsAccountId(const Aws::String& value) { m_awsAccountIdHasBeenSet = true; m_awsAccountId = value; }
51 
52     /**
53      * <p>The Amazon Web Services account ID.</p>
54      */
SetAwsAccountId(Aws::String && value)55     inline void SetAwsAccountId(Aws::String&& value) { m_awsAccountIdHasBeenSet = true; m_awsAccountId = std::move(value); }
56 
57     /**
58      * <p>The Amazon Web Services account ID.</p>
59      */
SetAwsAccountId(const char * value)60     inline void SetAwsAccountId(const char* value) { m_awsAccountIdHasBeenSet = true; m_awsAccountId.assign(value); }
61 
62     /**
63      * <p>The Amazon Web Services account ID.</p>
64      */
WithAwsAccountId(const Aws::String & value)65     inline UpdateDataSourcePermissionsRequest& WithAwsAccountId(const Aws::String& value) { SetAwsAccountId(value); return *this;}
66 
67     /**
68      * <p>The Amazon Web Services account ID.</p>
69      */
WithAwsAccountId(Aws::String && value)70     inline UpdateDataSourcePermissionsRequest& WithAwsAccountId(Aws::String&& value) { SetAwsAccountId(std::move(value)); return *this;}
71 
72     /**
73      * <p>The Amazon Web Services account ID.</p>
74      */
WithAwsAccountId(const char * value)75     inline UpdateDataSourcePermissionsRequest& WithAwsAccountId(const char* value) { SetAwsAccountId(value); return *this;}
76 
77 
78     /**
79      * <p>The ID of the data source. This ID is unique per Amazon Web Services Region
80      * for each Amazon Web Services account. </p>
81      */
GetDataSourceId()82     inline const Aws::String& GetDataSourceId() const{ return m_dataSourceId; }
83 
84     /**
85      * <p>The ID of the data source. This ID is unique per Amazon Web Services Region
86      * for each Amazon Web Services account. </p>
87      */
DataSourceIdHasBeenSet()88     inline bool DataSourceIdHasBeenSet() const { return m_dataSourceIdHasBeenSet; }
89 
90     /**
91      * <p>The ID of the data source. This ID is unique per Amazon Web Services Region
92      * for each Amazon Web Services account. </p>
93      */
SetDataSourceId(const Aws::String & value)94     inline void SetDataSourceId(const Aws::String& value) { m_dataSourceIdHasBeenSet = true; m_dataSourceId = value; }
95 
96     /**
97      * <p>The ID of the data source. This ID is unique per Amazon Web Services Region
98      * for each Amazon Web Services account. </p>
99      */
SetDataSourceId(Aws::String && value)100     inline void SetDataSourceId(Aws::String&& value) { m_dataSourceIdHasBeenSet = true; m_dataSourceId = std::move(value); }
101 
102     /**
103      * <p>The ID of the data source. This ID is unique per Amazon Web Services Region
104      * for each Amazon Web Services account. </p>
105      */
SetDataSourceId(const char * value)106     inline void SetDataSourceId(const char* value) { m_dataSourceIdHasBeenSet = true; m_dataSourceId.assign(value); }
107 
108     /**
109      * <p>The ID of the data source. This ID is unique per Amazon Web Services Region
110      * for each Amazon Web Services account. </p>
111      */
WithDataSourceId(const Aws::String & value)112     inline UpdateDataSourcePermissionsRequest& WithDataSourceId(const Aws::String& value) { SetDataSourceId(value); return *this;}
113 
114     /**
115      * <p>The ID of the data source. This ID is unique per Amazon Web Services Region
116      * for each Amazon Web Services account. </p>
117      */
WithDataSourceId(Aws::String && value)118     inline UpdateDataSourcePermissionsRequest& WithDataSourceId(Aws::String&& value) { SetDataSourceId(std::move(value)); return *this;}
119 
120     /**
121      * <p>The ID of the data source. This ID is unique per Amazon Web Services Region
122      * for each Amazon Web Services account. </p>
123      */
WithDataSourceId(const char * value)124     inline UpdateDataSourcePermissionsRequest& WithDataSourceId(const char* value) { SetDataSourceId(value); return *this;}
125 
126 
127     /**
128      * <p>A list of resource permissions that you want to grant on the data source.</p>
129      */
GetGrantPermissions()130     inline const Aws::Vector<ResourcePermission>& GetGrantPermissions() const{ return m_grantPermissions; }
131 
132     /**
133      * <p>A list of resource permissions that you want to grant on the data source.</p>
134      */
GrantPermissionsHasBeenSet()135     inline bool GrantPermissionsHasBeenSet() const { return m_grantPermissionsHasBeenSet; }
136 
137     /**
138      * <p>A list of resource permissions that you want to grant on the data source.</p>
139      */
SetGrantPermissions(const Aws::Vector<ResourcePermission> & value)140     inline void SetGrantPermissions(const Aws::Vector<ResourcePermission>& value) { m_grantPermissionsHasBeenSet = true; m_grantPermissions = value; }
141 
142     /**
143      * <p>A list of resource permissions that you want to grant on the data source.</p>
144      */
SetGrantPermissions(Aws::Vector<ResourcePermission> && value)145     inline void SetGrantPermissions(Aws::Vector<ResourcePermission>&& value) { m_grantPermissionsHasBeenSet = true; m_grantPermissions = std::move(value); }
146 
147     /**
148      * <p>A list of resource permissions that you want to grant on the data source.</p>
149      */
WithGrantPermissions(const Aws::Vector<ResourcePermission> & value)150     inline UpdateDataSourcePermissionsRequest& WithGrantPermissions(const Aws::Vector<ResourcePermission>& value) { SetGrantPermissions(value); return *this;}
151 
152     /**
153      * <p>A list of resource permissions that you want to grant on the data source.</p>
154      */
WithGrantPermissions(Aws::Vector<ResourcePermission> && value)155     inline UpdateDataSourcePermissionsRequest& WithGrantPermissions(Aws::Vector<ResourcePermission>&& value) { SetGrantPermissions(std::move(value)); return *this;}
156 
157     /**
158      * <p>A list of resource permissions that you want to grant on the data source.</p>
159      */
AddGrantPermissions(const ResourcePermission & value)160     inline UpdateDataSourcePermissionsRequest& AddGrantPermissions(const ResourcePermission& value) { m_grantPermissionsHasBeenSet = true; m_grantPermissions.push_back(value); return *this; }
161 
162     /**
163      * <p>A list of resource permissions that you want to grant on the data source.</p>
164      */
AddGrantPermissions(ResourcePermission && value)165     inline UpdateDataSourcePermissionsRequest& AddGrantPermissions(ResourcePermission&& value) { m_grantPermissionsHasBeenSet = true; m_grantPermissions.push_back(std::move(value)); return *this; }
166 
167 
168     /**
169      * <p>A list of resource permissions that you want to revoke on the data
170      * source.</p>
171      */
GetRevokePermissions()172     inline const Aws::Vector<ResourcePermission>& GetRevokePermissions() const{ return m_revokePermissions; }
173 
174     /**
175      * <p>A list of resource permissions that you want to revoke on the data
176      * source.</p>
177      */
RevokePermissionsHasBeenSet()178     inline bool RevokePermissionsHasBeenSet() const { return m_revokePermissionsHasBeenSet; }
179 
180     /**
181      * <p>A list of resource permissions that you want to revoke on the data
182      * source.</p>
183      */
SetRevokePermissions(const Aws::Vector<ResourcePermission> & value)184     inline void SetRevokePermissions(const Aws::Vector<ResourcePermission>& value) { m_revokePermissionsHasBeenSet = true; m_revokePermissions = value; }
185 
186     /**
187      * <p>A list of resource permissions that you want to revoke on the data
188      * source.</p>
189      */
SetRevokePermissions(Aws::Vector<ResourcePermission> && value)190     inline void SetRevokePermissions(Aws::Vector<ResourcePermission>&& value) { m_revokePermissionsHasBeenSet = true; m_revokePermissions = std::move(value); }
191 
192     /**
193      * <p>A list of resource permissions that you want to revoke on the data
194      * source.</p>
195      */
WithRevokePermissions(const Aws::Vector<ResourcePermission> & value)196     inline UpdateDataSourcePermissionsRequest& WithRevokePermissions(const Aws::Vector<ResourcePermission>& value) { SetRevokePermissions(value); return *this;}
197 
198     /**
199      * <p>A list of resource permissions that you want to revoke on the data
200      * source.</p>
201      */
WithRevokePermissions(Aws::Vector<ResourcePermission> && value)202     inline UpdateDataSourcePermissionsRequest& WithRevokePermissions(Aws::Vector<ResourcePermission>&& value) { SetRevokePermissions(std::move(value)); return *this;}
203 
204     /**
205      * <p>A list of resource permissions that you want to revoke on the data
206      * source.</p>
207      */
AddRevokePermissions(const ResourcePermission & value)208     inline UpdateDataSourcePermissionsRequest& AddRevokePermissions(const ResourcePermission& value) { m_revokePermissionsHasBeenSet = true; m_revokePermissions.push_back(value); return *this; }
209 
210     /**
211      * <p>A list of resource permissions that you want to revoke on the data
212      * source.</p>
213      */
AddRevokePermissions(ResourcePermission && value)214     inline UpdateDataSourcePermissionsRequest& AddRevokePermissions(ResourcePermission&& value) { m_revokePermissionsHasBeenSet = true; m_revokePermissions.push_back(std::move(value)); return *this; }
215 
216   private:
217 
218     Aws::String m_awsAccountId;
219     bool m_awsAccountIdHasBeenSet;
220 
221     Aws::String m_dataSourceId;
222     bool m_dataSourceIdHasBeenSet;
223 
224     Aws::Vector<ResourcePermission> m_grantPermissions;
225     bool m_grantPermissionsHasBeenSet;
226 
227     Aws::Vector<ResourcePermission> m_revokePermissions;
228     bool m_revokePermissionsHasBeenSet;
229   };
230 
231 } // namespace Model
232 } // namespace QuickSight
233 } // namespace Aws
234