/* * 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.apigatewayv2.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Represents a VPC link. *
*/ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class VpcLink implements Serializable, Cloneable, StructuredPojo { /** ** The timestamp when the VPC link was created. *
*/ private java.util.Date createdDate; /** ** The name of the VPC link. *
*/ private String name; /** ** A list of security group IDs for the VPC link. *
*/ private java.util.List* A list of subnet IDs to include in the VPC link. *
*/ private java.util.List* Tags for the VPC link. *
*/ private java.util.Map* The ID of the VPC link. *
*/ private String vpcLinkId; /** ** The status of the VPC link. *
*/ private String vpcLinkStatus; /** ** A message summarizing the cause of the status of the VPC link. *
*/ private String vpcLinkStatusMessage; /** ** The version of the VPC link. *
*/ private String vpcLinkVersion; /** ** The timestamp when the VPC link was created. *
* * @param createdDate * The timestamp when the VPC link was created. */ public void setCreatedDate(java.util.Date createdDate) { this.createdDate = createdDate; } /** ** The timestamp when the VPC link was created. *
* * @return The timestamp when the VPC link was created. */ public java.util.Date getCreatedDate() { return this.createdDate; } /** ** The timestamp when the VPC link was created. *
* * @param createdDate * The timestamp when the VPC link was created. * @return Returns a reference to this object so that method calls can be chained together. */ public VpcLink withCreatedDate(java.util.Date createdDate) { setCreatedDate(createdDate); return this; } /** ** The name of the VPC link. *
* * @param name * The name of the VPC link. */ public void setName(String name) { this.name = name; } /** ** The name of the VPC link. *
* * @return The name of the VPC link. */ public String getName() { return this.name; } /** ** The name of the VPC link. *
* * @param name * The name of the VPC link. * @return Returns a reference to this object so that method calls can be chained together. */ public VpcLink withName(String name) { setName(name); return this; } /** ** A list of security group IDs for the VPC link. *
* * @return A list of security group IDs for the VPC link. */ public java.util.List* A list of security group IDs for the VPC link. *
* * @param securityGroupIds * A list of security group IDs for the VPC link. */ public void setSecurityGroupIds(java.util.Collection* A list of security group IDs for the VPC link. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setSecurityGroupIds(java.util.Collection)} or {@link #withSecurityGroupIds(java.util.Collection)} if you * want to override the existing values. *
* * @param securityGroupIds * A list of security group IDs for the VPC link. * @return Returns a reference to this object so that method calls can be chained together. */ public VpcLink withSecurityGroupIds(String... securityGroupIds) { if (this.securityGroupIds == null) { setSecurityGroupIds(new java.util.ArrayList* A list of security group IDs for the VPC link. *
* * @param securityGroupIds * A list of security group IDs for the VPC link. * @return Returns a reference to this object so that method calls can be chained together. */ public VpcLink withSecurityGroupIds(java.util.Collection* A list of subnet IDs to include in the VPC link. *
* * @return A list of subnet IDs to include in the VPC link. */ public java.util.List* A list of subnet IDs to include in the VPC link. *
* * @param subnetIds * A list of subnet IDs to include in the VPC link. */ public void setSubnetIds(java.util.Collection* A list of subnet IDs to include in the VPC link. *
** 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 * A list of subnet IDs to include in the VPC link. * @return Returns a reference to this object so that method calls can be chained together. */ public VpcLink withSubnetIds(String... subnetIds) { if (this.subnetIds == null) { setSubnetIds(new java.util.ArrayList* A list of subnet IDs to include in the VPC link. *
* * @param subnetIds * A list of subnet IDs to include in the VPC link. * @return Returns a reference to this object so that method calls can be chained together. */ public VpcLink withSubnetIds(java.util.Collection* Tags for the VPC link. *
* * @return Tags for the VPC link. */ public java.util.Map* Tags for the VPC link. *
* * @param tags * Tags for the VPC link. */ public void setTags(java.util.Map* Tags for the VPC link. *
* * @param tags * Tags for the VPC link. * @return Returns a reference to this object so that method calls can be chained together. */ public VpcLink withTags(java.util.Map* The ID of the VPC link. *
* * @param vpcLinkId * The ID of the VPC link. */ public void setVpcLinkId(String vpcLinkId) { this.vpcLinkId = vpcLinkId; } /** ** The ID of the VPC link. *
* * @return The ID of the VPC link. */ public String getVpcLinkId() { return this.vpcLinkId; } /** ** The ID of the VPC link. *
* * @param vpcLinkId * The ID of the VPC link. * @return Returns a reference to this object so that method calls can be chained together. */ public VpcLink withVpcLinkId(String vpcLinkId) { setVpcLinkId(vpcLinkId); return this; } /** ** The status of the VPC link. *
* * @param vpcLinkStatus * The status of the VPC link. * @see VpcLinkStatus */ public void setVpcLinkStatus(String vpcLinkStatus) { this.vpcLinkStatus = vpcLinkStatus; } /** ** The status of the VPC link. *
* * @return The status of the VPC link. * @see VpcLinkStatus */ public String getVpcLinkStatus() { return this.vpcLinkStatus; } /** ** The status of the VPC link. *
* * @param vpcLinkStatus * The status of the VPC link. * @return Returns a reference to this object so that method calls can be chained together. * @see VpcLinkStatus */ public VpcLink withVpcLinkStatus(String vpcLinkStatus) { setVpcLinkStatus(vpcLinkStatus); return this; } /** ** The status of the VPC link. *
* * @param vpcLinkStatus * The status of the VPC link. * @return Returns a reference to this object so that method calls can be chained together. * @see VpcLinkStatus */ public VpcLink withVpcLinkStatus(VpcLinkStatus vpcLinkStatus) { this.vpcLinkStatus = vpcLinkStatus.toString(); return this; } /** ** A message summarizing the cause of the status of the VPC link. *
* * @param vpcLinkStatusMessage * A message summarizing the cause of the status of the VPC link. */ public void setVpcLinkStatusMessage(String vpcLinkStatusMessage) { this.vpcLinkStatusMessage = vpcLinkStatusMessage; } /** ** A message summarizing the cause of the status of the VPC link. *
* * @return A message summarizing the cause of the status of the VPC link. */ public String getVpcLinkStatusMessage() { return this.vpcLinkStatusMessage; } /** ** A message summarizing the cause of the status of the VPC link. *
* * @param vpcLinkStatusMessage * A message summarizing the cause of the status of the VPC link. * @return Returns a reference to this object so that method calls can be chained together. */ public VpcLink withVpcLinkStatusMessage(String vpcLinkStatusMessage) { setVpcLinkStatusMessage(vpcLinkStatusMessage); return this; } /** ** The version of the VPC link. *
* * @param vpcLinkVersion * The version of the VPC link. * @see VpcLinkVersion */ public void setVpcLinkVersion(String vpcLinkVersion) { this.vpcLinkVersion = vpcLinkVersion; } /** ** The version of the VPC link. *
* * @return The version of the VPC link. * @see VpcLinkVersion */ public String getVpcLinkVersion() { return this.vpcLinkVersion; } /** ** The version of the VPC link. *
* * @param vpcLinkVersion * The version of the VPC link. * @return Returns a reference to this object so that method calls can be chained together. * @see VpcLinkVersion */ public VpcLink withVpcLinkVersion(String vpcLinkVersion) { setVpcLinkVersion(vpcLinkVersion); return this; } /** ** The version of the VPC link. *
* * @param vpcLinkVersion * The version of the VPC link. * @return Returns a reference to this object so that method calls can be chained together. * @see VpcLinkVersion */ public VpcLink withVpcLinkVersion(VpcLinkVersion vpcLinkVersion) { this.vpcLinkVersion = vpcLinkVersion.toString(); 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 (getCreatedDate() != null) sb.append("CreatedDate: ").append(getCreatedDate()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getSecurityGroupIds() != null) sb.append("SecurityGroupIds: ").append(getSecurityGroupIds()).append(","); if (getSubnetIds() != null) sb.append("SubnetIds: ").append(getSubnetIds()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()).append(","); if (getVpcLinkId() != null) sb.append("VpcLinkId: ").append(getVpcLinkId()).append(","); if (getVpcLinkStatus() != null) sb.append("VpcLinkStatus: ").append(getVpcLinkStatus()).append(","); if (getVpcLinkStatusMessage() != null) sb.append("VpcLinkStatusMessage: ").append(getVpcLinkStatusMessage()).append(","); if (getVpcLinkVersion() != null) sb.append("VpcLinkVersion: ").append(getVpcLinkVersion()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof VpcLink == false) return false; VpcLink other = (VpcLink) obj; if (other.getCreatedDate() == null ^ this.getCreatedDate() == null) return false; if (other.getCreatedDate() != null && other.getCreatedDate().equals(this.getCreatedDate()) == false) return false; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getSecurityGroupIds() == null ^ this.getSecurityGroupIds() == null) return false; if (other.getSecurityGroupIds() != null && other.getSecurityGroupIds().equals(this.getSecurityGroupIds()) == 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.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == false) return false; if (other.getVpcLinkId() == null ^ this.getVpcLinkId() == null) return false; if (other.getVpcLinkId() != null && other.getVpcLinkId().equals(this.getVpcLinkId()) == false) return false; if (other.getVpcLinkStatus() == null ^ this.getVpcLinkStatus() == null) return false; if (other.getVpcLinkStatus() != null && other.getVpcLinkStatus().equals(this.getVpcLinkStatus()) == false) return false; if (other.getVpcLinkStatusMessage() == null ^ this.getVpcLinkStatusMessage() == null) return false; if (other.getVpcLinkStatusMessage() != null && other.getVpcLinkStatusMessage().equals(this.getVpcLinkStatusMessage()) == false) return false; if (other.getVpcLinkVersion() == null ^ this.getVpcLinkVersion() == null) return false; if (other.getVpcLinkVersion() != null && other.getVpcLinkVersion().equals(this.getVpcLinkVersion()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCreatedDate() == null) ? 0 : getCreatedDate().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getSecurityGroupIds() == null) ? 0 : getSecurityGroupIds().hashCode()); hashCode = prime * hashCode + ((getSubnetIds() == null) ? 0 : getSubnetIds().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); hashCode = prime * hashCode + ((getVpcLinkId() == null) ? 0 : getVpcLinkId().hashCode()); hashCode = prime * hashCode + ((getVpcLinkStatus() == null) ? 0 : getVpcLinkStatus().hashCode()); hashCode = prime * hashCode + ((getVpcLinkStatusMessage() == null) ? 0 : getVpcLinkStatusMessage().hashCode()); hashCode = prime * hashCode + ((getVpcLinkVersion() == null) ? 0 : getVpcLinkVersion().hashCode()); return hashCode; } @Override public VpcLink clone() { try { return (VpcLink) 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.apigatewayv2.model.transform.VpcLinkMarshaller.getInstance().marshall(this, protocolMarshaller); } }