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

export interface StreamModeDetailsArgs extends core.SchemaArgs {
  streamMode: string | core.StringOut;
}

export class StreamModeDetails extends core.Schema<StreamModeDetailsArgs> {
  @core.attr(String)
  public streamMode!: string | core.StringOut;
}

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

  encryptionType?: string | core.StringOut;

  enforceConsumerDeletion?: boolean | core.BooleanOut;

  kmsKeyId?: string | core.StringOut;

  name: string | core.StringOut;

  retentionPeriod?: number | core.NumberOut;

  shardCount?: number | core.NumberOut;

  shardLevelMetrics?: core.Array<string> | core.ArrayOut<core.StringOut>;

  streamModeDetails?: StreamModeDetails;

  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 encryptionType?: string | core.StringOut;

  @core.attr(Boolean)
  public enforceConsumerDeletion?: boolean | core.BooleanOut;

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

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

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

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

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

  @core.attr(String, { kind: "array" })
  public shardLevelMetrics?: core.Array<string> | core.ArrayOut<core.StringOut>;

  @core.attr(StreamModeDetails, { computed: true })
  public streamModeDetails?: StreamModeDetails;

  @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_kinesis_stream", args);
  }

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