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

export interface SignatureValidityPeriodArgs extends core.SchemaArgs {
  type: string | core.StringOut;

  value: number | core.NumberOut;
}

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

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

export interface RevocationRecordArgs extends core.SchemaArgs {
  revocationEffectiveFrom: string | core.StringOut;

  revokedAt: string | core.StringOut;

  revokedBy: string | core.StringOut;
}

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

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

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

export interface DsSigningProfileArgs {
  name: string | core.StringOut;

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

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

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

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

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

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

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

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

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

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

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

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

  constructor(name: string, args?: DsSigningProfileArgs) {
    super(name, "aws_signer_signing_profile", args);
  }

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