/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.ec2.model; import java.io.Serializable; import javax.annotation.Generated; /** *
* Describes the Connect peer details. *
* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class TransitGatewayConnectPeerConfiguration implements Serializable, Cloneable { /** ** The Connect peer IP address on the transit gateway side of the tunnel. *
*/ private String transitGatewayAddress; /** ** The Connect peer IP address on the appliance side of the tunnel. *
*/ private String peerAddress; /** ** The range of interior BGP peer IP addresses. *
*/ private com.amazonaws.internal.SdkInternalList* The tunnel protocol. *
*/ private String protocol; /** ** The BGP configuration details. *
*/ private com.amazonaws.internal.SdkInternalList* The Connect peer IP address on the transit gateway side of the tunnel. *
* * @param transitGatewayAddress * The Connect peer IP address on the transit gateway side of the tunnel. */ public void setTransitGatewayAddress(String transitGatewayAddress) { this.transitGatewayAddress = transitGatewayAddress; } /** ** The Connect peer IP address on the transit gateway side of the tunnel. *
* * @return The Connect peer IP address on the transit gateway side of the tunnel. */ public String getTransitGatewayAddress() { return this.transitGatewayAddress; } /** ** The Connect peer IP address on the transit gateway side of the tunnel. *
* * @param transitGatewayAddress * The Connect peer IP address on the transit gateway side of the tunnel. * @return Returns a reference to this object so that method calls can be chained together. */ public TransitGatewayConnectPeerConfiguration withTransitGatewayAddress(String transitGatewayAddress) { setTransitGatewayAddress(transitGatewayAddress); return this; } /** ** The Connect peer IP address on the appliance side of the tunnel. *
* * @param peerAddress * The Connect peer IP address on the appliance side of the tunnel. */ public void setPeerAddress(String peerAddress) { this.peerAddress = peerAddress; } /** ** The Connect peer IP address on the appliance side of the tunnel. *
* * @return The Connect peer IP address on the appliance side of the tunnel. */ public String getPeerAddress() { return this.peerAddress; } /** ** The Connect peer IP address on the appliance side of the tunnel. *
* * @param peerAddress * The Connect peer IP address on the appliance side of the tunnel. * @return Returns a reference to this object so that method calls can be chained together. */ public TransitGatewayConnectPeerConfiguration withPeerAddress(String peerAddress) { setPeerAddress(peerAddress); return this; } /** ** The range of interior BGP peer IP addresses. *
* * @return The range of interior BGP peer IP addresses. */ public java.util.List* The range of interior BGP peer IP addresses. *
* * @param insideCidrBlocks * The range of interior BGP peer IP addresses. */ public void setInsideCidrBlocks(java.util.Collection* The range of interior BGP peer IP addresses. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setInsideCidrBlocks(java.util.Collection)} or {@link #withInsideCidrBlocks(java.util.Collection)} if you * want to override the existing values. *
* * @param insideCidrBlocks * The range of interior BGP peer IP addresses. * @return Returns a reference to this object so that method calls can be chained together. */ public TransitGatewayConnectPeerConfiguration withInsideCidrBlocks(String... insideCidrBlocks) { if (this.insideCidrBlocks == null) { setInsideCidrBlocks(new com.amazonaws.internal.SdkInternalList* The range of interior BGP peer IP addresses. *
* * @param insideCidrBlocks * The range of interior BGP peer IP addresses. * @return Returns a reference to this object so that method calls can be chained together. */ public TransitGatewayConnectPeerConfiguration withInsideCidrBlocks(java.util.Collection* The tunnel protocol. *
* * @param protocol * The tunnel protocol. * @see ProtocolValue */ public void setProtocol(String protocol) { this.protocol = protocol; } /** ** The tunnel protocol. *
* * @return The tunnel protocol. * @see ProtocolValue */ public String getProtocol() { return this.protocol; } /** ** The tunnel protocol. *
* * @param protocol * The tunnel protocol. * @return Returns a reference to this object so that method calls can be chained together. * @see ProtocolValue */ public TransitGatewayConnectPeerConfiguration withProtocol(String protocol) { setProtocol(protocol); return this; } /** ** The tunnel protocol. *
* * @param protocol * The tunnel protocol. * @return Returns a reference to this object so that method calls can be chained together. * @see ProtocolValue */ public TransitGatewayConnectPeerConfiguration withProtocol(ProtocolValue protocol) { this.protocol = protocol.toString(); return this; } /** ** The BGP configuration details. *
* * @return The BGP configuration details. */ public java.util.List* The BGP configuration details. *
* * @param bgpConfigurations * The BGP configuration details. */ public void setBgpConfigurations(java.util.Collection* The BGP configuration details. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setBgpConfigurations(java.util.Collection)} or {@link #withBgpConfigurations(java.util.Collection)} if * you want to override the existing values. *
* * @param bgpConfigurations * The BGP configuration details. * @return Returns a reference to this object so that method calls can be chained together. */ public TransitGatewayConnectPeerConfiguration withBgpConfigurations(TransitGatewayAttachmentBgpConfiguration... bgpConfigurations) { if (this.bgpConfigurations == null) { setBgpConfigurations(new com.amazonaws.internal.SdkInternalList* The BGP configuration details. *
* * @param bgpConfigurations * The BGP configuration details. * @return Returns a reference to this object so that method calls can be chained together. */ public TransitGatewayConnectPeerConfiguration withBgpConfigurations(java.util.Collection