1 /**
2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 * SPDX-License-Identifier: Apache-2.0.
4 */
5
6 #include <aws/location/model/ListPlaceIndexesResponseEntry.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 LocationService
17 {
18 namespace Model
19 {
20
ListPlaceIndexesResponseEntry()21 ListPlaceIndexesResponseEntry::ListPlaceIndexesResponseEntry() :
22 m_createTimeHasBeenSet(false),
23 m_dataSourceHasBeenSet(false),
24 m_descriptionHasBeenSet(false),
25 m_indexNameHasBeenSet(false),
26 m_pricingPlan(PricingPlan::NOT_SET),
27 m_pricingPlanHasBeenSet(false),
28 m_updateTimeHasBeenSet(false)
29 {
30 }
31
ListPlaceIndexesResponseEntry(JsonView jsonValue)32 ListPlaceIndexesResponseEntry::ListPlaceIndexesResponseEntry(JsonView jsonValue) :
33 m_createTimeHasBeenSet(false),
34 m_dataSourceHasBeenSet(false),
35 m_descriptionHasBeenSet(false),
36 m_indexNameHasBeenSet(false),
37 m_pricingPlan(PricingPlan::NOT_SET),
38 m_pricingPlanHasBeenSet(false),
39 m_updateTimeHasBeenSet(false)
40 {
41 *this = jsonValue;
42 }
43
operator =(JsonView jsonValue)44 ListPlaceIndexesResponseEntry& ListPlaceIndexesResponseEntry::operator =(JsonView jsonValue)
45 {
46 if(jsonValue.ValueExists("CreateTime"))
47 {
48 m_createTime = jsonValue.GetString("CreateTime");
49
50 m_createTimeHasBeenSet = true;
51 }
52
53 if(jsonValue.ValueExists("DataSource"))
54 {
55 m_dataSource = jsonValue.GetString("DataSource");
56
57 m_dataSourceHasBeenSet = true;
58 }
59
60 if(jsonValue.ValueExists("Description"))
61 {
62 m_description = jsonValue.GetString("Description");
63
64 m_descriptionHasBeenSet = true;
65 }
66
67 if(jsonValue.ValueExists("IndexName"))
68 {
69 m_indexName = jsonValue.GetString("IndexName");
70
71 m_indexNameHasBeenSet = true;
72 }
73
74 if(jsonValue.ValueExists("PricingPlan"))
75 {
76 m_pricingPlan = PricingPlanMapper::GetPricingPlanForName(jsonValue.GetString("PricingPlan"));
77
78 m_pricingPlanHasBeenSet = true;
79 }
80
81 if(jsonValue.ValueExists("UpdateTime"))
82 {
83 m_updateTime = jsonValue.GetString("UpdateTime");
84
85 m_updateTimeHasBeenSet = true;
86 }
87
88 return *this;
89 }
90
Jsonize() const91 JsonValue ListPlaceIndexesResponseEntry::Jsonize() const
92 {
93 JsonValue payload;
94
95 if(m_createTimeHasBeenSet)
96 {
97 payload.WithString("CreateTime", m_createTime.ToGmtString(DateFormat::ISO_8601));
98 }
99
100 if(m_dataSourceHasBeenSet)
101 {
102 payload.WithString("DataSource", m_dataSource);
103
104 }
105
106 if(m_descriptionHasBeenSet)
107 {
108 payload.WithString("Description", m_description);
109
110 }
111
112 if(m_indexNameHasBeenSet)
113 {
114 payload.WithString("IndexName", m_indexName);
115
116 }
117
118 if(m_pricingPlanHasBeenSet)
119 {
120 payload.WithString("PricingPlan", PricingPlanMapper::GetNameForPricingPlan(m_pricingPlan));
121 }
122
123 if(m_updateTimeHasBeenSet)
124 {
125 payload.WithString("UpdateTime", m_updateTime.ToGmtString(DateFormat::ISO_8601));
126 }
127
128 return payload;
129 }
130
131 } // namespace Model
132 } // namespace LocationService
133 } // namespace Aws
134