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

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

  target: string | core.StringOut;

  targetParameter?: string | core.StringOut;
}

export class DagEdge extends core.Schema<DagEdgeArgs> {
  @core.attr(String)
  public source!: string | core.StringOut;

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

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

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

  param?: boolean | core.BooleanOut;

  value: string | core.StringOut;
}

export class Args extends core.Schema<ArgsArgs> {
  @core.attr(String)
  public name!: string | core.StringOut;

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

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

export interface DagNodeArgs extends core.SchemaArgs {
  args: core.Array<Args> | core.ArrayOut<Args>;

  id: string | core.StringOut;

  lineNumber?: number | core.NumberOut;

  nodeType: string | core.StringOut;
}

export class DagNode extends core.Schema<DagNodeArgs> {
  @core.attr(Args, { kind: "array" })
  public args!: core.Array<Args> | core.ArrayOut<Args>;

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

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

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

export interface DsScriptArgs {
  dagEdge: core.Array<DagEdge> | core.ArrayOut<DagEdge>;

  dagNode: core.Array<DagNode> | core.ArrayOut<DagNode>;

  language?: string | core.StringOut;
}

export class DsScript extends core.Data<DsScriptArgs> {
  @core.attr(DagEdge, { kind: "array" })
  public dagEdge!: core.Array<DagEdge> | core.ArrayOut<DagEdge>;

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

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

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

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

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

  constructor(name: string, args?: DsScriptArgs) {
    super(name, "aws_glue_script", args);
  }

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