This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
pxz-hos-client-cpp-module/support/aws-sdk-cpp-master/aws-cpp-sdk-config/source/model/MemberAccountStatus.cpp

135 lines
3.0 KiB
C++

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/config/model/MemberAccountStatus.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
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