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

com.amazonaws.services.networkmanager.model.CreateConnectPeerRequest 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.AmazonWebServiceRequest;

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

    /**
     * 

* The ID of the connection attachment. *

*/ private String connectAttachmentId; /** *

* A Connect peer core network address. This only applies only when the protocol is GRE. *

*/ private String coreNetworkAddress; /** *

* The Connect peer address. *

*/ private String peerAddress; /** *

* The Connect peer BGP options. This only applies only when the protocol is GRE. *

*/ private BgpOptions bgpOptions; /** *

* The inside IP addresses used for BGP peering. *

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

* The tags associated with the peer request. *

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

* The client token associated with the request. *

*/ private String clientToken; /** *

* The subnet ARN for the Connect peer. This only applies only when the protocol is NO_ENCAP. *

*/ private String subnetArn; /** *

* The ID of the connection attachment. *

* * @param connectAttachmentId * The ID of the connection attachment. */ public void setConnectAttachmentId(String connectAttachmentId) { this.connectAttachmentId = connectAttachmentId; } /** *

* The ID of the connection attachment. *

* * @return The ID of the connection attachment. */ public String getConnectAttachmentId() { return this.connectAttachmentId; } /** *

* The ID of the connection attachment. *

* * @param connectAttachmentId * The ID of the connection attachment. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateConnectPeerRequest withConnectAttachmentId(String connectAttachmentId) { setConnectAttachmentId(connectAttachmentId); return this; } /** *

* A Connect peer core network address. This only applies only when the protocol is GRE. *

* * @param coreNetworkAddress * A Connect peer core network address. This only applies only when the protocol is GRE. */ public void setCoreNetworkAddress(String coreNetworkAddress) { this.coreNetworkAddress = coreNetworkAddress; } /** *

* A Connect peer core network address. This only applies only when the protocol is GRE. *

* * @return A Connect peer core network address. This only applies only when the protocol is GRE. */ public String getCoreNetworkAddress() { return this.coreNetworkAddress; } /** *

* A Connect peer core network address. This only applies only when the protocol is GRE. *

* * @param coreNetworkAddress * A Connect peer core network address. This only applies only when the protocol is GRE. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateConnectPeerRequest withCoreNetworkAddress(String coreNetworkAddress) { setCoreNetworkAddress(coreNetworkAddress); return this; } /** *

* The Connect peer address. *

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

* The Connect peer address. *

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

* The Connect peer address. *

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

* The Connect peer BGP options. This only applies only when the protocol is GRE. *

* * @param bgpOptions * The Connect peer BGP options. This only applies only when the protocol is GRE. */ public void setBgpOptions(BgpOptions bgpOptions) { this.bgpOptions = bgpOptions; } /** *

* The Connect peer BGP options. This only applies only when the protocol is GRE. *

* * @return The Connect peer BGP options. This only applies only when the protocol is GRE. */ public BgpOptions getBgpOptions() { return this.bgpOptions; } /** *

* The Connect peer BGP options. This only applies only when the protocol is GRE. *

* * @param bgpOptions * The Connect peer BGP options. This only applies only when the protocol is GRE. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateConnectPeerRequest withBgpOptions(BgpOptions bgpOptions) { setBgpOptions(bgpOptions); return this; } /** *

* The inside IP addresses used for BGP peering. *

* * @return The inside IP addresses used for BGP peering. */ public java.util.List getInsideCidrBlocks() { return insideCidrBlocks; } /** *

* The inside IP addresses used for BGP peering. *

* * @param insideCidrBlocks * The inside IP addresses used for BGP peering. */ 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 BGP peering. *

*

* 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 BGP peering. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateConnectPeerRequest 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 BGP peering. *

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

* The tags associated with the peer request. *

