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-lambda/source/model/FunctionEventInvokeConfig.cpp

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