All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azurenative.datafactory.inputs.CustomEventsTriggerArgs Maven / Gradle / Ivy

There is a newer version: 2.82.0
Show newest version
// *** 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.azurenative.datafactory.inputs;

import com.pulumi.azurenative.datafactory.inputs.TriggerPipelineReferenceArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.core.internal.Codegen;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Object;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * Trigger that runs every time a custom event is received.
 * 
 */
public final class CustomEventsTriggerArgs extends com.pulumi.resources.ResourceArgs {

    public static final CustomEventsTriggerArgs Empty = new CustomEventsTriggerArgs();

    /**
     * List of tags that can be used for describing the trigger.
     * 
     */
    @Import(name="annotations")
    private @Nullable Output> annotations;

    /**
     * @return List of tags that can be used for describing the trigger.
     * 
     */
    public Optional>> annotations() {
        return Optional.ofNullable(this.annotations);
    }

    /**
     * Trigger description.
     * 
     */
    @Import(name="description")
    private @Nullable Output description;

    /**
     * @return Trigger description.
     * 
     */
    public Optional> description() {
        return Optional.ofNullable(this.description);
    }

    /**
     * The list of event types that cause this trigger to fire.
     * 
     */
    @Import(name="events", required=true)
    private Output> events;

    /**
     * @return The list of event types that cause this trigger to fire.
     * 
     */
    public Output> events() {
        return this.events;
    }

    /**
     * Pipelines that need to be started.
     * 
     */
    @Import(name="pipelines")
    private @Nullable Output> pipelines;

    /**
     * @return Pipelines that need to be started.
     * 
     */
    public Optional>> pipelines() {
        return Optional.ofNullable(this.pipelines);
    }

    /**
     * The ARM resource ID of the Azure Event Grid Topic.
     * 
     */
    @Import(name="scope", required=true)
    private Output scope;

    /**
     * @return The ARM resource ID of the Azure Event Grid Topic.
     * 
     */
    public Output scope() {
        return this.scope;
    }

    /**
     * The event subject must begin with the pattern provided for trigger to fire. At least one of these must be provided: subjectBeginsWith, subjectEndsWith.
     * 
     */
    @Import(name="subjectBeginsWith")
    private @Nullable Output subjectBeginsWith;

    /**
     * @return The event subject must begin with the pattern provided for trigger to fire. At least one of these must be provided: subjectBeginsWith, subjectEndsWith.
     * 
     */
    public Optional> subjectBeginsWith() {
        return Optional.ofNullable(this.subjectBeginsWith);
    }

    /**
     * The event subject must end with the pattern provided for trigger to fire. At least one of these must be provided: subjectBeginsWith, subjectEndsWith.
     * 
     */
    @Import(name="subjectEndsWith")
    private @Nullable Output subjectEndsWith;

    /**
     * @return The event subject must end with the pattern provided for trigger to fire. At least one of these must be provided: subjectBeginsWith, subjectEndsWith.
     * 
     */
    public Optional> subjectEndsWith() {
        return Optional.ofNullable(this.subjectEndsWith);
    }

    /**
     * Trigger type.
     * Expected value is 'CustomEventsTrigger'.
     * 
     */
    @Import(name="type", required=true)
    private Output type;

    /**
     * @return Trigger type.
     * Expected value is 'CustomEventsTrigger'.
     * 
     */
    public Output type() {
        return this.type;
    }

    private CustomEventsTriggerArgs() {}

