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

export interface CreateDatabaseDefaultPermissionsArgs extends core.SchemaArgs {
  permissions?: core.Array<string> | core.ArrayOut<core.StringOut>;

  principal?: string | core.StringOut;
}

export class CreateDatabaseDefaultPermissions extends core.Schema<CreateDatabaseDefaultPermissionsArgs> {
  @core.attr(String, { computed: true, kind: "array" })
  public permissions?: core.Array<string> | core.ArrayOut<core.StringOut>;

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

export interface CreateTableDefaultPermissionsArgs extends core.SchemaArgs {
  permissions?: core.Array<string> | core.ArrayOut<core.StringOut>;

  principal?: string | core.StringOut;
}

export class CreateTableDefaultPermissions extends core.Schema<CreateTableDefaultPermissionsArgs> {
  @core.attr(String, { computed: true, kind: "array" })
  public permissions?: core.Array<string> | core.ArrayOut<core.StringOut>;

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

export interface DataLakeSettingsArgs extends core.ResourceArgs {
  admins?: core.Array<string> | core.ArrayOut<core.StringOut>;

  catalogId?: string | core.StringOut;

  createDatabaseDefaultPermissions?:
    | core.Array<CreateDatabaseDefaultPermissions>
    | core.ArrayOut<CreateDatabaseDefaultPermissions>;

  createTableDefaultPermissions?:
    | core.Array<CreateTableDefaultPermissions>
    | core.ArrayOut<CreateTableDefaultPermissions>;

  trustedResourceOwners?: core.Array<string> | core.ArrayOut<core.StringOut>;
}

export class DataLakeSettings extends core.Resource<DataLakeSettingsArgs> {
  @core.attr(String, { computed: true, kind: "array" })
  public admins?: core.Array<string> | core.ArrayOut<core.StringOut>;

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

  @core.attr(CreateDatabaseDefaultPermissions, {
    computed: true,
    kind: "array",
  })
  public createDatabaseDefaultPermissions?:
    | core.Array<CreateDatabaseDefaultPermissions>
    | core.ArrayOut<CreateDatabaseDefaultPermissions>;

  @core.attr(CreateTableDefaultPermissions, { computed: true, kind: "array" })
  public createTableDefaultPermissions?:
    | core.Array<CreateTableDefaultPermissions>
    | core.ArrayOut<CreateTableDefaultPermissions>;

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

  @core.attr(String, { computed: true, kind: "array" })
  public trustedResourceOwners?:
    | core.Array<string>
    | core.ArrayOut<core.StringOut>;

  constructor(name: string, args?: DataLakeSettingsArgs) {
    super(name, "aws_lakeformation_data_lake_settings", args);
  }

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