1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #include <aws/iotevents/model/SSOIdentity.h>
7 #include <aws/core/utils/json/JsonSerializer.h>
8 
9 #include <utility>
10 
11 using namespace Aws::Utils::Json;
12 using namespace Aws::Utils;
13 
14 namespace Aws
15 {
16 namespace IoTEvents
17 {
18 namespace Model
19 {
20 
SSOIdentity()21 SSOIdentity::SSOIdentity() :
22     m_identityStoreIdHasBeenSet(false),
23     m_userIdHasBeenSet(false)
24 {
25 }
26 
SSOIdentity(JsonView jsonValue)27 SSOIdentity::SSOIdentity(JsonView jsonValue) :
28     m_identityStoreIdHasBeenSet(false),
29     m_userIdHasBeenSet(false)
30 {
31   *this = jsonValue;
32 }
33 
operator =(JsonView jsonValue)34 SSOIdentity& SSOIdentity::operator =(JsonView jsonValue)
35 {
36   if(jsonValue.ValueExists("identityStoreId"))
37   {
38     m_identityStoreId = jsonValue.GetString("identityStoreId");
39 
40     m_identityStoreIdHasBeenSet = true;
41   }
42 
43   if(jsonValue.ValueExists("userId"))
44   {
45     m_userId = jsonValue.GetString("userId");
46 
47     m_userIdHasBeenSet = true;
48   }
49 
50   return *this;
51 }
52 
Jsonize() const53 JsonValue SSOIdentity::Jsonize() const
54 {
55   JsonValue payload;
56 
57   if(m_identityStoreIdHasBeenSet)
58   {
59    payload.WithString("identityStoreId", m_identityStoreId);
60 
61   }
62 
63   if(m_userIdHasBeenSet)
64   {
65    payload.WithString("userId", m_userId);
66 
67   }
68 
69   return payload;
70 }
71 
72 } // namespace Model
73 } // namespace IoTEvents
74 } // namespace Aws
75