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

import com.pulumi.core.annotations.Import;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class GetTaskExecutionPlacementStrategy extends com.pulumi.resources.InvokeArgs {

    public static final GetTaskExecutionPlacementStrategy Empty = new GetTaskExecutionPlacementStrategy();

    /**
     * The field to apply the placement strategy against.
     * 
     */
    @Import(name="field")
    private @Nullable String field;

    /**
     * @return The field to apply the placement strategy against.
     * 
     */
    public Optional<String> field() {
        return Optional.ofNullable(this.field);
    }

    /**
     * The type of placement strategy. Valid values are `random`, `spread`, and `binpack`.
     * 
     * For more information, see the [Placement Strategy](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_PlacementStrategy.html) documentation.
     * 
     */
    @Import(name="type", required=true)
    private String type;

    /**
     * @return The type of placement strategy. Valid values are `random`, `spread`, and `binpack`.
     * 
     * For more information, see the [Placement Strategy](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_PlacementStrategy.html) documentation.
     * 
     */
    public String type() {
        return this.type;
    }

    private GetTaskExecutionPlacementStrategy() {}

    private GetTaskExecutionPlacementStrategy(GetTaskExecutionPlacementStrategy $) {
        this.field = $.field;
        this.type = $.type;
    }

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

    public static final class Builder {
        private GetTaskExecutionPlacementStrategy $;

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

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

        /**
         * @param field The field to apply the placement strategy against.
         * 
         * @return builder
         * 
         */
        public Builder field(@Nullable String field) {
            $.field = field;
            return this;
        }

        /**
         * @param type The type of placement strategy. Valid values are `random`, `spread`, and `binpack`.
         * 
         * For more information, see the [Placement Strategy](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_PlacementStrategy.html) documentation.
         * 
         * @return builder
         * 
         */
        public Builder type(String type) {
            $.type = type;
            return this;
        }

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

}
