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

com.pulumi.azurenative.operationalinsights.DataSourceArgs 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.operationalinsights;

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


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

    public static final DataSourceArgs Empty = new DataSourceArgs();

    /**
     * The name of the datasource resource.
     * 
     */
    @Import(name="dataSourceName")
    private @Nullable Output dataSourceName;

    /**
     * @return The name of the datasource resource.
     * 
     */
    public Optional> dataSourceName() {
        return Optional.ofNullable(this.dataSourceName);
    }

    /**
     * The kind of the DataSource.
     * 
     */
    @Import(name="kind", required=true)
    private Output> kind;

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

    /**
     * The data source properties in raw json format, each kind of data source have it's own schema.
     * 
     */
    @Import(name="properties", required=true)
    private Output properties;

    /**
     * @return The data source properties in raw json format, each kind of data source have it's own schema.
     * 
     */
    public Output properties() {
        return this.properties;
    }

    /**
     * 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;
    }

    /**
     * Resource tags.
     * 
     */
    @Import(name="tags")
    private @Nullable Output> tags;

    /**
     * @return Resource tags.
     * 
     */
    public Optional>> tags() {
        return Optional.ofNullable(this.tags);
    }

    /**
     * The name of the workspace.
     * 
     */
    @Import(name="workspaceName", required=true)
    private Output workspaceName;

    /**
     * @return The name of the workspace.
     * 
     */
    public Output workspaceName() {
        return this.workspaceName;
    }

    private DataSourceArgs() {}

    private DataSourceArgs(DataSourceArgs $) {
        this.dataSourceName = $.dataSourceName;
        this.kind = $.kind;
        this.properties = $.properties;
        this.resourceGroupName = $.resourceGroupName;
        this.tags = $.tags;
        this.workspaceName = $.workspaceName;
    }

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

    public static final class Builder {
        private DataSourceArgs $;

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

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

        /**
         * @param dataSourceName The name of the datasource resource.
         * 
         * @return builder
         * 
         */
        public Builder dataSourceName(@Nullable Output dataSourceName) {
            $.dataSourceName = dataSourceName;
            return this;
        }

        /**
         * @param dataSourceName The name of the datasource resource.
         * 
         * @return builder
         * 
         */
        public Builder dataSourceName(String dataSourceName) {
            return dataSourceName(Output.of(dataSourceName));
        }

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

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

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

        /**
         * @param kind The kind of the DataSource.
         * 
         * @return builder
         * 
         */
        public Builder kind(DataSourceKind kind) {
            return kind(Either.ofRight(kind));
        }

        /**
         * @param properties The data source properties in raw json format, each kind of data source have it's own schema.
         * 
         * @return builder
         * 
         */
        public Builder properties(Output properties) {
            $.properties = properties;
            return this;
        }

        /**
         * @param properties The data source properties in raw json format, each kind of data source have it's own schema.
         * 
         * @return builder
         * 
         */
        public Builder properties(Object properties) {
            return properties(Output.of(properties));
        }

        /**
         * @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 tags Resource tags.
         * 
         * @return builder
         * 
         */
        public Builder tags(@Nullable Output> tags) {
            $.tags = tags;
            return this;
        }

        /**
         * @param tags Resource tags.
         * 
         * @return builder
         * 
         */
        public Builder tags(Map tags) {
            return tags(Output.of(tags));
        }

        /**
         * @param workspaceName The name of the workspace.
         * 
         * @return builder
         * 
         */
        public Builder workspaceName(Output workspaceName) {
            $.workspaceName = workspaceName;
            return this;
        }

        /**
         * @param workspaceName The name of the workspace.
         * 
         * @return builder
         * 
         */
        public Builder workspaceName(String workspaceName) {
            return workspaceName(Output.of(workspaceName));
        }

        public DataSourceArgs build() {
            if ($.kind == null) {
                throw new MissingRequiredPropertyException("DataSourceArgs", "kind");
            }
            if ($.properties == null) {
                throw new MissingRequiredPropertyException("DataSourceArgs", "properties");
            }
            if ($.resourceGroupName == null) {
                throw new MissingRequiredPropertyException("DataSourceArgs", "resourceGroupName");
            }
            if ($.workspaceName == null) {
                throw new MissingRequiredPropertyException("DataSourceArgs", "workspaceName");
            }
            return $;
        }
    }

}