This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
pxz-hos-client-cpp-module/support/aws-sdk-cpp-master/aws-cpp-sdk-ec2/source/model/ReplaceRouteRequest.cpp

122 lines
3.3 KiB
C++

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/ec2/model/ReplaceRouteRequest.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
using namespace Aws::EC2::Model;
using namespace Aws::Utils;
ReplaceRouteRequest::ReplaceRouteRequest() :
m_destinationCidrBlockHasBeenSet(false),
m_destinationIpv6CidrBlockHasBeenSet(false),
m_destinationPrefixListIdHasBeenSet(false),
m_dryRun(false),
m_dryRunHasBeenSet(false),
m_egressOnlyInternetGatewayIdHasBeenSet(false),
m_gatewayIdHasBeenSet(false),
m_instanceIdHasBeenSet(false),
m_localTarget(false),
m_localTargetHasBeenSet(false),
m_natGatewayIdHasBeenSet(false),
m_transitGatewayIdHasBeenSet(false),
m_localGatewayIdHasBeenSet(false),
m_carrierGatewayIdHasBeenSet(false),
m_networkInterfaceIdHasBeenSet(false),
m_routeTableIdHasBeenSet(false),
m_vpcPeeringConnectionIdHasBeenSet(false)
{
}
Aws::String ReplaceRouteRequest::SerializePayload() const
{
Aws::StringStream ss;
ss << "Action=ReplaceRoute&";
if(m_destinationCidrBlockHasBeenSet)
{
ss << "DestinationCidrBlock=" << StringUtils::URLEncode(m_destinationCidrBlock.c_str()) << "&";
}
if(m_destinationIpv6CidrBlockHasBeenSet)
{
ss << "DestinationIpv6CidrBlock=" << StringUtils::URLEncode(m_destinationIpv6CidrBlock.c_str()) << "&";
}
if(m_destinationPrefixListIdHasBeenSet)
{
ss << "DestinationPrefixListId=" << StringUtils::URLEncode(m_destinationPrefixListId.c_str()) << "&";
}
if(m_dryRunHasBeenSet)
{
ss << "DryRun=" << std::boolalpha << m_dryRun << "&";
}
if(m_egressOnlyInternetGatewayIdHasBeenSet)
{
ss << "EgressOnlyInternetGatewayId=" << StringUtils::URLEncode(m_egressOnlyInternetGatewayId.c_str()) << "&";
}
if(m_gatewayIdHasBeenSet)
{
ss << "GatewayId=" << StringUtils::URLEncode(m_gatewayId.c_str()) << "&";
}
if(m_instanceIdHasBeenSet)
{
ss << "InstanceId=" << StringUtils::URLEncode(m_instanceId.c_str()) << "&";
}
if(m_localTargetHasBeenSet)
{
ss << "LocalTarget=" << std::boolalpha << m_localTarget << "&";
}
if(m_natGatewayIdHasBeenSet)
{
ss << "NatGatewayId=" << StringUtils::URLEncode(m_natGatewayId.c_str()) << "&";
}
if(m_transitGatewayIdHasBeenSet)
{
ss << "TransitGatewayId=" << StringUtils::URLEncode(m_transitGatewayId.c_str()) << "&";
}
if(m_localGatewayIdHasBeenSet)
{
ss << "LocalGatewayId=" << StringUtils::URLEncode(m_localGatewayId.c_str()) << "&";
}
if(m_carrierGatewayIdHasBeenSet)
{
ss << "CarrierGatewayId=" << StringUtils::URLEncode(m_carrierGatewayId.c_str()) << "&";
}
if(m_networkInterfaceIdHasBeenSet)
{
ss << "NetworkInterfaceId=" << StringUtils::URLEncode(m_networkInterfaceId.c_str()) << "&";
}
if(m_routeTableIdHasBeenSet)
{
ss << "RouteTableId=" << StringUtils::URLEncode(m_routeTableId.c_str()) << "&";
}
if(m_vpcPeeringConnectionIdHasBeenSet)
{
ss << "VpcPeeringConnectionId=" << StringUtils::URLEncode(m_vpcPeeringConnectionId.c_str()) << "&";
}
ss << "Version=2016-11-15";
return ss.str();
}
void ReplaceRouteRequest::DumpBodyToUrl(Aws::Http::URI& uri ) const
{
uri.SetQueryString(SerializePayload());
}