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

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

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

  description?: string | core.StringOut;

  filename?: string | core.StringOut;

  layerName: string | core.StringOut;

  licenseInfo?: string | core.StringOut;

  s3Bucket?: string | core.StringOut;

  s3Key?: string | core.StringOut;

  s3ObjectVersion?: string | core.StringOut;

  skipDestroy?: boolean | core.BooleanOut;

  sourceCodeHash?: string | core.StringOut;
}

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

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

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

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

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

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

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

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

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

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

  @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 })
  public version!: string | core.StringOut;

  constructor(name: string, args?: LayerVersionArgs) {
    super(name, "aws_lambda_layer_version", args);
  }

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