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

export interface IncludeMetricArgs extends core.SchemaArgs {
  metricName: string | core.StringOut;

  namespace: string | core.StringOut;
}

export class IncludeMetric extends core.Schema<IncludeMetricArgs> {
  @core.attr(String)
  public metricName!: string | core.StringOut;

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

export interface StatisticsConfigurationArgs extends core.SchemaArgs {
  additionalStatistics: core.Array<string> | core.ArrayOut<core.StringOut>;

  includeMetric: core.Array<IncludeMetric> | core.ArrayOut<IncludeMetric>;
}

export class StatisticsConfiguration extends core.Schema<StatisticsConfigurationArgs> {
  @core.attr(String, { kind: "array" })
  public additionalStatistics!:
    | core.Array<string>
    | core.ArrayOut<core.StringOut>;

  @core.attr(IncludeMetric, { kind: "array" })
  public includeMetric!:
    | core.Array<IncludeMetric>
    | core.ArrayOut<IncludeMetric>;
}

export interface IncludeFilterArgs extends core.SchemaArgs {
  namespace: string | core.StringOut;
}

export class IncludeFilter extends core.Schema<IncludeFilterArgs> {
  @core.attr(String)
  public namespace!: string | core.StringOut;
}

export interface ExcludeFilterArgs extends core.SchemaArgs {
  namespace: string | core.StringOut;
}

export class ExcludeFilter extends core.Schema<ExcludeFilterArgs> {
  @core.attr(String)
  public namespace!: string | core.StringOut;
}

export interface MetricStreamArgs extends core.ResourceArgs {
  excludeFilter?: core.Array<ExcludeFilter> | core.ArrayOut<ExcludeFilter>;

  firehoseArn: string | core.StringOut;

  includeFilter?: core.Array<IncludeFilter> | core.ArrayOut<IncludeFilter>;

  name?: string | core.StringOut;

  namePrefix?: string | core.StringOut;

  outputFormat: string | core.StringOut;

  roleArn: string | core.StringOut;

  statisticsConfiguration?:
    | core.Array<StatisticsConfiguration>
    | core.ArrayOut<StatisticsConfiguration>;

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

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

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

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

  @core.attr(ExcludeFilter, { kind: "array" })
  public excludeFilter?:
    | core.Array<ExcludeFilter>
    | core.ArrayOut<ExcludeFilter>;

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

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

  @core.attr(IncludeFilter, { kind: "array" })
  public includeFilter?:
    | core.Array<IncludeFilter>
    | core.ArrayOut<IncludeFilter>;

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

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

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

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

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

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

  @core.attr(StatisticsConfiguration, { kind: "array" })
  public statisticsConfiguration?:
    | core.Array<StatisticsConfiguration>
    | core.ArrayOut<StatisticsConfiguration>;

  @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?: MetricStreamArgs) {
    super(name, "aws_cloudwatch_metric_stream", args);
  }

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