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/iotsitewise/IoTSiteWise_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSString.h>
9 #include <aws/iotsitewise/model/Identity.h>
10 #include <aws/iotsitewise/model/Resource.h>
11 #include <aws/iotsitewise/model/Permission.h>
12 #include <aws/core/utils/DateTime.h>
13 #include <utility>
14 
15 namespace Aws
16 {
17 namespace Utils
18 {
19 namespace Json
20 {
21   class JsonValue;
22   class JsonView;
23 } // namespace Json
24 } // namespace Utils
25 namespace IoTSiteWise
26 {
27 namespace Model
28 {
29 
30   /**
31    * <p>Contains an access policy that defines an identity's access to an IoT
32    * SiteWise Monitor resource.</p><p><h3>See Also:</h3>   <a
33    * href="http://docs.aws.amazon.com/goto/WebAPI/iotsitewise-2019-12-02/AccessPolicySummary">AWS
34    * API Reference</a></p>
35    */
36   class AWS_IOTSITEWISE_API AccessPolicySummary
37   {
38   public:
39     AccessPolicySummary();
40     AccessPolicySummary(Aws::Utils::Json::JsonView jsonValue);
41     AccessPolicySummary& operator=(Aws::Utils::Json::JsonView jsonValue);
42     Aws::Utils::Json::JsonValue Jsonize() const;
43 
44 
45     /**
46      * <p>The ID of the access policy.</p>
47      */
GetId()48     inline const Aws::String& GetId() const{ return m_id; }
49 
50     /**
51      * <p>The ID of the access policy.</p>
52      */
IdHasBeenSet()53     inline bool IdHasBeenSet() const { return m_idHasBeenSet; }
54 
55     /**
56      * <p>The ID of the access policy.</p>
57      */
SetId(const Aws::String & value)58     inline void SetId(const Aws::String& value) { m_idHasBeenSet = true; m_id = value; }
59 
60     /**
61      * <p>The ID of the access policy.</p>
62      */
SetId(Aws::String && value)63     inline void SetId(Aws::String&& value) { m_idHasBeenSet = true; m_id = std::move(value); }
64 
65     /**
66      * <p>The ID of the access policy.</p>
67      */
SetId(const char * value)68     inline void SetId(const char* value) { m_idHasBeenSet = true; m_id.assign(value); }
69 
70     /**
71      * <p>The ID of the access policy.</p>
72      */
WithId(const Aws::String & value)73     inline AccessPolicySummary& WithId(const Aws::String& value) { SetId(value); return *this;}
74 
75     /**
76      * <p>The ID of the access policy.</p>
77      */
WithId(Aws::String && value)78     inline AccessPolicySummary& WithId(Aws::String&& value) { SetId(std::move(value)); return *this;}
79 
80     /**
81      * <p>The ID of the access policy.</p>
82      */
WithId(const char * value)83     inline AccessPolicySummary& WithId(const char* value) { SetId(value); return *this;}
84 
85 
86     /**
87      * <p>The identity (an Amazon Web Services SSO user, an Amazon Web Services SSO
88      * group, or an IAM user).</p>
89      */
GetIdentity()90     inline const Identity& GetIdentity() const{ return m_identity; }
91 
92     /**
93      * <p>The identity (an Amazon Web Services SSO user, an Amazon Web Services SSO
94      * group, or an IAM user).</p>
95      */
IdentityHasBeenSet()96     inline bool IdentityHasBeenSet() const { return m_identityHasBeenSet; }
97 
98     /**
99      * <p>The identity (an Amazon Web Services SSO user, an Amazon Web Services SSO
100      * group, or an IAM user).</p>
101      */
SetIdentity(const Identity & value)102     inline void SetIdentity(const Identity& value) { m_identityHasBeenSet = true; m_identity = value; }
103 
104     /**
105      * <p>The identity (an Amazon Web Services SSO user, an Amazon Web Services SSO
106      * group, or an IAM user).</p>
107      */
SetIdentity(Identity && value)108     inline void SetIdentity(Identity&& value) { m_identityHasBeenSet = true; m_identity = std::move(value); }
109 
110     /**
111      * <p>The identity (an Amazon Web Services SSO user, an Amazon Web Services SSO
112      * group, or an IAM user).</p>
113      */
WithIdentity(const Identity & value)114     inline AccessPolicySummary& WithIdentity(const Identity& value) { SetIdentity(value); return *this;}
115 
116     /**
117      * <p>The identity (an Amazon Web Services SSO user, an Amazon Web Services SSO
118      * group, or an IAM user).</p>
119      */
WithIdentity(Identity && value)120     inline AccessPolicySummary& WithIdentity(Identity&& value) { SetIdentity(std::move(value)); return *this;}
121 
122 
123     /**
124      * <p>The IoT SiteWise Monitor resource (a portal or project).</p>
125      */
GetResource()126     inline const Resource& GetResource() const{ return m_resource; }
127 
128     /**
129      * <p>The IoT SiteWise Monitor resource (a portal or project).</p>
130      */
ResourceHasBeenSet()131     inline bool ResourceHasBeenSet() const { return m_resourceHasBeenSet; }
132 
133     /**
134      * <p>The IoT SiteWise Monitor resource (a portal or project).</p>
135      */
SetResource(const Resource & value)136     inline void SetResource(const Resource& value) { m_resourceHasBeenSet = true; m_resource = value; }
137 
138     /**
139      * <p>The IoT SiteWise Monitor resource (a portal or project).</p>
140      */
SetResource(Resource && value)141     inline void SetResource(Resource&& value) { m_resourceHasBeenSet = true; m_resource = std::move(value); }
142 
143     /**
144      * <p>The IoT SiteWise Monitor resource (a portal or project).</p>
145      */
WithResource(const Resource & value)146     inline AccessPolicySummary& WithResource(const Resource& value) { SetResource(value); return *this;}
147 
148     /**
149      * <p>The IoT SiteWise Monitor resource (a portal or project).</p>
150      */
WithResource(Resource && value)151     inline AccessPolicySummary& WithResource(Resource&& value) { SetResource(std::move(value)); return *this;}
152 
153 
154     /**
155      * <p>The permissions for the access policy. Note that a project
156      * <code>ADMINISTRATOR</code> is also known as a project owner.</p>
157      */
GetPermission()158     inline const Permission& GetPermission() const{ return m_permission; }
159 
160     /**
161      * <p>The permissions for the access policy. Note that a project
162      * <code>ADMINISTRATOR</code> is also known as a project owner.</p>
163      */
PermissionHasBeenSet()164     inline bool PermissionHasBeenSet() const { return m_permissionHasBeenSet; }
165 
166     /**
167      * <p>The permissions for the access policy. Note that a project
168      * <code>ADMINISTRATOR</code> is also known as a project owner.</p>
169      */
SetPermission(const Permission & value)170     inline void SetPermission(const Permission& value) { m_permissionHasBeenSet = true; m_permission = value; }
171 
172     /**
173      * <p>The permissions for the access policy. Note that a project
174      * <code>ADMINISTRATOR</code> is also known as a project owner.</p>
175      */
SetPermission(Permission && value)176     inline void SetPermission(Permission&& value) { m_permissionHasBeenSet = true; m_permission = std::move(value); }
177 
178     /**
179      * <p>The permissions for the access policy. Note that a project
180      * <code>ADMINISTRATOR</code> is also known as a project owner.</p>
181      */
WithPermission(const Permission & value)182     inline AccessPolicySummary& WithPermission(const Permission& value) { SetPermission(value); return *this;}
183 
184     /**
185      * <p>The permissions for the access policy. Note that a project
186      * <code>ADMINISTRATOR</code> is also known as a project owner.</p>
187      */
WithPermission(Permission && value)188     inline AccessPolicySummary& WithPermission(Permission&& value) { SetPermission(std::move(value)); return *this;}
189 
190 
191     /**
192      * <p>The date the access policy was created, in Unix epoch time.</p>
193      */
GetCreationDate()194     inline const Aws::Utils::DateTime& GetCreationDate() const{ return m_creationDate; }
195 
196     /**
197      * <p>The date the access policy was created, in Unix epoch time.</p>
198      */
CreationDateHasBeenSet()199     inline bool CreationDateHasBeenSet() const { return m_creationDateHasBeenSet; }
200 
201     /**
202      * <p>The date the access policy was created, in Unix epoch time.</p>
203      */
SetCreationDate(const Aws::Utils::DateTime & value)204     inline void SetCreationDate(const Aws::Utils::DateTime& value) { m_creationDateHasBeenSet = true; m_creationDate = value; }
205 
206     /**
207      * <p>The date the access policy was created, in Unix epoch time.</p>
208      */
SetCreationDate(Aws::Utils::DateTime && value)209     inline void SetCreationDate(Aws::Utils::DateTime&& value) { m_creationDateHasBeenSet = true; m_creationDate = std::move(value); }
210 
211     /**
212      * <p>The date the access policy was created, in Unix epoch time.</p>
213      */
WithCreationDate(const Aws::Utils::DateTime & value)214     inline AccessPolicySummary& WithCreationDate(const Aws::Utils::DateTime& value) { SetCreationDate(value); return *this;}
215 
216     /**
217      * <p>The date the access policy was created, in Unix epoch time.</p>
218      */
WithCreationDate(Aws::Utils::DateTime && value)219     inline AccessPolicySummary& WithCreationDate(Aws::Utils::DateTime&& value) { SetCreationDate(std::move(value)); return *this;}
220 
221 
222     /**
223      * <p>The date the access policy was last updated, in Unix epoch time.</p>
224      */
GetLastUpdateDate()225     inline const Aws::Utils::DateTime& GetLastUpdateDate() const{ return m_lastUpdateDate; }
226 
227     /**
228      * <p>The date the access policy was last updated, in Unix epoch time.</p>
229      */
LastUpdateDateHasBeenSet()230     inline bool LastUpdateDateHasBeenSet() const { return m_lastUpdateDateHasBeenSet; }
231 
232     /**
233      * <p>The date the access policy was last updated, in Unix epoch time.</p>
234      */
SetLastUpdateDate(const Aws::Utils::DateTime & value)235     inline void SetLastUpdateDate(const Aws::Utils::DateTime& value) { m_lastUpdateDateHasBeenSet = true; m_lastUpdateDate = value; }
236 
237     /**
238      * <p>The date the access policy was last updated, in Unix epoch time.</p>
239      */
SetLastUpdateDate(Aws::Utils::DateTime && value)240     inline void SetLastUpdateDate(Aws::Utils::DateTime&& value) { m_lastUpdateDateHasBeenSet = true; m_lastUpdateDate = std::move(value); }
241 
242     /**
243      * <p>The date the access policy was last updated, in Unix epoch time.</p>
244      */
WithLastUpdateDate(const Aws::Utils::DateTime & value)245     inline AccessPolicySummary& WithLastUpdateDate(const Aws::Utils::DateTime& value) { SetLastUpdateDate(value); return *this;}
246 
247     /**
248      * <p>The date the access policy was last updated, in Unix epoch time.</p>
249      */
WithLastUpdateDate(Aws::Utils::DateTime && value)250     inline AccessPolicySummary& WithLastUpdateDate(Aws::Utils::DateTime&& value) { SetLastUpdateDate(std::move(value)); return *this;}
251 
252   private:
253 
254     Aws::String m_id;
255     bool m_idHasBeenSet;
256 
257     Identity m_identity;
258     bool m_identityHasBeenSet;
259 
260     Resource m_resource;
261     bool m_resourceHasBeenSet;
262 
263     Permission m_permission;
264     bool m_permissionHasBeenSet;
265 
266     Aws::Utils::DateTime m_creationDate;
267     bool m_creationDateHasBeenSet;
268 
269     Aws::Utils::DateTime m_lastUpdateDate;
270     bool m_lastUpdateDateHasBeenSet;
271   };
272 
273 } // namespace Model
274 } // namespace IoTSiteWise
275 } // namespace Aws
276