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

export interface PartitionIndexBlkArgs extends core.SchemaArgs {
  indexName?: string | core.StringOut;

  indexStatus: string | core.StringOut;

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

export class PartitionIndexBlk extends core.Schema<PartitionIndexBlkArgs> {
  @core.attr(String)
  public indexName?: string | core.StringOut;

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

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

export interface PartitionIndexArgs extends core.ResourceArgs {
  catalogId?: string | core.StringOut;

  databaseName: string | core.StringOut;

  partitionIndex: PartitionIndexBlk;

  tableName: string | core.StringOut;
}

export class PartitionIndex extends core.Resource<PartitionIndexArgs> {
  @core.attr(String, { computed: true })
  public catalogId?: string | core.StringOut;

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

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

  @core.attr(PartitionIndexBlk)
  public partitionIndex!: PartitionIndexBlk;

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

  constructor(name: string, args?: PartitionIndexArgs) {
    super(name, "aws_glue_partition_index", args);
  }

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