/** * 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::MigrationHubRefactorSpaces::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; using namespace Aws; DeleteRouteResult::DeleteRouteResult() : m_state(RouteState::NOT_SET) { } DeleteRouteResult::DeleteRouteResult(const Aws::AmazonWebServiceResult& result) : m_state(RouteState::NOT_SET) { *this = result; } DeleteRouteResult& DeleteRouteResult::operator =(const Aws::AmazonWebServiceResult& result) { JsonView jsonValue = result.GetPayload().View(); if(jsonValue.ValueExists("ApplicationId")) { m_applicationId = jsonValue.GetString("ApplicationId"); } if(jsonValue.ValueExists("Arn")) { m_arn = jsonValue.GetString("Arn"); } if(jsonValue.ValueExists("LastUpdatedTime")) { m_lastUpdatedTime = jsonValue.GetDouble("LastUpdatedTime"); } if(jsonValue.ValueExists("RouteId")) { m_routeId = jsonValue.GetString("RouteId"); } if(jsonValue.ValueExists("ServiceId")) { m_serviceId = jsonValue.GetString("ServiceId"); } if(jsonValue.ValueExists("State")) { m_state = RouteStateMapper::GetRouteStateForName(jsonValue.GetString("State")); } const auto& headers = result.GetHeaderValueCollection(); const auto& requestIdIter = headers.find("x-amzn-requestid"); if(requestIdIter != headers.end()) { m_requestId = requestIdIter->second; } return *this; }