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

export interface TableItemArgs extends core.ResourceArgs {
  hashKey: string | core.StringOut;

  item: string | core.StringOut;

  rangeKey?: string | core.StringOut;

  tableName: string | core.StringOut;
}

export class TableItem extends core.Resource<TableItemArgs> {
  @core.attr(String)
  public hashKey!: string | core.StringOut;

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

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

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

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

  constructor(name: string, args?: TableItemArgs) {
    super(name, "aws_dynamodb_table_item", args);
  }

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