AWS SDK for C++  1.9.158
AWS SDK for C++
PutResourcePolicyRequest.h
Go to the documentation of this file.
1 
6 #pragma once
10 #include <utility>
11 
12 namespace Aws
13 {
14 namespace NetworkFirewall
15 {
16 namespace Model
17 {
18 
22  {
23  public:
25 
26  // Service request name is the Operation name which will send this request out,
27  // each operation should has unique request name, so that we can get operation's name from this request.
28  // Note: this is not true for response, multiple operations may have the same response name,
29  // so we can not get operation's name from response.
30  inline virtual const char* GetServiceRequestName() const override { return "PutResourcePolicy"; }
31 
32  Aws::String SerializePayload() const override;
33 
35 
36 
41  inline const Aws::String& GetResourceArn() const{ return m_resourceArn; }
42 
47  inline bool ResourceArnHasBeenSet() const { return m_resourceArnHasBeenSet; }
48 
53  inline void SetResourceArn(const Aws::String& value) { m_resourceArnHasBeenSet = true; m_resourceArn = value; }
54 
59  inline void SetResourceArn(Aws::String&& value) { m_resourceArnHasBeenSet = true; m_resourceArn = std::move(value); }
60 
65  inline void SetResourceArn(const char* value) { m_resourceArnHasBeenSet = true; m_resourceArn.assign(value); }
66 
71  inline PutResourcePolicyRequest& WithResourceArn(const Aws::String& value) { SetResourceArn(value); return *this;}
72 
77  inline PutResourcePolicyRequest& WithResourceArn(Aws::String&& value) { SetResourceArn(std::move(value)); return *this;}
78 
83  inline PutResourcePolicyRequest& WithResourceArn(const char* value) { SetResourceArn(value); return *this;}
84 
85 
103  inline const Aws::String& GetPolicy() const{ return m_policy; }
104 
122  inline bool PolicyHasBeenSet() const { return m_policyHasBeenSet; }
123 
141  inline void SetPolicy(const Aws::String& value) { m_policyHasBeenSet = true; m_policy = value; }
142 
160  inline void SetPolicy(Aws::String&& value) { m_policyHasBeenSet = true; m_policy = std::move(value); }
161 
179  inline void SetPolicy(const char* value) { m_policyHasBeenSet = true; m_policy.assign(value); }
180 
198  inline PutResourcePolicyRequest& WithPolicy(const Aws::String& value) { SetPolicy(value); return *this;}
199 
217  inline PutResourcePolicyRequest& WithPolicy(Aws::String&& value) { SetPolicy(std::move(value)); return *this;}
218 
236  inline PutResourcePolicyRequest& WithPolicy(const char* value) { SetPolicy(value); return *this;}
237 
238  private:
239 
240  Aws::String m_resourceArn;
241  bool m_resourceArnHasBeenSet;
242 
243  Aws::String m_policy;
244  bool m_policyHasBeenSet;
245  };
246 
247 } // namespace Model
248 } // namespace NetworkFirewall
249 } // namespace Aws
Aws::NetworkFirewall::Model::PutResourcePolicyRequest::WithResourceArn
PutResourcePolicyRequest & WithResourceArn(Aws::String &&value)
Definition: PutResourcePolicyRequest.h:77
Aws::NetworkFirewall::Model::PutResourcePolicyRequest::SetPolicy
void SetPolicy(const Aws::String &value)
Definition: PutResourcePolicyRequest.h:141
Aws::NetworkFirewall::Model::PutResourcePolicyRequest::SerializePayload
Aws::String SerializePayload() const override
Aws::NetworkFirewall::Model::PutResourcePolicyRequest::WithPolicy
PutResourcePolicyRequest & WithPolicy(const char *value)
Definition: PutResourcePolicyRequest.h:236
Aws::NetworkFirewall::NetworkFirewallRequest
Definition: NetworkFirewallRequest.h:17
Aws::Http::HeaderValueCollection
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
Definition: HttpTypes.h:53
Aws::NetworkFirewall::Model::PutResourcePolicyRequest::WithResourceArn
PutResourcePolicyRequest & WithResourceArn(const char *value)
Definition: PutResourcePolicyRequest.h:83
NetworkFirewallRequest.h
Aws::NetworkFirewall::Model::PutResourcePolicyRequest::GetServiceRequestName
virtual const char * GetServiceRequestName() const override
Definition: PutResourcePolicyRequest.h:30
Aws::NetworkFirewall::Model::PutResourcePolicyRequest::SetResourceArn
void SetResourceArn(const Aws::String &value)
Definition: PutResourcePolicyRequest.h:53
Aws::NetworkFirewall::Model::PutResourcePolicyRequest::GetPolicy
const Aws::String & GetPolicy() const
Definition: PutResourcePolicyRequest.h:103
Aws::NetworkFirewall::Model::PutResourcePolicyRequest::SetResourceArn
void SetResourceArn(Aws::String &&value)
Definition: PutResourcePolicyRequest.h:59
Aws::NetworkFirewall::Model::PutResourcePolicyRequest::WithPolicy
PutResourcePolicyRequest & WithPolicy(Aws::String &&value)
Definition: PutResourcePolicyRequest.h:217
Aws::NetworkFirewall::Model::PutResourcePolicyRequest::SetPolicy
void SetPolicy(const char *value)
Definition: PutResourcePolicyRequest.h:179
AWSString.h
AWS_NETWORKFIREWALL_API
#define AWS_NETWORKFIREWALL_API
Definition: NetworkFirewall_EXPORTS.h:28
Aws::NetworkFirewall::Model::PutResourcePolicyRequest::ResourceArnHasBeenSet
bool ResourceArnHasBeenSet() const
Definition: PutResourcePolicyRequest.h:47
Aws::NetworkFirewall::Model::PutResourcePolicyRequest::PutResourcePolicyRequest
PutResourcePolicyRequest()
Aws::NetworkFirewall::Model::PutResourcePolicyRequest::PolicyHasBeenSet
bool PolicyHasBeenSet() const
Definition: PutResourcePolicyRequest.h:122
Aws::NetworkFirewall::Model::PutResourcePolicyRequest::WithResourceArn
PutResourcePolicyRequest & WithResourceArn(const Aws::String &value)
Definition: PutResourcePolicyRequest.h:71
Aws::NetworkFirewall::Model::PutResourcePolicyRequest::GetRequestSpecificHeaders
Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
Aws
Definition: AccessManagementClient.h:15
Aws::NetworkFirewall::Model::PutResourcePolicyRequest
Definition: PutResourcePolicyRequest.h:22
Aws::NetworkFirewall::Model::PutResourcePolicyRequest::GetResourceArn
const Aws::String & GetResourceArn() const
Definition: PutResourcePolicyRequest.h:41
Aws::NetworkFirewall::Model::PutResourcePolicyRequest::SetResourceArn
void SetResourceArn(const char *value)
Definition: PutResourcePolicyRequest.h:65
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
NetworkFirewall_EXPORTS.h
Aws::NetworkFirewall::Model::PutResourcePolicyRequest::WithPolicy
PutResourcePolicyRequest & WithPolicy(const Aws::String &value)
Definition: PutResourcePolicyRequest.h:198
Aws::NetworkFirewall::Model::PutResourcePolicyRequest::SetPolicy
void SetPolicy(Aws::String &&value)
Definition: PutResourcePolicyRequest.h:160