/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include using namespace Aws::SSM::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; UpdateDocumentRequest::UpdateDocumentRequest() : m_contentHasBeenSet(false), m_attachmentsHasBeenSet(false), m_nameHasBeenSet(false), m_displayNameHasBeenSet(false), m_versionNameHasBeenSet(false), m_documentVersionHasBeenSet(false), m_documentFormat(DocumentFormat::NOT_SET), m_documentFormatHasBeenSet(false), m_targetTypeHasBeenSet(false) { } Aws::String UpdateDocumentRequest::SerializePayload() const { JsonValue payload; if(m_contentHasBeenSet) { payload.WithString("Content", m_content); } if(m_attachmentsHasBeenSet) { Aws::Utils::Array attachmentsJsonList(m_attachments.size()); for(unsigned attachmentsIndex = 0; attachmentsIndex < attachmentsJsonList.GetLength(); ++attachmentsIndex) { attachmentsJsonList[attachmentsIndex].AsObject(m_attachments[attachmentsIndex].Jsonize()); } payload.WithArray("Attachments", std::move(attachmentsJsonList)); } if(m_nameHasBeenSet) { payload.WithString("Name", m_name); } if(m_displayNameHasBeenSet) { payload.WithString("DisplayName", m_displayName); } if(m_versionNameHasBeenSet) { payload.WithString("VersionName", m_versionName); } if(m_documentVersionHasBeenSet) { payload.WithString("DocumentVersion", m_documentVersion); } if(m_documentFormatHasBeenSet) { payload.WithString("DocumentFormat", DocumentFormatMapper::GetNameForDocumentFormat(m_documentFormat)); } if(m_targetTypeHasBeenSet) { payload.WithString("TargetType", m_targetType); } return payload.View().WriteReadable(); } Aws::Http::HeaderValueCollection UpdateDocumentRequest::GetRequestSpecificHeaders() const { Aws::Http::HeaderValueCollection headers; headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AmazonSSM.UpdateDocument")); return headers; }