All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.networkmanager.model.ConnectPeerConfiguration Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS Network Manager module holds the client classes that are used for communicating with AWS Network Manager Service

There is a newer version: 1.12.772
Show newest version
/*
 * Copyright 2019-2024 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.networkmanager.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* Describes a core network Connect peer configuration. *

* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ConnectPeerConfiguration implements Serializable, Cloneable, StructuredPojo { /** *

* The IP address of a core network. *

*/ private String coreNetworkAddress; /** *

* The IP address of the Connect peer. *

*/ private String peerAddress; /** *

* The inside IP addresses used for a Connect peer configuration. *

*/ private java.util.List insideCidrBlocks; /** *

* The protocol used for a Connect peer configuration. *

*/ private String protocol; /** *

* The Connect peer BGP configurations. *

*/ private java.util.List bgpConfigurations; /** *

* The IP address of a core network. *

* * @param coreNetworkAddress * The IP address of a core network. */ public void setCoreNetworkAddress(String coreNetworkAddress) { this.coreNetworkAddress = coreNetworkAddress; } /** *

* The IP address of a core network. *

* * @return The IP address of a core network. */ public String getCoreNetworkAddress() { return this.coreNetworkAddress; } /** *

* The IP address of a core network. *

* * @param coreNetworkAddress * The IP address of a core network. * @return Returns a reference to this object so that method calls can be chained together. */ public ConnectPeerConfiguration withCoreNetworkAddress(String coreNetworkAddress) { setCoreNetworkAddress(coreNetworkAddress); return this; } /** *

* The IP address of the Connect peer. *

* * @param peerAddress * The IP address of the Connect peer. */ public void setPeerAddress(String peerAddress) { this.peerAddress = peerAddress; } /** *

* The IP address of the Connect peer. *

* * @return The IP address of the Connect peer. */ public String getPeerAddress() { return this.peerAddress; } /** *

* The IP address of the Connect peer. *

* * @param peerAddress * The IP address of the Connect peer. * @return Returns a reference to this object so that method calls can be chained together. */ public ConnectPeerConfiguration withPeerAddress(String peerAddress) { setPeerAddress(peerAddress); return this; } /** *

* The inside IP addresses used for a Connect peer configuration. *

* * @return The inside IP addresses used for a Connect peer configuration. */ public java.util.List getInsideCidrBlocks() { return insideCidrBlocks; } /** *

* The inside IP addresses used for a Connect peer configuration. *

* * @param insideCidrBlocks * The inside IP addresses used for a Connect peer configuration. */ public void setInsideCidrBlocks(java.util.Collection insideCidrBlocks) { if (insideCidrBlocks == null) { this.insideCidrBlocks = null; return; } this.insideCidrBlocks = new java.util.ArrayList(insideCidrBlocks); } /** *

* The inside IP addresses used for a Connect peer configuration. *

*

* 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 inside IP addresses used for a Connect peer configuration. * @return Returns a reference to this object so that method calls can be chained together. */ public ConnectPeerConfiguration withInsideCidrBlocks(String... insideCidrBlocks) { if (this.insideCidrBlocks == null) { setInsideCidrBlocks(new java.util.ArrayList(insideCidrBlocks.length)); } for (String ele : insideCidrBlocks) { this.insideCidrBlocks.add(ele); } return this; } /** *

* The inside IP addresses used for a Connect peer configuration. *

* * @param insideCidrBlocks * The inside IP addresses used for a Connect peer configuration. * @return Returns a reference to this object so that method calls can be chained together. */ public ConnectPeerConfiguration withInsideCidrBlocks(java.util.Collection insideCidrBlocks) { setInsideCidrBlocks(insideCidrBlocks); return this; } /** *

* The protocol used for a Connect peer configuration. *

* * @param protocol * The protocol used for a Connect peer configuration. * @see TunnelProtocol */ public void setProtocol(String protocol) { this.protocol = protocol; } /** *

* The protocol used for a Connect peer configuration. *

* * @return The protocol used for a Connect peer configuration. * @see TunnelProtocol */ public String getProtocol() { return this.protocol; } /** *

* The protocol used for a Connect peer configuration. *

* * @param protocol * The protocol used for a Connect peer configuration. * @return Returns a reference to this object so that method calls can be chained together. * @see TunnelProtocol */ public ConnectPeerConfiguration withProtocol(String protocol) { setProtocol(protocol); return this; } /** *

* The protocol used for a Connect peer configuration. *

* * @param protocol * The protocol used for a Connect peer configuration. * @return Returns a reference to this object so that method calls can be chained together. * @see TunnelProtocol */ public ConnectPeerConfiguration withProtocol(TunnelProtocol protocol) { this.protocol = protocol.toString(); return this; } /** *

* The Connect peer BGP configurations. *

* * @return The Connect peer BGP configurations. */ public java.util.List getBgpConfigurations() { return bgpConfigurations; } /** *

* The Connect peer BGP configurations. *

* * @param bgpConfigurations * The Connect peer BGP configurations. */ public void setBgpConfigurations(java.util.Collection bgpConfigurations) { if (bgpConfigurations == null) { this.bgpConfigurations = null; return; } this.bgpConfigurations = new java.util.ArrayList(bgpConfigurations); } /** *

* The Connect peer BGP configurations. *

*

* 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 Connect peer BGP configurations. * @return Returns a reference to this object so that method calls can be chained together. */ public ConnectPeerConfiguration withBgpConfigurations(ConnectPeerBgpConfiguration... bgpConfigurations) { if (this.bgpConfigurations == null) { setBgpConfigurations(new java.util.ArrayList(bgpConfigurations.length)); } for (ConnectPeerBgpConfiguration ele : bgpConfigurations) { this.bgpConfigurations.add(ele); } return this; } /** *

* The Connect peer BGP configurations. *

* * @param bgpConfigurations * The Connect peer BGP configurations. * @return Returns a reference to this object so that method calls can be chained together. */ public ConnectPeerConfiguration withBgpConfigurations(java.util.Collection bgpConfigurations) { setBgpConfigurations(bgpConfigurations); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getCoreNetworkAddress() != null) sb.append("CoreNetworkAddress: ").append(getCoreNetworkAddress()).append(","); if (getPeerAddress() != null) sb.append("PeerAddress: ").append(getPeerAddress()).append(","); if (getInsideCidrBlocks() != null) sb.append("InsideCidrBlocks: ").append(getInsideCidrBlocks()).append(","); if (getProtocol() != null) sb.append("Protocol: ").append(getProtocol()).append(","); if (getBgpConfigurations() != null) sb.append("BgpConfigurations: ").append(getBgpConfigurations()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ConnectPeerConfiguration == false) return false; ConnectPeerConfiguration other = (ConnectPeerConfiguration) obj; if (other.getCoreNetworkAddress() == null ^ this.getCoreNetworkAddress() == null) return false; if (other.getCoreNetworkAddress() != null && other.getCoreNetworkAddress().equals(this.getCoreNetworkAddress()) == false) return false; if (other.getPeerAddress() == null ^ this.getPeerAddress() == null) return false; if (other.getPeerAddress() != null && other.getPeerAddress().equals(this.getPeerAddress()) == false) return false; if (other.getInsideCidrBlocks() == null ^ this.getInsideCidrBlocks() == null) return false; if (other.getInsideCidrBlocks() != null && other.getInsideCidrBlocks().equals(this.getInsideCidrBlocks()) == false) return false; if (other.getProtocol() == null ^ this.getProtocol() == null) return false; if (other.getProtocol() != null && other.getProtocol().equals(this.getProtocol()) == false) return false; if (other.getBgpConfigurations() == null ^ this.getBgpConfigurations() == null) return false; if (other.getBgpConfigurations() != null && other.getBgpConfigurations().equals(this.getBgpConfigurations()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCoreNetworkAddress() == null) ? 0 : getCoreNetworkAddress().hashCode()); hashCode = prime * hashCode + ((getPeerAddress() == null) ? 0 : getPeerAddress().hashCode()); hashCode = prime * hashCode + ((getInsideCidrBlocks() == null) ? 0 : getInsideCidrBlocks().hashCode()); hashCode = prime * hashCode + ((getProtocol() == null) ? 0 : getProtocol().hashCode()); hashCode = prime * hashCode + ((getBgpConfigurations() == null) ? 0 : getBgpConfigurations().hashCode()); return hashCode; } @Override public ConnectPeerConfiguration clone() { try { return (ConnectPeerConfiguration) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.networkmanager.model.transform.ConnectPeerConfigurationMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy