// *** 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.batch.outputs;

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

@CustomType
public final class ComputeEnvironmentComputeResourcesEc2Configuration {
    /**
     * @return The AMI ID used for instances launched in the compute environment that match the image type. This setting overrides the `image_id` argument in the `compute_resources` block.
     * 
     */
    private @Nullable String imageIdOverride;
    /**
     * @return The image type to match with the instance type to select an AMI. If the `image_id_override` parameter isn&#39;t specified, then a recent [Amazon ECS-optimized Amazon Linux 2 AMI](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html#al2ami) (`ECS_AL2`) is used.
     * 
     */
    private @Nullable String imageType;

    private ComputeEnvironmentComputeResourcesEc2Configuration() {}
    /**
     * @return The AMI ID used for instances launched in the compute environment that match the image type. This setting overrides the `image_id` argument in the `compute_resources` block.
     * 
     */
    public Optional<String> imageIdOverride() {
        return Optional.ofNullable(this.imageIdOverride);
    }
    /**
     * @return The image type to match with the instance type to select an AMI. If the `image_id_override` parameter isn&#39;t specified, then a recent [Amazon ECS-optimized Amazon Linux 2 AMI](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html#al2ami) (`ECS_AL2`) is used.
     * 
     */
    public Optional<String> imageType() {
        return Optional.ofNullable(this.imageType);
    }

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

    public static Builder builder(ComputeEnvironmentComputeResourcesEc2Configuration defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable String imageIdOverride;
        private @Nullable String imageType;
        public Builder() {}
        public Builder(ComputeEnvironmentComputeResourcesEc2Configuration defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.imageIdOverride = defaults.imageIdOverride;
    	      this.imageType = defaults.imageType;
        }

        @CustomType.Setter
        public Builder imageIdOverride(@Nullable String imageIdOverride) {
            this.imageIdOverride = imageIdOverride;
            return this;
        }
        @CustomType.Setter
        public Builder imageType(@Nullable String imageType) {
            this.imageType = imageType;
            return this;
        }
        public ComputeEnvironmentComputeResourcesEc2Configuration build() {
            final var o = new ComputeEnvironmentComputeResourcesEc2Configuration();
            o.imageIdOverride = imageIdOverride;
            o.imageType = imageType;
            return o;
        }
    }
}
