123 lines
2.7 KiB
C++
123 lines
2.7 KiB
C++
/**
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|
*/
|
|
|
|
#include <aws/lambda/model/FunctionEventInvokeConfig.h>
|
|
#include <aws/core/utils/json/JsonSerializer.h>
|
|
|
|
#include <utility>
|
|
|
|
using namespace Aws::Utils::Json;
|
|
using namespace Aws::Utils;
|
|
|
|
namespace Aws
|
|
{
|
|
namespace Lambda
|
|
{
|
|
namespace Model
|
|
{
|
|
|
|
FunctionEventInvokeConfig::FunctionEventInvokeConfig() :
|
|
m_lastModifiedHasBeenSet(false),
|
|
m_functionArnHasBeenSet(false),
|
|
m_maximumRetryAttempts(0),
|
|
m_maximumRetryAttemptsHasBeenSet(false),
|
|
m_maximumEventAgeInSeconds(0),
|
|
m_maximumEventAgeInSecondsHasBeenSet(false),
|
|
m_destinationConfigHasBeenSet(false)
|
|
{
|
|
}
|
|
|
|
FunctionEventInvokeConfig::FunctionEventInvokeConfig(JsonView jsonValue) :
|
|
m_lastModifiedHasBeenSet(false),
|
|
m_functionArnHasBeenSet(false),
|
|
m_maximumRetryAttempts(0),
|
|
m_maximumRetryAttemptsHasBeenSet(false),
|
|
m_maximumEventAgeInSeconds(0),
|
|
m_maximumEventAgeInSecondsHasBeenSet(false),
|
|
m_destinationConfigHasBeenSet(false)
|
|
{
|
|
*this = jsonValue;
|
|
}
|
|
|
|
FunctionEventInvokeConfig& FunctionEventInvokeConfig::operator =(JsonView jsonValue)
|
|
{
|
|
if(jsonValue.ValueExists("LastModified"))
|
|
{
|
|
m_lastModified = jsonValue.GetDouble("LastModified");
|
|
|
|
m_lastModifiedHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("FunctionArn"))
|
|
{
|
|
m_functionArn = jsonValue.GetString("FunctionArn");
|
|
|
|
m_functionArnHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("MaximumRetryAttempts"))
|
|
{
|
|
m_maximumRetryAttempts = jsonValue.GetInteger("MaximumRetryAttempts");
|
|
|
|
m_maximumRetryAttemptsHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("MaximumEventAgeInSeconds"))
|
|
{
|
|
m_maximumEventAgeInSeconds = jsonValue.GetInteger("MaximumEventAgeInSeconds");
|
|
|
|
m_maximumEventAgeInSecondsHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("DestinationConfig"))
|
|
{
|
|
m_destinationConfig = jsonValue.GetObject("DestinationConfig");
|
|
|
|
m_destinationConfigHasBeenSet = true;
|
|
}
|
|
|
|
return *this;
|
|
}
|
|
|
|
JsonValue FunctionEventInvokeConfig::Jsonize() const
|
|
{
|
|
JsonValue payload;
|
|
|
|
if(m_lastModifiedHasBeenSet)
|
|
{
|
|
payload.WithDouble("LastModified", m_lastModified.SecondsWithMSPrecision());
|
|
}
|
|
|
|
if(m_functionArnHasBeenSet)
|
|
{
|
|
payload.WithString("FunctionArn", m_functionArn);
|
|
|
|
}
|
|
|
|
if(m_maximumRetryAttemptsHasBeenSet)
|
|
{
|
|
payload.WithInteger("MaximumRetryAttempts", m_maximumRetryAttempts);
|
|
|
|
}
|
|
|
|
if(m_maximumEventAgeInSecondsHasBeenSet)
|
|
{
|
|
payload.WithInteger("MaximumEventAgeInSeconds", m_maximumEventAgeInSeconds);
|
|
|
|
}
|
|
|
|
if(m_destinationConfigHasBeenSet)
|
|
{
|
|
payload.WithObject("DestinationConfig", m_destinationConfig.Jsonize());
|
|
|
|
}
|
|
|
|
return payload;
|
|
}
|
|
|
|
} // namespace Model
|
|
} // namespace Lambda
|
|
} // namespace Aws
|