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

export interface StatefulEngineOptionsArgs extends core.SchemaArgs {
  ruleOrder: string | core.StringOut;
}

export class StatefulEngineOptions extends core.Schema<StatefulEngineOptionsArgs> {
  @core.attr(String, { computed: true })
  public ruleOrder!: string | core.StringOut;
}

export interface StatefulRuleGroupReferenceArgs extends core.SchemaArgs {
  priority: number | core.NumberOut;

  resourceArn: string | core.StringOut;
}

export class StatefulRuleGroupReference extends core.Schema<StatefulRuleGroupReferenceArgs> {
  @core.attr(Number, { computed: true })
  public priority!: number | core.NumberOut;

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

export interface DimensionArgs extends core.SchemaArgs {
  value: string | core.StringOut;
}

export class Dimension extends core.Schema<DimensionArgs> {
  @core.attr(String, { computed: true })
  public value!: string | core.StringOut;
}

export interface PublishMetricActionArgs extends core.SchemaArgs {
  dimension: core.Array<Dimension> | core.ArrayOut<Dimension>;
}

export class PublishMetricAction extends core.Schema<PublishMetricActionArgs> {
  @core.attr(Dimension, { computed: true, kind: "array" })
  public dimension!: core.Array<Dimension> | core.ArrayOut<Dimension>;
}

export interface ActionDefinitionArgs extends core.SchemaArgs {
  publishMetricAction:
    | core.Array<PublishMetricAction>
    | core.ArrayOut<PublishMetricAction>;
}

export class ActionDefinition extends core.Schema<ActionDefinitionArgs> {
  @core.attr(PublishMetricAction, { computed: true, kind: "array" })
  public publishMetricAction!:
    | core.Array<PublishMetricAction>
    | core.ArrayOut<PublishMetricAction>;
}

export interface StatelessCustomActionArgs extends core.SchemaArgs {
  actionDefinition:
    | core.Array<ActionDefinition>
    | core.ArrayOut<ActionDefinition>;

  actionName: string | core.StringOut;
}

export class StatelessCustomAction extends core.Schema<StatelessCustomActionArgs> {
  @core.attr(ActionDefinition, { computed: true, kind: "array" })
  public actionDefinition!:
    | core.Array<ActionDefinition>
    | core.ArrayOut<ActionDefinition>;

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

export interface StatelessRuleGroupReferenceArgs extends core.SchemaArgs {
  priority: number | core.NumberOut;

  resourceArn: string | core.StringOut;
}

export class StatelessRuleGroupReference extends core.Schema<StatelessRuleGroupReferenceArgs> {
  @core.attr(Number, { computed: true })
  public priority!: number | core.NumberOut;

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

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

  statefulEngineOptions:
    | core.Array<StatefulEngineOptions>
    | core.ArrayOut<StatefulEngineOptions>;

  statefulRuleGroupReference:
    | core.Array<StatefulRuleGroupReference>
    | core.ArrayOut<StatefulRuleGroupReference>;

  statelessCustomAction:
    | core.Array<StatelessCustomAction>
    | core.ArrayOut<StatelessCustomAction>;

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

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

  statelessRuleGroupReference:
    | core.Array<StatelessRuleGroupReference>
    | core.ArrayOut<StatelessRuleGroupReference>;
}

export class FirewallPolicyBlk extends core.Schema<FirewallPolicyBlkArgs> {
  @core.attr(String, { computed: true, kind: "array" })
  public statefulDefaultActions!:
    | core.Array<string>
    | core.ArrayOut<core.StringOut>;

  @core.attr(StatefulEngineOptions, { computed: true, kind: "array" })
  public statefulEngineOptions!:
    | core.Array<StatefulEngineOptions>
    | core.ArrayOut<StatefulEngineOptions>;

  @core.attr(StatefulRuleGroupReference, { computed: true, kind: "array" })
  public statefulRuleGroupReference!:
    | core.Array<StatefulRuleGroupReference>
    | core.ArrayOut<StatefulRuleGroupReference>;

  @core.attr(StatelessCustomAction, { computed: true, kind: "array" })
  public statelessCustomAction!:
    | core.Array<StatelessCustomAction>
    | core.ArrayOut<StatelessCustomAction>;

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

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

  @core.attr(StatelessRuleGroupReference, { computed: true, kind: "array" })
  public statelessRuleGroupReference!:
    | core.Array<StatelessRuleGroupReference>
    | core.ArrayOut<StatelessRuleGroupReference>;
}

export interface DsFirewallPolicyArgs {
  arn?: string | core.StringOut;

  name?: string | core.StringOut;

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

export class DsFirewallPolicy extends core.Data<DsFirewallPolicyArgs> {
  @core.attr(String)
  public arn?: string | core.StringOut;

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

  @core.attr(FirewallPolicyBlk, { computed: true, kind: "array" })
  public firewallPolicy!:
    | core.Array<FirewallPolicyBlk>
    | core.ArrayOut<FirewallPolicyBlk>;

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

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

  @core.attr(String, { computed: true, kind: "map" })
  public tags?: core.Map<string, string> | core.MapOut<core.StringOut>;

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

  constructor(name: string, args?: DsFirewallPolicyArgs) {
    super(name, "aws_networkfirewall_firewall_policy", args);
  }

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