// *** 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.gcp.dataplex.inputs;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.gcp.dataplex.inputs.DatascanExecutionSpecTriggerOnDemandArgs;
import com.pulumi.gcp.dataplex.inputs.DatascanExecutionSpecTriggerScheduleArgs;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class DatascanExecutionSpecTriggerArgs extends com.pulumi.resources.ResourceArgs {

    public static final DatascanExecutionSpecTriggerArgs Empty = new DatascanExecutionSpecTriggerArgs();

    /**
     * The scan runs once via dataScans.run API.
     * 
     */
    @Import(name="onDemand")
    private @Nullable Output<DatascanExecutionSpecTriggerOnDemandArgs> onDemand;

    /**
     * @return The scan runs once via dataScans.run API.
     * 
     */
    public Optional<Output<DatascanExecutionSpecTriggerOnDemandArgs>> onDemand() {
        return Optional.ofNullable(this.onDemand);
    }

    /**
     * The scan is scheduled to run periodically.
     * Structure is documented below.
     * 
     */
    @Import(name="schedule")
    private @Nullable Output<DatascanExecutionSpecTriggerScheduleArgs> schedule;

    /**
     * @return The scan is scheduled to run periodically.
     * Structure is documented below.
     * 
     */
    public Optional<Output<DatascanExecutionSpecTriggerScheduleArgs>> schedule() {
        return Optional.ofNullable(this.schedule);
    }

    private DatascanExecutionSpecTriggerArgs() {}

    private DatascanExecutionSpecTriggerArgs(DatascanExecutionSpecTriggerArgs $) {
        this.onDemand = $.onDemand;
        this.schedule = $.schedule;
    }

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

    public static final class Builder {
        private DatascanExecutionSpecTriggerArgs $;

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

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

        /**
         * @param onDemand The scan runs once via dataScans.run API.
         * 
         * @return builder
         * 
         */
        public Builder onDemand(@Nullable Output<DatascanExecutionSpecTriggerOnDemandArgs> onDemand) {
            $.onDemand = onDemand;
            return this;
        }

        /**
         * @param onDemand The scan runs once via dataScans.run API.
         * 
         * @return builder
         * 
         */
        public Builder onDemand(DatascanExecutionSpecTriggerOnDemandArgs onDemand) {
            return onDemand(Output.of(onDemand));
        }

        /**
         * @param schedule The scan is scheduled to run periodically.
         * Structure is documented below.
         * 
         * @return builder
         * 
         */
        public Builder schedule(@Nullable Output<DatascanExecutionSpecTriggerScheduleArgs> schedule) {
            $.schedule = schedule;
            return this;
        }

        /**
         * @param schedule The scan is scheduled to run periodically.
         * Structure is documented below.
         * 
         * @return builder
         * 
         */
        public Builder schedule(DatascanExecutionSpecTriggerScheduleArgs schedule) {
            return schedule(Output.of(schedule));
        }

        public DatascanExecutionSpecTriggerArgs build() {
            return $;
        }
    }

}
