/*
* 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.AllocateIpamPoolCidrRequestMarshaller;
/**
*
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AllocateIpamPoolCidrRequest extends AmazonWebServiceRequest implements Serializable, Cloneable,
DryRunSupportedRequest
* The ID of the IPAM pool from which you would like to allocate a CIDR.
*
* The CIDR you would like to allocate from the IPAM pool. Note the following:
*
* If there is no DefaultNetmaskLength allocation rule set on the pool, you must specify either the NetmaskLength or
* the CIDR.
*
* If the DefaultNetmaskLength allocation rule is set on the pool, you can specify either the NetmaskLength or the
* CIDR and the DefaultNetmaskLength allocation rule will be ignored.
*
* Possible values: Any available IPv4 or IPv6 CIDR.
*
* The netmask length of the CIDR you would like to allocate from the IPAM pool. Note the following:
*
* If there is no DefaultNetmaskLength allocation rule set on the pool, you must specify either the NetmaskLength or
* the CIDR.
*
* If the DefaultNetmaskLength allocation rule is set on the pool, you can specify either the NetmaskLength or the
* CIDR and the DefaultNetmaskLength allocation rule will be ignored.
*
* Possible netmask lengths for IPv4 addresses are 0 - 32. Possible netmask lengths for IPv6 addresses are 0 - 128.
*
* A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more
* information, see Ensuring
* Idempotency.
*
* A description for the allocation.
*
* A preview of the next available CIDR in a pool.
*
* Exclude a particular CIDR range from being returned by the pool. Disallowed CIDRs are only allowed if using
* netmask length for allocation.
*
* The ID of the IPAM pool from which you would like to allocate a CIDR.
*
* The ID of the IPAM pool from which you would like to allocate a CIDR.
*
* The ID of the IPAM pool from which you would like to allocate a CIDR.
*
* The CIDR you would like to allocate from the IPAM pool. Note the following:
*
* If there is no DefaultNetmaskLength allocation rule set on the pool, you must specify either the NetmaskLength or
* the CIDR.
*
* If the DefaultNetmaskLength allocation rule is set on the pool, you can specify either the NetmaskLength or the
* CIDR and the DefaultNetmaskLength allocation rule will be ignored.
*
* Possible values: Any available IPv4 or IPv6 CIDR.
*
*
*
*
*
*
*
* If there is no DefaultNetmaskLength allocation rule set on the pool, you must specify either the * NetmaskLength or the CIDR. *
** If the DefaultNetmaskLength allocation rule is set on the pool, you can specify either the NetmaskLength * or the CIDR and the DefaultNetmaskLength allocation rule will be ignored. *
** Possible values: Any available IPv4 or IPv6 CIDR. */ public void setCidr(String cidr) { this.cidr = cidr; } /** *
* The CIDR you would like to allocate from the IPAM pool. Note the following: *
** If there is no DefaultNetmaskLength allocation rule set on the pool, you must specify either the NetmaskLength or * the CIDR. *
** If the DefaultNetmaskLength allocation rule is set on the pool, you can specify either the NetmaskLength or the * CIDR and the DefaultNetmaskLength allocation rule will be ignored. *
** Possible values: Any available IPv4 or IPv6 CIDR. *
* * @return The CIDR you would like to allocate from the IPAM pool. Note the following: ** If there is no DefaultNetmaskLength allocation rule set on the pool, you must specify either the * NetmaskLength or the CIDR. *
** If the DefaultNetmaskLength allocation rule is set on the pool, you can specify either the NetmaskLength * or the CIDR and the DefaultNetmaskLength allocation rule will be ignored. *
** Possible values: Any available IPv4 or IPv6 CIDR. */ public String getCidr() { return this.cidr; } /** *
* The CIDR you would like to allocate from the IPAM pool. Note the following: *
** If there is no DefaultNetmaskLength allocation rule set on the pool, you must specify either the NetmaskLength or * the CIDR. *
** If the DefaultNetmaskLength allocation rule is set on the pool, you can specify either the NetmaskLength or the * CIDR and the DefaultNetmaskLength allocation rule will be ignored. *
** Possible values: Any available IPv4 or IPv6 CIDR. *
* * @param cidr * The CIDR you would like to allocate from the IPAM pool. Note the following: ** If there is no DefaultNetmaskLength allocation rule set on the pool, you must specify either the * NetmaskLength or the CIDR. *
** If the DefaultNetmaskLength allocation rule is set on the pool, you can specify either the NetmaskLength * or the CIDR and the DefaultNetmaskLength allocation rule will be ignored. *
** Possible values: Any available IPv4 or IPv6 CIDR. * @return Returns a reference to this object so that method calls can be chained together. */ public AllocateIpamPoolCidrRequest withCidr(String cidr) { setCidr(cidr); return this; } /** *
* The netmask length of the CIDR you would like to allocate from the IPAM pool. Note the following: *
** If there is no DefaultNetmaskLength allocation rule set on the pool, you must specify either the NetmaskLength or * the CIDR. *
** If the DefaultNetmaskLength allocation rule is set on the pool, you can specify either the NetmaskLength or the * CIDR and the DefaultNetmaskLength allocation rule will be ignored. *
** Possible netmask lengths for IPv4 addresses are 0 - 32. Possible netmask lengths for IPv6 addresses are 0 - 128. *
* * @param netmaskLength * The netmask length of the CIDR you would like to allocate from the IPAM pool. Note the following: ** If there is no DefaultNetmaskLength allocation rule set on the pool, you must specify either the * NetmaskLength or the CIDR. *
** If the DefaultNetmaskLength allocation rule is set on the pool, you can specify either the NetmaskLength * or the CIDR and the DefaultNetmaskLength allocation rule will be ignored. *
** Possible netmask lengths for IPv4 addresses are 0 - 32. Possible netmask lengths for IPv6 addresses are 0 * - 128. */ public void setNetmaskLength(Integer netmaskLength) { this.netmaskLength = netmaskLength; } /** *
* The netmask length of the CIDR you would like to allocate from the IPAM pool. Note the following: *
** If there is no DefaultNetmaskLength allocation rule set on the pool, you must specify either the NetmaskLength or * the CIDR. *
** If the DefaultNetmaskLength allocation rule is set on the pool, you can specify either the NetmaskLength or the * CIDR and the DefaultNetmaskLength allocation rule will be ignored. *
** Possible netmask lengths for IPv4 addresses are 0 - 32. Possible netmask lengths for IPv6 addresses are 0 - 128. *
* * @return The netmask length of the CIDR you would like to allocate from the IPAM pool. Note the following: ** If there is no DefaultNetmaskLength allocation rule set on the pool, you must specify either the * NetmaskLength or the CIDR. *
** If the DefaultNetmaskLength allocation rule is set on the pool, you can specify either the NetmaskLength * or the CIDR and the DefaultNetmaskLength allocation rule will be ignored. *
** Possible netmask lengths for IPv4 addresses are 0 - 32. Possible netmask lengths for IPv6 addresses are 0 * - 128. */ public Integer getNetmaskLength() { return this.netmaskLength; } /** *
* The netmask length of the CIDR you would like to allocate from the IPAM pool. Note the following: *
** If there is no DefaultNetmaskLength allocation rule set on the pool, you must specify either the NetmaskLength or * the CIDR. *
** If the DefaultNetmaskLength allocation rule is set on the pool, you can specify either the NetmaskLength or the * CIDR and the DefaultNetmaskLength allocation rule will be ignored. *
** Possible netmask lengths for IPv4 addresses are 0 - 32. Possible netmask lengths for IPv6 addresses are 0 - 128. *
* * @param netmaskLength * The netmask length of the CIDR you would like to allocate from the IPAM pool. Note the following: ** If there is no DefaultNetmaskLength allocation rule set on the pool, you must specify either the * NetmaskLength or the CIDR. *
** If the DefaultNetmaskLength allocation rule is set on the pool, you can specify either the NetmaskLength * or the CIDR and the DefaultNetmaskLength allocation rule will be ignored. *
** Possible netmask lengths for IPv4 addresses are 0 - 32. Possible netmask lengths for IPv6 addresses are 0 * - 128. * @return Returns a reference to this object so that method calls can be chained together. */ public AllocateIpamPoolCidrRequest withNetmaskLength(Integer netmaskLength) { setNetmaskLength(netmaskLength); return this; } /** *
* A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more * information, see Ensuring * Idempotency. *
* * @param clientToken * A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more * information, see Ensuring * Idempotency. */ public void setClientToken(String clientToken) { this.clientToken = clientToken; } /** ** A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more * information, see Ensuring * Idempotency. *
* * @return A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more * information, see Ensuring * Idempotency. */ public String getClientToken() { return this.clientToken; } /** ** A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more * information, see Ensuring * Idempotency. *
* * @param clientToken * A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more * information, see Ensuring * Idempotency. * @return Returns a reference to this object so that method calls can be chained together. */ public AllocateIpamPoolCidrRequest withClientToken(String clientToken) { setClientToken(clientToken); return this; } /** ** A description for the allocation. *
* * @param description * A description for the allocation. */ public void setDescription(String description) { this.description = description; } /** ** A description for the allocation. *
* * @return A description for the allocation. */ public String getDescription() { return this.description; } /** ** A description for the allocation. *
* * @param description * A description for the allocation. * @return Returns a reference to this object so that method calls can be chained together. */ public AllocateIpamPoolCidrRequest withDescription(String description) { setDescription(description); return this; } /** ** A preview of the next available CIDR in a pool. *
* * @param previewNextCidr * A preview of the next available CIDR in a pool. */ public void setPreviewNextCidr(Boolean previewNextCidr) { this.previewNextCidr = previewNextCidr; } /** ** A preview of the next available CIDR in a pool. *
* * @return A preview of the next available CIDR in a pool. */ public Boolean getPreviewNextCidr() { return this.previewNextCidr; } /** ** A preview of the next available CIDR in a pool. *
* * @param previewNextCidr * A preview of the next available CIDR in a pool. * @return Returns a reference to this object so that method calls can be chained together. */ public AllocateIpamPoolCidrRequest withPreviewNextCidr(Boolean previewNextCidr) { setPreviewNextCidr(previewNextCidr); return this; } /** ** A preview of the next available CIDR in a pool. *
* * @return A preview of the next available CIDR in a pool. */ public Boolean isPreviewNextCidr() { return this.previewNextCidr; } /** ** Exclude a particular CIDR range from being returned by the pool. Disallowed CIDRs are only allowed if using * netmask length for allocation. *
* * @return Exclude a particular CIDR range from being returned by the pool. Disallowed CIDRs are only allowed if * using netmask length for allocation. */ public java.util.List* Exclude a particular CIDR range from being returned by the pool. Disallowed CIDRs are only allowed if using * netmask length for allocation. *
* * @param disallowedCidrs * Exclude a particular CIDR range from being returned by the pool. Disallowed CIDRs are only allowed if * using netmask length for allocation. */ public void setDisallowedCidrs(java.util.Collection* Exclude a particular CIDR range from being returned by the pool. Disallowed CIDRs are only allowed if using * netmask length for allocation. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setDisallowedCidrs(java.util.Collection)} or {@link #withDisallowedCidrs(java.util.Collection)} if you * want to override the existing values. *
* * @param disallowedCidrs * Exclude a particular CIDR range from being returned by the pool. Disallowed CIDRs are only allowed if * using netmask length for allocation. * @return Returns a reference to this object so that method calls can be chained together. */ public AllocateIpamPoolCidrRequest withDisallowedCidrs(String... disallowedCidrs) { if (this.disallowedCidrs == null) { setDisallowedCidrs(new com.amazonaws.internal.SdkInternalList* Exclude a particular CIDR range from being returned by the pool. Disallowed CIDRs are only allowed if using * netmask length for allocation. *
* * @param disallowedCidrs * Exclude a particular CIDR range from being returned by the pool. Disallowed CIDRs are only allowed if * using netmask length for allocation. * @return Returns a reference to this object so that method calls can be chained together. */ public AllocateIpamPoolCidrRequest withDisallowedCidrs(java.util.Collection