<filename>sdk/dotnet/Tencentcloud/Mps/Workflow.cs// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
using Pulumi;

namespace TencentCloudIAC.PulumiPackage.Tencentcloud.Mps
{
    /// <summary>
    /// Provides a resource to create a mps workflow
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using Pulumi;
    /// using Tencentcloud = TencentCloudIAC.PulumiPackage.Tencentcloud;
    /// 
    /// class MyStack : Stack
    /// {
    ///     public MyStack()
    ///     {
    ///         var workflow = new Tencentcloud.Mps.Workflow("workflow", new Tencentcloud.Mps.WorkflowArgs
    ///         {
    ///             AiAnalysisTask = new Tencentcloud.Mps.Inputs.WorkflowAiAnalysisTaskArgs
    ///             {
    ///                 Definition = 20,
    ///             },
    ///             AiContentReviewTask = new Tencentcloud.Mps.Inputs.WorkflowAiContentReviewTaskArgs
    ///             {
    ///                 Definition = 20,
    ///             },
    ///             AiRecognitionTask = new Tencentcloud.Mps.Inputs.WorkflowAiRecognitionTaskArgs
    ///             {
    ///                 Definition = 20,
    ///             },
    ///             MediaProcessTask = new Tencentcloud.Mps.Inputs.WorkflowMediaProcessTaskArgs
    ///             {
    ///                 AdaptiveDynamicStreamingTaskSets = 
    ///                 {
    ///                     new Tencentcloud.Mps.Inputs.WorkflowMediaProcessTaskAdaptiveDynamicStreamingTaskSetArgs
    ///                     {
    ///                         Definition = 12,
    ///                         OutputObjectPath = "/out",
    ///                         OutputStorage = new Tencentcloud.Mps.Inputs.WorkflowMediaProcessTaskAdaptiveDynamicStreamingTaskSetOutputStorageArgs
    ///                         {
    ///                             CosOutputStorage = new Tencentcloud.Mps.Inputs.WorkflowMediaProcessTaskAdaptiveDynamicStreamingTaskSetOutputStorageCosOutputStorageArgs
    ///                             {
    ///                                 Bucket = "cos-lock-1308919341",
    ///                                 Region = "ap-guangzhou",
    ///                             },
    ///                             Type = "COS",
    ///                         },
    ///                         SegmentObjectName = "/out",
    ///                         SubStreamObjectName = "/out/out/",
    ///                     },
    ///                 },
    ///                 AnimatedGraphicTaskSets = 
    ///                 {
    ///                     new Tencentcloud.Mps.Inputs.WorkflowMediaProcessTaskAnimatedGraphicTaskSetArgs
    ///                     {
    ///                         Definition = 20000,
    ///                         EndTimeOffset = 0,
    ///                         OutputObjectPath = "/test/",
    ///                         OutputStorage = new Tencentcloud.Mps.Inputs.WorkflowMediaProcessTaskAnimatedGraphicTaskSetOutputStorageArgs
    ///                         {
    ///                             CosOutputStorage = new Tencentcloud.Mps.Inputs.WorkflowMediaProcessTaskAnimatedGraphicTaskSetOutputStorageCosOutputStorageArgs
    ///                             {
    ///                                 Bucket = "cos-lock-1308919341",
    ///                                 Region = "ap-guangzhou",
    ///                             },
    ///                             Type = "COS",
    ///                         },
    ///                         StartTimeOffset = 0,
    ///                     },
    ///                 },
    ///                 SnapshotByTimeOffsetTaskSets = 
    ///                 {
    ///                     new Tencentcloud.Mps.Inputs.WorkflowMediaProcessTaskSnapshotByTimeOffsetTaskSetArgs
    ///                     {
    ///                         Definition = 10,
    ///                         ExtTimeOffsetSet = 
    ///                         {
    ///                             "1s",
    ///                         },
    ///                         OutputObjectPath = "/snapshot/",
    ///                         OutputStorage = new Tencentcloud.Mps.Inputs.WorkflowMediaProcessTaskSnapshotByTimeOffsetTaskSetOutputStorageArgs
    ///                         {
    ///                             CosOutputStorage = new Tencentcloud.Mps.Inputs.WorkflowMediaProcessTaskSnapshotByTimeOffsetTaskSetOutputStorageCosOutputStorageArgs
    ///                             {
    ///                                 Bucket = "cos-lock-1308919341",
    ///                                 Region = "ap-guangzhou",
    ///                             },
    ///                             Type = "COS",
    ///                         },
    ///                         TimeOffsetSet = {},
    ///                     },
    ///                 },
    ///             },
    ///             OutputDir = "/",
    ///             OutputStorage = new Tencentcloud.Mps.Inputs.WorkflowOutputStorageArgs
    ///             {
    ///                 CosOutputStorage = new Tencentcloud.Mps.Inputs.WorkflowOutputStorageCosOutputStorageArgs
    ///                 {
    ///                     Bucket = "cos-lock-1308919341",
    ///                     Region = "ap-guangzhou",
    ///                 },
    ///                 Type = "COS",
    ///             },
    ///             TaskPriority = 0,
    ///             Trigger = new Tencentcloud.Mps.Inputs.WorkflowTriggerArgs
    ///             {
    ///                 CosFileUploadTrigger = new Tencentcloud.Mps.Inputs.WorkflowTriggerCosFileUploadTriggerArgs
    ///                 {
    ///                     Bucket = "cos-lock-1308919341",
    ///                     Dir = "/",
    ///                     Region = "ap-guangzhou",
    ///                 },
    ///                 Type = "CosFileUpload",
    ///             },
    ///             WorkflowName = "tf-workflow",
    ///         });
    ///     }
    /// 
    /// }
    /// ```
    /// 
    /// ## Import
    /// 
    /// mps workflow can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import tencentcloud:Mps/workflow:Workflow workflow workflow_id
    /// ```
    /// </summary>
    [TencentcloudResourceType("tencentcloud:Mps/workflow:Workflow")]
    public partial class Workflow : Pulumi.CustomResource
    {
        /// <summary>
        /// Video Content Analysis Type Task Parameters.
        /// </summary>
        [Output("aiAnalysisTask")]
        public Output<Outputs.WorkflowAiAnalysisTask?> AiAnalysisTask { get; private set; } = null!;

