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/accessanalyzer/AccessAnalyzer_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSString.h>
9 #include <utility>
10 
11 namespace Aws
12 {
13 namespace Utils
14 {
15 namespace Json
16 {
17   class JsonValue;
18   class JsonView;
19 } // namespace Json
20 } // namespace Utils
21 namespace AccessAnalyzer
22 {
23 namespace Model
24 {
25 
26   /**
27    * <p>You specify each grantee as a type-value pair using one of these types. You
28    * can specify only one type of grantee. For more information, see <a
29    * href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAcl.html">PutBucketAcl</a>.</p><p><h3>See
30    * Also:</h3>   <a
31    * href="http://docs.aws.amazon.com/goto/WebAPI/accessanalyzer-2019-11-01/AclGrantee">AWS
32    * API Reference</a></p>
33    */
34   class AWS_ACCESSANALYZER_API AclGrantee
35   {
36   public:
37     AclGrantee();
38     AclGrantee(Aws::Utils::Json::JsonView jsonValue);
39     AclGrantee& operator=(Aws::Utils::Json::JsonView jsonValue);
40     Aws::Utils::Json::JsonValue Jsonize() const;
41 
42 
43     /**
44      * <p>The value specified is the canonical user ID of an Amazon Web Services
45      * account.</p>
46      */
GetId()47     inline const Aws::String& GetId() const{ return m_id; }
48 
49     /**
50      * <p>The value specified is the canonical user ID of an Amazon Web Services
51      * account.</p>
52      */
IdHasBeenSet()53     inline bool IdHasBeenSet() const { return m_idHasBeenSet; }
54 
55     /**
56      * <p>The value specified is the canonical user ID of an Amazon Web Services
57      * account.</p>
58      */
SetId(const Aws::String & value)59     inline void SetId(const Aws::String& value) { m_idHasBeenSet = true; m_id = value; }
60 
61     /**
62      * <p>The value specified is the canonical user ID of an Amazon Web Services
63      * account.</p>
64      */
SetId(Aws::String && value)65     inline void SetId(Aws::String&& value) { m_idHasBeenSet = true; m_id = std::move(value); }
66 
67     /**
68      * <p>The value specified is the canonical user ID of an Amazon Web Services
69      * account.</p>
70      */
SetId(const char * value)71     inline void SetId(const char* value) { m_idHasBeenSet = true; m_id.assign(value); }
72 
73     /**
74      * <p>The value specified is the canonical user ID of an Amazon Web Services
75      * account.</p>
76      */
WithId(const Aws::String & value)77     inline AclGrantee& WithId(const Aws::String& value) { SetId(value); return *this;}
78 
79     /**
80      * <p>The value specified is the canonical user ID of an Amazon Web Services
81      * account.</p>
82      */
WithId(Aws::String && value)83     inline AclGrantee& WithId(Aws::String&& value) { SetId(std::move(value)); return *this;}
84 
85     /**
86      * <p>The value specified is the canonical user ID of an Amazon Web Services
87      * account.</p>
88      */
WithId(const char * value)89     inline AclGrantee& WithId(const char* value) { SetId(value); return *this;}
90 
91 
92     /**
93      * <p>Used for granting permissions to a predefined group.</p>
94      */
GetUri()95     inline const Aws::String& GetUri() const{ return m_uri; }
96 
97     /**
98      * <p>Used for granting permissions to a predefined group.</p>
99      */
UriHasBeenSet()100     inline bool UriHasBeenSet() const { return m_uriHasBeenSet; }
101 
102     /**
103      * <p>Used for granting permissions to a predefined group.</p>
104      */
SetUri(const Aws::String & value)105     inline void SetUri(const Aws::String& value) { m_uriHasBeenSet = true; m_uri = value; }
106 
107     /**
108      * <p>Used for granting permissions to a predefined group.</p>
109      */
SetUri(Aws::String && value)110     inline void SetUri(Aws::String&& value) { m_uriHasBeenSet = true; m_uri = std::move(value); }
111 
112     /**
113      * <p>Used for granting permissions to a predefined group.</p>
114      */
SetUri(const char * value)115     inline void SetUri(const char* value) { m_uriHasBeenSet = true; m_uri.assign(value); }
116 
117     /**
118      * <p>Used for granting permissions to a predefined group.</p>
119      */
WithUri(const Aws::String & value)120     inline AclGrantee& WithUri(const Aws::String& value) { SetUri(value); return *this;}
121 
122     /**
123      * <p>Used for granting permissions to a predefined group.</p>
124      */
WithUri(Aws::String && value)125     inline AclGrantee& WithUri(Aws::String&& value) { SetUri(std::move(value)); return *this;}
126 
127     /**
128      * <p>Used for granting permissions to a predefined group.</p>
129      */
WithUri(const char * value)130     inline AclGrantee& WithUri(const char* value) { SetUri(value); return *this;}
131 
132   private:
133 
134     Aws::String m_id;
135     bool m_idHasBeenSet;
136 
137     Aws::String m_uri;
138     bool m_uriHasBeenSet;
139   };
140 
141 } // namespace Model
142 } // namespace AccessAnalyzer
143 } // namespace Aws
144