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

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

  resourceArn: string | core.StringOut;
}

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

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

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

export class StatefulEngineOptions extends core.Schema<StatefulEngineOptionsArgs> {
  @core.attr(String)
  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)
  public priority?: number | core.NumberOut;

  @core.attr(String)
  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)
  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, { kind: "array" })
  public dimension!: core.Array<Dimension> | core.ArrayOut<Dimension>;
}

export interface ActionDefinitionArgs extends core.SchemaArgs {
  publishMetricAction: PublishMetricAction;
}

export class ActionDefinition extends core.Schema<ActionDefinitionArgs> {
  @core.attr(PublishMetricAction)
  public publishMetricAction!: PublishMetricAction;
}

export interface StatelessCustomActionArgs extends core.SchemaArgs {
  actionDefinition: ActionDefinition;

  actionName: string | core.StringOut;
}

export class StatelessCustomAction extends core.Schema<StatelessCustomActionArgs> {
  @core.attr(ActionDefinition)
  public actionDefinition!: ActionDefinition;

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

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

  statefulEngineOptions?: 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, { kind: "array" })
  public statefulDefaultActions?:
    | core.Array<string>
    | core.ArrayOut<core.StringOut>;

  @core.attr(StatefulEngineOptions)
  public statefulEngineOptions?: StatefulEngineOptions;

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

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

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

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

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

export interface FirewallPolicyArgs extends core.ResourceArgs {
  description?: string | core.StringOut;

  firewallPolicy: FirewallPolicyBlk;

  name: string | core.StringOut;

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

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

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

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

  @core.attr(FirewallPolicyBlk)
  public firewallPolicy!: FirewallPolicyBlk;

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

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

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

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

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

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

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