import * as core from "@terrascript/core";

export interface LaunchTemplateArgs extends core.SchemaArgs {
  launchTemplateId?: string | core.StringOut;

  launchTemplateName?: string | core.StringOut;

  version?: string | core.StringOut;
}

export class LaunchTemplate extends core.Schema<LaunchTemplateArgs> {
  @core.attr(String)
  public launchTemplateId?: string | core.StringOut;

  @core.attr(String)
  public launchTemplateName?: string | core.StringOut;

  @core.attr(String)
  public version?: string | core.StringOut;
}

export interface Ec2ConfigurationArgs extends core.SchemaArgs {
  imageIdOverride?: string | core.StringOut;

  imageType?: string | core.StringOut;
}

export class Ec2Configuration extends core.Schema<Ec2ConfigurationArgs> {
  @core.attr(String, { computed: true })
  public imageIdOverride?: string | core.StringOut;

  @core.attr(String)
  public imageType?: string | core.StringOut;
}

export interface ComputeResourcesArgs extends core.SchemaArgs {
  allocationStrategy?: string | core.StringOut;

  bidPercentage?: number | core.NumberOut;

  desiredVcpus?: number | core.NumberOut;

  ec2Configuration?: Ec2Configuration;

  ec2KeyPair?: string | core.StringOut;

  imageId?: string | core.StringOut;

  instanceRole?: string | core.StringOut;

  instanceType?: core.Array<string> | core.ArrayOut<core.StringOut>;

  launchTemplate?: LaunchTemplate;

  maxVcpus: number | core.NumberOut;

  minVcpus?: number | core.NumberOut;

  securityGroupIds: core.Array<string> | core.ArrayOut<core.StringOut>;

  spotIamFleetRole?: string | core.StringOut;

  subnets: core.Array<string> | core.ArrayOut<core.StringOut>;

  tags?: core.Map<string, string> | core.MapOut<core.StringOut>;

  type: string | core.StringOut;
}

export class ComputeResources extends core.Schema<ComputeResourcesArgs> {
  @core.attr(String)
  public allocationStrategy?: string | core.StringOut;

  @core.attr(Number)
  public bidPercentage?: number | core.NumberOut;

  @core.attr(Number, { computed: true })
  public desiredVcpus?: number | core.NumberOut;

  @core.attr(Ec2Configuration, { computed: true })
  public ec2Configuration?: Ec2Configuration;

  @core.attr(String)
  public ec2KeyPair?: string | core.StringOut;

  @core.attr(String)
  public imageId?: string | core.StringOut;

  @core.attr(String)
  public instanceRole?: string | core.StringOut;

  @core.attr(String, { kind: "array" })
  public instanceType?: core.Array<string> | core.ArrayOut<core.StringOut>;

  @core.attr(LaunchTemplate)
  public launchTemplate?: LaunchTemplate;

  @core.attr(Number)
  public maxVcpus!: number | core.NumberOut;

  @core.attr(Number)
  public minVcpus?: number | core.NumberOut;

  @core.attr(String, { kind: "array" })
  public securityGroupIds!: core.Array<string> | core.ArrayOut<core.StringOut>;

  @core.attr(String)
  public spotIamFleetRole?: string | core.StringOut;

  @core.attr(String, { kind: "array" })
  public subnets!: core.Array<string> | core.ArrayOut<core.StringOut>;

  @core.attr(String, { kind: "map" })
  public tags?: core.Map<string, string> | core.MapOut<core.StringOut>;

  @core.attr(String)
  public type!: string | core.StringOut;
}

export interface ComputeEnvironmentArgs extends core.ResourceArgs {
  computeEnvironmentName?: string | core.StringOut;

  computeEnvironmentNamePrefix?: string | core.StringOut;

  computeResources?: ComputeResources;

  serviceRole?: string | core.StringOut;

  state?: string | core.StringOut;

  tags?: core.Map<string, string> | core.MapOut<core.StringOut>;

  tagsAll?: core.Map<string, string> | core.MapOut<core.StringOut>;

  type: string | core.StringOut;
}

export class ComputeEnvironment extends core.Resource<ComputeEnvironmentArgs> {
  @core.attr(String, { computed: true })
  public arn!: string | core.StringOut;

  @core.attr(String, { computed: true })
  public computeEnvironmentName?: string | core.StringOut;

  @core.attr(String, { computed: true })
  public computeEnvironmentNamePrefix?: string | core.StringOut;

  @core.attr(ComputeResources)
  public computeResources?: ComputeResources;

  @core.attr(String, { computed: true })
  public ecsClusterArn!: string | core.StringOut;

  @core.attr(String, { computed: true })
  public id!: string | core.StringOut;

  @core.attr(String, { computed: true })
  public serviceRole?: string | core.StringOut;

  @core.attr(String)
  public state?: string | core.StringOut;

  @core.attr(String, { computed: true })
  public status!: string | core.StringOut;

  @core.attr(String, { computed: true })
  public statusReason!: string | core.StringOut;

  @core.attr(String, { kind: "map" })
  public tags?: core.Map<string, string> | core.MapOut<core.StringOut>;

  @core.attr(String, { computed: true, kind: "map" })
  public tagsAll?: core.Map<string, string> | core.MapOut<core.StringOut>;

  @core.attr(String)
  public type!: string | core.StringOut;

  constructor(name: string, args?: ComputeEnvironmentArgs) {
    super(name, "aws_batch_compute_environment", args);
  }

  public override getNamespace(): string {
    return "aws_batch";
  }
}
