/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include #include #include #include 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& result) : m_totalCount(0) { *this = result; } SearchProfilesResult& SearchProfilesResult::operator =(const Aws::AmazonWebServiceResult& result) { JsonView jsonValue = result.GetPayload().View(); if(jsonValue.ValueExists("Profiles")) { Array 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; }