AWS SDK for C++

AWS SDK for C++ Version 1.11.780

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
48 inline const Aws::String& GetPolicyStoreId() const { return m_policyStoreId; }
49 inline bool PolicyStoreIdHasBeenSet() const { return m_policyStoreIdHasBeenSet; }
50 template <typename PolicyStoreIdT = Aws::String>
51 void SetPolicyStoreId(PolicyStoreIdT&& value) {
52 m_policyStoreIdHasBeenSet = true;
53 m_policyStoreId = std::forward<PolicyStoreIdT>(value);
54 }
55 template <typename PolicyStoreIdT = Aws::String>
56 IsAuthorizedRequest& WithPolicyStoreId(PolicyStoreIdT&& value) {
57 SetPolicyStoreId(std::forward<PolicyStoreIdT>(value));
58 return *this;
59 }
61
63
67 inline const EntityIdentifier& GetPrincipal() const { return m_principal; }
68 inline bool PrincipalHasBeenSet() const { return m_principalHasBeenSet; }
69 template <typename PrincipalT = EntityIdentifier>
70 void SetPrincipal(PrincipalT&& value) {
71 m_principalHasBeenSet = true;
72 m_principal = std::forward<PrincipalT>(value);
73 }
74 template <typename PrincipalT = EntityIdentifier>
75 IsAuthorizedRequest& WithPrincipal(PrincipalT&& value) {
76 SetPrincipal(std::forward<PrincipalT>(value));
77 return *this;
78 }
80
82
86 inline const ActionIdentifier& GetAction() const { return m_action; }
87 inline bool ActionHasBeenSet() const { return m_actionHasBeenSet; }
88 template <typename ActionT = ActionIdentifier>
89 void SetAction(ActionT&& value) {
90 m_actionHasBeenSet = true;
91 m_action = std::forward<ActionT>(value);
92 }
93 template <typename ActionT = ActionIdentifier>
94 IsAuthorizedRequest& WithAction(ActionT&& value) {
95 SetAction(std::forward<ActionT>(value));
96 return *this;
97 }
99
101
105 inline const EntityIdentifier& GetResource() const { return m_resource; }
106 inline bool ResourceHasBeenSet() const { return m_resourceHasBeenSet; }
107 template <typename ResourceT = EntityIdentifier>
108 void SetResource(ResourceT&& value) {
109 m_resourceHasBeenSet = true;
110 m_resource = std::forward<ResourceT>(value);
111 }
112 template <typename ResourceT = EntityIdentifier>
113 IsAuthorizedRequest& WithResource(ResourceT&& value) {
114 SetResource(std::forward<ResourceT>(value));
115 return *this;
116 }
118
120
124 inline const ContextDefinition& GetContext() const { return m_context; }
125 inline bool ContextHasBeenSet() const { return m_contextHasBeenSet; }
126 template <typename ContextT = ContextDefinition>
127 void SetContext(ContextT&& value) {
128 m_contextHasBeenSet = true;
129 m_context = std::forward<ContextT>(value);
130 }
131 template <typename ContextT = ContextDefinition>
132 IsAuthorizedRequest& WithContext(ContextT&& value) {
133 SetContext(std::forward<ContextT>(value));
134 return *this;
135 }
137
139
148 inline const EntitiesDefinition& GetEntities() const { return m_entities; }
149 inline bool EntitiesHasBeenSet() const { return m_entitiesHasBeenSet; }
150 template <typename EntitiesT = EntitiesDefinition>
151 void SetEntities(EntitiesT&& value) {
152 m_entitiesHasBeenSet = true;
153 m_entities = std::forward<EntitiesT>(value);
154 }
155 template <typename EntitiesT = EntitiesDefinition>
156 IsAuthorizedRequest& WithEntities(EntitiesT&& value) {
157 SetEntities(std::forward<EntitiesT>(value));
158 return *this;
159 }
161 private:
162 Aws::String m_policyStoreId;
163
164 EntityIdentifier m_principal;
165
166 ActionIdentifier m_action;
167
168 EntityIdentifier m_resource;
169
170 ContextDefinition m_context;
171
172 EntitiesDefinition m_entities;
173 bool m_policyStoreIdHasBeenSet = false;
174 bool m_principalHasBeenSet = false;
175 bool m_actionHasBeenSet = false;
176 bool m_resourceHasBeenSet = false;
177 bool m_contextHasBeenSet = false;
178 bool m_entitiesHasBeenSet = false;
179};
180
181} // namespace Model
182} // namespace VerifiedPermissions
183} // 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