/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include using namespace Aws::ECRPublic::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; CreateRepositoryRequest::CreateRepositoryRequest() : m_repositoryNameHasBeenSet(false), m_catalogDataHasBeenSet(false), m_tagsHasBeenSet(false) { } Aws::String CreateRepositoryRequest::SerializePayload() const { JsonValue payload; if(m_repositoryNameHasBeenSet) { payload.WithString("repositoryName", m_repositoryName); } if(m_catalogDataHasBeenSet) { payload.WithObject("catalogData", m_catalogData.Jsonize()); } 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 CreateRepositoryRequest::GetRequestSpecificHeaders() const { Aws::Http::HeaderValueCollection headers; headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "SpencerFrontendService.CreateRepository")); return headers; }