// *** 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.azure.loganalytics;

import com.pulumi.azure.Utilities;
import com.pulumi.azure.loganalytics.DataSourceWindowsEventArgs;
import com.pulumi.azure.loganalytics.inputs.DataSourceWindowsEventState;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.String;
import java.util.List;
import javax.annotation.Nullable;

/**
 * Manages a Log Analytics Windows Event DataSource.
 * 
 * ## Example Usage
 * ```java
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azure.core.ResourceGroup;
 * import com.pulumi.azure.core.ResourceGroupArgs;
 * import com.pulumi.azure.operationalinsights.AnalyticsWorkspace;
 * import com.pulumi.azure.operationalinsights.AnalyticsWorkspaceArgs;
 * import com.pulumi.azure.loganalytics.DataSourceWindowsEvent;
 * import com.pulumi.azure.loganalytics.DataSourceWindowsEventArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * 
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 * 
 *     public static void stack(Context ctx) {
 *         var exampleResourceGroup = new ResourceGroup(&#34;exampleResourceGroup&#34;, ResourceGroupArgs.builder()        
 *             .location(&#34;West Europe&#34;)
 *             .build());
 * 
 *         var exampleAnalyticsWorkspace = new AnalyticsWorkspace(&#34;exampleAnalyticsWorkspace&#34;, AnalyticsWorkspaceArgs.builder()        
 *             .location(exampleResourceGroup.location())
 *             .resourceGroupName(exampleResourceGroup.name())
 *             .sku(&#34;PerGB2018&#34;)
 *             .build());
 * 
 *         var exampleDataSourceWindowsEvent = new DataSourceWindowsEvent(&#34;exampleDataSourceWindowsEvent&#34;, DataSourceWindowsEventArgs.builder()        
 *             .resourceGroupName(exampleResourceGroup.name())
 *             .workspaceName(exampleAnalyticsWorkspace.name())
 *             .eventLogName(&#34;Application&#34;)
 *             .eventTypes(&#34;Error&#34;)
 *             .build());
 * 
 *     }
 * }
 * ```
 * 
 * ## Import
 * 
 * Log Analytics Windows Event DataSources can be imported using the `resource id`, e.g.
 * 
 * ```sh
 *  $ pulumi import azure:loganalytics/dataSourceWindowsEvent:DataSourceWindowsEvent example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.OperationalInsights/workspaces/workspace1/dataSources/datasource1
 * ```
 * 
 */
@ResourceType(type="azure:loganalytics/dataSourceWindowsEvent:DataSourceWindowsEvent")
public class DataSourceWindowsEvent extends com.pulumi.resources.CustomResource {
    /**
     * Specifies the name of the Windows Event Log to collect events from.
     * 
     */
    @Export(name="eventLogName", refs={String.class}, tree="[0]")
    private Output<String> eventLogName;

    /**
     * @return Specifies the name of the Windows Event Log to collect events from.
     * 
     */
    public Output<String> eventLogName() {
        return this.eventLogName;
    }
    /**
     * Specifies an array of event types applied to the specified event log. Possible values include `Error`, `Warning` and `Information`.
     * 
     */
    @Export(name="eventTypes", refs={List.class,String.class}, tree="[0,1]")
    private Output<List<String>> eventTypes;

    /**
     * @return Specifies an array of event types applied to the specified event log. Possible values include `Error`, `Warning` and `Information`.
     * 
     */
    public Output<List<String>> eventTypes() {
        return this.eventTypes;
    }
    /**
     * The name which should be used for this Log Analytics Windows Event DataSource. Changing this forces a new Log Analytics Windows Event DataSource to be created.
     * 
     */
    @Export(name="name", refs={String.class}, tree="[0]")
    private Output<String> name;

    /**
     * @return The name which should be used for this Log Analytics Windows Event DataSource. Changing this forces a new Log Analytics Windows Event DataSource to be created.
     * 
     */
    public Output<String> name() {
        return this.name;
    }
    /**
     * The name of the Resource Group where the Log Analytics Windows Event DataSource should exist. Changing this forces a new Log Analytics Windows Event DataSource to be created.
     * 
     */
    @Export(name="resourceGroupName", refs={String.class}, tree="[0]")
    private Output<String> resourceGroupName;

    /**
     * @return The name of the Resource Group where the Log Analytics Windows Event DataSource should exist. Changing this forces a new Log Analytics Windows Event DataSource to be created.
     * 
     */
    public Output<String> resourceGroupName() {
        return this.resourceGroupName;
    }
    /**
     * The name of the Log Analytics Workspace where the Log Analytics Windows Event DataSource should exist. Changing this forces a new Log Analytics Windows Event DataSource to be created.
     * 
     */
    @Export(name="workspaceName", refs={String.class}, tree="[0]")
    private Output<String> workspaceName;

    /**
     * @return The name of the Log Analytics Workspace where the Log Analytics Windows Event DataSource should exist. Changing this forces a new Log Analytics Windows Event DataSource to be created.
     * 
     */
    public Output<String> workspaceName() {
        return this.workspaceName;
    }

    /**
     *
     * @param name The _unique_ name of the resulting resource.
     */
    public DataSourceWindowsEvent(String name) {
        this(name, DataSourceWindowsEventArgs.Empty);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     */
    public DataSourceWindowsEvent(String name, DataSourceWindowsEventArgs args) {
        this(name, args, null);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     * @param options A bag of options that control this resource's behavior.
     */
    public DataSourceWindowsEvent(String name, DataSourceWindowsEventArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("azure:loganalytics/dataSourceWindowsEvent:DataSourceWindowsEvent", name, args == null ? DataSourceWindowsEventArgs.Empty : args, makeResourceOptions(options, Codegen.empty()));
    }

    private DataSourceWindowsEvent(String name, Output<String> id, @Nullable DataSourceWindowsEventState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("azure:loganalytics/dataSourceWindowsEvent:DataSourceWindowsEvent", name, state, makeResourceOptions(options, id));
    }

    private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output<String> id) {
        var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
            .version(Utilities.getVersion())
            .build();
        return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
    }

    /**
     * Get an existing Host resource's state with the given name, ID, and optional extra
     * properties used to qualify the lookup.
     *
     * @param name The _unique_ name of the resulting resource.
     * @param id The _unique_ provider ID of the resource to lookup.
     * @param state
     * @param options Optional settings to control the behavior of the CustomResource.
     */
    public static DataSourceWindowsEvent get(String name, Output<String> id, @Nullable DataSourceWindowsEventState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        return new DataSourceWindowsEvent(name, id, state, options);
    }
}
