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

com.amazonaws.services.securityhub.model.AwsEc2VpcPeeringConnectionVpcInfoDetails Maven / Gradle / Ivy

Go to download

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

There is a newer version: 1.12.780
Show newest version
/*
 * 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.securityhub.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* Describes a VPC in a VPC peering connection. *

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

* The IPv4 CIDR block for the VPC. *

*/ private String cidrBlock; /** *

* Information about the IPv4 CIDR blocks for the VPC. *

*/ private java.util.List cidrBlockSet; /** *

* The IPv6 CIDR block for the VPC. *

*/ private java.util.List ipv6CidrBlockSet; /** *

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

*/ private String ownerId; /** *

* Information about the VPC peering connection options for the accepter or requester VPC. *

*/ private VpcInfoPeeringOptionsDetails peeringOptions; /** *

* The Amazon Web Services Region in which the VPC is located. *

*/ private String region; /** *

* The ID of the VPC. *

*/ private String vpcId; /** *

* The IPv4 CIDR block for the VPC. *

* * @param cidrBlock * The IPv4 CIDR block for the VPC. */ public void setCidrBlock(String cidrBlock) { this.cidrBlock = cidrBlock; } /** *

* The IPv4 CIDR block for the VPC. *

* * @return The IPv4 CIDR block for the VPC. */ public String getCidrBlock() { return this.cidrBlock; } /** *

* The IPv4 CIDR block for the VPC. *

* * @param cidrBlock * The IPv4 CIDR block for the VPC. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEc2VpcPeeringConnectionVpcInfoDetails withCidrBlock(String cidrBlock) { setCidrBlock(cidrBlock); return this; } /** *

* Information about the IPv4 CIDR blocks for the VPC. *

* * @return Information about the IPv4 CIDR blocks for the VPC. */ public java.util.List getCidrBlockSet() { return cidrBlockSet; } /** *

* Information about the IPv4 CIDR blocks for the VPC. *

* * @param cidrBlockSet * Information about the IPv4 CIDR blocks for the VPC. */ public void setCidrBlockSet(java.util.Collection cidrBlockSet) { if (cidrBlockSet == null) { this.cidrBlockSet = null; return; } this.cidrBlockSet = new java.util.ArrayList(cidrBlockSet); } /** *

* Information about the IPv4 CIDR blocks for the VPC. *

*

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

* * @param cidrBlockSet * Information about the IPv4 CIDR blocks for the VPC. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEc2VpcPeeringConnectionVpcInfoDetails withCidrBlockSet(VpcInfoCidrBlockSetDetails... cidrBlockSet) { if (this.cidrBlockSet == null) { setCidrBlockSet(new java.util.ArrayList(cidrBlockSet.length)); } for (VpcInfoCidrBlockSetDetails ele : cidrBlockSet) { this.cidrBlockSet.add(ele); } return this; } /** *

* Information about the IPv4 CIDR blocks for the VPC. *

* * @param cidrBlockSet * Information about the IPv4 CIDR blocks for the VPC. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEc2VpcPeeringConnectionVpcInfoDetails withCidrBlockSet(java.util.Collection cidrBlockSet) { setCidrBlockSet(cidrBlockSet); return this; } /** *

* The IPv6 CIDR block for the VPC. *

* * @return The IPv6 CIDR block for the VPC. */ public java.util.List getIpv6CidrBlockSet() { return ipv6CidrBlockSet; } /** *

* The IPv6 CIDR block for the VPC. *

* * @param ipv6CidrBlockSet * The IPv6 CIDR block for the VPC. */ public void setIpv6CidrBlockSet(java.util.Collection ipv6CidrBlockSet) { if (ipv6CidrBlockSet == null) { this.ipv6CidrBlockSet = null; return; } this.ipv6CidrBlockSet = new java.util.ArrayList(ipv6CidrBlockSet); } /** *

* The IPv6 CIDR block for the VPC. *

*

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

* * @param ipv6CidrBlockSet * The IPv6 CIDR block for the VPC. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEc2VpcPeeringConnectionVpcInfoDetails withIpv6CidrBlockSet(VpcInfoIpv6CidrBlockSetDetails... ipv6CidrBlockSet) { if (this.ipv6CidrBlockSet == null) { setIpv6CidrBlockSet(new java.util.ArrayList(ipv6CidrBlockSet.length)); } for (VpcInfoIpv6CidrBlockSetDetails ele : ipv6CidrBlockSet) { this.ipv6CidrBlockSet.add(ele); } return this; } /** *

* The IPv6 CIDR block for the VPC. *

* * @param ipv6CidrBlockSet * The IPv6 CIDR block for the VPC. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEc2VpcPeeringConnectionVpcInfoDetails withIpv6CidrBlockSet(java.util.Collection ipv6CidrBlockSet) { setIpv6CidrBlockSet(ipv6CidrBlockSet); return this; } /** *

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

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

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

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

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

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

* Information about the VPC peering connection options for the accepter or requester VPC. *

* * @param peeringOptions * Information about the VPC peering connection options for the accepter or requester VPC. */ public void setPeeringOptions(VpcInfoPeeringOptionsDetails peeringOptions) { this.peeringOptions = peeringOptions; } /** *

* Information about the VPC peering connection options for the accepter or requester VPC. *

* * @return Information about the VPC peering connection options for the accepter or requester VPC. */ public VpcInfoPeeringOptionsDetails getPeeringOptions() { return this.peeringOptions; } /** *

* Information about the VPC peering connection options for the accepter or requester VPC. *

* * @param peeringOptions * Information about the VPC peering connection options for the accepter or requester VPC. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEc2VpcPeeringConnectionVpcInfoDetails withPeeringOptions(VpcInfoPeeringOptionsDetails peeringOptions) { setPeeringOptions(peeringOptions); return this; } /** *

* The Amazon Web Services Region in which the VPC is located. *

* * @param region * The Amazon Web Services Region in which the VPC is located. */ public void setRegion(String region) { this.region = region; } /** *

* The Amazon Web Services Region in which the VPC is located. *

* * @return The Amazon Web Services Region in which the VPC is located. */ public String getRegion() { return this.region; } /** *

* The Amazon Web Services Region in which the VPC is located. *

* * @param region * The Amazon Web Services Region in which the VPC is located. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEc2VpcPeeringConnectionVpcInfoDetails withRegion(String region) { setRegion(region); return this; } /** *

* The ID of the VPC. *

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

* The ID of the VPC. *

* * @return The ID of the VPC. */ public String getVpcId() { return this.vpcId; } /** *

* The ID of the VPC. *

* * @param vpcId * The ID of the VPC. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEc2VpcPeeringConnectionVpcInfoDetails withVpcId(String vpcId) { setVpcId(vpcId); 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 (getCidrBlock() != null) sb.append("CidrBlock: ").append(getCidrBlock()).append(","); if (getCidrBlockSet() != null) sb.append("CidrBlockSet: ").append(getCidrBlockSet()).append(","); if (getIpv6CidrBlockSet() != null) sb.append("Ipv6CidrBlockSet: ").append(getIpv6CidrBlockSet()).append(","); if (getOwnerId() != null) sb.append("OwnerId: ").append(getOwnerId()).append(","); if (getPeeringOptions() != null) sb.append("PeeringOptions: ").append(getPeeringOptions()).append(","); if (getRegion() != null) sb.append("Region: ").append(getRegion()).append(","); if (getVpcId() != null) sb.append("VpcId: ").append(getVpcId()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof AwsEc2VpcPeeringConnectionVpcInfoDetails == false) return false; AwsEc2VpcPeeringConnectionVpcInfoDetails other = (AwsEc2VpcPeeringConnectionVpcInfoDetails) obj; if (other.getCidrBlock() == null ^ this.getCidrBlock() == null) return false; if (other.getCidrBlock() != null && other.getCidrBlock().equals(this.getCidrBlock()) == false) return false; if (other.getCidrBlockSet() == null ^ this.getCidrBlockSet() == null) return false; if (other.getCidrBlockSet() != null && other.getCidrBlockSet().equals(this.getCidrBlockSet()) == false) return false; if (other.getIpv6CidrBlockSet() == null ^ this.getIpv6CidrBlockSet() == null) return false; if (other.getIpv6CidrBlockSet() != null && other.getIpv6CidrBlockSet().equals(this.getIpv6CidrBlockSet()) == false) return false; if (other.getOwnerId() == null ^ this.getOwnerId() == null) return false; if (other.getOwnerId() != null && other.getOwnerId().equals(this.getOwnerId()) == false) return false; if (other.getPeeringOptions() == null ^ this.getPeeringOptions() == null) return false; if (other.getPeeringOptions() != null && other.getPeeringOptions().equals(this.getPeeringOptions()) == false) return false; if (other.getRegion() == null ^ this.getRegion() == null) return false; if (other.getRegion() != null && other.getRegion().equals(this.getRegion()) == false) return false; if (other.getVpcId() == null ^ this.getVpcId() == null) return false; if (other.getVpcId() != null && other.getVpcId().equals(this.getVpcId()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCidrBlock() == null) ? 0 : getCidrBlock().hashCode()); hashCode = prime * hashCode + ((getCidrBlockSet() == null) ? 0 : getCidrBlockSet().hashCode()); hashCode = prime * hashCode + ((getIpv6CidrBlockSet() == null) ? 0 : getIpv6CidrBlockSet().hashCode()); hashCode = prime * hashCode + ((getOwnerId() == null) ? 0 : getOwnerId().hashCode()); hashCode = prime * hashCode + ((getPeeringOptions() == null) ? 0 : getPeeringOptions().hashCode()); hashCode = prime * hashCode + ((getRegion() == null) ? 0 : getRegion().hashCode()); hashCode = prime * hashCode + ((getVpcId() == null) ? 0 : getVpcId().hashCode()); return hashCode; } @Override public AwsEc2VpcPeeringConnectionVpcInfoDetails clone() { try { return (AwsEc2VpcPeeringConnectionVpcInfoDetails) 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.securityhub.model.transform.AwsEc2VpcPeeringConnectionVpcInfoDetailsMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy