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

export interface CertificateValidationRecordsArgs extends core.SchemaArgs {
  name: string | core.StringOut;

  status: string | core.StringOut;

  type: string | core.StringOut;

  value: string | core.StringOut;
}

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

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

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

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

export interface CustomDomainAssociationArgs extends core.ResourceArgs {
  domainName: string | core.StringOut;

  enableWwwSubdomain?: boolean | core.BooleanOut;

  serviceArn: string | core.StringOut;
}

export class CustomDomainAssociation extends core.Resource<CustomDomainAssociationArgs> {
  @core.attr(CertificateValidationRecords, { computed: true, kind: "array" })
  public certificateValidationRecords!:
    | core.Array<CertificateValidationRecords>
    | core.ArrayOut<CertificateValidationRecords>;

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

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

  @core.attr(Boolean)
  public enableWwwSubdomain?: boolean | core.BooleanOut;

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

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

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

  constructor(name: string, args?: CustomDomainAssociationArgs) {
    super(name, "aws_apprunner_custom_domain_association", args);
  }

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