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

export interface SnsDestinationArgs extends core.SchemaArgs {
  topicArn: string | core.StringOut;
}

export class SnsDestination extends core.Schema<SnsDestinationArgs> {
  @core.attr(String)
  public topicArn!: string | core.StringOut;
}

export interface CloudwatchDestinationArgs extends core.SchemaArgs {
  defaultValue: string | core.StringOut;

  dimensionName: string | core.StringOut;

  valueSource: string | core.StringOut;
}

export class CloudwatchDestination extends core.Schema<CloudwatchDestinationArgs> {
  @core.attr(String)
  public defaultValue!: string | core.StringOut;

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

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

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

  streamArn: string | core.StringOut;
}

export class KinesisDestination extends core.Schema<KinesisDestinationArgs> {
  @core.attr(String)
  public roleArn!: string | core.StringOut;

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

export interface EventDestinationArgs extends core.ResourceArgs {
  cloudwatchDestination?:
    | core.Array<CloudwatchDestination>
    | core.ArrayOut<CloudwatchDestination>;

  configurationSetName: string | core.StringOut;

  enabled?: boolean | core.BooleanOut;

  kinesisDestination?: KinesisDestination;

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

  name: string | core.StringOut;

  snsDestination?: SnsDestination;
}

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

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

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

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

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

  @core.attr(KinesisDestination)
  public kinesisDestination?: KinesisDestination;

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

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

  @core.attr(SnsDestination)
  public snsDestination?: SnsDestination;

  constructor(name: string, args?: EventDestinationArgs) {
    super(name, "aws_ses_event_destination", args);
  }

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