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

export interface RotationRulesArgs extends core.SchemaArgs {
  automaticallyAfterDays: number | core.NumberOut;
}

export class RotationRules extends core.Schema<RotationRulesArgs> {
  @core.attr(Number, { computed: true })
  public automaticallyAfterDays!: number | core.NumberOut;
}

export interface DsSecretArgs {
  arn?: string | core.StringOut;

  name?: string | core.StringOut;
}

export class DsSecret extends core.Data<DsSecretArgs> {
  @core.attr(String, { computed: true })
  public arn?: string | core.StringOut;

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

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

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

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

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

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

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

  @core.attr(RotationRules, { computed: true, kind: "array" })
  public rotationRules!:
    | core.Array<RotationRules>
    | core.ArrayOut<RotationRules>;

  @core.attr(String, { computed: true, kind: "map" })
  public tags!: core.Map<string, string> | core.MapOut<core.StringOut>;

  constructor(name: string, args?: DsSecretArgs) {
    super(name, "aws_secretsmanager_secret", args);
  }

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