/* * 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.directconnect.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Information about a public virtual interface to be provisioned on a connection. *
* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class NewPublicVirtualInterfaceAllocation implements Serializable, Cloneable, StructuredPojo { /** ** The name of the virtual interface assigned by the customer network. The name has a maximum of 100 characters. The * following are valid characters: a-z, 0-9 and a hyphen (-). *
*/ private String virtualInterfaceName; /** ** The ID of the VLAN. *
*/ private Integer vlan; /** ** The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. *
** The valid values are 1-2147483647. *
*/ private Integer asn; /** ** The authentication key for BGP configuration. This string has a minimum length of 6 characters and and a maximun * lenth of 80 characters. *
*/ private String authKey; /** ** The IP address assigned to the Amazon interface. *
*/ private String amazonAddress; /** ** The IP address assigned to the customer interface. *
*/ private String customerAddress; /** ** The address family for the BGP peer. *
*/ private String addressFamily; /** ** The routes to be advertised to the Amazon Web Services network in this Region. Applies to public virtual * interfaces. *
*/ private com.amazonaws.internal.SdkInternalList* The tags associated with the public virtual interface. *
*/ private com.amazonaws.internal.SdkInternalList* The name of the virtual interface assigned by the customer network. The name has a maximum of 100 characters. The * following are valid characters: a-z, 0-9 and a hyphen (-). *
* * @param virtualInterfaceName * The name of the virtual interface assigned by the customer network. The name has a maximum of 100 * characters. The following are valid characters: a-z, 0-9 and a hyphen (-). */ public void setVirtualInterfaceName(String virtualInterfaceName) { this.virtualInterfaceName = virtualInterfaceName; } /** ** The name of the virtual interface assigned by the customer network. The name has a maximum of 100 characters. The * following are valid characters: a-z, 0-9 and a hyphen (-). *
* * @return The name of the virtual interface assigned by the customer network. The name has a maximum of 100 * characters. The following are valid characters: a-z, 0-9 and a hyphen (-). */ public String getVirtualInterfaceName() { return this.virtualInterfaceName; } /** ** The name of the virtual interface assigned by the customer network. The name has a maximum of 100 characters. The * following are valid characters: a-z, 0-9 and a hyphen (-). *
* * @param virtualInterfaceName * The name of the virtual interface assigned by the customer network. The name has a maximum of 100 * characters. The following are valid characters: a-z, 0-9 and a hyphen (-). * @return Returns a reference to this object so that method calls can be chained together. */ public NewPublicVirtualInterfaceAllocation withVirtualInterfaceName(String virtualInterfaceName) { setVirtualInterfaceName(virtualInterfaceName); return this; } /** ** The ID of the VLAN. *
* * @param vlan * The ID of the VLAN. */ public void setVlan(Integer vlan) { this.vlan = vlan; } /** ** The ID of the VLAN. *
* * @return The ID of the VLAN. */ public Integer getVlan() { return this.vlan; } /** ** The ID of the VLAN. *
* * @param vlan * The ID of the VLAN. * @return Returns a reference to this object so that method calls can be chained together. */ public NewPublicVirtualInterfaceAllocation withVlan(Integer vlan) { setVlan(vlan); return this; } /** ** The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. *
** The valid values are 1-2147483647. *
* * @param asn * The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. ** The valid values are 1-2147483647. */ public void setAsn(Integer asn) { this.asn = asn; } /** *
* The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. *
** The valid values are 1-2147483647. *
* * @return The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. ** The valid values are 1-2147483647. */ public Integer getAsn() { return this.asn; } /** *
* The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. *
** The valid values are 1-2147483647. *
* * @param asn * The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. ** The valid values are 1-2147483647. * @return Returns a reference to this object so that method calls can be chained together. */ public NewPublicVirtualInterfaceAllocation withAsn(Integer asn) { setAsn(asn); return this; } /** *
* The authentication key for BGP configuration. This string has a minimum length of 6 characters and and a maximun * lenth of 80 characters. *
* * @param authKey * The authentication key for BGP configuration. This string has a minimum length of 6 characters and and a * maximun lenth of 80 characters. */ public void setAuthKey(String authKey) { this.authKey = authKey; } /** ** The authentication key for BGP configuration. This string has a minimum length of 6 characters and and a maximun * lenth of 80 characters. *
* * @return The authentication key for BGP configuration. This string has a minimum length of 6 characters and and a * maximun lenth of 80 characters. */ public String getAuthKey() { return this.authKey; } /** ** The authentication key for BGP configuration. This string has a minimum length of 6 characters and and a maximun * lenth of 80 characters. *
* * @param authKey * The authentication key for BGP configuration. This string has a minimum length of 6 characters and and a * maximun lenth of 80 characters. * @return Returns a reference to this object so that method calls can be chained together. */ public NewPublicVirtualInterfaceAllocation withAuthKey(String authKey) { setAuthKey(authKey); return this; } /** ** The IP address assigned to the Amazon interface. *
* * @param amazonAddress * The IP address assigned to the Amazon interface. */ public void setAmazonAddress(String amazonAddress) { this.amazonAddress = amazonAddress; } /** ** The IP address assigned to the Amazon interface. *
* * @return The IP address assigned to the Amazon interface. */ public String getAmazonAddress() { return this.amazonAddress; } /** ** The IP address assigned to the Amazon interface. *
* * @param amazonAddress * The IP address assigned to the Amazon interface. * @return Returns a reference to this object so that method calls can be chained together. */ public NewPublicVirtualInterfaceAllocation withAmazonAddress(String amazonAddress) { setAmazonAddress(amazonAddress); return this; } /** ** The IP address assigned to the customer interface. *
* * @param customerAddress * The IP address assigned to the customer interface. */ public void setCustomerAddress(String customerAddress) { this.customerAddress = customerAddress; } /** ** The IP address assigned to the customer interface. *
* * @return The IP address assigned to the customer interface. */ public String getCustomerAddress() { return this.customerAddress; } /** ** The IP address assigned to the customer interface. *
* * @param customerAddress * The IP address assigned to the customer interface. * @return Returns a reference to this object so that method calls can be chained together. */ public NewPublicVirtualInterfaceAllocation withCustomerAddress(String customerAddress) { setCustomerAddress(customerAddress); return this; } /** ** The address family for the BGP peer. *
* * @param addressFamily * The address family for the BGP peer. * @see AddressFamily */ public void setAddressFamily(String addressFamily) { this.addressFamily = addressFamily; } /** ** The address family for the BGP peer. *
* * @return The address family for the BGP peer. * @see AddressFamily */ public String getAddressFamily() { return this.addressFamily; } /** ** The address family for the BGP peer. *
* * @param addressFamily * The address family for the BGP peer. * @return Returns a reference to this object so that method calls can be chained together. * @see AddressFamily */ public NewPublicVirtualInterfaceAllocation withAddressFamily(String addressFamily) { setAddressFamily(addressFamily); return this; } /** ** The address family for the BGP peer. *
* * @param addressFamily * The address family for the BGP peer. * @see AddressFamily */ public void setAddressFamily(AddressFamily addressFamily) { withAddressFamily(addressFamily); } /** ** The address family for the BGP peer. *
* * @param addressFamily * The address family for the BGP peer. * @return Returns a reference to this object so that method calls can be chained together. * @see AddressFamily */ public NewPublicVirtualInterfaceAllocation withAddressFamily(AddressFamily addressFamily) { this.addressFamily = addressFamily.toString(); return this; } /** ** The routes to be advertised to the Amazon Web Services network in this Region. Applies to public virtual * interfaces. *
* * @return The routes to be advertised to the Amazon Web Services network in this Region. Applies to public virtual * interfaces. */ public java.util.List* The routes to be advertised to the Amazon Web Services network in this Region. Applies to public virtual * interfaces. *
* * @param routeFilterPrefixes * The routes to be advertised to the Amazon Web Services network in this Region. Applies to public virtual * interfaces. */ public void setRouteFilterPrefixes(java.util.Collection* The routes to be advertised to the Amazon Web Services network in this Region. Applies to public virtual * interfaces. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setRouteFilterPrefixes(java.util.Collection)} or {@link #withRouteFilterPrefixes(java.util.Collection)} * if you want to override the existing values. *
* * @param routeFilterPrefixes * The routes to be advertised to the Amazon Web Services network in this Region. Applies to public virtual * interfaces. * @return Returns a reference to this object so that method calls can be chained together. */ public NewPublicVirtualInterfaceAllocation withRouteFilterPrefixes(RouteFilterPrefix... routeFilterPrefixes) { if (this.routeFilterPrefixes == null) { setRouteFilterPrefixes(new com.amazonaws.internal.SdkInternalList* The routes to be advertised to the Amazon Web Services network in this Region. Applies to public virtual * interfaces. *
* * @param routeFilterPrefixes * The routes to be advertised to the Amazon Web Services network in this Region. Applies to public virtual * interfaces. * @return Returns a reference to this object so that method calls can be chained together. */ public NewPublicVirtualInterfaceAllocation withRouteFilterPrefixes(java.util.Collection* The tags associated with the public virtual interface. *
* * @return The tags associated with the public virtual interface. */ public java.util.List* The tags associated with the public virtual interface. *
* * @param tags * The tags associated with the public virtual interface. */ public void setTags(java.util.Collection* The tags associated with the public virtual interface. *
** 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 public virtual interface. * @return Returns a reference to this object so that method calls can be chained together. */ public NewPublicVirtualInterfaceAllocation withTags(Tag... tags) { if (this.tags == null) { setTags(new com.amazonaws.internal.SdkInternalList* The tags associated with the public virtual interface. *
* * @param tags * The tags associated with the public virtual interface. * @return Returns a reference to this object so that method calls can be chained together. */ public NewPublicVirtualInterfaceAllocation withTags(java.util.Collection