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

export interface ClusterNodesArgs extends core.SchemaArgs {
  nodeRole: string | core.StringOut;

  privateIpAddress: string | core.StringOut;

  publicIpAddress: string | core.StringOut;
}

export class ClusterNodes extends core.Schema<ClusterNodesArgs> {
  @core.attr(String, { computed: true })
  public nodeRole!: string | core.StringOut;

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

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

export interface DsClusterArgs {
  clusterIdentifier: string | core.StringOut;

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

export class DsCluster extends core.Data<DsClusterArgs> {
  @core.attr(Boolean, { computed: true })
  public allowVersionUpgrade!: boolean | core.BooleanOut;

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

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

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

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

  @core.attr(Boolean, { computed: true })
  public availabilityZoneRelocationEnabled!: boolean | core.BooleanOut;

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

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

  @core.attr(ClusterNodes, { computed: true, kind: "array" })
  public clusterNodes!: core.Array<ClusterNodes> | core.ArrayOut<ClusterNodes>;

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

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

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

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

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

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

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

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

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

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

  @core.attr(Boolean, { computed: true })
  public enableLogging!: boolean | core.BooleanOut;

  @core.attr(Boolean, { computed: true })
  public encrypted!: boolean | core.BooleanOut;

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

  @core.attr(Boolean, { computed: true })
  public enhancedVpcRouting!: boolean | core.BooleanOut;

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

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

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

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

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

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

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

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

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

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

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

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

  @core.attr(Boolean, { computed: true })
  public publiclyAccessible!: boolean | core.BooleanOut;

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

  @core.attr(String, { kind: "map" })
  public tags?: core.Map<string, string> | core.MapOut<core.StringOut>;

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

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

  constructor(name: string, args?: DsClusterArgs) {
    super(name, "aws_redshift_cluster", args);
  }

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