/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include #include #include #include using namespace Aws::FraudDetector::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; using namespace Aws; BatchGetVariableResult::BatchGetVariableResult() { } BatchGetVariableResult::BatchGetVariableResult(const Aws::AmazonWebServiceResult& result) { *this = result; } BatchGetVariableResult& BatchGetVariableResult::operator =(const Aws::AmazonWebServiceResult& result) { JsonView jsonValue = result.GetPayload().View(); if(jsonValue.ValueExists("variables")) { Array variablesJsonList = jsonValue.GetArray("variables"); for(unsigned variablesIndex = 0; variablesIndex < variablesJsonList.GetLength(); ++variablesIndex) { m_variables.push_back(variablesJsonList[variablesIndex].AsObject()); } } if(jsonValue.ValueExists("errors")) { Array errorsJsonList = jsonValue.GetArray("errors"); for(unsigned errorsIndex = 0; errorsIndex < errorsJsonList.GetLength(); ++errorsIndex) { m_errors.push_back(errorsJsonList[errorsIndex].AsObject()); } } return *this; }