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

export interface ParameterArgs extends core.SchemaArgs {
  applyMethod?: string | core.StringOut;

  name: string | core.StringOut;

  value: string | core.StringOut;
}

export class Parameter extends core.Schema<ParameterArgs> {
  @core.attr(String)
  public applyMethod?: string | core.StringOut;

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

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

export interface ClusterParameterGroupArgs extends core.ResourceArgs {
  /**
   * (Optional) The description of the DB cluster parameter group. Defaults to "Managed by Terraform".
   */
  description?: string | core.StringOut;

  /**
   * (Required) The family of the DB cluster parameter group.
   */
  family: string | core.StringOut;

  /**
   * (Optional, Forces new resource) The name of the DB cluster parameter group. If omitted, Terraform wi
   * ll assign a random, unique name.
   */
  name?: string | core.StringOut;

  /**
   * (Optional, Forces new resource) Creates a unique name beginning with the specified prefix. Conflicts
   * with `name`.
   */
  namePrefix?: string | core.StringOut;

  /**
   * (Optional) A list of DB parameters to apply. Note that parameters may differ from a family to an oth
   * er. Full list of all parameters can be discovered via [`aws rds describe-db-cluster-parameters`](htt
   * ps://docs.aws.amazon.com/cli/latest/reference/rds/describe-db-cluster-parameters.html) after initial
   * creation of the group.
   */
  parameter?: core.Array<Parameter> | core.ArrayOut<Parameter>;

  /**
   * (Optional) A map of tags to assign to the resource. If configured with a provider [`default_tags` co
   * nfiguration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-co
   * nfiguration-block) present, tags with matching keys will overwrite those defined at the provider-lev
   * el.
   */
  tags?: core.Map<string, string> | core.MapOut<core.StringOut>;

  /**
   * A map of tags assigned to the resource, including those inherited from the provider [`default_tags`
   * configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-
   * configuration-block).
   */
  tagsAll?: core.Map<string, string> | core.MapOut<core.StringOut>;
}

export class ClusterParameterGroup extends core.Resource<ClusterParameterGroupArgs> {
  /**
   * The ARN of the db cluster parameter group.
   */
  @core.attr(String, { computed: true })
  public arn!: string | core.StringOut;

  /**
   * (Optional) The description of the DB cluster parameter group. Defaults to "Managed by Terraform".
   */
  @core.attr(String)
  public description?: string | core.StringOut;

  /**
   * (Required) The family of the DB cluster parameter group.
   */
  @core.attr(String)
  public family!: string | core.StringOut;

  /**
   * The db cluster parameter group name.
   */
  @core.attr(String, { computed: true })
  public id!: string | core.StringOut;

  /**
   * (Optional, Forces new resource) The name of the DB cluster parameter group. If omitted, Terraform wi
   * ll assign a random, unique name.
   */
  @core.attr(String, { computed: true })
  public name?: string | core.StringOut;

  /**
   * (Optional, Forces new resource) Creates a unique name beginning with the specified prefix. Conflicts
   * with `name`.
   */
  @core.attr(String, { computed: true })
  public namePrefix?: string | core.StringOut;

  /**
   * (Optional) A list of DB parameters to apply. Note that parameters may differ from a family to an oth
   * er. Full list of all parameters can be discovered via [`aws rds describe-db-cluster-parameters`](htt
   * ps://docs.aws.amazon.com/cli/latest/reference/rds/describe-db-cluster-parameters.html) after initial
   * creation of the group.
   */
  @core.attr(Parameter, { kind: "array" })
  public parameter?: core.Array<Parameter> | core.ArrayOut<Parameter>;

  /**
   * (Optional) A map of tags to assign to the resource. If configured with a provider [`default_tags` co
   * nfiguration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-co
   * nfiguration-block) present, tags with matching keys will overwrite those defined at the provider-lev
   * el.
   */
  @core.attr(String, { kind: "map" })
  public tags?: core.Map<string, string> | core.MapOut<core.StringOut>;

  /**
   * A map of tags assigned to the resource, including those inherited from the provider [`default_tags`
   * configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-
   * configuration-block).
   */
  @core.attr(String, { computed: true, kind: "map" })
  public tagsAll?: core.Map<string, string> | core.MapOut<core.StringOut>;

  constructor(name: string, args?: ClusterParameterGroupArgs) {
    super(name, "aws_rds_cluster_parameter_group", args);
  }

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