    private CustomEventsTriggerArgs(CustomEventsTriggerArgs $) {
        this.annotations = $.annotations;
        this.description = $.description;
        this.events = $.events;
        this.pipelines = $.pipelines;
        this.scope = $.scope;
        this.subjectBeginsWith = $.subjectBeginsWith;
        this.subjectEndsWith = $.subjectEndsWith;
        this.type = $.type;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(CustomEventsTriggerArgs defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private CustomEventsTriggerArgs $;

        public Builder() {
            $ = new CustomEventsTriggerArgs();
        }

        public Builder(CustomEventsTriggerArgs defaults) {
            $ = new CustomEventsTriggerArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param annotations List of tags that can be used for describing the trigger.
         * 
         * @return builder
         * 
         */
        public Builder annotations(@Nullable Output> annotations) {
            $.annotations = annotations;
            return this;
        }

        /**
         * @param annotations List of tags that can be used for describing the trigger.
         * 
         * @return builder
         * 
         */
        public Builder annotations(List annotations) {
            return annotations(Output.of(annotations));
        }

        /**
         * @param annotations List of tags that can be used for describing the trigger.
         * 
         * @return builder
         * 
         */
        public Builder annotations(Object... annotations) {
            return annotations(List.of(annotations));
        }

        /**
         * @param description Trigger description.
         * 
         * @return builder
         * 
         */
        public Builder description(@Nullable Output description) {
            $.description = description;
            return this;
        }

        /**
         * @param description Trigger description.
         * 
         * @return builder
         * 
         */
        public Builder description(String description) {
            return description(Output.of(description));
        }

        /**
         * @param events The list of event types that cause this trigger to fire.
         * 
         * @return builder
         * 
         */
        public Builder events(Output> events) {
            $.events = events;
            return this;
        }

        /**
         * @param events The list of event types that cause this trigger to fire.
         * 
         * @return builder
         * 
         */
        public Builder events(List events) {
            return events(Output.of(events));
        }

        /**
         * @param events The list of event types that cause this trigger to fire.
         * 
         * @return builder
         * 
         */
        public Builder events(Object... events) {
            return events(List.of(events));
        }

        /**
         * @param pipelines Pipelines that need to be started.
         * 
         * @return builder
         * 
         */
        public Builder pipelines(@Nullable Output> pipelines) {
            $.pipelines = pipelines;
            return this;
        }

        /**
         * @param pipelines Pipelines that need to be started.
         * 
         * @return builder
         * 
         */
        public Builder pipelines(List pipelines) {
            return pipelines(Output.of(pipelines));
        }

        /**
         * @param pipelines Pipelines that need to be started.
         * 
         * @return builder
         * 
         */
        public Builder pipelines(TriggerPipelineReferenceArgs... pipelines) {
            return pipelines(List.of(pipelines));
        }

        /**
         * @param scope The ARM resource ID of the Azure Event Grid Topic.
         * 
         * @return builder
         * 
         */
        public Builder scope(Output scope) {
            $.scope = scope;
            return this;
        }

        /**
         * @param scope The ARM resource ID of the Azure Event Grid Topic.
         * 
         * @return builder
         * 
         */
        public Builder scope(String scope) {
            return scope(Output.of(scope));
        }

        /**
         * @param subjectBeginsWith The event subject must begin with the pattern provided for trigger to fire. At least one of these must be provided: subjectBeginsWith, subjectEndsWith.
         * 
         * @return builder
         * 
         */
        public Builder subjectBeginsWith(@Nullable Output subjectBeginsWith) {
            $.subjectBeginsWith = subjectBeginsWith;
            return this;
        }

        /**
         * @param subjectBeginsWith The event subject must begin with the pattern provided for trigger to fire. At least one of these must be provided: subjectBeginsWith, subjectEndsWith.
         * 
         * @return builder
         * 
         */
        public Builder subjectBeginsWith(String subjectBeginsWith) {
            return subjectBeginsWith(Output.of(subjectBeginsWith));
        }

        /**
         * @param subjectEndsWith The event subject must end with the pattern provided for trigger to fire. At least one of these must be provided: subjectBeginsWith, subjectEndsWith.
         * 
         * @return builder
         * 
         */
        public Builder subjectEndsWith(@Nullable Output subjectEndsWith) {
            $.subjectEndsWith = subjectEndsWith;
            return this;
        }

        /**
         * @param subjectEndsWith The event subject must end with the pattern provided for trigger to fire. At least one of these must be provided: subjectBeginsWith, subjectEndsWith.
         * 
         * @return builder
         * 
         */
        public Builder subjectEndsWith(String subjectEndsWith) {
            return subjectEndsWith(Output.of(subjectEndsWith));
        }

        /**
         * @param type Trigger type.
         * Expected value is 'CustomEventsTrigger'.
         * 
         * @return builder
         * 
         */
        public Builder type(Output type) {
            $.type = type;
            return this;
        }

        /**
         * @param type Trigger type.
         * Expected value is 'CustomEventsTrigger'.
         * 
         * @return builder
         * 
         */
        public Builder type(String type) {
            return type(Output.of(type));
        }

        public CustomEventsTriggerArgs build() {
            if ($.events == null) {
                throw new MissingRequiredPropertyException("CustomEventsTriggerArgs", "events");
            }
            if ($.scope == null) {
                throw new MissingRequiredPropertyException("CustomEventsTriggerArgs", "scope");
            }
            $.type = Codegen.stringProp("type").output().arg($.type).require();
            return $;
        }
    }

}