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

export interface EntryArgs extends core.SchemaArgs {
  cidr: string | core.StringOut;

  description?: string | core.StringOut;
}

export class Entry extends core.Schema<EntryArgs> {
  @core.attr(String)
  public cidr!: string | core.StringOut;

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

export interface Ec2ManagedPrefixListArgs extends core.ResourceArgs {
  addressFamily: string | core.StringOut;

  entry?: core.Array<Entry> | core.ArrayOut<Entry>;

  maxEntries: number | core.NumberOut;

  name: string | core.StringOut;

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

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

export class Ec2ManagedPrefixList extends core.Resource<Ec2ManagedPrefixListArgs> {
  @core.attr(String)
  public addressFamily!: string | core.StringOut;

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

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

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

  @core.attr(Number)
  public maxEntries!: number | core.NumberOut;

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

  @core.attr(String, { computed: true })
  public ownerId!: string | 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(Number, { computed: true })
  public version!: number | core.NumberOut;

  constructor(name: string, args?: Ec2ManagedPrefixListArgs) {
    super(name, "aws_ec2_managed_prefix_list", args);
  }

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