/** * 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 Textract { namespace Model { ExpenseDetection::ExpenseDetection() : m_textHasBeenSet(false), m_geometryHasBeenSet(false), m_confidence(0.0), m_confidenceHasBeenSet(false) { } ExpenseDetection::ExpenseDetection(JsonView jsonValue) : m_textHasBeenSet(false), m_geometryHasBeenSet(false), m_confidence(0.0), m_confidenceHasBeenSet(false) { *this = jsonValue; } ExpenseDetection& ExpenseDetection::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("Text")) { m_text = jsonValue.GetString("Text"); m_textHasBeenSet = true; } if(jsonValue.ValueExists("Geometry")) { m_geometry = jsonValue.GetObject("Geometry"); m_geometryHasBeenSet = true; } if(jsonValue.ValueExists("Confidence")) { m_confidence = jsonValue.GetDouble("Confidence"); m_confidenceHasBeenSet = true; } return *this; } JsonValue ExpenseDetection::Jsonize() const { JsonValue payload; if(m_textHasBeenSet) { payload.WithString("Text", m_text); } if(m_geometryHasBeenSet) { payload.WithObject("Geometry", m_geometry.Jsonize()); } if(m_confidenceHasBeenSet) { payload.WithDouble("Confidence", m_confidence); } return payload; } } // namespace Model } // namespace Textract } // namespace Aws