72 lines
1.4 KiB
C++
72 lines
1.4 KiB
C++
/**
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|
*/
|
|
|
|
#include <aws/gamelift/model/UpdateScriptRequest.h>
|
|
#include <aws/core/utils/json/JsonSerializer.h>
|
|
#include <aws/core/utils/HashingUtils.h>
|
|
|
|
#include <utility>
|
|
|
|
using namespace Aws::GameLift::Model;
|
|
using namespace Aws::Utils::Json;
|
|
using namespace Aws::Utils;
|
|
|
|
UpdateScriptRequest::UpdateScriptRequest() :
|
|
m_scriptIdHasBeenSet(false),
|
|
m_nameHasBeenSet(false),
|
|
m_versionHasBeenSet(false),
|
|
m_storageLocationHasBeenSet(false),
|
|
m_zipFileHasBeenSet(false)
|
|
{
|
|
}
|
|
|
|
Aws::String UpdateScriptRequest::SerializePayload() const
|
|
{
|
|
JsonValue payload;
|
|
|
|
if(m_scriptIdHasBeenSet)
|
|
{
|
|
payload.WithString("ScriptId", m_scriptId);
|
|
|
|
}
|
|
|
|
if(m_nameHasBeenSet)
|
|
{
|
|
payload.WithString("Name", m_name);
|
|
|
|
}
|
|
|
|
if(m_versionHasBeenSet)
|
|
{
|
|
payload.WithString("Version", m_version);
|
|
|
|
}
|
|
|
|
if(m_storageLocationHasBeenSet)
|
|
{
|
|
payload.WithObject("StorageLocation", m_storageLocation.Jsonize());
|
|
|
|
}
|
|
|
|
if(m_zipFileHasBeenSet)
|
|
{
|
|
payload.WithString("ZipFile", HashingUtils::Base64Encode(m_zipFile));
|
|
}
|
|
|
|
return payload.View().WriteReadable();
|
|
}
|
|
|
|
Aws::Http::HeaderValueCollection UpdateScriptRequest::GetRequestSpecificHeaders() const
|
|
{
|
|
Aws::Http::HeaderValueCollection headers;
|
|
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "GameLift.UpdateScript"));
|
|
return headers;
|
|
|
|
}
|
|
|
|
|
|
|
|
|