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

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

  sourceFileLocation?: string | core.StringOut;
}

export class DeleteStepDetails extends core.Schema<DeleteStepDetailsArgs> {
  @core.attr(String)
  public name?: string | core.StringOut;

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

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

  value: string | core.StringOut;
}

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

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

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

  sourceFileLocation?: string | core.StringOut;

  tags?: core.Array<Tags> | core.ArrayOut<Tags>;
}

export class TagStepDetails extends core.Schema<TagStepDetailsArgs> {
  @core.attr(String)
  public name?: string | core.StringOut;

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

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

export interface EfsFileLocationArgs extends core.SchemaArgs {
  fileSystemId?: string | core.StringOut;

  path?: string | core.StringOut;
}

export class EfsFileLocation extends core.Schema<EfsFileLocationArgs> {
  @core.attr(String)
  public fileSystemId?: string | core.StringOut;

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

export interface S3FileLocationArgs extends core.SchemaArgs {
  bucket?: string | core.StringOut;

  key?: string | core.StringOut;
}

export class S3FileLocation extends core.Schema<S3FileLocationArgs> {
  @core.attr(String)
  public bucket?: string | core.StringOut;

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

export interface DestinationFileLocationArgs extends core.SchemaArgs {
  efsFileLocation?: EfsFileLocation;

  s3FileLocation?: S3FileLocation;
}

export class DestinationFileLocation extends core.Schema<DestinationFileLocationArgs> {
  @core.attr(EfsFileLocation)
  public efsFileLocation?: EfsFileLocation;

  @core.attr(S3FileLocation)
  public s3FileLocation?: S3FileLocation;
}

export interface CopyStepDetailsArgs extends core.SchemaArgs {
  destinationFileLocation?: DestinationFileLocation;

  name?: string | core.StringOut;

  overwriteExisting?: string | core.StringOut;

  sourceFileLocation?: string | core.StringOut;
}

export class CopyStepDetails extends core.Schema<CopyStepDetailsArgs> {
  @core.attr(DestinationFileLocation)
  public destinationFileLocation?: DestinationFileLocation;

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

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

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

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

  sourceFileLocation?: string | core.StringOut;

  target?: string | core.StringOut;

  timeoutSeconds?: number | core.NumberOut;
}

export class CustomStepDetails extends core.Schema<CustomStepDetailsArgs> {
  @core.attr(String)
  public name?: string | core.StringOut;

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

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

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

export interface OnExceptionStepsArgs extends core.SchemaArgs {
  copyStepDetails?: CopyStepDetails;

  customStepDetails?: CustomStepDetails;

  deleteStepDetails?: DeleteStepDetails;

  tagStepDetails?: TagStepDetails;

  type: string | core.StringOut;
}

export class OnExceptionSteps extends core.Schema<OnExceptionStepsArgs> {
  @core.attr(CopyStepDetails)
  public copyStepDetails?: CopyStepDetails;

  @core.attr(CustomStepDetails)
  public customStepDetails?: CustomStepDetails;

  @core.attr(DeleteStepDetails)
  public deleteStepDetails?: DeleteStepDetails;

  @core.attr(TagStepDetails)
  public tagStepDetails?: TagStepDetails;

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

export interface StepsArgs extends core.SchemaArgs {
  copyStepDetails?: CopyStepDetails;

  customStepDetails?: CustomStepDetails;

  deleteStepDetails?: DeleteStepDetails;

  tagStepDetails?: TagStepDetails;

  type: string | core.StringOut;
}

export class Steps extends core.Schema<StepsArgs> {
  @core.attr(CopyStepDetails)
  public copyStepDetails?: CopyStepDetails;

  @core.attr(CustomStepDetails)
  public customStepDetails?: CustomStepDetails;

  @core.attr(DeleteStepDetails)
  public deleteStepDetails?: DeleteStepDetails;

  @core.attr(TagStepDetails)
  public tagStepDetails?: TagStepDetails;

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

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

  onExceptionSteps?:
    | core.Array<OnExceptionSteps>
    | core.ArrayOut<OnExceptionSteps>;

  steps: core.Array<Steps> | core.ArrayOut<Steps>;

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

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

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

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

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

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

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

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

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