/** * 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::EFS::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; using namespace Aws; CreateMountTargetResult::CreateMountTargetResult() : m_lifeCycleState(LifeCycleState::NOT_SET) { } CreateMountTargetResult::CreateMountTargetResult(const Aws::AmazonWebServiceResult& result) : m_lifeCycleState(LifeCycleState::NOT_SET) { *this = result; } CreateMountTargetResult& CreateMountTargetResult::operator =(const Aws::AmazonWebServiceResult& result) { JsonView jsonValue = result.GetPayload().View(); if(jsonValue.ValueExists("OwnerId")) { m_ownerId = jsonValue.GetString("OwnerId"); } if(jsonValue.ValueExists("MountTargetId")) { m_mountTargetId = jsonValue.GetString("MountTargetId"); } if(jsonValue.ValueExists("FileSystemId")) { m_fileSystemId = jsonValue.GetString("FileSystemId"); } if(jsonValue.ValueExists("SubnetId")) { m_subnetId = jsonValue.GetString("SubnetId"); } if(jsonValue.ValueExists("LifeCycleState")) { m_lifeCycleState = LifeCycleStateMapper::GetLifeCycleStateForName(jsonValue.GetString("LifeCycleState")); } if(jsonValue.ValueExists("IpAddress")) { m_ipAddress = jsonValue.GetString("IpAddress"); } if(jsonValue.ValueExists("NetworkInterfaceId")) { m_networkInterfaceId = jsonValue.GetString("NetworkInterfaceId"); } if(jsonValue.ValueExists("AvailabilityZoneId")) { m_availabilityZoneId = jsonValue.GetString("AvailabilityZoneId"); } if(jsonValue.ValueExists("AvailabilityZoneName")) { m_availabilityZoneName = jsonValue.GetString("AvailabilityZoneName"); } if(jsonValue.ValueExists("VpcId")) { m_vpcId = jsonValue.GetString("VpcId"); } const auto& headers = result.GetHeaderValueCollection(); const auto& requestIdIter = headers.find("x-amzn-requestid"); if(requestIdIter != headers.end()) { m_requestId = requestIdIter->second; } return *this; }