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

export interface AclConfigurationArgs extends core.SchemaArgs {
  s3AclOption: string | core.StringOut;
}

export class AclConfiguration extends core.Schema<AclConfigurationArgs> {
  @core.attr(String)
  public s3AclOption!: string | core.StringOut;
}

export interface EncryptionConfigurationArgs extends core.SchemaArgs {
  encryptionOption: string | core.StringOut;

  kmsKey?: string | core.StringOut;
}

export class EncryptionConfiguration extends core.Schema<EncryptionConfigurationArgs> {
  @core.attr(String)
  public encryptionOption!: string | core.StringOut;

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

export interface DatabaseArgs extends core.ResourceArgs {
  aclConfiguration?: AclConfiguration;

  bucket?: string | core.StringOut;

  comment?: string | core.StringOut;

  encryptionConfiguration?: EncryptionConfiguration;

  expectedBucketOwner?: string | core.StringOut;

  forceDestroy?: boolean | core.BooleanOut;

  name: string | core.StringOut;

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

export class Database extends core.Resource<DatabaseArgs> {
  @core.attr(AclConfiguration)
  public aclConfiguration?: AclConfiguration;

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

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

  @core.attr(EncryptionConfiguration)
  public encryptionConfiguration?: EncryptionConfiguration;

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

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

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

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

  @core.attr(String, { kind: "map" })
  public properties?: core.Map<string, string> | core.MapOut<core.StringOut>;

  constructor(name: string, args?: DatabaseArgs) {
    super(name, "aws_athena_database", args);
  }

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