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

com.pulumi.azurenative.monitor.inputs.UdpReceiverArgs 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.monitor.inputs;

import com.pulumi.azurenative.monitor.enums.StreamEncodingType;
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.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * Receiver using UDP as transport protocol.
 * 
 */
public final class UdpReceiverArgs extends com.pulumi.resources.ResourceArgs {

    public static final UdpReceiverArgs Empty = new UdpReceiverArgs();

    /**
     * The encoding of the stream being received.
     * 
     */
    @Import(name="encoding")
    private @Nullable Output> encoding;

    /**
     * @return The encoding of the stream being received.
     * 
     */
    public Optional>> encoding() {
        return Optional.ofNullable(this.encoding);
    }

    /**
     * TCP endpoint definition. Example: 0.0.0.0:<port>.
     * 
     */
    @Import(name="endpoint", required=true)
    private Output endpoint;

    /**
     * @return TCP endpoint definition. Example: 0.0.0.0:<port>.
     * 
     */
    public Output endpoint() {
        return this.endpoint;
    }

    /**
     * Max read queue length.
     * 
     */
    @Import(name="readQueueLength")
    private @Nullable Output readQueueLength;

    /**
     * @return Max read queue length.
     * 
     */
    public Optional> readQueueLength() {
        return Optional.ofNullable(this.readQueueLength);
    }

    private UdpReceiverArgs() {}

    private UdpReceiverArgs(UdpReceiverArgs $) {
        this.encoding = $.encoding;
        this.endpoint = $.endpoint;
        this.readQueueLength = $.readQueueLength;
    }

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

    public static final class Builder {
        private UdpReceiverArgs $;

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

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

        /**
         * @param encoding The encoding of the stream being received.
         * 
         * @return builder
         * 
         */
        public Builder encoding(@Nullable Output> encoding) {
            $.encoding = encoding;
            return this;
        }

        /**
         * @param encoding The encoding of the stream being received.
         * 
         * @return builder
         * 
         */
        public Builder encoding(Either encoding) {
            return encoding(Output.of(encoding));
        }

        /**
         * @param encoding The encoding of the stream being received.
         * 
         * @return builder
         * 
         */
        public Builder encoding(String encoding) {
            return encoding(Either.ofLeft(encoding));
        }

        /**
         * @param encoding The encoding of the stream being received.
         * 
         * @return builder
         * 
         */
        public Builder encoding(StreamEncodingType encoding) {
            return encoding(Either.ofRight(encoding));
        }

        /**
         * @param endpoint TCP endpoint definition. Example: 0.0.0.0:<port>.
         * 
         * @return builder
         * 
         */
        public Builder endpoint(Output endpoint) {
            $.endpoint = endpoint;
            return this;
        }

        /**
         * @param endpoint TCP endpoint definition. Example: 0.0.0.0:<port>.
         * 
         * @return builder
         * 
         */
        public Builder endpoint(String endpoint) {
            return endpoint(Output.of(endpoint));
        }

        /**
         * @param readQueueLength Max read queue length.
         * 
         * @return builder
         * 
         */
        public Builder readQueueLength(@Nullable Output readQueueLength) {
            $.readQueueLength = readQueueLength;
            return this;
        }

        /**
         * @param readQueueLength Max read queue length.
         * 
         * @return builder
         * 
         */
        public Builder readQueueLength(Integer readQueueLength) {
            return readQueueLength(Output.of(readQueueLength));
        }

        public UdpReceiverArgs build() {
            $.encoding = Codegen.stringProp("encoding").left(StreamEncodingType.class).output().arg($.encoding).def("nop").getNullable();
            if ($.endpoint == null) {
                throw new MissingRequiredPropertyException("UdpReceiverArgs", "endpoint");
            }
            $.readQueueLength = Codegen.integerProp("readQueueLength").output().arg($.readQueueLength).def(1000).getNullable();
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy