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

export interface ConfigParameterArgs extends core.SchemaArgs {
  parameterKey: string | core.StringOut;

  parameterValue: string | core.StringOut;
}

export class ConfigParameter extends core.Schema<ConfigParameterArgs> {
  @core.attr(String)
  public parameterKey!: string | core.StringOut;

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

export interface WorkgroupArgs extends core.ResourceArgs {
  baseCapacity?: number | core.NumberOut;

  configParameter?:
    | core.Array<ConfigParameter>
    | core.ArrayOut<ConfigParameter>;

  enhancedVpcRouting?: boolean | core.BooleanOut;

  namespaceName: string | core.StringOut;

  publiclyAccessible?: boolean | core.BooleanOut;

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

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

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

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

  workgroupName: string | core.StringOut;
}

export class Workgroup extends core.Resource<WorkgroupArgs> {
  @core.attr(String, { computed: true })
  public arn!: string | core.StringOut;

  @core.attr(Number, { computed: true })
  public baseCapacity?: number | core.NumberOut;

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

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

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

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

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

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

  @core.attr(String, { computed: true, kind: "array" })
  public subnetIds?: core.Array<string> | core.ArrayOut<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(String, { computed: true })
  public workgroupId!: string | core.StringOut;

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

  constructor(name: string, args?: WorkgroupArgs) {
    super(name, "aws_redshiftserverless_workgroup", args);
  }

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