AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
IsAuthorizedRequest.h
1
6#pragma once
7#include <aws/verifiedpermissions/VerifiedPermissions_EXPORTS.h>
8#include <aws/verifiedpermissions/VerifiedPermissionsRequest.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/verifiedpermissions/model/EntityIdentifier.h>
11#include <aws/verifiedpermissions/model/ActionIdentifier.h>
12#include <aws/verifiedpermissions/model/ContextDefinition.h>
13#include <aws/verifiedpermissions/model/EntitiesDefinition.h>
14#include <utility>
15
16namespace Aws
17{
18namespace VerifiedPermissions
19{
20namespace Model
21{
22
26 {
27 public:
28 AWS_VERIFIEDPERMISSIONS_API IsAuthorizedRequest() = default;
29
30 // Service request name is the Operation name which will send this request out,
31 // each operation should has unique request name, so that we can get operation's name from this request.
32 // Note: this is not true for response, multiple operations may have the same response name,
33 // so we can not get operation's name from response.
34 inline virtual const char* GetServiceRequestName() const override { return "IsAuthorized"; }
35
36 AWS_VERIFIEDPERMISSIONS_API Aws::String SerializePayload() const override;
37
38 AWS_VERIFIEDPERMISSIONS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
39
40
42
46 inline const Aws::String& GetPolicyStoreId() const { return m_policyStoreId; }
47 inline bool PolicyStoreIdHasBeenSet() const { return m_policyStoreIdHasBeenSet; }
48 template<typename PolicyStoreIdT = Aws::String>
49 void SetPolicyStoreId(PolicyStoreIdT&& value) { m_policyStoreIdHasBeenSet = true; m_policyStoreId = std::forward<PolicyStoreIdT>(value); }
50 template<typename PolicyStoreIdT = Aws::String>
51 IsAuthorizedRequest& WithPolicyStoreId(PolicyStoreIdT&& value) { SetPolicyStoreId(std::forward<PolicyStoreIdT>(value)); return *this;}
53
55
59 inline const EntityIdentifier& GetPrincipal() const { return m_principal; }
60 inline bool PrincipalHasBeenSet() const { return m_principalHasBeenSet; }
61 template<typename PrincipalT = EntityIdentifier>
62 void SetPrincipal(PrincipalT&& value) { m_principalHasBeenSet = true; m_principal = std::forward<PrincipalT>(value); }
63 template<typename PrincipalT = EntityIdentifier>
64 IsAuthorizedRequest& WithPrincipal(PrincipalT&& value) { SetPrincipal(std::forward<PrincipalT>(value)); return *this;}
66
68
72 inline const ActionIdentifier& GetAction() const { return m_action; }
73 inline bool ActionHasBeenSet() const { return m_actionHasBeenSet; }
74 template<typename ActionT = ActionIdentifier>
75 void SetAction(ActionT&& value) { m_actionHasBeenSet = true; m_action = std::forward<ActionT>(value); }
76 template<typename ActionT = ActionIdentifier>
77 IsAuthorizedRequest& WithAction(ActionT&& value) { SetAction(std::forward<ActionT>(value)); return *this;}
79
81
85 inline const EntityIdentifier& GetResource() const { return m_resource; }
86 inline bool ResourceHasBeenSet() const { return m_resourceHasBeenSet; }
87 template<typename ResourceT = EntityIdentifier>
88 void SetResource(ResourceT&& value) { m_resourceHasBeenSet = true; m_resource = std::forward<ResourceT>(value); }
89 template<typename ResourceT = EntityIdentifier>
90 IsAuthorizedRequest& WithResource(ResourceT&& value) { SetResource(std::forward<ResourceT>(value)); return *this;}
92
94
98 inline const ContextDefinition& GetContext() const { return m_context; }
99 inline bool ContextHasBeenSet() const { return m_contextHasBeenSet; }
100 template<typename ContextT = ContextDefinition>
101 void SetContext(ContextT&& value) { m_contextHasBeenSet = true; m_context = std::forward<ContextT>(value); }
102 template<typename ContextT = ContextDefinition>
103 IsAuthorizedRequest& WithContext(ContextT&& value) { SetContext(std::forward<ContextT>(value)); return *this;}
105
107
116 inline const EntitiesDefinition& GetEntities() const { return m_entities; }
117 inline bool EntitiesHasBeenSet() const { return m_entitiesHasBeenSet; }
118 template<typename EntitiesT = EntitiesDefinition>
119 void SetEntities(EntitiesT&& value) { m_entitiesHasBeenSet = true; m_entities = std::forward<EntitiesT>(value); }
120 template<typename EntitiesT = EntitiesDefinition>
121 IsAuthorizedRequest& WithEntities(EntitiesT&& value) { SetEntities(std::forward<EntitiesT>(value)); return *this;}
123 private:
124
125 Aws::String m_policyStoreId;
126 bool m_policyStoreIdHasBeenSet = false;
127
128 EntityIdentifier m_principal;
129 bool m_principalHasBeenSet = false;
130
131 ActionIdentifier m_action;
132 bool m_actionHasBeenSet = false;
133
134 EntityIdentifier m_resource;
135 bool m_resourceHasBeenSet = false;
136
137 ContextDefinition m_context;
138 bool m_contextHasBeenSet = false;
139
140 EntitiesDefinition m_entities;
141 bool m_entitiesHasBeenSet = false;
142 };
143
144} // namespace Model
145} // namespace VerifiedPermissions
146} // 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