58 lines
1.4 KiB
C++
58 lines
1.4 KiB
C++
/**
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|
*/
|
|
|
|
#include <aws/alexaforbusiness/model/SearchProfilesResult.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::AlexaForBusiness::Model;
|
|
using namespace Aws::Utils::Json;
|
|
using namespace Aws::Utils;
|
|
using namespace Aws;
|
|
|
|
SearchProfilesResult::SearchProfilesResult() :
|
|
m_totalCount(0)
|
|
{
|
|
}
|
|
|
|
SearchProfilesResult::SearchProfilesResult(const Aws::AmazonWebServiceResult<JsonValue>& result) :
|
|
m_totalCount(0)
|
|
{
|
|
*this = result;
|
|
}
|
|
|
|
SearchProfilesResult& SearchProfilesResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
|
|
{
|
|
JsonView jsonValue = result.GetPayload().View();
|
|
if(jsonValue.ValueExists("Profiles"))
|
|
{
|
|
Array<JsonView> profilesJsonList = jsonValue.GetArray("Profiles");
|
|
for(unsigned profilesIndex = 0; profilesIndex < profilesJsonList.GetLength(); ++profilesIndex)
|
|
{
|
|
m_profiles.push_back(profilesJsonList[profilesIndex].AsObject());
|
|
}
|
|
}
|
|
|
|
if(jsonValue.ValueExists("NextToken"))
|
|
{
|
|
m_nextToken = jsonValue.GetString("NextToken");
|
|
|
|
}
|
|
|
|
if(jsonValue.ValueExists("TotalCount"))
|
|
{
|
|
m_totalCount = jsonValue.GetInteger("TotalCount");
|
|
|
|
}
|
|
|
|
|
|
|
|
return *this;
|
|
}
|