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-appconfig/source/model/DeploymentEvent.cpp

106 lines
2.3 KiB
C++
Raw Normal View History

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/appconfig/model/DeploymentEvent.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace AppConfig
{
namespace Model
{
DeploymentEvent::DeploymentEvent() :
m_eventType(DeploymentEventType::NOT_SET),
m_eventTypeHasBeenSet(false),
m_triggeredBy(TriggeredBy::NOT_SET),
m_triggeredByHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_occurredAtHasBeenSet(false)
{
}
DeploymentEvent::DeploymentEvent(JsonView jsonValue) :
m_eventType(DeploymentEventType::NOT_SET),
m_eventTypeHasBeenSet(false),
m_triggeredBy(TriggeredBy::NOT_SET),
m_triggeredByHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_occurredAtHasBeenSet(false)
{
*this = jsonValue;
}
DeploymentEvent& DeploymentEvent::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("EventType"))
{
m_eventType = DeploymentEventTypeMapper::GetDeploymentEventTypeForName(jsonValue.GetString("EventType"));
m_eventTypeHasBeenSet = true;
}
if(jsonValue.ValueExists("TriggeredBy"))
{
m_triggeredBy = TriggeredByMapper::GetTriggeredByForName(jsonValue.GetString("TriggeredBy"));
m_triggeredByHasBeenSet = true;
}
if(jsonValue.ValueExists("Description"))
{
m_description = jsonValue.GetString("Description");
m_descriptionHasBeenSet = true;
}
if(jsonValue.ValueExists("OccurredAt"))
{
m_occurredAt = jsonValue.GetString("OccurredAt");
m_occurredAtHasBeenSet = true;
}
return *this;
}
JsonValue DeploymentEvent::Jsonize() const
{
JsonValue payload;
if(m_eventTypeHasBeenSet)
{
payload.WithString("EventType", DeploymentEventTypeMapper::GetNameForDeploymentEventType(m_eventType));
}
if(m_triggeredByHasBeenSet)
{
payload.WithString("TriggeredBy", TriggeredByMapper::GetNameForTriggeredBy(m_triggeredBy));
}
if(m_descriptionHasBeenSet)
{
payload.WithString("Description", m_description);
}
if(m_occurredAtHasBeenSet)
{
payload.WithString("OccurredAt", m_occurredAt.ToGmtString(DateFormat::ISO_8601));
}
return payload;
}
} // namespace Model
} // namespace AppConfig
} // namespace Aws