/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include <aws/frauddetector/model/Label.h> #include <aws/core/utils/json/JsonSerializer.h> #include <utility> using namespace Aws::Utils::Json; using namespace Aws::Utils; namespace Aws { namespace FraudDetector { namespace Model { Label::Label() : m_nameHasBeenSet(false), m_descriptionHasBeenSet(false), m_lastUpdatedTimeHasBeenSet(false), m_createdTimeHasBeenSet(false), m_arnHasBeenSet(false) { } Label::Label(JsonView jsonValue) : m_nameHasBeenSet(false), m_descriptionHasBeenSet(false), m_lastUpdatedTimeHasBeenSet(false), m_createdTimeHasBeenSet(false), m_arnHasBeenSet(false) { *this = jsonValue; } Label& Label::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("name")) { m_name = jsonValue.GetString("name"); m_nameHasBeenSet = true; } if(jsonValue.ValueExists("description")) { m_description = jsonValue.GetString("description"); m_descriptionHasBeenSet = true; } if(jsonValue.ValueExists("lastUpdatedTime")) { m_lastUpdatedTime = jsonValue.GetString("lastUpdatedTime"); m_lastUpdatedTimeHasBeenSet = true; } if(jsonValue.ValueExists("createdTime")) { m_createdTime = jsonValue.GetString("createdTime"); m_createdTimeHasBeenSet = true; } if(jsonValue.ValueExists("arn")) { m_arn = jsonValue.GetString("arn"); m_arnHasBeenSet = true; } return *this; } JsonValue Label::Jsonize() const { JsonValue payload; if(m_nameHasBeenSet) { payload.WithString("name", m_name); } if(m_descriptionHasBeenSet) { payload.WithString("description", m_description); } if(m_lastUpdatedTimeHasBeenSet) { payload.WithString("lastUpdatedTime", m_lastUpdatedTime); } if(m_createdTimeHasBeenSet) { payload.WithString("createdTime", m_createdTime); } if(m_arnHasBeenSet) { payload.WithString("arn", m_arn); } return payload; } } // namespace Model } // namespace FraudDetector } // namespace Aws