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

export interface S3TargetArgs extends core.SchemaArgs {
  connectionName?: string | core.StringOut;

  dlqEventQueueArn?: string | core.StringOut;

  eventQueueArn?: string | core.StringOut;

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

  path: string | core.StringOut;

  sampleSize?: number | core.NumberOut;
}

export class S3Target extends core.Schema<S3TargetArgs> {
  @core.attr(String)
  public connectionName?: string | core.StringOut;

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

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

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

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

  @core.attr(Number)
  public sampleSize?: number | core.NumberOut;
}

export interface RecrawlPolicyArgs extends core.SchemaArgs {
  recrawlBehavior?: string | core.StringOut;
}

export class RecrawlPolicy extends core.Schema<RecrawlPolicyArgs> {
  @core.attr(String)
  public recrawlBehavior?: string | core.StringOut;
}

export interface DynamodbTargetArgs extends core.SchemaArgs {
  path: string | core.StringOut;

  scanAll?: boolean | core.BooleanOut;

  scanRate?: number | core.NumberOut;
}

export class DynamodbTarget extends core.Schema<DynamodbTargetArgs> {
  @core.attr(String)
  public path!: string | core.StringOut;

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

  @core.attr(Number)
  public scanRate?: number | core.NumberOut;
}

export interface SchemaChangePolicyArgs extends core.SchemaArgs {
  deleteBehavior?: string | core.StringOut;

  updateBehavior?: string | core.StringOut;
}

export class SchemaChangePolicy extends core.Schema<SchemaChangePolicyArgs> {
  @core.attr(String)
  public deleteBehavior?: string | core.StringOut;

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

export interface JdbcTargetArgs extends core.SchemaArgs {
  connectionName: string | core.StringOut;

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

  path: string | core.StringOut;
}

export class JdbcTarget extends core.Schema<JdbcTargetArgs> {
  @core.attr(String)
  public connectionName!: string | core.StringOut;

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

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

export interface DeltaTargetArgs extends core.SchemaArgs {
  connectionName: string | core.StringOut;

  deltaTables: core.Array<string> | core.ArrayOut<core.StringOut>;

  writeManifest: boolean | core.BooleanOut;
}

export class DeltaTarget extends core.Schema<DeltaTargetArgs> {
  @core.attr(String)
  public connectionName!: string | core.StringOut;

  @core.attr(String, { kind: "array" })
  public deltaTables!: core.Array<string> | core.ArrayOut<core.StringOut>;

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

export interface MongodbTargetArgs extends core.SchemaArgs {
  connectionName: string | core.StringOut;

  path: string | core.StringOut;

  scanAll?: boolean | core.BooleanOut;
}

export class MongodbTarget extends core.Schema<MongodbTargetArgs> {
  @core.attr(String)
  public connectionName!: string | core.StringOut;

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

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

export interface CatalogTargetArgs extends core.SchemaArgs {
  databaseName: string | core.StringOut;

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

export class CatalogTarget extends core.Schema<CatalogTargetArgs> {
  @core.attr(String)
  public databaseName!: string | core.StringOut;

  @core.attr(String, { kind: "array" })
  public tables!: core.Array<string> | core.ArrayOut<core.StringOut>;
}

export interface LineageConfigurationArgs extends core.SchemaArgs {
  crawlerLineageSettings?: string | core.StringOut;
}

export class LineageConfiguration extends core.Schema<LineageConfigurationArgs> {
  @core.attr(String)
  public crawlerLineageSettings?: string | core.StringOut;
}

export interface CrawlerArgs extends core.ResourceArgs {
  catalogTarget?: core.Array<CatalogTarget> | core.ArrayOut<CatalogTarget>;

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

  configuration?: string | core.StringOut;

  databaseName: string | core.StringOut;

  deltaTarget?: core.Array<DeltaTarget> | core.ArrayOut<DeltaTarget>;

  description?: string | core.StringOut;

  dynamodbTarget?: core.Array<DynamodbTarget> | core.ArrayOut<DynamodbTarget>;

  jdbcTarget?: core.Array<JdbcTarget> | core.ArrayOut<JdbcTarget>;

  lineageConfiguration?: LineageConfiguration;

  mongodbTarget?: core.Array<MongodbTarget> | core.ArrayOut<MongodbTarget>;

  name: string | core.StringOut;

  recrawlPolicy?: RecrawlPolicy;

  role: string | core.StringOut;

  s3Target?: core.Array<S3Target> | core.ArrayOut<S3Target>;

  schedule?: string | core.StringOut;

  schemaChangePolicy?: SchemaChangePolicy;

  securityConfiguration?: string | core.StringOut;

  tablePrefix?: string | core.StringOut;

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

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

export class Crawler extends core.Resource<CrawlerArgs> {
  @core.attr(String, { computed: true })
  public arn!: string | core.StringOut;

  @core.attr(CatalogTarget, { kind: "array" })
  public catalogTarget?:
    | core.Array<CatalogTarget>
    | core.ArrayOut<CatalogTarget>;

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

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

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

  @core.attr(DeltaTarget, { kind: "array" })
  public deltaTarget?: core.Array<DeltaTarget> | core.ArrayOut<DeltaTarget>;

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

  @core.attr(DynamodbTarget, { kind: "array" })
  public dynamodbTarget?:
    | core.Array<DynamodbTarget>
    | core.ArrayOut<DynamodbTarget>;

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

  @core.attr(JdbcTarget, { kind: "array" })
  public jdbcTarget?: core.Array<JdbcTarget> | core.ArrayOut<JdbcTarget>;

  @core.attr(LineageConfiguration)
  public lineageConfiguration?: LineageConfiguration;

  @core.attr(MongodbTarget, { kind: "array" })
  public mongodbTarget?:
    | core.Array<MongodbTarget>
    | core.ArrayOut<MongodbTarget>;

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

  @core.attr(RecrawlPolicy)
  public recrawlPolicy?: RecrawlPolicy;

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

  @core.attr(S3Target, { kind: "array" })
  public s3Target?: core.Array<S3Target> | core.ArrayOut<S3Target>;

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

  @core.attr(SchemaChangePolicy)
  public schemaChangePolicy?: SchemaChangePolicy;

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

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

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

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