/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include using namespace Aws::Utils::Json; using namespace Aws::Utils; namespace Aws { namespace MemoryDB { namespace Model { Node::Node() : m_nameHasBeenSet(false), m_statusHasBeenSet(false), m_availabilityZoneHasBeenSet(false), m_createTimeHasBeenSet(false), m_endpointHasBeenSet(false) { } Node::Node(JsonView jsonValue) : m_nameHasBeenSet(false), m_statusHasBeenSet(false), m_availabilityZoneHasBeenSet(false), m_createTimeHasBeenSet(false), m_endpointHasBeenSet(false) { *this = jsonValue; } Node& Node::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("Name")) { m_name = jsonValue.GetString("Name"); m_nameHasBeenSet = true; } if(jsonValue.ValueExists("Status")) { m_status = jsonValue.GetString("Status"); m_statusHasBeenSet = true; } if(jsonValue.ValueExists("AvailabilityZone")) { m_availabilityZone = jsonValue.GetString("AvailabilityZone"); m_availabilityZoneHasBeenSet = true; } if(jsonValue.ValueExists("CreateTime")) { m_createTime = jsonValue.GetDouble("CreateTime"); m_createTimeHasBeenSet = true; } if(jsonValue.ValueExists("Endpoint")) { m_endpoint = jsonValue.GetObject("Endpoint"); m_endpointHasBeenSet = true; } return *this; } JsonValue Node::Jsonize() const { JsonValue payload; if(m_nameHasBeenSet) { payload.WithString("Name", m_name); } if(m_statusHasBeenSet) { payload.WithString("Status", m_status); } if(m_availabilityZoneHasBeenSet) { payload.WithString("AvailabilityZone", m_availabilityZone); } if(m_createTimeHasBeenSet) { payload.WithDouble("CreateTime", m_createTime.SecondsWithMSPrecision()); } if(m_endpointHasBeenSet) { payload.WithObject("Endpoint", m_endpoint.Jsonize()); } return payload; } } // namespace Model } // namespace MemoryDB } // namespace Aws