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

export interface KinesisStreamConfigArgs extends core.SchemaArgs {
  roleArn: string | core.StringOut;

  streamArn: string | core.StringOut;
}

export class KinesisStreamConfig extends core.Schema<KinesisStreamConfigArgs> {
  @core.attr(String, { computed: true })
  public roleArn!: string | core.StringOut;

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

export interface EndpointArgs extends core.SchemaArgs {
  kinesisStreamConfig:
    | core.Array<KinesisStreamConfig>
    | core.ArrayOut<KinesisStreamConfig>;

  streamType: string | core.StringOut;
}

export class Endpoint extends core.Schema<EndpointArgs> {
  @core.attr(KinesisStreamConfig, { computed: true, kind: "array" })
  public kinesisStreamConfig!:
    | core.Array<KinesisStreamConfig>
    | core.ArrayOut<KinesisStreamConfig>;

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

export interface DsRealtimeLogConfigArgs {
  name: string | core.StringOut;
}

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

  @core.attr(Endpoint, { computed: true, kind: "array" })
  public endpoint!: core.Array<Endpoint> | core.ArrayOut<Endpoint>;

  @core.attr(String, { computed: true, kind: "array" })
  public fields!: core.Array<string> | core.ArrayOut<core.StringOut>;

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

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

  @core.attr(Number, { computed: true })
  public samplingRate!: number | core.NumberOut;

  constructor(name: string, args?: DsRealtimeLogConfigArgs) {
    super(name, "aws_cloudfront_realtime_log_config", args);
  }

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