Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2014 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.ec2.model;
 

Describes a VPC peering connection.

 
 public class VpcPeeringConnection implements Serializable {

    
The information of the peer VPC.
 
     private VpcPeeringConnectionVpcInfo accepterVpcInfo;

    
The time that an unaccepted VPC peering connection will expire.
 
     private java.util.Date expirationTime;

    
The information of the requester VPC.
 
     private VpcPeeringConnectionVpcInfo requesterVpcInfo;

    
The status of the VPC peering connection.
 
     private VpcPeeringConnectionStateReason status;

    
Any tags assigned to the resource.
 
The ID of the VPC peering connection.
 
     private String vpcPeeringConnectionId;

    
The information of the peer VPC.

Returns:
The information of the peer VPC.
 
         return ;
     }
    
    
The information of the peer VPC.

Parameters:
accepterVpcInfo The information of the peer VPC.
 
     public void setAccepterVpcInfo(VpcPeeringConnectionVpcInfo accepterVpcInfo) {
         this. = accepterVpcInfo;
     }
    
    
The information of the peer VPC.

Returns a reference to this object so that method calls can be chained together.

Parameters:
accepterVpcInfo The information of the peer VPC.
Returns:
A reference to this updated object so that method calls can be chained together.
 
         this. = accepterVpcInfo;
         return this;
     }

    
The time that an unaccepted VPC peering connection will expire.

Returns:
The time that an unaccepted VPC peering connection will expire.
 
     public java.util.Date getExpirationTime() {
         return ;
     }
    
    
The time that an unaccepted VPC peering connection will expire.

Parameters:
expirationTime The time that an unaccepted VPC peering connection will expire.
    public void setExpirationTime(java.util.Date expirationTime) {
        this. = expirationTime;
    }
    
    
The time that an unaccepted VPC peering connection will expire.

Returns a reference to this object so that method calls can be chained together.

Parameters:
expirationTime The time that an unaccepted VPC peering connection will expire.
Returns:
A reference to this updated object so that method calls can be chained together.
    public VpcPeeringConnection withExpirationTime(java.util.Date expirationTime) {
        this. = expirationTime;
        return this;
    }

    
The information of the requester VPC.

Returns:
The information of the requester VPC.
        return ;
    }
    
    
The information of the requester VPC.

Parameters:
requesterVpcInfo The information of the requester VPC.
    public void setRequesterVpcInfo(VpcPeeringConnectionVpcInfo requesterVpcInfo) {
        this. = requesterVpcInfo;
    }
    
    
The information of the requester VPC.

Returns a reference to this object so that method calls can be chained together.

Parameters:
requesterVpcInfo The information of the requester VPC.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = requesterVpcInfo;
        return this;
    }

    
The status of the VPC peering connection.

Returns:
The status of the VPC peering connection.
        return ;
    }
    
    
The status of the VPC peering connection.

Parameters:
status The status of the VPC peering connection.
    public void setStatus(VpcPeeringConnectionStateReason status) {
        this. = status;
    }
    
    
The status of the VPC peering connection.

Returns a reference to this object so that method calls can be chained together.

Parameters:
status The status of the VPC peering connection.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = status;
        return this;
    }

    
Any tags assigned to the resource.

Returns:
Any tags assigned to the resource.
    public java.util.List<TaggetTags() {
        if ( == null) {
               = new com.amazonaws.internal.ListWithAutoConstructFlag<Tag>();
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
Any tags assigned to the resource.

Parameters:
tags Any tags assigned to the resource.
    public void setTags(java.util.Collection<Tagtags) {
        if (tags == null) {
            this. = null;
            return;
        }
        tagsCopy.addAll(tags);
        this. = tagsCopy;
    }
    
    
Any tags assigned to the resource.

Returns a reference to this object so that method calls can be chained together.

Parameters:
tags Any tags assigned to the resource.
Returns:
A reference to this updated object so that method calls can be chained together.
    public VpcPeeringConnection withTags(Tag... tags) {
        if (getTags() == nullsetTags(new java.util.ArrayList<Tag>(tags.length));
        for (Tag value : tags) {
            getTags().add(value);
        }
        return this;
    }
    
    
Any tags assigned to the resource.

Returns a reference to this object so that method calls can be chained together.

Parameters:
tags Any tags assigned to the resource.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (tags == null) {
            this. = null;
        } else {
            tagsCopy.addAll(tags);
            this. = tagsCopy;
        }
        return this;
    }

    
The ID of the VPC peering connection.

Returns:
The ID of the VPC peering connection.
    public String getVpcPeeringConnectionId() {
        return ;
    }
    
    
The ID of the VPC peering connection.

Parameters:
vpcPeeringConnectionId The ID of the VPC peering connection.
    public void setVpcPeeringConnectionId(String vpcPeeringConnectionId) {
        this. = vpcPeeringConnectionId;
    }
    
    
The ID of the VPC peering connection.

Returns a reference to this object so that method calls can be chained together.

Parameters:
vpcPeeringConnectionId The ID of the VPC peering connection.
Returns:
A reference to this updated object so that method calls can be chained together.
    public VpcPeeringConnection withVpcPeeringConnectionId(String vpcPeeringConnectionId) {
        this. = vpcPeeringConnectionId;
        return this;
    }

    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getAccepterVpcInfo() != nullsb.append("AccepterVpcInfo: " + getAccepterVpcInfo() + ",");
        if (getExpirationTime() != nullsb.append("ExpirationTime: " + getExpirationTime() + ",");
        if (getRequesterVpcInfo() != nullsb.append("RequesterVpcInfo: " + getRequesterVpcInfo() + ",");
        if (getStatus() != nullsb.append("Status: " + getStatus() + ",");
        if (getTags() != nullsb.append("Tags: " + getTags() + ",");
        if (getVpcPeeringConnectionId() != nullsb.append("VpcPeeringConnectionId: " + getVpcPeeringConnectionId() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getAccepterVpcInfo() == null) ? 0 : getAccepterVpcInfo().hashCode()); 
        hashCode = prime * hashCode + ((getExpirationTime() == null) ? 0 : getExpirationTime().hashCode()); 
        hashCode = prime * hashCode + ((getRequesterVpcInfo() == null) ? 0 : getRequesterVpcInfo().hashCode()); 
        hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); 
        hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); 
        hashCode = prime * hashCode + ((getVpcPeeringConnectionId() == null) ? 0 : getVpcPeeringConnectionId().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof VpcPeeringConnection == falsereturn false;
        VpcPeeringConnection other = (VpcPeeringConnection)obj;
        
        if (other.getAccepterVpcInfo() == null ^ this.getAccepterVpcInfo() == nullreturn false;
        if (other.getAccepterVpcInfo() != null && other.getAccepterVpcInfo().equals(this.getAccepterVpcInfo()) == falsereturn false
        if (other.getExpirationTime() == null ^ this.getExpirationTime() == nullreturn false;
        if (other.getExpirationTime() != null && other.getExpirationTime().equals(this.getExpirationTime()) == falsereturn false
        if (other.getRequesterVpcInfo() == null ^ this.getRequesterVpcInfo() == nullreturn false;
        if (other.getRequesterVpcInfo() != null && other.getRequesterVpcInfo().equals(this.getRequesterVpcInfo()) == falsereturn false
        if (other.getStatus() == null ^ this.getStatus() == nullreturn false;
        if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == falsereturn false
        if (other.getTags() == null ^ this.getTags() == nullreturn false;
        if (other.getTags() != null && other.getTags().equals(this.getTags()) == falsereturn false
        if (other.getVpcPeeringConnectionId() == null ^ this.getVpcPeeringConnectionId() == nullreturn false;
        if (other.getVpcPeeringConnectionId() != null && other.getVpcPeeringConnectionId().equals(this.getVpcPeeringConnectionId()) == falsereturn false
        return true;
    }
    
}
    
New to GrepCode? Check out our FAQ X