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

import com.pulumi.aws.ec2.inputs.GetInstanceTypeOfferingFilterArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final GetInstanceTypeOfferingArgs Empty = new GetInstanceTypeOfferingArgs();

    /**
     * One or more configuration blocks containing name-values filters. See the [EC2 API Reference](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstanceTypeOfferings.html) for supported filters. Detailed below.
     * 
     */
    @Import(name="filters")
    private @Nullable Output<List<GetInstanceTypeOfferingFilterArgs>> filters;

    /**
     * @return One or more configuration blocks containing name-values filters. See the [EC2 API Reference](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstanceTypeOfferings.html) for supported filters. Detailed below.
     * 
     */
    public Optional<Output<List<GetInstanceTypeOfferingFilterArgs>>> filters() {
        return Optional.ofNullable(this.filters);
    }

    /**
     * Location type. Defaults to `region`. Valid values: `availability-zone`, `availability-zone-id`, and `region`.
     * 
     */
    @Import(name="locationType")
    private @Nullable Output<String> locationType;

    /**
     * @return Location type. Defaults to `region`. Valid values: `availability-zone`, `availability-zone-id`, and `region`.
     * 
     */
    public Optional<Output<String>> locationType() {
        return Optional.ofNullable(this.locationType);
    }

    /**
     * Ordered list of preferred EC2 Instance Types. The first match in this list will be returned. If no preferred matches are found and the original search returned more than one result, an error is returned.
     * 
     */
    @Import(name="preferredInstanceTypes")
    private @Nullable Output<List<String>> preferredInstanceTypes;

    /**
     * @return Ordered list of preferred EC2 Instance Types. The first match in this list will be returned. If no preferred matches are found and the original search returned more than one result, an error is returned.
     * 
     */
    public Optional<Output<List<String>>> preferredInstanceTypes() {
        return Optional.ofNullable(this.preferredInstanceTypes);
    }

    private GetInstanceTypeOfferingArgs() {}

    private GetInstanceTypeOfferingArgs(GetInstanceTypeOfferingArgs $) {
        this.filters = $.filters;
        this.locationType = $.locationType;
        this.preferredInstanceTypes = $.preferredInstanceTypes;
    }

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

    public static final class Builder {
        private GetInstanceTypeOfferingArgs $;

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

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

        /**
         * @param filters One or more configuration blocks containing name-values filters. See the [EC2 API Reference](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstanceTypeOfferings.html) for supported filters. Detailed below.
         * 
         * @return builder
         * 
         */
        public Builder filters(@Nullable Output<List<GetInstanceTypeOfferingFilterArgs>> filters) {
            $.filters = filters;
            return this;
        }

        /**
         * @param filters One or more configuration blocks containing name-values filters. See the [EC2 API Reference](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstanceTypeOfferings.html) for supported filters. Detailed below.
         * 
         * @return builder
         * 
         */
        public Builder filters(List<GetInstanceTypeOfferingFilterArgs> filters) {
            return filters(Output.of(filters));
        }

        /**
         * @param filters One or more configuration blocks containing name-values filters. See the [EC2 API Reference](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstanceTypeOfferings.html) for supported filters. Detailed below.
         * 
         * @return builder
         * 
         */
        public Builder filters(GetInstanceTypeOfferingFilterArgs... filters) {
            return filters(List.of(filters));
        }

        /**
         * @param locationType Location type. Defaults to `region`. Valid values: `availability-zone`, `availability-zone-id`, and `region`.
         * 
         * @return builder
         * 
         */
        public Builder locationType(@Nullable Output<String> locationType) {
            $.locationType = locationType;
            return this;
        }

        /**
         * @param locationType Location type. Defaults to `region`. Valid values: `availability-zone`, `availability-zone-id`, and `region`.
         * 
         * @return builder
         * 
         */
        public Builder locationType(String locationType) {
            return locationType(Output.of(locationType));
        }

        /**
         * @param preferredInstanceTypes Ordered list of preferred EC2 Instance Types. The first match in this list will be returned. If no preferred matches are found and the original search returned more than one result, an error is returned.
         * 
         * @return builder
         * 
         */
        public Builder preferredInstanceTypes(@Nullable Output<List<String>> preferredInstanceTypes) {
            $.preferredInstanceTypes = preferredInstanceTypes;
            return this;
        }

        /**
         * @param preferredInstanceTypes Ordered list of preferred EC2 Instance Types. The first match in this list will be returned. If no preferred matches are found and the original search returned more than one result, an error is returned.
         * 
         * @return builder
         * 
         */
        public Builder preferredInstanceTypes(List<String> preferredInstanceTypes) {
            return preferredInstanceTypes(Output.of(preferredInstanceTypes));
        }

        /**
         * @param preferredInstanceTypes Ordered list of preferred EC2 Instance Types. The first match in this list will be returned. If no preferred matches are found and the original search returned more than one result, an error is returned.
         * 
         * @return builder
         * 
         */
        public Builder preferredInstanceTypes(String... preferredInstanceTypes) {
            return preferredInstanceTypes(List.of(preferredInstanceTypes));
        }

        public GetInstanceTypeOfferingArgs build() {
            return $;
        }
    }

}
