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-appmesh/source/model/VirtualNodeData.cpp

120 lines
2.1 KiB
C++

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/appmesh/model/VirtualNodeData.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace AppMesh
{
namespace Model
{
VirtualNodeData::VirtualNodeData() :
m_meshNameHasBeenSet(false),
m_metadataHasBeenSet(false),
m_specHasBeenSet(false),
m_statusHasBeenSet(false),
m_virtualNodeNameHasBeenSet(false)
{
}
VirtualNodeData::VirtualNodeData(JsonView jsonValue) :
m_meshNameHasBeenSet(false),
m_metadataHasBeenSet(false),
m_specHasBeenSet(false),
m_statusHasBeenSet(false),
m_virtualNodeNameHasBeenSet(false)
{
*this = jsonValue;
}
VirtualNodeData& VirtualNodeData::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("meshName"))
{
m_meshName = jsonValue.GetString("meshName");
m_meshNameHasBeenSet = true;
}
if(jsonValue.ValueExists("metadata"))
{
m_metadata = jsonValue.GetObject("metadata");
m_metadataHasBeenSet = true;
}
if(jsonValue.ValueExists("spec"))
{
m_spec = jsonValue.GetObject("spec");
m_specHasBeenSet = true;
}
if(jsonValue.ValueExists("status"))
{
m_status = jsonValue.GetObject("status");
m_statusHasBeenSet = true;
}
if(jsonValue.ValueExists("virtualNodeName"))
{
m_virtualNodeName = jsonValue.GetString("virtualNodeName");
m_virtualNodeNameHasBeenSet = true;
}
return *this;
}
JsonValue VirtualNodeData::Jsonize() const
{
JsonValue payload;
if(m_meshNameHasBeenSet)
{
payload.WithString("meshName", m_meshName);
}
if(m_metadataHasBeenSet)
{
payload.WithObject("metadata", m_metadata.Jsonize());
}
if(m_specHasBeenSet)
{
payload.WithObject("spec", m_spec.Jsonize());
}
if(m_statusHasBeenSet)
{
payload.WithObject("status", m_status.Jsonize());
}
if(m_virtualNodeNameHasBeenSet)
{
payload.WithString("virtualNodeName", m_virtualNodeName);
}
return payload;
}
} // namespace Model
} // namespace AppMesh
} // namespace Aws