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-pinpoint/source/model/EventsResponse.cpp

68 lines
1.3 KiB
C++

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/pinpoint/model/EventsResponse.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Pinpoint
{
namespace Model
{
EventsResponse::EventsResponse() :
m_resultsHasBeenSet(false)
{
}
EventsResponse::EventsResponse(JsonView jsonValue) :
m_resultsHasBeenSet(false)
{
*this = jsonValue;
}
EventsResponse& EventsResponse::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Results"))
{
Aws::Map<Aws::String, JsonView> resultsJsonMap = jsonValue.GetObject("Results").GetAllObjects();
for(auto& resultsItem : resultsJsonMap)
{
m_results[resultsItem.first] = resultsItem.second.AsObject();
}
m_resultsHasBeenSet = true;
}
return *this;
}
JsonValue EventsResponse::Jsonize() const
{
JsonValue payload;
if(m_resultsHasBeenSet)
{
JsonValue resultsJsonMap;
for(auto& resultsItem : m_results)
{
resultsJsonMap.WithObject(resultsItem.first, resultsItem.second.Jsonize());
}
payload.WithObject("Results", std::move(resultsJsonMap));
}
return payload;
}
} // namespace Model
} // namespace Pinpoint
} // namespace Aws