AWS SDK for C++  1.9.66
AWS SDK for C++
AttachPolicyRequest.h
Go to the documentation of this file.
1 
6 #pragma once
10 #include <utility>
11 
12 namespace Aws
13 {
14 namespace Organizations
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 
35 
36 
44  inline const Aws::String& GetPolicyId() const{ return m_policyId; }
45 
53  inline bool PolicyIdHasBeenSet() const { return m_policyIdHasBeenSet; }
54 
62  inline void SetPolicyId(const Aws::String& value) { m_policyIdHasBeenSet = true; m_policyId = value; }
63 
71  inline void SetPolicyId(Aws::String&& value) { m_policyIdHasBeenSet = true; m_policyId = std::move(value); }
72 
80  inline void SetPolicyId(const char* value) { m_policyIdHasBeenSet = true; m_policyId.assign(value); }
81 
89  inline AttachPolicyRequest& WithPolicyId(const Aws::String& value) { SetPolicyId(value); return *this;}
90 
98  inline AttachPolicyRequest& WithPolicyId(Aws::String&& value) { SetPolicyId(std::move(value)); return *this;}
99 
107  inline AttachPolicyRequest& WithPolicyId(const char* value) { SetPolicyId(value); return *this;}
108 
109 
123  inline const Aws::String& GetTargetId() const{ return m_targetId; }
124 
138  inline bool TargetIdHasBeenSet() const { return m_targetIdHasBeenSet; }
139 
153  inline void SetTargetId(const Aws::String& value) { m_targetIdHasBeenSet = true; m_targetId = value; }
154 
168  inline void SetTargetId(Aws::String&& value) { m_targetIdHasBeenSet = true; m_targetId = std::move(value); }
169 
183  inline void SetTargetId(const char* value) { m_targetIdHasBeenSet = true; m_targetId.assign(value); }
184 
198  inline AttachPolicyRequest& WithTargetId(const Aws::String& value) { SetTargetId(value); return *this;}
199 
213  inline AttachPolicyRequest& WithTargetId(Aws::String&& value) { SetTargetId(std::move(value)); return *this;}
214 
228  inline AttachPolicyRequest& WithTargetId(const char* value) { SetTargetId(value); return *this;}
229 
230  private:
231 
232  Aws::String m_policyId;
233  bool m_policyIdHasBeenSet;
234 
235  Aws::String m_targetId;
236  bool m_targetIdHasBeenSet;
237  };
238 
239 } // namespace Model
240 } // namespace Organizations
241 } // namespace Aws
Aws::Organizations::Model::AttachPolicyRequest::SetPolicyId
void SetPolicyId(Aws::String &&value)
Definition: AttachPolicyRequest.h:71
Aws::Organizations::Model::AttachPolicyRequest::SerializePayload
Aws::String SerializePayload() const override
Aws::Http::HeaderValueCollection
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
Definition: HttpTypes.h:53
Aws::Organizations::Model::AttachPolicyRequest::SetPolicyId
void SetPolicyId(const Aws::String &value)
Definition: AttachPolicyRequest.h:62
Aws::Organizations::Model::AttachPolicyRequest::WithTargetId
AttachPolicyRequest & WithTargetId(const char *value)
Definition: AttachPolicyRequest.h:228
Aws::Organizations::Model::AttachPolicyRequest::TargetIdHasBeenSet
bool TargetIdHasBeenSet() const
Definition: AttachPolicyRequest.h:138
Aws::Organizations::Model::AttachPolicyRequest::PolicyIdHasBeenSet
bool PolicyIdHasBeenSet() const
Definition: AttachPolicyRequest.h:53
Aws::Organizations::Model::AttachPolicyRequest::GetRequestSpecificHeaders
Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
AWS_ORGANIZATIONS_API
#define AWS_ORGANIZATIONS_API
Definition: Organizations_EXPORTS.h:28
Aws::Organizations::Model::AttachPolicyRequest::WithTargetId
AttachPolicyRequest & WithTargetId(const Aws::String &value)
Definition: AttachPolicyRequest.h:198
Aws::Organizations::OrganizationsRequest
Definition: OrganizationsRequest.h:17
Aws::Organizations::Model::AttachPolicyRequest::SetPolicyId
void SetPolicyId(const char *value)
Definition: AttachPolicyRequest.h:80
Aws::Organizations::Model::AttachPolicyRequest::WithPolicyId
AttachPolicyRequest & WithPolicyId(const char *value)
Definition: AttachPolicyRequest.h:107
Aws::Organizations::Model::AttachPolicyRequest::GetServiceRequestName
virtual const char * GetServiceRequestName() const override
Definition: AttachPolicyRequest.h:30
Aws::Organizations::Model::AttachPolicyRequest::SetTargetId
void SetTargetId(Aws::String &&value)
Definition: AttachPolicyRequest.h:168
AWSString.h
Aws::Organizations::Model::AttachPolicyRequest::WithPolicyId
AttachPolicyRequest & WithPolicyId(const Aws::String &value)
Definition: AttachPolicyRequest.h:89
Aws::Organizations::Model::AttachPolicyRequest::GetPolicyId
const Aws::String & GetPolicyId() const
Definition: AttachPolicyRequest.h:44
Aws::Organizations::Model::AttachPolicyRequest::SetTargetId
void SetTargetId(const char *value)
Definition: AttachPolicyRequest.h:183
Aws
Definition: AccessManagementClient.h:15
Aws::Organizations::Model::AttachPolicyRequest
Definition: AttachPolicyRequest.h:22
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Organizations_EXPORTS.h
Aws::Organizations::Model::AttachPolicyRequest::AttachPolicyRequest
AttachPolicyRequest()
Aws::Organizations::Model::AttachPolicyRequest::WithTargetId
AttachPolicyRequest & WithTargetId(Aws::String &&value)
Definition: AttachPolicyRequest.h:213
Aws::Organizations::Model::AttachPolicyRequest::SetTargetId
void SetTargetId(const Aws::String &value)
Definition: AttachPolicyRequest.h:153
Aws::Organizations::Model::AttachPolicyRequest::GetTargetId
const Aws::String & GetTargetId() const
Definition: AttachPolicyRequest.h:123
Aws::Organizations::Model::AttachPolicyRequest::WithPolicyId
AttachPolicyRequest & WithPolicyId(Aws::String &&value)
Definition: AttachPolicyRequest.h:98
OrganizationsRequest.h