/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include using namespace Aws::ForecastService::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; CreateMonitorRequest::CreateMonitorRequest() : m_monitorNameHasBeenSet(false), m_resourceArnHasBeenSet(false), m_tagsHasBeenSet(false) { } Aws::String CreateMonitorRequest::SerializePayload() const { JsonValue payload; if(m_monitorNameHasBeenSet) { payload.WithString("MonitorName", m_monitorName); } if(m_resourceArnHasBeenSet) { payload.WithString("ResourceArn", m_resourceArn); } 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 CreateMonitorRequest::GetRequestSpecificHeaders() const { Aws::Http::HeaderValueCollection headers; headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AmazonForecast.CreateMonitor")); return headers; }