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

export interface NotificationArgs extends core.SchemaArgs {
  events: core.Array<string> | core.ArrayOut<core.StringOut>;

  snsTopic: string | core.StringOut;
}

export class Notification extends core.Schema<NotificationArgs> {
  @core.attr(String, { kind: "array" })
  public events!: core.Array<string> | core.ArrayOut<core.StringOut>;

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

export interface VaultArgs extends core.ResourceArgs {
  accessPolicy?: string | core.StringOut;

  name: string | core.StringOut;

  notification?: Notification;

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

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

export class Vault extends core.Resource<VaultArgs> {
  @core.attr(String)
  public accessPolicy?: string | core.StringOut;

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

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

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

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

  @core.attr(Notification)
  public notification?: Notification;

  @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?: VaultArgs) {
    super(name, "aws_glacier_vault", args);
  }

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