/* * 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 an internet gateway. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class InternetGateway implements Serializable, Cloneable { /** ** Any VPCs attached to the internet gateway. *
*/ private com.amazonaws.internal.SdkInternalList* The ID of the internet gateway. *
*/ private String internetGatewayId; /** ** The ID of the Amazon Web Services account that owns the internet gateway. *
*/ private String ownerId; /** ** Any tags assigned to the internet gateway. *
*/ private com.amazonaws.internal.SdkInternalList* Any VPCs attached to the internet gateway. *
* * @return Any VPCs attached to the internet gateway. */ public java.util.List* Any VPCs attached to the internet gateway. *
* * @param attachments * Any VPCs attached to the internet gateway. */ public void setAttachments(java.util.Collection* Any VPCs attached to the internet gateway. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setAttachments(java.util.Collection)} or {@link #withAttachments(java.util.Collection)} if you want to * override the existing values. *
* * @param attachments * Any VPCs attached to the internet gateway. * @return Returns a reference to this object so that method calls can be chained together. */ public InternetGateway withAttachments(InternetGatewayAttachment... attachments) { if (this.attachments == null) { setAttachments(new com.amazonaws.internal.SdkInternalList* Any VPCs attached to the internet gateway. *
* * @param attachments * Any VPCs attached to the internet gateway. * @return Returns a reference to this object so that method calls can be chained together. */ public InternetGateway withAttachments(java.util.Collection* The ID of the internet gateway. *
* * @param internetGatewayId * The ID of the internet gateway. */ public void setInternetGatewayId(String internetGatewayId) { this.internetGatewayId = internetGatewayId; } /** ** The ID of the internet gateway. *
* * @return The ID of the internet gateway. */ public String getInternetGatewayId() { return this.internetGatewayId; } /** ** The ID of the internet gateway. *
* * @param internetGatewayId * The ID of the internet gateway. * @return Returns a reference to this object so that method calls can be chained together. */ public InternetGateway withInternetGatewayId(String internetGatewayId) { setInternetGatewayId(internetGatewayId); return this; } /** ** The ID of the Amazon Web Services account that owns the internet gateway. *
* * @param ownerId * The ID of the Amazon Web Services account that owns the internet gateway. */ public void setOwnerId(String ownerId) { this.ownerId = ownerId; } /** ** The ID of the Amazon Web Services account that owns the internet gateway. *
* * @return The ID of the Amazon Web Services account that owns the internet gateway. */ public String getOwnerId() { return this.ownerId; } /** ** The ID of the Amazon Web Services account that owns the internet gateway. *
* * @param ownerId * The ID of the Amazon Web Services account that owns the internet gateway. * @return Returns a reference to this object so that method calls can be chained together. */ public InternetGateway withOwnerId(String ownerId) { setOwnerId(ownerId); return this; } /** ** Any tags assigned to the internet gateway. *
* * @return Any tags assigned to the internet gateway. */ public java.util.List* Any tags assigned to the internet gateway. *
* * @param tags * Any tags assigned to the internet gateway. */ public void setTags(java.util.Collection* Any tags assigned to the internet 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 * Any tags assigned to the internet gateway. * @return Returns a reference to this object so that method calls can be chained together. */ public InternetGateway withTags(Tag... tags) { if (this.tags == null) { setTags(new com.amazonaws.internal.SdkInternalList* Any tags assigned to the internet gateway. *
* * @param tags * Any tags assigned to the internet gateway. * @return Returns a reference to this object so that method calls can be chained together. */ public InternetGateway withTags(java.util.Collection