56 lines
1.3 KiB
C++
56 lines
1.3 KiB
C++
/**
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|
*/
|
|
|
|
#include <aws/workspaces/model/AuthorizeIpRulesRequest.h>
|
|
#include <aws/core/utils/json/JsonSerializer.h>
|
|
|
|
#include <utility>
|
|
|
|
using namespace Aws::WorkSpaces::Model;
|
|
using namespace Aws::Utils::Json;
|
|
using namespace Aws::Utils;
|
|
|
|
AuthorizeIpRulesRequest::AuthorizeIpRulesRequest() :
|
|
m_groupIdHasBeenSet(false),
|
|
m_userRulesHasBeenSet(false)
|
|
{
|
|
}
|
|
|
|
Aws::String AuthorizeIpRulesRequest::SerializePayload() const
|
|
{
|
|
JsonValue payload;
|
|
|
|
if(m_groupIdHasBeenSet)
|
|
{
|
|
payload.WithString("GroupId", m_groupId);
|
|
|
|
}
|
|
|
|
if(m_userRulesHasBeenSet)
|
|
{
|
|
Array<JsonValue> userRulesJsonList(m_userRules.size());
|
|
for(unsigned userRulesIndex = 0; userRulesIndex < userRulesJsonList.GetLength(); ++userRulesIndex)
|
|
{
|
|
userRulesJsonList[userRulesIndex].AsObject(m_userRules[userRulesIndex].Jsonize());
|
|
}
|
|
payload.WithArray("UserRules", std::move(userRulesJsonList));
|
|
|
|
}
|
|
|
|
return payload.View().WriteReadable();
|
|
}
|
|
|
|
Aws::Http::HeaderValueCollection AuthorizeIpRulesRequest::GetRequestSpecificHeaders() const
|
|
{
|
|
Aws::Http::HeaderValueCollection headers;
|
|
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "WorkspacesService.AuthorizeIpRules"));
|
|
return headers;
|
|
|
|
}
|
|
|
|
|
|
|
|
|