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

export interface DomainNameConfigurationArgs extends core.SchemaArgs {
  certificateArn: string | core.StringOut;

  endpointType: string | core.StringOut;

  hostedZoneId: string | core.StringOut;

  ownershipVerificationCertificateArn?: string | core.StringOut;

  securityPolicy: string | core.StringOut;

  targetDomainName: string | core.StringOut;
}

export class DomainNameConfiguration extends core.Schema<DomainNameConfigurationArgs> {
  @core.attr(String)
  public certificateArn!: string | core.StringOut;

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

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

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

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

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

export interface MutualTlsAuthenticationArgs extends core.SchemaArgs {
  truststoreUri: string | core.StringOut;

  truststoreVersion?: string | core.StringOut;
}

export class MutualTlsAuthentication extends core.Schema<MutualTlsAuthenticationArgs> {
  @core.attr(String)
  public truststoreUri!: string | core.StringOut;

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

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

  domainNameConfiguration: DomainNameConfiguration;

  mutualTlsAuthentication?: MutualTlsAuthentication;

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

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

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

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

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

  @core.attr(DomainNameConfiguration)
  public domainNameConfiguration!: DomainNameConfiguration;

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

  @core.attr(MutualTlsAuthentication)
  public mutualTlsAuthentication?: MutualTlsAuthentication;

  @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>;

  constructor(name: string, args?: DomainNameArgs) {
    super(name, "aws_apigatewayv2_domain_name", args);
  }

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