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

com.pulumi.azurenative.managednetworkfabric.inputs.PortConditionArgs Maven / Gradle / Ivy

There is a newer version: 2.72.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.pulumi.azurenative.managednetworkfabric.inputs;

import com.pulumi.azurenative.managednetworkfabric.enums.Layer4Protocol;
import com.pulumi.azurenative.managednetworkfabric.enums.PortType;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * Port condition that needs to be matched.
 * 
 */
public final class PortConditionArgs extends com.pulumi.resources.ResourceArgs {

    public static final PortConditionArgs Empty = new PortConditionArgs();

    /**
     * Layer4 protocol type that needs to be matched.
     * 
     */
    @Import(name="layer4Protocol", required=true)
    private Output> layer4Protocol;

    /**
     * @return Layer4 protocol type that needs to be matched.
     * 
     */
    public Output> layer4Protocol() {
        return this.layer4Protocol;
    }

    /**
     * List of the port Group Names that need to be matched.
     * 
     */
    @Import(name="portGroupNames")
    private @Nullable Output> portGroupNames;

    /**
     * @return List of the port Group Names that need to be matched.
     * 
     */
    public Optional>> portGroupNames() {
        return Optional.ofNullable(this.portGroupNames);
    }

    /**
     * Port type that needs to be matched.
     * 
     */
    @Import(name="portType")
    private @Nullable Output> portType;

    /**
     * @return Port type that needs to be matched.
     * 
     */
    public Optional>> portType() {
        return Optional.ofNullable(this.portType);
    }

    /**
     * List of the Ports that need to be matched.
     * 
     */
    @Import(name="ports")
    private @Nullable Output> ports;

    /**
     * @return List of the Ports that need to be matched.
     * 
     */
    public Optional>> ports() {
        return Optional.ofNullable(this.ports);
    }

    private PortConditionArgs() {}

    private PortConditionArgs(PortConditionArgs $) {
        this.layer4Protocol = $.layer4Protocol;
        this.portGroupNames = $.portGroupNames;
        this.portType = $.portType;
        this.ports = $.ports;
    }

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

    public static final class Builder {
        private PortConditionArgs $;

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

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

        /**
         * @param layer4Protocol Layer4 protocol type that needs to be matched.
         * 
         * @return builder
         * 
         */
        public Builder layer4Protocol(Output> layer4Protocol) {
            $.layer4Protocol = layer4Protocol;
            return this;
        }

        /**
         * @param layer4Protocol Layer4 protocol type that needs to be matched.
         * 
         * @return builder
         * 
         */
        public Builder layer4Protocol(Either layer4Protocol) {
            return layer4Protocol(Output.of(layer4Protocol));
        }

        /**
         * @param layer4Protocol Layer4 protocol type that needs to be matched.
         * 
         * @return builder
         * 
         */
        public Builder layer4Protocol(String layer4Protocol) {
            return layer4Protocol(Either.ofLeft(layer4Protocol));
        }

        /**
         * @param layer4Protocol Layer4 protocol type that needs to be matched.
         * 
         * @return builder
         * 
         */
        public Builder layer4Protocol(Layer4Protocol layer4Protocol) {
            return layer4Protocol(Either.ofRight(layer4Protocol));
        }

        /**
         * @param portGroupNames List of the port Group Names that need to be matched.
         * 
         * @return builder
         * 
         */
        public Builder portGroupNames(@Nullable Output> portGroupNames) {
            $.portGroupNames = portGroupNames;
            return this;
        }

        /**
         * @param portGroupNames List of the port Group Names that need to be matched.
         * 
         * @return builder
         * 
         */
        public Builder portGroupNames(List portGroupNames) {
            return portGroupNames(Output.of(portGroupNames));
        }

        /**
         * @param portGroupNames List of the port Group Names that need to be matched.
         * 
         * @return builder
         * 
         */
        public Builder portGroupNames(String... portGroupNames) {
            return portGroupNames(List.of(portGroupNames));
        }

        /**
         * @param portType Port type that needs to be matched.
         * 
         * @return builder
         * 
         */
        public Builder portType(@Nullable Output> portType) {
            $.portType = portType;
            return this;
        }

        /**
         * @param portType Port type that needs to be matched.
         * 
         * @return builder
         * 
         */
        public Builder portType(Either portType) {
            return portType(Output.of(portType));
        }

        /**
         * @param portType Port type that needs to be matched.
         * 
         * @return builder
         * 
         */
        public Builder portType(String portType) {
            return portType(Either.ofLeft(portType));
        }

        /**
         * @param portType Port type that needs to be matched.
         * 
         * @return builder
         * 
         */
        public Builder portType(PortType portType) {
            return portType(Either.ofRight(portType));
        }

        /**
         * @param ports List of the Ports that need to be matched.
         * 
         * @return builder
         * 
         */
        public Builder ports(@Nullable Output> ports) {
            $.ports = ports;
            return this;
        }

        /**
         * @param ports List of the Ports that need to be matched.
         * 
         * @return builder
         * 
         */
        public Builder ports(List ports) {
            return ports(Output.of(ports));
        }

        /**
         * @param ports List of the Ports that need to be matched.
         * 
         * @return builder
         * 
         */
        public Builder ports(String... ports) {
            return ports(List.of(ports));
        }

        public PortConditionArgs build() {
            if ($.layer4Protocol == null) {
                throw new MissingRequiredPropertyException("PortConditionArgs", "layer4Protocol");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy