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

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.gcp.diagflow.inputs.CxPageTransitionRouteTriggerFulfillmentArgs;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final CxPageTransitionRouteArgs Empty = new CxPageTransitionRouteArgs();

    /**
     * The condition to evaluate against form parameters or session parameters.
     * At least one of intent or condition must be specified. When both intent and condition are specified, the transition can only happen when both are fulfilled.
     * 
     */
    @Import(name="condition")
    private @Nullable Output<String> condition;

    /**
     * @return The condition to evaluate against form parameters or session parameters.
     * At least one of intent or condition must be specified. When both intent and condition are specified, the transition can only happen when both are fulfilled.
     * 
     */
    public Optional<Output<String>> condition() {
        return Optional.ofNullable(this.condition);
    }

    /**
     * The unique identifier of an Intent.
     * Format: projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent ID&gt;/intents/&lt;Intent ID&gt;. Indicates that the transition can only happen when the given intent is matched. At least one of intent or condition must be specified. When both intent and condition are specified, the transition can only happen when both are fulfilled.
     * 
     */
    @Import(name="intent")
    private @Nullable Output<String> intent;

    /**
     * @return The unique identifier of an Intent.
     * Format: projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent ID&gt;/intents/&lt;Intent ID&gt;. Indicates that the transition can only happen when the given intent is matched. At least one of intent or condition must be specified. When both intent and condition are specified, the transition can only happen when both are fulfilled.
     * 
     */
    public Optional<Output<String>> intent() {
        return Optional.ofNullable(this.intent);
    }

    /**
     * (Output)
     * The unique identifier of this transition route.
     * 
     */
    @Import(name="name")
    private @Nullable Output<String> name;

    /**
     * @return (Output)
     * The unique identifier of this transition route.
     * 
     */
    public Optional<Output<String>> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * The target flow to transition to.
     * Format: projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent ID&gt;/flows/&lt;Flow ID&gt;.
     * 
     */
    @Import(name="targetFlow")
    private @Nullable Output<String> targetFlow;

    /**
     * @return The target flow to transition to.
     * Format: projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent ID&gt;/flows/&lt;Flow ID&gt;.
     * 
     */
    public Optional<Output<String>> targetFlow() {
        return Optional.ofNullable(this.targetFlow);
    }

    /**
     * The target page to transition to.
     * Format: projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent ID&gt;/flows/&lt;Flow ID&gt;/pages/&lt;Page ID&gt;.
     * 
     */
    @Import(name="targetPage")
    private @Nullable Output<String> targetPage;

    /**
     * @return The target page to transition to.
     * Format: projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent ID&gt;/flows/&lt;Flow ID&gt;/pages/&lt;Page ID&gt;.
     * 
     */
    public Optional<Output<String>> targetPage() {
        return Optional.ofNullable(this.targetPage);
    }

    /**
     * The fulfillment to call when the event occurs. Handling webhook errors with a fulfillment enabled with webhook could cause infinite loop. It is invalid to specify such fulfillment for a handler handling webhooks.
     * Structure is documented below.
     * 
     */
    @Import(name="triggerFulfillment")
    private @Nullable Output<CxPageTransitionRouteTriggerFulfillmentArgs> triggerFulfillment;

    /**
     * @return The fulfillment to call when the event occurs. Handling webhook errors with a fulfillment enabled with webhook could cause infinite loop. It is invalid to specify such fulfillment for a handler handling webhooks.
     * Structure is documented below.
     * 
     */
    public Optional<Output<CxPageTransitionRouteTriggerFulfillmentArgs>> triggerFulfillment() {
        return Optional.ofNullable(this.triggerFulfillment);
    }

    private CxPageTransitionRouteArgs() {}

    private CxPageTransitionRouteArgs(CxPageTransitionRouteArgs $) {
        this.condition = $.condition;
        this.intent = $.intent;
        this.name = $.name;
        this.targetFlow = $.targetFlow;
        this.targetPage = $.targetPage;
        this.triggerFulfillment = $.triggerFulfillment;
    }

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

    public static final class Builder {
        private CxPageTransitionRouteArgs $;

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

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

        /**
         * @param condition The condition to evaluate against form parameters or session parameters.
         * At least one of intent or condition must be specified. When both intent and condition are specified, the transition can only happen when both are fulfilled.
         * 
         * @return builder
         * 
         */
        public Builder condition(@Nullable Output<String> condition) {
            $.condition = condition;
            return this;
        }

        /**
         * @param condition The condition to evaluate against form parameters or session parameters.
         * At least one of intent or condition must be specified. When both intent and condition are specified, the transition can only happen when both are fulfilled.
         * 
         * @return builder
         * 
         */
        public Builder condition(String condition) {
            return condition(Output.of(condition));
        }

        /**
         * @param intent The unique identifier of an Intent.
         * Format: projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent ID&gt;/intents/&lt;Intent ID&gt;. Indicates that the transition can only happen when the given intent is matched. At least one of intent or condition must be specified. When both intent and condition are specified, the transition can only happen when both are fulfilled.
         * 
         * @return builder
         * 
         */
        public Builder intent(@Nullable Output<String> intent) {
            $.intent = intent;
            return this;
        }

        /**
         * @param intent The unique identifier of an Intent.
         * Format: projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent ID&gt;/intents/&lt;Intent ID&gt;. Indicates that the transition can only happen when the given intent is matched. At least one of intent or condition must be specified. When both intent and condition are specified, the transition can only happen when both are fulfilled.
         * 
         * @return builder
         * 
         */
        public Builder intent(String intent) {
            return intent(Output.of(intent));
        }

        /**
         * @param name (Output)
         * The unique identifier of this transition route.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output<String> name) {
            $.name = name;
            return this;
        }

        /**
         * @param name (Output)
         * The unique identifier of this transition route.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param targetFlow The target flow to transition to.
         * Format: projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent ID&gt;/flows/&lt;Flow ID&gt;.
         * 
         * @return builder
         * 
         */
        public Builder targetFlow(@Nullable Output<String> targetFlow) {
            $.targetFlow = targetFlow;
            return this;
        }

        /**
         * @param targetFlow The target flow to transition to.
         * Format: projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent ID&gt;/flows/&lt;Flow ID&gt;.
         * 
         * @return builder
         * 
         */
        public Builder targetFlow(String targetFlow) {
            return targetFlow(Output.of(targetFlow));
        }

        /**
         * @param targetPage The target page to transition to.
         * Format: projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent ID&gt;/flows/&lt;Flow ID&gt;/pages/&lt;Page ID&gt;.
         * 
         * @return builder
         * 
         */
        public Builder targetPage(@Nullable Output<String> targetPage) {
            $.targetPage = targetPage;
            return this;
        }

        /**
         * @param targetPage The target page to transition to.
         * Format: projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent ID&gt;/flows/&lt;Flow ID&gt;/pages/&lt;Page ID&gt;.
         * 
         * @return builder
         * 
         */
        public Builder targetPage(String targetPage) {
            return targetPage(Output.of(targetPage));
        }

        /**
         * @param triggerFulfillment The fulfillment to call when the event occurs. Handling webhook errors with a fulfillment enabled with webhook could cause infinite loop. It is invalid to specify such fulfillment for a handler handling webhooks.
         * Structure is documented below.
         * 
         * @return builder
         * 
         */
        public Builder triggerFulfillment(@Nullable Output<CxPageTransitionRouteTriggerFulfillmentArgs> triggerFulfillment) {
            $.triggerFulfillment = triggerFulfillment;
            return this;
        }

        /**
         * @param triggerFulfillment The fulfillment to call when the event occurs. Handling webhook errors with a fulfillment enabled with webhook could cause infinite loop. It is invalid to specify such fulfillment for a handler handling webhooks.
         * Structure is documented below.
         * 
         * @return builder
         * 
         */
        public Builder triggerFulfillment(CxPageTransitionRouteTriggerFulfillmentArgs triggerFulfillment) {
            return triggerFulfillment(Output.of(triggerFulfillment));
        }

        public CxPageTransitionRouteArgs build() {
            return $;
        }
    }

}
