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

com.amazonaws.services.ec2.model.PeeringTgwInfo Maven / Gradle / Ivy

Go to download

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

The newest version!
/*
 * 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.ec2.model;

import java.io.Serializable;
import javax.annotation.Generated;

/**
 * 

* Information about the transit gateway in the peering attachment. *

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

* The ID of the transit gateway. *

*/ private String transitGatewayId; /** *

* The ID of the core network where the transit gateway peer is located. *

*/ private String coreNetworkId; /** *

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

*/ private String ownerId; /** *

* The Region of the transit gateway. *

*/ private String region; /** *

* The ID of the transit gateway. *

* * @param transitGatewayId * The ID of the transit gateway. */ public void setTransitGatewayId(String transitGatewayId) { this.transitGatewayId = transitGatewayId; } /** *

* The ID of the transit gateway. *

* * @return The ID of the transit gateway. */ public String getTransitGatewayId() { return this.transitGatewayId; } /** *

* The ID of the transit gateway. *

* * @param transitGatewayId * The ID of the transit gateway. * @return Returns a reference to this object so that method calls can be chained together. */ public PeeringTgwInfo withTransitGatewayId(String transitGatewayId) { setTransitGatewayId(transitGatewayId); return this; } /** *

* The ID of the core network where the transit gateway peer is located. *

* * @param coreNetworkId * The ID of the core network where the transit gateway peer is located. */ public void setCoreNetworkId(String coreNetworkId) { this.coreNetworkId = coreNetworkId; } /** *

* The ID of the core network where the transit gateway peer is located. *

* * @return The ID of the core network where the transit gateway peer is located. */ public String getCoreNetworkId() { return this.coreNetworkId; } /** *

* The ID of the core network where the transit gateway peer is located. *

* * @param coreNetworkId * The ID of the core network where the transit gateway peer is located. * @return Returns a reference to this object so that method calls can be chained together. */ public PeeringTgwInfo withCoreNetworkId(String coreNetworkId) { setCoreNetworkId(coreNetworkId); return this; } /** *

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

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

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

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

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

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

* The Region of the transit gateway. *

* * @param region * The Region of the transit gateway. */ public void setRegion(String region) { this.region = region; } /** *

* The Region of the transit gateway. *

* * @return The Region of the transit gateway. */ public String getRegion() { return this.region; } /** *

* The Region of the transit gateway. *

* * @param region * The Region of the transit gateway. * @return Returns a reference to this object so that method calls can be chained together. */ public PeeringTgwInfo withRegion(String region) { setRegion(region); 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 (getTransitGatewayId() != null) sb.append("TransitGatewayId: ").append(getTransitGatewayId()).append(","); if (getCoreNetworkId() != null) sb.append("CoreNetworkId: ").append(getCoreNetworkId()).append(","); if (getOwnerId() != null) sb.append("OwnerId: ").append(getOwnerId()).append(","); if (getRegion() != null) sb.append("Region: ").append(getRegion()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof PeeringTgwInfo == false) return false; PeeringTgwInfo other = (PeeringTgwInfo) obj; if (other.getTransitGatewayId() == null ^ this.getTransitGatewayId() == null) return false; if (other.getTransitGatewayId() != null && other.getTransitGatewayId().equals(this.getTransitGatewayId()) == false) return false; if (other.getCoreNetworkId() == null ^ this.getCoreNetworkId() == null) return false; if (other.getCoreNetworkId() != null && other.getCoreNetworkId().equals(this.getCoreNetworkId()) == 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.getRegion() == null ^ this.getRegion() == null) return false; if (other.getRegion() != null && other.getRegion().equals(this.getRegion()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTransitGatewayId() == null) ? 0 : getTransitGatewayId().hashCode()); hashCode = prime * hashCode + ((getCoreNetworkId() == null) ? 0 : getCoreNetworkId().hashCode()); hashCode = prime * hashCode + ((getOwnerId() == null) ? 0 : getOwnerId().hashCode()); hashCode = prime * hashCode + ((getRegion() == null) ? 0 : getRegion().hashCode()); return hashCode; } @Override public PeeringTgwInfo clone() { try { return (PeeringTgwInfo) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy