1 /**
2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 * SPDX-License-Identifier: Apache-2.0.
4 */
5
6 #include <aws/iotsitewise/model/UpdateAssetPropertyRequest.h>
7 #include <aws/core/utils/json/JsonSerializer.h>
8
9 #include <utility>
10
11 using namespace Aws::IoTSiteWise::Model;
12 using namespace Aws::Utils::Json;
13 using namespace Aws::Utils;
14
UpdateAssetPropertyRequest()15 UpdateAssetPropertyRequest::UpdateAssetPropertyRequest() :
16 m_assetIdHasBeenSet(false),
17 m_propertyIdHasBeenSet(false),
18 m_propertyAliasHasBeenSet(false),
19 m_propertyNotificationState(PropertyNotificationState::NOT_SET),
20 m_propertyNotificationStateHasBeenSet(false),
21 m_clientToken(Aws::Utils::UUID::RandomUUID()),
22 m_clientTokenHasBeenSet(true)
23 {
24 }
25
SerializePayload() const26 Aws::String UpdateAssetPropertyRequest::SerializePayload() const
27 {
28 JsonValue payload;
29
30 if(m_propertyAliasHasBeenSet)
31 {
32 payload.WithString("propertyAlias", m_propertyAlias);
33
34 }
35
36 if(m_propertyNotificationStateHasBeenSet)
37 {
38 payload.WithString("propertyNotificationState", PropertyNotificationStateMapper::GetNameForPropertyNotificationState(m_propertyNotificationState));
39 }
40
41 if(m_clientTokenHasBeenSet)
42 {
43 payload.WithString("clientToken", m_clientToken);
44
45 }
46
47 return payload.View().WriteReadable();
48 }
49
50
51
52
53