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

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.gcp.networkservices.inputs.GrpcRouteRuleActionFaultInjectionPolicyAbortArgs;
import com.pulumi.gcp.networkservices.inputs.GrpcRouteRuleActionFaultInjectionPolicyDelayArgs;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final GrpcRouteRuleActionFaultInjectionPolicyArgs Empty = new GrpcRouteRuleActionFaultInjectionPolicyArgs();

    /**
     * Specification of how client requests are aborted as part of fault injection before being sent to a destination.
     * Structure is documented below.
     * 
     */
    @Import(name="abort")
    private @Nullable Output<GrpcRouteRuleActionFaultInjectionPolicyAbortArgs> abort;

    /**
     * @return Specification of how client requests are aborted as part of fault injection before being sent to a destination.
     * Structure is documented below.
     * 
     */
    public Optional<Output<GrpcRouteRuleActionFaultInjectionPolicyAbortArgs>> abort() {
        return Optional.ofNullable(this.abort);
    }

    /**
     * Specification of how client requests are delayed as part of fault injection before being sent to a destination.
     * Structure is documented below.
     * 
     */
    @Import(name="delay")
    private @Nullable Output<GrpcRouteRuleActionFaultInjectionPolicyDelayArgs> delay;

    /**
     * @return Specification of how client requests are delayed as part of fault injection before being sent to a destination.
     * Structure is documented below.
     * 
     */
    public Optional<Output<GrpcRouteRuleActionFaultInjectionPolicyDelayArgs>> delay() {
        return Optional.ofNullable(this.delay);
    }

    private GrpcRouteRuleActionFaultInjectionPolicyArgs() {}

    private GrpcRouteRuleActionFaultInjectionPolicyArgs(GrpcRouteRuleActionFaultInjectionPolicyArgs $) {
        this.abort = $.abort;
        this.delay = $.delay;
    }

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

    public static final class Builder {
        private GrpcRouteRuleActionFaultInjectionPolicyArgs $;

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

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

        /**
         * @param abort Specification of how client requests are aborted as part of fault injection before being sent to a destination.
         * Structure is documented below.
         * 
         * @return builder
         * 
         */
        public Builder abort(@Nullable Output<GrpcRouteRuleActionFaultInjectionPolicyAbortArgs> abort) {
            $.abort = abort;
            return this;
        }

        /**
         * @param abort Specification of how client requests are aborted as part of fault injection before being sent to a destination.
         * Structure is documented below.
         * 
         * @return builder
         * 
         */
        public Builder abort(GrpcRouteRuleActionFaultInjectionPolicyAbortArgs abort) {
            return abort(Output.of(abort));
        }

        /**
         * @param delay Specification of how client requests are delayed as part of fault injection before being sent to a destination.
         * Structure is documented below.
         * 
         * @return builder
         * 
         */
        public Builder delay(@Nullable Output<GrpcRouteRuleActionFaultInjectionPolicyDelayArgs> delay) {
            $.delay = delay;
            return this;
        }

        /**
         * @param delay Specification of how client requests are delayed as part of fault injection before being sent to a destination.
         * Structure is documented below.
         * 
         * @return builder
         * 
         */
        public Builder delay(GrpcRouteRuleActionFaultInjectionPolicyDelayArgs delay) {
            return delay(Output.of(delay));
        }

        public GrpcRouteRuleActionFaultInjectionPolicyArgs build() {
            return $;
        }
    }

}
