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

com.equinix.pulumi.metal.PortVlanAttachmentArgs Maven / Gradle / Ivy

There is a newer version: 0.19.0
Show newest version
// *** 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.equinix.pulumi.metal;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final PortVlanAttachmentArgs Empty = new PortVlanAttachmentArgs();

    /**
     * ID of device to be assigned to the VLAN.
     * 
     */
    @Import(name="deviceId", required=true)
    private Output deviceId;

    /**
     * @return ID of device to be assigned to the VLAN.
     * 
     */
    public Output deviceId() {
        return this.deviceId;
    }

    /**
     * Add port back to the bond when this resource is removed. Default is `false`.
     * 
     */
    @Import(name="forceBond")
    private @Nullable Output forceBond;

    /**
     * @return Add port back to the bond when this resource is removed. Default is `false`.
     * 
     */
    public Optional> forceBond() {
        return Optional.ofNullable(this.forceBond);
    }

    /**
     * Mark this VLAN a native VLAN on the port. This can be used only if this assignment assigns second or further VLAN to the port. To ensure that this attachment is not first on a port, you can use `depends_on` pointing to another `equinix.metal.PortVlanAttachment`, just like in the layer2-individual example above.
     * 
     */
    @Import(name="native")
    private @Nullable Output native_;

    /**
     * @return Mark this VLAN a native VLAN on the port. This can be used only if this assignment assigns second or further VLAN to the port. To ensure that this attachment is not first on a port, you can use `depends_on` pointing to another `equinix.metal.PortVlanAttachment`, just like in the layer2-individual example above.
     * 
     */
    public Optional> native_() {
        return Optional.ofNullable(this.native_);
    }

    /**
     * Name of network port to be assigned to the VLAN.
     * 
     */
    @Import(name="portName", required=true)
    private Output portName;

    /**
     * @return Name of network port to be assigned to the VLAN.
     * 
     */
    public Output portName() {
        return this.portName;
    }

    /**
     * VXLAN Network Identifier.
     * 
     */
    @Import(name="vlanVnid", required=true)
    private Output vlanVnid;

    /**
     * @return VXLAN Network Identifier.
     * 
     */
    public Output vlanVnid() {
        return this.vlanVnid;
    }

    private PortVlanAttachmentArgs() {}

    private PortVlanAttachmentArgs(PortVlanAttachmentArgs $) {
        this.deviceId = $.deviceId;
        this.forceBond = $.forceBond;
        this.native_ = $.native_;
        this.portName = $.portName;
        this.vlanVnid = $.vlanVnid;
    }

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

    public static final class Builder {
        private PortVlanAttachmentArgs $;

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

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

        /**
         * @param deviceId ID of device to be assigned to the VLAN.
         * 
         * @return builder
         * 
         */
        public Builder deviceId(Output deviceId) {
            $.deviceId = deviceId;
            return this;
        }

        /**
         * @param deviceId ID of device to be assigned to the VLAN.
         * 
         * @return builder
         * 
         */
        public Builder deviceId(String deviceId) {
            return deviceId(Output.of(deviceId));
        }

        /**
         * @param forceBond Add port back to the bond when this resource is removed. Default is `false`.
         * 
         * @return builder
         * 
         */
        public Builder forceBond(@Nullable Output forceBond) {
            $.forceBond = forceBond;
            return this;
        }

        /**
         * @param forceBond Add port back to the bond when this resource is removed. Default is `false`.
         * 
         * @return builder
         * 
         */
        public Builder forceBond(Boolean forceBond) {
            return forceBond(Output.of(forceBond));
        }

        /**
         * @param native_ Mark this VLAN a native VLAN on the port. This can be used only if this assignment assigns second or further VLAN to the port. To ensure that this attachment is not first on a port, you can use `depends_on` pointing to another `equinix.metal.PortVlanAttachment`, just like in the layer2-individual example above.
         * 
         * @return builder
         * 
         */
        public Builder native_(@Nullable Output native_) {
            $.native_ = native_;
            return this;
        }

        /**
         * @param native_ Mark this VLAN a native VLAN on the port. This can be used only if this assignment assigns second or further VLAN to the port. To ensure that this attachment is not first on a port, you can use `depends_on` pointing to another `equinix.metal.PortVlanAttachment`, just like in the layer2-individual example above.
         * 
         * @return builder
         * 
         */
        public Builder native_(Boolean native_) {
            return native_(Output.of(native_));
        }

        /**
         * @param portName Name of network port to be assigned to the VLAN.
         * 
         * @return builder
         * 
         */
        public Builder portName(Output portName) {
            $.portName = portName;
            return this;
        }

        /**
         * @param portName Name of network port to be assigned to the VLAN.
         * 
         * @return builder
         * 
         */
        public Builder portName(String portName) {
            return portName(Output.of(portName));
        }

        /**
         * @param vlanVnid VXLAN Network Identifier.
         * 
         * @return builder
         * 
         */
        public Builder vlanVnid(Output vlanVnid) {
            $.vlanVnid = vlanVnid;
            return this;
        }

        /**
         * @param vlanVnid VXLAN Network Identifier.
         * 
         * @return builder
         * 
         */
        public Builder vlanVnid(Integer vlanVnid) {
            return vlanVnid(Output.of(vlanVnid));
        }

        public PortVlanAttachmentArgs build() {
            if ($.deviceId == null) {
                throw new MissingRequiredPropertyException("PortVlanAttachmentArgs", "deviceId");
            }
            if ($.portName == null) {
                throw new MissingRequiredPropertyException("PortVlanAttachmentArgs", "portName");
            }
            if ($.vlanVnid == null) {
                throw new MissingRequiredPropertyException("PortVlanAttachmentArgs", "vlanVnid");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy