/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include using namespace Aws::MemoryDB::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; CreateUserRequest::CreateUserRequest() : m_userNameHasBeenSet(false), m_authenticationModeHasBeenSet(false), m_accessStringHasBeenSet(false), m_tagsHasBeenSet(false) { } Aws::String CreateUserRequest::SerializePayload() const { JsonValue payload; if(m_userNameHasBeenSet) { payload.WithString("UserName", m_userName); } if(m_authenticationModeHasBeenSet) { payload.WithObject("AuthenticationMode", m_authenticationMode.Jsonize()); } if(m_accessStringHasBeenSet) { payload.WithString("AccessString", m_accessString); } if(m_tagsHasBeenSet) { Aws::Utils::Array tagsJsonList(m_tags.size()); for(unsigned tagsIndex = 0; tagsIndex < tagsJsonList.GetLength(); ++tagsIndex) { tagsJsonList[tagsIndex].AsObject(m_tags[tagsIndex].Jsonize()); } payload.WithArray("Tags", std::move(tagsJsonList)); } return payload.View().WriteReadable(); } Aws::Http::HeaderValueCollection CreateUserRequest::GetRequestSpecificHeaders() const { Aws::Http::HeaderValueCollection headers; headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AmazonMemoryDB.CreateUser")); return headers; }