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

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

  sseAwsKmsKeyId: string | core.StringOut;
}

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

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

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

  returnConnectionPasswordEncrypted: boolean | core.BooleanOut;
}

export class ConnectionPasswordEncryption extends core.Schema<ConnectionPasswordEncryptionArgs> {
  @core.attr(String, { computed: true })
  public awsKmsKeyId!: string | core.StringOut;

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

export interface DataCatalogEncryptionSettingsBlkArgs extends core.SchemaArgs {
  connectionPasswordEncryption:
    | core.Array<ConnectionPasswordEncryption>
    | core.ArrayOut<ConnectionPasswordEncryption>;

  encryptionAtRest:
    | core.Array<EncryptionAtRest>
    | core.ArrayOut<EncryptionAtRest>;
}

export class DataCatalogEncryptionSettingsBlk extends core.Schema<DataCatalogEncryptionSettingsBlkArgs> {
  @core.attr(ConnectionPasswordEncryption, { computed: true, kind: "array" })
  public connectionPasswordEncryption!:
    | core.Array<ConnectionPasswordEncryption>
    | core.ArrayOut<ConnectionPasswordEncryption>;

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

export interface DsDataCatalogEncryptionSettingsArgs {
  catalogId: string | core.StringOut;
}

export class DsDataCatalogEncryptionSettings extends core.Data<DsDataCatalogEncryptionSettingsArgs> {
  @core.attr(String)
  public catalogId!: string | core.StringOut;

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

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

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

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