// *** 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.GetAmiFilter;
import com.pulumi.core.annotations.Import;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final GetAmiPlainArgs Empty = new GetAmiPlainArgs();

    /**
     * Limit search to users with *explicit* launch permission on
     * the image. Valid items are the numeric account ID or `self`.
     * 
     */
    @Import(name="executableUsers")
    private @Nullable List<String> executableUsers;

    /**
     * @return Limit search to users with *explicit* launch permission on
     * the image. Valid items are the numeric account ID or `self`.
     * 
     */
    public Optional<List<String>> executableUsers() {
        return Optional.ofNullable(this.executableUsers);
    }

    /**
     * One or more name/value pairs to filter off of. There are
     * several valid keys, for a full reference, check out
     * [describe-images in the AWS CLI reference][1].
     * 
     */
    @Import(name="filters")
    private @Nullable List<GetAmiFilter> filters;

    /**
     * @return One or more name/value pairs to filter off of. There are
     * several valid keys, for a full reference, check out
     * [describe-images in the AWS CLI reference][1].
     * 
     */
    public Optional<List<GetAmiFilter>> filters() {
        return Optional.ofNullable(this.filters);
    }

    /**
     * If true, all deprecated AMIs are included in the response. If false, no deprecated AMIs are included in the response. If no value is specified, the default value is false.
     * 
     */
    @Import(name="includeDeprecated")
    private @Nullable Boolean includeDeprecated;

    /**
     * @return If true, all deprecated AMIs are included in the response. If false, no deprecated AMIs are included in the response. If no value is specified, the default value is false.
     * 
     */
    public Optional<Boolean> includeDeprecated() {
        return Optional.ofNullable(this.includeDeprecated);
    }

    /**
     * If more than one result is returned, use the most
     * recent AMI.
     * 
     */
    @Import(name="mostRecent")
    private @Nullable Boolean mostRecent;

    /**
     * @return If more than one result is returned, use the most
     * recent AMI.
     * 
     */
    public Optional<Boolean> mostRecent() {
        return Optional.ofNullable(this.mostRecent);
    }

    /**
     * Regex string to apply to the AMI list returned
     * by AWS. This allows more advanced filtering not supported from the AWS API. This
     * filtering is done locally on what AWS returns, and could have a performance
     * impact if the result is large. Combine this with other
     * options to narrow down the list AWS returns.
     * 
     * &gt; **NOTE:** If more or less than a single match is returned by the search,
     * this call will fail. Ensure that your search is specific enough to return
     * a single AMI ID only, or use `most_recent` to choose the most recent one. If
     * you want to match multiple AMIs, use the `aws.ec2.getAmiIds` data source instead.
     * 
     */
    @Import(name="nameRegex")
    private @Nullable String nameRegex;

    /**
     * @return Regex string to apply to the AMI list returned
     * by AWS. This allows more advanced filtering not supported from the AWS API. This
     * filtering is done locally on what AWS returns, and could have a performance
     * impact if the result is large. Combine this with other
     * options to narrow down the list AWS returns.
     * 
     * &gt; **NOTE:** If more or less than a single match is returned by the search,
     * this call will fail. Ensure that your search is specific enough to return
     * a single AMI ID only, or use `most_recent` to choose the most recent one. If
     * you want to match multiple AMIs, use the `aws.ec2.getAmiIds` data source instead.
     * 
     */
    public Optional<String> nameRegex() {
        return Optional.ofNullable(this.nameRegex);
    }

    /**
     * List of AMI owners to limit search. Valid values: an AWS account ID, `self` (the current account), or an AWS owner alias (e.g., `amazon`, `aws-marketplace`, `microsoft`).
     * 
     */
    @Import(name="owners")
    private @Nullable List<String> owners;

    /**
     * @return List of AMI owners to limit search. Valid values: an AWS account ID, `self` (the current account), or an AWS owner alias (e.g., `amazon`, `aws-marketplace`, `microsoft`).
     * 
     */
    public Optional<List<String>> owners() {
        return Optional.ofNullable(this.owners);
    }

    /**
     * Any tags assigned to the image.
     * * `tags.#.key` - Key name of the tag.
     * * `tags.#.value` - Value of the tag.
     * 
     */
    @Import(name="tags")
    private @Nullable Map<String,String> tags;

    /**
     * @return Any tags assigned to the image.
     * * `tags.#.key` - Key name of the tag.
     * * `tags.#.value` - Value of the tag.
     * 
     */
    public Optional<Map<String,String>> tags() {
        return Optional.ofNullable(this.tags);
    }

    private GetAmiPlainArgs() {}

    private GetAmiPlainArgs(GetAmiPlainArgs $) {
        this.executableUsers = $.executableUsers;
        this.filters = $.filters;
        this.includeDeprecated = $.includeDeprecated;
        this.mostRecent = $.mostRecent;
        this.nameRegex = $.nameRegex;
        this.owners = $.owners;
        this.tags = $.tags;
    }

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

    public static final class Builder {
        private GetAmiPlainArgs $;

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

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

        /**
         * @param executableUsers Limit search to users with *explicit* launch permission on
         * the image. Valid items are the numeric account ID or `self`.
         * 
         * @return builder
         * 
         */
        public Builder executableUsers(@Nullable List<String> executableUsers) {
            $.executableUsers = executableUsers;
            return this;
        }

        /**
         * @param executableUsers Limit search to users with *explicit* launch permission on
         * the image. Valid items are the numeric account ID or `self`.
         * 
         * @return builder
         * 
         */
        public Builder executableUsers(String... executableUsers) {
            return executableUsers(List.of(executableUsers));
        }

        /**
         * @param filters One or more name/value pairs to filter off of. There are
         * several valid keys, for a full reference, check out
         * [describe-images in the AWS CLI reference][1].
         * 
         * @return builder
         * 
         */
        public Builder filters(@Nullable List<GetAmiFilter> filters) {
            $.filters = filters;
            return this;
        }

        /**
         * @param filters One or more name/value pairs to filter off of. There are
         * several valid keys, for a full reference, check out
         * [describe-images in the AWS CLI reference][1].
         * 
         * @return builder
         * 
         */
        public Builder filters(GetAmiFilter... filters) {
            return filters(List.of(filters));
        }

        /**
         * @param includeDeprecated If true, all deprecated AMIs are included in the response. If false, no deprecated AMIs are included in the response. If no value is specified, the default value is false.
         * 
         * @return builder
         * 
         */
        public Builder includeDeprecated(@Nullable Boolean includeDeprecated) {
            $.includeDeprecated = includeDeprecated;
            return this;
        }

        /**
         * @param mostRecent If more than one result is returned, use the most
         * recent AMI.
         * 
         * @return builder
         * 
         */
        public Builder mostRecent(@Nullable Boolean mostRecent) {
            $.mostRecent = mostRecent;
            return this;
        }

        /**
         * @param nameRegex Regex string to apply to the AMI list returned
         * by AWS. This allows more advanced filtering not supported from the AWS API. This
         * filtering is done locally on what AWS returns, and could have a performance
         * impact if the result is large. Combine this with other
         * options to narrow down the list AWS returns.
         * 
         * &gt; **NOTE:** If more or less than a single match is returned by the search,
         * this call will fail. Ensure that your search is specific enough to return
         * a single AMI ID only, or use `most_recent` to choose the most recent one. If
         * you want to match multiple AMIs, use the `aws.ec2.getAmiIds` data source instead.
         * 
         * @return builder
         * 
         */
        public Builder nameRegex(@Nullable String nameRegex) {
            $.nameRegex = nameRegex;
            return this;
        }

        /**
         * @param owners List of AMI owners to limit search. Valid values: an AWS account ID, `self` (the current account), or an AWS owner alias (e.g., `amazon`, `aws-marketplace`, `microsoft`).
         * 
         * @return builder
         * 
         */
        public Builder owners(@Nullable List<String> owners) {
            $.owners = owners;
            return this;
        }

        /**
         * @param owners List of AMI owners to limit search. Valid values: an AWS account ID, `self` (the current account), or an AWS owner alias (e.g., `amazon`, `aws-marketplace`, `microsoft`).
         * 
         * @return builder
         * 
         */
        public Builder owners(String... owners) {
            return owners(List.of(owners));
        }

        /**
         * @param tags Any tags assigned to the image.
         * * `tags.#.key` - Key name of the tag.
         * * `tags.#.value` - Value of the tag.
         * 
         * @return builder
         * 
         */
        public Builder tags(@Nullable Map<String,String> tags) {
            $.tags = tags;
            return this;
        }

        public GetAmiPlainArgs build() {
            return $;
        }
    }

}
