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

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


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

    public static final GetImageArgs Empty = new GetImageArgs();

    /**
     * Sha256 digest of the image manifest. At least one of `image_digest`, `image_tag`, or `most_recent` must be specified.
     * 
     */
    @Import(name="imageDigest")
    private @Nullable Output<String> imageDigest;

    /**
     * @return Sha256 digest of the image manifest. At least one of `image_digest`, `image_tag`, or `most_recent` must be specified.
     * 
     */
    public Optional<Output<String>> imageDigest() {
        return Optional.ofNullable(this.imageDigest);
    }

    /**
     * Tag associated with this image. At least one of `image_digest`, `image_tag`, or `most_recent` must be specified.
     * 
     */
    @Import(name="imageTag")
    private @Nullable Output<String> imageTag;

    /**
     * @return Tag associated with this image. At least one of `image_digest`, `image_tag`, or `most_recent` must be specified.
     * 
     */
    public Optional<Output<String>> imageTag() {
        return Optional.ofNullable(this.imageTag);
    }

    /**
     * Return the most recently pushed image. At least one of `image_digest`, `image_tag`, or `most_recent` must be specified.
     * 
     */
    @Import(name="mostRecent")
    private @Nullable Output<Boolean> mostRecent;

    /**
     * @return Return the most recently pushed image. At least one of `image_digest`, `image_tag`, or `most_recent` must be specified.
     * 
     */
    public Optional<Output<Boolean>> mostRecent() {
        return Optional.ofNullable(this.mostRecent);
    }

    /**
     * ID of the Registry where the repository resides.
     * 
     */
    @Import(name="registryId")
    private @Nullable Output<String> registryId;

    /**
     * @return ID of the Registry where the repository resides.
     * 
     */
    public Optional<Output<String>> registryId() {
        return Optional.ofNullable(this.registryId);
    }

    /**
     * Name of the ECR Repository.
     * 
     */
    @Import(name="repositoryName", required=true)
    private Output<String> repositoryName;

    /**
     * @return Name of the ECR Repository.
     * 
     */
    public Output<String> repositoryName() {
        return this.repositoryName;
    }

    private GetImageArgs() {}

    private GetImageArgs(GetImageArgs $) {
        this.imageDigest = $.imageDigest;
        this.imageTag = $.imageTag;
        this.mostRecent = $.mostRecent;
        this.registryId = $.registryId;
        this.repositoryName = $.repositoryName;
    }

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

    public static final class Builder {
        private GetImageArgs $;

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

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

        /**
         * @param imageDigest Sha256 digest of the image manifest. At least one of `image_digest`, `image_tag`, or `most_recent` must be specified.
         * 
         * @return builder
         * 
         */
        public Builder imageDigest(@Nullable Output<String> imageDigest) {
            $.imageDigest = imageDigest;
            return this;
        }

        /**
         * @param imageDigest Sha256 digest of the image manifest. At least one of `image_digest`, `image_tag`, or `most_recent` must be specified.
         * 
         * @return builder
         * 
         */
        public Builder imageDigest(String imageDigest) {
            return imageDigest(Output.of(imageDigest));
        }

        /**
         * @param imageTag Tag associated with this image. At least one of `image_digest`, `image_tag`, or `most_recent` must be specified.
         * 
         * @return builder
         * 
         */
        public Builder imageTag(@Nullable Output<String> imageTag) {
            $.imageTag = imageTag;
            return this;
        }

        /**
         * @param imageTag Tag associated with this image. At least one of `image_digest`, `image_tag`, or `most_recent` must be specified.
         * 
         * @return builder
         * 
         */
        public Builder imageTag(String imageTag) {
            return imageTag(Output.of(imageTag));
        }

        /**
         * @param mostRecent Return the most recently pushed image. At least one of `image_digest`, `image_tag`, or `most_recent` must be specified.
         * 
         * @return builder
         * 
         */
        public Builder mostRecent(@Nullable Output<Boolean> mostRecent) {
            $.mostRecent = mostRecent;
            return this;
        }

        /**
         * @param mostRecent Return the most recently pushed image. At least one of `image_digest`, `image_tag`, or `most_recent` must be specified.
         * 
         * @return builder
         * 
         */
        public Builder mostRecent(Boolean mostRecent) {
            return mostRecent(Output.of(mostRecent));
        }

        /**
         * @param registryId ID of the Registry where the repository resides.
         * 
         * @return builder
         * 
         */
        public Builder registryId(@Nullable Output<String> registryId) {
            $.registryId = registryId;
            return this;
        }

        /**
         * @param registryId ID of the Registry where the repository resides.
         * 
         * @return builder
         * 
         */
        public Builder registryId(String registryId) {
            return registryId(Output.of(registryId));
        }

        /**
         * @param repositoryName Name of the ECR Repository.
         * 
         * @return builder
         * 
         */
        public Builder repositoryName(Output<String> repositoryName) {
            $.repositoryName = repositoryName;
            return this;
        }

        /**
         * @param repositoryName Name of the ECR Repository.
         * 
         * @return builder
         * 
         */
        public Builder repositoryName(String repositoryName) {
            return repositoryName(Output.of(repositoryName));
        }

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

}
