1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #pragma once
7 #include <aws/iot/IoT_EXPORTS.h>
8 #include <aws/iot/IoTRequest.h>
9 #include <aws/core/utils/memory/stl/AWSString.h>
10 #include <aws/iot/model/ThingGroupProperties.h>
11 #include <utility>
12 
13 namespace Aws
14 {
15 namespace IoT
16 {
17 namespace Model
18 {
19 
20   /**
21    */
22   class AWS_IOT_API UpdateThingGroupRequest : public IoTRequest
23   {
24   public:
25     UpdateThingGroupRequest();
26 
27     // Service request name is the Operation name which will send this request out,
28     // each operation should has unique request name, so that we can get operation's name from this request.
29     // Note: this is not true for response, multiple operations may have the same response name,
30     // so we can not get operation's name from response.
GetServiceRequestName()31     inline virtual const char* GetServiceRequestName() const override { return "UpdateThingGroup"; }
32 
33     Aws::String SerializePayload() const override;
34 
35 
36     /**
37      * <p>The thing group to update.</p>
38      */
GetThingGroupName()39     inline const Aws::String& GetThingGroupName() const{ return m_thingGroupName; }
40 
41     /**
42      * <p>The thing group to update.</p>
43      */
ThingGroupNameHasBeenSet()44     inline bool ThingGroupNameHasBeenSet() const { return m_thingGroupNameHasBeenSet; }
45 
46     /**
47      * <p>The thing group to update.</p>
48      */
SetThingGroupName(const Aws::String & value)49     inline void SetThingGroupName(const Aws::String& value) { m_thingGroupNameHasBeenSet = true; m_thingGroupName = value; }
50 
51     /**
52      * <p>The thing group to update.</p>
53      */
SetThingGroupName(Aws::String && value)54     inline void SetThingGroupName(Aws::String&& value) { m_thingGroupNameHasBeenSet = true; m_thingGroupName = std::move(value); }
55 
56     /**
57      * <p>The thing group to update.</p>
58      */
SetThingGroupName(const char * value)59     inline void SetThingGroupName(const char* value) { m_thingGroupNameHasBeenSet = true; m_thingGroupName.assign(value); }
60 
61     /**
62      * <p>The thing group to update.</p>
63      */
WithThingGroupName(const Aws::String & value)64     inline UpdateThingGroupRequest& WithThingGroupName(const Aws::String& value) { SetThingGroupName(value); return *this;}
65 
66     /**
67      * <p>The thing group to update.</p>
68      */
WithThingGroupName(Aws::String && value)69     inline UpdateThingGroupRequest& WithThingGroupName(Aws::String&& value) { SetThingGroupName(std::move(value)); return *this;}
70 
71     /**
72      * <p>The thing group to update.</p>
73      */
WithThingGroupName(const char * value)74     inline UpdateThingGroupRequest& WithThingGroupName(const char* value) { SetThingGroupName(value); return *this;}
75 
76 
77     /**
78      * <p>The thing group properties.</p>
79      */
GetThingGroupProperties()80     inline const ThingGroupProperties& GetThingGroupProperties() const{ return m_thingGroupProperties; }
81 
82     /**
83      * <p>The thing group properties.</p>
84      */
ThingGroupPropertiesHasBeenSet()85     inline bool ThingGroupPropertiesHasBeenSet() const { return m_thingGroupPropertiesHasBeenSet; }
86 
87     /**
88      * <p>The thing group properties.</p>
89      */
SetThingGroupProperties(const ThingGroupProperties & value)90     inline void SetThingGroupProperties(const ThingGroupProperties& value) { m_thingGroupPropertiesHasBeenSet = true; m_thingGroupProperties = value; }
91 
92     /**
93      * <p>The thing group properties.</p>
94      */
SetThingGroupProperties(ThingGroupProperties && value)95     inline void SetThingGroupProperties(ThingGroupProperties&& value) { m_thingGroupPropertiesHasBeenSet = true; m_thingGroupProperties = std::move(value); }
96 
97     /**
98      * <p>The thing group properties.</p>
99      */
WithThingGroupProperties(const ThingGroupProperties & value)100     inline UpdateThingGroupRequest& WithThingGroupProperties(const ThingGroupProperties& value) { SetThingGroupProperties(value); return *this;}
101 
102     /**
103      * <p>The thing group properties.</p>
104      */
WithThingGroupProperties(ThingGroupProperties && value)105     inline UpdateThingGroupRequest& WithThingGroupProperties(ThingGroupProperties&& value) { SetThingGroupProperties(std::move(value)); return *this;}
106 
107 
108     /**
109      * <p>The expected version of the thing group. If this does not match the version
110      * of the thing group being updated, the update will fail.</p>
111      */
GetExpectedVersion()112     inline long long GetExpectedVersion() const{ return m_expectedVersion; }
113 
114     /**
115      * <p>The expected version of the thing group. If this does not match the version
116      * of the thing group being updated, the update will fail.</p>
117      */
ExpectedVersionHasBeenSet()118     inline bool ExpectedVersionHasBeenSet() const { return m_expectedVersionHasBeenSet; }
119 
120     /**
121      * <p>The expected version of the thing group. If this does not match the version
122      * of the thing group being updated, the update will fail.</p>
123      */
SetExpectedVersion(long long value)124     inline void SetExpectedVersion(long long value) { m_expectedVersionHasBeenSet = true; m_expectedVersion = value; }
125 
126     /**
127      * <p>The expected version of the thing group. If this does not match the version
128      * of the thing group being updated, the update will fail.</p>
129      */
WithExpectedVersion(long long value)130     inline UpdateThingGroupRequest& WithExpectedVersion(long long value) { SetExpectedVersion(value); return *this;}
131 
132   private:
133 
134     Aws::String m_thingGroupName;
135     bool m_thingGroupNameHasBeenSet;
136 
137     ThingGroupProperties m_thingGroupProperties;
138     bool m_thingGroupPropertiesHasBeenSet;
139 
140     long long m_expectedVersion;
141     bool m_expectedVersionHasBeenSet;
142   };
143 
144 } // namespace Model
145 } // namespace IoT
146 } // namespace Aws
147