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

export interface NlbResourceArgs extends core.SchemaArgs {
  arn?: string | core.StringOut;
}

export class NlbResource extends core.Schema<NlbResourceArgs> {
  @core.attr(String)
  public arn?: string | core.StringOut;
}

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

  recordSetId?: string | core.StringOut;
}

export class R53Resource extends core.Schema<R53ResourceArgs> {
  @core.attr(String)
  public domainName?: string | core.StringOut;

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

export interface TargetResourceArgs extends core.SchemaArgs {
  nlbResource?: NlbResource;

  r53Resource?: R53Resource;
}

export class TargetResource extends core.Schema<TargetResourceArgs> {
  @core.attr(NlbResource)
  public nlbResource?: NlbResource;

  @core.attr(R53Resource)
  public r53Resource?: R53Resource;
}

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

  hostedZoneArn?: string | core.StringOut;

  recordSetId?: string | core.StringOut;

  recordType?: string | core.StringOut;

  targetResource?: TargetResource;
}

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

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

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

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

  @core.attr(TargetResource)
  public targetResource?: TargetResource;
}

export interface ResourcesArgs extends core.SchemaArgs {
  componentId: string | core.StringOut;

  dnsTargetResource?: DnsTargetResource;

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

  resourceArn?: string | core.StringOut;
}

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

  @core.attr(DnsTargetResource)
  public dnsTargetResource?: DnsTargetResource;

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

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

export interface ResourceSetArgs extends core.ResourceArgs {
  resourceSetName: string | core.StringOut;

  resourceSetType: string | core.StringOut;

  resources: core.Array<Resources> | core.ArrayOut<Resources>;

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

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

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

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

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

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

  @core.attr(Resources, { kind: "array" })
  public resources!: core.Array<Resources> | core.ArrayOut<Resources>;

  @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?: ResourceSetArgs) {
    super(name, "aws_route53recoveryreadiness_resource_set", args);
  }

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