/** * 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::SecurityHub::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; using namespace Aws; DescribeOrganizationConfigurationResult::DescribeOrganizationConfigurationResult() : m_autoEnable(false), m_memberAccountLimitReached(false), m_autoEnableStandards(AutoEnableStandards::NOT_SET) { } DescribeOrganizationConfigurationResult::DescribeOrganizationConfigurationResult(const Aws::AmazonWebServiceResult& result) : m_autoEnable(false), m_memberAccountLimitReached(false), m_autoEnableStandards(AutoEnableStandards::NOT_SET) { *this = result; } DescribeOrganizationConfigurationResult& DescribeOrganizationConfigurationResult::operator =(const Aws::AmazonWebServiceResult& result) { JsonView jsonValue = result.GetPayload().View(); if(jsonValue.ValueExists("AutoEnable")) { m_autoEnable = jsonValue.GetBool("AutoEnable"); } if(jsonValue.ValueExists("MemberAccountLimitReached")) { m_memberAccountLimitReached = jsonValue.GetBool("MemberAccountLimitReached"); } if(jsonValue.ValueExists("AutoEnableStandards")) { m_autoEnableStandards = AutoEnableStandardsMapper::GetAutoEnableStandardsForName(jsonValue.GetString("AutoEnableStandards")); } const auto& headers = result.GetHeaderValueCollection(); const auto& requestIdIter = headers.find("x-amzn-requestid"); if(requestIdIter != headers.end()) { m_requestId = requestIdIter->second; } return *this; }