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

export interface BounceActionArgs extends core.SchemaArgs {
  message: string | core.StringOut;

  position: number | core.NumberOut;

  sender: string | core.StringOut;

  smtpReplyCode: string | core.StringOut;

  statusCode?: string | core.StringOut;

  topicArn?: string | core.StringOut;
}

export class BounceAction extends core.Schema<BounceActionArgs> {
  @core.attr(String)
  public message!: string | core.StringOut;

  @core.attr(Number)
  public position!: number | core.NumberOut;

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

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

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

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

export interface WorkmailActionArgs extends core.SchemaArgs {
  organizationArn: string | core.StringOut;

  position: number | core.NumberOut;

  topicArn?: string | core.StringOut;
}

export class WorkmailAction extends core.Schema<WorkmailActionArgs> {
  @core.attr(String)
  public organizationArn!: string | core.StringOut;

  @core.attr(Number)
  public position!: number | core.NumberOut;

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

export interface StopActionArgs extends core.SchemaArgs {
  position: number | core.NumberOut;

  scope: string | core.StringOut;

  topicArn?: string | core.StringOut;
}

export class StopAction extends core.Schema<StopActionArgs> {
  @core.attr(Number)
  public position!: number | core.NumberOut;

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

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

export interface S3ActionArgs extends core.SchemaArgs {
  bucketName: string | core.StringOut;

  kmsKeyArn?: string | core.StringOut;

  objectKeyPrefix?: string | core.StringOut;

  position: number | core.NumberOut;

  topicArn?: string | core.StringOut;
}

export class S3Action extends core.Schema<S3ActionArgs> {
  @core.attr(String)
  public bucketName!: string | core.StringOut;

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

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

  @core.attr(Number)
  public position!: number | core.NumberOut;

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

export interface LambdaActionArgs extends core.SchemaArgs {
  functionArn: string | core.StringOut;

  invocationType?: string | core.StringOut;

  position: number | core.NumberOut;

  topicArn?: string | core.StringOut;
}

export class LambdaAction extends core.Schema<LambdaActionArgs> {
  @core.attr(String)
  public functionArn!: string | core.StringOut;

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

  @core.attr(Number)
  public position!: number | core.NumberOut;

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

export interface AddHeaderActionArgs extends core.SchemaArgs {
  headerName: string | core.StringOut;

  headerValue: string | core.StringOut;

  position: number | core.NumberOut;
}

export class AddHeaderAction extends core.Schema<AddHeaderActionArgs> {
  @core.attr(String)
  public headerName!: string | core.StringOut;

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

  @core.attr(Number)
  public position!: number | core.NumberOut;
}

export interface SnsActionArgs extends core.SchemaArgs {
  encoding?: string | core.StringOut;

  position: number | core.NumberOut;

  topicArn: string | core.StringOut;
}

export class SnsAction extends core.Schema<SnsActionArgs> {
  @core.attr(String)
  public encoding?: string | core.StringOut;

  @core.attr(Number)
  public position!: number | core.NumberOut;

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

export interface ReceiptRuleArgs extends core.ResourceArgs {
  addHeaderAction?:
    | core.Array<AddHeaderAction>
    | core.ArrayOut<AddHeaderAction>;

  after?: string | core.StringOut;

  bounceAction?: core.Array<BounceAction> | core.ArrayOut<BounceAction>;

  enabled?: boolean | core.BooleanOut;

  lambdaAction?: core.Array<LambdaAction> | core.ArrayOut<LambdaAction>;

  name: string | core.StringOut;

  recipients?: core.Array<string> | core.ArrayOut<core.StringOut>;

  ruleSetName: string | core.StringOut;

  s3Action?: core.Array<S3Action> | core.ArrayOut<S3Action>;

  scanEnabled?: boolean | core.BooleanOut;

  snsAction?: core.Array<SnsAction> | core.ArrayOut<SnsAction>;

  stopAction?: core.Array<StopAction> | core.ArrayOut<StopAction>;

  tlsPolicy?: string | core.StringOut;

  workmailAction?: core.Array<WorkmailAction> | core.ArrayOut<WorkmailAction>;
}

export class ReceiptRule extends core.Resource<ReceiptRuleArgs> {
  @core.attr(AddHeaderAction, { kind: "array" })
  public addHeaderAction?:
    | core.Array<AddHeaderAction>
    | core.ArrayOut<AddHeaderAction>;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  constructor(name: string, args?: ReceiptRuleArgs) {
    super(name, "aws_ses_receipt_rule", args);
  }

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