/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include <aws/gamesparks/model/Connection.h> #include <aws/core/utils/json/JsonSerializer.h> #include <utility> using namespace Aws::Utils::Json; using namespace Aws::Utils; namespace Aws { namespace GameSparks { namespace Model { Connection::Connection() : m_createdHasBeenSet(false), m_idHasBeenSet(false) { } Connection::Connection(JsonView jsonValue) : m_createdHasBeenSet(false), m_idHasBeenSet(false) { *this = jsonValue; } Connection& Connection::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("Created")) { m_created = jsonValue.GetString("Created"); m_createdHasBeenSet = true; } if(jsonValue.ValueExists("Id")) { m_id = jsonValue.GetString("Id"); m_idHasBeenSet = true; } return *this; } JsonValue Connection::Jsonize() const { JsonValue payload; if(m_createdHasBeenSet) { payload.WithString("Created", m_created.ToGmtString(Aws::Utils::DateFormat::ISO_8601)); } if(m_idHasBeenSet) { payload.WithString("Id", m_id); } return payload; } } // namespace Model } // namespace GameSparks } // namespace Aws