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

com.pulumi.azurenative.devtestlab.inputs.PortArgs Maven / Gradle / Ivy

There is a newer version: 2.78.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.devtestlab.inputs;

import com.pulumi.azurenative.devtestlab.enums.TransportProtocol;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * Properties of a network port.
 * 
 */
public final class PortArgs extends com.pulumi.resources.ResourceArgs {

    public static final PortArgs Empty = new PortArgs();

    /**
     * Backend port of the target virtual machine.
     * 
     */
    @Import(name="backendPort")
    private @Nullable Output backendPort;

    /**
     * @return Backend port of the target virtual machine.
     * 
     */
    public Optional> backendPort() {
        return Optional.ofNullable(this.backendPort);
    }

    /**
     * Protocol type of the port.
     * 
     */
    @Import(name="transportProtocol")
    private @Nullable Output> transportProtocol;

    /**
     * @return Protocol type of the port.
     * 
     */
    public Optional>> transportProtocol() {
        return Optional.ofNullable(this.transportProtocol);
    }

    private PortArgs() {}

    private PortArgs(PortArgs $) {
        this.backendPort = $.backendPort;
        this.transportProtocol = $.transportProtocol;
    }

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

    public static final class Builder {
        private PortArgs $;

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

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

        /**
         * @param backendPort Backend port of the target virtual machine.
         * 
         * @return builder
         * 
         */
        public Builder backendPort(@Nullable Output backendPort) {
            $.backendPort = backendPort;
            return this;
        }

        /**
         * @param backendPort Backend port of the target virtual machine.
         * 
         * @return builder
         * 
         */
        public Builder backendPort(Integer backendPort) {
            return backendPort(Output.of(backendPort));
        }

        /**
         * @param transportProtocol Protocol type of the port.
         * 
         * @return builder
         * 
         */
        public Builder transportProtocol(@Nullable Output> transportProtocol) {
            $.transportProtocol = transportProtocol;
            return this;
        }

        /**
         * @param transportProtocol Protocol type of the port.
         * 
         * @return builder
         * 
         */
        public Builder transportProtocol(Either transportProtocol) {
            return transportProtocol(Output.of(transportProtocol));
        }

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

        /**
         * @param transportProtocol Protocol type of the port.
         * 
         * @return builder
         * 
         */
        public Builder transportProtocol(TransportProtocol transportProtocol) {
            return transportProtocol(Either.ofRight(transportProtocol));
        }

        public PortArgs build() {
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy