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

export interface RouteArgs extends core.SchemaArgs {
  carrierGatewayId?: string | core.StringOut;

  cidrBlock?: string | core.StringOut;

  coreNetworkArn?: string | core.StringOut;

  destinationPrefixListId?: string | core.StringOut;

  egressOnlyGatewayId?: string | core.StringOut;

  gatewayId?: string | core.StringOut;

  instanceId?: string | core.StringOut;

  ipv6CidrBlock?: string | core.StringOut;

  localGatewayId?: string | core.StringOut;

  natGatewayId?: string | core.StringOut;

  networkInterfaceId?: string | core.StringOut;

  transitGatewayId?: string | core.StringOut;

  vpcEndpointId?: string | core.StringOut;

  vpcPeeringConnectionId?: string | core.StringOut;
}

export class Route extends core.Schema<RouteArgs> {
  @core.attr(String)
  public carrierGatewayId?: string | core.StringOut;

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

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

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

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

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

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

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

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

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

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

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

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

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

export interface RouteTableArgs extends core.ResourceArgs {
  propagatingVgws?: core.Array<string> | core.ArrayOut<core.StringOut>;

  route?: core.Array<Route> | core.ArrayOut<Route>;

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

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

  vpcId: string | core.StringOut;
}

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

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

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

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

  @core.attr(Route, { computed: true, kind: "array" })
  public route?: core.Array<Route> | core.ArrayOut<Route>;

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

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