// *** 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.RouteSpecHttpRouteActionWeightedTargetArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.util.List;
import java.util.Objects;


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

    public static final RouteSpecHttpRouteActionArgs Empty = new RouteSpecHttpRouteActionArgs();

    /**
     * Targets that traffic is routed to when a request matches the route.
     * You can specify one or more targets and their relative weights with which to distribute traffic.
     * 
     */
    @Import(name="weightedTargets", required=true)
    private Output<List<RouteSpecHttpRouteActionWeightedTargetArgs>> weightedTargets;

    /**
     * @return Targets that traffic is routed to when a request matches the route.
     * You can specify one or more targets and their relative weights with which to distribute traffic.
     * 
     */
    public Output<List<RouteSpecHttpRouteActionWeightedTargetArgs>> weightedTargets() {
        return this.weightedTargets;
    }

    private RouteSpecHttpRouteActionArgs() {}

    private RouteSpecHttpRouteActionArgs(RouteSpecHttpRouteActionArgs $) {
        this.weightedTargets = $.weightedTargets;
    }

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

    public static final class Builder {
        private RouteSpecHttpRouteActionArgs $;

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

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

        /**
         * @param weightedTargets Targets that traffic is routed to when a request matches the route.
         * You can specify one or more targets and their relative weights with which to distribute traffic.
         * 
         * @return builder
         * 
         */
        public Builder weightedTargets(Output<List<RouteSpecHttpRouteActionWeightedTargetArgs>> weightedTargets) {
            $.weightedTargets = weightedTargets;
            return this;
        }

        /**
         * @param weightedTargets Targets that traffic is routed to when a request matches the route.
         * You can specify one or more targets and their relative weights with which to distribute traffic.
         * 
         * @return builder
         * 
         */
        public Builder weightedTargets(List<RouteSpecHttpRouteActionWeightedTargetArgs> weightedTargets) {
            return weightedTargets(Output.of(weightedTargets));
        }

        /**
         * @param weightedTargets Targets that traffic is routed to when a request matches the route.
         * You can specify one or more targets and their relative weights with which to distribute traffic.
         * 
         * @return builder
         * 
         */
        public Builder weightedTargets(RouteSpecHttpRouteActionWeightedTargetArgs... weightedTargets) {
            return weightedTargets(List.of(weightedTargets));
        }

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

}
