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, { computed: true })
  public httpPutResponseHopLimit!: number | core.NumberOut;

  @core.attr(String, { computed: true })
  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, { computed: true })
  public s3BucketName!: string | core.StringOut;

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

export interface LoggingArgs extends core.SchemaArgs {
  s3Logs: core.Array<S3Logs> | core.ArrayOut<S3Logs>;
}

export class Logging extends core.Schema<LoggingArgs> {
  @core.attr(S3Logs, { computed: true, kind: "array" })
  public s3Logs!: core.Array<S3Logs> | core.ArrayOut<S3Logs>;
}

export interface DsInfrastructureConfigurationArgs {
  arn: string | core.StringOut;

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

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

export class DsInfrastructureConfiguration extends core.Data<DsInfrastructureConfigurationArgs> {
  @core.attr(String)
  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, { computed: true })
  public description!: string | core.StringOut;

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

  @core.attr(InstanceMetadataOptions, { computed: true, kind: "array" })
  public instanceMetadataOptions!:
    | core.Array<InstanceMetadataOptions>
    | core.ArrayOut<InstanceMetadataOptions>;

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

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

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

  @core.attr(Logging, { computed: true, kind: "array" })
  public logging!: core.Array<Logging> | core.ArrayOut<Logging>;

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

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

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

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

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

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

  @core.attr(Boolean, { computed: true })
  public terminateInstanceOnFailure!: boolean | core.BooleanOut;

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

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