// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.aws.ec2;

import com.pulumi.aws.ec2.inputs.VpcIpamPoolCidrCidrAuthorizationContextArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class VpcIpamPoolCidrArgs extends com.pulumi.resources.ResourceArgs {

    public static final VpcIpamPoolCidrArgs Empty = new VpcIpamPoolCidrArgs();

    /**
     * The CIDR you want to assign to the pool. Conflicts with `netmask_length`.
     * 
     */
    @Import(name="cidr")
    private @Nullable Output<String> cidr;

    /**
     * @return The CIDR you want to assign to the pool. Conflicts with `netmask_length`.
     * 
     */
    public Optional<Output<String>> cidr() {
        return Optional.ofNullable(this.cidr);
    }

    /**
     * A signed document that proves that you are authorized to bring the specified IP address range to Amazon using BYOIP. This is not stored in the state file. See cidr_authorization_context for more information.
     * 
     */
    @Import(name="cidrAuthorizationContext")
    private @Nullable Output<VpcIpamPoolCidrCidrAuthorizationContextArgs> cidrAuthorizationContext;

    /**
     * @return A signed document that proves that you are authorized to bring the specified IP address range to Amazon using BYOIP. This is not stored in the state file. See cidr_authorization_context for more information.
     * 
     */
    public Optional<Output<VpcIpamPoolCidrCidrAuthorizationContextArgs>> cidrAuthorizationContext() {
        return Optional.ofNullable(this.cidrAuthorizationContext);
    }

    /**
     * The ID of the pool to which you want to assign a CIDR.
     * 
     */
    @Import(name="ipamPoolId", required=true)
    private Output<String> ipamPoolId;

    /**
     * @return The ID of the pool to which you want to assign a CIDR.
     * 
     */
    public Output<String> ipamPoolId() {
        return this.ipamPoolId;
    }

    /**
     * If provided, the cidr provisioned into the specified pool will be the next available cidr given this declared netmask length. Conflicts with `cidr`.
     * 
     */
    @Import(name="netmaskLength")
    private @Nullable Output<Integer> netmaskLength;

    /**
     * @return If provided, the cidr provisioned into the specified pool will be the next available cidr given this declared netmask length. Conflicts with `cidr`.
     * 
     */
    public Optional<Output<Integer>> netmaskLength() {
        return Optional.ofNullable(this.netmaskLength);
    }

    private VpcIpamPoolCidrArgs() {}

    private VpcIpamPoolCidrArgs(VpcIpamPoolCidrArgs $) {
        this.cidr = $.cidr;
        this.cidrAuthorizationContext = $.cidrAuthorizationContext;
        this.ipamPoolId = $.ipamPoolId;
        this.netmaskLength = $.netmaskLength;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(VpcIpamPoolCidrArgs defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private VpcIpamPoolCidrArgs $;

        public Builder() {
            $ = new VpcIpamPoolCidrArgs();
        }

        public Builder(VpcIpamPoolCidrArgs defaults) {
            $ = new VpcIpamPoolCidrArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param cidr The CIDR you want to assign to the pool. Conflicts with `netmask_length`.
         * 
         * @return builder
         * 
         */
        public Builder cidr(@Nullable Output<String> cidr) {
            $.cidr = cidr;
            return this;
        }

        /**
         * @param cidr The CIDR you want to assign to the pool. Conflicts with `netmask_length`.
         * 
         * @return builder
         * 
         */
        public Builder cidr(String cidr) {
            return cidr(Output.of(cidr));
        }

        /**
         * @param cidrAuthorizationContext A signed document that proves that you are authorized to bring the specified IP address range to Amazon using BYOIP. This is not stored in the state file. See cidr_authorization_context for more information.
         * 
         * @return builder
         * 
         */
        public Builder cidrAuthorizationContext(@Nullable Output<VpcIpamPoolCidrCidrAuthorizationContextArgs> cidrAuthorizationContext) {
            $.cidrAuthorizationContext = cidrAuthorizationContext;
            return this;
        }

        /**
         * @param cidrAuthorizationContext A signed document that proves that you are authorized to bring the specified IP address range to Amazon using BYOIP. This is not stored in the state file. See cidr_authorization_context for more information.
         * 
         * @return builder
         * 
         */
        public Builder cidrAuthorizationContext(VpcIpamPoolCidrCidrAuthorizationContextArgs cidrAuthorizationContext) {
            return cidrAuthorizationContext(Output.of(cidrAuthorizationContext));
        }

        /**
         * @param ipamPoolId The ID of the pool to which you want to assign a CIDR.
         * 
         * @return builder
         * 
         */
        public Builder ipamPoolId(Output<String> ipamPoolId) {
            $.ipamPoolId = ipamPoolId;
            return this;
        }

        /**
         * @param ipamPoolId The ID of the pool to which you want to assign a CIDR.
         * 
         * @return builder
         * 
         */
        public Builder ipamPoolId(String ipamPoolId) {
            return ipamPoolId(Output.of(ipamPoolId));
        }

        /**
         * @param netmaskLength If provided, the cidr provisioned into the specified pool will be the next available cidr given this declared netmask length. Conflicts with `cidr`.
         * 
         * @return builder
         * 
         */
        public Builder netmaskLength(@Nullable Output<Integer> netmaskLength) {
            $.netmaskLength = netmaskLength;
            return this;
        }

        /**
         * @param netmaskLength If provided, the cidr provisioned into the specified pool will be the next available cidr given this declared netmask length. Conflicts with `cidr`.
         * 
         * @return builder
         * 
         */
        public Builder netmaskLength(Integer netmaskLength) {
            return netmaskLength(Output.of(netmaskLength));
        }

        public VpcIpamPoolCidrArgs build() {
            $.ipamPoolId = Objects.requireNonNull($.ipamPoolId, "expected parameter 'ipamPoolId' to be non-null");
            return $;
        }
    }

}
