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/HttpRoute.cpp

105 lines
1.8 KiB
C++

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