/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include using namespace Aws::Utils::Json; using namespace Aws::Utils; namespace Aws { namespace ConfigService { namespace Model { MemberAccountStatus::MemberAccountStatus() : m_accountIdHasBeenSet(false), m_configRuleNameHasBeenSet(false), m_memberAccountRuleStatus(MemberAccountRuleStatus::NOT_SET), m_memberAccountRuleStatusHasBeenSet(false), m_errorCodeHasBeenSet(false), m_errorMessageHasBeenSet(false), m_lastUpdateTimeHasBeenSet(false) { } MemberAccountStatus::MemberAccountStatus(JsonView jsonValue) : m_accountIdHasBeenSet(false), m_configRuleNameHasBeenSet(false), m_memberAccountRuleStatus(MemberAccountRuleStatus::NOT_SET), m_memberAccountRuleStatusHasBeenSet(false), m_errorCodeHasBeenSet(false), m_errorMessageHasBeenSet(false), m_lastUpdateTimeHasBeenSet(false) { *this = jsonValue; } MemberAccountStatus& MemberAccountStatus::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("AccountId")) { m_accountId = jsonValue.GetString("AccountId"); m_accountIdHasBeenSet = true; } if(jsonValue.ValueExists("ConfigRuleName")) { m_configRuleName = jsonValue.GetString("ConfigRuleName"); m_configRuleNameHasBeenSet = true; } if(jsonValue.ValueExists("MemberAccountRuleStatus")) { m_memberAccountRuleStatus = MemberAccountRuleStatusMapper::GetMemberAccountRuleStatusForName(jsonValue.GetString("MemberAccountRuleStatus")); m_memberAccountRuleStatusHasBeenSet = true; } if(jsonValue.ValueExists("ErrorCode")) { m_errorCode = jsonValue.GetString("ErrorCode"); m_errorCodeHasBeenSet = true; } if(jsonValue.ValueExists("ErrorMessage")) { m_errorMessage = jsonValue.GetString("ErrorMessage"); m_errorMessageHasBeenSet = true; } if(jsonValue.ValueExists("LastUpdateTime")) { m_lastUpdateTime = jsonValue.GetDouble("LastUpdateTime"); m_lastUpdateTimeHasBeenSet = true; } return *this; } JsonValue MemberAccountStatus::Jsonize() const { JsonValue payload; if(m_accountIdHasBeenSet) { payload.WithString("AccountId", m_accountId); } if(m_configRuleNameHasBeenSet) { payload.WithString("ConfigRuleName", m_configRuleName); } if(m_memberAccountRuleStatusHasBeenSet) { payload.WithString("MemberAccountRuleStatus", MemberAccountRuleStatusMapper::GetNameForMemberAccountRuleStatus(m_memberAccountRuleStatus)); } if(m_errorCodeHasBeenSet) { payload.WithString("ErrorCode", m_errorCode); } if(m_errorMessageHasBeenSet) { payload.WithString("ErrorMessage", m_errorMessage); } if(m_lastUpdateTimeHasBeenSet) { payload.WithDouble("LastUpdateTime", m_lastUpdateTime.SecondsWithMSPrecision()); } return payload; } } // namespace Model } // namespace ConfigService } // namespace Aws