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

export interface IpAddressArgs extends core.SchemaArgs {
  ip?: string | core.StringOut;

  ipId: string | core.StringOut;

  subnetId: string | core.StringOut;
}

export class IpAddress extends core.Schema<IpAddressArgs> {
  @core.attr(String, { computed: true })
  public ip?: string | core.StringOut;

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

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

export interface EndpointArgs extends core.ResourceArgs {
  direction: string | core.StringOut;

  ipAddress: core.Array<IpAddress> | core.ArrayOut<IpAddress>;

  name?: string | core.StringOut;

  securityGroupIds: 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>;
}

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

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

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

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

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

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

  @core.attr(String, { kind: "array" })
  public securityGroupIds!: 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>;

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

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