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

export interface CsvClassifierArgs extends core.SchemaArgs {
  allowSingleColumn?: boolean | core.BooleanOut;

  containsHeader?: string | core.StringOut;

  delimiter?: string | core.StringOut;

  disableValueTrimming?: boolean | core.BooleanOut;

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

  quoteSymbol?: string | core.StringOut;
}

export class CsvClassifier extends core.Schema<CsvClassifierArgs> {
  @core.attr(Boolean)
  public allowSingleColumn?: boolean | core.BooleanOut;

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

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

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

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

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

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

  customPatterns?: string | core.StringOut;

  grokPattern: string | core.StringOut;
}

export class GrokClassifier extends core.Schema<GrokClassifierArgs> {
  @core.attr(String)
  public classification!: string | core.StringOut;

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

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

export interface JsonClassifierArgs extends core.SchemaArgs {
  jsonPath: string | core.StringOut;
}

export class JsonClassifier extends core.Schema<JsonClassifierArgs> {
  @core.attr(String)
  public jsonPath!: string | core.StringOut;
}

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

  rowTag: string | core.StringOut;
}

export class XmlClassifier extends core.Schema<XmlClassifierArgs> {
  @core.attr(String)
  public classification!: string | core.StringOut;

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

export interface ClassifierArgs extends core.ResourceArgs {
  csvClassifier?: CsvClassifier;

  grokClassifier?: GrokClassifier;

  jsonClassifier?: JsonClassifier;

  name: string | core.StringOut;

  xmlClassifier?: XmlClassifier;
}

export class Classifier extends core.Resource<ClassifierArgs> {
  @core.attr(CsvClassifier)
  public csvClassifier?: CsvClassifier;

  @core.attr(GrokClassifier)
  public grokClassifier?: GrokClassifier;

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

  @core.attr(JsonClassifier)
  public jsonClassifier?: JsonClassifier;

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

  @core.attr(XmlClassifier)
  public xmlClassifier?: XmlClassifier;

  constructor(name: string, args?: ClassifierArgs) {
    super(name, "aws_glue_classifier", args);
  }

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