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

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

  name: string | core.StringOut;
}

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

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

export interface InputRecordTablesArgs extends core.SchemaArgs {
  catalogId?: string | core.StringOut;

  connectionName?: string | core.StringOut;

  databaseName: string | core.StringOut;

  tableName: string | core.StringOut;
}

export class InputRecordTables extends core.Schema<InputRecordTablesArgs> {
  @core.attr(String)
  public catalogId?: string | core.StringOut;

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

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

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

export interface FindMatchesParametersArgs extends core.SchemaArgs {
  accuracyCostTradeOff?: number | core.NumberOut;

  enforceProvidedLabels?: boolean | core.BooleanOut;

  precisionRecallTradeOff?: number | core.NumberOut;

  primaryKeyColumnName?: string | core.StringOut;
}

export class FindMatchesParameters extends core.Schema<FindMatchesParametersArgs> {
  @core.attr(Number)
  public accuracyCostTradeOff?: number | core.NumberOut;

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

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

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

export interface ParametersArgs extends core.SchemaArgs {
  findMatchesParameters: FindMatchesParameters;

  transformType: string | core.StringOut;
}

export class Parameters extends core.Schema<ParametersArgs> {
  @core.attr(FindMatchesParameters)
  public findMatchesParameters!: FindMatchesParameters;

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

export interface MlTransformArgs extends core.ResourceArgs {
  description?: string | core.StringOut;

  glueVersion?: string | core.StringOut;

  inputRecordTables:
    | core.Array<InputRecordTables>
    | core.ArrayOut<InputRecordTables>;

  maxCapacity?: number | core.NumberOut;

  maxRetries?: number | core.NumberOut;

  name: string | core.StringOut;

  numberOfWorkers?: number | core.NumberOut;

  parameters: Parameters;

  roleArn: string | core.StringOut;

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

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

  timeout?: number | core.NumberOut;

  workerType?: string | core.StringOut;
}

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

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

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

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

  @core.attr(InputRecordTables, { kind: "array" })
  public inputRecordTables!:
    | core.Array<InputRecordTables>
    | core.ArrayOut<InputRecordTables>;

  @core.attr(Number, { computed: true })
  public labelCount!: number | core.NumberOut;

  @core.attr(Number, { computed: true })
  public maxCapacity?: number | core.NumberOut;

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

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

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

  @core.attr(Parameters)
  public parameters!: Parameters;

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

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

  @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>;

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

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

  constructor(name: string, args?: MlTransformArgs) {
    super(name, "aws_glue_ml_transform", args);
  }

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