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

export interface DsEngineVersionArgs {
  /**
   * (Required) DB engine. Engine values include `aurora`, `aurora-mysql`, `aurora-postgresql`, `docdb`,
   * mariadb`, `mysql`, `neptune`, `oracle-ee`, `oracle-se`, `oracle-se1`, `oracle-se2`, `postgres`, `sq
   * lserver-ee`, `sqlserver-ex`, `sqlserver-se`, and `sqlserver-web`.
   */
  engine: string | core.StringOut;

  /**
   * (Optional) The name of a specific DB parameter group family. Examples of parameter group families ar
   * e `mysql8.0`, `mariadb10.4`, and `postgres12`.
   */
  parameterGroupFamily?: string | core.StringOut;

  /**
   * (Optional) Ordered list of preferred engine versions. The first match in this list will be returned.
   * If no preferred matches are found and the original search returned more than one result, an error i
   * s returned. If both the `version` and `preferred_versions` arguments are not configured, the data so
   * urce will return the default version for the engine.
   */
  preferredVersions?: core.Array<string> | core.ArrayOut<core.StringOut>;

  /**
   * (Optional) Version of the DB engine. For example, `5.7.22`, `10.1.34`, and `12.3`. If both the `vers
   * ion` and `preferred_versions` arguments are not configured, the data source will return the default
   * version for the engine.
   */
  version?: string | core.StringOut;
}

export class DsEngineVersion extends core.Data<DsEngineVersionArgs> {
  /**
   * The default character set for new instances of this engine version.
   */
  @core.attr(String, { computed: true })
  public defaultCharacterSet!: string | core.StringOut;

  /**
   * (Required) DB engine. Engine values include `aurora`, `aurora-mysql`, `aurora-postgresql`, `docdb`,
   * mariadb`, `mysql`, `neptune`, `oracle-ee`, `oracle-se`, `oracle-se1`, `oracle-se2`, `postgres`, `sq
   * lserver-ee`, `sqlserver-ex`, `sqlserver-se`, and `sqlserver-web`.
   */
  @core.attr(String)
  public engine!: string | core.StringOut;

  /**
   * The description of the database engine.
   */
  @core.attr(String, { computed: true })
  public engineDescription!: string | core.StringOut;

  /**
   * Set of log types that the database engine has available for export to CloudWatch Logs.
   */
  @core.attr(String, { computed: true, kind: "array" })
  public exportableLogTypes!:
    | core.Array<string>
    | core.ArrayOut<core.StringOut>;

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

  /**
   * (Optional) The name of a specific DB parameter group family. Examples of parameter group families ar
   * e `mysql8.0`, `mariadb10.4`, and `postgres12`.
   */
  @core.attr(String, { computed: true })
  public parameterGroupFamily?: string | core.StringOut;

  /**
   * (Optional) Ordered list of preferred engine versions. The first match in this list will be returned.
   * If no preferred matches are found and the original search returned more than one result, an error i
   * s returned. If both the `version` and `preferred_versions` arguments are not configured, the data so
   * urce will return the default version for the engine.
   */
  @core.attr(String, { kind: "array" })
  public preferredVersions?: core.Array<string> | core.ArrayOut<core.StringOut>;

  /**
   * The status of the DB engine version, either available or deprecated.
   */
  @core.attr(String, { computed: true })
  public status!: string | core.StringOut;

  /**
   * Set of the character sets supported by this engine.
   */
  @core.attr(String, { computed: true, kind: "array" })
  public supportedCharacterSets!:
    | core.Array<string>
    | core.ArrayOut<core.StringOut>;

  /**
   * Set of features supported by the DB engine.
   */
  @core.attr(String, { computed: true, kind: "array" })
  public supportedFeatureNames!:
    | core.Array<string>
    | core.ArrayOut<core.StringOut>;

  /**
   * Set of the supported DB engine modes.
   */
  @core.attr(String, { computed: true, kind: "array" })
  public supportedModes!: core.Array<string> | core.ArrayOut<core.StringOut>;

  /**
   * Set of the time zones supported by this engine.
   */
  @core.attr(String, { computed: true, kind: "array" })
  public supportedTimezones!:
    | core.Array<string>
    | core.ArrayOut<core.StringOut>;

  /**
   * Indicates whether you can use Aurora global databases with a specific DB engine version.
   */
  @core.attr(Boolean, { computed: true })
  public supportsGlobalDatabases!: boolean | core.BooleanOut;

  /**
   * Indicates whether the engine version supports exporting the log types specified by `exportable_log_t
   * ypes` to CloudWatch Logs.
   */
  @core.attr(Boolean, { computed: true })
  public supportsLogExportsToCloudwatch!: boolean | core.BooleanOut;

  /**
   * Indicates whether you can use Aurora parallel query with a specific DB engine version.
   */
  @core.attr(Boolean, { computed: true })
  public supportsParallelQuery!: boolean | core.BooleanOut;

  /**
   * Indicates whether the database engine version supports read replicas.
   */
  @core.attr(Boolean, { computed: true })
  public supportsReadReplica!: boolean | core.BooleanOut;

  /**
   * Set of engine versions that this database engine version can be upgraded to.
   */
  @core.attr(String, { computed: true, kind: "array" })
  public validUpgradeTargets!:
    | core.Array<string>
    | core.ArrayOut<core.StringOut>;

  /**
   * (Optional) Version of the DB engine. For example, `5.7.22`, `10.1.34`, and `12.3`. If both the `vers
   * ion` and `preferred_versions` arguments are not configured, the data source will return the default
   * version for the engine.
   */
  @core.attr(String, { computed: true })
  public version?: string | core.StringOut;

  /**
   * The description of the database engine version.
   */
  @core.attr(String, { computed: true })
  public versionDescription!: string | core.StringOut;

  constructor(name: string, args?: DsEngineVersionArgs) {
    super(name, "aws_rds_engine_version", args);
  }

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