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

export interface DsClusterCredentialsArgs {
  autoCreate?: boolean | core.BooleanOut;

  clusterIdentifier: string | core.StringOut;

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

  dbName?: string | core.StringOut;

  dbUser: string | core.StringOut;

  durationSeconds?: number | core.NumberOut;
}

export class DsClusterCredentials extends core.Data<DsClusterCredentialsArgs> {
  @core.attr(Boolean)
  public autoCreate?: boolean | core.BooleanOut;

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

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

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

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

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

  @core.attr(Number)
  public durationSeconds?: number | core.NumberOut;

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

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

  constructor(name: string, args?: DsClusterCredentialsArgs) {
    super(name, "aws_redshift_cluster_credentials", args);
  }

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