/** * 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::CloudWatchEvents::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; using namespace Aws; DeauthorizeConnectionResult::DeauthorizeConnectionResult() : m_connectionState(ConnectionState::NOT_SET) { } DeauthorizeConnectionResult::DeauthorizeConnectionResult(const Aws::AmazonWebServiceResult& result) : m_connectionState(ConnectionState::NOT_SET) { *this = result; } DeauthorizeConnectionResult& DeauthorizeConnectionResult::operator =(const Aws::AmazonWebServiceResult& result) { JsonView jsonValue = result.GetPayload().View(); if(jsonValue.ValueExists("ConnectionArn")) { m_connectionArn = jsonValue.GetString("ConnectionArn"); } if(jsonValue.ValueExists("ConnectionState")) { m_connectionState = ConnectionStateMapper::GetConnectionStateForName(jsonValue.GetString("ConnectionState")); } if(jsonValue.ValueExists("CreationTime")) { m_creationTime = jsonValue.GetDouble("CreationTime"); } if(jsonValue.ValueExists("LastModifiedTime")) { m_lastModifiedTime = jsonValue.GetDouble("LastModifiedTime"); } if(jsonValue.ValueExists("LastAuthorizedTime")) { m_lastAuthorizedTime = jsonValue.GetDouble("LastAuthorizedTime"); } const auto& headers = result.GetHeaderValueCollection(); const auto& requestIdIter = headers.find("x-amzn-requestid"); if(requestIdIter != headers.end()) { m_requestId = requestIdIter->second; } return *this; }