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

com.pulumi.azurenative.network.IpAllocationArgs 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.azurenative.network;

import com.pulumi.azurenative.network.enums.IPVersion;
import com.pulumi.azurenative.network.enums.IpAllocationType;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.core.internal.Codegen;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Integer;
import java.lang.String;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final IpAllocationArgs Empty = new IpAllocationArgs();

    /**
     * IpAllocation tags.
     * 
     */
    @Import(name="allocationTags")
    private @Nullable Output> allocationTags;

    /**
     * @return IpAllocation tags.
     * 
     */
    public Optional>> allocationTags() {
        return Optional.ofNullable(this.allocationTags);
    }

    /**
     * Resource ID.
     * 
     */
    @Import(name="id")
    private @Nullable Output id;

    /**
     * @return Resource ID.
     * 
     */
    public Optional> id() {
        return Optional.ofNullable(this.id);
    }

    /**
     * The name of the IpAllocation.
     * 
     */
    @Import(name="ipAllocationName")
    private @Nullable Output ipAllocationName;

    /**
     * @return The name of the IpAllocation.
     * 
     */
    public Optional> ipAllocationName() {
        return Optional.ofNullable(this.ipAllocationName);
    }

    /**
     * The IPAM allocation ID.
     * 
     */
    @Import(name="ipamAllocationId")
    private @Nullable Output ipamAllocationId;

    /**
     * @return The IPAM allocation ID.
     * 
     */
    public Optional> ipamAllocationId() {
        return Optional.ofNullable(this.ipamAllocationId);
    }

    /**
     * Resource location.
     * 
     */
    @Import(name="location")
    private @Nullable Output location;

    /**
     * @return Resource location.
     * 
     */
    public Optional> location() {
        return Optional.ofNullable(this.location);
    }

    /**
     * The address prefix for the IpAllocation.
     * 
     */
    @Import(name="prefix")
    private @Nullable Output prefix;

    /**
     * @return The address prefix for the IpAllocation.
     * 
     */
    public Optional> prefix() {
        return Optional.ofNullable(this.prefix);
    }

    /**
     * The address prefix length for the IpAllocation.
     * 
     */
    @Import(name="prefixLength")
    private @Nullable Output prefixLength;

    /**
     * @return The address prefix length for the IpAllocation.
     * 
     */
    public Optional> prefixLength() {
        return Optional.ofNullable(this.prefixLength);
    }

    /**
     * The address prefix Type for the IpAllocation.
     * 
     */
    @Import(name="prefixType")
    private @Nullable Output> prefixType;

    /**
     * @return The address prefix Type for the IpAllocation.
     * 
     */
    public Optional>> prefixType() {
        return Optional.ofNullable(this.prefixType);
    }

    /**
     * The name of the resource group.
     * 
     */
    @Import(name="resourceGroupName", required=true)
    private Output resourceGroupName;

    /**
     * @return The name of the resource group.
     * 
     */
    public Output resourceGroupName() {
        return this.resourceGroupName;
    }

    /**
     * Resource tags.
     * 
     */
    @Import(name="tags")
    private @Nullable Output> tags;

    /**
     * @return Resource tags.
     * 
     */
    public Optional>> tags() {
        return Optional.ofNullable(this.tags);
    }

    /**
     * The type for the IpAllocation.
     * 
     */
    @Import(name="type")
    private @Nullable Output> type;

    /**
     * @return The type for the IpAllocation.
     * 
     */
    public Optional>> type() {
        return Optional.ofNullable(this.type);
    }

    private IpAllocationArgs() {}

    private IpAllocationArgs(IpAllocationArgs $) {
        this.allocationTags = $.allocationTags;
        this.id = $.id;
        this.ipAllocationName = $.ipAllocationName;
        this.ipamAllocationId = $.ipamAllocationId;
        this.location = $.location;
        this.prefix = $.prefix;
        this.prefixLength = $.prefixLength;
        this.prefixType = $.prefixType;
        this.resourceGroupName = $.resourceGroupName;
        this.tags = $.tags;
        this.type = $.type;
    }

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

    public static final class Builder {
        private IpAllocationArgs $;

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

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

        /**
         * @param allocationTags IpAllocation tags.
         * 
         * @return builder
         * 
         */
        public Builder allocationTags(@Nullable Output> allocationTags) {
            $.allocationTags = allocationTags;
            return this;
        }

        /**
         * @param allocationTags IpAllocation tags.
         * 
         * @return builder
         * 
         */
        public Builder allocationTags(Map allocationTags) {
            return allocationTags(Output.of(allocationTags));
        }

        /**
         * @param id Resource ID.
         * 
         * @return builder
         * 
         */
        public Builder id(@Nullable Output id) {
            $.id = id;
            return this;
        }

        /**
         * @param id Resource ID.
         * 
         * @return builder
         * 
         */
        public Builder id(String id) {
            return id(Output.of(id));
        }

        /**
         * @param ipAllocationName The name of the IpAllocation.
         * 
         * @return builder
         * 
         */
        public Builder ipAllocationName(@Nullable Output ipAllocationName) {
            $.ipAllocationName = ipAllocationName;
            return this;
        }

        /**
         * @param ipAllocationName The name of the IpAllocation.
         * 
         * @return builder
         * 
         */
        public Builder ipAllocationName(String ipAllocationName) {
            return ipAllocationName(Output.of(ipAllocationName));
        }

        /**
         * @param ipamAllocationId The IPAM allocation ID.
         * 
         * @return builder
         * 
         */
        public Builder ipamAllocationId(@Nullable Output ipamAllocationId) {
            $.ipamAllocationId = ipamAllocationId;
            return this;
        }

        /**
         * @param ipamAllocationId The IPAM allocation ID.
         * 
         * @return builder
         * 
         */
        public Builder ipamAllocationId(String ipamAllocationId) {
            return ipamAllocationId(Output.of(ipamAllocationId));
        }

        /**
         * @param location Resource location.
         * 
         * @return builder
         * 
         */
        public Builder location(@Nullable Output location) {
            $.location = location;
            return this;
        }

        /**
         * @param location Resource location.
         * 
         * @return builder
         * 
         */
        public Builder location(String location) {
            return location(Output.of(location));
        }

        /**
         * @param prefix The address prefix for the IpAllocation.
         * 
         * @return builder
         * 
         */
        public Builder prefix(@Nullable Output prefix) {
            $.prefix = prefix;
            return this;
        }

        /**
         * @param prefix The address prefix for the IpAllocation.
         * 
         * @return builder
         * 
         */
        public Builder prefix(String prefix) {
            return prefix(Output.of(prefix));
        }

        /**
         * @param prefixLength The address prefix length for the IpAllocation.
         * 
         * @return builder
         * 
         */
        public Builder prefixLength(@Nullable Output prefixLength) {
            $.prefixLength = prefixLength;
            return this;
        }

        /**
         * @param prefixLength The address prefix length for the IpAllocation.
         * 
         * @return builder
         * 
         */
        public Builder prefixLength(Integer prefixLength) {
            return prefixLength(Output.of(prefixLength));
        }

        /**
         * @param prefixType The address prefix Type for the IpAllocation.
         * 
         * @return builder
         * 
         */
        public Builder prefixType(@Nullable Output> prefixType) {
            $.prefixType = prefixType;
            return this;
        }

        /**
         * @param prefixType The address prefix Type for the IpAllocation.
         * 
         * @return builder
         * 
         */
        public Builder prefixType(Either prefixType) {
            return prefixType(Output.of(prefixType));
        }

        /**
         * @param prefixType The address prefix Type for the IpAllocation.
         * 
         * @return builder
         * 
         */
        public Builder prefixType(String prefixType) {
            return prefixType(Either.ofLeft(prefixType));
        }

        /**
         * @param prefixType The address prefix Type for the IpAllocation.
         * 
         * @return builder
         * 
         */
        public Builder prefixType(IPVersion prefixType) {
            return prefixType(Either.ofRight(prefixType));
        }

        /**
         * @param resourceGroupName The name of the resource group.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(Output resourceGroupName) {
            $.resourceGroupName = resourceGroupName;
            return this;
        }

        /**
         * @param resourceGroupName The name of the resource group.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(String resourceGroupName) {
            return resourceGroupName(Output.of(resourceGroupName));
        }

        /**
         * @param tags Resource tags.
         * 
         * @return builder
         * 
         */
        public Builder tags(@Nullable Output> tags) {
            $.tags = tags;
            return this;
        }

        /**
         * @param tags Resource tags.
         * 
         * @return builder
         * 
         */
        public Builder tags(Map tags) {
            return tags(Output.of(tags));
        }

        /**
         * @param type The type for the IpAllocation.
         * 
         * @return builder
         * 
         */
        public Builder type(@Nullable Output> type) {
            $.type = type;
            return this;
        }

        /**
         * @param type The type for the IpAllocation.
         * 
         * @return builder
         * 
         */
        public Builder type(Either type) {
            return type(Output.of(type));
        }

        /**
         * @param type The type for the IpAllocation.
         * 
         * @return builder
         * 
         */
        public Builder type(String type) {
            return type(Either.ofLeft(type));
        }

        /**
         * @param type The type for the IpAllocation.
         * 
         * @return builder
         * 
         */
        public Builder type(IpAllocationType type) {
            return type(Either.ofRight(type));
        }

        public IpAllocationArgs build() {
            $.prefixLength = Codegen.integerProp("prefixLength").output().arg($.prefixLength).def(0).getNullable();
            if ($.resourceGroupName == null) {
                throw new MissingRequiredPropertyException("IpAllocationArgs", "resourceGroupName");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy