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

export interface CertificateArgs extends core.ResourceArgs {
  active: boolean | core.BooleanOut;

  caPem?: string | core.StringOut;

  certificatePem?: string | core.StringOut;

  csr?: string | core.StringOut;
}

export class Certificate extends core.Resource<CertificateArgs> {
  @core.attr(Boolean)
  public active!: boolean | core.BooleanOut;

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

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

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

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

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

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

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

  constructor(name: string, args?: CertificateArgs) {
    super(name, "aws_iot_certificate", args);
  }

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