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

com.amazonaws.services.ec2.model.VpcEndpointConnection Maven / Gradle / Ivy

Go to download

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

The 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.ec2.model;

import java.io.Serializable;
import javax.annotation.Generated;

/**
 * 

* Describes a VPC endpoint connection to a service. *

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

* The ID of the service to which the endpoint is connected. *

*/ private String serviceId; /** *

* The ID of the VPC endpoint. *

*/ private String vpcEndpointId; /** *

* The ID of the Amazon Web Services account that owns the VPC endpoint. *

*/ private String vpcEndpointOwner; /** *

* The state of the VPC endpoint. *

*/ private String vpcEndpointState; /** *

* The date and time that the VPC endpoint was created. *

*/ private java.util.Date creationTimestamp; /** *

* The DNS entries for the VPC endpoint. *

*/ private com.amazonaws.internal.SdkInternalList dnsEntries; /** *

* The Amazon Resource Names (ARNs) of the network load balancers for the service. *

*/ private com.amazonaws.internal.SdkInternalList networkLoadBalancerArns; /** *

* The Amazon Resource Names (ARNs) of the Gateway Load Balancers for the service. *

*/ private com.amazonaws.internal.SdkInternalList gatewayLoadBalancerArns; /** *

* The IP address type for the endpoint. *

*/ private String ipAddressType; /** *

* The ID of the VPC endpoint connection. *

*/ private String vpcEndpointConnectionId; /** *

* The tags. *

*/ private com.amazonaws.internal.SdkInternalList tags; /** *

* The ID of the service to which the endpoint is connected. *

* * @param serviceId * The ID of the service to which the endpoint is connected. */ public void setServiceId(String serviceId) { this.serviceId = serviceId; } /** *

* The ID of the service to which the endpoint is connected. *

* * @return The ID of the service to which the endpoint is connected. */ public String getServiceId() { return this.serviceId; } /** *

* The ID of the service to which the endpoint is connected. *

* * @param serviceId * The ID of the service to which the endpoint is connected. * @return Returns a reference to this object so that method calls can be chained together. */ public VpcEndpointConnection withServiceId(String serviceId) { setServiceId(serviceId); return this; } /** *

* The ID of the VPC endpoint. *

* * @param vpcEndpointId * The ID of the VPC endpoint. */ public void setVpcEndpointId(String vpcEndpointId) { this.vpcEndpointId = vpcEndpointId; } /** *

* The ID of the VPC endpoint. *

* * @return The ID of the VPC endpoint. */ public String getVpcEndpointId() { return this.vpcEndpointId; } /** *

* The ID of the VPC endpoint. *

* * @param vpcEndpointId * The ID of the VPC endpoint. * @return Returns a reference to this object so that method calls can be chained together. */ public VpcEndpointConnection withVpcEndpointId(String vpcEndpointId) { setVpcEndpointId(vpcEndpointId); return this; } /** *

* The ID of the Amazon Web Services account that owns the VPC endpoint. *

* * @param vpcEndpointOwner * The ID of the Amazon Web Services account that owns the VPC endpoint. */ public void setVpcEndpointOwner(String vpcEndpointOwner) { this.vpcEndpointOwner = vpcEndpointOwner; } /** *

* The ID of the Amazon Web Services account that owns the VPC endpoint. *

* * @return The ID of the Amazon Web Services account that owns the VPC endpoint. */ public String getVpcEndpointOwner() { return this.vpcEndpointOwner; } /** *

* The ID of the Amazon Web Services account that owns the VPC endpoint. *

* * @param vpcEndpointOwner * The ID of the Amazon Web Services account that owns the VPC endpoint. * @return Returns a reference to this object so that method calls can be chained together. */ public VpcEndpointConnection withVpcEndpointOwner(String vpcEndpointOwner) { setVpcEndpointOwner(vpcEndpointOwner); return this; } /** *

* The state of the VPC endpoint. *

* * @param vpcEndpointState * The state of the VPC endpoint. * @see State */ public void setVpcEndpointState(String vpcEndpointState) { this.vpcEndpointState = vpcEndpointState; } /** *

* The state of the VPC endpoint. *

* * @return The state of the VPC endpoint. * @see State */ public String getVpcEndpointState() { return this.vpcEndpointState; } /** *

* The state of the VPC endpoint. *

* * @param vpcEndpointState * The state of the VPC endpoint. * @return Returns a reference to this object so that method calls can be chained together. * @see State */ public VpcEndpointConnection withVpcEndpointState(String vpcEndpointState) { setVpcEndpointState(vpcEndpointState); return this; } /** *

* The state of the VPC endpoint. *

* * @param vpcEndpointState * The state of the VPC endpoint. * @return Returns a reference to this object so that method calls can be chained together. * @see State */ public VpcEndpointConnection withVpcEndpointState(State vpcEndpointState) { this.vpcEndpointState = vpcEndpointState.toString(); return this; } /** *

* The date and time that the VPC endpoint was created. *

* * @param creationTimestamp * The date and time that the VPC endpoint was created. */ public void setCreationTimestamp(java.util.Date creationTimestamp) { this.creationTimestamp = creationTimestamp; } /** *

* The date and time that the VPC endpoint was created. *

* * @return The date and time that the VPC endpoint was created. */ public java.util.Date getCreationTimestamp() { return this.creationTimestamp; } /** *

* The date and time that the VPC endpoint was created. *

* * @param creationTimestamp * The date and time that the VPC endpoint was created. * @return Returns a reference to this object so that method calls can be chained together. */ public VpcEndpointConnection withCreationTimestamp(java.util.Date creationTimestamp) { setCreationTimestamp(creationTimestamp); return this; } /** *

* The DNS entries for the VPC endpoint. *

* * @return The DNS entries for the VPC endpoint. */ public java.util.List getDnsEntries() { if (dnsEntries == null) { dnsEntries = new com.amazonaws.internal.SdkInternalList(); } return dnsEntries; } /** *

* The DNS entries for the VPC endpoint. *

* * @param dnsEntries * The DNS entries for the VPC endpoint. */ public void setDnsEntries(java.util.Collection dnsEntries) { if (dnsEntries == null) { this.dnsEntries = null; return; } this.dnsEntries = new com.amazonaws.internal.SdkInternalList(dnsEntries); } /** *

* The DNS entries for the VPC endpoint. *

*

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

* * @param dnsEntries * The DNS entries for the VPC endpoint. * @return Returns a reference to this object so that method calls can be chained together. */ public VpcEndpointConnection withDnsEntries(DnsEntry... dnsEntries) { if (this.dnsEntries == null) { setDnsEntries(new com.amazonaws.internal.SdkInternalList(dnsEntries.length)); } for (DnsEntry ele : dnsEntries) { this.dnsEntries.add(ele); } return this; } /** *

* The DNS entries for the VPC endpoint. *

* * @param dnsEntries * The DNS entries for the VPC endpoint. * @return Returns a reference to this object so that method calls can be chained together. */ public VpcEndpointConnection withDnsEntries(java.util.Collection dnsEntries) { setDnsEntries(dnsEntries); return this; } /** *

* The Amazon Resource Names (ARNs) of the network load balancers for the service. *

* * @return The Amazon Resource Names (ARNs) of the network load balancers for the service. */ public java.util.List getNetworkLoadBalancerArns() { if (networkLoadBalancerArns == null) { networkLoadBalancerArns = new com.amazonaws.internal.SdkInternalList(); } return networkLoadBalancerArns; } /** *

* The Amazon Resource Names (ARNs) of the network load balancers for the service. *

* * @param networkLoadBalancerArns * The Amazon Resource Names (ARNs) of the network load balancers for the service. */ public void setNetworkLoadBalancerArns(java.util.Collection networkLoadBalancerArns) { if (networkLoadBalancerArns == null) { this.networkLoadBalancerArns = null; return; } this.networkLoadBalancerArns = new com.amazonaws.internal.SdkInternalList(networkLoadBalancerArns); } /** *

* The Amazon Resource Names (ARNs) of the network load balancers for the service. *

*

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

* * @param networkLoadBalancerArns * The Amazon Resource Names (ARNs) of the network load balancers for the service. * @return Returns a reference to this object so that method calls can be chained together. */ public VpcEndpointConnection withNetworkLoadBalancerArns(String... networkLoadBalancerArns) { if (this.networkLoadBalancerArns == null) { setNetworkLoadBalancerArns(new com.amazonaws.internal.SdkInternalList(networkLoadBalancerArns.length)); } for (String ele : networkLoadBalancerArns) { this.networkLoadBalancerArns.add(ele); } return this; } /** *

* The Amazon Resource Names (ARNs) of the network load balancers for the service. *

* * @param networkLoadBalancerArns * The Amazon Resource Names (ARNs) of the network load balancers for the service. * @return Returns a reference to this object so that method calls can be chained together. */ public VpcEndpointConnection withNetworkLoadBalancerArns(java.util.Collection networkLoadBalancerArns) { setNetworkLoadBalancerArns(networkLoadBalancerArns); return this; } /** *

* The Amazon Resource Names (ARNs) of the Gateway Load Balancers for the service. *

* * @return The Amazon Resource Names (ARNs) of the Gateway Load Balancers for the service. */ public java.util.List getGatewayLoadBalancerArns() { if (gatewayLoadBalancerArns == null) { gatewayLoadBalancerArns = new com.amazonaws.internal.SdkInternalList(); } return gatewayLoadBalancerArns; } /** *

* The Amazon Resource Names (ARNs) of the Gateway Load Balancers for the service. *

* * @param gatewayLoadBalancerArns * The Amazon Resource Names (ARNs) of the Gateway Load Balancers for the service. */ public void setGatewayLoadBalancerArns(java.util.Collection gatewayLoadBalancerArns) { if (gatewayLoadBalancerArns == null) { this.gatewayLoadBalancerArns = null; return; } this.gatewayLoadBalancerArns = new com.amazonaws.internal.SdkInternalList(gatewayLoadBalancerArns); } /** *

* The Amazon Resource Names (ARNs) of the Gateway Load Balancers for the service. *

*

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

* * @param gatewayLoadBalancerArns * The Amazon Resource Names (ARNs) of the Gateway Load Balancers for the service. * @return Returns a reference to this object so that method calls can be chained together. */ public VpcEndpointConnection withGatewayLoadBalancerArns(String... gatewayLoadBalancerArns) { if (this.gatewayLoadBalancerArns == null) { setGatewayLoadBalancerArns(new com.amazonaws.internal.SdkInternalList(gatewayLoadBalancerArns.length)); } for (String ele : gatewayLoadBalancerArns) { this.gatewayLoadBalancerArns.add(ele); } return this; } /** *

* The Amazon Resource Names (ARNs) of the Gateway Load Balancers for the service. *

* * @param gatewayLoadBalancerArns * The Amazon Resource Names (ARNs) of the Gateway Load Balancers for the service. * @return Returns a reference to this object so that method calls can be chained together. */ public VpcEndpointConnection withGatewayLoadBalancerArns(java.util.Collection gatewayLoadBalancerArns) { setGatewayLoadBalancerArns(gatewayLoadBalancerArns); return this; } /** *

* The IP address type for the endpoint. *

* * @param ipAddressType * The IP address type for the endpoint. * @see IpAddressType */ public void setIpAddressType(String ipAddressType) { this.ipAddressType = ipAddressType; } /** *

* The IP address type for the endpoint. *

* * @return The IP address type for the endpoint. * @see IpAddressType */ public String getIpAddressType() { return this.ipAddressType; } /** *

* The IP address type for the endpoint. *

* * @param ipAddressType * The IP address type for the endpoint. * @return Returns a reference to this object so that method calls can be chained together. * @see IpAddressType */ public VpcEndpointConnection withIpAddressType(String ipAddressType) { setIpAddressType(ipAddressType); return this; } /** *

* The IP address type for the endpoint. *

* * @param ipAddressType * The IP address type for the endpoint. * @return Returns a reference to this object so that method calls can be chained together. * @see IpAddressType */ public VpcEndpointConnection withIpAddressType(IpAddressType ipAddressType) { this.ipAddressType = ipAddressType.toString(); return this; } /** *

* The ID of the VPC endpoint connection. *

* * @param vpcEndpointConnectionId * The ID of the VPC endpoint connection. */ public void setVpcEndpointConnectionId(String vpcEndpointConnectionId) { this.vpcEndpointConnectionId = vpcEndpointConnectionId; } /** *

* The ID of the VPC endpoint connection. *

* * @return The ID of the VPC endpoint connection. */ public String getVpcEndpointConnectionId() { return this.vpcEndpointConnectionId; } /** *

* The ID of the VPC endpoint connection. *

* * @param vpcEndpointConnectionId * The ID of the VPC endpoint connection. * @return Returns a reference to this object so that method calls can be chained together. */ public VpcEndpointConnection withVpcEndpointConnectionId(String vpcEndpointConnectionId) { setVpcEndpointConnectionId(vpcEndpointConnectionId); return this; } /** *

* The tags. *

* * @return The tags. */ public java.util.List getTags() { if (tags == null) { tags = new com.amazonaws.internal.SdkInternalList(); } return tags; } /** *

* The tags. *

* * @param tags * The tags. */ public void setTags(java.util.Collection tags) { if (tags == null) { this.tags = null; return; } this.tags = new com.amazonaws.internal.SdkInternalList(tags); } /** *

* The tags. *

*

* 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. * @return Returns a reference to this object so that method calls can be chained together. */ public VpcEndpointConnection withTags(Tag... tags) { if (this.tags == null) { setTags(new com.amazonaws.internal.SdkInternalList(tags.length)); } for (Tag ele : tags) { this.tags.add(ele); } return this; } /** *

* The tags. *

* * @param tags * The tags. * @return Returns a reference to this object so that method calls can be chained together. */ public VpcEndpointConnection withTags(java.util.Collection tags) { setTags(tags); 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 (getServiceId() != null) sb.append("ServiceId: ").append(getServiceId()).append(","); if (getVpcEndpointId() != null) sb.append("VpcEndpointId: ").append(getVpcEndpointId()).append(","); if (getVpcEndpointOwner() != null) sb.append("VpcEndpointOwner: ").append(getVpcEndpointOwner()).append(","); if (getVpcEndpointState() != null) sb.append("VpcEndpointState: ").append(getVpcEndpointState()).append(","); if (getCreationTimestamp() != null) sb.append("CreationTimestamp: ").append(getCreationTimestamp()).append(","); if (getDnsEntries() != null) sb.append("DnsEntries: ").append(getDnsEntries()).append(","); if (getNetworkLoadBalancerArns() != null) sb.append("NetworkLoadBalancerArns: ").append(getNetworkLoadBalancerArns()).append(","); if (getGatewayLoadBalancerArns() != null) sb.append("GatewayLoadBalancerArns: ").append(getGatewayLoadBalancerArns()).append(","); if (getIpAddressType() != null) sb.append("IpAddressType: ").append(getIpAddressType()).append(","); if (getVpcEndpointConnectionId() != null) sb.append("VpcEndpointConnectionId: ").append(getVpcEndpointConnectionId()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof VpcEndpointConnection == false) return false; VpcEndpointConnection other = (VpcEndpointConnection) obj; if (other.getServiceId() == null ^ this.getServiceId() == null) return false; if (other.getServiceId() != null && other.getServiceId().equals(this.getServiceId()) == false) return false; if (other.getVpcEndpointId() == null ^ this.getVpcEndpointId() == null) return false; if (other.getVpcEndpointId() != null && other.getVpcEndpointId().equals(this.getVpcEndpointId()) == false) return false; if (other.getVpcEndpointOwner() == null ^ this.getVpcEndpointOwner() == null) return false; if (other.getVpcEndpointOwner() != null && other.getVpcEndpointOwner().equals(this.getVpcEndpointOwner()) == false) return false; if (other.getVpcEndpointState() == null ^ this.getVpcEndpointState() == null) return false; if (other.getVpcEndpointState() != null && other.getVpcEndpointState().equals(this.getVpcEndpointState()) == false) return false; if (other.getCreationTimestamp() == null ^ this.getCreationTimestamp() == null) return false; if (other.getCreationTimestamp() != null && other.getCreationTimestamp().equals(this.getCreationTimestamp()) == false) return false; if (other.getDnsEntries() == null ^ this.getDnsEntries() == null) return false; if (other.getDnsEntries() != null && other.getDnsEntries().equals(this.getDnsEntries()) == false) return false; if (other.getNetworkLoadBalancerArns() == null ^ this.getNetworkLoadBalancerArns() == null) return false; if (other.getNetworkLoadBalancerArns() != null && other.getNetworkLoadBalancerArns().equals(this.getNetworkLoadBalancerArns()) == false) return false; if (other.getGatewayLoadBalancerArns() == null ^ this.getGatewayLoadBalancerArns() == null) return false; if (other.getGatewayLoadBalancerArns() != null && other.getGatewayLoadBalancerArns().equals(this.getGatewayLoadBalancerArns()) == false) return false; if (other.getIpAddressType() == null ^ this.getIpAddressType() == null) return false; if (other.getIpAddressType() != null && other.getIpAddressType().equals(this.getIpAddressType()) == false) return false; if (other.getVpcEndpointConnectionId() == null ^ this.getVpcEndpointConnectionId() == null) return false; if (other.getVpcEndpointConnectionId() != null && other.getVpcEndpointConnectionId().equals(this.getVpcEndpointConnectionId()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getServiceId() == null) ? 0 : getServiceId().hashCode()); hashCode = prime * hashCode + ((getVpcEndpointId() == null) ? 0 : getVpcEndpointId().hashCode()); hashCode = prime * hashCode + ((getVpcEndpointOwner() == null) ? 0 : getVpcEndpointOwner().hashCode()); hashCode = prime * hashCode + ((getVpcEndpointState() == null) ? 0 : getVpcEndpointState().hashCode()); hashCode = prime * hashCode + ((getCreationTimestamp() == null) ? 0 : getCreationTimestamp().hashCode()); hashCode = prime * hashCode + ((getDnsEntries() == null) ? 0 : getDnsEntries().hashCode()); hashCode = prime * hashCode + ((getNetworkLoadBalancerArns() == null) ? 0 : getNetworkLoadBalancerArns().hashCode()); hashCode = prime * hashCode + ((getGatewayLoadBalancerArns() == null) ? 0 : getGatewayLoadBalancerArns().hashCode()); hashCode = prime * hashCode + ((getIpAddressType() == null) ? 0 : getIpAddressType().hashCode()); hashCode = prime * hashCode + ((getVpcEndpointConnectionId() == null) ? 0 : getVpcEndpointConnectionId().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); return hashCode; } @Override public VpcEndpointConnection clone() { try { return (VpcEndpointConnection) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy