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

export interface FileSystemConfigArgs extends core.SchemaArgs {
  arn: string | core.StringOut;

  localMountPath: string | core.StringOut;
}

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

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

export interface EnvironmentArgs extends core.SchemaArgs {
  variables: core.Map<string, string> | core.MapOut<core.StringOut>;
}

export class Environment extends core.Schema<EnvironmentArgs> {
  @core.attr(String, { computed: true, kind: "map" })
  public variables!: core.Map<string, string> | core.MapOut<core.StringOut>;
}

export interface EphemeralStorageArgs extends core.SchemaArgs {
  size: number | core.NumberOut;
}

export class EphemeralStorage extends core.Schema<EphemeralStorageArgs> {
  @core.attr(Number, { computed: true })
  public size!: number | core.NumberOut;
}

export interface VpcConfigArgs extends core.SchemaArgs {
  securityGroupIds: core.Array<string> | core.ArrayOut<core.StringOut>;

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

  vpcId: string | core.StringOut;
}

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

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

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

export interface DeadLetterConfigArgs extends core.SchemaArgs {
  targetArn: string | core.StringOut;
}

export class DeadLetterConfig extends core.Schema<DeadLetterConfigArgs> {
  @core.attr(String, { computed: true })
  public targetArn!: string | core.StringOut;
}

export interface TracingConfigArgs extends core.SchemaArgs {
  mode: string | core.StringOut;
}

export class TracingConfig extends core.Schema<TracingConfigArgs> {
  @core.attr(String, { computed: true })
  public mode!: string | core.StringOut;
}

export interface DsFunctionArgs {
  functionName: string | core.StringOut;

  qualifier?: string | core.StringOut;

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

export class DsFunction extends core.Data<DsFunctionArgs> {
  @core.attr(String, { computed: true, kind: "array" })
  public architectures!: core.Array<string> | core.ArrayOut<core.StringOut>;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  constructor(name: string, args?: DsFunctionArgs) {
    super(name, "aws_lambda_function", args);
  }

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