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-securityhub/source/model/NetworkHeader.cpp

90 lines
1.6 KiB
C++

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/securityhub/model/NetworkHeader.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace SecurityHub
{
namespace Model
{
NetworkHeader::NetworkHeader() :
m_protocolHasBeenSet(false),
m_destinationHasBeenSet(false),
m_sourceHasBeenSet(false)
{
}
NetworkHeader::NetworkHeader(JsonView jsonValue) :
m_protocolHasBeenSet(false),
m_destinationHasBeenSet(false),
m_sourceHasBeenSet(false)
{
*this = jsonValue;
}
NetworkHeader& NetworkHeader::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Protocol"))
{
m_protocol = jsonValue.GetString("Protocol");
m_protocolHasBeenSet = true;
}
if(jsonValue.ValueExists("Destination"))
{
m_destination = jsonValue.GetObject("Destination");
m_destinationHasBeenSet = true;
}
if(jsonValue.ValueExists("Source"))
{
m_source = jsonValue.GetObject("Source");
m_sourceHasBeenSet = true;
}
return *this;
}
JsonValue NetworkHeader::Jsonize() const
{
JsonValue payload;
if(m_protocolHasBeenSet)
{
payload.WithString("Protocol", m_protocol);
}
if(m_destinationHasBeenSet)
{
payload.WithObject("Destination", m_destination.Jsonize());
}
if(m_sourceHasBeenSet)
{
payload.WithObject("Source", m_source.Jsonize());
}
return payload;
}
} // namespace Model
} // namespace SecurityHub
} // namespace Aws