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

export interface S3ImportArgs extends core.SchemaArgs {
  bucketName: string | core.StringOut;

  bucketPrefix?: string | core.StringOut;

  ingestionRole: string | core.StringOut;

  sourceEngine: string | core.StringOut;

  sourceEngineVersion: string | core.StringOut;
}

export class S3Import extends core.Schema<S3ImportArgs> {
  @core.attr(String)
  public bucketName!: string | core.StringOut;

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

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

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

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

export interface RestoreToPointInTimeArgs extends core.SchemaArgs {
  restoreTime?: string | core.StringOut;

  sourceDbInstanceAutomatedBackupsArn?: string | core.StringOut;

  sourceDbInstanceIdentifier?: string | core.StringOut;

  sourceDbiResourceId?: string | core.StringOut;

  useLatestRestorableTime?: boolean | core.BooleanOut;
}

export class RestoreToPointInTime extends core.Schema<RestoreToPointInTimeArgs> {
  @core.attr(String)
  public restoreTime?: string | core.StringOut;

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

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

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

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

export interface DbInstanceArgs extends core.ResourceArgs {
  allocatedStorage?: number | core.NumberOut;

  allowMajorVersionUpgrade?: boolean | core.BooleanOut;

  applyImmediately?: boolean | core.BooleanOut;

  autoMinorVersionUpgrade?: boolean | core.BooleanOut;

  availabilityZone?: string | core.StringOut;

  backupRetentionPeriod?: number | core.NumberOut;

  backupWindow?: string | core.StringOut;

  caCertIdentifier?: string | core.StringOut;

  characterSetName?: string | core.StringOut;

  copyTagsToSnapshot?: boolean | core.BooleanOut;

  customerOwnedIpEnabled?: boolean | core.BooleanOut;

  dbName?: string | core.StringOut;

  dbSubnetGroupName?: string | core.StringOut;

  deleteAutomatedBackups?: boolean | core.BooleanOut;

  deletionProtection?: boolean | core.BooleanOut;

  domain?: string | core.StringOut;

  domainIamRoleName?: string | core.StringOut;

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

  engine?: string | core.StringOut;

  engineVersion?: string | core.StringOut;

  finalSnapshotIdentifier?: string | core.StringOut;

  iamDatabaseAuthenticationEnabled?: boolean | core.BooleanOut;

  identifier?: string | core.StringOut;

  identifierPrefix?: string | core.StringOut;

  instanceClass: string | core.StringOut;

  iops?: number | core.NumberOut;

  kmsKeyId?: string | core.StringOut;

  licenseModel?: string | core.StringOut;

  maintenanceWindow?: string | core.StringOut;

  maxAllocatedStorage?: number | core.NumberOut;

  monitoringInterval?: number | core.NumberOut;

  monitoringRoleArn?: string | core.StringOut;

  multiAz?: boolean | core.BooleanOut;

  name?: string | core.StringOut;

  ncharCharacterSetName?: string | core.StringOut;

  networkType?: string | core.StringOut;

  optionGroupName?: string | core.StringOut;

  parameterGroupName?: string | core.StringOut;

  password?: string | core.StringOut;

  performanceInsightsEnabled?: boolean | core.BooleanOut;

  performanceInsightsKmsKeyId?: string | core.StringOut;

  performanceInsightsRetentionPeriod?: number | core.NumberOut;

  port?: number | core.NumberOut;

  publiclyAccessible?: boolean | core.BooleanOut;

  replicaMode?: string | core.StringOut;

  replicateSourceDb?: string | core.StringOut;

  restoreToPointInTime?: RestoreToPointInTime;

  s3Import?: S3Import;

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

  skipFinalSnapshot?: boolean | core.BooleanOut;

  snapshotIdentifier?: string | core.StringOut;

  storageEncrypted?: boolean | core.BooleanOut;

  storageType?: string | core.StringOut;

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

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

  timezone?: string | core.StringOut;

  username?: string | core.StringOut;

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

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

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

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

  @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(Number, { computed: true })
  public backupRetentionPeriod?: number | core.NumberOut;

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

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

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

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

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

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

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

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

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

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

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

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

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

  @core.attr(String, { computed: true })
  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)
  public finalSnapshotIdentifier?: string | core.StringOut;

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

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

  @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(Number)
  public iops?: number | core.NumberOut;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  @core.attr(Boolean)
  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(Boolean)
  public publiclyAccessible?: boolean | core.BooleanOut;

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

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

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

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

  @core.attr(RestoreToPointInTime)
  public restoreToPointInTime?: RestoreToPointInTime;

  @core.attr(S3Import)
  public s3Import?: S3Import;

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

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

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

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

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

  @core.attr(String, { computed: true })
  public storageType?: string | 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 timezone?: string | core.StringOut;

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

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

  constructor(name: string, args?: DbInstanceArgs) {
    super(name, "aws_db_instance", args);
  }

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