com.amazonaws.services.elasticsearch.model.DescribeVpcEndpointsResult Maven / Gradle / Ivy
Show all versions of aws-java-sdk-elasticsearch 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.elasticsearch.model;
import java.io.Serializable;
import javax.annotation.Generated;
/**
*
* Container for response parameters to the DescribeVpcEndpoints
operation. Returns a list
* containing configuration details and status of the VPC Endpoints as well as a list containing error responses of the
* endpoints that could not be described
*
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class DescribeVpcEndpointsResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable {
/**
*
* Information about each requested VPC endpoint.
*
*/
private java.util.List vpcEndpoints;
/**
*
* Any errors associated with the request.
*
*/
private java.util.List vpcEndpointErrors;
/**
*
* Information about each requested VPC endpoint.
*
*
* @return Information about each requested VPC endpoint.
*/
public java.util.List getVpcEndpoints() {
return vpcEndpoints;
}
/**
*
* Information about each requested VPC endpoint.
*
*
* @param vpcEndpoints
* Information about each requested VPC endpoint.
*/
public void setVpcEndpoints(java.util.Collection vpcEndpoints) {
if (vpcEndpoints == null) {
this.vpcEndpoints = null;
return;
}
this.vpcEndpoints = new java.util.ArrayList(vpcEndpoints);
}
/**
*
* Information about each requested VPC endpoint.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setVpcEndpoints(java.util.Collection)} or {@link #withVpcEndpoints(java.util.Collection)} if you want to
* override the existing values.
*
*
* @param vpcEndpoints
* Information about each requested VPC endpoint.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeVpcEndpointsResult withVpcEndpoints(VpcEndpoint... vpcEndpoints) {
if (this.vpcEndpoints == null) {
setVpcEndpoints(new java.util.ArrayList(vpcEndpoints.length));
}
for (VpcEndpoint ele : vpcEndpoints) {
this.vpcEndpoints.add(ele);
}
return this;
}
/**
*
* Information about each requested VPC endpoint.
*
*
* @param vpcEndpoints
* Information about each requested VPC endpoint.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeVpcEndpointsResult withVpcEndpoints(java.util.Collection vpcEndpoints) {
setVpcEndpoints(vpcEndpoints);
return this;
}
/**
*
* Any errors associated with the request.
*
*
* @return Any errors associated with the request.
*/
public java.util.List getVpcEndpointErrors() {
return vpcEndpointErrors;
}
/**
*
* Any errors associated with the request.
*
*
* @param vpcEndpointErrors
* Any errors associated with the request.
*/
public void setVpcEndpointErrors(java.util.Collection vpcEndpointErrors) {
if (vpcEndpointErrors == null) {
this.vpcEndpointErrors = null;
return;
}
this.vpcEndpointErrors = new java.util.ArrayList(vpcEndpointErrors);
}
/**
*
* Any errors associated with the request.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setVpcEndpointErrors(java.util.Collection)} or {@link #withVpcEndpointErrors(java.util.Collection)} if
* you want to override the existing values.
*
*
* @param vpcEndpointErrors
* Any errors associated with the request.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeVpcEndpointsResult withVpcEndpointErrors(VpcEndpointError... vpcEndpointErrors) {
if (this.vpcEndpointErrors == null) {
setVpcEndpointErrors(new java.util.ArrayList(vpcEndpointErrors.length));
}
for (VpcEndpointError ele : vpcEndpointErrors) {
this.vpcEndpointErrors.add(ele);
}
return this;
}
/**
*
* Any errors associated with the request.
*
*
* @param vpcEndpointErrors
* Any errors associated with the request.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeVpcEndpointsResult withVpcEndpointErrors(java.util.Collection vpcEndpointErrors) {
setVpcEndpointErrors(vpcEndpointErrors);
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 (getVpcEndpoints() != null)
sb.append("VpcEndpoints: ").append(getVpcEndpoints()).append(",");
if (getVpcEndpointErrors() != null)
sb.append("VpcEndpointErrors: ").append(getVpcEndpointErrors());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof DescribeVpcEndpointsResult == false)
return false;
DescribeVpcEndpointsResult other = (DescribeVpcEndpointsResult) obj;
if (other.getVpcEndpoints() == null ^ this.getVpcEndpoints() == null)
return false;
if (other.getVpcEndpoints() != null && other.getVpcEndpoints().equals(this.getVpcEndpoints()) == false)
return false;
if (other.getVpcEndpointErrors() == null ^ this.getVpcEndpointErrors() == null)
return false;
if (other.getVpcEndpointErrors() != null && other.getVpcEndpointErrors().equals(this.getVpcEndpointErrors()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getVpcEndpoints() == null) ? 0 : getVpcEndpoints().hashCode());
hashCode = prime * hashCode + ((getVpcEndpointErrors() == null) ? 0 : getVpcEndpointErrors().hashCode());
return hashCode;
}
@Override
public DescribeVpcEndpointsResult clone() {
try {
return (DescribeVpcEndpointsResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}