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

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

  value: string | core.StringOut;
}

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

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

export interface StatementArgs extends core.ResourceArgs {
  clusterIdentifier: string | core.StringOut;

  database: string | core.StringOut;

  dbUser?: string | core.StringOut;

  parameters?: core.Array<Parameters> | core.ArrayOut<Parameters>;

  secretArn?: string | core.StringOut;

  sql: string | core.StringOut;

  statementName?: string | core.StringOut;

  withEvent?: boolean | core.BooleanOut;
}

export class Statement extends core.Resource<StatementArgs> {
  @core.attr(String)
  public clusterIdentifier!: string | core.StringOut;

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

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

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

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

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

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

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

  @core.attr(Boolean)
  public withEvent?: boolean | core.BooleanOut;

  constructor(name: string, args?: StatementArgs) {
    super(name, "aws_redshiftdata_statement", args);
  }

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