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-chime/source/model/Room.cpp

133 lines
2.4 KiB
C++

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/chime/model/Room.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Chime
{
namespace Model
{
Room::Room() :
m_roomIdHasBeenSet(false),
m_nameHasBeenSet(false),
m_accountIdHasBeenSet(false),
m_createdByHasBeenSet(false),
m_createdTimestampHasBeenSet(false),
m_updatedTimestampHasBeenSet(false)
{
}
Room::Room(JsonView jsonValue) :
m_roomIdHasBeenSet(false),
m_nameHasBeenSet(false),
m_accountIdHasBeenSet(false),
m_createdByHasBeenSet(false),
m_createdTimestampHasBeenSet(false),
m_updatedTimestampHasBeenSet(false)
{
*this = jsonValue;
}
Room& Room::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("RoomId"))
{
m_roomId = jsonValue.GetString("RoomId");
m_roomIdHasBeenSet = true;
}
if(jsonValue.ValueExists("Name"))
{
m_name = jsonValue.GetString("Name");
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("AccountId"))
{
m_accountId = jsonValue.GetString("AccountId");
m_accountIdHasBeenSet = true;
}
if(jsonValue.ValueExists("CreatedBy"))
{
m_createdBy = jsonValue.GetString("CreatedBy");
m_createdByHasBeenSet = true;
}
if(jsonValue.ValueExists("CreatedTimestamp"))
{
m_createdTimestamp = jsonValue.GetString("CreatedTimestamp");
m_createdTimestampHasBeenSet = true;
}
if(jsonValue.ValueExists("UpdatedTimestamp"))
{
m_updatedTimestamp = jsonValue.GetString("UpdatedTimestamp");
m_updatedTimestampHasBeenSet = true;
}
return *this;
}
JsonValue Room::Jsonize() const
{
JsonValue payload;
if(m_roomIdHasBeenSet)
{
payload.WithString("RoomId", m_roomId);
}
if(m_nameHasBeenSet)
{
payload.WithString("Name", m_name);
}
if(m_accountIdHasBeenSet)
{
payload.WithString("AccountId", m_accountId);
}
if(m_createdByHasBeenSet)
{
payload.WithString("CreatedBy", m_createdBy);
}
if(m_createdTimestampHasBeenSet)
{
payload.WithString("CreatedTimestamp", m_createdTimestamp.ToGmtString(DateFormat::ISO_8601));
}
if(m_updatedTimestampHasBeenSet)
{
payload.WithString("UpdatedTimestamp", m_updatedTimestamp.ToGmtString(DateFormat::ISO_8601));
}
return payload;
}
} // namespace Model
} // namespace Chime
} // namespace Aws