All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.aws.ec2.SubnetCidrReservationArgs Maven / Gradle / Ivy

// *** 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.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final SubnetCidrReservationArgs Empty = new SubnetCidrReservationArgs();

    /**
     * The CIDR block for the reservation.
     * 
     */
    @Import(name="cidrBlock", required=true)
    private Output cidrBlock;

    /**
     * @return The CIDR block for the reservation.
     * 
     */
    public Output cidrBlock() {
        return this.cidrBlock;
    }

    /**
     * A brief description of the reservation.
     * 
     */
    @Import(name="description")
    private @Nullable Output description;

    /**
     * @return A brief description of the reservation.
     * 
     */
    public Optional> description() {
        return Optional.ofNullable(this.description);
    }

    /**
     * The type of reservation to create. Valid values: `explicit`, `prefix`
     * 
     */
    @Import(name="reservationType", required=true)
    private Output reservationType;

    /**
     * @return The type of reservation to create. Valid values: `explicit`, `prefix`
     * 
     */
    public Output reservationType() {
        return this.reservationType;
    }

    /**
     * The ID of the subnet to create the reservation for.
     * 
     */
    @Import(name="subnetId", required=true)
    private Output subnetId;

    /**
     * @return The ID of the subnet to create the reservation for.
     * 
     */
    public Output subnetId() {
        return this.subnetId;
    }

    private SubnetCidrReservationArgs() {}

    private SubnetCidrReservationArgs(SubnetCidrReservationArgs $) {
        this.cidrBlock = $.cidrBlock;
        this.description = $.description;
        this.reservationType = $.reservationType;
        this.subnetId = $.subnetId;
    }

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

    public static final class Builder {
        private SubnetCidrReservationArgs $;

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

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

        /**
         * @param cidrBlock The CIDR block for the reservation.
         * 
         * @return builder
         * 
         */
        public Builder cidrBlock(Output cidrBlock) {
            $.cidrBlock = cidrBlock;
            return this;
        }

        /**
         * @param cidrBlock The CIDR block for the reservation.
         * 
         * @return builder
         * 
         */
        public Builder cidrBlock(String cidrBlock) {
            return cidrBlock(Output.of(cidrBlock));
        }

        /**
         * @param description A brief description of the reservation.
         * 
         * @return builder
         * 
         */
        public Builder description(@Nullable Output description) {
            $.description = description;
            return this;
        }

        /**
         * @param description A brief description of the reservation.
         * 
         * @return builder
         * 
         */
        public Builder description(String description) {
            return description(Output.of(description));
        }

        /**
         * @param reservationType The type of reservation to create. Valid values: `explicit`, `prefix`
         * 
         * @return builder
         * 
         */
        public Builder reservationType(Output reservationType) {
            $.reservationType = reservationType;
            return this;
        }

        /**
         * @param reservationType The type of reservation to create. Valid values: `explicit`, `prefix`
         * 
         * @return builder
         * 
         */
        public Builder reservationType(String reservationType) {
            return reservationType(Output.of(reservationType));
        }

        /**
         * @param subnetId The ID of the subnet to create the reservation for.
         * 
         * @return builder
         * 
         */
        public Builder subnetId(Output subnetId) {
            $.subnetId = subnetId;
            return this;
        }

        /**
         * @param subnetId The ID of the subnet to create the reservation for.
         * 
         * @return builder
         * 
         */
        public Builder subnetId(String subnetId) {
            return subnetId(Output.of(subnetId));
        }

        public SubnetCidrReservationArgs build() {
            if ($.cidrBlock == null) {
                throw new MissingRequiredPropertyException("SubnetCidrReservationArgs", "cidrBlock");
            }
            if ($.reservationType == null) {
                throw new MissingRequiredPropertyException("SubnetCidrReservationArgs", "reservationType");
            }
            if ($.subnetId == null) {
                throw new MissingRequiredPropertyException("SubnetCidrReservationArgs", "subnetId");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy