58 lines
1.2 KiB
C++
58 lines
1.2 KiB
C++
/**
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|
*/
|
|
|
|
#include <aws/schemas/model/PutResourcePolicyRequest.h>
|
|
#include <aws/core/utils/json/JsonSerializer.h>
|
|
#include <aws/core/http/URI.h>
|
|
#include <aws/core/utils/memory/stl/AWSStringStream.h>
|
|
|
|
#include <utility>
|
|
|
|
using namespace Aws::Schemas::Model;
|
|
using namespace Aws::Utils::Json;
|
|
using namespace Aws::Utils;
|
|
using namespace Aws::Http;
|
|
|
|
PutResourcePolicyRequest::PutResourcePolicyRequest() :
|
|
m_policyHasBeenSet(false),
|
|
m_registryNameHasBeenSet(false),
|
|
m_revisionIdHasBeenSet(false)
|
|
{
|
|
}
|
|
|
|
Aws::String PutResourcePolicyRequest::SerializePayload() const
|
|
{
|
|
JsonValue payload;
|
|
|
|
if(m_policyHasBeenSet)
|
|
{
|
|
payload.WithString("Policy", m_policy);
|
|
|
|
}
|
|
|
|
if(m_revisionIdHasBeenSet)
|
|
{
|
|
payload.WithString("RevisionId", m_revisionId);
|
|
|
|
}
|
|
|
|
return payload.View().WriteReadable();
|
|
}
|
|
|
|
void PutResourcePolicyRequest::AddQueryStringParameters(URI& uri) const
|
|
{
|
|
Aws::StringStream ss;
|
|
if(m_registryNameHasBeenSet)
|
|
{
|
|
ss << m_registryName;
|
|
uri.AddQueryStringParameter("registryName", ss.str());
|
|
ss.str("");
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|