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

com.pulumi.azurenative.security.inputs.JitNetworkAccessRequestPortArgs 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.security.inputs;

import com.pulumi.azurenative.security.enums.Status;
import com.pulumi.azurenative.security.enums.StatusReason;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final JitNetworkAccessRequestPortArgs Empty = new JitNetworkAccessRequestPortArgs();

    /**
     * Mutually exclusive with the "allowedSourceAddressPrefixes" parameter. Should be an IP address or CIDR, for example "192.168.0.3" or "192.168.0.0/16".
     * 
     */
    @Import(name="allowedSourceAddressPrefix")
    private @Nullable Output allowedSourceAddressPrefix;

    /**
     * @return Mutually exclusive with the "allowedSourceAddressPrefixes" parameter. Should be an IP address or CIDR, for example "192.168.0.3" or "192.168.0.0/16".
     * 
     */
    public Optional> allowedSourceAddressPrefix() {
        return Optional.ofNullable(this.allowedSourceAddressPrefix);
    }

    /**
     * Mutually exclusive with the "allowedSourceAddressPrefix" parameter.
     * 
     */
    @Import(name="allowedSourceAddressPrefixes")
    private @Nullable Output> allowedSourceAddressPrefixes;

    /**
     * @return Mutually exclusive with the "allowedSourceAddressPrefix" parameter.
     * 
     */
    public Optional>> allowedSourceAddressPrefixes() {
        return Optional.ofNullable(this.allowedSourceAddressPrefixes);
    }

    /**
     * The date & time at which the request ends in UTC
     * 
     */
    @Import(name="endTimeUtc", required=true)
    private Output endTimeUtc;

    /**
     * @return The date & time at which the request ends in UTC
     * 
     */
    public Output endTimeUtc() {
        return this.endTimeUtc;
    }

    /**
     * The port which is mapped to this port's `number` in the Azure Firewall, if applicable
     * 
     */
    @Import(name="mappedPort")
    private @Nullable Output mappedPort;

    /**
     * @return The port which is mapped to this port's `number` in the Azure Firewall, if applicable
     * 
     */
    public Optional> mappedPort() {
        return Optional.ofNullable(this.mappedPort);
    }

    @Import(name="number", required=true)
    private Output number;

    public Output number() {
        return this.number;
    }

    /**
     * The status of the port
     * 
     */
    @Import(name="status", required=true)
    private Output> status;

    /**
     * @return The status of the port
     * 
     */
    public Output> status() {
        return this.status;
    }

    /**
     * A description of why the `status` has its value
     * 
     */
    @Import(name="statusReason", required=true)
    private Output> statusReason;

    /**
     * @return A description of why the `status` has its value
     * 
     */
    public Output> statusReason() {
        return this.statusReason;
    }

    private JitNetworkAccessRequestPortArgs() {}

    private JitNetworkAccessRequestPortArgs(JitNetworkAccessRequestPortArgs $) {
        this.allowedSourceAddressPrefix = $.allowedSourceAddressPrefix;
        this.allowedSourceAddressPrefixes = $.allowedSourceAddressPrefixes;
        this.endTimeUtc = $.endTimeUtc;
        this.mappedPort = $.mappedPort;
        this.number = $.number;
        this.status = $.status;
        this.statusReason = $.statusReason;
    }

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

    public static final class Builder {
        private JitNetworkAccessRequestPortArgs $;

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

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

        /**
         * @param allowedSourceAddressPrefix Mutually exclusive with the "allowedSourceAddressPrefixes" parameter. Should be an IP address or CIDR, for example "192.168.0.3" or "192.168.0.0/16".
         * 
         * @return builder
         * 
         */
        public Builder allowedSourceAddressPrefix(@Nullable Output allowedSourceAddressPrefix) {
            $.allowedSourceAddressPrefix = allowedSourceAddressPrefix;
            return this;
        }

        /**
         * @param allowedSourceAddressPrefix Mutually exclusive with the "allowedSourceAddressPrefixes" parameter. Should be an IP address or CIDR, for example "192.168.0.3" or "192.168.0.0/16".
         * 
         * @return builder
         * 
         */
        public Builder allowedSourceAddressPrefix(String allowedSourceAddressPrefix) {
            return allowedSourceAddressPrefix(Output.of(allowedSourceAddressPrefix));
        }

        /**
         * @param allowedSourceAddressPrefixes Mutually exclusive with the "allowedSourceAddressPrefix" parameter.
         * 
         * @return builder
         * 
         */
        public Builder allowedSourceAddressPrefixes(@Nullable Output> allowedSourceAddressPrefixes) {
            $.allowedSourceAddressPrefixes = allowedSourceAddressPrefixes;
            return this;
        }

        /**
         * @param allowedSourceAddressPrefixes Mutually exclusive with the "allowedSourceAddressPrefix" parameter.
         * 
         * @return builder
         * 
         */
        public Builder allowedSourceAddressPrefixes(List allowedSourceAddressPrefixes) {
            return allowedSourceAddressPrefixes(Output.of(allowedSourceAddressPrefixes));
        }

        /**
         * @param allowedSourceAddressPrefixes Mutually exclusive with the "allowedSourceAddressPrefix" parameter.
         * 
         * @return builder
         * 
         */
        public Builder allowedSourceAddressPrefixes(String... allowedSourceAddressPrefixes) {
            return allowedSourceAddressPrefixes(List.of(allowedSourceAddressPrefixes));
        }

        /**
         * @param endTimeUtc The date & time at which the request ends in UTC
         * 
         * @return builder
         * 
         */
        public Builder endTimeUtc(Output endTimeUtc) {
            $.endTimeUtc = endTimeUtc;
            return this;
        }

        /**
         * @param endTimeUtc The date & time at which the request ends in UTC
         * 
         * @return builder
         * 
         */
        public Builder endTimeUtc(String endTimeUtc) {
            return endTimeUtc(Output.of(endTimeUtc));
        }

        /**
         * @param mappedPort The port which is mapped to this port's `number` in the Azure Firewall, if applicable
         * 
         * @return builder
         * 
         */
        public Builder mappedPort(@Nullable Output mappedPort) {
            $.mappedPort = mappedPort;
            return this;
        }

        /**
         * @param mappedPort The port which is mapped to this port's `number` in the Azure Firewall, if applicable
         * 
         * @return builder
         * 
         */
        public Builder mappedPort(Integer mappedPort) {
            return mappedPort(Output.of(mappedPort));
        }

        public Builder number(Output number) {
            $.number = number;
            return this;
        }

        public Builder number(Integer number) {
            return number(Output.of(number));
        }

        /**
         * @param status The status of the port
         * 
         * @return builder
         * 
         */
        public Builder status(Output> status) {
            $.status = status;
            return this;
        }

        /**
         * @param status The status of the port
         * 
         * @return builder
         * 
         */
        public Builder status(Either status) {
            return status(Output.of(status));
        }

        /**
         * @param status The status of the port
         * 
         * @return builder
         * 
         */
        public Builder status(String status) {
            return status(Either.ofLeft(status));
        }

        /**
         * @param status The status of the port
         * 
         * @return builder
         * 
         */
        public Builder status(Status status) {
            return status(Either.ofRight(status));
        }

        /**
         * @param statusReason A description of why the `status` has its value
         * 
         * @return builder
         * 
         */
        public Builder statusReason(Output> statusReason) {
            $.statusReason = statusReason;
            return this;
        }

        /**
         * @param statusReason A description of why the `status` has its value
         * 
         * @return builder
         * 
         */
        public Builder statusReason(Either statusReason) {
            return statusReason(Output.of(statusReason));
        }

        /**
         * @param statusReason A description of why the `status` has its value
         * 
         * @return builder
         * 
         */
        public Builder statusReason(String statusReason) {
            return statusReason(Either.ofLeft(statusReason));
        }

        /**
         * @param statusReason A description of why the `status` has its value
         * 
         * @return builder
         * 
         */
        public Builder statusReason(StatusReason statusReason) {
            return statusReason(Either.ofRight(statusReason));
        }

        public JitNetworkAccessRequestPortArgs build() {
            if ($.endTimeUtc == null) {
                throw new MissingRequiredPropertyException("JitNetworkAccessRequestPortArgs", "endTimeUtc");
            }
            if ($.number == null) {
                throw new MissingRequiredPropertyException("JitNetworkAccessRequestPortArgs", "number");
            }
            if ($.status == null) {
                throw new MissingRequiredPropertyException("JitNetworkAccessRequestPortArgs", "status");
            }
            if ($.statusReason == null) {
                throw new MissingRequiredPropertyException("JitNetworkAccessRequestPortArgs", "statusReason");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy