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

export interface RequesterArgs extends core.SchemaArgs {
  allowClassicLinkToRemoteVpc?: boolean | core.BooleanOut;

  allowRemoteVpcDnsResolution?: boolean | core.BooleanOut;

  allowVpcToRemoteClassicLink?: boolean | core.BooleanOut;
}

export class Requester extends core.Schema<RequesterArgs> {
  @core.attr(Boolean)
  public allowClassicLinkToRemoteVpc?: boolean | core.BooleanOut;

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

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

export interface AccepterArgs extends core.SchemaArgs {
  allowClassicLinkToRemoteVpc?: boolean | core.BooleanOut;

  allowRemoteVpcDnsResolution?: boolean | core.BooleanOut;

  allowVpcToRemoteClassicLink?: boolean | core.BooleanOut;
}

export class Accepter extends core.Schema<AccepterArgs> {
  @core.attr(Boolean)
  public allowClassicLinkToRemoteVpc?: boolean | core.BooleanOut;

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

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

export interface PeeringConnectionArgs extends core.ResourceArgs {
  accepter?: Accepter;

  autoAccept?: boolean | core.BooleanOut;

  peerOwnerId?: string | core.StringOut;

  peerRegion?: string | core.StringOut;

  peerVpcId: string | core.StringOut;

  requester?: Requester;

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

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

  vpcId: string | core.StringOut;
}

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

  @core.attr(Accepter, { computed: true })
  public accepter?: Accepter;

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

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

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

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

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

  @core.attr(Requester, { computed: true })
  public requester?: Requester;

  @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)
  public vpcId!: string | core.StringOut;

  constructor(name: string, args?: PeeringConnectionArgs) {
    super(name, "aws_vpc_peering_connection", args);
  }

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