AWS SDK for C++

AWS SDK for C++ Version 1.11.748

Loading...
Searching...
No Matches
IsAuthorizedRequest.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/verifiedpermissions/VerifiedPermissionsRequest.h>
9#include <aws/verifiedpermissions/VerifiedPermissions_EXPORTS.h>
10#include <aws/verifiedpermissions/model/ActionIdentifier.h>
11#include <aws/verifiedpermissions/model/ContextDefinition.h>
12#include <aws/verifiedpermissions/model/EntitiesDefinition.h>
13#include <aws/verifiedpermissions/model/EntityIdentifier.h>
14
15#include <utility>
16
17namespace Aws {
18namespace VerifiedPermissions {
19namespace Model {
20
24 public:
25 AWS_VERIFIEDPERMISSIONS_API IsAuthorizedRequest() = default;
26
27 // Service request name is the Operation name which will send this request out,
28 // each operation should has unique request name, so that we can get operation's name from this request.
29 // Note: this is not true for response, multiple operations may have the same response name,
30 // so we can not get operation's name from response.
31 inline virtual const char* GetServiceRequestName() const override { return "IsAuthorized"; }
32
33 AWS_VERIFIEDPERMISSIONS_API Aws::String SerializePayload() const override;
34
35 AWS_VERIFIEDPERMISSIONS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
36
38
42 inline const Aws::String& GetPolicyStoreId() const { return m_policyStoreId; }
43 inline bool PolicyStoreIdHasBeenSet() const { return m_policyStoreIdHasBeenSet; }
44 template <typename PolicyStoreIdT = Aws::String>
45 void SetPolicyStoreId(PolicyStoreIdT&& value) {
46 m_policyStoreIdHasBeenSet = true;
47 m_policyStoreId = std::forward<PolicyStoreIdT>(value);
48 }
49 template <typename PolicyStoreIdT = Aws::String>
50 IsAuthorizedRequest& WithPolicyStoreId(PolicyStoreIdT&& value) {
51 SetPolicyStoreId(std::forward<PolicyStoreIdT>(value));
52 return *this;
53 }
55
57
61 inline const EntityIdentifier& GetPrincipal() const { return m_principal; }
62 inline bool PrincipalHasBeenSet() const { return m_principalHasBeenSet; }
63 template <typename PrincipalT = EntityIdentifier>
64 void SetPrincipal(PrincipalT&& value) {
65 m_principalHasBeenSet = true;
66 m_principal = std::forward<PrincipalT>(value);
67 }
68 template <typename PrincipalT = EntityIdentifier>
69 IsAuthorizedRequest& WithPrincipal(PrincipalT&& value) {
70 SetPrincipal(std::forward<PrincipalT>(value));
71 return *this;
72 }
74
76
80 inline const ActionIdentifier& GetAction() const { return m_action; }
81 inline bool ActionHasBeenSet() const { return m_actionHasBeenSet; }
82 template <typename ActionT = ActionIdentifier>
83 void SetAction(ActionT&& value) {
84 m_actionHasBeenSet = true;
85 m_action = std::forward<ActionT>(value);
86 }
87 template <typename ActionT = ActionIdentifier>
88 IsAuthorizedRequest& WithAction(ActionT&& value) {
89 SetAction(std::forward<ActionT>(value));
90 return *this;
91 }
93
95
99 inline const EntityIdentifier& GetResource() const { return m_resource; }
100 inline bool ResourceHasBeenSet() const { return m_resourceHasBeenSet; }
101 template <typename ResourceT = EntityIdentifier>
102 void SetResource(ResourceT&& value) {
103 m_resourceHasBeenSet = true;
104 m_resource = std::forward<ResourceT>(value);
105 }
106 template <typename ResourceT = EntityIdentifier>
107 IsAuthorizedRequest& WithResource(ResourceT&& value) {
108 SetResource(std::forward<ResourceT>(value));
109 return *this;
110 }
112
114
118 inline const ContextDefinition& GetContext() const { return m_context; }
119 inline bool ContextHasBeenSet() const { return m_contextHasBeenSet; }
120 template <typename ContextT = ContextDefinition>
121 void SetContext(ContextT&& value) {
122 m_contextHasBeenSet = true;
123 m_context = std::forward<ContextT>(value);
124 }
125 template <typename ContextT = ContextDefinition>
126 IsAuthorizedRequest& WithContext(ContextT&& value) {
127 SetContext(std::forward<ContextT>(value));
128 return *this;
129 }
131
133
142 inline const EntitiesDefinition& GetEntities() const { return m_entities; }
143 inline bool EntitiesHasBeenSet() const { return m_entitiesHasBeenSet; }
144 template <typename EntitiesT = EntitiesDefinition>
145 void SetEntities(EntitiesT&& value) {
146 m_entitiesHasBeenSet = true;
147 m_entities = std::forward<EntitiesT>(value);
148 }
149 template <typename EntitiesT = EntitiesDefinition>
150 IsAuthorizedRequest& WithEntities(EntitiesT&& value) {
151 SetEntities(std::forward<EntitiesT>(value));
152 return *this;
153 }
155 private:
156 Aws::String m_policyStoreId;
157
158 EntityIdentifier m_principal;
159
160 ActionIdentifier m_action;
161
162 EntityIdentifier m_resource;
163
164 ContextDefinition m_context;
165
166 EntitiesDefinition m_entities;
167 bool m_policyStoreIdHasBeenSet = false;
168 bool m_principalHasBeenSet = false;
169 bool m_actionHasBeenSet = false;
170 bool m_resourceHasBeenSet = false;
171 bool m_contextHasBeenSet = false;
172 bool m_entitiesHasBeenSet = false;
173};
174
175} // namespace Model
176} // namespace VerifiedPermissions
177} // namespace Aws
AWS_VERIFIEDPERMISSIONS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
IsAuthorizedRequest & WithContext(ContextT &&value)
IsAuthorizedRequest & WithResource(ResourceT &&value)
AWS_VERIFIEDPERMISSIONS_API IsAuthorizedRequest()=default
IsAuthorizedRequest & WithAction(ActionT &&value)
virtual const char * GetServiceRequestName() const override
IsAuthorizedRequest & WithPrincipal(PrincipalT &&value)
IsAuthorizedRequest & WithEntities(EntitiesT &&value)
AWS_VERIFIEDPERMISSIONS_API Aws::String SerializePayload() const override
IsAuthorizedRequest & WithPolicyStoreId(PolicyStoreIdT &&value)
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String