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)
  public roleArn!: string | core.StringOut;

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

export interface EndpointArgs extends core.SchemaArgs {
  kinesisStreamConfig: KinesisStreamConfig;

  streamType: string | core.StringOut;
}

export class Endpoint extends core.Schema<EndpointArgs> {
  @core.attr(KinesisStreamConfig)
  public kinesisStreamConfig!: KinesisStreamConfig;

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

export interface RealtimeLogConfigArgs extends core.ResourceArgs {
  endpoint: Endpoint;

  fields: core.Array<string> | core.ArrayOut<core.StringOut>;

  name: string | core.StringOut;

  samplingRate: number | core.NumberOut;
}

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

  @core.attr(Endpoint)
  public endpoint!: Endpoint;

  @core.attr(String, { 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)
  public samplingRate!: number | core.NumberOut;

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

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