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

com.pulumi.azurenative.apimanagement.LoggerArgs 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.apimanagement;

import com.pulumi.azurenative.apimanagement.enums.LoggerType;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.String;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final LoggerArgs Empty = new LoggerArgs();

    /**
     * The name and SendRule connection string of the event hub for azureEventHub logger.
     * Instrumentation key for applicationInsights logger.
     * 
     */
    @Import(name="credentials")
    private @Nullable Output> credentials;

    /**
     * @return The name and SendRule connection string of the event hub for azureEventHub logger.
     * Instrumentation key for applicationInsights logger.
     * 
     */
    public Optional>> credentials() {
        return Optional.ofNullable(this.credentials);
    }

    /**
     * Logger description.
     * 
     */
    @Import(name="description")
    private @Nullable Output description;

    /**
     * @return Logger description.
     * 
     */
    public Optional> description() {
        return Optional.ofNullable(this.description);
    }

    /**
     * Whether records are buffered in the logger before publishing. Default is assumed to be true.
     * 
     */
    @Import(name="isBuffered")
    private @Nullable Output isBuffered;

    /**
     * @return Whether records are buffered in the logger before publishing. Default is assumed to be true.
     * 
     */
    public Optional> isBuffered() {
        return Optional.ofNullable(this.isBuffered);
    }

    /**
     * Logger identifier. Must be unique in the API Management service instance.
     * 
     */
    @Import(name="loggerId")
    private @Nullable Output loggerId;

    /**
     * @return Logger identifier. Must be unique in the API Management service instance.
     * 
     */
    public Optional> loggerId() {
        return Optional.ofNullable(this.loggerId);
    }

    /**
     * Logger type.
     * 
     */
    @Import(name="loggerType", required=true)
    private Output> loggerType;

    /**
     * @return Logger type.
     * 
     */
    public Output> loggerType() {
        return this.loggerType;
    }

    /**
     * The name of the resource group. The name is case insensitive.
     * 
     */
    @Import(name="resourceGroupName", required=true)
    private Output resourceGroupName;

    /**
     * @return The name of the resource group. The name is case insensitive.
     * 
     */
    public Output resourceGroupName() {
        return this.resourceGroupName;
    }

    /**
     * Azure Resource Id of a log target (either Azure Event Hub resource or Azure Application Insights resource).
     * 
     */
    @Import(name="resourceId")
    private @Nullable Output resourceId;

    /**
     * @return Azure Resource Id of a log target (either Azure Event Hub resource or Azure Application Insights resource).
     * 
     */
    public Optional> resourceId() {
        return Optional.ofNullable(this.resourceId);
    }

    /**
     * The name of the API Management service.
     * 
     */
    @Import(name="serviceName", required=true)
    private Output serviceName;

    /**
     * @return The name of the API Management service.
     * 
     */
    public Output serviceName() {
        return this.serviceName;
    }

    private LoggerArgs() {}

    private LoggerArgs(LoggerArgs $) {
        this.credentials = $.credentials;
        this.description = $.description;
        this.isBuffered = $.isBuffered;
        this.loggerId = $.loggerId;
        this.loggerType = $.loggerType;
        this.resourceGroupName = $.resourceGroupName;
        this.resourceId = $.resourceId;
        this.serviceName = $.serviceName;
    }

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

    public static final class Builder {
        private LoggerArgs $;

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

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

        /**
         * @param credentials The name and SendRule connection string of the event hub for azureEventHub logger.
         * Instrumentation key for applicationInsights logger.
         * 
         * @return builder
         * 
         */
        public Builder credentials(@Nullable Output> credentials) {
            $.credentials = credentials;
            return this;
        }

        /**
         * @param credentials The name and SendRule connection string of the event hub for azureEventHub logger.
         * Instrumentation key for applicationInsights logger.
         * 
         * @return builder
         * 
         */
        public Builder credentials(Map credentials) {
            return credentials(Output.of(credentials));
        }

        /**
         * @param description Logger description.
         * 
         * @return builder
         * 
         */
        public Builder description(@Nullable Output description) {
            $.description = description;
            return this;
        }

        /**
         * @param description Logger description.
         * 
         * @return builder
         * 
         */
        public Builder description(String description) {
            return description(Output.of(description));
        }

        /**
         * @param isBuffered Whether records are buffered in the logger before publishing. Default is assumed to be true.
         * 
         * @return builder
         * 
         */
        public Builder isBuffered(@Nullable Output isBuffered) {
            $.isBuffered = isBuffered;
            return this;
        }

        /**
         * @param isBuffered Whether records are buffered in the logger before publishing. Default is assumed to be true.
         * 
         * @return builder
         * 
         */
        public Builder isBuffered(Boolean isBuffered) {
            return isBuffered(Output.of(isBuffered));
        }

        /**
         * @param loggerId Logger identifier. Must be unique in the API Management service instance.
         * 
         * @return builder
         * 
         */
        public Builder loggerId(@Nullable Output loggerId) {
            $.loggerId = loggerId;
            return this;
        }

        /**
         * @param loggerId Logger identifier. Must be unique in the API Management service instance.
         * 
         * @return builder
         * 
         */
        public Builder loggerId(String loggerId) {
            return loggerId(Output.of(loggerId));
        }

        /**
         * @param loggerType Logger type.
         * 
         * @return builder
         * 
         */
        public Builder loggerType(Output> loggerType) {
            $.loggerType = loggerType;
            return this;
        }

        /**
         * @param loggerType Logger type.
         * 
         * @return builder
         * 
         */
        public Builder loggerType(Either loggerType) {
            return loggerType(Output.of(loggerType));
        }

        /**
         * @param loggerType Logger type.
         * 
         * @return builder
         * 
         */
        public Builder loggerType(String loggerType) {
            return loggerType(Either.ofLeft(loggerType));
        }

        /**
         * @param loggerType Logger type.
         * 
         * @return builder
         * 
         */
        public Builder loggerType(LoggerType loggerType) {
            return loggerType(Either.ofRight(loggerType));
        }

        /**
         * @param resourceGroupName The name of the resource group. The name is case insensitive.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(Output resourceGroupName) {
            $.resourceGroupName = resourceGroupName;
            return this;
        }

        /**
         * @param resourceGroupName The name of the resource group. The name is case insensitive.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(String resourceGroupName) {
            return resourceGroupName(Output.of(resourceGroupName));
        }

        /**
         * @param resourceId Azure Resource Id of a log target (either Azure Event Hub resource or Azure Application Insights resource).
         * 
         * @return builder
         * 
         */
        public Builder resourceId(@Nullable Output resourceId) {
            $.resourceId = resourceId;
            return this;
        }

        /**
         * @param resourceId Azure Resource Id of a log target (either Azure Event Hub resource or Azure Application Insights resource).
         * 
         * @return builder
         * 
         */
        public Builder resourceId(String resourceId) {
            return resourceId(Output.of(resourceId));
        }

        /**
         * @param serviceName The name of the API Management service.
         * 
         * @return builder
         * 
         */
        public Builder serviceName(Output serviceName) {
            $.serviceName = serviceName;
            return this;
        }

        /**
         * @param serviceName The name of the API Management service.
         * 
         * @return builder
         * 
         */
        public Builder serviceName(String serviceName) {
            return serviceName(Output.of(serviceName));
        }

        public LoggerArgs build() {
            if ($.loggerType == null) {
                throw new MissingRequiredPropertyException("LoggerArgs", "loggerType");
            }
            if ($.resourceGroupName == null) {
                throw new MissingRequiredPropertyException("LoggerArgs", "resourceGroupName");
            }
            if ($.serviceName == null) {
                throw new MissingRequiredPropertyException("LoggerArgs", "serviceName");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy