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

export interface ClusterInstanceArgs extends core.ResourceArgs {
  applyImmediately?: boolean | core.BooleanOut;

  autoMinorVersionUpgrade?: boolean | core.BooleanOut;

  availabilityZone?: string | core.StringOut;

  caCertIdentifier?: string | core.StringOut;

  clusterIdentifier: string | core.StringOut;

  copyTagsToSnapshot?: boolean | core.BooleanOut;

  dbParameterGroupName?: string | core.StringOut;

  dbSubnetGroupName?: string | core.StringOut;

  engine?: string | core.StringOut;

  engineVersion?: string | core.StringOut;

  identifier?: string | core.StringOut;

  identifierPrefix?: string | core.StringOut;

  instanceClass: string | core.StringOut;

  monitoringInterval?: number | core.NumberOut;

  monitoringRoleArn?: string | core.StringOut;

  performanceInsightsEnabled?: boolean | core.BooleanOut;

  performanceInsightsKmsKeyId?: string | core.StringOut;

  performanceInsightsRetentionPeriod?: number | core.NumberOut;

  preferredBackupWindow?: string | core.StringOut;

  preferredMaintenanceWindow?: string | core.StringOut;

  promotionTier?: number | core.NumberOut;

  publiclyAccessible?: boolean | core.BooleanOut;

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

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

export class ClusterInstance extends core.Resource<ClusterInstanceArgs> {
  @core.attr(Boolean, { computed: true })
  public applyImmediately?: boolean | core.BooleanOut;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  @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(Boolean, { computed: true })
  public writer!: boolean | core.BooleanOut;

  constructor(name: string, args?: ClusterInstanceArgs) {
    super(name, "aws_rds_cluster_instance", args);
  }

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