/*
* 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;
import com.amazonaws.AmazonWebServiceRequest;
import com.amazonaws.Request;
import com.amazonaws.services.ec2.model.transform.CreateNatGatewayRequestMarshaller;
/**
*
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CreateNatGatewayRequest extends AmazonWebServiceRequest implements Serializable, Cloneable, DryRunSupportedRequest
* [Public NAT gateways only] The allocation ID of an Elastic IP address to associate with the NAT gateway. You
* cannot specify an Elastic IP address with a private NAT gateway. If the Elastic IP address is associated with
* another resource, you must first disassociate it.
*
* Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more
* information, see How to ensure
* idempotency.
*
* Constraint: Maximum 64 ASCII characters.
*
* The ID of the subnet in which to create the NAT gateway.
*
* The tags to assign to the NAT gateway.
*
* Indicates whether the NAT gateway supports public or private connectivity. The default is public connectivity.
*
* The private IPv4 address to assign to the NAT gateway. If you don't provide an address, a private IPv4 address
* will be automatically assigned.
*
* Secondary EIP allocation IDs. For more information, see Create a NAT
* gateway in the Amazon VPC User Guide.
*
* Secondary private IPv4 addresses. For more information about secondary addresses, see Create a NAT
* gateway in the Amazon VPC User Guide.
*
* [Private NAT gateway only] The number of secondary private IPv4 addresses you want to assign to the NAT gateway.
* For more information about secondary addresses, see Create a NAT
* gateway in the Amazon VPC User Guide.
*
* [Public NAT gateways only] The allocation ID of an Elastic IP address to associate with the NAT gateway. You
* cannot specify an Elastic IP address with a private NAT gateway. If the Elastic IP address is associated with
* another resource, you must first disassociate it.
*
* [Public NAT gateways only] The allocation ID of an Elastic IP address to associate with the NAT gateway. You
* cannot specify an Elastic IP address with a private NAT gateway. If the Elastic IP address is associated with
* another resource, you must first disassociate it.
*
* [Public NAT gateways only] The allocation ID of an Elastic IP address to associate with the NAT gateway. You
* cannot specify an Elastic IP address with a private NAT gateway. If the Elastic IP address is associated with
* another resource, you must first disassociate it.
*
* Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more
* information, see How to ensure
* idempotency.
*
* Constraint: Maximum 64 ASCII characters.
*
* Constraint: Maximum 64 ASCII characters. */ public void setClientToken(String clientToken) { this.clientToken = clientToken; } /** *
* Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more * information, see How to ensure * idempotency. *
** Constraint: Maximum 64 ASCII characters. *
* * @return Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more * information, see How to ensure * idempotency. ** Constraint: Maximum 64 ASCII characters. */ public String getClientToken() { return this.clientToken; } /** *
* Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more * information, see How to ensure * idempotency. *
** Constraint: Maximum 64 ASCII characters. *
* * @param clientToken * Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more * information, see How to ensure * idempotency. ** Constraint: Maximum 64 ASCII characters. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateNatGatewayRequest withClientToken(String clientToken) { setClientToken(clientToken); return this; } /** *
* The ID of the subnet in which to create the NAT gateway. *
* * @param subnetId * The ID of the subnet in which to create the NAT gateway. */ public void setSubnetId(String subnetId) { this.subnetId = subnetId; } /** ** The ID of the subnet in which to create the NAT gateway. *
* * @return The ID of the subnet in which to create the NAT gateway. */ public String getSubnetId() { return this.subnetId; } /** ** The ID of the subnet in which to create the NAT gateway. *
* * @param subnetId * The ID of the subnet in which to create the NAT gateway. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateNatGatewayRequest withSubnetId(String subnetId) { setSubnetId(subnetId); return this; } /** ** The tags to assign to the NAT gateway. *
* * @return The tags to assign to the NAT gateway. */ public java.util.List* The tags to assign to the NAT gateway. *
* * @param tagSpecifications * The tags to assign to the NAT gateway. */ public void setTagSpecifications(java.util.Collection* The tags to assign to the NAT gateway. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setTagSpecifications(java.util.Collection)} or {@link #withTagSpecifications(java.util.Collection)} if * you want to override the existing values. *
* * @param tagSpecifications * The tags to assign to the NAT gateway. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateNatGatewayRequest withTagSpecifications(TagSpecification... tagSpecifications) { if (this.tagSpecifications == null) { setTagSpecifications(new com.amazonaws.internal.SdkInternalList* The tags to assign to the NAT gateway. *
* * @param tagSpecifications * The tags to assign to the NAT gateway. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateNatGatewayRequest withTagSpecifications(java.util.Collection* Indicates whether the NAT gateway supports public or private connectivity. The default is public connectivity. *
* * @param connectivityType * Indicates whether the NAT gateway supports public or private connectivity. The default is public * connectivity. * @see ConnectivityType */ public void setConnectivityType(String connectivityType) { this.connectivityType = connectivityType; } /** ** Indicates whether the NAT gateway supports public or private connectivity. The default is public connectivity. *
* * @return Indicates whether the NAT gateway supports public or private connectivity. The default is public * connectivity. * @see ConnectivityType */ public String getConnectivityType() { return this.connectivityType; } /** ** Indicates whether the NAT gateway supports public or private connectivity. The default is public connectivity. *
* * @param connectivityType * Indicates whether the NAT gateway supports public or private connectivity. The default is public * connectivity. * @return Returns a reference to this object so that method calls can be chained together. * @see ConnectivityType */ public CreateNatGatewayRequest withConnectivityType(String connectivityType) { setConnectivityType(connectivityType); return this; } /** ** Indicates whether the NAT gateway supports public or private connectivity. The default is public connectivity. *
* * @param connectivityType * Indicates whether the NAT gateway supports public or private connectivity. The default is public * connectivity. * @return Returns a reference to this object so that method calls can be chained together. * @see ConnectivityType */ public CreateNatGatewayRequest withConnectivityType(ConnectivityType connectivityType) { this.connectivityType = connectivityType.toString(); return this; } /** ** The private IPv4 address to assign to the NAT gateway. If you don't provide an address, a private IPv4 address * will be automatically assigned. *
* * @param privateIpAddress * The private IPv4 address to assign to the NAT gateway. If you don't provide an address, a private IPv4 * address will be automatically assigned. */ public void setPrivateIpAddress(String privateIpAddress) { this.privateIpAddress = privateIpAddress; } /** ** The private IPv4 address to assign to the NAT gateway. If you don't provide an address, a private IPv4 address * will be automatically assigned. *
* * @return The private IPv4 address to assign to the NAT gateway. If you don't provide an address, a private IPv4 * address will be automatically assigned. */ public String getPrivateIpAddress() { return this.privateIpAddress; } /** ** The private IPv4 address to assign to the NAT gateway. If you don't provide an address, a private IPv4 address * will be automatically assigned. *
* * @param privateIpAddress * The private IPv4 address to assign to the NAT gateway. If you don't provide an address, a private IPv4 * address will be automatically assigned. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateNatGatewayRequest withPrivateIpAddress(String privateIpAddress) { setPrivateIpAddress(privateIpAddress); return this; } /** ** Secondary EIP allocation IDs. For more information, see Create a NAT * gateway in the Amazon VPC User Guide. *
* * @return Secondary EIP allocation IDs. For more information, see Create * a NAT gateway in the Amazon VPC User Guide. */ public java.util.List* Secondary EIP allocation IDs. For more information, see Create a NAT * gateway in the Amazon VPC User Guide. *
* * @param secondaryAllocationIds * Secondary EIP allocation IDs. For more information, see Create a * NAT gateway in the Amazon VPC User Guide. */ public void setSecondaryAllocationIds(java.util.Collection* Secondary EIP allocation IDs. For more information, see Create a NAT * gateway in the Amazon VPC User Guide. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setSecondaryAllocationIds(java.util.Collection)} or * {@link #withSecondaryAllocationIds(java.util.Collection)} if you want to override the existing values. *
* * @param secondaryAllocationIds * Secondary EIP allocation IDs. For more information, see Create a * NAT gateway in the Amazon VPC User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateNatGatewayRequest withSecondaryAllocationIds(String... secondaryAllocationIds) { if (this.secondaryAllocationIds == null) { setSecondaryAllocationIds(new com.amazonaws.internal.SdkInternalList* Secondary EIP allocation IDs. For more information, see Create a NAT * gateway in the Amazon VPC User Guide. *
* * @param secondaryAllocationIds * Secondary EIP allocation IDs. For more information, see Create a * NAT gateway in the Amazon VPC User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateNatGatewayRequest withSecondaryAllocationIds(java.util.Collection* Secondary private IPv4 addresses. For more information about secondary addresses, see Create a NAT * gateway in the Amazon VPC User Guide. *
* * @return Secondary private IPv4 addresses. For more information about secondary addresses, see Create * a NAT gateway in the Amazon VPC User Guide. */ public java.util.List* Secondary private IPv4 addresses. For more information about secondary addresses, see Create a NAT * gateway in the Amazon VPC User Guide. *
* * @param secondaryPrivateIpAddresses * Secondary private IPv4 addresses. For more information about secondary addresses, see Create a * NAT gateway in the Amazon VPC User Guide. */ public void setSecondaryPrivateIpAddresses(java.util.Collection* Secondary private IPv4 addresses. For more information about secondary addresses, see Create a NAT * gateway in the Amazon VPC User Guide. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setSecondaryPrivateIpAddresses(java.util.Collection)} or * {@link #withSecondaryPrivateIpAddresses(java.util.Collection)} if you want to override the existing values. *
* * @param secondaryPrivateIpAddresses * Secondary private IPv4 addresses. For more information about secondary addresses, see Create a * NAT gateway in the Amazon VPC User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateNatGatewayRequest withSecondaryPrivateIpAddresses(String... secondaryPrivateIpAddresses) { if (this.secondaryPrivateIpAddresses == null) { setSecondaryPrivateIpAddresses(new com.amazonaws.internal.SdkInternalList* Secondary private IPv4 addresses. For more information about secondary addresses, see Create a NAT * gateway in the Amazon VPC User Guide. *
* * @param secondaryPrivateIpAddresses * Secondary private IPv4 addresses. For more information about secondary addresses, see Create a * NAT gateway in the Amazon VPC User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateNatGatewayRequest withSecondaryPrivateIpAddresses(java.util.Collection* [Private NAT gateway only] The number of secondary private IPv4 addresses you want to assign to the NAT gateway. * For more information about secondary addresses, see Create a NAT * gateway in the Amazon VPC User Guide. *
* * @param secondaryPrivateIpAddressCount * [Private NAT gateway only] The number of secondary private IPv4 addresses you want to assign to the NAT * gateway. For more information about secondary addresses, see Create a * NAT gateway in the Amazon VPC User Guide. */ public void setSecondaryPrivateIpAddressCount(Integer secondaryPrivateIpAddressCount) { this.secondaryPrivateIpAddressCount = secondaryPrivateIpAddressCount; } /** ** [Private NAT gateway only] The number of secondary private IPv4 addresses you want to assign to the NAT gateway. * For more information about secondary addresses, see Create a NAT * gateway in the Amazon VPC User Guide. *
* * @return [Private NAT gateway only] The number of secondary private IPv4 addresses you want to assign to the NAT * gateway. For more information about secondary addresses, see Create * a NAT gateway in the Amazon VPC User Guide. */ public Integer getSecondaryPrivateIpAddressCount() { return this.secondaryPrivateIpAddressCount; } /** ** [Private NAT gateway only] The number of secondary private IPv4 addresses you want to assign to the NAT gateway. * For more information about secondary addresses, see Create a NAT * gateway in the Amazon VPC User Guide. *
* * @param secondaryPrivateIpAddressCount * [Private NAT gateway only] The number of secondary private IPv4 addresses you want to assign to the NAT * gateway. For more information about secondary addresses, see Create a * NAT gateway in the Amazon VPC User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateNatGatewayRequest withSecondaryPrivateIpAddressCount(Integer secondaryPrivateIpAddressCount) { setSecondaryPrivateIpAddressCount(secondaryPrivateIpAddressCount); return this; } /** * This method is intended for internal use only. Returns the marshaled request configured with additional * parameters to enable operation dry-run. */ @Override public Request