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

export interface ConnectionPasswordEncryptionArgs extends core.SchemaArgs {
  awsKmsKeyId?: string | core.StringOut;

  returnConnectionPasswordEncrypted: boolean | core.BooleanOut;
}

export class ConnectionPasswordEncryption extends core.Schema<ConnectionPasswordEncryptionArgs> {
  @core.attr(String)
  public awsKmsKeyId?: string | core.StringOut;

  @core.attr(Boolean)
  public returnConnectionPasswordEncrypted!: boolean | core.BooleanOut;
}

export interface EncryptionAtRestArgs extends core.SchemaArgs {
  catalogEncryptionMode: string | core.StringOut;

  sseAwsKmsKeyId?: string | core.StringOut;
}

export class EncryptionAtRest extends core.Schema<EncryptionAtRestArgs> {
  @core.attr(String)
  public catalogEncryptionMode!: string | core.StringOut;

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

export interface DataCatalogEncryptionSettingsBlkArgs extends core.SchemaArgs {
  connectionPasswordEncryption: ConnectionPasswordEncryption;

  encryptionAtRest: EncryptionAtRest;
}

export class DataCatalogEncryptionSettingsBlk extends core.Schema<DataCatalogEncryptionSettingsBlkArgs> {
  @core.attr(ConnectionPasswordEncryption)
  public connectionPasswordEncryption!: ConnectionPasswordEncryption;

  @core.attr(EncryptionAtRest)
  public encryptionAtRest!: EncryptionAtRest;
}

export interface DataCatalogEncryptionSettingsArgs extends core.ResourceArgs {
  catalogId?: string | core.StringOut;

  dataCatalogEncryptionSettings: DataCatalogEncryptionSettingsBlk;
}

export class DataCatalogEncryptionSettings extends core.Resource<DataCatalogEncryptionSettingsArgs> {
  @core.attr(String, { computed: true })
  public catalogId?: string | core.StringOut;

  @core.attr(DataCatalogEncryptionSettingsBlk)
  public dataCatalogEncryptionSettings!: DataCatalogEncryptionSettingsBlk;

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

  constructor(name: string, args?: DataCatalogEncryptionSettingsArgs) {
    super(name, "aws_glue_data_catalog_encryption_settings", args);
  }

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