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

export interface ResizeClusterArgs extends core.SchemaArgs {
  classic?: boolean | core.BooleanOut;

  clusterIdentifier: string | core.StringOut;

  clusterType?: string | core.StringOut;

  nodeType?: string | core.StringOut;

  numberOfNodes?: number | core.NumberOut;
}

export class ResizeCluster extends core.Schema<ResizeClusterArgs> {
  @core.attr(Boolean)
  public classic?: boolean | core.BooleanOut;

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

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

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

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

export interface ResumeClusterArgs extends core.SchemaArgs {
  clusterIdentifier: string | core.StringOut;
}

export class ResumeCluster extends core.Schema<ResumeClusterArgs> {
  @core.attr(String)
  public clusterIdentifier!: string | core.StringOut;
}

export interface PauseClusterArgs extends core.SchemaArgs {
  clusterIdentifier: string | core.StringOut;
}

export class PauseCluster extends core.Schema<PauseClusterArgs> {
  @core.attr(String)
  public clusterIdentifier!: string | core.StringOut;
}

export interface TargetActionArgs extends core.SchemaArgs {
  pauseCluster?: PauseCluster;

  resizeCluster?: ResizeCluster;

  resumeCluster?: ResumeCluster;
}

export class TargetAction extends core.Schema<TargetActionArgs> {
  @core.attr(PauseCluster)
  public pauseCluster?: PauseCluster;

  @core.attr(ResizeCluster)
  public resizeCluster?: ResizeCluster;

  @core.attr(ResumeCluster)
  public resumeCluster?: ResumeCluster;
}

export interface ScheduledActionArgs extends core.ResourceArgs {
  description?: string | core.StringOut;

  enable?: boolean | core.BooleanOut;

  endTime?: string | core.StringOut;

  iamRole: string | core.StringOut;

  name: string | core.StringOut;

  schedule: string | core.StringOut;

  startTime?: string | core.StringOut;

  targetAction: TargetAction;
}

export class ScheduledAction extends core.Resource<ScheduledActionArgs> {
  @core.attr(String)
  public description?: string | core.StringOut;

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

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

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

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

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

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

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

  @core.attr(TargetAction)
  public targetAction!: TargetAction;

  constructor(name: string, args?: ScheduledActionArgs) {
    super(name, "aws_redshift_scheduled_action", args);
  }

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