/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include #include #include using namespace Aws::Utils::Xml; using namespace Aws::Utils; namespace Aws { namespace EC2 { namespace Model { ModifyTransitGatewayOptions::ModifyTransitGatewayOptions() : m_vpnEcmpSupport(VpnEcmpSupportValue::NOT_SET), m_vpnEcmpSupportHasBeenSet(false), m_dnsSupport(DnsSupportValue::NOT_SET), m_dnsSupportHasBeenSet(false), m_autoAcceptSharedAttachments(AutoAcceptSharedAttachmentsValue::NOT_SET), m_autoAcceptSharedAttachmentsHasBeenSet(false), m_defaultRouteTableAssociation(DefaultRouteTableAssociationValue::NOT_SET), m_defaultRouteTableAssociationHasBeenSet(false), m_associationDefaultRouteTableIdHasBeenSet(false), m_defaultRouteTablePropagation(DefaultRouteTablePropagationValue::NOT_SET), m_defaultRouteTablePropagationHasBeenSet(false), m_propagationDefaultRouteTableIdHasBeenSet(false) { } ModifyTransitGatewayOptions::ModifyTransitGatewayOptions(const XmlNode& xmlNode) : m_vpnEcmpSupport(VpnEcmpSupportValue::NOT_SET), m_vpnEcmpSupportHasBeenSet(false), m_dnsSupport(DnsSupportValue::NOT_SET), m_dnsSupportHasBeenSet(false), m_autoAcceptSharedAttachments(AutoAcceptSharedAttachmentsValue::NOT_SET), m_autoAcceptSharedAttachmentsHasBeenSet(false), m_defaultRouteTableAssociation(DefaultRouteTableAssociationValue::NOT_SET), m_defaultRouteTableAssociationHasBeenSet(false), m_associationDefaultRouteTableIdHasBeenSet(false), m_defaultRouteTablePropagation(DefaultRouteTablePropagationValue::NOT_SET), m_defaultRouteTablePropagationHasBeenSet(false), m_propagationDefaultRouteTableIdHasBeenSet(false) { *this = xmlNode; } ModifyTransitGatewayOptions& ModifyTransitGatewayOptions::operator =(const XmlNode& xmlNode) { XmlNode resultNode = xmlNode; if(!resultNode.IsNull()) { XmlNode vpnEcmpSupportNode = resultNode.FirstChild("VpnEcmpSupport"); if(!vpnEcmpSupportNode.IsNull()) { m_vpnEcmpSupport = VpnEcmpSupportValueMapper::GetVpnEcmpSupportValueForName(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(vpnEcmpSupportNode.GetText()).c_str()).c_str()); m_vpnEcmpSupportHasBeenSet = true; } XmlNode dnsSupportNode = resultNode.FirstChild("DnsSupport"); if(!dnsSupportNode.IsNull()) { m_dnsSupport = DnsSupportValueMapper::GetDnsSupportValueForName(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(dnsSupportNode.GetText()).c_str()).c_str()); m_dnsSupportHasBeenSet = true; } XmlNode autoAcceptSharedAttachmentsNode = resultNode.FirstChild("AutoAcceptSharedAttachments"); if(!autoAcceptSharedAttachmentsNode.IsNull()) { m_autoAcceptSharedAttachments = AutoAcceptSharedAttachmentsValueMapper::GetAutoAcceptSharedAttachmentsValueForName(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(autoAcceptSharedAttachmentsNode.GetText()).c_str()).c_str()); m_autoAcceptSharedAttachmentsHasBeenSet = true; } XmlNode defaultRouteTableAssociationNode = resultNode.FirstChild("DefaultRouteTableAssociation"); if(!defaultRouteTableAssociationNode.IsNull()) { m_defaultRouteTableAssociation = DefaultRouteTableAssociationValueMapper::GetDefaultRouteTableAssociationValueForName(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(defaultRouteTableAssociationNode.GetText()).c_str()).c_str()); m_defaultRouteTableAssociationHasBeenSet = true; } XmlNode associationDefaultRouteTableIdNode = resultNode.FirstChild("AssociationDefaultRouteTableId"); if(!associationDefaultRouteTableIdNode.IsNull()) { m_associationDefaultRouteTableId = Aws::Utils::Xml::DecodeEscapedXmlText(associationDefaultRouteTableIdNode.GetText()); m_associationDefaultRouteTableIdHasBeenSet = true; } XmlNode defaultRouteTablePropagationNode = resultNode.FirstChild("DefaultRouteTablePropagation"); if(!defaultRouteTablePropagationNode.IsNull()) { m_defaultRouteTablePropagation = DefaultRouteTablePropagationValueMapper::GetDefaultRouteTablePropagationValueForName(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(defaultRouteTablePropagationNode.GetText()).c_str()).c_str()); m_defaultRouteTablePropagationHasBeenSet = true; } XmlNode propagationDefaultRouteTableIdNode = resultNode.FirstChild("PropagationDefaultRouteTableId"); if(!propagationDefaultRouteTableIdNode.IsNull()) { m_propagationDefaultRouteTableId = Aws::Utils::Xml::DecodeEscapedXmlText(propagationDefaultRouteTableIdNode.GetText()); m_propagationDefaultRouteTableIdHasBeenSet = true; } } return *this; } void ModifyTransitGatewayOptions::OutputToStream(Aws::OStream& oStream, const char* location, unsigned index, const char* locationValue) const { if(m_vpnEcmpSupportHasBeenSet) { oStream << location << index << locationValue << ".VpnEcmpSupport=" << VpnEcmpSupportValueMapper::GetNameForVpnEcmpSupportValue(m_vpnEcmpSupport) << "&"; } if(m_dnsSupportHasBeenSet) { oStream << location << index << locationValue << ".DnsSupport=" << DnsSupportValueMapper::GetNameForDnsSupportValue(m_dnsSupport) << "&"; } if(m_autoAcceptSharedAttachmentsHasBeenSet) { oStream << location << index << locationValue << ".AutoAcceptSharedAttachments=" << AutoAcceptSharedAttachmentsValueMapper::GetNameForAutoAcceptSharedAttachmentsValue(m_autoAcceptSharedAttachments) << "&"; } if(m_defaultRouteTableAssociationHasBeenSet) { oStream << location << index << locationValue << ".DefaultRouteTableAssociation=" << DefaultRouteTableAssociationValueMapper::GetNameForDefaultRouteTableAssociationValue(m_defaultRouteTableAssociation) << "&"; } if(m_associationDefaultRouteTableIdHasBeenSet) { oStream << location << index << locationValue << ".AssociationDefaultRouteTableId=" << StringUtils::URLEncode(m_associationDefaultRouteTableId.c_str()) << "&"; } if(m_defaultRouteTablePropagationHasBeenSet) { oStream << location << index << locationValue << ".DefaultRouteTablePropagation=" << DefaultRouteTablePropagationValueMapper::GetNameForDefaultRouteTablePropagationValue(m_defaultRouteTablePropagation) << "&"; } if(m_propagationDefaultRouteTableIdHasBeenSet) { oStream << location << index << locationValue << ".PropagationDefaultRouteTableId=" << StringUtils::URLEncode(m_propagationDefaultRouteTableId.c_str()) << "&"; } } void ModifyTransitGatewayOptions::OutputToStream(Aws::OStream& oStream, const char* location) const { if(m_vpnEcmpSupportHasBeenSet) { oStream << location << ".VpnEcmpSupport=" << VpnEcmpSupportValueMapper::GetNameForVpnEcmpSupportValue(m_vpnEcmpSupport) << "&"; } if(m_dnsSupportHasBeenSet) { oStream << location << ".DnsSupport=" << DnsSupportValueMapper::GetNameForDnsSupportValue(m_dnsSupport) << "&"; } if(m_autoAcceptSharedAttachmentsHasBeenSet) { oStream << location << ".AutoAcceptSharedAttachments=" << AutoAcceptSharedAttachmentsValueMapper::GetNameForAutoAcceptSharedAttachmentsValue(m_autoAcceptSharedAttachments) << "&"; } if(m_defaultRouteTableAssociationHasBeenSet) { oStream << location << ".DefaultRouteTableAssociation=" << DefaultRouteTableAssociationValueMapper::GetNameForDefaultRouteTableAssociationValue(m_defaultRouteTableAssociation) << "&"; } if(m_associationDefaultRouteTableIdHasBeenSet) { oStream << location << ".AssociationDefaultRouteTableId=" << StringUtils::URLEncode(m_associationDefaultRouteTableId.c_str()) << "&"; } if(m_defaultRouteTablePropagationHasBeenSet) { oStream << location << ".DefaultRouteTablePropagation=" << DefaultRouteTablePropagationValueMapper::GetNameForDefaultRouteTablePropagationValue(m_defaultRouteTablePropagation) << "&"; } if(m_propagationDefaultRouteTableIdHasBeenSet) { oStream << location << ".PropagationDefaultRouteTableId=" << StringUtils::URLEncode(m_propagationDefaultRouteTableId.c_str()) << "&"; } } } // namespace Model } // namespace EC2 } // namespace Aws