/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include using namespace Aws::Keyspaces::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; CreateKeyspaceRequest::CreateKeyspaceRequest() : m_keyspaceNameHasBeenSet(false), m_tagsHasBeenSet(false), m_replicationSpecificationHasBeenSet(false) { } Aws::String CreateKeyspaceRequest::SerializePayload() const { JsonValue payload; if(m_keyspaceNameHasBeenSet) { payload.WithString("keyspaceName", m_keyspaceName); } 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)); } if(m_replicationSpecificationHasBeenSet) { payload.WithObject("replicationSpecification", m_replicationSpecification.Jsonize()); } return payload.View().WriteReadable(); } Aws::Http::HeaderValueCollection CreateKeyspaceRequest::GetRequestSpecificHeaders() const { Aws::Http::HeaderValueCollection headers; headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "KeyspacesService.CreateKeyspace")); return headers; }