<filename>sdk/dotnet/PipelineCronTrigger.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 PiersKarsenbarg.Codefresh
{
    /// <summary>
    /// ## # Pipeline Cron Trigger resource
    /// 
    /// Pipeline Cron Trigger is used to create cron-based triggers for pipeilnes.
    /// See the [documentation](https://codefresh.io/docs/docs/configure-ci-cd-pipeline/triggers/cron-triggers/).
    /// </summary>
    [CodefreshResourceType("codefresh:index/pipelineCronTrigger:PipelineCronTrigger")]
    public partial class PipelineCronTrigger : global::Pulumi.CustomResource
    {
        /// <summary>
        /// The cron expression. Visit [this page](https://github.com/codefresh-io/cronus/blob/master/docs/expression.md) to learn about the supported cron expression format and aliases.
        /// </summary>
        [Output("expression")]
        public Output<string> Expression { get; private set; } = null!;

        /// <summary>
        /// The message which will be passed to the pipeline upon each trigger.
        /// </summary>
        [Output("message")]
        public Output<string> Message { get; private set; } = null!;

        /// <summary>
        /// The pipeline to which this trigger belongs.
        /// </summary>
        [Output("pipelineId")]
        public Output<string> PipelineId { get; private set; } = null!;


        /// <summary>
        /// Create a PipelineCronTrigger 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 PipelineCronTrigger(string name, PipelineCronTriggerArgs args, CustomResourceOptions? options = null)
            : base("codefresh:index/pipelineCronTrigger:PipelineCronTrigger", name, args ?? new PipelineCronTriggerArgs(), MakeResourceOptions(options, ""))
        {
        }

        private PipelineCronTrigger(string name, Input<string> id, PipelineCronTriggerState? state = null, CustomResourceOptions? options = null)
            : base("codefresh:index/pipelineCronTrigger:PipelineCronTrigger", name, state, MakeResourceOptions(options, id))
        {
        }

        private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
        {
            var defaultOptions = new CustomResourceOptions
            {
                Version = Utilities.Version,
            };
            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 PipelineCronTrigger 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 PipelineCronTrigger Get(string name, Input<string> id, PipelineCronTriggerState? state = null, CustomResourceOptions? options = null)
        {
            return new PipelineCronTrigger(name, id, state, options);
        }
    }

    public sealed class PipelineCronTriggerArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The cron expression. Visit [this page](https://github.com/codefresh-io/cronus/blob/master/docs/expression.md) to learn about the supported cron expression format and aliases.
        /// </summary>
        [Input("expression", required: true)]
        public Input<string> Expression { get; set; } = null!;

        /// <summary>
        /// The message which will be passed to the pipeline upon each trigger.
        /// </summary>
        [Input("message", required: true)]
        public Input<string> Message { get; set; } = null!;

        /// <summary>
        /// The pipeline to which this trigger belongs.
        /// </summary>
        [Input("pipelineId", required: true)]
        public Input<string> PipelineId { get; set; } = null!;

        public PipelineCronTriggerArgs()
        {
        }
        public static new PipelineCronTriggerArgs Empty => new PipelineCronTriggerArgs();
    }

    public sealed class PipelineCronTriggerState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The cron expression. Visit [this page](https://github.com/codefresh-io/cronus/blob/master/docs/expression.md) to learn about the supported cron expression format and aliases.
        /// </summary>
        [Input("expression")]
        public Input<string>? Expression { get; set; }

        /// <summary>
        /// The message which will be passed to the pipeline upon each trigger.
        /// </summary>
        [Input("message")]
        public Input<string>? Message { get; set; }

        /// <summary>
        /// The pipeline to which this trigger belongs.
        /// </summary>
        [Input("pipelineId")]
        public Input<string>? PipelineId { get; set; }

        public PipelineCronTriggerState()
        {
        }
        public static new PipelineCronTriggerState Empty => new PipelineCronTriggerState();
    }
}