        /// <summary>
        /// Video Content Moderation Type Task Parameters.
        /// </summary>
        [Output("aiContentReviewTask")]
        public Output<Outputs.WorkflowAiContentReviewTask?> AiContentReviewTask { get; private set; } = null!;

        /// <summary>
        /// Video content recognition type task parameters.
        /// </summary>
        [Output("aiRecognitionTask")]
        public Output<Outputs.WorkflowAiRecognitionTask?> AiRecognitionTask { get; private set; } = null!;

        /// <summary>
        /// Media Processing Type Task Parameters.
        /// </summary>
        [Output("mediaProcessTask")]
        public Output<Outputs.WorkflowMediaProcessTask?> MediaProcessTask { get; private set; } = null!;

        /// <summary>
        /// The target directory of the output file generated by media processing, if not filled, it means that it is consistent with the directory where the trigger file is located.
        /// </summary>
        [Output("outputDir")]
        public Output<string?> OutputDir { get; private set; } = null!;

        /// <summary>
        /// File output storage location for media processing. If left blank, the storage location in Trigger will be inherited.
        /// </summary>
        [Output("outputStorage")]
        public Output<Outputs.WorkflowOutputStorage?> OutputStorage { get; private set; } = null!;

        /// <summary>
        /// The event notification configuration of the task, if it is not filled, it means that the event notification will not be obtained.
        /// </summary>
        [Output("taskNotifyConfig")]
        public Output<Outputs.WorkflowTaskNotifyConfig?> TaskNotifyConfig { get; private set; } = null!;

