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

export interface DsInvocationArgs {
  functionName: string | core.StringOut;

  input: string | core.StringOut;

  qualifier?: string | core.StringOut;
}

export class DsInvocation extends core.Data<DsInvocationArgs> {
  @core.attr(String)
  public functionName!: string | core.StringOut;

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

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

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

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

  constructor(name: string, args?: DsInvocationArgs) {
    super(name, "aws_lambda_invocation", args);
  }

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