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

export interface TracingConfigurationArgs extends core.SchemaArgs {
  enabled?: boolean | core.BooleanOut;
}

export class TracingConfiguration extends core.Schema<TracingConfigurationArgs> {
  @core.attr(Boolean)
  public enabled?: boolean | core.BooleanOut;
}

export interface LoggingConfigurationArgs extends core.SchemaArgs {
  includeExecutionData?: boolean | core.BooleanOut;

  level?: string | core.StringOut;

  logDestination?: string | core.StringOut;
}

export class LoggingConfiguration extends core.Schema<LoggingConfigurationArgs> {
  @core.attr(Boolean)
  public includeExecutionData?: boolean | core.BooleanOut;

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

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

export interface StateMachineArgs extends core.ResourceArgs {
  definition: string | core.StringOut;

  loggingConfiguration?: LoggingConfiguration;

  name: string | core.StringOut;

  roleArn: string | core.StringOut;

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

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

  tracingConfiguration?: TracingConfiguration;

  type?: string | core.StringOut;
}

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

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

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

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

  @core.attr(LoggingConfiguration, { computed: true })
  public loggingConfiguration?: LoggingConfiguration;

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

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

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

  @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>;

  @core.attr(TracingConfiguration, { computed: true })
  public tracingConfiguration?: TracingConfiguration;

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

  constructor(name: string, args?: StateMachineArgs) {
    super(name, "aws_sfn_state_machine", args);
  }

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