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

export interface KinesisConfigurationArgs extends core.SchemaArgs {
  aggregationEnabled?: boolean | core.BooleanOut;

  streamArn: string | core.StringOut;
}

export class KinesisConfiguration extends core.Schema<KinesisConfigurationArgs> {
  @core.attr(Boolean)
  public aggregationEnabled?: boolean | core.BooleanOut;

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

export interface StreamArgs extends core.ResourceArgs {
  exclusiveEndTime?: string | core.StringOut;

  inclusiveStartTime: string | core.StringOut;

  kinesisConfiguration: KinesisConfiguration;

  ledgerName: string | core.StringOut;

  roleArn: string | core.StringOut;

  streamName: string | core.StringOut;

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

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

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

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

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

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

  @core.attr(KinesisConfiguration)
  public kinesisConfiguration!: KinesisConfiguration;

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

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

  @core.attr(String)
  public streamName!: 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>;

  constructor(name: string, args?: StreamArgs) {
    super(name, "aws_qldb_stream", args);
  }

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