        /// <summary>
        /// The priority of the workflow, the larger the value, the higher the priority, the value range is -10 to 10, and blank means 0.
        /// </summary>
        [Output("taskPriority")]
        public Output<int?> TaskPriority { get; private set; } = null!;

        /// <summary>
        /// The trigger rule bound to the workflow, when the uploaded video hits the rule to this object, the workflow will be triggered.
        /// </summary>
        [Output("trigger")]
        public Output<Outputs.WorkflowTrigger> Trigger { get; private set; } = null!;

        /// <summary>
        /// Workflow name, up to 128 characters. The name is unique for the same user.
        /// </summary>
        [Output("workflowName")]
        public Output<string> WorkflowName { get; private set; } = null!;


        /// <summary>
        /// Create a Workflow resource with the given unique name, arguments, and options.
        /// </summary>
        ///
        /// <param name="name">The unique name of the resource</param>
        /// <param name="args">The arguments used to populate this resource's properties</param>
        /// <param name="options">A bag of options that control this resource's behavior</param>
        public Workflow(string name, WorkflowArgs args, CustomResourceOptions? options = null)
            : base("tencentcloud:Mps/workflow:Workflow", name, args ?? new WorkflowArgs(), MakeResourceOptions(options, ""))
        {
        }

        private Workflow(string name, Input<string> id, WorkflowState? state = null, CustomResourceOptions? options = null)
            : base("tencentcloud:Mps/workflow:Workflow", name, state, MakeResourceOptions(options, id))
        {
        }

        private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
        {
            var defaultOptions = new CustomResourceOptions
            {
                Version = Utilities.Version,
                PluginDownloadURL = "github://api.github.com/tencentcloudstack",
            };
            var merged = CustomResourceOptions.Merge(defaultOptions, options);
            // Override the ID if one was specified for consistency with other language SDKs.
            merged.Id = id ?? merged.Id;
            return merged;
        }
        /// <summary>
        /// Get an existing Workflow resource's state with the given name, ID, and optional extra
        /// properties used to qualify the lookup.
        /// </summary>
        ///
        /// <param name="name">The unique name of the resulting resource.</param>
        /// <param name="id">The unique provider ID of the resource to lookup.</param>
        /// <param name="state">Any extra arguments used during the lookup.</param>
        /// <param name="options">A bag of options that control this resource's behavior</param>
        public static Workflow Get(string name, Input<string> id, WorkflowState? state = null, CustomResourceOptions? options = null)
        {
            return new Workflow(name, id, state, options);
        }
    }

    public sealed class WorkflowArgs : Pulumi.ResourceArgs
    {
        /// <summary>
        /// Video Content Analysis Type Task Parameters.
        /// </summary>
        [Input("aiAnalysisTask")]
        public Input<Inputs.WorkflowAiAnalysisTaskArgs>? AiAnalysisTask { get; set; }

        /// <summary>
        /// Video Content Moderation Type Task Parameters.
        /// </summary>
        [Input("aiContentReviewTask")]
        public Input<Inputs.WorkflowAiContentReviewTaskArgs>? AiContentReviewTask { get; set; }

        /// <summary>
        /// Video content recognition type task parameters.
        /// </summary>
        [Input("aiRecognitionTask")]
        public Input<Inputs.WorkflowAiRecognitionTaskArgs>? AiRecognitionTask { get; set; }

        /// <summary>
        /// Media Processing Type Task Parameters.
        /// </summary>
        [Input("mediaProcessTask")]
        public Input<Inputs.WorkflowMediaProcessTaskArgs>? MediaProcessTask { get; set; }

        /// <summary>
        /// The target directory of the output file generated by media processing, if not filled, it means that it is consistent with the directory where the trigger file is located.
        /// </summary>
        [Input("outputDir")]
        public Input<string>? OutputDir { get; set; }

