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

import com.pulumi.azure.Utilities;
import com.pulumi.azure.streamanalytics.OutputServiceBusQueueArgs;
import com.pulumi.azure.streamanalytics.inputs.OutputServiceBusQueueState;
import com.pulumi.azure.streamanalytics.outputs.OutputServiceBusQueueSerialization;
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 java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Manages a Stream Analytics Output to a ServiceBus Queue.
 * 
 * ## 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.streamanalytics.StreamanalyticsFunctions;
 * import com.pulumi.azure.streamanalytics.inputs.GetJobArgs;
 * import com.pulumi.azure.servicebus.Namespace;
 * import com.pulumi.azure.servicebus.NamespaceArgs;
 * import com.pulumi.azure.servicebus.Queue;
 * import com.pulumi.azure.servicebus.QueueArgs;
 * import com.pulumi.azure.streamanalytics.OutputServiceBusQueue;
 * import com.pulumi.azure.streamanalytics.OutputServiceBusQueueArgs;
 * import com.pulumi.azure.streamanalytics.inputs.OutputServiceBusQueueSerializationArgs;
 * 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());
 * 
 *         final var exampleJob = StreamanalyticsFunctions.getJob(GetJobArgs.builder()
 *             .name(&#34;example-job&#34;)
 *             .resourceGroupName(exampleResourceGroup.name())
 *             .build());
 * 
 *         var exampleNamespace = new Namespace(&#34;exampleNamespace&#34;, NamespaceArgs.builder()        
 *             .location(exampleResourceGroup.location())
 *             .resourceGroupName(exampleResourceGroup.name())
 *             .sku(&#34;Standard&#34;)
 *             .build());
 * 
 *         var exampleQueue = new Queue(&#34;exampleQueue&#34;, QueueArgs.builder()        
 *             .namespaceId(exampleNamespace.id())
 *             .enablePartitioning(true)
 *             .build());
 * 
 *         var exampleOutputServiceBusQueue = new OutputServiceBusQueue(&#34;exampleOutputServiceBusQueue&#34;, OutputServiceBusQueueArgs.builder()        
 *             .streamAnalyticsJobName(exampleJob.applyValue(getJobResult -&gt; getJobResult).applyValue(exampleJob -&gt; exampleJob.applyValue(getJobResult -&gt; getJobResult.name())))
 *             .resourceGroupName(exampleJob.applyValue(getJobResult -&gt; getJobResult).applyValue(exampleJob -&gt; exampleJob.applyValue(getJobResult -&gt; getJobResult.resourceGroupName())))
 *             .queueName(exampleQueue.name())
 *             .servicebusNamespace(exampleNamespace.name())
 *             .sharedAccessPolicyKey(exampleNamespace.defaultPrimaryKey())
 *             .sharedAccessPolicyName(&#34;RootManageSharedAccessKey&#34;)
 *             .serialization(OutputServiceBusQueueSerializationArgs.builder()
 *                 .type(&#34;Csv&#34;)
 *                 .format(&#34;Array&#34;)
 *                 .build())
 *             .build());
 * 
 *     }
 * }
 * ```
 * 
 * ## Import
 * 
 * Stream Analytics Output ServiceBus Queue&#39;s can be imported using the `resource id`, e.g.
 * 
 * ```sh
 *  $ pulumi import azure:streamanalytics/outputServiceBusQueue:OutputServiceBusQueue example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.StreamAnalytics/streamingJobs/job1/outputs/output1
 * ```
 * 
 */
@ResourceType(type="azure:streamanalytics/outputServiceBusQueue:OutputServiceBusQueue")
public class OutputServiceBusQueue extends com.pulumi.resources.CustomResource {
    /**
     * The authentication mode for the Stream Output. Possible values are `Msi` and `ConnectionString`. Defaults to `ConnectionString`.
     * 
     */
    @Export(name="authenticationMode", refs={String.class}, tree="[0]")
    private Output</* @Nullable */ String> authenticationMode;

    /**
     * @return The authentication mode for the Stream Output. Possible values are `Msi` and `ConnectionString`. Defaults to `ConnectionString`.
     * 
     */
    public Output<Optional<String>> authenticationMode() {
        return Codegen.optional(this.authenticationMode);
    }
    /**
     * The name of the Stream Output. Changing this forces a new resource to be created.
     * 
     */
    @Export(name="name", refs={String.class}, tree="[0]")
    private Output<String> name;

    /**
     * @return The name of the Stream Output. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> name() {
        return this.name;
    }
    /**
     * A list of property columns to add to the Service Bus Queue output.
     * 
     */
    @Export(name="propertyColumns", refs={List.class,String.class}, tree="[0,1]")
    private Output</* @Nullable */ List<String>> propertyColumns;

    /**
     * @return A list of property columns to add to the Service Bus Queue output.
     * 
     */
    public Output<Optional<List<String>>> propertyColumns() {
        return Codegen.optional(this.propertyColumns);
    }
    /**
     * The name of the Service Bus Queue.
     * 
     */
    @Export(name="queueName", refs={String.class}, tree="[0]")
    private Output<String> queueName;

    /**
     * @return The name of the Service Bus Queue.
     * 
     */
    public Output<String> queueName() {
        return this.queueName;
    }
    /**
     * The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created.
     * 
     */
    @Export(name="resourceGroupName", refs={String.class}, tree="[0]")
    private Output<String> resourceGroupName;

    /**
     * @return The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> resourceGroupName() {
        return this.resourceGroupName;
    }
    /**
     * A `serialization` block as defined below.
     * 
     */
    @Export(name="serialization", refs={OutputServiceBusQueueSerialization.class}, tree="[0]")
    private Output<OutputServiceBusQueueSerialization> serialization;

    /**
     * @return A `serialization` block as defined below.
     * 
     */
    public Output<OutputServiceBusQueueSerialization> serialization() {
        return this.serialization;
    }
    /**
     * The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc.
     * 
     */
    @Export(name="servicebusNamespace", refs={String.class}, tree="[0]")
    private Output<String> servicebusNamespace;

    /**
     * @return The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc.
     * 
     */
    public Output<String> servicebusNamespace() {
        return this.servicebusNamespace;
    }
    /**
     * The shared access policy key for the specified shared access policy. Required if `authentication_mode` is `ConnectionString`.
     * 
     */
    @Export(name="sharedAccessPolicyKey", refs={String.class}, tree="[0]")
    private Output</* @Nullable */ String> sharedAccessPolicyKey;

    /**
     * @return The shared access policy key for the specified shared access policy. Required if `authentication_mode` is `ConnectionString`.
     * 
     */
    public Output<Optional<String>> sharedAccessPolicyKey() {
        return Codegen.optional(this.sharedAccessPolicyKey);
    }
    /**
     * The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required if `authentication_mode` is `ConnectionString`.
     * 
     */
    @Export(name="sharedAccessPolicyName", refs={String.class}, tree="[0]")
    private Output</* @Nullable */ String> sharedAccessPolicyName;

    /**
     * @return The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required if `authentication_mode` is `ConnectionString`.
     * 
     */
    public Output<Optional<String>> sharedAccessPolicyName() {
        return Codegen.optional(this.sharedAccessPolicyName);
    }
    /**
     * The name of the Stream Analytics Job. Changing this forces a new resource to be created.
     * 
     */
    @Export(name="streamAnalyticsJobName", refs={String.class}, tree="[0]")
    private Output<String> streamAnalyticsJobName;

    /**
     * @return The name of the Stream Analytics Job. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> streamAnalyticsJobName() {
        return this.streamAnalyticsJobName;
    }
    /**
     * A key-value pair of system property columns that will be attached to the outgoing messages for the Service Bus Queue Output.
     * 
     * &gt; **NOTE:** The acceptable keys are `ContentType`, `CorrelationId`, `Label`, `MessageId`, `PartitionKey`, `ReplyTo`, `ReplyToSessionId`, `ScheduledEnqueueTimeUtc`, `SessionId`, `TimeToLive` and `To`.
     * 
     */
    @Export(name="systemPropertyColumns", refs={Map.class,String.class}, tree="[0,1,1]")
    private Output</* @Nullable */ Map<String,String>> systemPropertyColumns;

    /**
     * @return A key-value pair of system property columns that will be attached to the outgoing messages for the Service Bus Queue Output.
     * 
     * &gt; **NOTE:** The acceptable keys are `ContentType`, `CorrelationId`, `Label`, `MessageId`, `PartitionKey`, `ReplyTo`, `ReplyToSessionId`, `ScheduledEnqueueTimeUtc`, `SessionId`, `TimeToLive` and `To`.
     * 
     */
    public Output<Optional<Map<String,String>>> systemPropertyColumns() {
        return Codegen.optional(this.systemPropertyColumns);
    }

    /**
     *
     * @param name The _unique_ name of the resulting resource.
     */
    public OutputServiceBusQueue(String name) {
        this(name, OutputServiceBusQueueArgs.Empty);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     */
    public OutputServiceBusQueue(String name, OutputServiceBusQueueArgs 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 OutputServiceBusQueue(String name, OutputServiceBusQueueArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("azure:streamanalytics/outputServiceBusQueue:OutputServiceBusQueue", name, args == null ? OutputServiceBusQueueArgs.Empty : args, makeResourceOptions(options, Codegen.empty()));
    }

    private OutputServiceBusQueue(String name, Output<String> id, @Nullable OutputServiceBusQueueState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("azure:streamanalytics/outputServiceBusQueue:OutputServiceBusQueue", 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())
            .additionalSecretOutputs(List.of(
                "sharedAccessPolicyKey"
            ))
            .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 OutputServiceBusQueue get(String name, Output<String> id, @Nullable OutputServiceBusQueueState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        return new OutputServiceBusQueue(name, id, state, options);
    }
}
