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

export interface ReplicaKeyArgs extends core.ResourceArgs {
  bypassPolicyLockoutSafetyCheck?: boolean | core.BooleanOut;

  deletionWindowInDays?: number | core.NumberOut;

  description?: string | core.StringOut;

  enabled?: boolean | core.BooleanOut;

  policy?: string | core.StringOut;

  primaryKeyArn: string | core.StringOut;

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

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

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

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

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

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

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

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

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

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

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

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

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

  @core.attr(String)
  public primaryKeyArn!: 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?: ReplicaKeyArgs) {
    super(name, "aws_kms_replica_key", args);
  }

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