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

export interface AllowedPublishersArgs extends core.SchemaArgs {
  signingProfileVersionArns: core.Array<string> | core.ArrayOut<core.StringOut>;
}

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

export interface PoliciesArgs extends core.SchemaArgs {
  untrustedArtifactOnDeployment: string | core.StringOut;
}

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

export interface DsCodeSigningConfigArgs {
  arn: string | core.StringOut;
}

export class DsCodeSigningConfig extends core.Data<DsCodeSigningConfigArgs> {
  @core.attr(AllowedPublishers, { computed: true, kind: "array" })
  public allowedPublishers!:
    | core.Array<AllowedPublishers>
    | core.ArrayOut<AllowedPublishers>;

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

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

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

  constructor(name: string, args?: DsCodeSigningConfigArgs) {
    super(name, "aws_lambda_code_signing_config", args);
  }

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