AWS SDK for C++  1.9.123
AWS SDK for C++
AttachPolicyRequest.h
Go to the documentation of this file.
1 
6 #pragma once
7 #include <aws/iot/IoT_EXPORTS.h>
8 #include <aws/iot/IoTRequest.h>
10 #include <utility>
11 
12 namespace Aws
13 {
14 namespace IoT
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 "AttachPolicy"; }
31 
32  Aws::String SerializePayload() const override;
33 
34 
38  inline const Aws::String& GetPolicyName() const{ return m_policyName; }
39 
43  inline bool PolicyNameHasBeenSet() const { return m_policyNameHasBeenSet; }
44 
48  inline void SetPolicyName(const Aws::String& value) { m_policyNameHasBeenSet = true; m_policyName = value; }
49 
53  inline void SetPolicyName(Aws::String&& value) { m_policyNameHasBeenSet = true; m_policyName = std::move(value); }
54 
58  inline void SetPolicyName(const char* value) { m_policyNameHasBeenSet = true; m_policyName.assign(value); }
59 
63  inline AttachPolicyRequest& WithPolicyName(const Aws::String& value) { SetPolicyName(value); return *this;}
64 
68  inline AttachPolicyRequest& WithPolicyName(Aws::String&& value) { SetPolicyName(std::move(value)); return *this;}
69 
73  inline AttachPolicyRequest& WithPolicyName(const char* value) { SetPolicyName(value); return *this;}
74 
75 
82  inline const Aws::String& GetTarget() const{ return m_target; }
83 
90  inline bool TargetHasBeenSet() const { return m_targetHasBeenSet; }
91 
98  inline void SetTarget(const Aws::String& value) { m_targetHasBeenSet = true; m_target = value; }
99 
106  inline void SetTarget(Aws::String&& value) { m_targetHasBeenSet = true; m_target = std::move(value); }
107 
114  inline void SetTarget(const char* value) { m_targetHasBeenSet = true; m_target.assign(value); }
115 
122  inline AttachPolicyRequest& WithTarget(const Aws::String& value) { SetTarget(value); return *this;}
123 
130  inline AttachPolicyRequest& WithTarget(Aws::String&& value) { SetTarget(std::move(value)); return *this;}
131 
138  inline AttachPolicyRequest& WithTarget(const char* value) { SetTarget(value); return *this;}
139 
140  private:
141 
142  Aws::String m_policyName;
143  bool m_policyNameHasBeenSet;
144 
145  Aws::String m_target;
146  bool m_targetHasBeenSet;
147  };
148 
149 } // namespace Model
150 } // namespace IoT
151 } // namespace Aws
Aws::IoT::Model::AttachPolicyRequest::SetTarget
void SetTarget(Aws::String &&value)
Definition: AttachPolicyRequest.h:106
Aws::IoT::Model::AttachPolicyRequest::GetPolicyName
const Aws::String & GetPolicyName() const
Definition: AttachPolicyRequest.h:38
Aws::IoT::Model::AttachPolicyRequest
Definition: AttachPolicyRequest.h:22
Aws::IoT::Model::AttachPolicyRequest::WithTarget
AttachPolicyRequest & WithTarget(const char *value)
Definition: AttachPolicyRequest.h:138
Aws::IoT::Model::AttachPolicyRequest::AttachPolicyRequest
AttachPolicyRequest()
Aws::IoT::Model::AttachPolicyRequest::SetPolicyName
void SetPolicyName(const Aws::String &value)
Definition: AttachPolicyRequest.h:48
Aws::IoT::Model::AttachPolicyRequest::GetTarget
const Aws::String & GetTarget() const
Definition: AttachPolicyRequest.h:82
Aws::IoT::Model::AttachPolicyRequest::TargetHasBeenSet
bool TargetHasBeenSet() const
Definition: AttachPolicyRequest.h:90
AWSString.h
Aws::IoT::IoTRequest
Definition: IoTRequest.h:17
Aws::IoT::Model::AttachPolicyRequest::WithTarget
AttachPolicyRequest & WithTarget(const Aws::String &value)
Definition: AttachPolicyRequest.h:122
Aws::IoT::Model::AttachPolicyRequest::WithTarget
AttachPolicyRequest & WithTarget(Aws::String &&value)
Definition: AttachPolicyRequest.h:130
Aws::IoT::Model::AttachPolicyRequest::WithPolicyName
AttachPolicyRequest & WithPolicyName(const Aws::String &value)
Definition: AttachPolicyRequest.h:63
Aws::IoT::Model::AttachPolicyRequest::SetPolicyName
void SetPolicyName(Aws::String &&value)
Definition: AttachPolicyRequest.h:53
Aws::IoT::Model::AttachPolicyRequest::SetTarget
void SetTarget(const char *value)
Definition: AttachPolicyRequest.h:114
Aws
Definition: AccessManagementClient.h:15
Aws::IoT::Model::AttachPolicyRequest::WithPolicyName
AttachPolicyRequest & WithPolicyName(const char *value)
Definition: AttachPolicyRequest.h:73
Aws::IoT::Model::AttachPolicyRequest::WithPolicyName
AttachPolicyRequest & WithPolicyName(Aws::String &&value)
Definition: AttachPolicyRequest.h:68
AWS_IOT_API
#define AWS_IOT_API
Definition: IoT_EXPORTS.h:28
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::IoT::Model::AttachPolicyRequest::GetServiceRequestName
virtual const char * GetServiceRequestName() const override
Definition: AttachPolicyRequest.h:30
Aws::IoT::Model::AttachPolicyRequest::SetTarget
void SetTarget(const Aws::String &value)
Definition: AttachPolicyRequest.h:98
IoTRequest.h
Aws::IoT::Model::AttachPolicyRequest::PolicyNameHasBeenSet
bool PolicyNameHasBeenSet() const
Definition: AttachPolicyRequest.h:43
Aws::IoT::Model::AttachPolicyRequest::SerializePayload
Aws::String SerializePayload() const override
IoT_EXPORTS.h
Aws::IoT::Model::AttachPolicyRequest::SetPolicyName
void SetPolicyName(const char *value)
Definition: AttachPolicyRequest.h:58