/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include using namespace Aws::PersonalizeEvents::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; PutUsersRequest::PutUsersRequest() : m_datasetArnHasBeenSet(false), m_usersHasBeenSet(false) { } Aws::String PutUsersRequest::SerializePayload() const { JsonValue payload; if(m_datasetArnHasBeenSet) { payload.WithString("datasetArn", m_datasetArn); } if(m_usersHasBeenSet) { Aws::Utils::Array usersJsonList(m_users.size()); for(unsigned usersIndex = 0; usersIndex < usersJsonList.GetLength(); ++usersIndex) { usersJsonList[usersIndex].AsObject(m_users[usersIndex].Jsonize()); } payload.WithArray("users", std::move(usersJsonList)); } return payload.View().WriteReadable(); }