* * @return The tags associated with the peer request. */ public java.util.List getTags() { return tags; } /** *

* The tags associated with the peer request. *

* * @param tags * The tags associated with the peer request. */ public void setTags(java.util.Collection tags) { if (tags == null) { this.tags = null; return; } this.tags = new java.util.ArrayList(tags); } /** *

* The tags associated with the peer request. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the * existing values. *

* * @param tags * The tags associated with the peer request. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateConnectPeerRequest withTags(Tag... tags) { if (this.tags == null) { setTags(new java.util.ArrayList(tags.length)); } for (Tag ele : tags) { this.tags.add(ele); } return this; } /** *

* The tags associated with the peer request. *

* * @param tags * The tags associated with the peer request. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateConnectPeerRequest withTags(java.util.Collection tags) { setTags(tags); return this; } /** *

* The client token associated with the request. *

* * @param clientToken * The client token associated with the request. */ public void setClientToken(String clientToken) { this.clientToken = clientToken; } /** *

* The client token associated with the request. *

* * @return The client token associated with the request. */ public String getClientToken() { return this.clientToken; } /** *

* The client token associated with the request. *

* * @param clientToken * The client token associated with the request. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateConnectPeerRequest withClientToken(String clientToken) { setClientToken(clientToken); return this; } /** *

* The subnet ARN for the Connect peer. This only applies only when the protocol is NO_ENCAP. *

* * @param subnetArn * The subnet ARN for the Connect peer. This only applies only when the protocol is NO_ENCAP. */ public void setSubnetArn(String subnetArn) { this.subnetArn = subnetArn; } /** *

* The subnet ARN for the Connect peer. This only applies only when the protocol is NO_ENCAP. *

* * @return The subnet ARN for the Connect peer. This only applies only when the protocol is NO_ENCAP. */ public String getSubnetArn() { return this.subnetArn; } /** *

* The subnet ARN for the Connect peer. This only applies only when the protocol is NO_ENCAP. *

* * @param subnetArn * The subnet ARN for the Connect peer. This only applies only when the protocol is NO_ENCAP. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateConnectPeerRequest withSubnetArn(String subnetArn) { setSubnetArn(subnetArn); 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 (getConnectAttachmentId() != null) sb.append("ConnectAttachmentId: ").append(getConnectAttachmentId()).append(","); if (getCoreNetworkAddress() != null) sb.append("CoreNetworkAddress: ").append(getCoreNetworkAddress()).append(","); if (getPeerAddress() != null) sb.append("PeerAddress: ").append(getPeerAddress()).append(","); if (getBgpOptions() != null) sb.append("BgpOptions: ").append(getBgpOptions()).append(","); if (getInsideCidrBlocks() != null) sb.append("InsideCidrBlocks: ").append(getInsideCidrBlocks()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()).append(","); if (getClientToken() != null) sb.append("ClientToken: ").append(getClientToken()).append(","); if (getSubnetArn() != null) sb.append("SubnetArn: ").append(getSubnetArn()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateConnectPeerRequest == false) return false; CreateConnectPeerRequest other = (CreateConnectPeerRequest) obj; if (other.getConnectAttachmentId() == null ^ this.getConnectAttachmentId() == null) return false; if (other.getConnectAttachmentId() != null && other.getConnectAttachmentId().equals(this.getConnectAttachmentId()) == false) return false; 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.getBgpOptions() == null ^ this.getBgpOptions() == null) return false; if (other.getBgpOptions() != null && other.getBgpOptions().equals(this.getBgpOptions()) == 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.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == false) return false; if (other.getClientToken() == null ^ this.getClientToken() == null) return false; if (other.getClientToken() != null && other.getClientToken().equals(this.getClientToken()) == false) return false; if (other.getSubnetArn() == null ^ this.getSubnetArn() == null) return false; if (other.getSubnetArn() != null && other.getSubnetArn().equals(this.getSubnetArn()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getConnectAttachmentId() == null) ? 0 : getConnectAttachmentId().hashCode()); hashCode = prime * hashCode + ((getCoreNetworkAddress() == null) ? 0 : getCoreNetworkAddress().hashCode()); hashCode = prime * hashCode + ((getPeerAddress() == null) ? 0 : getPeerAddress().hashCode()); hashCode = prime * hashCode + ((getBgpOptions() == null) ? 0 : getBgpOptions().hashCode()); hashCode = prime * hashCode + ((getInsideCidrBlocks() == null) ? 0 : getInsideCidrBlocks().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); hashCode = prime * hashCode + ((getClientToken() == null) ? 0 : getClientToken().hashCode()); hashCode = prime * hashCode + ((getSubnetArn() == null) ? 0 : getSubnetArn().hashCode()); return hashCode; } @Override public CreateConnectPeerRequest clone() { return (CreateConnectPeerRequest) super.clone(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy