com.amazonaws.services.gamelift.model.VpcPeeringAuthorization 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 an authorization for a VPC peering connection between the VPC for an Amazon GameLift fleet and another VPC
* on an account you have access to. This authorization must exist and be valid for the peering connection to be
* established. Authorizations are valid for 24 hours after they are issued.
*
*
* Related actions
*
*
* All APIs by task
*
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class VpcPeeringAuthorization implements Serializable, Cloneable, StructuredPojo {
/**
*
* A unique identifier for the Amazon Web Services account that you use to manage your Amazon GameLift fleet. You
* can find your Account ID in the Amazon Web Services Management Console under account settings.
*
*/
private String gameLiftAwsAccountId;
/**
*
* The authorization's peer VPC Amazon Web Services account ID.
*
*/
private String peerVpcAwsAccountId;
/**
*
* 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;
/**
*
* Time stamp indicating when this authorization was issued. Format is a number expressed in Unix time as
* milliseconds (for example "1469498468.057"
).
*
*/
private java.util.Date creationTime;
/**
*
* Time stamp indicating when this authorization expires (24 hours after issuance). Format is a number expressed in
* Unix time as milliseconds (for example "1469498468.057"
).
*
*/
private java.util.Date expirationTime;
/**
*
* A unique identifier for the Amazon Web Services account that you use to manage your Amazon GameLift fleet. You
* can find your Account ID in the Amazon Web Services Management Console under account settings.
*
*
* @param gameLiftAwsAccountId
* A unique identifier for the Amazon Web Services account that you use to manage your Amazon GameLift fleet.
* You can find your Account ID in the Amazon Web Services Management Console under account settings.
*/
public void setGameLiftAwsAccountId(String gameLiftAwsAccountId) {
this.gameLiftAwsAccountId = gameLiftAwsAccountId;
}
/**
*
* A unique identifier for the Amazon Web Services account that you use to manage your Amazon GameLift fleet. You
* can find your Account ID in the Amazon Web Services Management Console under account settings.
*
*
* @return A unique identifier for the Amazon Web Services account that you use to manage your Amazon GameLift
* fleet. You can find your Account ID in the Amazon Web Services Management Console under account settings.
*/
public String getGameLiftAwsAccountId() {
return this.gameLiftAwsAccountId;
}
/**
*
* A unique identifier for the Amazon Web Services account that you use to manage your Amazon GameLift fleet. You
* can find your Account ID in the Amazon Web Services Management Console under account settings.
*
*
* @param gameLiftAwsAccountId
* A unique identifier for the Amazon Web Services account that you use to manage your Amazon GameLift fleet.
* You can find your Account ID in the Amazon Web Services Management Console under account settings.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public VpcPeeringAuthorization withGameLiftAwsAccountId(String gameLiftAwsAccountId) {
setGameLiftAwsAccountId(gameLiftAwsAccountId);
return this;
}
/**
*
* The authorization's peer VPC Amazon Web Services account ID.
*
*
* @param peerVpcAwsAccountId
* The authorization's peer VPC Amazon Web Services account ID.
*/
public void setPeerVpcAwsAccountId(String peerVpcAwsAccountId) {
this.peerVpcAwsAccountId = peerVpcAwsAccountId;
}
/**
*
* The authorization's peer VPC Amazon Web Services account ID.
*
*
* @return The authorization's peer VPC Amazon Web Services account ID.
*/
public String getPeerVpcAwsAccountId() {
return this.peerVpcAwsAccountId;
}
/**
*
* The authorization's peer VPC Amazon Web Services account ID.
*
*
* @param peerVpcAwsAccountId
* The authorization's peer VPC Amazon Web Services account ID.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public VpcPeeringAuthorization withPeerVpcAwsAccountId(String peerVpcAwsAccountId) {
setPeerVpcAwsAccountId(peerVpcAwsAccountId);
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 VpcPeeringAuthorization withPeerVpcId(String peerVpcId) {
setPeerVpcId(peerVpcId);
return this;
}
/**
*
* Time stamp indicating when this authorization was issued. Format is a number expressed in Unix time as
* milliseconds (for example "1469498468.057"
).
*
*
* @param creationTime
* Time stamp indicating when this authorization was issued. Format is a number expressed in Unix time as
* milliseconds (for example "1469498468.057"
).
*/
public void setCreationTime(java.util.Date creationTime) {
this.creationTime = creationTime;
}
/**
*
* Time stamp indicating when this authorization was issued. Format is a number expressed in Unix time as
* milliseconds (for example "1469498468.057"
).
*
*
* @return Time stamp indicating when this authorization was issued. Format is a number expressed in Unix time as
* milliseconds (for example "1469498468.057"
).
*/
public java.util.Date getCreationTime() {
return this.creationTime;
}
/**
*
* Time stamp indicating when this authorization was issued. Format is a number expressed in Unix time as
* milliseconds (for example "1469498468.057"
).
*
*
* @param creationTime
* Time stamp indicating when this authorization was issued. Format is a number expressed in Unix time as
* milliseconds (for example "1469498468.057"
).
* @return Returns a reference to this object so that method calls can be chained together.
*/
public VpcPeeringAuthorization withCreationTime(java.util.Date creationTime) {
setCreationTime(creationTime);
return this;
}
/**
*
* Time stamp indicating when this authorization expires (24 hours after issuance). Format is a number expressed in
* Unix time as milliseconds (for example "1469498468.057"
).
*
*
* @param expirationTime
* Time stamp indicating when this authorization expires (24 hours after issuance). Format is a number
* expressed in Unix time as milliseconds (for example "1469498468.057"
).
*/
public void setExpirationTime(java.util.Date expirationTime) {
this.expirationTime = expirationTime;
}
/**
*
* Time stamp indicating when this authorization expires (24 hours after issuance). Format is a number expressed in
* Unix time as milliseconds (for example "1469498468.057"
).
*
*
* @return Time stamp indicating when this authorization expires (24 hours after issuance). Format is a number
* expressed in Unix time as milliseconds (for example "1469498468.057"
).
*/
public java.util.Date getExpirationTime() {
return this.expirationTime;
}
/**
*
* Time stamp indicating when this authorization expires (24 hours after issuance). Format is a number expressed in
* Unix time as milliseconds (for example "1469498468.057"
).
*
*
* @param expirationTime
* Time stamp indicating when this authorization expires (24 hours after issuance). Format is a number
* expressed in Unix time as milliseconds (for example "1469498468.057"
).
* @return Returns a reference to this object so that method calls can be chained together.
*/
public VpcPeeringAuthorization withExpirationTime(java.util.Date expirationTime) {
setExpirationTime(expirationTime);
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 (getGameLiftAwsAccountId() != null)
sb.append("GameLiftAwsAccountId: ").append(getGameLiftAwsAccountId()).append(",");
if (getPeerVpcAwsAccountId() != null)
sb.append("PeerVpcAwsAccountId: ").append(getPeerVpcAwsAccountId()).append(",");
if (getPeerVpcId() != null)
sb.append("PeerVpcId: ").append(getPeerVpcId()).append(",");
if (getCreationTime() != null)
sb.append("CreationTime: ").append(getCreationTime()).append(",");
if (getExpirationTime() != null)
sb.append("ExpirationTime: ").append(getExpirationTime());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof VpcPeeringAuthorization == false)
return false;
VpcPeeringAuthorization other = (VpcPeeringAuthorization) obj;
if (other.getGameLiftAwsAccountId() == null ^ this.getGameLiftAwsAccountId() == null)
return false;
if (other.getGameLiftAwsAccountId() != null && other.getGameLiftAwsAccountId().equals(this.getGameLiftAwsAccountId()) == false)
return false;
if (other.getPeerVpcAwsAccountId() == null ^ this.getPeerVpcAwsAccountId() == null)
return false;
if (other.getPeerVpcAwsAccountId() != null && other.getPeerVpcAwsAccountId().equals(this.getPeerVpcAwsAccountId()) == 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.getCreationTime() == null ^ this.getCreationTime() == null)
return false;
if (other.getCreationTime() != null && other.getCreationTime().equals(this.getCreationTime()) == false)
return false;
if (other.getExpirationTime() == null ^ this.getExpirationTime() == null)
return false;
if (other.getExpirationTime() != null && other.getExpirationTime().equals(this.getExpirationTime()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getGameLiftAwsAccountId() == null) ? 0 : getGameLiftAwsAccountId().hashCode());
hashCode = prime * hashCode + ((getPeerVpcAwsAccountId() == null) ? 0 : getPeerVpcAwsAccountId().hashCode());
hashCode = prime * hashCode + ((getPeerVpcId() == null) ? 0 : getPeerVpcId().hashCode());
hashCode = prime * hashCode + ((getCreationTime() == null) ? 0 : getCreationTime().hashCode());
hashCode = prime * hashCode + ((getExpirationTime() == null) ? 0 : getExpirationTime().hashCode());
return hashCode;
}
@Override
public VpcPeeringAuthorization clone() {
try {
return (VpcPeeringAuthorization) 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.VpcPeeringAuthorizationMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}