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

export interface DnsEntryArgs extends core.SchemaArgs {
  dnsName: string | core.StringOut;

  hostedZoneId: string | core.StringOut;
}

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

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

export interface DnsOptionsArgs extends core.SchemaArgs {
  dnsRecordIpType?: string | core.StringOut;
}

export class DnsOptions extends core.Schema<DnsOptionsArgs> {
  @core.attr(String)
  public dnsRecordIpType?: string | core.StringOut;
}

export interface EndpointArgs extends core.ResourceArgs {
  autoAccept?: boolean | core.BooleanOut;

  dnsOptions?: DnsOptions;

  ipAddressType?: string | core.StringOut;

  policy?: string | core.StringOut;

  privateDnsEnabled?: boolean | core.BooleanOut;

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

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

  serviceName: string | core.StringOut;

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

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

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

  vpcEndpointType?: string | core.StringOut;

  vpcId: string | core.StringOut;
}

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

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

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

  @core.attr(DnsEntry, { computed: true, kind: "array" })
  public dnsEntry!: core.Array<DnsEntry> | core.ArrayOut<DnsEntry>;

  @core.attr(DnsOptions, { computed: true })
  public dnsOptions?: DnsOptions;

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

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

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

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

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

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

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

  @core.attr(Boolean, { computed: true })
  public requesterManaged!: boolean | core.BooleanOut;

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

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

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

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

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

  @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 vpcEndpointType?: string | core.StringOut;

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

  constructor(name: string, args?: EndpointArgs) {
    super(name, "aws_vpc_endpoint", args);
  }

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