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

com.pulumi.azurenative.monitor.inputs.SyslogReceiverArgs Maven / Gradle / Ivy

There is a newer version: 2.82.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.SyslogProtocol;
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.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * Base receiver using TCP as transport protocol.
 * 
 */
public final class SyslogReceiverArgs extends com.pulumi.resources.ResourceArgs {

    public static final SyslogReceiverArgs Empty = new SyslogReceiverArgs();

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

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

    /**
     * Protocol to parse syslog messages. Default rfc3164
     * 
     */
    @Import(name="protocol")
    private @Nullable Output> protocol;

    /**
     * @return Protocol to parse syslog messages. Default rfc3164
     * 
     */
    public Optional>> protocol() {
        return Optional.ofNullable(this.protocol);
    }

    private SyslogReceiverArgs() {}

    private SyslogReceiverArgs(SyslogReceiverArgs $) {
        this.endpoint = $.endpoint;
        this.protocol = $.protocol;
    }

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

    public static final class Builder {
        private SyslogReceiverArgs $;

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

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

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

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

        /**
         * @param protocol Protocol to parse syslog messages. Default rfc3164
         * 
         * @return builder
         * 
         */
        public Builder protocol(@Nullable Output> protocol) {
            $.protocol = protocol;
            return this;
        }

        /**
         * @param protocol Protocol to parse syslog messages. Default rfc3164
         * 
         * @return builder
         * 
         */
        public Builder protocol(Either protocol) {
            return protocol(Output.of(protocol));
        }

        /**
         * @param protocol Protocol to parse syslog messages. Default rfc3164
         * 
         * @return builder
         * 
         */
        public Builder protocol(String protocol) {
            return protocol(Either.ofLeft(protocol));
        }

        /**
         * @param protocol Protocol to parse syslog messages. Default rfc3164
         * 
         * @return builder
         * 
         */
        public Builder protocol(SyslogProtocol protocol) {
            return protocol(Either.ofRight(protocol));
        }

        public SyslogReceiverArgs build() {
            if ($.endpoint == null) {
                throw new MissingRequiredPropertyException("SyslogReceiverArgs", "endpoint");
            }
            $.protocol = Codegen.stringProp("protocol").left(SyslogProtocol.class).output().arg($.protocol).def("rfc3164").getNullable();
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy