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

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, { kind: "array" })
  public securityGroupIds!: core.Array<string> | core.ArrayOut<core.StringOut>;

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

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

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

export class TracingConfig extends core.Schema<TracingConfigArgs> {
  @core.attr(String)
  public mode!: string | 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 EnvironmentArgs extends core.SchemaArgs {
  variables?: core.Map<string, string> | core.MapOut<core.StringOut>;
}

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

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

  localMountPath: string | core.StringOut;
}

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

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

export interface ImageConfigArgs extends core.SchemaArgs {
  command?: core.Array<string> | core.ArrayOut<core.StringOut>;

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

  workingDirectory?: string | core.StringOut;
}

export class ImageConfig extends core.Schema<ImageConfigArgs> {
  @core.attr(String, { kind: "array" })
  public command?: core.Array<string> | core.ArrayOut<core.StringOut>;

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

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

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

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

export interface FunctionArgs extends core.ResourceArgs {
  architectures?: core.Array<string> | core.ArrayOut<core.StringOut>;

  codeSigningConfigArn?: string | core.StringOut;

  deadLetterConfig?: DeadLetterConfig;

  description?: string | core.StringOut;

  environment?: Environment;

  ephemeralStorage?: EphemeralStorage;

  fileSystemConfig?: FileSystemConfig;

  filename?: string | core.StringOut;

  functionName: string | core.StringOut;

  handler?: string | core.StringOut;

  imageConfig?: ImageConfig;

  imageUri?: string | core.StringOut;

  kmsKeyArn?: string | core.StringOut;

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

  memorySize?: number | core.NumberOut;

  packageType?: string | core.StringOut;

  publish?: boolean | core.BooleanOut;

  reservedConcurrentExecutions?: number | core.NumberOut;

  role: string | core.StringOut;

  runtime?: string | core.StringOut;

  s3Bucket?: string | core.StringOut;

  s3Key?: string | core.StringOut;

  s3ObjectVersion?: string | core.StringOut;

  sourceCodeHash?: string | core.StringOut;

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

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

  timeout?: number | core.NumberOut;

  tracingConfig?: TracingConfig;

  vpcConfig?: VpcConfig;
}

export class Function extends core.Resource<FunctionArgs> {
  @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)
  public codeSigningConfigArn?: string | core.StringOut;

  @core.attr(DeadLetterConfig)
  public deadLetterConfig?: DeadLetterConfig;

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

  @core.attr(Environment)
  public environment?: Environment;

  @core.attr(EphemeralStorage, { computed: true })
  public ephemeralStorage?: EphemeralStorage;

  @core.attr(FileSystemConfig)
  public fileSystemConfig?: FileSystemConfig;

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

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

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

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

  @core.attr(ImageConfig)
  public imageConfig?: ImageConfig;

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

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

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

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

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

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

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

  @core.attr(Boolean)
  public publish?: boolean | core.BooleanOut;

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

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

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

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

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

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

  @core.attr(String)
  public s3ObjectVersion?: 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, { 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(Number)
  public timeout?: number | core.NumberOut;

  @core.attr(TracingConfig, { computed: true })
  public tracingConfig?: TracingConfig;

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

  @core.attr(VpcConfig)
  public vpcConfig?: VpcConfig;

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

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