79 lines
1.8 KiB
C++
79 lines
1.8 KiB
C++
/**
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|
*/
|
|
|
|
#include <aws/serverlessrepo/model/GetCloudFormationTemplateResult.h>
|
|
#include <aws/core/utils/json/JsonSerializer.h>
|
|
#include <aws/core/AmazonWebServiceResult.h>
|
|
#include <aws/core/utils/StringUtils.h>
|
|
#include <aws/core/utils/UnreferencedParam.h>
|
|
|
|
#include <utility>
|
|
|
|
using namespace Aws::ServerlessApplicationRepository::Model;
|
|
using namespace Aws::Utils::Json;
|
|
using namespace Aws::Utils;
|
|
using namespace Aws;
|
|
|
|
GetCloudFormationTemplateResult::GetCloudFormationTemplateResult() :
|
|
m_status(Status::NOT_SET)
|
|
{
|
|
}
|
|
|
|
GetCloudFormationTemplateResult::GetCloudFormationTemplateResult(const Aws::AmazonWebServiceResult<JsonValue>& result) :
|
|
m_status(Status::NOT_SET)
|
|
{
|
|
*this = result;
|
|
}
|
|
|
|
GetCloudFormationTemplateResult& GetCloudFormationTemplateResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
|
|
{
|
|
JsonView jsonValue = result.GetPayload().View();
|
|
if(jsonValue.ValueExists("applicationId"))
|
|
{
|
|
m_applicationId = jsonValue.GetString("applicationId");
|
|
|
|
}
|
|
|
|
if(jsonValue.ValueExists("creationTime"))
|
|
{
|
|
m_creationTime = jsonValue.GetString("creationTime");
|
|
|
|
}
|
|
|
|
if(jsonValue.ValueExists("expirationTime"))
|
|
{
|
|
m_expirationTime = jsonValue.GetString("expirationTime");
|
|
|
|
}
|
|
|
|
if(jsonValue.ValueExists("semanticVersion"))
|
|
{
|
|
m_semanticVersion = jsonValue.GetString("semanticVersion");
|
|
|
|
}
|
|
|
|
if(jsonValue.ValueExists("status"))
|
|
{
|
|
m_status = StatusMapper::GetStatusForName(jsonValue.GetString("status"));
|
|
|
|
}
|
|
|
|
if(jsonValue.ValueExists("templateId"))
|
|
{
|
|
m_templateId = jsonValue.GetString("templateId");
|
|
|
|
}
|
|
|
|
if(jsonValue.ValueExists("templateUrl"))
|
|
{
|
|
m_templateUrl = jsonValue.GetString("templateUrl");
|
|
|
|
}
|
|
|
|
|
|
|
|
return *this;
|
|
}
|