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

export interface FilterArgs extends core.SchemaArgs {
  name: string | core.StringOut;

  values: core.Array<string> | core.ArrayOut<core.StringOut>;
}

export class Filter extends core.Schema<FilterArgs> {
  @core.attr(String)
  public name!: string | core.StringOut;

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

export interface DsPoolArgs {
  allocationResourceTags?:
    | core.Map<string, string>
    | core.MapOut<core.StringOut>;

  filter?: core.Array<Filter> | core.ArrayOut<Filter>;

  id?: string | core.StringOut;

  ipamPoolId?: string | core.StringOut;

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

export class DsPool extends core.Data<DsPoolArgs> {
  @core.attr(String, { computed: true })
  public addressFamily!: string | core.StringOut;

  @core.attr(Number, { computed: true })
  public allocationDefaultNetmaskLength!: number | core.NumberOut;

  @core.attr(Number, { computed: true })
  public allocationMaxNetmaskLength!: number | core.NumberOut;

  @core.attr(Number, { computed: true })
  public allocationMinNetmaskLength!: number | core.NumberOut;

  @core.attr(String, { computed: true, kind: "map" })
  public allocationResourceTags?:
    | core.Map<string, string>
    | core.MapOut<core.StringOut>;

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

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

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

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

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

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

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

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

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

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

  @core.attr(Number, { computed: true })
  public poolDepth!: number | core.NumberOut;

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

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

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

  @core.attr(String, { computed: true, kind: "map" })
  public tags?: core.Map<string, string> | core.MapOut<core.StringOut>;

  constructor(name: string, args?: DsPoolArgs) {
    super(name, "aws_vpc_ipam_pool", args);
  }

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