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

export interface DomainValidationOptionsArgs extends core.SchemaArgs {
  domainName: string | core.StringOut;

  resourceRecordName: string | core.StringOut;

  resourceRecordType: string | core.StringOut;

  resourceRecordValue: string | core.StringOut;
}

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

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

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

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

export interface ValidationOptionArgs extends core.SchemaArgs {
  domainName: string | core.StringOut;

  validationDomain: string | core.StringOut;
}

export class ValidationOption extends core.Schema<ValidationOptionArgs> {
  @core.attr(String)
  public domainName!: string | core.StringOut;

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

export interface OptionsArgs extends core.SchemaArgs {
  certificateTransparencyLoggingPreference?: string | core.StringOut;
}

export class Options extends core.Schema<OptionsArgs> {
  @core.attr(String)
  public certificateTransparencyLoggingPreference?: string | core.StringOut;
}

export interface CertificateArgs extends core.ResourceArgs {
  certificateAuthorityArn?: string | core.StringOut;

  certificateBody?: string | core.StringOut;

  certificateChain?: string | core.StringOut;

  domainName?: string | core.StringOut;

  options?: Options;

  privateKey?: string | core.StringOut;

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

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

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

  validationMethod?: string | core.StringOut;

  validationOption?:
    | core.Array<ValidationOption>
    | core.ArrayOut<ValidationOption>;
}

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

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

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

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

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

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

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

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

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

  @core.attr(Options)
  public options?: Options;

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

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

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

  @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(String, { computed: true, kind: "array" })
  public validationEmails!: core.Array<string> | core.ArrayOut<core.StringOut>;

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

  @core.attr(ValidationOption, { kind: "array" })
  public validationOption?:
    | core.Array<ValidationOption>
    | core.ArrayOut<ValidationOption>;

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

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