// *** 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.Octopusdeploy
{
    /// <summary>
    /// This resource manages runbook processes in Octopus Deploy.
    /// </summary>
    [OctopusdeployResourceType("octopusdeploy:index/runbookProcess:RunbookProcess")]
    public partial class RunbookProcess : global::Pulumi.CustomResource
    {
        /// <summary>
        /// Read only value containing the last snapshot ID.
        /// </summary>
        [Output("lastSnapshotId")]
        public Output<string?> LastSnapshotId { get; private set; } = null!;

        /// <summary>
        /// The project ID associated with this runbook process.
        /// </summary>
        [Output("projectId")]
        public Output<string> ProjectId { get; private set; } = null!;

        /// <summary>
        /// The runbook ID associated with this runbook process.
        /// </summary>
        [Output("runbookId")]
        public Output<string> RunbookId { get; private set; } = null!;

        /// <summary>
        /// The space ID associated with this resource.
        /// </summary>
        [Output("spaceId")]
        public Output<string> SpaceId { get; private set; } = null!;

        [Output("steps")]
        public Output<ImmutableArray<Outputs.RunbookProcessStep>> Steps { get; private set; } = null!;

        /// <summary>
        /// The version number of this runbook process.
        /// </summary>
        [Output("version")]
        public Output<int> Version { get; private set; } = null!;


        /// <summary>
        /// Create a RunbookProcess 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 RunbookProcess(string name, RunbookProcessArgs args, CustomResourceOptions? options = null)
            : base("octopusdeploy:index/runbookProcess:RunbookProcess", name, args ?? new RunbookProcessArgs(), MakeResourceOptions(options, ""))
        {
        }

        private RunbookProcess(string name, Input<string> id, RunbookProcessState? state = null, CustomResourceOptions? options = null)
            : base("octopusdeploy:index/runbookProcess:RunbookProcess", 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 RunbookProcess 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 RunbookProcess Get(string name, Input<string> id, RunbookProcessState? state = null, CustomResourceOptions? options = null)
        {
            return new RunbookProcess(name, id, state, options);
        }
    }

    public sealed class RunbookProcessArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Read only value containing the last snapshot ID.
        /// </summary>
        [Input("lastSnapshotId")]
        public Input<string>? LastSnapshotId { get; set; }

        /// <summary>
        /// The project ID associated with this runbook process.
        /// </summary>
        [Input("projectId")]
        public Input<string>? ProjectId { get; set; }

        /// <summary>
        /// The runbook ID associated with this runbook process.
        /// </summary>
        [Input("runbookId", required: true)]
        public Input<string> RunbookId { get; set; } = null!;

        /// <summary>
        /// The space ID associated with this resource.
        /// </summary>
        [Input("spaceId")]
        public Input<string>? SpaceId { get; set; }

        [Input("steps")]
        private InputList<Inputs.RunbookProcessStepArgs>? _steps;
        public InputList<Inputs.RunbookProcessStepArgs> Steps
        {
            get => _steps ?? (_steps = new InputList<Inputs.RunbookProcessStepArgs>());
            set => _steps = value;
        }

        /// <summary>
        /// The version number of this runbook process.
        /// </summary>
        [Input("version")]
        public Input<int>? Version { get; set; }

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

    public sealed class RunbookProcessState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Read only value containing the last snapshot ID.
        /// </summary>
        [Input("lastSnapshotId")]
        public Input<string>? LastSnapshotId { get; set; }

        /// <summary>
        /// The project ID associated with this runbook process.
        /// </summary>
        [Input("projectId")]
        public Input<string>? ProjectId { get; set; }

        /// <summary>
        /// The runbook ID associated with this runbook process.
        /// </summary>
        [Input("runbookId")]
        public Input<string>? RunbookId { get; set; }

        /// <summary>
        /// The space ID associated with this resource.
        /// </summary>
        [Input("spaceId")]
        public Input<string>? SpaceId { get; set; }

        [Input("steps")]
        private InputList<Inputs.RunbookProcessStepGetArgs>? _steps;
        public InputList<Inputs.RunbookProcessStepGetArgs> Steps
        {
            get => _steps ?? (_steps = new InputList<Inputs.RunbookProcessStepGetArgs>());
            set => _steps = value;
        }

        /// <summary>
        /// The version number of this runbook process.
        /// </summary>
        [Input("version")]
        public Input<int>? Version { get; set; }

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