/** * 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 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