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

export interface CompromisedCredentialsRiskConfigurationActionsArgs
  extends core.SchemaArgs {
  eventAction: string | core.StringOut;
}

export class CompromisedCredentialsRiskConfigurationActions extends core.Schema<CompromisedCredentialsRiskConfigurationActionsArgs> {
  @core.attr(String)
  public eventAction!: string | core.StringOut;
}

export interface CompromisedCredentialsRiskConfigurationArgs
  extends core.SchemaArgs {
  actions: CompromisedCredentialsRiskConfigurationActions;

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

export class CompromisedCredentialsRiskConfiguration extends core.Schema<CompromisedCredentialsRiskConfigurationArgs> {
  @core.attr(CompromisedCredentialsRiskConfigurationActions)
  public actions!: CompromisedCredentialsRiskConfigurationActions;

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

export interface RiskExceptionConfigurationArgs extends core.SchemaArgs {
  blockedIpRangeList?: core.Array<string> | core.ArrayOut<core.StringOut>;

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

export class RiskExceptionConfiguration extends core.Schema<RiskExceptionConfigurationArgs> {
  @core.attr(String, { kind: "array" })
  public blockedIpRangeList?:
    | core.Array<string>
    | core.ArrayOut<core.StringOut>;

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

export interface LowActionArgs extends core.SchemaArgs {
  eventAction: string | core.StringOut;

  notify: boolean | core.BooleanOut;
}

export class LowAction extends core.Schema<LowActionArgs> {
  @core.attr(String)
  public eventAction!: string | core.StringOut;

  @core.attr(Boolean)
  public notify!: boolean | core.BooleanOut;
}

export interface MediumActionArgs extends core.SchemaArgs {
  eventAction: string | core.StringOut;

  notify: boolean | core.BooleanOut;
}

export class MediumAction extends core.Schema<MediumActionArgs> {
  @core.attr(String)
  public eventAction!: string | core.StringOut;

  @core.attr(Boolean)
  public notify!: boolean | core.BooleanOut;
}

export interface HighActionArgs extends core.SchemaArgs {
  eventAction: string | core.StringOut;

  notify: boolean | core.BooleanOut;
}

export class HighAction extends core.Schema<HighActionArgs> {
  @core.attr(String)
  public eventAction!: string | core.StringOut;

  @core.attr(Boolean)
  public notify!: boolean | core.BooleanOut;
}

export interface AccountTakeoverRiskConfigurationActionsArgs
  extends core.SchemaArgs {
  highAction?: HighAction;

  lowAction?: LowAction;

  mediumAction?: MediumAction;
}

export class AccountTakeoverRiskConfigurationActions extends core.Schema<AccountTakeoverRiskConfigurationActionsArgs> {
  @core.attr(HighAction)
  public highAction?: HighAction;

  @core.attr(LowAction)
  public lowAction?: LowAction;

  @core.attr(MediumAction)
  public mediumAction?: MediumAction;
}

export interface BlockEmailArgs extends core.SchemaArgs {
  htmlBody: string | core.StringOut;

  subject: string | core.StringOut;

  textBody: string | core.StringOut;
}

export class BlockEmail extends core.Schema<BlockEmailArgs> {
  @core.attr(String)
  public htmlBody!: string | core.StringOut;

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

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

export interface MfaEmailArgs extends core.SchemaArgs {
  htmlBody: string | core.StringOut;

  subject: string | core.StringOut;

  textBody: string | core.StringOut;
}

export class MfaEmail extends core.Schema<MfaEmailArgs> {
  @core.attr(String)
  public htmlBody!: string | core.StringOut;

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

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

export interface NoActionEmailArgs extends core.SchemaArgs {
  htmlBody: string | core.StringOut;

  subject: string | core.StringOut;

  textBody: string | core.StringOut;
}

export class NoActionEmail extends core.Schema<NoActionEmailArgs> {
  @core.attr(String)
  public htmlBody!: string | core.StringOut;

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

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

export interface NotifyConfigurationArgs extends core.SchemaArgs {
  blockEmail?: BlockEmail;

  from?: string | core.StringOut;

  mfaEmail?: MfaEmail;

  noActionEmail?: NoActionEmail;

  replyTo?: string | core.StringOut;

  sourceArn: string | core.StringOut;
}

export class NotifyConfiguration extends core.Schema<NotifyConfigurationArgs> {
  @core.attr(BlockEmail)
  public blockEmail?: BlockEmail;

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

  @core.attr(MfaEmail)
  public mfaEmail?: MfaEmail;

  @core.attr(NoActionEmail)
  public noActionEmail?: NoActionEmail;

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

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

export interface AccountTakeoverRiskConfigurationArgs extends core.SchemaArgs {
  actions: AccountTakeoverRiskConfigurationActions;

  notifyConfiguration: NotifyConfiguration;
}

export class AccountTakeoverRiskConfiguration extends core.Schema<AccountTakeoverRiskConfigurationArgs> {
  @core.attr(AccountTakeoverRiskConfigurationActions)
  public actions!: AccountTakeoverRiskConfigurationActions;

  @core.attr(NotifyConfiguration)
  public notifyConfiguration!: NotifyConfiguration;
}

export interface RiskConfigurationArgs extends core.ResourceArgs {
  accountTakeoverRiskConfiguration?: AccountTakeoverRiskConfiguration;

  clientId?: string | core.StringOut;

  compromisedCredentialsRiskConfiguration?: CompromisedCredentialsRiskConfiguration;

  riskExceptionConfiguration?: RiskExceptionConfiguration;

  userPoolId: string | core.StringOut;
}

export class RiskConfiguration extends core.Resource<RiskConfigurationArgs> {
  @core.attr(AccountTakeoverRiskConfiguration)
  public accountTakeoverRiskConfiguration?: AccountTakeoverRiskConfiguration;

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

  @core.attr(CompromisedCredentialsRiskConfiguration)
  public compromisedCredentialsRiskConfiguration?: CompromisedCredentialsRiskConfiguration;

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

  @core.attr(RiskExceptionConfiguration)
  public riskExceptionConfiguration?: RiskExceptionConfiguration;

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

  constructor(name: string, args?: RiskConfigurationArgs) {
    super(name, "aws_cognito_risk_configuration", args);
  }

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