        /// <summary>
        /// File output storage location for media processing. If left blank, the storage location in Trigger will be inherited.
        /// </summary>
        [Input("outputStorage")]
        public Input<Inputs.WorkflowOutputStorageArgs>? OutputStorage { get; set; }

        /// <summary>
        /// The event notification configuration of the task, if it is not filled, it means that the event notification will not be obtained.
        /// </summary>
        [Input("taskNotifyConfig")]
        public Input<Inputs.WorkflowTaskNotifyConfigArgs>? TaskNotifyConfig { get; set; }

        /// <summary>
        /// The priority of the workflow, the larger the value, the higher the priority, the value range is -10 to 10, and blank means 0.
        /// </summary>
        [Input("taskPriority")]
        public Input<int>? TaskPriority { get; set; }

        /// <summary>
        /// The trigger rule bound to the workflow, when the uploaded video hits the rule to this object, the workflow will be triggered.
        /// </summary>
        [Input("trigger", required: true)]
        public Input<Inputs.WorkflowTriggerArgs> Trigger { get; set; } = null!;

        /// <summary>
        /// Workflow name, up to 128 characters. The name is unique for the same user.
        /// </summary>
        [Input("workflowName", required: true)]
        public Input<string> WorkflowName { get; set; } = null!;

        public WorkflowArgs()
        {
        }
    }

    public sealed class WorkflowState : Pulumi.ResourceArgs
    {
        /// <summary>
        /// Video Content Analysis Type Task Parameters.
        /// </summary>
        [Input("aiAnalysisTask")]
        public Input<Inputs.WorkflowAiAnalysisTaskGetArgs>? AiAnalysisTask { get; set; }

        /// <summary>
        /// Video Content Moderation Type Task Parameters.
        /// </summary>
        [Input("aiContentReviewTask")]
        public Input<Inputs.WorkflowAiContentReviewTaskGetArgs>? AiContentReviewTask { get; set; }

        /// <summary>
        /// Video content recognition type task parameters.
        /// </summary>
        [Input("aiRecognitionTask")]
        public Input<Inputs.WorkflowAiRecognitionTaskGetArgs>? AiRecognitionTask { get; set; }

        /// <summary>
        /// Media Processing Type Task Parameters.
        /// </summary>
        [Input("mediaProcessTask")]
        public Input<Inputs.WorkflowMediaProcessTaskGetArgs>? MediaProcessTask { get; set; }

        /// <summary>
        /// The target directory of the output file generated by media processing, if not filled, it means that it is consistent with the directory where the trigger file is located.
        /// </summary>
        [Input("outputDir")]
        public Input<string>? OutputDir { get; set; }

        /// <summary>
        /// File output storage location for media processing. If left blank, the storage location in Trigger will be inherited.
        /// </summary>
        [Input("outputStorage")]
        public Input<Inputs.WorkflowOutputStorageGetArgs>? OutputStorage { get; set; }

        /// <summary>
        /// The event notification configuration of the task, if it is not filled, it means that the event notification will not be obtained.
        /// </summary>
        [Input("taskNotifyConfig")]
        public Input<Inputs.WorkflowTaskNotifyConfigGetArgs>? TaskNotifyConfig { get; set; }

        /// <summary>
        /// The priority of the workflow, the larger the value, the higher the priority, the value range is -10 to 10, and blank means 0.
        /// </summary>
        [Input("taskPriority")]
        public Input<int>? TaskPriority { get; set; }

        /// <summary>
        /// The trigger rule bound to the workflow, when the uploaded video hits the rule to this object, the workflow will be triggered.
        /// </summary>
        [Input("trigger")]
        public Input<Inputs.WorkflowTriggerGetArgs>? Trigger { get; set; }

        /// <summary>
        /// Workflow name, up to 128 characters. The name is unique for the same user.
        /// </summary>
        [Input("workflowName")]
        public Input<string>? WorkflowName { get; set; }

        public WorkflowState()
        {
        }
    }
}
