/* * 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.ec2.model; import java.io.Serializable; import javax.annotation.Generated; /** *
* Describes a carrier gateway. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CarrierGateway implements Serializable, Cloneable { /** ** The ID of the carrier gateway. *
*/ private String carrierGatewayId; /** ** The ID of the VPC associated with the carrier gateway. *
*/ private String vpcId; /** ** The state of the carrier gateway. *
*/ private String state; /** ** The Amazon Web Services account ID of the owner of the carrier gateway. *
*/ private String ownerId; /** ** The tags assigned to the carrier gateway. *
*/ private com.amazonaws.internal.SdkInternalList* The ID of the carrier gateway. *
* * @param carrierGatewayId * The ID of the carrier gateway. */ public void setCarrierGatewayId(String carrierGatewayId) { this.carrierGatewayId = carrierGatewayId; } /** ** The ID of the carrier gateway. *
* * @return The ID of the carrier gateway. */ public String getCarrierGatewayId() { return this.carrierGatewayId; } /** ** The ID of the carrier gateway. *
* * @param carrierGatewayId * The ID of the carrier gateway. * @return Returns a reference to this object so that method calls can be chained together. */ public CarrierGateway withCarrierGatewayId(String carrierGatewayId) { setCarrierGatewayId(carrierGatewayId); return this; } /** ** The ID of the VPC associated with the carrier gateway. *
* * @param vpcId * The ID of the VPC associated with the carrier gateway. */ public void setVpcId(String vpcId) { this.vpcId = vpcId; } /** ** The ID of the VPC associated with the carrier gateway. *
* * @return The ID of the VPC associated with the carrier gateway. */ public String getVpcId() { return this.vpcId; } /** ** The ID of the VPC associated with the carrier gateway. *
* * @param vpcId * The ID of the VPC associated with the carrier gateway. * @return Returns a reference to this object so that method calls can be chained together. */ public CarrierGateway withVpcId(String vpcId) { setVpcId(vpcId); return this; } /** ** The state of the carrier gateway. *
* * @param state * The state of the carrier gateway. * @see CarrierGatewayState */ public void setState(String state) { this.state = state; } /** ** The state of the carrier gateway. *
* * @return The state of the carrier gateway. * @see CarrierGatewayState */ public String getState() { return this.state; } /** ** The state of the carrier gateway. *
* * @param state * The state of the carrier gateway. * @return Returns a reference to this object so that method calls can be chained together. * @see CarrierGatewayState */ public CarrierGateway withState(String state) { setState(state); return this; } /** ** The state of the carrier gateway. *
* * @param state * The state of the carrier gateway. * @return Returns a reference to this object so that method calls can be chained together. * @see CarrierGatewayState */ public CarrierGateway withState(CarrierGatewayState state) { this.state = state.toString(); return this; } /** ** The Amazon Web Services account ID of the owner of the carrier gateway. *
* * @param ownerId * The Amazon Web Services account ID of the owner of the carrier gateway. */ public void setOwnerId(String ownerId) { this.ownerId = ownerId; } /** ** The Amazon Web Services account ID of the owner of the carrier gateway. *
* * @return The Amazon Web Services account ID of the owner of the carrier gateway. */ public String getOwnerId() { return this.ownerId; } /** ** The Amazon Web Services account ID of the owner of the carrier gateway. *
* * @param ownerId * The Amazon Web Services account ID of the owner of the carrier gateway. * @return Returns a reference to this object so that method calls can be chained together. */ public CarrierGateway withOwnerId(String ownerId) { setOwnerId(ownerId); return this; } /** ** The tags assigned to the carrier gateway. *
* * @return The tags assigned to the carrier gateway. */ public java.util.List* The tags assigned to the carrier gateway. *
* * @param tags * The tags assigned to the carrier gateway. */ public void setTags(java.util.Collection* The tags assigned to the carrier gateway. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the * existing values. *
* * @param tags * The tags assigned to the carrier gateway. * @return Returns a reference to this object so that method calls can be chained together. */ public CarrierGateway withTags(Tag... tags) { if (this.tags == null) { setTags(new com.amazonaws.internal.SdkInternalList* The tags assigned to the carrier gateway. *
* * @param tags * The tags assigned to the carrier gateway. * @return Returns a reference to this object so that method calls can be chained together. */ public CarrierGateway withTags(java.util.Collection