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

export interface OptionSettingsArgs extends core.SchemaArgs {
  name: string | core.StringOut;

  value: string | core.StringOut;
}

export class OptionSettings extends core.Schema<OptionSettingsArgs> {
  @core.attr(String)
  public name!: string | core.StringOut;

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

export interface OptionArgs extends core.SchemaArgs {
  dbSecurityGroupMemberships?:
    | core.Array<string>
    | core.ArrayOut<core.StringOut>;

  optionName: string | core.StringOut;

  optionSettings?: core.Array<OptionSettings> | core.ArrayOut<OptionSettings>;

  port?: number | core.NumberOut;

  version?: string | core.StringOut;

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

export class Option extends core.Schema<OptionArgs> {
  @core.attr(String, { kind: "array" })
  public dbSecurityGroupMemberships?:
    | core.Array<string>
    | core.ArrayOut<core.StringOut>;

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

  @core.attr(OptionSettings, { kind: "array" })
  public optionSettings?:
    | core.Array<OptionSettings>
    | core.ArrayOut<OptionSettings>;

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

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

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

export interface DbOptionGroupArgs extends core.ResourceArgs {
  engineName: string | core.StringOut;

  majorEngineVersion: string | core.StringOut;

  name?: string | core.StringOut;

  namePrefix?: string | core.StringOut;

  option?: core.Array<Option> | core.ArrayOut<Option>;

  optionGroupDescription?: string | core.StringOut;

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

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

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

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

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

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

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

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

  @core.attr(Option, { kind: "array" })
  public option?: core.Array<Option> | core.ArrayOut<Option>;

  @core.attr(String)
  public optionGroupDescription?: 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>;

  constructor(name: string, args?: DbOptionGroupArgs) {
    super(name, "aws_db_option_group", args);
  }

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