/** * 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; DeleteEnvironmentResult::DeleteEnvironmentResult() : m_state(EnvironmentState::NOT_SET) { } DeleteEnvironmentResult::DeleteEnvironmentResult(const Aws::AmazonWebServiceResult& result) : m_state(EnvironmentState::NOT_SET) { *this = result; } DeleteEnvironmentResult& DeleteEnvironmentResult::operator =(const Aws::AmazonWebServiceResult& result) { JsonView jsonValue = result.GetPayload().View(); if(jsonValue.ValueExists("Arn")) { m_arn = jsonValue.GetString("Arn"); } if(jsonValue.ValueExists("EnvironmentId")) { m_environmentId = jsonValue.GetString("EnvironmentId"); } if(jsonValue.ValueExists("LastUpdatedTime")) { m_lastUpdatedTime = jsonValue.GetDouble("LastUpdatedTime"); } if(jsonValue.ValueExists("Name")) { m_name = jsonValue.GetString("Name"); } if(jsonValue.ValueExists("State")) { m_state = EnvironmentStateMapper::GetEnvironmentStateForName(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; }