AWS SDK for C++  1.9.124
AWS SDK for C++
AttachThingPrincipalRequest.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 
26  {
27  public:
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 "AttachThingPrincipal"; }
35 
36  Aws::String SerializePayload() const override;
37 
39 
40 
44  inline const Aws::String& GetThingName() const{ return m_thingName; }
45 
49  inline bool ThingNameHasBeenSet() const { return m_thingNameHasBeenSet; }
50 
54  inline void SetThingName(const Aws::String& value) { m_thingNameHasBeenSet = true; m_thingName = value; }
55 
59  inline void SetThingName(Aws::String&& value) { m_thingNameHasBeenSet = true; m_thingName = std::move(value); }
60 
64  inline void SetThingName(const char* value) { m_thingNameHasBeenSet = true; m_thingName.assign(value); }
65 
69  inline AttachThingPrincipalRequest& WithThingName(const Aws::String& value) { SetThingName(value); return *this;}
70 
74  inline AttachThingPrincipalRequest& WithThingName(Aws::String&& value) { SetThingName(std::move(value)); return *this;}
75 
79  inline AttachThingPrincipalRequest& WithThingName(const char* value) { SetThingName(value); return *this;}
80 
81 
86  inline const Aws::String& GetPrincipal() const{ return m_principal; }
87 
92  inline bool PrincipalHasBeenSet() const { return m_principalHasBeenSet; }
93 
98  inline void SetPrincipal(const Aws::String& value) { m_principalHasBeenSet = true; m_principal = value; }
99 
104  inline void SetPrincipal(Aws::String&& value) { m_principalHasBeenSet = true; m_principal = std::move(value); }
105 
110  inline void SetPrincipal(const char* value) { m_principalHasBeenSet = true; m_principal.assign(value); }
111 
116  inline AttachThingPrincipalRequest& WithPrincipal(const Aws::String& value) { SetPrincipal(value); return *this;}
117 
122  inline AttachThingPrincipalRequest& WithPrincipal(Aws::String&& value) { SetPrincipal(std::move(value)); return *this;}
123 
128  inline AttachThingPrincipalRequest& WithPrincipal(const char* value) { SetPrincipal(value); return *this;}
129 
130  private:
131 
132  Aws::String m_thingName;
133  bool m_thingNameHasBeenSet;
134 
135  Aws::String m_principal;
136  bool m_principalHasBeenSet;
137  };
138 
139 } // namespace Model
140 } // namespace IoT
141 } // namespace Aws
Aws::Http::HeaderValueCollection
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
Definition: HttpTypes.h:53
Aws::IoT::Model::AttachThingPrincipalRequest::SetPrincipal
void SetPrincipal(Aws::String &&value)
Definition: AttachThingPrincipalRequest.h:104
Aws::IoT::Model::AttachThingPrincipalRequest::SetPrincipal
void SetPrincipal(const Aws::String &value)
Definition: AttachThingPrincipalRequest.h:98
Aws::IoT::Model::AttachThingPrincipalRequest::ThingNameHasBeenSet
bool ThingNameHasBeenSet() const
Definition: AttachThingPrincipalRequest.h:49
Aws::IoT::Model::AttachThingPrincipalRequest::WithThingName
AttachThingPrincipalRequest & WithThingName(const Aws::String &value)
Definition: AttachThingPrincipalRequest.h:69
Aws::IoT::Model::AttachThingPrincipalRequest::SetThingName
void SetThingName(Aws::String &&value)
Definition: AttachThingPrincipalRequest.h:59
Aws::IoT::Model::AttachThingPrincipalRequest::WithPrincipal
AttachThingPrincipalRequest & WithPrincipal(const Aws::String &value)
Definition: AttachThingPrincipalRequest.h:116
Aws::IoT::Model::AttachThingPrincipalRequest::WithThingName
AttachThingPrincipalRequest & WithThingName(Aws::String &&value)
Definition: AttachThingPrincipalRequest.h:74
Aws::IoT::Model::AttachThingPrincipalRequest::PrincipalHasBeenSet
bool PrincipalHasBeenSet() const
Definition: AttachThingPrincipalRequest.h:92
Aws::IoT::Model::AttachThingPrincipalRequest
Definition: AttachThingPrincipalRequest.h:26
Aws::IoT::Model::AttachThingPrincipalRequest::SetThingName
void SetThingName(const char *value)
Definition: AttachThingPrincipalRequest.h:64
Aws::IoT::Model::AttachThingPrincipalRequest::SerializePayload
Aws::String SerializePayload() const override
Aws::IoT::Model::AttachThingPrincipalRequest::GetServiceRequestName
virtual const char * GetServiceRequestName() const override
Definition: AttachThingPrincipalRequest.h:34
Aws::IoT::Model::AttachThingPrincipalRequest::GetPrincipal
const Aws::String & GetPrincipal() const
Definition: AttachThingPrincipalRequest.h:86
AWSString.h
Aws::IoT::IoTRequest
Definition: IoTRequest.h:17
Aws::IoT::Model::AttachThingPrincipalRequest::SetPrincipal
void SetPrincipal(const char *value)
Definition: AttachThingPrincipalRequest.h:110
Aws::IoT::Model::AttachThingPrincipalRequest::AttachThingPrincipalRequest
AttachThingPrincipalRequest()
Aws::IoT::Model::AttachThingPrincipalRequest::WithThingName
AttachThingPrincipalRequest & WithThingName(const char *value)
Definition: AttachThingPrincipalRequest.h:79
Aws::IoT::Model::AttachThingPrincipalRequest::WithPrincipal
AttachThingPrincipalRequest & WithPrincipal(Aws::String &&value)
Definition: AttachThingPrincipalRequest.h:122
Aws::IoT::Model::AttachThingPrincipalRequest::WithPrincipal
AttachThingPrincipalRequest & WithPrincipal(const char *value)
Definition: AttachThingPrincipalRequest.h:128
Aws
Definition: AccessManagementClient.h:15
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::AttachThingPrincipalRequest::SetThingName
void SetThingName(const Aws::String &value)
Definition: AttachThingPrincipalRequest.h:54
IoTRequest.h
Aws::IoT::Model::AttachThingPrincipalRequest::GetThingName
const Aws::String & GetThingName() const
Definition: AttachThingPrincipalRequest.h:44
IoT_EXPORTS.h
Aws::IoT::Model::AttachThingPrincipalRequest::GetRequestSpecificHeaders
Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override