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

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

  filterPrefix?: string | core.StringOut;

  filterSuffix?: string | core.StringOut;

  id?: string | core.StringOut;

  topicArn: string | core.StringOut;
}

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

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

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

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

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

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

  filterPrefix?: string | core.StringOut;

  filterSuffix?: string | core.StringOut;

  id?: string | core.StringOut;

  queueArn: string | core.StringOut;
}

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

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

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

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

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

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

  filterPrefix?: string | core.StringOut;

  filterSuffix?: string | core.StringOut;

  id?: string | core.StringOut;

  lambdaFunctionArn?: string | core.StringOut;
}

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

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

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

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

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

export interface BucketNotificationArgs extends core.ResourceArgs {
  bucket: string | core.StringOut;

  eventbridge?: boolean | core.BooleanOut;

  lambdaFunction?: core.Array<LambdaFunction> | core.ArrayOut<LambdaFunction>;

  queue?: core.Array<Queue> | core.ArrayOut<Queue>;

  topic?: core.Array<Topic> | core.ArrayOut<Topic>;
}

export class BucketNotification extends core.Resource<BucketNotificationArgs> {
  @core.attr(String)
  public bucket!: string | core.StringOut;

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

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

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

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

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

  constructor(name: string, args?: BucketNotificationArgs) {
    super(name, "aws_s3_bucket_notification", args);
  }

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