com.amazonaws.services.gamelift.model.VpcPeeringConnection Maven / Gradle / Ivy
Show all versions of aws-java-sdk-gamelift 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.gamelift.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Represents a peering connection between a VPC on one of your Amazon Web Services accounts and the VPC for your Amazon
* GameLift fleets. This record may be for an active peering connection or a pending connection that has not yet been
* established.
*
*
* Related actions
*
*
* All APIs by task
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class VpcPeeringConnection implements Serializable, Cloneable, StructuredPojo {
/**
*
* A unique identifier for the fleet. This ID determines the ID of the Amazon GameLift VPC for your fleet.
*
*/
private String fleetId;
/**
*
* The Amazon Resource Name (ARN)
* associated with the GameLift fleet resource for this connection.
*
*/
private String fleetArn;
/**
*
* CIDR block of IPv4 addresses assigned to the VPC peering connection for the GameLift VPC. The peered VPC also has
* an IPv4 CIDR block associated with it; these blocks cannot overlap or the peering connection cannot be created.
*
*/
private String ipV4CidrBlock;
/**
*
* A unique identifier that is automatically assigned to the connection record. This ID is referenced in VPC peering
* connection events, and is used when deleting a connection.
*
*/
private String vpcPeeringConnectionId;
/**
*
* The status information about the connection. Status indicates if a connection is pending, successful, or failed.
*
*/
private VpcPeeringConnectionStatus status;
/**
*
* A unique identifier for a VPC with resources to be accessed by your Amazon GameLift fleet. The VPC must be in the
* same Region as your fleet. To look up a VPC ID, use the VPC
* Dashboard in the Amazon Web Services Management Console. Learn more about VPC peering in VPC Peering with Amazon
* GameLift Fleets.
*
*/
private String peerVpcId;
/**
*
* A unique identifier for the VPC that contains the Amazon GameLift fleet for this connection. This VPC is managed
* by Amazon GameLift and does not appear in your Amazon Web Services account.
*
*/
private String gameLiftVpcId;
/**
*
* A unique identifier for the fleet. This ID determines the ID of the Amazon GameLift VPC for your fleet.
*
*
* @param fleetId
* A unique identifier for the fleet. This ID determines the ID of the Amazon GameLift VPC for your fleet.
*/
public void setFleetId(String fleetId) {
this.fleetId = fleetId;
}
/**
*
* A unique identifier for the fleet. This ID determines the ID of the Amazon GameLift VPC for your fleet.
*
*
* @return A unique identifier for the fleet. This ID determines the ID of the Amazon GameLift VPC for your fleet.
*/
public String getFleetId() {
return this.fleetId;
}
/**
*
* A unique identifier for the fleet. This ID determines the ID of the Amazon GameLift VPC for your fleet.
*
*
* @param fleetId
* A unique identifier for the fleet. This ID determines the ID of the Amazon GameLift VPC for your fleet.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public VpcPeeringConnection withFleetId(String fleetId) {
setFleetId(fleetId);
return this;
}
/**
*
* The Amazon Resource Name (ARN)
* associated with the GameLift fleet resource for this connection.
*
*
* @param fleetArn
* The Amazon Resource Name (ARN) associated with the
* GameLift fleet resource for this connection.
*/
public void setFleetArn(String fleetArn) {
this.fleetArn = fleetArn;
}
/**
*
* The Amazon Resource Name (ARN)
* associated with the GameLift fleet resource for this connection.
*
*
* @return The Amazon Resource Name (ARN) associated with the
* GameLift fleet resource for this connection.
*/
public String getFleetArn() {
return this.fleetArn;
}
/**
*
* The Amazon Resource Name (ARN)
* associated with the GameLift fleet resource for this connection.
*
*
* @param fleetArn
* The Amazon Resource Name (ARN) associated with the
* GameLift fleet resource for this connection.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public VpcPeeringConnection withFleetArn(String fleetArn) {
setFleetArn(fleetArn);
return this;
}
/**
*
* CIDR block of IPv4 addresses assigned to the VPC peering connection for the GameLift VPC. The peered VPC also has
* an IPv4 CIDR block associated with it; these blocks cannot overlap or the peering connection cannot be created.
*
*
* @param ipV4CidrBlock
* CIDR block of IPv4 addresses assigned to the VPC peering connection for the GameLift VPC. The peered VPC
* also has an IPv4 CIDR block associated with it; these blocks cannot overlap or the peering connection
* cannot be created.
*/
public void setIpV4CidrBlock(String ipV4CidrBlock) {
this.ipV4CidrBlock = ipV4CidrBlock;
}
/**
*
* CIDR block of IPv4 addresses assigned to the VPC peering connection for the GameLift VPC. The peered VPC also has
* an IPv4 CIDR block associated with it; these blocks cannot overlap or the peering connection cannot be created.
*
*
* @return CIDR block of IPv4 addresses assigned to the VPC peering connection for the GameLift VPC. The peered VPC
* also has an IPv4 CIDR block associated with it; these blocks cannot overlap or the peering connection
* cannot be created.
*/
public String getIpV4CidrBlock() {
return this.ipV4CidrBlock;
}
/**
*
* CIDR block of IPv4 addresses assigned to the VPC peering connection for the GameLift VPC. The peered VPC also has
* an IPv4 CIDR block associated with it; these blocks cannot overlap or the peering connection cannot be created.
*
*
* @param ipV4CidrBlock
* CIDR block of IPv4 addresses assigned to the VPC peering connection for the GameLift VPC. The peered VPC
* also has an IPv4 CIDR block associated with it; these blocks cannot overlap or the peering connection
* cannot be created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public VpcPeeringConnection withIpV4CidrBlock(String ipV4CidrBlock) {
setIpV4CidrBlock(ipV4CidrBlock);
return this;
}
/**
*
* A unique identifier that is automatically assigned to the connection record. This ID is referenced in VPC peering
* connection events, and is used when deleting a connection.
*
*
* @param vpcPeeringConnectionId
* A unique identifier that is automatically assigned to the connection record. This ID is referenced in VPC
* peering connection events, and is used when deleting a connection.
*/
public void setVpcPeeringConnectionId(String vpcPeeringConnectionId) {
this.vpcPeeringConnectionId = vpcPeeringConnectionId;
}
/**
*
* A unique identifier that is automatically assigned to the connection record. This ID is referenced in VPC peering
* connection events, and is used when deleting a connection.
*
*
* @return A unique identifier that is automatically assigned to the connection record. This ID is referenced in VPC
* peering connection events, and is used when deleting a connection.
*/
public String getVpcPeeringConnectionId() {
return this.vpcPeeringConnectionId;
}
/**
*
* A unique identifier that is automatically assigned to the connection record. This ID is referenced in VPC peering
* connection events, and is used when deleting a connection.
*
*
* @param vpcPeeringConnectionId
* A unique identifier that is automatically assigned to the connection record. This ID is referenced in VPC
* peering connection events, and is used when deleting a connection.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public VpcPeeringConnection withVpcPeeringConnectionId(String vpcPeeringConnectionId) {
setVpcPeeringConnectionId(vpcPeeringConnectionId);
return this;
}
/**
*
* The status information about the connection. Status indicates if a connection is pending, successful, or failed.
*
*
* @param status
* The status information about the connection. Status indicates if a connection is pending, successful, or
* failed.
*/
public void setStatus(VpcPeeringConnectionStatus status) {
this.status = status;
}
/**
*
* The status information about the connection. Status indicates if a connection is pending, successful, or failed.
*
*
* @return The status information about the connection. Status indicates if a connection is pending, successful, or
* failed.
*/
public VpcPeeringConnectionStatus getStatus() {
return this.status;
}
/**
*
* The status information about the connection. Status indicates if a connection is pending, successful, or failed.
*
*
* @param status
* The status information about the connection. Status indicates if a connection is pending, successful, or
* failed.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public VpcPeeringConnection withStatus(VpcPeeringConnectionStatus status) {
setStatus(status);
return this;
}
/**
*
* A unique identifier for a VPC with resources to be accessed by your Amazon GameLift fleet. The VPC must be in the
* same Region as your fleet. To look up a VPC ID, use the VPC
* Dashboard in the Amazon Web Services Management Console. Learn more about VPC peering in VPC Peering with Amazon
* GameLift Fleets.
*
*
* @param peerVpcId
* A unique identifier for a VPC with resources to be accessed by your Amazon GameLift fleet. The VPC must be
* in the same Region as your fleet. To look up a VPC ID, use the VPC Dashboard in the Amazon Web Services Management
* Console. Learn more about VPC peering in VPC Peering with Amazon
* GameLift Fleets.
*/
public void setPeerVpcId(String peerVpcId) {
this.peerVpcId = peerVpcId;
}
/**
*
* A unique identifier for a VPC with resources to be accessed by your Amazon GameLift fleet. The VPC must be in the
* same Region as your fleet. To look up a VPC ID, use the VPC
* Dashboard in the Amazon Web Services Management Console. Learn more about VPC peering in VPC Peering with Amazon
* GameLift Fleets.
*
*
* @return A unique identifier for a VPC with resources to be accessed by your Amazon GameLift fleet. The VPC must
* be in the same Region as your fleet. To look up a VPC ID, use the VPC Dashboard in the Amazon Web Services Management
* Console. Learn more about VPC peering in VPC Peering with
* Amazon GameLift Fleets.
*/
public String getPeerVpcId() {
return this.peerVpcId;
}
/**
*
* A unique identifier for a VPC with resources to be accessed by your Amazon GameLift fleet. The VPC must be in the
* same Region as your fleet. To look up a VPC ID, use the VPC
* Dashboard in the Amazon Web Services Management Console. Learn more about VPC peering in VPC Peering with Amazon
* GameLift Fleets.
*
*
* @param peerVpcId
* A unique identifier for a VPC with resources to be accessed by your Amazon GameLift fleet. The VPC must be
* in the same Region as your fleet. To look up a VPC ID, use the VPC Dashboard in the Amazon Web Services Management
* Console. Learn more about VPC peering in VPC Peering with Amazon
* GameLift Fleets.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public VpcPeeringConnection withPeerVpcId(String peerVpcId) {
setPeerVpcId(peerVpcId);
return this;
}
/**
*
* A unique identifier for the VPC that contains the Amazon GameLift fleet for this connection. This VPC is managed
* by Amazon GameLift and does not appear in your Amazon Web Services account.
*
*
* @param gameLiftVpcId
* A unique identifier for the VPC that contains the Amazon GameLift fleet for this connection. This VPC is
* managed by Amazon GameLift and does not appear in your Amazon Web Services account.
*/
public void setGameLiftVpcId(String gameLiftVpcId) {
this.gameLiftVpcId = gameLiftVpcId;
}
/**
*
* A unique identifier for the VPC that contains the Amazon GameLift fleet for this connection. This VPC is managed
* by Amazon GameLift and does not appear in your Amazon Web Services account.
*
*
* @return A unique identifier for the VPC that contains the Amazon GameLift fleet for this connection. This VPC is
* managed by Amazon GameLift and does not appear in your Amazon Web Services account.
*/
public String getGameLiftVpcId() {
return this.gameLiftVpcId;
}
/**
*
* A unique identifier for the VPC that contains the Amazon GameLift fleet for this connection. This VPC is managed
* by Amazon GameLift and does not appear in your Amazon Web Services account.
*
*
* @param gameLiftVpcId
* A unique identifier for the VPC that contains the Amazon GameLift fleet for this connection. This VPC is
* managed by Amazon GameLift and does not appear in your Amazon Web Services account.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public VpcPeeringConnection withGameLiftVpcId(String gameLiftVpcId) {
setGameLiftVpcId(gameLiftVpcId);
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 (getFleetId() != null)
sb.append("FleetId: ").append(getFleetId()).append(",");
if (getFleetArn() != null)
sb.append("FleetArn: ").append(getFleetArn()).append(",");
if (getIpV4CidrBlock() != null)
sb.append("IpV4CidrBlock: ").append(getIpV4CidrBlock()).append(",");
if (getVpcPeeringConnectionId() != null)
sb.append("VpcPeeringConnectionId: ").append(getVpcPeeringConnectionId()).append(",");
if (getStatus() != null)
sb.append("Status: ").append(getStatus()).append(",");
if (getPeerVpcId() != null)
sb.append("PeerVpcId: ").append(getPeerVpcId()).append(",");
if (getGameLiftVpcId() != null)
sb.append("GameLiftVpcId: ").append(getGameLiftVpcId());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof VpcPeeringConnection == false)
return false;
VpcPeeringConnection other = (VpcPeeringConnection) obj;
if (other.getFleetId() == null ^ this.getFleetId() == null)
return false;
if (other.getFleetId() != null && other.getFleetId().equals(this.getFleetId()) == false)
return false;
if (other.getFleetArn() == null ^ this.getFleetArn() == null)
return false;
if (other.getFleetArn() != null && other.getFleetArn().equals(this.getFleetArn()) == false)
return false;
if (other.getIpV4CidrBlock() == null ^ this.getIpV4CidrBlock() == null)
return false;
if (other.getIpV4CidrBlock() != null && other.getIpV4CidrBlock().equals(this.getIpV4CidrBlock()) == false)
return false;
if (other.getVpcPeeringConnectionId() == null ^ this.getVpcPeeringConnectionId() == null)
return false;
if (other.getVpcPeeringConnectionId() != null && other.getVpcPeeringConnectionId().equals(this.getVpcPeeringConnectionId()) == false)
return false;
if (other.getStatus() == null ^ this.getStatus() == null)
return false;
if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false)
return false;
if (other.getPeerVpcId() == null ^ this.getPeerVpcId() == null)
return false;
if (other.getPeerVpcId() != null && other.getPeerVpcId().equals(this.getPeerVpcId()) == false)
return false;
if (other.getGameLiftVpcId() == null ^ this.getGameLiftVpcId() == null)
return false;
if (other.getGameLiftVpcId() != null && other.getGameLiftVpcId().equals(this.getGameLiftVpcId()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getFleetId() == null) ? 0 : getFleetId().hashCode());
hashCode = prime * hashCode + ((getFleetArn() == null) ? 0 : getFleetArn().hashCode());
hashCode = prime * hashCode + ((getIpV4CidrBlock() == null) ? 0 : getIpV4CidrBlock().hashCode());
hashCode = prime * hashCode + ((getVpcPeeringConnectionId() == null) ? 0 : getVpcPeeringConnectionId().hashCode());
hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode());
hashCode = prime * hashCode + ((getPeerVpcId() == null) ? 0 : getPeerVpcId().hashCode());
hashCode = prime * hashCode + ((getGameLiftVpcId() == null) ? 0 : getGameLiftVpcId().hashCode());
return hashCode;
}
@Override
public VpcPeeringConnection clone() {
try {
return (VpcPeeringConnection) 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.gamelift.model.transform.VpcPeeringConnectionMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}