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

export interface LogDestinationConfigArgs extends core.SchemaArgs {
  logDestination: core.Map<string, string> | core.MapOut<core.StringOut>;

  logDestinationType: string | core.StringOut;

  logType: string | core.StringOut;
}

export class LogDestinationConfig extends core.Schema<LogDestinationConfigArgs> {
  @core.attr(String, { kind: "map" })
  public logDestination!:
    | core.Map<string, string>
    | core.MapOut<core.StringOut>;

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

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

export interface LoggingConfigurationBlkArgs extends core.SchemaArgs {
  logDestinationConfig:
    | core.Array<LogDestinationConfig>
    | core.ArrayOut<LogDestinationConfig>;
}

export class LoggingConfigurationBlk extends core.Schema<LoggingConfigurationBlkArgs> {
  @core.attr(LogDestinationConfig, { kind: "array" })
  public logDestinationConfig!:
    | core.Array<LogDestinationConfig>
    | core.ArrayOut<LogDestinationConfig>;
}

export interface LoggingConfigurationArgs extends core.ResourceArgs {
  firewallArn: string | core.StringOut;

  loggingConfiguration: LoggingConfigurationBlk;
}

export class LoggingConfiguration extends core.Resource<LoggingConfigurationArgs> {
  @core.attr(String)
  public firewallArn!: string | core.StringOut;

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

  @core.attr(LoggingConfigurationBlk)
  public loggingConfiguration!: LoggingConfigurationBlk;

  constructor(name: string, args?: LoggingConfigurationArgs) {
    super(name, "aws_networkfirewall_logging_configuration", args);
  }

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