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

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

  stringValue: string | core.StringOut;
}

export class ParameterValue extends core.Schema<ParameterValueArgs> {
  @core.attr(String)
  public id!: string | core.StringOut;

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

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

  refValue?: string | core.StringOut;

  stringValue?: string | core.StringOut;
}

export class Field extends core.Schema<FieldArgs> {
  @core.attr(String)
  public key!: string | core.StringOut;

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

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

export interface PipelineObjectArgs extends core.SchemaArgs {
  field?: core.Array<Field> | core.ArrayOut<Field>;

  id: string | core.StringOut;

  name: string | core.StringOut;
}

export class PipelineObject extends core.Schema<PipelineObjectArgs> {
  @core.attr(Field, { kind: "array" })
  public field?: core.Array<Field> | core.ArrayOut<Field>;

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

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

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

  stringValue: string | core.StringOut;
}

export class Attribute extends core.Schema<AttributeArgs> {
  @core.attr(String)
  public key!: string | core.StringOut;

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

export interface ParameterObjectArgs extends core.SchemaArgs {
  attribute?: core.Array<Attribute> | core.ArrayOut<Attribute>;

  id: string | core.StringOut;
}

export class ParameterObject extends core.Schema<ParameterObjectArgs> {
  @core.attr(Attribute, { kind: "array" })
  public attribute?: core.Array<Attribute> | core.ArrayOut<Attribute>;

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

export interface PipelineDefinitionArgs extends core.ResourceArgs {
  parameterObject?:
    | core.Array<ParameterObject>
    | core.ArrayOut<ParameterObject>;

  parameterValue?: core.Array<ParameterValue> | core.ArrayOut<ParameterValue>;

  pipelineId: string | core.StringOut;

  pipelineObject: core.Array<PipelineObject> | core.ArrayOut<PipelineObject>;
}

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

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

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

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

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

  constructor(name: string, args?: PipelineDefinitionArgs) {
    super(name, "aws_datapipeline_pipeline_definition", args);
  }

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