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-apigateway/source/model/ClientCertificate.cpp

141 lines
3.0 KiB
C++

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/apigateway/model/ClientCertificate.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace APIGateway
{
namespace Model
{
ClientCertificate::ClientCertificate() :
m_clientCertificateIdHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_pemEncodedCertificateHasBeenSet(false),
m_createdDateHasBeenSet(false),
m_expirationDateHasBeenSet(false),
m_tagsHasBeenSet(false)
{
}
ClientCertificate::ClientCertificate(JsonView jsonValue) :
m_clientCertificateIdHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_pemEncodedCertificateHasBeenSet(false),
m_createdDateHasBeenSet(false),
m_expirationDateHasBeenSet(false),
m_tagsHasBeenSet(false)
{
*this = jsonValue;
}
ClientCertificate& ClientCertificate::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("clientCertificateId"))
{
m_clientCertificateId = jsonValue.GetString("clientCertificateId");
m_clientCertificateIdHasBeenSet = true;
}
if(jsonValue.ValueExists("description"))
{
m_description = jsonValue.GetString("description");
m_descriptionHasBeenSet = true;
}
if(jsonValue.ValueExists("pemEncodedCertificate"))
{
m_pemEncodedCertificate = jsonValue.GetString("pemEncodedCertificate");
m_pemEncodedCertificateHasBeenSet = true;
}
if(jsonValue.ValueExists("createdDate"))
{
m_createdDate = jsonValue.GetDouble("createdDate");
m_createdDateHasBeenSet = true;
}
if(jsonValue.ValueExists("expirationDate"))
{
m_expirationDate = jsonValue.GetDouble("expirationDate");
m_expirationDateHasBeenSet = true;
}
if(jsonValue.ValueExists("tags"))
{
Aws::Map<Aws::String, JsonView> tagsJsonMap = jsonValue.GetObject("tags").GetAllObjects();
for(auto& tagsItem : tagsJsonMap)
{
m_tags[tagsItem.first] = tagsItem.second.AsString();
}
m_tagsHasBeenSet = true;
}
return *this;
}
JsonValue ClientCertificate::Jsonize() const
{
JsonValue payload;
if(m_clientCertificateIdHasBeenSet)
{
payload.WithString("clientCertificateId", m_clientCertificateId);
}
if(m_descriptionHasBeenSet)
{
payload.WithString("description", m_description);
}
if(m_pemEncodedCertificateHasBeenSet)
{
payload.WithString("pemEncodedCertificate", m_pemEncodedCertificate);
}
if(m_createdDateHasBeenSet)
{
payload.WithDouble("createdDate", m_createdDate.SecondsWithMSPrecision());
}
if(m_expirationDateHasBeenSet)
{
payload.WithDouble("expirationDate", m_expirationDate.SecondsWithMSPrecision());
}
if(m_tagsHasBeenSet)
{
JsonValue tagsJsonMap;
for(auto& tagsItem : m_tags)
{
tagsJsonMap.WithString(tagsItem.first, tagsItem.second);
}
payload.WithObject("tags", std::move(tagsJsonMap));
}
return payload;
}
} // namespace Model
} // namespace APIGateway
} // namespace Aws