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

export interface InstanceMetadataOptionsArgs extends core.SchemaArgs {
  httpPutResponseHopLimit?: number | core.NumberOut;

  httpTokens?: string | core.StringOut;
}

export class InstanceMetadataOptions extends core.Schema<InstanceMetadataOptionsArgs> {
  @core.attr(Number)
  public httpPutResponseHopLimit?: number | core.NumberOut;

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

export interface S3LogsArgs extends core.SchemaArgs {
  s3BucketName: string | core.StringOut;

  s3KeyPrefix?: string | core.StringOut;
}

export class S3Logs extends core.Schema<S3LogsArgs> {
  @core.attr(String)
  public s3BucketName!: string | core.StringOut;

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

export interface LoggingArgs extends core.SchemaArgs {
  s3Logs: S3Logs;
}

export class Logging extends core.Schema<LoggingArgs> {
  @core.attr(S3Logs)
  public s3Logs!: S3Logs;
}

export interface InfrastructureConfigurationArgs extends core.ResourceArgs {
  description?: string | core.StringOut;

  instanceMetadataOptions?: InstanceMetadataOptions;

  instanceProfileName: string | core.StringOut;

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

  keyPair?: string | core.StringOut;

  logging?: Logging;

  name: string | core.StringOut;

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

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

  snsTopicArn?: string | core.StringOut;

  subnetId?: string | core.StringOut;

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

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

  terminateInstanceOnFailure?: boolean | core.BooleanOut;
}

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

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

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

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

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

  @core.attr(InstanceMetadataOptions)
  public instanceMetadataOptions?: InstanceMetadataOptions;

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

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

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

  @core.attr(Logging)
  public logging?: Logging;

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

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

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

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

  @core.attr(String)
  public subnetId?: 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(Boolean)
  public terminateInstanceOnFailure?: boolean | core.BooleanOut;

  constructor(name: string, args?: InfrastructureConfigurationArgs) {
    super(name, "aws_imagebuilder_infrastructure_configuration", args);
  }

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