/** * 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 FraudDetector { namespace Model { Model::Model() : m_modelIdHasBeenSet(false), m_modelType(ModelTypeEnum::NOT_SET), m_modelTypeHasBeenSet(false), m_descriptionHasBeenSet(false), m_eventTypeNameHasBeenSet(false), m_createdTimeHasBeenSet(false), m_lastUpdatedTimeHasBeenSet(false), m_arnHasBeenSet(false) { } Model::Model(JsonView jsonValue) : m_modelIdHasBeenSet(false), m_modelType(ModelTypeEnum::NOT_SET), m_modelTypeHasBeenSet(false), m_descriptionHasBeenSet(false), m_eventTypeNameHasBeenSet(false), m_createdTimeHasBeenSet(false), m_lastUpdatedTimeHasBeenSet(false), m_arnHasBeenSet(false) { *this = jsonValue; } Model& Model::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("modelId")) { m_modelId = jsonValue.GetString("modelId"); m_modelIdHasBeenSet = true; } if(jsonValue.ValueExists("modelType")) { m_modelType = ModelTypeEnumMapper::GetModelTypeEnumForName(jsonValue.GetString("modelType")); m_modelTypeHasBeenSet = true; } if(jsonValue.ValueExists("description")) { m_description = jsonValue.GetString("description"); m_descriptionHasBeenSet = true; } if(jsonValue.ValueExists("eventTypeName")) { m_eventTypeName = jsonValue.GetString("eventTypeName"); m_eventTypeNameHasBeenSet = true; } if(jsonValue.ValueExists("createdTime")) { m_createdTime = jsonValue.GetString("createdTime"); m_createdTimeHasBeenSet = true; } if(jsonValue.ValueExists("lastUpdatedTime")) { m_lastUpdatedTime = jsonValue.GetString("lastUpdatedTime"); m_lastUpdatedTimeHasBeenSet = true; } if(jsonValue.ValueExists("arn")) { m_arn = jsonValue.GetString("arn"); m_arnHasBeenSet = true; } return *this; } JsonValue Model::Jsonize() const { JsonValue payload; if(m_modelIdHasBeenSet) { payload.WithString("modelId", m_modelId); } if(m_modelTypeHasBeenSet) { payload.WithString("modelType", ModelTypeEnumMapper::GetNameForModelTypeEnum(m_modelType)); } if(m_descriptionHasBeenSet) { payload.WithString("description", m_description); } if(m_eventTypeNameHasBeenSet) { payload.WithString("eventTypeName", m_eventTypeName); } if(m_createdTimeHasBeenSet) { payload.WithString("createdTime", m_createdTime); } if(m_lastUpdatedTimeHasBeenSet) { payload.WithString("lastUpdatedTime", m_lastUpdatedTime); } if(m_arnHasBeenSet) { payload.WithString("arn", m_arn); } return payload; } } // namespace Model } // namespace FraudDetector } // namespace Aws