75 lines
1.2 KiB
C++
75 lines
1.2 KiB
C++
/**
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|
*/
|
|
|
|
#include <aws/appmesh/model/TcpRoute.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
|
|
{
|
|
|
|
TcpRoute::TcpRoute() :
|
|
m_actionHasBeenSet(false),
|
|
m_timeoutHasBeenSet(false)
|
|
{
|
|
}
|
|
|
|
TcpRoute::TcpRoute(JsonView jsonValue) :
|
|
m_actionHasBeenSet(false),
|
|
m_timeoutHasBeenSet(false)
|
|
{
|
|
*this = jsonValue;
|
|
}
|
|
|
|
TcpRoute& TcpRoute::operator =(JsonView jsonValue)
|
|
{
|
|
if(jsonValue.ValueExists("action"))
|
|
{
|
|
m_action = jsonValue.GetObject("action");
|
|
|
|
m_actionHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("timeout"))
|
|
{
|
|
m_timeout = jsonValue.GetObject("timeout");
|
|
|
|
m_timeoutHasBeenSet = true;
|
|
}
|
|
|
|
return *this;
|
|
}
|
|
|
|
JsonValue TcpRoute::Jsonize() const
|
|
{
|
|
JsonValue payload;
|
|
|
|
if(m_actionHasBeenSet)
|
|
{
|
|
payload.WithObject("action", m_action.Jsonize());
|
|
|
|
}
|
|
|
|
if(m_timeoutHasBeenSet)
|
|
{
|
|
payload.WithObject("timeout", m_timeout.Jsonize());
|
|
|
|
}
|
|
|
|
return payload;
|
|
}
|
|
|
|
} // namespace Model
|
|
} // namespace AppMesh
|
|
} // namespace Aws
|