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

export interface EndpointArgs extends core.SchemaArgs {
  id: string | core.StringOut;

  region?: string | core.StringOut;

  type?: string | core.StringOut;

  value?: string | core.StringOut;
}

export class Endpoint extends core.Schema<EndpointArgs> {
  @core.attr(String)
  public id!: string | core.StringOut;

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

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

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

export interface RegionArgs extends core.SchemaArgs {
  endpointReference?: string | core.StringOut;

  evaluateTargetHealth?: boolean | core.BooleanOut;

  healthCheck?: string | core.StringOut;

  region?: string | core.StringOut;

  ruleReference?: string | core.StringOut;
}

export class Region extends core.Schema<RegionArgs> {
  @core.attr(String)
  public endpointReference?: string | core.StringOut;

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

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

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

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

export interface ItemsArgs extends core.SchemaArgs {
  endpointReference?: string | core.StringOut;

  healthCheck?: string | core.StringOut;
}

export class Items extends core.Schema<ItemsArgs> {
  @core.attr(String)
  public endpointReference?: string | core.StringOut;

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

export interface PrimaryArgs extends core.SchemaArgs {
  endpointReference?: string | core.StringOut;

  evaluateTargetHealth?: boolean | core.BooleanOut;

  healthCheck?: string | core.StringOut;

  ruleReference?: string | core.StringOut;
}

export class Primary extends core.Schema<PrimaryArgs> {
  @core.attr(String)
  public endpointReference?: string | core.StringOut;

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

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

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

export interface SecondaryArgs extends core.SchemaArgs {
  endpointReference?: string | core.StringOut;

  evaluateTargetHealth?: boolean | core.BooleanOut;

  healthCheck?: string | core.StringOut;

  ruleReference?: string | core.StringOut;
}

export class Secondary extends core.Schema<SecondaryArgs> {
  @core.attr(String)
  public endpointReference?: string | core.StringOut;

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

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

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

export interface LocationArgs extends core.SchemaArgs {
  continent?: string | core.StringOut;

  country?: string | core.StringOut;

  endpointReference?: string | core.StringOut;

  evaluateTargetHealth?: boolean | core.BooleanOut;

  healthCheck?: string | core.StringOut;

  isDefault?: boolean | core.BooleanOut;

  ruleReference?: string | core.StringOut;

  subdivision?: string | core.StringOut;
}

export class Location extends core.Schema<LocationArgs> {
  @core.attr(String)
  public continent?: string | core.StringOut;

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

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

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

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

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

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

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

export interface GeoProximityLocationArgs extends core.SchemaArgs {
  bias?: string | core.StringOut;

  endpointReference?: string | core.StringOut;

  evaluateTargetHealth?: boolean | core.BooleanOut;

  healthCheck?: string | core.StringOut;

  latitude?: string | core.StringOut;

  longitude?: string | core.StringOut;

  region?: string | core.StringOut;

  ruleReference?: string | core.StringOut;
}

export class GeoProximityLocation extends core.Schema<GeoProximityLocationArgs> {
  @core.attr(String)
  public bias?: string | core.StringOut;

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

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

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

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

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

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

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

export interface RuleArgs extends core.SchemaArgs {
  geoProximityLocation?:
    | core.Array<GeoProximityLocation>
    | core.ArrayOut<GeoProximityLocation>;

  id: string | core.StringOut;

  items?: core.Array<Items> | core.ArrayOut<Items>;

  location?: core.Array<Location> | core.ArrayOut<Location>;

  primary?: Primary;

  region?: core.Array<Region> | core.ArrayOut<Region>;

  secondary?: Secondary;

  type?: string | core.StringOut;
}

export class Rule extends core.Schema<RuleArgs> {
  @core.attr(GeoProximityLocation, { kind: "array" })
  public geoProximityLocation?:
    | core.Array<GeoProximityLocation>
    | core.ArrayOut<GeoProximityLocation>;

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

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

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

  @core.attr(Primary)
  public primary?: Primary;

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

  @core.attr(Secondary)
  public secondary?: Secondary;

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

export interface DsTrafficPolicyDocumentArgs {
  endpoint?: core.Array<Endpoint> | core.ArrayOut<Endpoint>;

  recordType?: string | core.StringOut;

  rule?: core.Array<Rule> | core.ArrayOut<Rule>;

  startEndpoint?: string | core.StringOut;

  startRule?: string | core.StringOut;

  version?: string | core.StringOut;
}

export class DsTrafficPolicyDocument extends core.Data<DsTrafficPolicyDocumentArgs> {
  @core.attr(Endpoint, { kind: "array" })
  public endpoint?: core.Array<Endpoint> | core.ArrayOut<Endpoint>;

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

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

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

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

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

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

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

  constructor(name: string, args?: DsTrafficPolicyDocumentArgs) {
    super(name, "aws_route53_traffic_policy_document", args);
  }

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