/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include #include #include #include #include using namespace Aws::IoTWireless::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; using namespace Aws; GetDestinationResult::GetDestinationResult() : m_expressionType(ExpressionType::NOT_SET) { } GetDestinationResult::GetDestinationResult(const Aws::AmazonWebServiceResult& result) : m_expressionType(ExpressionType::NOT_SET) { *this = result; } GetDestinationResult& GetDestinationResult::operator =(const Aws::AmazonWebServiceResult& result) { JsonView jsonValue = result.GetPayload().View(); if(jsonValue.ValueExists("Arn")) { m_arn = jsonValue.GetString("Arn"); } if(jsonValue.ValueExists("Name")) { m_name = jsonValue.GetString("Name"); } if(jsonValue.ValueExists("Expression")) { m_expression = jsonValue.GetString("Expression"); } if(jsonValue.ValueExists("ExpressionType")) { m_expressionType = ExpressionTypeMapper::GetExpressionTypeForName(jsonValue.GetString("ExpressionType")); } if(jsonValue.ValueExists("Description")) { m_description = jsonValue.GetString("Description"); } if(jsonValue.ValueExists("RoleArn")) { m_roleArn = jsonValue.GetString("RoleArn"); } const auto& headers = result.GetHeaderValueCollection(); const auto& requestIdIter = headers.find("x-amzn-requestid"); if(requestIdIter != headers.end()) { m_requestId = requestIdIter->second; } return *this; }