/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include using namespace Aws::FSx::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; CopyBackupRequest::CopyBackupRequest() : m_clientRequestToken(Aws::Utils::UUID::PseudoRandomUUID()), m_clientRequestTokenHasBeenSet(true), m_sourceBackupIdHasBeenSet(false), m_sourceRegionHasBeenSet(false), m_kmsKeyIdHasBeenSet(false), m_copyTags(false), m_copyTagsHasBeenSet(false), m_tagsHasBeenSet(false) { } Aws::String CopyBackupRequest::SerializePayload() const { JsonValue payload; if(m_clientRequestTokenHasBeenSet) { payload.WithString("ClientRequestToken", m_clientRequestToken); } if(m_sourceBackupIdHasBeenSet) { payload.WithString("SourceBackupId", m_sourceBackupId); } if(m_sourceRegionHasBeenSet) { payload.WithString("SourceRegion", m_sourceRegion); } if(m_kmsKeyIdHasBeenSet) { payload.WithString("KmsKeyId", m_kmsKeyId); } if(m_copyTagsHasBeenSet) { payload.WithBool("CopyTags", m_copyTags); } 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 CopyBackupRequest::GetRequestSpecificHeaders() const { Aws::Http::HeaderValueCollection headers; headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AWSSimbaAPIService_v20180301.CopyBackup")); return headers; }