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

import com.pulumi.aws.appmesh.inputs.RouteSpecTcpRouteActionArgs;
import com.pulumi.aws.appmesh.inputs.RouteSpecTcpRouteMatchArgs;
import com.pulumi.aws.appmesh.inputs.RouteSpecTcpRouteTimeoutArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final RouteSpecTcpRouteArgs Empty = new RouteSpecTcpRouteArgs();

    /**
     * Action to take if a match is determined.
     * 
     */
    @Import(name="action", required=true)
    private Output<RouteSpecTcpRouteActionArgs> action;

    /**
     * @return Action to take if a match is determined.
     * 
     */
    public Output<RouteSpecTcpRouteActionArgs> action() {
        return this.action;
    }

    /**
     * Criteria for determining an gRPC request match.
     * 
     */
    @Import(name="match")
    private @Nullable Output<RouteSpecTcpRouteMatchArgs> match;

    /**
     * @return Criteria for determining an gRPC request match.
     * 
     */
    public Optional<Output<RouteSpecTcpRouteMatchArgs>> match() {
        return Optional.ofNullable(this.match);
    }

    /**
     * Types of timeouts.
     * 
     */
    @Import(name="timeout")
    private @Nullable Output<RouteSpecTcpRouteTimeoutArgs> timeout;

    /**
     * @return Types of timeouts.
     * 
     */
    public Optional<Output<RouteSpecTcpRouteTimeoutArgs>> timeout() {
        return Optional.ofNullable(this.timeout);
    }

    private RouteSpecTcpRouteArgs() {}

    private RouteSpecTcpRouteArgs(RouteSpecTcpRouteArgs $) {
        this.action = $.action;
        this.match = $.match;
        this.timeout = $.timeout;
    }

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

    public static final class Builder {
        private RouteSpecTcpRouteArgs $;

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

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

        /**
         * @param action Action to take if a match is determined.
         * 
         * @return builder
         * 
         */
        public Builder action(Output<RouteSpecTcpRouteActionArgs> action) {
            $.action = action;
            return this;
        }

        /**
         * @param action Action to take if a match is determined.
         * 
         * @return builder
         * 
         */
        public Builder action(RouteSpecTcpRouteActionArgs action) {
            return action(Output.of(action));
        }

        /**
         * @param match Criteria for determining an gRPC request match.
         * 
         * @return builder
         * 
         */
        public Builder match(@Nullable Output<RouteSpecTcpRouteMatchArgs> match) {
            $.match = match;
            return this;
        }

        /**
         * @param match Criteria for determining an gRPC request match.
         * 
         * @return builder
         * 
         */
        public Builder match(RouteSpecTcpRouteMatchArgs match) {
            return match(Output.of(match));
        }

        /**
         * @param timeout Types of timeouts.
         * 
         * @return builder
         * 
         */
        public Builder timeout(@Nullable Output<RouteSpecTcpRouteTimeoutArgs> timeout) {
            $.timeout = timeout;
            return this;
        }

        /**
         * @param timeout Types of timeouts.
         * 
         * @return builder
         * 
         */
        public Builder timeout(RouteSpecTcpRouteTimeoutArgs timeout) {
            return timeout(Output.of(timeout));
        }

        public RouteSpecTcpRouteArgs build() {
            $.action = Objects.requireNonNull($.action, "expected parameter 'action' to be non-null");
            return $;
        }
    }

}
