com.amazonaws.services.redshiftserverless.model.EndpointAccess Maven / Gradle / Ivy
Show all versions of aws-java-sdk-redshiftserverless Show documentation
/*
* 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.redshiftserverless.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Information about an Amazon Redshift Serverless VPC endpoint.
*
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class EndpointAccess implements Serializable, Cloneable, StructuredPojo {
/**
*
* The DNS address of the endpoint.
*
*/
private String address;
/**
*
* The Amazon Resource Name (ARN) of the VPC endpoint.
*
*/
private String endpointArn;
/**
*
* The time that the endpoint was created.
*
*/
private java.util.Date endpointCreateTime;
/**
*
* The name of the VPC endpoint.
*
*/
private String endpointName;
/**
*
* The status of the VPC endpoint.
*
*/
private String endpointStatus;
/**
*
* The port number on which Amazon Redshift Serverless accepts incoming connections.
*
*/
private Integer port;
/**
*
* The unique identifier of subnets where Amazon Redshift Serverless choose to deploy the VPC endpoint.
*
*/
private java.util.List subnetIds;
/**
*
* The connection endpoint for connecting to Amazon Redshift Serverless.
*
*/
private VpcEndpoint vpcEndpoint;
/**
*
* The security groups associated with the endpoint.
*
*/
private java.util.List vpcSecurityGroups;
/**
*
* The name of the workgroup associated with the endpoint.
*
*/
private String workgroupName;
/**
*
* The DNS address of the endpoint.
*
*
* @param address
* The DNS address of the endpoint.
*/
public void setAddress(String address) {
this.address = address;
}
/**
*
* The DNS address of the endpoint.
*
*
* @return The DNS address of the endpoint.
*/
public String getAddress() {
return this.address;
}
/**
*
* The DNS address of the endpoint.
*
*
* @param address
* The DNS address of the endpoint.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EndpointAccess withAddress(String address) {
setAddress(address);
return this;
}
/**
*
* The Amazon Resource Name (ARN) of the VPC endpoint.
*
*
* @param endpointArn
* The Amazon Resource Name (ARN) of the VPC endpoint.
*/
public void setEndpointArn(String endpointArn) {
this.endpointArn = endpointArn;
}
/**
*
* The Amazon Resource Name (ARN) of the VPC endpoint.
*
*
* @return The Amazon Resource Name (ARN) of the VPC endpoint.
*/
public String getEndpointArn() {
return this.endpointArn;
}
/**
*
* The Amazon Resource Name (ARN) of the VPC endpoint.
*
*
* @param endpointArn
* The Amazon Resource Name (ARN) of the VPC endpoint.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EndpointAccess withEndpointArn(String endpointArn) {
setEndpointArn(endpointArn);
return this;
}
/**
*
* The time that the endpoint was created.
*
*
* @param endpointCreateTime
* The time that the endpoint was created.
*/
public void setEndpointCreateTime(java.util.Date endpointCreateTime) {
this.endpointCreateTime = endpointCreateTime;
}
/**
*
* The time that the endpoint was created.
*
*
* @return The time that the endpoint was created.
*/
public java.util.Date getEndpointCreateTime() {
return this.endpointCreateTime;
}
/**
*
* The time that the endpoint was created.
*
*
* @param endpointCreateTime
* The time that the endpoint was created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EndpointAccess withEndpointCreateTime(java.util.Date endpointCreateTime) {
setEndpointCreateTime(endpointCreateTime);
return this;
}
/**
*
* The name of the VPC endpoint.
*
*
* @param endpointName
* The name of the VPC endpoint.
*/
public void setEndpointName(String endpointName) {
this.endpointName = endpointName;
}
/**
*
* The name of the VPC endpoint.
*
*
* @return The name of the VPC endpoint.
*/
public String getEndpointName() {
return this.endpointName;
}
/**
*
* The name of the VPC endpoint.
*
*
* @param endpointName
* The name of the VPC endpoint.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EndpointAccess withEndpointName(String endpointName) {
setEndpointName(endpointName);
return this;
}
/**
*
* The status of the VPC endpoint.
*
*
* @param endpointStatus
* The status of the VPC endpoint.
*/
public void setEndpointStatus(String endpointStatus) {
this.endpointStatus = endpointStatus;
}
/**
*
* The status of the VPC endpoint.
*
*
* @return The status of the VPC endpoint.
*/
public String getEndpointStatus() {
return this.endpointStatus;
}
/**
*
* The status of the VPC endpoint.
*
*
* @param endpointStatus
* The status of the VPC endpoint.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EndpointAccess withEndpointStatus(String endpointStatus) {
setEndpointStatus(endpointStatus);
return this;
}
/**
*
* The port number on which Amazon Redshift Serverless accepts incoming connections.
*
*
* @param port
* The port number on which Amazon Redshift Serverless accepts incoming connections.
*/
public void setPort(Integer port) {
this.port = port;
}
/**
*
* The port number on which Amazon Redshift Serverless accepts incoming connections.
*
*
* @return The port number on which Amazon Redshift Serverless accepts incoming connections.
*/
public Integer getPort() {
return this.port;
}
/**
*
* The port number on which Amazon Redshift Serverless accepts incoming connections.
*
*
* @param port
* The port number on which Amazon Redshift Serverless accepts incoming connections.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EndpointAccess withPort(Integer port) {
setPort(port);
return this;
}
/**
*
* The unique identifier of subnets where Amazon Redshift Serverless choose to deploy the VPC endpoint.
*
*
* @return The unique identifier of subnets where Amazon Redshift Serverless choose to deploy the VPC endpoint.
*/
public java.util.List getSubnetIds() {
return subnetIds;
}
/**
*
* The unique identifier of subnets where Amazon Redshift Serverless choose to deploy the VPC endpoint.
*
*
* @param subnetIds
* The unique identifier of subnets where Amazon Redshift Serverless choose to deploy the VPC endpoint.
*/
public void setSubnetIds(java.util.Collection subnetIds) {
if (subnetIds == null) {
this.subnetIds = null;
return;
}
this.subnetIds = new java.util.ArrayList(subnetIds);
}
/**
*
* The unique identifier of subnets where Amazon Redshift Serverless choose to deploy the VPC endpoint.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setSubnetIds(java.util.Collection)} or {@link #withSubnetIds(java.util.Collection)} if you want to
* override the existing values.
*
*
* @param subnetIds
* The unique identifier of subnets where Amazon Redshift Serverless choose to deploy the VPC endpoint.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EndpointAccess withSubnetIds(String... subnetIds) {
if (this.subnetIds == null) {
setSubnetIds(new java.util.ArrayList(subnetIds.length));
}
for (String ele : subnetIds) {
this.subnetIds.add(ele);
}
return this;
}
/**
*
* The unique identifier of subnets where Amazon Redshift Serverless choose to deploy the VPC endpoint.
*
*
* @param subnetIds
* The unique identifier of subnets where Amazon Redshift Serverless choose to deploy the VPC endpoint.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EndpointAccess withSubnetIds(java.util.Collection subnetIds) {
setSubnetIds(subnetIds);
return this;
}
/**
*
* The connection endpoint for connecting to Amazon Redshift Serverless.
*
*
* @param vpcEndpoint
* The connection endpoint for connecting to Amazon Redshift Serverless.
*/
public void setVpcEndpoint(VpcEndpoint vpcEndpoint) {
this.vpcEndpoint = vpcEndpoint;
}
/**
*
* The connection endpoint for connecting to Amazon Redshift Serverless.
*
*
* @return The connection endpoint for connecting to Amazon Redshift Serverless.
*/
public VpcEndpoint getVpcEndpoint() {
return this.vpcEndpoint;
}
/**
*
* The connection endpoint for connecting to Amazon Redshift Serverless.
*
*
* @param vpcEndpoint
* The connection endpoint for connecting to Amazon Redshift Serverless.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EndpointAccess withVpcEndpoint(VpcEndpoint vpcEndpoint) {
setVpcEndpoint(vpcEndpoint);
return this;
}
/**
*
* The security groups associated with the endpoint.
*
*
* @return The security groups associated with the endpoint.
*/
public java.util.List getVpcSecurityGroups() {
return vpcSecurityGroups;
}
/**
*
* The security groups associated with the endpoint.
*
*
* @param vpcSecurityGroups
* The security groups associated with the endpoint.
*/
public void setVpcSecurityGroups(java.util.Collection vpcSecurityGroups) {
if (vpcSecurityGroups == null) {
this.vpcSecurityGroups = null;
return;
}
this.vpcSecurityGroups = new java.util.ArrayList(vpcSecurityGroups);
}
/**
*
* The security groups associated with the endpoint.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setVpcSecurityGroups(java.util.Collection)} or {@link #withVpcSecurityGroups(java.util.Collection)} if
* you want to override the existing values.
*
*
* @param vpcSecurityGroups
* The security groups associated with the endpoint.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EndpointAccess withVpcSecurityGroups(VpcSecurityGroupMembership... vpcSecurityGroups) {
if (this.vpcSecurityGroups == null) {
setVpcSecurityGroups(new java.util.ArrayList(vpcSecurityGroups.length));
}
for (VpcSecurityGroupMembership ele : vpcSecurityGroups) {
this.vpcSecurityGroups.add(ele);
}
return this;
}
/**
*
* The security groups associated with the endpoint.
*
*
* @param vpcSecurityGroups
* The security groups associated with the endpoint.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EndpointAccess withVpcSecurityGroups(java.util.Collection vpcSecurityGroups) {
setVpcSecurityGroups(vpcSecurityGroups);
return this;
}
/**
*
* The name of the workgroup associated with the endpoint.
*
*
* @param workgroupName
* The name of the workgroup associated with the endpoint.
*/
public void setWorkgroupName(String workgroupName) {
this.workgroupName = workgroupName;
}
/**
*
* The name of the workgroup associated with the endpoint.
*
*
* @return The name of the workgroup associated with the endpoint.
*/
public String getWorkgroupName() {
return this.workgroupName;
}
/**
*
* The name of the workgroup associated with the endpoint.
*
*
* @param workgroupName
* The name of the workgroup associated with the endpoint.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EndpointAccess withWorkgroupName(String workgroupName) {
setWorkgroupName(workgroupName);
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 (getAddress() != null)
sb.append("Address: ").append(getAddress()).append(",");
if (getEndpointArn() != null)
sb.append("EndpointArn: ").append(getEndpointArn()).append(",");
if (getEndpointCreateTime() != null)
sb.append("EndpointCreateTime: ").append(getEndpointCreateTime()).append(",");
if (getEndpointName() != null)
sb.append("EndpointName: ").append(getEndpointName()).append(",");
if (getEndpointStatus() != null)
sb.append("EndpointStatus: ").append(getEndpointStatus()).append(",");
if (getPort() != null)
sb.append("Port: ").append(getPort()).append(",");
if (getSubnetIds() != null)
sb.append("SubnetIds: ").append(getSubnetIds()).append(",");
if (getVpcEndpoint() != null)
sb.append("VpcEndpoint: ").append(getVpcEndpoint()).append(",");
if (getVpcSecurityGroups() != null)
sb.append("VpcSecurityGroups: ").append(getVpcSecurityGroups()).append(",");
if (getWorkgroupName() != null)
sb.append("WorkgroupName: ").append(getWorkgroupName());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof EndpointAccess == false)
return false;
EndpointAccess other = (EndpointAccess) obj;
if (other.getAddress() == null ^ this.getAddress() == null)
return false;
if (other.getAddress() != null && other.getAddress().equals(this.getAddress()) == false)
return false;
if (other.getEndpointArn() == null ^ this.getEndpointArn() == null)
return false;
if (other.getEndpointArn() != null && other.getEndpointArn().equals(this.getEndpointArn()) == false)
return false;
if (other.getEndpointCreateTime() == null ^ this.getEndpointCreateTime() == null)
return false;
if (other.getEndpointCreateTime() != null && other.getEndpointCreateTime().equals(this.getEndpointCreateTime()) == false)
return false;
if (other.getEndpointName() == null ^ this.getEndpointName() == null)
return false;
if (other.getEndpointName() != null && other.getEndpointName().equals(this.getEndpointName()) == false)
return false;
if (other.getEndpointStatus() == null ^ this.getEndpointStatus() == null)
return false;
if (other.getEndpointStatus() != null && other.getEndpointStatus().equals(this.getEndpointStatus()) == false)
return false;
if (other.getPort() == null ^ this.getPort() == null)
return false;
if (other.getPort() != null && other.getPort().equals(this.getPort()) == false)
return false;
if (other.getSubnetIds() == null ^ this.getSubnetIds() == null)
return false;
if (other.getSubnetIds() != null && other.getSubnetIds().equals(this.getSubnetIds()) == false)
return false;
if (other.getVpcEndpoint() == null ^ this.getVpcEndpoint() == null)
return false;
if (other.getVpcEndpoint() != null && other.getVpcEndpoint().equals(this.getVpcEndpoint()) == false)
return false;
if (other.getVpcSecurityGroups() == null ^ this.getVpcSecurityGroups() == null)
return false;
if (other.getVpcSecurityGroups() != null && other.getVpcSecurityGroups().equals(this.getVpcSecurityGroups()) == false)
return false;
if (other.getWorkgroupName() == null ^ this.getWorkgroupName() == null)
return false;
if (other.getWorkgroupName() != null && other.getWorkgroupName().equals(this.getWorkgroupName()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getAddress() == null) ? 0 : getAddress().hashCode());
hashCode = prime * hashCode + ((getEndpointArn() == null) ? 0 : getEndpointArn().hashCode());
hashCode = prime * hashCode + ((getEndpointCreateTime() == null) ? 0 : getEndpointCreateTime().hashCode());
hashCode = prime * hashCode + ((getEndpointName() == null) ? 0 : getEndpointName().hashCode());
hashCode = prime * hashCode + ((getEndpointStatus() == null) ? 0 : getEndpointStatus().hashCode());
hashCode = prime * hashCode + ((getPort() == null) ? 0 : getPort().hashCode());
hashCode = prime * hashCode + ((getSubnetIds() == null) ? 0 : getSubnetIds().hashCode());
hashCode = prime * hashCode + ((getVpcEndpoint() == null) ? 0 : getVpcEndpoint().hashCode());
hashCode = prime * hashCode + ((getVpcSecurityGroups() == null) ? 0 : getVpcSecurityGroups().hashCode());
hashCode = prime * hashCode + ((getWorkgroupName() == null) ? 0 : getWorkgroupName().hashCode());
return hashCode;
}
@Override
public EndpointAccess clone() {
try {
return (EndpointAccess) 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.redshiftserverless.model.transform.EndpointAccessMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}