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

namespace Pulumi.Elasticstack
{
    public static class GetIngestProcessorSet
    {
        /// <summary>
        /// Sets one field and associates it with the specified value. If the field already exists, its value will be replaced with the provided one.
        /// 
        /// See: https://www.elastic.co/guide/en/elasticsearch/reference/current/set-processor.html
        /// 
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Elasticstack = Pulumi.Elasticstack;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var @set = Elasticstack.GetIngestProcessorSet.Invoke(new()
        ///     {
        ///         Field = "count",
        ///         Value = "1",
        ///     });
        /// 
        ///     var myIngestPipeline = new Elasticstack.IngestPipeline("myIngestPipeline", new()
        ///     {
        ///         Processors = new[]
        ///         {
        ///             @set.Apply(getIngestProcessorSetResult =&gt; getIngestProcessorSetResult).Apply(@set =&gt; @set.Apply(getIngestProcessorSetResult =&gt; getIngestProcessorSetResult.Json)),
        ///         },
        ///     });
        /// 
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetIngestProcessorSetResult> InvokeAsync(GetIngestProcessorSetArgs args, InvokeOptions? options = null)
            => global::Pulumi.Deployment.Instance.InvokeAsync<GetIngestProcessorSetResult>("elasticstack:index/getIngestProcessorSet:getIngestProcessorSet", args ?? new GetIngestProcessorSetArgs(), options.WithDefaults());

        /// <summary>
        /// Sets one field and associates it with the specified value. If the field already exists, its value will be replaced with the provided one.
        /// 
        /// See: https://www.elastic.co/guide/en/elasticsearch/reference/current/set-processor.html
        /// 
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Elasticstack = Pulumi.Elasticstack;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var @set = Elasticstack.GetIngestProcessorSet.Invoke(new()
        ///     {
        ///         Field = "count",
        ///         Value = "1",
        ///     });
        /// 
        ///     var myIngestPipeline = new Elasticstack.IngestPipeline("myIngestPipeline", new()
        ///     {
        ///         Processors = new[]
        ///         {
        ///             @set.Apply(getIngestProcessorSetResult =&gt; getIngestProcessorSetResult).Apply(@set =&gt; @set.Apply(getIngestProcessorSetResult =&gt; getIngestProcessorSetResult.Json)),
        ///         },
        ///     });
        /// 
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetIngestProcessorSetResult> Invoke(GetIngestProcessorSetInvokeArgs args, InvokeOptions? options = null)
            => global::Pulumi.Deployment.Instance.Invoke<GetIngestProcessorSetResult>("elasticstack:index/getIngestProcessorSet:getIngestProcessorSet", args ?? new GetIngestProcessorSetInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetIngestProcessorSetArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The origin field which will be copied to `field`, cannot set `value` simultaneously.
        /// </summary>
        [Input("copyFrom")]
        public string? CopyFrom { get; set; }

        /// <summary>
        /// Description of the processor.
        /// </summary>
        [Input("description")]
        public string? Description { get; set; }

        /// <summary>
        /// The field to insert, upsert, or update.
        /// </summary>
        [Input("field", required: true)]
        public string Field { get; set; } = null!;

        /// <summary>
        /// Conditionally execute the processor
        /// </summary>
        [Input("if")]
        public string? If { get; set; }

        /// <summary>
        /// If `true` and `value` is a template snippet that evaluates to `null` or the empty string, the processor quietly exits without modifying the document
        /// </summary>
        [Input("ignoreEmptyValue")]
        public bool? IgnoreEmptyValue { get; set; }

        /// <summary>
        /// Ignore failures for the processor.
        /// </summary>
        [Input("ignoreFailure")]
        public bool? IgnoreFailure { get; set; }

        /// <summary>
        /// The media type for encoding value.
        /// </summary>
        [Input("mediaType")]
        public string? MediaType { get; set; }

        [Input("onFailures")]
        private List<string>? _onFailures;

        /// <summary>
        /// Handle failures for the processor.
        /// </summary>
        public List<string> OnFailures
        {
            get => _onFailures ?? (_onFailures = new List<string>());
            set => _onFailures = value;
        }

        /// <summary>
        /// If processor will update fields with pre-existing non-null-valued field.
        /// </summary>
        [Input("override")]
        public bool? Override { get; set; }

        /// <summary>
        /// Identifier for the processor.
        /// </summary>
        [Input("tag")]
        public string? Tag { get; set; }

        /// <summary>
        /// The value to be set for the field. Supports template snippets. May specify only one of `value` or `copy_from`.
        /// </summary>
        [Input("value")]
        public string? Value { get; set; }

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

    public sealed class GetIngestProcessorSetInvokeArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The origin field which will be copied to `field`, cannot set `value` simultaneously.
        /// </summary>
        [Input("copyFrom")]
        public Input<string>? CopyFrom { get; set; }

        /// <summary>
        /// Description of the processor.
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        /// <summary>
        /// The field to insert, upsert, or update.
        /// </summary>
        [Input("field", required: true)]
        public Input<string> Field { get; set; } = null!;

        /// <summary>
        /// Conditionally execute the processor
        /// </summary>
        [Input("if")]
        public Input<string>? If { get; set; }

        /// <summary>
        /// If `true` and `value` is a template snippet that evaluates to `null` or the empty string, the processor quietly exits without modifying the document
        /// </summary>
        [Input("ignoreEmptyValue")]
        public Input<bool>? IgnoreEmptyValue { get; set; }

        /// <summary>
        /// Ignore failures for the processor.
        /// </summary>
        [Input("ignoreFailure")]
        public Input<bool>? IgnoreFailure { get; set; }

        /// <summary>
        /// The media type for encoding value.
        /// </summary>
        [Input("mediaType")]
        public Input<string>? MediaType { get; set; }

        [Input("onFailures")]
        private InputList<string>? _onFailures;

        /// <summary>
        /// Handle failures for the processor.
        /// </summary>
        public InputList<string> OnFailures
        {
            get => _onFailures ?? (_onFailures = new InputList<string>());
            set => _onFailures = value;
        }

        /// <summary>
        /// If processor will update fields with pre-existing non-null-valued field.
        /// </summary>
        [Input("override")]
        public Input<bool>? Override { get; set; }

        /// <summary>
        /// Identifier for the processor.
        /// </summary>
        [Input("tag")]
        public Input<string>? Tag { get; set; }

        /// <summary>
        /// The value to be set for the field. Supports template snippets. May specify only one of `value` or `copy_from`.
        /// </summary>
        [Input("value")]
        public Input<string>? Value { get; set; }

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


    [OutputType]
    public sealed class GetIngestProcessorSetResult
    {
        /// <summary>
        /// The origin field which will be copied to `field`, cannot set `value` simultaneously.
        /// </summary>
        public readonly string? CopyFrom;
        /// <summary>
        /// Description of the processor.
        /// </summary>
        public readonly string? Description;
        /// <summary>
        /// The field to insert, upsert, or update.
        /// </summary>
        public readonly string Field;
        /// <summary>
        /// Internal identifier of the resource.
        /// </summary>
        public readonly string Id;
        /// <summary>
        /// Conditionally execute the processor
        /// </summary>
        public readonly string? If;
        /// <summary>
        /// If `true` and `value` is a template snippet that evaluates to `null` or the empty string, the processor quietly exits without modifying the document
        /// </summary>
        public readonly bool? IgnoreEmptyValue;
        /// <summary>
        /// Ignore failures for the processor.
        /// </summary>
        public readonly bool? IgnoreFailure;
        /// <summary>
        /// JSON representation of this data source.
        /// </summary>
        public readonly string Json;
        /// <summary>
        /// The media type for encoding value.
        /// </summary>
        public readonly string? MediaType;
        /// <summary>
        /// Handle failures for the processor.
        /// </summary>
        public readonly ImmutableArray<string> OnFailures;
        /// <summary>
        /// If processor will update fields with pre-existing non-null-valued field.
        /// </summary>
        public readonly bool? Override;
        /// <summary>
        /// Identifier for the processor.
        /// </summary>
        public readonly string? Tag;
        /// <summary>
        /// The value to be set for the field. Supports template snippets. May specify only one of `value` or `copy_from`.
        /// </summary>
        public readonly string? Value;

        [OutputConstructor]
        private GetIngestProcessorSetResult(
            string? copyFrom,

            string? description,

            string field,

            string id,

            string? @if,

            bool? ignoreEmptyValue,

            bool? ignoreFailure,

            string json,

            string? mediaType,

            ImmutableArray<string> onFailures,

            bool? @override,

            string? tag,

            string? value)
        {
            CopyFrom = copyFrom;
            Description = description;
            Field = field;
            Id = id;
            If = @if;
            IgnoreEmptyValue = ignoreEmptyValue;
            IgnoreFailure = ignoreFailure;
            Json = json;
            MediaType = mediaType;
            OnFailures = onFailures;
            Override = @override;
            Tag = tag;
            Value = value;
        }
    }
}
