rule(:undocumented) do
      s(
        any
      )
end

rule(:key_attribute_long_type) do
      arg.as(:arg)
end

rule(:key_attribute_string_type) do
      arg.as(:arg)
end

rule(:key_attribute_ulong_type) do
      arg.as(:arg)
end

rule(:filename) do
      arg.as(:arg)
end

rule(:client_filename) do
      arg.as(:arg)
end

rule(:hostname) do
      arg.as(:arg)
end

rule(:ipaddr) do
      arg.as(:arg)
end

rule(:sysid) do
      arg.as(:arg)
end

rule(:interface_device) do
      arg.as(:arg)
end

rule(:bits) do
      arg.as(:arg)
end

rule(:isoaddr) do
      arg.as(:arg)
end

rule(:ipprefix) do
      arg.as(:arg)
end

rule(:ipprefix_mandatory) do
      arg.as(:arg)
end

rule(:interface_unit) do
      arg.as(:arg)
end

rule(:ipaddr_or_interface) do
      arg.as(:arg)
end

rule(:areaid) do
      arg.as(:arg)
end

rule(:interface_name) do
      arg.as(:arg)
end

rule(:community) do
      arg.as(:arg)
end

rule(:interface_wildcard) do
      arg.as(:arg)
end

rule(:unreadable) do
      arg.as(:arg)
end

rule(:ipprefix_optional) do
      arg.as(:arg)
end

rule(:policy_algebra) do
      arg.as(:arg)
end

rule(:regular_expression) do
      arg.as(:arg)
end

rule(:group_glob) do
      arg.as(:arg)
end

rule(:atm_vci) do
      arg.as(:arg)
end

rule(:ipprefix_only) do
      arg.as(:arg)
end

rule(:ipv4addr) do
      arg.as(:arg)
end

rule(:ipv4prefix) do
      arg.as(:arg)
end

rule(:ipv4prefix_mandatory) do
      arg.as(:arg)
end

rule(:ipv4addr_or_interface) do
      arg.as(:arg)
end

rule(:ipv4prefix_optional) do
      arg.as(:arg)
end

rule(:ipv4prefix_only) do
      arg.as(:arg)
end

rule(:ipv6addr) do
      arg.as(:arg)
end

rule(:ipv6prefix) do
      arg.as(:arg)
end

rule(:ipv6prefix_mandatory) do
      arg.as(:arg)
end

rule(:ipv6addr_or_interface) do
      arg.as(:arg)
end

rule(:ipv6prefix_optional) do
      arg.as(:arg)
end

rule(:ipv6prefix_only) do
      arg.as(:arg)
end

rule(:interface_device_wildcard) do
      arg.as(:arg)
end

rule(:interface_unit_wildcard) do
      arg.as(:arg)
end

rule(:time) do
      arg.as(:arg)
end

rule(:mac_addr) do
      arg.as(:arg)
end

rule(:mac_addr_prefix) do
      arg.as(:arg)
end

rule(:mac_unicaset) do
      arg.as(:arg)
end

rule(:mac_unicast_prefix) do
      arg.as(:arg)
end

rule(:mac_multicast) do
      arg.as(:arg)
end

rule(:mac_multicast_prefix) do
      arg.as(:arg)
end

rule(:mpls_label) do
      arg.as(:arg)
end

rule(:float) do
      arg.as(:arg)
end

rule(:unsigned_float) do
      arg.as(:arg)
end

rule(:isoprefix) do
      arg.as(:arg)
end

rule(:isosysid) do
      arg.as(:arg)
end

rule(:interface_range_wild) do
      arg.as(:arg)
end

rule(:fc_addr) do
      arg.as(:arg)
end

rule(:wwn) do
      arg.as(:arg)
end

rule(:logfilename) do
      arg.as(:arg)
end

rule(:configuration) do
      c(
          "rcsid" arg,
          "version" arg,
          "groups" (
              c(
                arg (
                  configuration
                )
              )
          ),
          "apply-groups" arg,
          "dynamic-profiles" (
            juniper_dynamic_profile_object
          ),
          "system" (
            juniper_system
          ),
          "logical-systems" (
            juniper_logical_system
          ),
          "chassis" (
            chassis_type
          ),
          "interfaces" (
              c(
                  "pic-set",
                  "interface-set" ("$junos-interface-set-name" | "interface-set-name") (
                      c(
                          "interface" arg (
                              c(
                                  "unit" arg,
                                  "vlan-tags-outer" arg
                              )
                          )
                      )
                  ),
                  "traceoptions" (
                      c(
                          "no-remote-trace",
                          "file" (
                              c(
                                  "filename" arg,
                                  "size" arg,
                                  "files" arg,
                                  "world-readable",
                                  "no-world-readable",
                                  "match" (
                                    regular_expression
                                  )
                              )
                          ).as(:oneline),
                          "flag" ("all" | "kernel" | "change-events" | "kernel-detail" | "config-states" | "resource-usage" | "gres-events" | "select-events") (
                              c(
                                  "disable"
                              )
                          ).as(:oneline)
                      )
                  ),
                  "interface-range" arg (
                      c(
                          "member" arg,
                          "member-range" arg (
                              c(
                                  "end-range" (
                                    interface_device
                                  )
                              )
                          ).as(:oneline),
                          "description" arg,
                          "metadata" arg,
                          c(
                            "disable"
                          ),
                          "promiscuous-mode",
                          "port-mirror-instance" arg,
                          "multicast-statistics",
                          "fabric-options" (
                              c(
                                  "member-interfaces" arg
                              )
                          ),
                          "traceoptions" (
                              c(
                                  "flag" ("ipc" | "event" | "media" | "all" | "q921" | "q931").as(:oneline),
                                  "file" (
                                      c(
                                          "filename" arg,
                                          "size" arg,
                                          "files" arg,
                                          "world-readable",
                                          "no-world-readable"
                                      )
                                  )
                              )
                          ),
                          "passive-monitor-mode",
                          c(
                            "keepalives" (
                              keepalives_type
                            ).as(:oneline),
                            "no-keepalives"
                          ),
                          "traps",
                          "no-traps",
                          "accounting-profile" arg,
                          c(
                            "per-unit-scheduler",
                            "no-per-unit-scheduler",
                            "shared-scheduler",
                            "hierarchical-scheduler" (
                                c(
                                    "maximum-hierarchy-levels" arg
                                )
                            ).as(:oneline)
                          ),
                          "schedulers" arg,
                          "interface-transmit-statistics",
                          "dce",
                          c(
                            "vlan-tagging",
                            "stacked-vlan-tagging",
                            "flexible-vlan-tagging",
                            "vlan-vci-tagging"
                          ),
                          "native-vlan-id" arg,
                          "speed" arg,
                          "auto-configure" (
                            auto_configure_vlan_type
                          ),
                          "mtu" arg,
                          "hold-time" (
                              c(
                                  "up" arg,
                                  "down" arg
                              )
                          ).as(:oneline),
                          "satop-options" (
                              c(
                                  "idle-pattern" arg,
                                  "payload-size" arg,
                                  "excessive-packet-loss-rate" (
                                      c(
                                          "threshold" arg,
                                          "sample-period" arg
                                      )
                                  ),
                                  c(
                                    "jitter-buffer-packets" arg,
                                    "jitter-buffer-latency" arg,
                                    "jitter-buffer-auto-adjust"
                                  ),
                                  "bit-rate" arg
                              )
                          ),
                          "ima-group-options",
                          "ima-link-options",
                          "multi-chassis-protection" (
                            multi_chassis_protection_group
                          ),
                          "clocking" (
                              c(
                                  c(
                                    "internal",
                                    "external" (
                                        c(
                                            "interface" (
                                              interface_device
                                            )
                                        )
                                    )
                                  )
                              )
                          ).as(:oneline),
                          "link-mode" arg,
                          "media-type" arg,
                          "encapsulation" arg,
                          "framing" (
                              c(
                                  c(
                                    "lan-phy",
                                    "wan-phy",
                                    "sonet",
                                    "sdh"
                                  )
                              )
                          ),
                          "unidirectional",
                          "lmi" (
                              c(
                                  "n391dte" arg,
                                  "n392dce" arg,
                                  "n392dte" arg,
                                  "n393dce" arg,
                                  "n393dte" arg,
                                  "t391dte" arg,
                                  "t392dce" arg,
                                  "lmi-type" arg
                              )
                          ),
                          "mlfr-uni-nni-bundle-options" (
                              c(
                                  "cisco-interoperability" (
                                      c(
                                          "send-lip-remove-link-for-link-reject"
                                      )
                                  ),
                                  "mrru" arg,
                                  "yellow-differential-delay" arg,
                                  "red-differential-delay" arg,
                                  "action-red-differential-delay" arg,
                                  "fragment-threshold" arg,
                                  "drop-timeout" arg,
                                  "link-layer-overhead" (
                                    unsigned_float
                                  ),
                                  "lmi-type" arg,
                                  "minimum-links" arg,
                                  "hello-timer" arg,
                                  "acknowledge-timer" arg,
                                  "acknowledge-retries" arg,
                                  "n391" arg,
                                  "n392" arg,
                                  "n393" arg,
                                  "t391" arg,
                                  "t392" arg
                              )
                          ),
                          "mac" (
                            mac_unicaset
                          ),
                          "receive-bucket" (
                            dcd_rx_bucket_config
                          ),
                          "transmit-bucket" (
                            dcd_tx_bucket_config
                          ),
                          "shared-interface",
                          "sonet-options" (
                            sonet_options_type
                          ),
                          "logical-tunnel-options" (
                              c(
                                  "per-unit-mac-disable"
                              )
                          ),
                          "aggregated-sonet-options" (
                              c(
                                  "minimum-links" arg,
                                  "link-speed" arg,
                                  "minimum-bandwidth" arg
                              )
                          ),
                          "atm-options" (
                              c(
                                  "pic-type" arg,
                                  "cell-bundle-size" arg,
                                  "plp-to-clp",
                                  "use-null-cw",
                                  "promiscuous-mode" (
                                      c(
                                          "vpi" arg.as(:oneline)
                                      )
                                  ),
                                  "vpi" arg (
                                      c(
                                          "maximum-vcs" arg,
                                          "shaping" (
                                            dcd_shaping_config
                                          ),
                                          "oam-period" (
                                              c(
                                                  c(
                                                    "oam-period" arg,
                                                    "disable".as(:oneline)
                                                  )
                                              )
                                          ).as(:oneline),
                                          "oam-liveness" (
                                              c(
                                                  "up-count" arg,
                                                  "down-count" arg
                                              )
                                          )
                                      )
                                  ),
                                  "ilmi",
                                  "linear-red-profiles" arg (
                                      c(
                                          "queue-depth" arg,
                                          "high-plp-threshold" arg,
                                          "low-plp-threshold" arg,
                                          "high-plp-max-threshold" arg,
                                          "low-plp-max-threshold" arg
                                      )
                                  ).as(:oneline),
                                  "scheduler-maps" arg (
                                      c(
                                          "vc-cos-mode" arg,
                                          "forwarding-class" arg (
                                              c(
                                                  "priority" arg,
                                                  "transmit-weight" (
                                                      c(
                                                          c(
                                                            "percent" arg,
                                                            "cells" arg
                                                          )
                                                      )
                                                  ).as(:oneline),
                                                  c(
                                                    "epd-threshold" (
                                                      epd_threshold_config
                                                    ).as(:oneline),
                                                    "linear-red-profile" arg
                                                  )
                                              )
                                          )
                                      )
                                  ),
                                  "mpls" (
                                    mpls_ifd_options
                                  ),
                                  "payload-scrambler",
                                  "no-payload-scrambler"
                              )
                          ),
                          "multiservice-options" (
                              c(
                                  "syslog",
                                  "no-syslog",
                                  "core-dump",
                                  "no-core-dump",
                                  "flow-control-options" (
                                      c(
                                          "dump-on-flow-control",
                                          "reset-on-flow-control",
                                          "down-on-flow-control"
                                      )
                                  )
                              )
                          ),
                          "ggsn-options" (
                              c(
                                  "syslog",
                                  "no-syslog",
                                  "core-dump",
                                  "no-core-dump"
                              )
                          ),
                          "ppp-options" (
                            ppp_options_type
                          ),
                          "redundancy-options",
                          "load-balancing-options",
                          "lsq-failure-options",
                          "services-options" (
                              c(
                                  "syslog" (
                                    service_set_syslog_object
                                  ),
                                  "open-timeout" arg,
                                  "inactivity-timeout" arg,
                                  "inactivity-tcp-timeout" arg,
                                  "inactivity-asymm-tcp-timeout" arg,
                                  "inactivity-non-tcp-timeout" arg,
                                  "session-timeout" arg,
                                  "disable-global-timeout-override",
                                  "tcp-tickles" arg,
                                  "trio-flow-offload",
                                  "cgn-pic",
                                  "session-limit" (
                                      c(
                                          "maximum" arg,
                                          "rate" arg
                                      )
                                  ),
                                  "ignore-errors" (
                                      c(
                                          "tcp",
                                          "alg"
                                      )
                                  ).as(:oneline)
                              )
                          ),
                          "t3-options" (
                              c(
                                  "loopback" arg,
                                  "long-buildout",
                                  "no-long-buildout",
                                  "loop-timing",
                                  "no-loop-timing",
                                  "unframed",
                                  "no-unframed",
                                  "compatibility-mode" (
                                      c(
                                          c(
                                            "larscom" (
                                                c(
                                                    "subrate" arg
                                                )
                                            ).as(:oneline),
                                            "verilink" (
                                                c(
                                                    "subrate" arg
                                                )
                                            ).as(:oneline),
                                            "adtran" (
                                                c(
                                                    "subrate" arg
                                                )
                                            ).as(:oneline),
                                            "kentrox" (
                                                c(
                                                    "subrate" arg
                                                )
                                            ).as(:oneline),
                                            "digital-link" (
                                                c(
                                                    "subrate" arg
                                                )
                                            ).as(:oneline)
                                          )
                                      )
                                  ).as(:oneline),
                                  "payload-scrambler",
                                  "no-payload-scrambler",
                                  "cbit-parity",
                                  "no-cbit-parity",
                                  "fcs" arg,
                                  "idle-cycle-flag" arg,
                                  "start-end-flag" arg,
                                  "feac-loop-respond",
                                  "no-feac-loop-respond",
                                  "bert-algorithm" arg,
                                  "bert-error-rate" arg,
                                  "bert-period" arg,
                                  "buildout" arg,
                                  "atm-encapsulation" arg
                              )
                          ),
                          "e3-options" (
                              c(
                                  "loopback" arg,
                                  "unframed",
                                  "no-unframed",
                                  "compatibility-mode" (
                                      c(
                                          c(
                                            "larscom",
                                            "digital-link" (
                                                c(
                                                    "subrate" arg
                                                )
                                            ).as(:oneline),
                                            "kentrox" (
                                                c(
                                                    "subrate" arg
                                                )
                                            ).as(:oneline)
                                          )
                                      )
                                  ).as(:oneline),
                                  "payload-scrambler",
                                  "no-payload-scrambler",
                                  "fcs" arg,
                                  "idle-cycle-flag" arg,
                                  "invert-data",
                                  "start-end-flag" arg,
                                  "bert-algorithm" arg,
                                  "bert-error-rate" arg,
                                  "bert-period" arg,
                                  "buildout" arg,
                                  "atm-encapsulation" arg,
                                  "framing" arg
                              )
                          ),
                          "e1-options" (
                              c(
                                  "timeslots" arg,
                                  "loopback" arg,
                                  "framing" arg,
                                  "fcs" arg,
                                  "invert-data",
                                  "idle-cycle-flag" arg,
                                  "start-end-flag" arg,
                                  "bert-algorithm" arg,
                                  "bert-error-rate" arg,
                                  "bert-period" arg
                              )
                          ),
                          "t1-options" (
                              c(
                                  "timeslots" arg,
                                  "voice-timeslots" arg,
                                  "loopback" arg,
                                  "buildout" arg,
                                  "byte-encoding" arg,
                                  "line-encoding" arg,
                                  "invert-data",
                                  "framing" arg,
                                  "fcs" arg,
                                  "idle-cycle-flag" arg,
                                  "start-end-flag" arg,
                                  "bert-algorithm" arg,
                                  "bert-error-rate" arg,
                                  "bert-period" arg,
                                  "remote-loopback-respond",
                                  "crc-major-alarm-threshold" arg,
                                  "crc-minor-alarm-threshold" arg,
                                  "alarm-compliance" arg
                              )
                          ),
                          "ds0-options" (
                              c(
                                  "loopback" arg,
                                  "byte-encoding" arg,
                                  "invert-data",
                                  "fcs" arg,
                                  "idle-cycle-flag" arg,
                                  "start-end-flag" arg,
                                  "bert-algorithm" arg,
                                  "bert-error-rate" arg,
                                  "bert-period" arg
                              )
                          ),
                          "serial-options" (
                              c(
                                  "line-protocol" arg,
                                  c(
                                    "dte-options" (
                                        c(
                                            "ignore-all",
                                            "dtr" (
                                                c(
                                                    c(
                                                      "assert",
                                                      "de-assert",
                                                      "normal",
                                                      "auto-synchronize" (
                                                          c(
                                                              "duration" arg,
                                                              "interval" arg
                                                          )
                                                      )
                                                    )
                                                )
                                            ).as(:oneline),
                                            "control-signal" arg,
                                            "rts" arg,
                                            "dcd" arg,
                                            "dsr" arg,
                                            "cts" arg,
                                            "indication" arg,
                                            "tm" arg
                                        )
                                    ),
                                    "dce-options" (
                                        c(
                                            "ignore-all",
                                            "dtr" arg,
                                            "rts" arg,
                                            "dcd" arg,
                                            "dsr" arg,
                                            "cts" arg,
                                            "tm" arg,
                                            "dce-loopback-override"
                                        )
                                    )
                                  ),
                                  "dtr-circuit" arg,
                                  "dtr-polarity" arg,
                                  "rts-polarity" arg,
                                  "control-polarity" arg,
                                  "dcd-polarity" arg,
                                  "dsr-polarity" arg,
                                  "cts-polarity" arg,
                                  "indication-polarity" arg,
                                  "tm-polarity" arg,
                                  "clocking-mode" arg,
                                  "transmit-clock" arg,
                                  "clock-rate" arg,
                                  "loopback" arg,
                                  "encoding" arg,
                                  "idle-cycle-flag" arg
                              )
                          ),
                          "gratuitous-arp-reply",
                          "no-gratuitous-arp-reply",
                          "no-gratuitous-arp-request",
                          "no-no-gratuitous-arp-request",
                          "fibrechannel-options",
                          b("ether-options" | "gigether-options",
                              c(
                                  "loopback",
                                  "no-loopback",
                                  "flow-control",
                                  "no-flow-control",
                                  "source-filtering",
                                  "no-source-filtering",
                                  c(
                                    "no-auto-negotiation",
                                    "auto-negotiation" (
                                        c(
                                            "remote-fault" arg
                                        )
                                    ).as(:oneline)
                                  ),
                                  "mac-mode" arg,
                                  "asynchronous-notification",
                                  "source-address-filter" arg.as(:oneline),
                                  "redundant-parent" (
                                      c(
                                          "parent" (
                                            interface_device
                                          )
                                      )
                                  ),
                                  "ieee-802.3ad" (
                                      c(
                                          "lacp" (
                                              c(
                                                  "port-priority" arg
                                              )
                                          ),
                                          "bundle" (
                                            interface_device
                                          ),
                                          "link-index" arg,
                                          c(
                                            "primary",
                                            "backup"
                                          )
                                      )
                                  ),
                                  "ethernet-switch-profile" (
                                      c(
                                          "tag-protocol-id" arg,
                                          "ethernet-policer-profile" (
                                              c(
                                                  "input-priority-map" (
                                                    cos_policer_input_priority_map
                                                  ),
                                                  "output-priority-map" (
                                                    cos_policer_output_priority_map
                                                  ),
                                                  "policer" (
                                                    cos_policer
                                                  )
                                              )
                                          ),
                                          "mac-learn-enable",
                                          "no-mac-learn-enable"
                                      )
                                  ),
                                  "mpls" (
                                    mpls_ifd_options
                                  ),
                                  "ignore-l3-incompletes",
                                  "no-auto-mdix"
                              )
                          ),
                          "optics-options" (
                              c(
                                  "wavelength" arg,
                                  "alarm" ("low-light-alarm") (
                                      c(
                                          c(
                                            "syslog",
                                            "link-down"
                                          )
                                      )
                                  ),
                                  "warning" ("low-light-warning") (
                                      c(
                                          c(
                                            "syslog",
                                            "link-down"
                                          )
                                      )
                                  )
                              )
                          ),
                          "otn-options" (
                            otn_options_type
                          ),
                          "fastether-options" (
                              c(
                                  "loopback",
                                  "no-loopback",
                                  "flow-control",
                                  "no-flow-control",
                                  "source-filtering",
                                  "no-source-filtering",
                                  "auto-negotiation",
                                  "no-auto-negotiation",
                                  "ingress-rate-limit" arg,
                                  "source-address-filter" arg.as(:oneline),
                                  "redundant-parent" (
                                      c(
                                          "parent" (
                                            interface_device
                                          )
                                      )
                                  ),
                                  "ieee-802.3ad" (
                                      c(
                                          "lacp" (
                                              c(
                                                  "port-priority" arg
                                              )
                                          ),
                                          "bundle" (
                                            interface_device
                                          ),
                                          c(
                                            "primary",
                                            "backup"
                                          )
                                      )
                                  ),
                                  "mpls" (
                                    mpls_ifd_options
                                  ),
                                  "ignore-l3-incompletes"
                              )
                          ),
                          "redundant-ether-options" (
                              c(
                                  "redundancy-group" arg,
                                  "loopback",
                                  "no-loopback",
                                  "flow-control",
                                  "no-flow-control",
                                  "source-filtering",
                                  "no-source-filtering",
                                  "source-address-filter" arg.as(:oneline),
                                  "link-speed" arg,
                                  "minimum-links" arg,
                                  "lacp" (
                                      c(
                                          c(
                                            "active",
                                            "passive"
                                          ),
                                          "periodic" arg
                                      )
                                  )
                              )
                          ),
                          "aggregated-ether-options" (
                              c(
                                  "loopback",
                                  "no-loopback",
                                  "flow-control",
                                  "no-flow-control",
                                  "source-filtering",
                                  "no-source-filtering",
                                  "link-protection",
                                  "no-link-protection",
                                  "source-address-filter".as(:oneline),
                                  "minimum-links" arg,
                                  "logical-interface-fpc-redundancy",
                                  "rebalance-periodic" (
                                      c(
                                          "start-time" (
                                            time
                                          ),
                                          "interval" arg
                                      )
                                  ),
                                  "link-speed" arg,
                                  "lacp" (
                                      c(
                                          c(
                                            "active",
                                            "passive"
                                          ),
                                          "periodic" arg,
                                          "link-protection" (
                                              c(
                                                  "disable",
                                                  c(
                                                    "revertive",
                                                    "non-revertive"
                                                  )
                                              )
                                          ),
                                          "system-priority" arg,
                                          "system-id" (
                                            mac_addr
                                          ),
                                          "admin-key" arg
                                      )
                                  ),
                                  "ethernet-switch-profile" (
                                      c(
                                          "tag-protocol-id" arg
                                      )
                                  ),
                                  "mc-ae"
                              )
                          ),
                          "es-options" (
                              c(
                                  "backup-interface" (
                                    interface_device
                                  )
                              )
                          ),
                          "dsl-options" (
                              c(
                                  "operating-mode" arg
                              )
                          ),
                          "vdsl-options" (
                              c(
                                  "vdsl-profile" arg
                              )
                          ),
                          "shdsl-options" (
                              c(
                                  "annex" arg,
                                  "line-rate" arg,
                                  "loopback" arg,
                                  "snr-margin" (
                                      c(
                                          "current" arg,
                                          "snext" arg
                                      )
                                  )
                              )
                          ),
                          "data-input" (
                              c(
                                  c(
                                    "system",
                                    "interface" (
                                      interface_device
                                    )
                                  )
                              )
                          ),
                          "switch-options" (
                              c(
                                  "switch-port" arg (
                                      c(
                                          "auto-negotiation",
                                          "no-auto-negotiation",
                                          "link-mode" arg,
                                          "speed" arg,
                                          "vlan-id" arg,
                                          "cascade-port"
                                      )
                                  )
                              )
                          ),
                          "container-options" (
                              c(
                                  "container-type" (
                                      c(
                                          c(
                                            "aps" (
                                              aps_type
                                            )
                                          )
                                      )
                                  ),
                                  "member-interface-type" (
                                      c(
                                          c(
                                            "sonet" (
                                                c(
                                                    "member-interface-speed" arg
                                                )
                                            ),
                                            "atm" (
                                                c(
                                                    "member-interface-speed" arg
                                                )
                                            )
                                          )
                                      )
                                  ),
                                  "redundancy" (
                                      c(
                                          "hold-time" (
                                              c(
                                                  "up" arg,
                                                  "down" arg
                                              )
                                          ).as(:oneline)
                                      )
                                  ),
                                  "container-list" (
                                    interface_device
                                  ),
                                  c(
                                      "primary",
                                      "standby"
                                  ),
                                  "allow-configuration-override"
                              )
                          ),
                          "layer2-policer",
                          "unit" ("$junos-underlying-interface-unit" | "$junos-interface-unit" | "interface-unit-number") (
                              c(
                                  "peer-psd" (
                                      c(
                                          "psd-name" arg
                                      )
                                  ).as(:oneline),
                                  "peer-interface" (
                                      c(
                                          "interface-name" (
                                            interface_unit
                                          )
                                      )
                                  ),
                                  "interface-shared-with" (
                                      c(
                                          "psd-name" arg
                                      )
                                  ),
                                  c(
                                    "disable"
                                  ),
                                  "passive-monitor-mode",
                                  "per-session-scheduler",
                                  "clear-dont-fragment-bit",
                                  "reassemble-packets",
                                  "rpm",
                                  "description" arg,
                                  "metadata" arg,
                                  "dial-options",
                                  "demux-source" (
                                        ("inet" | "inet6")
                                  ),
                                  "demux-destination" (
                                        ("inet" | "inet6")
                                  ),
                                  "encapsulation" arg,
                                  "mtu" arg,
                                  c(
                                    "point-to-point",
                                    "multipoint"
                                  ),
                                  "bandwidth" arg,
                                  "global-layer2-domainid" arg,
                                  "radio-router" (
                                    dynamic_ifbw_parms_type
                                  ),
                                  "traps",
                                  "no-traps",
                                  "arp-resp" (
                                      c(
                                          c(
                                            "unrestricted",
                                            "restricted"
                                          )
                                      )
                                  ).as(:oneline),
                                  "proxy-arp" (
                                      c(
                                          c(
                                            "unrestricted",
                                            "restricted"
                                          )
                                      )
                                  ).as(:oneline),
                                  c(
                                    "vlan-id" arg,
                                    "vlan-id-range" arg,
                                    "vlan-id-list" arg,
                                    "vlan-tags" (
                                        c(
                                            "outer" arg,
                                            c(
                                              "inner" arg,
                                              "inner-range" arg,
                                              "inner-list" arg
                                            )
                                        )
                                    ).as(:oneline)
                                  ),
                                  "native-inner-vlan-id" arg,
                                  "inner-vlan-id-range".as(:oneline),
                                  "accept-source-mac" (
                                      c(
                                          "mac-address" (
                                            mac_list
                                          )
                                      )
                                  ),
                                  "input-vlan-map" (
                                    vlan_map
                                  ),
                                  "output-vlan-map" (
                                    vlan_map
                                  ),
                                  "swap-by-poppush",
                                  "receive-lsp" arg,
                                  "transmit-lsp" arg,
                                  "dlci" arg,
                                  "multicast-dlci" arg,
                                  c(
                                    "vci" (
                                      atm_vci
                                    ),
                                    "allow-any-vci",
                                    "vpi" arg,
                                    "trunk-id" arg
                                  ),
                                  "no-vpivci-swapping",
                                  c(
                                    "psn-vci" (
                                      atm_vci
                                    ),
                                    "psn-vpi" arg
                                  ),
                                  "atm-l2circuit-mode" (
                                      c(
                                          c(
                                            "cell",
                                            "aal5"
                                          )
                                      )
                                  ).as(:oneline),
                                  "vci-range" (
                                      c(
                                          "start" arg,
                                          "end" arg
                                      )
                                  ).as(:oneline),
                                  "trunk-bandwidth" arg,
                                  "multicast-vci" (
                                    atm_vci
                                  ),
                                  "shaping" (
                                    dcd_shaping_config
                                  ),
                                  "oam-period" (
                                      c(
                                          c(
                                            "oam-period" arg,
                                            "disable".as(:oneline)
                                          )
                                      )
                                  ).as(:oneline),
                                  "oam-liveness" (
                                      c(
                                          "up-count" arg,
                                          "down-count" arg
                                      )
                                  ),
                                  "ppp-options" (
                                    ppp_options_type
                                  ),
                                  "pppoe-options" (
                                    pppoe_options_type
                                  ),
                                  "pppoe-underlying-options" (
                                    pppoe_underlying_options_type
                                  ),
                                  "advisory-options" (
                                    advisory_options_type
                                  ),
                                  "demux-options" (
                                    demux_options_type
                                  ),
                                  "targetted-distribution",
                                  c(
                                    "keepalives" (
                                      keepalives_type
                                    ).as(:oneline),
                                    "no-keepalives"
                                  ),
                                  "inverse-arp",
                                  "transmit-weight" arg,
                                  "epd-threshold" (
                                    epd_threshold_config
                                  ).as(:oneline),
                                  "cell-bundle-size" arg,
                                  "plp-to-clp",
                                  "atm-scheduler-map" arg,
                                  "mrru" arg,
                                  "short-sequence",
                                  "fragment-threshold" arg,
                                  "drop-timeout" arg,
                                  "disable-mlppp-inner-ppp-pfc",
                                  "minimum-links" arg,
                                  "multilink-max-classes" arg,
                                  "compression" (
                                      c(
                                          "rtp" (
                                              c(
                                                  "f-max-period" arg,
                                                  "queues" arg,
                                                  "port" (
                                                      c(
                                                          "minimum" arg,
                                                          "maximum" arg
                                                      )
                                                  ).as(:oneline),
                                                  "maximum-contexts" (
                                                      c(
                                                          "number" arg
                                                      )
                                                  ).as(:oneline)
                                              )
                                          )
                                      )
                                  ),
                                  "interleave-fragments",
                                  "link-layer-overhead" (
                                    unsigned_float
                                  ),
                                  "accounting-profile" arg,
                                  "peer-unit" arg,
                                  "tunnel" (
                                      c(
                                          "source" (
                                            ipaddr
                                          ),
                                          "destination" (
                                            ipaddr
                                          ),
                                          "key" arg,
                                          "backup-destination" (
                                            ipaddr
                                          ),
                                          c(
                                            "allow-fragmentation",
                                            "do-not-fragment"
                                          ),
                                          "ttl" arg,
                                          "traffic-class" arg,
                                          "flow-label" arg,
                                          "path-mtu-discovery",
                                          "no-path-mtu-discovery",
                                          "routing-instance" (
                                              c(
                                                  "destination" arg
                                              )
                                          )
                                      )
                                  ),
                                  "compression-device" (
                                    interface_unit
                                  ),
                                  "atm-policer",
                                  "layer2-policer",
                                  "filter",
                                  "multi-chassis-protection" (
                                    multi_chassis_protection_group
                                  ),
                                  "family" (
                                      c(
                                          "inet" (
                                              c(
                                                  "targeted-broadcast" (
                                                      c(
                                                          c(
                                                            "forward-and-send-to-re",
                                                            "forward-only"
                                                          )
                                                      )
                                                  ),
                                                  "receive-options-packets",
                                                  "receive-ttl-exceeded",
                                                  "accounting" (
                                                      c(
                                                          "source-class-usage" (
                                                              c(
                                                                  "input",
                                                                  "output"
                                                              )
                                                          ),
                                                          "destination-class-usage"
                                                      )
                                                  ),
                                                  "mac-validate" arg,
                                                  "rpf-check" (
                                                      c(
                                                          "fail-filter" arg,
                                                          "mode" (
                                                              c(
                                                                  "loose"
                                                              )
                                                          ).as(:oneline)
                                                      )
                                                  ),
                                                  "mtu" arg,
                                                  "no-redirects",
                                                  "no-neighbor-learn",
                                                  "unconditional-src-learn",
                                                  "multicast-only",
                                                  "primary",
                                                  "ipsec-sa" arg,
                                                  "demux-source",
                                                  "demux-destination",
                                                  "filter" (
                                                      c(
                                                          c(
                                                            "input" (
                                                                c(
                                                                    "filter-name" arg,
                                                                    "precedence" arg
                                                                )
                                                            ).as(:oneline),
                                                            "input-list" arg
                                                          ),
                                                          c(
                                                            "output" (
                                                                c(
                                                                    "filter-name" arg,
                                                                    "precedence" arg
                                                                )
                                                            ).as(:oneline),
                                                            "output-list" arg
                                                          ),
                                                          "adf" (
                                                              c(
                                                                  "rule" arg,
                                                                  "counter",
                                                                  "input-precedence" arg,
                                                                  "output-precedence" arg
                                                              )
                                                          ),
                                                          "group" arg,
                                                          "dialer" arg
                                                      )
                                                  ),
                                                  "simple-filter" (
                                                      c(
                                                          "input" arg
                                                      )
                                                  ),
                                                  "input-hierarchical-policer" arg,
                                                  "policer" (
                                                      c(
                                                          "arp" arg,
                                                          "input" arg,
                                                          "output" arg
                                                      )
                                                  ),
                                                  "sampling" (
                                                      c(
                                                          "input",
                                                          "output"
                                                      )
                                                  ),
                                                  "next-hop-tunnel" arg (
                                                      c(
                                                          "ipsec-vpn" arg
                                                      )
                                                  ),
                                                  "address" arg (
                                                      c(
                                                          "destination" (
                                                            ipv4addr
                                                          ),
                                                          "destination-profile" arg,
                                                          "broadcast" (
                                                            ipv4addr
                                                          ),
                                                          "primary",
                                                          "preferred",
                                                          "master-only",
                                                          "multipoint-destination" arg (
                                                              c(
                                                                  c(
                                                                    "dlci" arg,
                                                                    "vci" (
                                                                      atm_vci
                                                                    )
                                                                  ),
                                                                  "shaping" (
                                                                    dcd_shaping_config
                                                                  ),
                                                                  "oam-period" (
                                                                      c(
                                                                          c(
                                                                            "oam_period" arg,
                                                                            "disable".as(:oneline)
                                                                          )
                                                                      )
                                                                  ).as(:oneline),
                                                                  "oam-liveness" (
                                                                      c(
                                                                          "up-count" arg,
                                                                          "down-count" arg
                                                                      )
                                                                  ),
                                                                  "inverse-arp",
                                                                  "transmit-weight" arg,
                                                                  "epd-threshold" (
                                                                    epd_threshold_config
                                                                  ).as(:oneline)
                                                              )
                                                          ),
                                                          "arp" arg (
                                                              c(
                                                                  "l2-interface" (
                                                                    interface_name
                                                                  ),
                                                                  c(
                                                                    "mac" (
                                                                      mac_unicaset
                                                                    ),
                                                                    "multicast-mac" (
                                                                      mac_multicast
                                                                    )
                                                                  ),
                                                                  "publish"
                                                              )
                                                          ).as(:oneline),
                                                          "web-authentication" (
                                                              c(
                                                                  "http",
                                                                  "https",
                                                                  "redirect-to-https"
                                                              )
                                                          ),
                                                          "vrrp-group" (
                                                            vrrp_group
                                                          )
                                                      )
                                                  ),
                                                  "unnumbered-address" (
                                                      c(
                                                          "source" (
                                                            interface_unit
                                                          ),
                                                          "preferred-source-address" arg,
                                                          "destination" (
                                                            ipv4addr
                                                          ),
                                                          "destination-profile" arg
                                                      )
                                                  ).as(:oneline),
                                                  "location-pool-address",
                                                  "negotiate-address",
                                                  "dhcp" (
                                                      c(
                                                          "client-identifier" (
                                                              c(
                                                                  c(
                                                                    "ascii" arg,
                                                                    "hexadecimal" arg
                                                                  )
                                                              )
                                                          ).as(:oneline),
                                                          "lease-time" arg,
                                                          "retransmission-attempt" arg,
                                                          "retransmission-interval" arg,
                                                          "server-address" (
                                                            ipv4addr
                                                          ),
                                                          "update-server",
                                                          "vendor-id" arg
                                                      )
                                                  ),
                                                  "dhcp-client" (
                                                    dhcp_client_type
                                                  )
                                              )
                                          ),
                                          "iso" (
                                              c(
                                                  "address" arg,
                                                  "mtu" arg
                                              )
                                          ),
                                          "inet6" (
                                              c(
                                                  "rpf-check" (
                                                      c(
                                                          "fail-filter" arg,
                                                          "mode" (
                                                              c(
                                                                  "loose"
                                                              )
                                                          ).as(:oneline)
                                                      )
                                                  ),
                                                  "accounting" (
                                                      c(
                                                          "source-class-usage" (
                                                              c(
                                                                  "input",
                                                                  "output"
                                                              )
                                                          ),
                                                          "destination-class-usage"
                                                      )
                                                  ),
                                                  "mtu" arg,
                                                  "nd6-stale-time" arg,
                                                  "no-neighbor-learn",
                                                  "filter" (
                                                      c(
                                                          c(
                                                            "input" (
                                                                c(
                                                                    "filter-name" arg,
                                                                    "precedence" arg
                                                                )
                                                            ).as(:oneline),
                                                            "input-list" arg
                                                          ),
                                                          c(
                                                            "output" (
                                                                c(
                                                                    "filter-name" arg,
                                                                    "precedence" arg
                                                                )
                                                            ).as(:oneline),
                                                            "output-list" arg
                                                          ),
                                                          "adf" (
                                                              c(
                                                                  "rule" arg,
                                                                  "counter",
                                                                  "input-precedence" arg,
                                                                  "output-precedence" arg
                                                              )
                                                          ),
                                                          "group" arg,
                                                          "dialer" arg
                                                      )
                                                  ),
                                                  "input-hierarchical-policer" arg,
                                                  "policer" (
                                                      c(
                                                          "input" arg,
                                                          "output" arg
                                                      )
                                                  ),
                                                  "sampling" (
                                                      c(
                                                          "input",
                                                          "output"
                                                      )
                                                  ),
                                                  "address" arg (
                                                      c(
                                                          "destination" (
                                                            ipv6addr
                                                          ),
                                                          "eui-64",
                                                          "primary",
                                                          "preferred",
                                                          "master-only",
                                                          "ndp" arg (
                                                              c(
                                                                  "l2-interface" (
                                                                    interface_name
                                                                  ),
                                                                  c(
                                                                    "mac" (
                                                                      mac_unicaset
                                                                    ),
                                                                    "multicast-mac" (
                                                                      mac_multicast
                                                                    )
                                                                  ),
                                                                  "publish"
                                                              )
                                                          ).as(:oneline),
                                                          "vrrp-inet6-group" (
                                                            vrrp_group
                                                          ),
                                                          "web-authentication" (
                                                              c(
                                                                  "http",
                                                                  "https",
                                                                  "redirect-to-https"
                                                              )
                                                          )
                                                      )
                                                  ),
                                                  "demux-source",
                                                  "demux-destination",
                                                  "unnumbered-address" (
                                                      c(
                                                          "source" (
                                                            interface_unit
                                                          ),
                                                          "preferred-source-address" arg
                                                      )
                                                  ).as(:oneline),
                                                  "dad-disable",
                                                  "no-dad-disable",
                                                  "dhcpv6-client" (
                                                      c(
                                                          "client-type" arg,
                                                          "client-ia-type" ("ia-na" | "ia-pd"),
                                                          "rapid-commit",
                                                          "update-router-advertisement" (
                                                              c(
                                                                  "interface" arg
                                                              )
                                                          ),
                                                          "client-identifier" (
                                                              c(
                                                                  "duid-type" arg
                                                              )
                                                          ).as(:oneline),
                                                          "req-option" ("dns-server" | "domain" | "ntp-server" | "time-zone" | "sip-server" | "sip-domain" | "nis-server" | "nis-domain" | "fqdn" | "vendor-spec"),
                                                          "update-server",
                                                          "retransmission-attempt" arg
                                                      )
                                                  )
                                              )
                                          ),
                                          "mpls" (
                                              c(
                                                  "mtu" arg,
                                                  "maximum-labels" arg,
                                                  "filter" (
                                                      c(
                                                          c(
                                                            "input" arg,
                                                            "input-list" arg
                                                          ),
                                                          c(
                                                            "output" arg,
                                                            "output-list" arg
                                                          ),
                                                          "group" arg,
                                                          "dialer" arg
                                                      )
                                                  ),
                                                  "input-hierarchical-policer" arg,
                                                  "policer" (
                                                      c(
                                                          "input" arg,
                                                          "output" arg
                                                      )
                                                  )
                                              )
                                          ),
                                          "mlppp" (
                                              c(
                                                  "bundle" (
                                                    interface_unit
                                                  )
                                              )
                                          ),
                                          "mlfr-end-to-end" (
                                              c(
                                                  "bundle" (
                                                    interface_unit
                                                  )
                                              )
                                          ),
                                          "mlfr-uni-nni" (
                                              c(
                                                  "bundle" (
                                                    interface_unit
                                                  )
                                              )
                                          ),
                                          "ccc" (
                                              c(
                                                  "filter" (
                                                      c(
                                                          c(
                                                            "input" arg,
                                                            "input-list" arg
                                                          ),
                                                          c(
                                                            "output" arg,
                                                            "output-list" arg
                                                          ),
                                                          "group" arg
                                                      )
                                                  ),
                                                  "policer" (
                                                      c(
                                                          "input" arg,
                                                          "output" arg
                                                      )
                                                  ),
                                                  "translate-fecn-and-becn",
                                                  c(
                                                    "translate-discard-eligible",
                                                    "translate-plp-control-word-de"
                                                  ),
                                                  "keep-address-and-control"
                                              )
                                          ),
                                          "tcc" (
                                              c(
                                                  "policer" (
                                                      c(
                                                          "input" arg,
                                                          "output" arg
                                                      )
                                                  ),
                                                  "proxy" (
                                                      c(
                                                          "inet-address" (
                                                            ipv4addr
                                                          )
                                                      )
                                                  ),
                                                  "remote" (
                                                      c(
                                                          "inet-address" (
                                                            ipv4addr
                                                          ),
                                                          "mac-address" (
                                                            mac_addr
                                                          )
                                                      )
                                                  ),
                                                  "protocols"
                                              )
                                          ),
                                          "vpls" (
                                              c(
                                                  "core-facing",
                                                  "filter" (
                                                      c(
                                                          c(
                                                            "input" (
                                                                c(
                                                                    "filter-name" arg,
                                                                    "precedence" arg
                                                                )
                                                            ).as(:oneline),
                                                            "input-list" arg
                                                          ),
                                                          c(
                                                            "output" (
                                                                c(
                                                                    "filter-name" arg,
                                                                    "precedence" arg
                                                                )
                                                            ).as(:oneline),
                                                            "output-list" arg
                                                          ),
                                                          "adf" (
                                                              c(
                                                                  "rule" arg,
                                                                  "counter",
                                                                  "input-precedence" arg,
                                                                  "output-precedence" arg
                                                              )
                                                          ),
                                                          "group" arg
                                                      )
                                                  ),
                                                  "policer" (
                                                      c(
                                                          "input" arg,
                                                          "output" arg
                                                      )
                                                  )
                                              )
                                          ),
                                          "bridge" (
                                              c(
                                                  "core-facing",
                                                  "filter" (
                                                      c(
                                                          c(
                                                            "input" (
                                                                c(
                                                                    "filter-name" arg,
                                                                    "precedence" arg
                                                                )
                                                            ).as(:oneline),
                                                            "input-list" arg
                                                          ),
                                                          c(
                                                            "output" (
                                                                c(
                                                                    "filter-name" arg,
                                                                    "precedence" arg
                                                                )
                                                            ).as(:oneline),
                                                            "output-list" arg
                                                          ),
                                                          "adf" (
                                                              c(
                                                                  "rule" arg,
                                                                  "counter",
                                                                  "input-precedence" arg,
                                                                  "output-precedence" arg
                                                              )
                                                          ),
                                                          "group" arg
                                                      )
                                                  ),
                                                  "policer" (
                                                      c(
                                                          "input" arg,
                                                          "output" arg
                                                      )
                                                  ),
                                                  "interface-mode" arg,
                                                  "bridge-domain-type" arg,
                                                  c(
                                                    "vlan-id" arg,
                                                    "vlan-id-list" arg,
                                                    "inner-vlan-id-list" arg
                                                  ),
                                                  "vlan-rewrite" (
                                                      c(
                                                          "translate" arg (
                                                              c(
                                                                  "to-vlan-id" arg
                                                              )
                                                          ).as(:oneline)
                                                      )
                                                  ),
                                                  c(
                                                    "isid-list" arg
                                                  ),
                                                  "storm-control" (
                                                    storm_control
                                                  )
                                              )
                                          ),
                                          "ethernet-switching" (
                                            ethernet_switching_type
                                          ),
                                          "fibre-channel" (
                                            fibre_channel_type
                                          ),
                                          "pppoe" (
                                            pppoe_underlying_options_type
                                          ),
                                          "any" (
                                              c(
                                                  "filter" (
                                                      c(
                                                          "input" arg,
                                                          "group" arg
                                                      )
                                                  )
                                              )
                                          )
                                      )
                                  ),
                                  "service-domain" arg,
                                  "copy-tos-to-outer-ip-header",
                                  "dialer-options" (
                                      c(
                                          "pool" arg,
                                          "dial-string" arg,
                                          "incoming-map" (
                                              c(
                                                  c(
                                                    "caller" arg.as(:oneline),
                                                    "accept-all"
                                                  )
                                              )
                                          ),
                                          "callback",
                                          "callback-wait-period" arg,
                                          "redial-delay" arg,
                                          "idle-timeout" arg,
                                          "watch-list" arg,
                                          "load-threshold" arg,
                                          "load-interval" arg,
                                          "activation-delay" arg,
                                          "deactivation-delay" arg,
                                          "initial-route-check" arg
                                      )
                                  ),
                                  "backup-options" (
                                      c(
                                          "interface" (
                                            interface_name
                                          )
                                      )
                                  ),
                                  "dynamic-call-admission-control"
                              )
                          ),
                          "no-partition" (
                              c(
                                  "interface-type" arg
                              )
                          ).as(:oneline),
                          "partition" arg (
                              c(
                                  "oc-slice" arg,
                                  "timeslots" arg,
                                  "interface-type" arg
                              )
                          ).as(:oneline),
                          "modem-options" (
                              c(
                                  "init-command-string" arg,
                                  "dialin" arg
                              )
                          ),
                          "isdn-options" (
                              c(
                                  "switch-type" arg,
                                  "media-type" arg,
                                  "spid1" arg,
                                  "spid2" arg,
                                  "calling-number" arg,
                                  "incoming-called-number" arg (
                                      c(
                                          "reject"
                                      )
                                  ).as(:oneline),
                                  "tei-option" arg,
                                  "static-tei-val" arg,
                                  "t310" arg,
                                  "bchannel-allocation" arg
                              )
                          ),
                          "dialer-options" (
                              c(
                                  "pool" arg (
                                      c(
                                          "priority" arg
                                      )
                                  ).as(:oneline)
                              )
                          ),
                          "redundant-pseudo-interface-options" (
                              c(
                                  "redundancy-group" arg
                              )
                          ),
                          "cellular-options"
                      )
                  ),
                  "interface" (
                    interfaces_type
                  )
              )
          ),
          "forwarding-options" (
            juniper_forwarding_options
          ),
          "event-options" (
              c(
                  "generate-event" arg (
                      c(
                          c(
                            "time-of-day" (
                              time
                            ),
                            "time-interval" arg
                          )
                      )
                  ).as(:oneline),
                  "policy" arg (
                      c(
                          "events" arg,
                          "within" arg (
                              c(
                                  "trigger" (
                                      c(
                                          c(
                                            "until",
                                            "on",
                                            "after"
                                          ),
                                          "count" arg
                                      )
                                  ).as(:oneline),
                                  "events" arg,
                                  "not" (
                                      c(
                                          "events" arg
                                      )
                                  ).as(:oneline)
                              )
                          ),
                          "attributes-match" (
                              s(
                                "from-event-attribute" arg,
                                "condition" (
                                      ("equals" | "starts-with" | "matches")
                                ),
                                "to-event-attribute-value" arg
                              )
                          ).as(:oneline),
                          "then" (
                              c(
                                  "ignore",
                                  "priority-override" (
                                      c(
                                          "facility" arg,
                                          "severity" arg
                                      )
                                  ),
                                  "upload" (
                                      s(
                                        "filename" (
                                              arg
                                        ),
                                        "destination" arg,
                                        c(
                                          "user-name" arg,
                                          "transfer-delay" arg,
                                          "retry-count" (
                                              c(
                                                  "retry" arg,
                                                  "retry-interval" arg
                                              )
                                          ).as(:oneline)
                                        )
                                      )
                                  ),
                                  "change-configuration" (
                                      c(
                                          "retry" (
                                              c(
                                                  "count" arg,
                                                  "interval" arg
                                              )
                                          ).as(:oneline),
                                          "commands" arg,
                                          "user-name" arg,
                                          "commit-options" (
                                              c(
                                                  "check" (
                                                      c(
                                                          "synchronize"
                                                      )
                                                  ),
                                                  "synchronize",
                                                  "force",
                                                  "log" arg
                                              )
                                          )
                                      )
                                  ),
                                  "execute-commands" (
                                      c(
                                          "commands" arg,
                                          "user-name" arg,
                                          "output-filename" arg,
                                          "destination" arg (
                                              c(
                                                  "transfer-delay" arg,
                                                  "retry-count" (
                                                      c(
                                                          "retry" arg,
                                                          "retry-interval" arg
                                                      )
                                                  ).as(:oneline)
                                              )
                                          ),
                                          "output-format" arg
                                      )
                                  ),
                                  "event-script" arg (
                                      c(
                                          "arguments" arg (
                                              c(
                                                  "value" arg
                                              )
                                          ).as(:oneline),
                                          "user-name" arg,
                                          "output-filename" arg,
                                          "destination" arg (
                                              c(
                                                  "transfer-delay" arg,
                                                  "retry-count" (
                                                      c(
                                                          "retry" arg,
                                                          "retry-interval" arg
                                                      )
                                                  ).as(:oneline)
                                              )
                                          ),
                                          "output-format" arg
                                      )
                                  ),
                                  "raise-trap"
                              )
                          )
                      )
                  ),
                  "event-script" (
                      c(
                          "traceoptions" (
                              c(
                                  "no-remote-trace",
                                  "file" (
                                      c(
                                          "filename" arg,
                                          "size" arg,
                                          "files" arg,
                                          "world-readable",
                                          "no-world-readable"
                                      )
                                  ).as(:oneline),
                                  "flag" ("events" | "input" | "offline" | "output" | "rpc" | "xslt" | "all").as(:oneline)
                              )
                          ),
                          "file" arg (
                              c(
                                  "source" arg,
                                  "refresh",
                                  "refresh-from" arg,
                                  "checksum" (
                                      c(
                                          "md5" arg,
                                          "sha1" arg,
                                          "sha-256" arg
                                      )
                                  ),
                                  "remote-execution" arg (
                                      c(
                                          "username" arg,
                                          "passphrase" (
                                            unreadable
                                          )
                                      )
                                  )
                              )
                          ),
                          "refresh",
                          "refresh-from" arg
                      )
                  ),
                  "destinations" arg (
                      c(
                          "transfer-delay" arg,
                          "archive-sites" arg (
                              c(
                                  "password" (
                                    unreadable
                                  )
                              )
                          ).as(:oneline)
                      )
                  ),
                  "traceoptions" (
                      c(
                          "no-remote-trace",
                          "file" (
                              c(
                                  "filename" arg,
                                  "size" arg,
                                  "files" arg,
                                  "world-readable",
                                  "no-world-readable",
                                  "match" (
                                    regular_expression
                                  )
                              )
                          ).as(:oneline),
                          "flag" ("server" | "configuration" | "events" | "timer-events" | "database" | "policy" | "registration" | "syslogd" | "all").as(:oneline)
                      )
                  )
              )
          ),
          "snmp" (
              c(
                  "system-name" arg,
                  "description" arg,
                  "location" arg,
                  "contact" arg,
                  "interface" (
                    interface_name
                  ),
                  "filter-interfaces" (
                      c(
                          "interfaces" arg,
                          "all-internal-interfaces"
                      )
                  ),
                  "filter-duplicates",
                  "nonvolatile" (
                      c(
                          "commit-delay" arg
                      )
                  ),
                  "v3" (
                      c(
                          "usm" (
                              c(
                                  "local-engine" (
                                      c(
                                          "user" (
                                            v3_user_config
                                          )
                                      )
                                  ),
                                  "remote-engine" arg (
                                      c(
                                          "user" (
                                            v3_user_config
                                          )
                                      )
                                  )
                              )
                          ),
                          "vacm" (
                              c(
                                  "security-to-group" (
                                      c(
                                          "security-model" ("usm" | "v1" | "v2c") (
                                              c(
                                                  "security-name" arg (
                                                      c(
                                                          "group" arg
                                                      )
                                                  )
                                              )
                                          )
                                      )
                                  ),
                                  "access" (
                                      c(
                                          "group" arg (
                                              c(
                                                  "default-context-prefix" (
                                                      c(
                                                          "security-model" (
                                                            security_model_access
                                                          )
                                                      )
                                                  ),
                                                  "context-prefix" arg (
                                                      c(
                                                          "security-model" (
                                                            security_model_access
                                                          )
                                                      )
                                                  )
                                              )
                                          )
                                      )
                                  )
                              )
                          ),
                          "target-address" arg (
                              c(
                                  "address" (
                                    ipaddr
                                  ),
                                  "port" arg,
                                  "timeout" arg,
                                  "retry-count" arg,
                                  "tag-list" arg,
                                  "address-mask" (
                                    ipaddr
                                  ),
                                  "routing-instance" arg,
                                  "logical-system" arg,
                                  "target-parameters" arg
                              )
                          ),
                          "target-parameters" arg (
                              c(
                                  "parameters" (
                                      c(
                                          "message-processing-model" arg,
                                          "security-model" arg,
                                          "security-level" arg,
                                          "security-name" arg
                                      )
                                  ),
                                  "notify-filter" (
                                      c(
                                          "filter" arg
                                      )
                                  ).as(:oneline)
                              )
                          ),
                          "notify" arg (
                              c(
                                  "type" arg,
                                  "tag" arg
                              )
                          ),
                          "notify-filter" arg (
                              c(
                                  "oid" arg (
                                      c(
                                          c(
                                            "include",
                                            "exclude"
                                          )
                                      )
                                  ).as(:oneline)
                              )
                          ),
                          "snmp-community" arg (
                              c(
                                  "community-name" (
                                    unreadable
                                  ),
                                  "security-name" arg,
                                  "context" arg,
                                  "tag" arg
                              )
                          )
                      )
                  ),
                  "engine-id" (
                      c(
                          c(
                            "use-mac-address",
                            "use-default-ip-address",
                            "local" arg
                          )
                      )
                  ),
                  "view" arg (
                      c(
                          "oid" arg (
                              c(
                                  c(
                                    "include",
                                    "exclude"
                                  )
                              )
                          ).as(:oneline)
                      )
                  ),
                  "client-list" arg (
                      c(
                          "client-address-list" (
                            client_address_object
                          )
                      )
                  ),
                  "community" arg (
                      c(
                          "view" arg,
                          "authorization" arg,
                          c(
                            "client-list-name" arg,
                            "clients" arg (
                                c(
                                    "restrict"
                                )
                            ).as(:oneline)
                          ),
                          "routing-instance" arg (
                              c(
                                  c(
                                    "client-list-name" arg,
                                    "clients" arg (
                                        c(
                                            "restrict"
                                        )
                                    ).as(:oneline)
                                  )
                              )
                          ),
                          "logical-system" arg (
                              c(
                                  "routing-instance" arg (
                                      c(
                                          c(
                                            "client-list-name" arg,
                                            "clients" arg (
                                                c(
                                                    "restrict"
                                                )
                                            ).as(:oneline)
                                          )
                                      )
                                  )
                              )
                          )
                      )
                  ),
                  "trap-options" (
                      c(
                          "source-address" (
                              c(
                                  c(
                                    "lo0",
                                    "address" (
                                      ipv4addr
                                    )
                                  )
                              )
                          ),
                          "enterprise-oid",
                          "routing-instance" arg (
                              c(
                                  "source-address" (
                                      c(
                                          c(
                                            "lo0",
                                            "address" (
                                              ipv4addr
                                            )
                                          )
                                      )
                                  )
                              )
                          ),
                          "logical-system" arg (
                              c(
                                  "routing-instance" arg (
                                      c(
                                          "source-address" (
                                              c(
                                                  c(
                                                    "lo0",
                                                    "address" (
                                                      ipv4addr
                                                    )
                                                  )
                                              )
                                          )
                                      )
                                  )
                              )
                          ),
                          "agent-address" arg
                      )
                  ),
                  "trap-group" arg (
                      c(
                          "version" arg,
                          "destination-port" arg,
                          "categories" (
                              c(
                                  "authentication",
                                  "chassis",
                                  "link",
                                  "remote-operations",
                                  "routing",
                                  "startup",
                                  "ggsn",
                                  "rmon-alarm",
                                  "vrrp-events",
                                  "configuration",
                                  "services",
                                  "chassis-cluster",
                                  "sonet-alarms" (
                                      c(
                                          "loss-of-light",
                                          "pll-lock",
                                          "loss-of-frame",
                                          "loss-of-signal",
                                          "severely-errored-frame",
                                          "line-ais",
                                          "path-ais",
                                          "loss-of-pointer",
                                          "ber-defect",
                                          "ber-fault",
                                          "line-remote-defect-indication",
                                          "path-remote-defect-indication",
                                          "remote-error-indication",
                                          "unequipped",
                                          "path-mismatch",
                                          "loss-of-cell",
                                          "vt-ais",
                                          "vt-loss-of-pointer",
                                          "vt-remote-defect-indication",
                                          "vt-unequipped",
                                          "vt-label-mismatch",
                                          "vt-loss-of-cell"
                                      )
                                  ),
                                  "otn-alarms" (
                                      c(
                                          "oc-los",
                                          "oc-lof",
                                          "oc-lom",
                                          "wavelength-lock",
                                          "otu-ais",
                                          "otu-bdi",
                                          "otu-ttim",
                                          "otu-iae",
                                          "otu-sd",
                                          "otu-sf",
                                          "otu-fec-exe",
                                          "otu-fec-deg",
                                          "otu-bbe-threshold",
                                          "otu-es-threshold",
                                          "otu-ses-threshold",
                                          "otu-uas-threshold",
                                          "odu-ais",
                                          "odu-oci",
                                          "odu-lck",
                                          "odu-bdi",
                                          "odu-ttim",
                                          "odu-sd",
                                          "odu-sf",
                                          "odu-rx-aps-change",
                                          "odu-bbe-threshold",
                                          "odu-es-threshold",
                                          "odu-ses-threshold",
                                          "odu-uas-threshold",
                                          "opu-ptm"
                                      )
                                  )
                              )
                          ),
                          "targets" arg.as(:oneline),
                          "routing-instance" arg,
                          "logical-system" arg
                      )
                  ),
                  "routing-instance-access" (
                      c(
                          "access-list" arg (
                              c(
                                  "restrict"
                              )
                          ).as(:oneline)
                      )
                  ),
                  "logical-system-trap-filter",
                  "traceoptions" (
                      c(
                          "no-remote-trace",
                          "file" (
                              c(
                                  "size" arg,
                                  "files" arg,
                                  "world-readable",
                                  "no-world-readable",
                                  "match" (
                                    regular_expression
                                  )
                              )
                          ).as(:oneline),
                          "flag" ("timer" | "protocol-timeouts" | "pdu" | "varbind-error" | "routing-socket" | "interface-stats" | "subagent" | "general" | "nonvolatile-sets" | "all").as(:oneline)
                      )
                  ),
                  "rmon" (
                      c(
                          "history",
                          "alarm" arg (
                              c(
                                  "description" arg,
                                  "interval" arg,
                                  "falling-threshold-interval" arg,
                                  "variable" arg,
                                  "sample-type" arg,
                                  "request-type" arg,
                                  "startup-alarm" arg,
                                  "rising-threshold" arg,
                                  "falling-threshold" arg,
                                  "rising-event-index" arg,
                                  "falling-event-index" arg,
                                  "syslog-subtag" arg
                              )
                          ),
                          "event" arg (
                              c(
                                  "description" arg,
                                  "type" arg,
                                  "community" arg
                              )
                          )
                      )
                  ),
                  "health-monitor" (
                      c(
                          "routing-engine",
                          "interval" arg,
                          "rising-threshold" arg,
                          "falling-threshold" arg,
                          "idp" (
                              c(
                                  "interval" arg,
                                  "rising-threshold" arg,
                                  "falling-threshold" arg
                              )
                          )
                      )
                  )
              )
          ),
          "accounting-options" (
            juniper_accounting_options
          ),
          "routing-options" (
            juniper_routing_options
          ),
          "multicast-snooping-options" (
            juniper_multicast_snooping_options
          ),
          "protocols" (
            juniper_protocols
          ),
          "policy-options" (
            juniper_policy_options
          ),
          "class-of-service" (
            juniper_class_of_service_options
          ),
          "security" (
              c(
                  "alarms" (
                      c(
                          "audible" (
                              c(
                                  "continuous"
                              )
                          ),
                          "potential-violation" (
                              c(
                                  "authentication" arg,
                                  "cryptographic-self-test",
                                  "decryption-failures" (
                                      c(
                                          "threshold" arg
                                      )
                                  ),
                                  "encryption-failures" (
                                      c(
                                          "threshold" arg
                                      )
                                  ),
                                  "ike-phase1-failures" (
                                      c(
                                          "threshold" arg
                                      )
                                  ),
                                  "ike-phase2-failures" (
                                      c(
                                          "threshold" arg
                                      )
                                  ),
                                  "key-generation-self-test",
                                  "non-cryptographic-self-test",
                                  "policy" (
                                      c(
                                          "source-ip" (
                                              c(
                                                  "threshold" arg,
                                                  "duration" arg,
                                                  "size" arg
                                              )
                                          ),
                                          "destination-ip" (
                                              c(
                                                  "threshold" arg,
                                                  "duration" arg,
                                                  "size" arg
                                              )
                                          ),
                                          "application" (
                                              c(
                                                  "threshold" arg,
                                                  "duration" arg,
                                                  "size" arg
                                              )
                                          ),
                                          "policy-match" (
                                              c(
                                                  "threshold" arg,
                                                  "duration" arg,
                                                  "size" arg
                                              )
                                          )
                                      )
                                  ),
                                  "replay-attacks" (
                                      c(
                                          "threshold" arg
                                      )
                                  ),
                                  "security-log-percent-full" arg,
                                  "idp"
                              )
                          )
                      )
                  ),
                  "log" (
                      c(
                          "cache" (
                              c(
                                  "exclude" arg (
                                      c(
                                          "destination-address" (
                                            ipaddr
                                          ),
                                          "destination-port" arg,
                                          "event-id" arg,
                                          "failure",
                                          "interface-name" arg,
                                          "policy-name" arg,
                                          "process" arg,
                                          "protocol" arg,
                                          "source-address" (
                                            ipaddr
                                          ),
                                          "source-port" arg,
                                          "success",
                                          "username" arg
                                      )
                                  ),
                                  "limit" arg
                              )
                          ),
                          "disable",
                          "utc-timestamp",
                          "mode" arg,
                          "event-rate" arg,
                          "format" arg,
                          "rate-cap" arg,
                          c(
                            "source-address" (
                              ipaddr
                            ),
                            "source-interface" (
                              interface_name
                            )
                          ),
                          "transport" (
                              c(
                                  "tcp-connections" arg,
                                  "protocol" arg,
                                  "tls-profile" arg
                              )
                          ),
                          "stream" arg (
                              c(
                                  "severity" arg,
                                  "format" arg,
                                  "category" arg,
                                  "host" (
                                    host_object
                                  )
                              )
                          ),
                          "file" (
                              c(
                                  "filename" arg,
                                  "size" arg,
                                  "path" arg,
                                  "files" arg
                              )
                          ),
                          "traceoptions" (
                              c(
                                  "no-remote-trace",
                                  "file" (
                                      c(
                                          "filename" arg,
                                          "size" arg,
                                          "files" arg,
                                          "world-readable",
                                          "no-world-readable",
                                          "match" (
                                            regular_expression
                                          )
                                      )
                                  ).as(:oneline),
                                  "flag" ("source" | "configuration" | "all" | "report" | "hpl").as(:oneline)
                              )
                          )
                      )
                  ),
                  "certificates" (
                      c(
                          "local" (
                            certificate_object
                          ),
                          "path-length" arg,
                          "maximum-certificates" arg,
                          "cache-size" arg,
                          "cache-timeout-negative" arg,
                          "enrollment-retry" arg,
                          "certification-authority" arg (
                              c(
                                  "ca-name" arg,
                                  "file" arg,
                                  "crl" arg,
                                  "enrollment-url" arg,
                                  "ldap-url" arg,
                                  "encoding" arg
                              )
                          )
                      )
                  ),
                  "ssh-known-hosts" (
                      c(
                          "host" arg (
                              c(
                                  "rsa1-key" arg,
                                  "rsa-key" arg,
                                  "dsa-key" arg,
                                  "ecdsa-sha2-nistp256-key" arg,
                                  "ecdsa-sha2-nistp384-key" arg,
                                  "ecdsa-sha2-nistp521-key" arg,
                                  "ed25519-key" arg
                              )
                          )
                      )
                  ),
                  "key-protection",
                  "pki" (
                    security_pki
                  ),
                  "idp" (
                      c(
                          "idp-policy" (
                            idp_policy_type
                          ),
                          "active-policy" arg,
                          "custom-attack" (
                            custom_attack_type
                          ),
                          "custom-attack-group" (
                            custom_attack_group_type
                          ),
                          "dynamic-attack-group" (
                            dynamic_attack_group_type
                          ),
                          "traceoptions" (
                            idpd_traceoptions_type
                          ),
                          "security-package" (
                              c(
                                  "url" arg,
                                  "source-address" (
                                    ipv4addr
                                  ),
                                  "install" (
                                      c(
                                          "ignore-version-check"
                                      )
                                  ),
                                  "automatic" (
                                      c(
                                          "start-time" (
                                            time
                                          ),
                                          "interval" arg,
                                          c(
                                            "enable"
                                          )
                                      )
                                  )
                              )
                          ),
                          "sensor-configuration" (
                              c(
                                  "log" (
                                      c(
                                          "cache-size" arg,
                                          "suppression" (
                                              c(
                                                  c(
                                                    "disable"
                                                  ),
                                                  "include-destination-address",
                                                  "no-include-destination-address",
                                                  "start-log" arg,
                                                  "max-logs-operate" arg,
                                                  "max-time-report" arg
                                              )
                                          )
                                      )
                                  ),
                                  "packet-log" (
                                      c(
                                          "total-memory" arg,
                                          "max-sessions" arg,
                                          "threshold-logging-interval" arg,
                                          "source-address" (
                                            ipv4addr
                                          ),
                                          "host" (
                                              c(
                                                  "ipaddr" (
                                                    ipv4addr
                                                  ),
                                                  "port" arg
                                              )
                                          )
                                      )
                                  ),
                                  "application-identification" (
                                      c(
                                          c(
                                            "disable"
                                          ),
                                          "application-system-cache",
                                          "no-application-system-cache",
                                          "max-tcp-session-packet-memory" arg,
                                          "max-udp-session-packet-memory" arg,
                                          "max-sessions" arg,
                                          "max-packet-memory-ratio" arg,
                                          "max-reass-packet-memory-ratio" arg,
                                          "application-system-cache-timeout" arg
                                      )
                                  ),
                                  "flow" (
                                      c(
                                          "log-errors",
                                          "no-log-errors",
                                          "reset-on-policy",
                                          "no-reset-on-policy",
                                          "allow-icmp-without-flow",
                                          "no-allow-icmp-without-flow",
                                          "hash-table-size" arg,
                                          "reject-timeout" arg,
                                          "max-timers-poll-ticks" arg,
                                          "fifo-max-size" arg,
                                          "udp-anticipated-timeout" arg,
                                          "allow-nonsyn-connection",
                                          "drop-on-limit",
                                          "drop-on-failover",
                                          "drop-if-no-policy-loaded",
                                          "max-sessions-offset" arg,
                                          "min-objcache-limit-lt" arg,
                                          "min-objcache-limit-ut" arg
                                      )
                                  ),
                                  "re-assembler" (
                                      c(
                                          "ignore-memory-overflow",
                                          "no-ignore-memory-overflow",
                                          "ignore-reassembly-memory-overflow",
                                          "no-ignore-reassembly-memory-overflow",
                                          "ignore-reassembly-overflow",
                                          "max-flow-mem" arg,
                                          "max-packet-mem-ratio" arg,
                                          "action-on-reassembly-failure" arg,
                                          "tcp-error-logging",
                                          "no-tcp-error-logging",
                                          "max-synacks-queued" arg
                                      )
                                  ),
                                  "ips" (
                                      c(
                                          "process-override",
                                          "no-process-override",
                                          "detect-shellcode",
                                          "no-detect-shellcode",
                                          "process-ignore-s2c",
                                          "no-process-ignore-s2c",
                                          "ignore-regular-expression",
                                          "no-ignore-regular-expression",
                                          "process-port" arg,
                                          "fifo-max-size" arg,
                                          "log-supercede-min" arg,
                                          "content-decompression-max-memory-kb" arg,
                                          "content-decompression-max-ratio" arg,
                                          "session-pkt-depth" arg
                                      )
                                  ),
                                  "global" (
                                      c(
                                          "enable-packet-pool",
                                          "no-enable-packet-pool",
                                          "enable-all-qmodules",
                                          "no-enable-all-qmodules",
                                          "policy-lookup-cache",
                                          "no-policy-lookup-cache",
                                          "memory-limit-percent" arg,
                                          "gtp" (
                                              c(
                                                  "decapsulation",
                                                  "no-decapsulation"
                                              )
                                          )
                                      )
                                  ),
                                  "detector" (
                                      c(
                                          "protocol-name" (
                                            proto_object
                                          )
                                      )
                                  ),
                                  "ssl-inspection",
                                  "disable-low-memory-handling",
                                  "high-availability" (
                                      c(
                                          "no-policy-cold-synchronization"
                                      )
                                  ),
                                  "security-configuration" (
                                      c(
                                          "protection-mode" arg
                                      )
                                  )
                              )
                          ),
                          "processes"
                      )
                  ),
                  "ike" (
                    security_ike
                  ),
                  "ipsec" (
                    security_ipsec_vpn
                  ),
                  "group-vpn" (
                    security_group_vpn
                  ),
                  "address-book" (
                    named_address_book_type
                  ),
                  "alg" (
                      c(
                          "traceoptions" (
                              c(
                                  "no-remote-trace",
                                  "file" (
                                      c(
                                          "filename" arg,
                                          "size" arg,
                                          "files" arg,
                                          "world-readable",
                                          "no-world-readable",
                                          "match" (
                                            regular_expression
                                          )
                                      )
                                  ).as(:oneline),
                                  "level" arg
                              )
                          ),
                          "alg-manager" (
                              c(
                                  "traceoptions" (
                                      c(
                                          "flag" ("all") (
                                              c(
                                                  c(
                                                    "extensive"
                                                  )
                                              )
                                          ).as(:oneline)
                                      )
                                  )
                              )
                          ).as(:oneline),
                          "alg-support-lib" (
                              c(
                                  "traceoptions" (
                                      c(
                                          "flag" ("all") (
                                              c(
                                                  c(
                                                    "extensive"
                                                  )
                                              )
                                          ).as(:oneline)
                                      )
                                  )
                              )
                          ).as(:oneline),
                          "dns" (
                              c(
                                  "disable",
                                  "maximum-message-length" arg,
                                  "doctoring" (
                                      c(
                                          c(
                                            "none",
                                            "sanity-check"
                                          )
                                      )
                                  ),
                                  "traceoptions" (
                                      c(
                                          "flag" ("all") (
                                              c(
                                                  c(
                                                    "extensive"
                                                  )
                                              )
                                          ).as(:oneline)
                                      )
                                  )
                              )
                          ),
                          "ftp" (
                              c(
                                  "disable",
                                  "ftps-extension",
                                  "line-break-extension",
                                  "allow-mismatch-ip-address",
                                  "traceoptions" (
                                      c(
                                          "flag" ("all") (
                                              c(
                                                  c(
                                                    "extensive"
                                                  )
                                              )
                                          ).as(:oneline)
                                      )
                                  )
                              )
                          ).as(:oneline),
                          "h323" (
                              c(
                                  "disable",
                                  "endpoint-registration-timeout" arg,
                                  "media-source-port-any",
                                  "application-screen" (
                                      c(
                                          "unknown-message" (
                                              c(
                                                  "permit-nat-applied",
                                                  "permit-routed"
                                              )
                                          ),
                                          "message-flood" (
                                              c(
                                                  "gatekeeper" (
                                                      c(
                                                          "threshold" arg
                                                      )
                                                  ).as(:oneline)
                                              )
                                          )
                                      )
                                  ),
                                  "dscp-rewrite" (
                                      c(
                                          "code-point" arg
                                      )
                                  ),
                                  "traceoptions" (
                                      c(
                                          "flag" ("q931" | "h245" | "ras" | "h225-asn1" | "h245-asn1" | "ras-asn1" | "chassis-cluster" | "all") (
                                              c(
                                                  c(
                                                    "terse",
                                                    "detail",
                                                    "extensive"
                                                  )
                                              )
                                          ).as(:oneline)
                                      )
                                  )
                              )
                          ),
                          "mgcp" (
                              c(
                                  "disable",
                                  "inactive-media-timeout" arg,
                                  "transaction-timeout" arg,
                                  "maximum-call-duration" arg,
                                  "application-screen" (
                                      c(
                                          "unknown-message" (
                                              c(
                                                  "permit-nat-applied",
                                                  "permit-routed"
                                              )
                                          ),
                                          "message-flood" (
                                              c(
                                                  "threshold" arg
                                              )
                                          ).as(:oneline),
                                          "connection-flood" (
                                              c(
                                                  "threshold" arg
                                              )
                                          ).as(:oneline)
                                      )
                                  ),
                                  "dscp-rewrite" (
                                      c(
                                          "code-point" arg
                                      )
                                  ),
                                  "traceoptions" (
                                      c(
                                          "flag" ("call" | "decode" | "error" | "chassis-cluster" | "nat" | "packet" | "rm" | "all") (
                                              c(
                                                  c(
                                                    "extensive"
                                                  )
                                              )
                                          ).as(:oneline)
                                      )
                                  )
                              )
                          ),
                          "msrpc" (
                              c(
                                  "disable",
                                  "traceoptions" (
                                      c(
                                          "flag" ("all") (
                                              c(
                                                  c(
                                                    "extensive"
                                                  )
                                              )
                                          ).as(:oneline)
                                      )
                                  )
                              )
                          ).as(:oneline),
                          "sunrpc" (
                              c(
                                  "disable",
                                  "traceoptions" (
                                      c(
                                          "flag" ("all") (
                                              c(
                                                  c(
                                                    "extensive"
                                                  )
                                              )
                                          ).as(:oneline)
                                      )
                                  )
                              )
                          ).as(:oneline),
                          "rsh" (
                              c(
                                  "disable",
                                  "traceoptions" (
                                      c(
                                          "flag" ("all") (
                                              c(
                                                  c(
                                                    "extensive"
                                                  )
                                              )
                                          ).as(:oneline)
                                      )
                                  )
                              )
                          ).as(:oneline),
                          "rtsp" (
                              c(
                                  "disable",
                                  "traceoptions" (
                                      c(
                                          "flag" ("all") (
                                              c(
                                                  c(
                                                    "extensive"
                                                  )
                                              )
                                          ).as(:oneline)
                                      )
                                  )
                              )
                          ).as(:oneline),
                          "sccp" (
                              c(
                                  "disable",
                                  "inactive-media-timeout" arg,
                                  "application-screen" (
                                      c(
                                          "unknown-message" (
                                              c(
                                                  "permit-nat-applied",
                                                  "permit-routed"
                                              )
                                          ),
                                          "call-flood" (
                                              c(
                                                  "threshold" arg
                                              )
                                          ).as(:oneline)
                                      )
                                  ),
                                  "dscp-rewrite" (
                                      c(
                                          "code-point" arg
                                      )
                                  ),
                                  "traceoptions" (
                                      c(
                                          "flag" ("call" | "cli" | "decode" | "error" | "chassis-cluster" | "init" | "nat" | "rm" | "all") (
                                              c(
                                                  c(
                                                    "extensive"
                                                  )
                                              )
                                          ).as(:oneline)
                                      )
                                  )
                              )
                          ),
                          "sip" (
                              c(
                                  "disable",
                                  "inactive-media-timeout" arg,
                                  "maximum-call-duration" arg,
                                  "t1-interval" arg,
                                  "t4-interval" arg,
                                  "c-timeout" arg,
                                  "retain-hold-resource",
                                  "application-screen" (
                                      c(
                                          "unknown-message" (
                                              c(
                                                  "permit-nat-applied",
                                                  "permit-routed"
                                              )
                                          ),
                                          "protect" (
                                              c(
                                                  "deny" (
                                                      c(
                                                          c(
                                                            "destination-ip" arg,
                                                            "all"
                                                          ),
                                                          "timeout" arg
                                                      )
                                                  )
                                              )
                                          )
                                      )
                                  ),
                                  "dscp-rewrite" (
                                      c(
                                          "code-point" arg
                                      )
                                  ),
                                  "traceoptions" (
                                      c(
                                          "flag" ("call" | "chassis-cluster" | "nat" | "parser" | "rm" | "all") (
                                              c(
                                                  c(
                                                    "terse",
                                                    "detail",
                                                    "extensive"
                                                  )
                                              )
                                          ).as(:oneline)
                                      )
                                  )
                              )
                          ),
                          "sql" (
                              c(
                                  "disable",
                                  "traceoptions" (
                                      c(
                                          "flag" ("all") (
                                              c(
                                                  c(
                                                    "extensive"
                                                  )
                                              )
                                          ).as(:oneline)
                                      )
                                  )
                              )
                          ).as(:oneline),
                          "talk" (
                              c(
                                  "disable",
                                  "traceoptions" (
                                      c(
                                          "flag" ("all") (
                                              c(
                                                  c(
                                                    "extensive"
                                                  )
                                              )
                                          ).as(:oneline)
                                      )
                                  )
                              )
                          ).as(:oneline),
                          "tftp" (
                              c(
                                  "disable",
                                  "traceoptions" (
                                      c(
                                          "flag" ("all") (
                                              c(
                                                  c(
                                                    "extensive"
                                                  )
                                              )
                                          ).as(:oneline)
                                      )
                                  )
                              )
                          ).as(:oneline),
                          "pptp" (
                              c(
                                  "disable",
                                  "traceoptions" (
                                      c(
                                          "flag" ("all") (
                                              c(
                                                  c(
                                                    "extensive"
                                                  )
                                              )
                                          ).as(:oneline)
                                      )
                                  )
                              )
                          ).as(:oneline),
                          "ike-esp-nat" (
                              c(
                                  "enable",
                                  "esp-gate-timeout" arg,
                                  "esp-session-timeout" arg,
                                  "state-timeout" arg,
                                  "traceoptions" (
                                      c(
                                          "flag" ("all") (
                                              c(
                                                  c(
                                                    "extensive"
                                                  )
                                              )
                                          ).as(:oneline)
                                      )
                                  )
                              )
                          )
                      )
                  ),
                  "application-firewall",
                  "application-tracking",
                  "utm" (
                      c(
                          "traceoptions" (
                            utm_traceoptions
                          ),
                          "application-proxy" (
                              c(
                                  "traceoptions" (
                                    utm_apppxy_traceoptions
                                  )
                              )
                          ),
                          "ipc" (
                              c(
                                  "traceoptions" (
                                    utm_ipc_traceoptions
                                  )
                              )
                          ),
                          "custom-objects" (
                              c(
                                  "mime-pattern" (
                                    mime_list_type
                                  ),
                                  "filename-extension" (
                                    extension_list_type
                                  ),
                                  "url-pattern" (
                                    url_list_type
                                  ),
                                  "custom-url-category" (
                                    category_list_type
                                  ),
                                  "protocol-command" (
                                    command_list_type
                                  )
                              )
                          ),
                          "feature-profile" (
                              c(
                                  "anti-virus" (
                                    anti_virus_feature
                                  ),
                                  "web-filtering" (
                                    webfilter_feature
                                  ),
                                  "anti-spam" (
                                    anti_spam_feature
                                  ),
                                  "content-filtering" (
                                    content_filtering_feature
                                  )
                              )
                          ),
                          "utm-policy" (
                            profile_setting
                          )
                      )
                  ),
                  "dynamic-vpn",
                  "softwires" (
                      c(
                          "softwire-name" (
                            softwire_option_type
                          ),
                          "traceoptions" (
                              c(
                                  "no-remote-trace",
                                  "file" (
                                      c(
                                          "filename" arg,
                                          "size" arg,
                                          "files" arg,
                                          "world-readable",
                                          "no-world-readable",
                                          "match" (
                                            regular_expression
                                          )
                                      )
                                  ).as(:oneline),
                                  "flag" ("configuration" | "flow" | "all").as(:oneline)
                              )
                          )
                      )
                  ),
                  "forwarding-options" (
                      c(
                          "family" (
                              c(
                                  "inet6" (
                                      c(
                                          "mode" arg
                                      )
                                  ),
                                  "mpls" (
                                      c(
                                          "mode" arg
                                      )
                                  ),
                                  "iso" (
                                      c(
                                          "mode" arg
                                      )
                                  )
                              )
                          ),
                          "mirror-filter" (
                            mirror_filter_type
                          )
                      )
                  ),
                  "advanced-services",
                  "flow" (
                      c(
                          "enhanced-routing-mode",
                          "traceoptions" (
                              c(
                                  "no-remote-trace",
                                  "file" (
                                      c(
                                          "filename" arg,
                                          "size" arg,
                                          "files" arg,
                                          "world-readable",
                                          "no-world-readable",
                                          "match" (
                                            regular_expression
                                          )
                                      )
                                  ).as(:oneline),
                                  "flag" ("all" | "basic-datapath" | "high-availability" | "host-traffic" | "fragmentation" | "multicast" | "route" | "session" | "session-scan" | "tcp-basic" | "tunnel").as(:oneline),
                                  "rate-limit" arg,
                                  "packet-filter" (
                                    flow_filter_type
                                  ),
                                  "trace-level" (
                                      c(
                                          c(
                                            "error",
                                            "brief",
                                            "detail"
                                          )
                                      )
                                  )
                              )
                          ),
                          "pending-sess-queue-length" arg,
                          "allow-dns-reply",
                          "route-change-timeout" arg,
                          "syn-flood-protection-mode" arg,
                          "sync-icmp-session",
                          "ipsec-performance-acceleration",
                          "aging" (
                              c(
                                  "early-ageout" arg,
                                  "low-watermark" arg,
                                  "high-watermark" arg
                              )
                          ),
                          "bridge" (
                              c(
                                  "block-non-ip-all",
                                  "bypass-non-ip-unicast",
                                  "no-packet-flooding" (
                                      c(
                                          "no-trace-route"
                                      )
                                  ),
                                  "bpdu-vlan-flooding"
                              )
                          ),
                          "tcp-mss" (
                              c(
                                  "all-tcp" (
                                      c(
                                          "mss" arg
                                      )
                                  ),
                                  "ipsec-vpn" (
                                      c(
                                          "mss" arg
                                      )
                                  ),
                                  "gre-in" (
                                      c(
                                          "mss" arg
                                      )
                                  ),
                                  "gre-out" (
                                      c(
                                          "mss" arg
                                      )
                                  )
                              )
                          ),
                          "tcp-session" (
                              c(
                                  "rst-invalidate-session",
                                  "fin-invalidate-session",
                                  "rst-sequence-check",
                                  "no-syn-check",
                                  "strict-syn-check",
                                  "no-syn-check-in-tunnel",
                                  "no-sequence-check",
                                  "tcp-initial-timeout" arg,
                                  "time-wait-state" (
                                      c(
                                          c(
                                            "session-ageout",
                                            "session-timeout" arg
                                          ),
                                          "apply-to-half-close-state"
                                      )
                                  )
                              )
                          ),
                          "force-ip-reassembly",
                          "load-distribution" (
                              c(
                                  "session-affinity"
                              )
                          )
                      )
                  ),
                  "firewall-authentication" (
                      c(
                          "traceoptions" (
                              c(
                                  "flag" ("authentication" | "proxy" | "all") (
                                      c(
                                          c(
                                            "terse",
                                            "detail",
                                            "extensive"
                                          )
                                      )
                                  ).as(:oneline)
                              )
                          )
                      )
                  ),
                  "screen" (
                      c(
                          "ids-option" (
                            ids_option_type
                          ),
                          "traceoptions" (
                              c(
                                  "no-remote-trace",
                                  "file" (
                                      c(
                                          "filename" arg,
                                          "size" arg,
                                          "files" arg,
                                          "world-readable",
                                          "no-world-readable",
                                          "match" (
                                            regular_expression
                                          )
                                      )
                                  ).as(:oneline),
                                  "flag" ("configuration" | "flow" | "all").as(:oneline)
                              )
                          )
                      )
                  ),
                  "nat" (
                      c(
                          "traceoptions" (
                              c(
                                  "no-remote-trace",
                                  "file" (
                                      c(
                                          "filename" arg,
                                          "size" arg,
                                          "files" arg,
                                          "world-readable",
                                          "no-world-readable",
                                          "match" (
                                            regular_expression
                                          )
                                      )
                                  ).as(:oneline),
                                  "flag" ("configuration" | "flow" | "routing-socket" | "routing-protocol" | "all" | "source-nat-re" | "source-nat-rt" | "source-nat-pfe" | "destination-nat-re" | "destination-nat-rt" | "destination-nat-pfe" | "static-nat-re" | "static-nat-rt" | "static-nat-pfe") (
                                      c(
                                          "syslog"
                                      )
                                  ).as(:oneline)
                              )
                          ),
                          "source" (
                            ssg_source_nat_object
                          ),
                          "destination" (
                            ssg_destination_nat_object
                          ),
                          "static" (
                            ssg_static_nat_object
                          ),
                          "proxy-arp" (
                            ssg_proxy_arp_object
                          ),
                          "proxy-ndp" (
                            ssg_proxy_ndp_object
                          ),
                          "natv6v4" (
                              c(
                                  "no-v6-frag-header"
                              )
                          )
                      )
                  ),
                  "forwarding-process",
                  "policies" (
                      c(
                          "traceoptions" (
                              c(
                                  "no-remote-trace",
                                  "file" (
                                      c(
                                          "filename" arg,
                                          "size" arg,
                                          "files" arg,
                                          "world-readable",
                                          "no-world-readable",
                                          "match" (
                                            regular_expression
                                          )
                                      )
                                  ).as(:oneline),
                                  "flag" ("configuration" | "routing-socket" | "compilation" | "ipc" | "rules" | "lookup" | "all").as(:oneline)
                              )
                          ),
                          "policy" (
                              s(
                                "from-zone-name" arg,
                                "to-zone-name" arg,
                                c(
                                  "policy" (
                                    policy_type
                                  )
                                )
                              )
                          ),
                          "global" (
                              c(
                                  "policy" (
                                    policy_type
                                  )
                              )
                          ),
                          "default-policy" (
                              c(
                                  c(
                                    "permit-all",
                                    "deny-all"
                                  )
                              )
                          ),
                          "policy-rematch",
                          "policy-stats" (
                              c(
                                  "system-wide" arg
                              )
                          )
                      )
                  ),
                  "resource-manager" (
                      c(
                          "traceoptions" (
                              c(
                                  "flag" ("client" | "group" | "resource" | "gate" | "session" | "chassis cluster" | "messaging" | "service pinhole" | "error" | "all") (
                                      c(
                                          c(
                                            "terse",
                                            "detail",
                                            "extensive"
                                          )
                                      )
                                  ).as(:oneline)
                              )
                          )
                      )
                  ),
                  "analysis" (
                      c(
                          "no-report"
                      )
                  ),
                  "traceoptions" (
                      c(
                          "no-remote-trace",
                          "file" (
                              c(
                                  "filename" arg,
                                  "size" arg,
                                  "files" arg,
                                  "world-readable",
                                  "no-world-readable",
                                  "match" (
                                    regular_expression
                                  )
                              )
                          ).as(:oneline),
                          "flag" ("configuration" | "routing-socket" | "compilation" | "all").as(:oneline),
                          "rate-limit" arg
                      )
                  ),
                  "datapath-debug",
                  "user-identification" (
                      c(
                          "traceoptions" (
                              c(
                                  "no-remote-trace",
                                  "file" (
                                      c(
                                          "filename" arg,
                                          "size" arg,
                                          "files" arg,
                                          "world-readable",
                                          "no-world-readable",
                                          "match" (
                                            regular_expression
                                          )
                                      )
                                  ).as(:oneline),
                                  "flag" ("all").as(:oneline)
                              )
                          ),
                          "authentication-source" (
                            authentication_source_type
                          )
                      )
                  ),
                  "zones" (
                      c(
                          "functional-zone" (
                              c(
                                  "management" (
                                      c(
                                          "interfaces" (
                                            zone_interface_list_type
                                          ),
                                          "screen" arg,
                                          "host-inbound-traffic" (
                                            zone_host_inbound_traffic_t
                                          ),
                                          "description" arg
                                      )
                                  )
                              )
                          ),
                          "security-zone" (
                            security_zone_type
                          )
                      )
                  )
              )
          ),
          "firewall" (
              c(
                  "family" (
                      c(
                          "inet" (
                              c(
                                  "dialer-filter" (
                                    inet_dialer_filter
                                  ),
                                  "prefix-action" (
                                    prefix_action
                                  ),
                                  "filter" (
                                    inet_filter
                                  ),
                                  "simple-filter" (
                                    inet_simple_filter
                                  ),
                                  "service-filter" (
                                    inet_service_filter
                                  ),
                                  "fast-update-filter" (
                                    inet_fuf
                                  )
                              )
                          ),
                          "inet6" (
                              c(
                                  "dialer-filter" (
                                    inet6_dialer_filter
                                  ),
                                  "filter" (
                                    inet6_filter
                                  ),
                                  "service-filter" (
                                    inet6_service_filter
                                  ),
                                  "fast-update-filter" (
                                    inet6_fuf
                                  )
                              )
                          ),
                          "mpls" (
                              c(
                                  "dialer-filter" (
                                    mpls_dialer_filter
                                  ),
                                  "filter" (
                                    mpls_filter
                                  )
                              )
                          ),
                          "vpls" (
                              c(
                                  "filter" (
                                    vpls_filter
                                  )
                              )
                          ),
                          "bridge" (
                              c(
                                  "filter" (
                                    bridge_filter
                                  )
                              )
                          ),
                          "ccc" (
                              c(
                                  "filter" (
                                    ccc_filter
                                  )
                              )
                          ),
                          "any" (
                              c(
                                  "filter" (
                                    any_filter
                                  )
                              )
                          ),
                          "ethernet-switching"
                      )
                  ),
                  "policer" (
                    firewall_policer
                  ),
                  "hierarchical-policer" (
                    firewall_hierpolicer
                  ),
                  "interface-set" (
                    interface_set_type
                  ),
                  "load-balance-group" (
                    firewall_load_balance_group
                  ),
                  "atm-policer" (
                    atm_policer_type
                  ),
                  "three-color-policer" (
                    three_color_policer_type
                  ),
                  "filter" (
                    inet_filter
                  )
              )
          ),
          "access" (
            juniper_access_options
          ),
          "routing-instances" (
              c(
                  "instance" (
                    juniper_routing_instance
                  )
              )
          ),
          "services" (
              c(
                  "mobile-ip" (
                    juniper_protocols_mobile_ipv4
                  ),
                  "captive-portal-content-delivery",
                  "dynamic-flow-capture",
                  "flow-tap",
                  "radius-flow-tap",
                  "flow-monitoring" (
                      c(
                          "version9" (
                              c(
                                  "template" (
                                    version9_template
                                  )
                              )
                          ),
                          "version-ipfix"
                      )
                  ),
                  "rpm" (
                      c(
                          "bgp" (
                              c(
                                  "probe-type" arg,
                                  "probe-count" arg,
                                  "probe-interval" arg,
                                  "test-interval" arg,
                                  "destination-port" arg,
                                  "history-size" arg,
                                  "moving-average-size" arg,
                                  "data-size" arg,
                                  "data-fill" arg,
                                  "logical-system" (
                                    bgp_logical_system
                                  ),
                                  "routing-instances" (
                                    bgp_routing_instances
                                  )
                              )
                          ),
                          "probe" arg (
                              c(
                                  "test" arg (
                                      c(
                                          "probe-type" arg,
                                          "target" (
                                              c(
                                                  c(
                                                    "address" (
                                                      ipv4addr
                                                    ),
                                                    "url" arg
                                                  )
                                              )
                                          ).as(:oneline),
                                          "probe-count" arg,
                                          "probe-interval" arg,
                                          "test-interval" arg,
                                          "destination-port" arg,
                                          "source-address" (
                                            ipv4addr
                                          ),
                                          "routing-instance" arg,
                                          "history-size" arg,
                                          "moving-average-size" arg,
                                          "dscp-code-points" arg,
                                          "data-size" arg,
                                          "data-fill" arg,
                                          "thresholds" (
                                              c(
                                                  "successive-loss" arg,
                                                  "total-loss" arg,
                                                  "rtt" arg,
                                                  "jitter-rtt" arg,
                                                  "std-dev-rtt" arg,
                                                  "egress-time" arg,
                                                  "ingress-time" arg,
                                                  "jitter-ingress" arg,
                                                  "jitter-egress" arg,
                                                  "std-dev-ingress" arg,
                                                  "std-dev-egress" arg
                                              )
                                          ),
                                          "traps" arg,
                                          "destination-interface" (
                                            interface_name
                                          ),
                                          "hardware-timestamp",
                                          "one-way-hardware-timestamp",
                                          "next-hop" (
                                            ipv4addr
                                          )
                                      )
                                  )
                              )
                          ),
                          "probe-server" (
                              c(
                                  "icmp" (
                                      c(
                                          "destination-interface" (
                                            interface_name
                                          )
                                      )
                                  ),
                                  "tcp" (
                                      c(
                                          "port" arg,
                                          "destination-interface" (
                                            interface_name
                                          )
                                      )
                                  ),
                                  "udp" (
                                      c(
                                          "port" arg,
                                          "destination-interface" (
                                            interface_name
                                          )
                                      )
                                  )
                              )
                          ),
                          "probe-limit" arg,
                          "twamp"
                      )
                  ),
                  "flow-collector",
                  "application-identification",
                  "ssl",
                  "stateful-firewall",
                  "softwire",
                  "aacl",
                  "ptsp",
                  "hcm",
                  "cos",
                  "pgcp",
                  "border-signaling-gateway",
                  "ids",
                  "nat" service_nat_object,
                  "l2tp",
                  "adaptive-services-pics",
                  "service-set" service_set_object,
                  "service-interface-pools" (
                      c(
                          "pool" (
                            service_interface_pool_object
                          )
                      )
                  ),
                  "service-device-pools" (
                      c(
                          "pool" (
                            service_device_pool_object
                          )
                      )
                  ),
                  "unified-access-control" (
                      c(
                          "infranet-controller" arg (
                              c(
                                  "address" (
                                    ipv4addr
                                  ),
                                  "port" arg,
                                  "interface" (
                                    interface_name
                                  ),
                                  "password" arg,
                                  "ca-profile" arg,
                                  "server-certificate-subject" arg
                              )
                          ),
                          "certificate-verification" arg,
                          "timeout" arg,
                          "interval" arg,
                          "timeout-action" arg,
                          "test-only-mode",
                          "traceoptions" (
                              c(
                                  "no-remote-trace",
                                  "file" (
                                      c(
                                          "filename" arg,
                                          "size" arg,
                                          "files" arg,
                                          "world-readable",
                                          "no-world-readable",
                                          "match" (
                                            regular_expression
                                          )
                                      )
                                  ).as(:oneline),
                                  "flag" ("all" | "ipc" | "config" | "connect").as(:oneline)
                              )
                          ),
                          "captive-portal" arg (
                              c(
                                  "redirect-traffic" arg,
                                  "redirect-url" arg
                              )
                          )
                      )
                  ),
                  "user-identification" (
                      c(
                          "active-directory-access" (
                              c(
                                  "traceoptions" (
                                      c(
                                          "no-remote-trace",
                                          "file" (
                                              c(
                                                  "filename" arg,
                                                  "size" arg,
                                                  "files" arg,
                                                  "world-readable",
                                                  "no-world-readable",
                                                  "match" (
                                                    regular_expression
                                                  )
                                              )
                                          ).as(:oneline),
                                          "level" arg,
                                          "flag" ("active-directory-authentication" | "configuration" | "db" | "ip-user-mapping" | "ip-user-probe" | "ipc" | "user-group-mapping" | "wmic" | "all").as(:oneline)
                                      )
                                  ),
                                  "domain" arg (
                                      c(
                                          "user" (
                                              c(
                                                  "user-name" arg,
                                                  "password" arg
                                              )
                                          ),
                                          "domain-controller" arg (
                                              c(
                                                  "address" (
                                                    ipaddr
                                                  )
                                              )
                                          ),
                                          "ip-user-mapping" (
                                              c(
                                                  "discovery-method" (
                                                      c(
                                                          "wmi" (
                                                              c(
                                                                  "event-log-scanning-interval" arg,
                                                                  "initial-event-log-timespan" arg
                                                              )
                                                          )
                                                      )
                                                  )
                                              )
                                          ),
                                          "user-group-mapping" (
                                            user_group_mapping_type
                                          )
                                      )
                                  ),
                                  "no-on-demand-probe",
                                  "authentication-entry-timeout" arg,
                                  "wmi-timeout" arg,
                                  "thread" arg,
                                  "event-log-identifier" arg,
                                  "logon-type" arg,
                                  "filter" (
                                      c(
                                          "include" arg.as(:oneline),
                                          "exclude" arg.as(:oneline)
                                      )
                                  )
                              )
                          )
                      )
                  ),
                  "ip-monitoring" (
                      c(
                          "policy" arg (
                              c(
                                  "no-preempt",
                                  "match" (
                                      c(
                                          "rpm-probe" arg
                                      )
                                  ),
                                  "then" (
                                    action_object_type
                                  )
                              )
                          ),
                          "traceoptions" (
                              c(
                                  "no-remote-trace",
                                  "file" (
                                      c(
                                          "filename" arg,
                                          "size" arg,
                                          "files" arg,
                                          "world-readable",
                                          "no-world-readable",
                                          "match" (
                                            regular_expression
                                          )
                                      )
                                  ).as(:oneline),
                                  "flag" ("debug" | "configuration" | "errors" | "memory" | "event" | "all").as(:oneline)
                              )
                          )
                      )
                  ),
                  "wireless-wan",
                  "captive-portal" (
                    juniper_services_captive_portal
                  )
              )
          ),
          "bridge-domains" (
              c(
                  "domain" (
                    juniper_bridge_domains
                  )
              )
          ),
          "fabric",
          "switch-options" (
            juniper_def_rtb_switch_options
          ),
          "access-profile" (
              c(
                  "access-profile-name" arg
              )
          ).as(:oneline),
          "multi-chassis",
          "jsrc" (
            jsrc_partition_definition
          ),
          "jsrc-partition".as(:oneline),
          "applications" (
              c(
                  "application" (
                    application_object
                  ),
                  "application-set" (
                    application_set_object
                  )
              )
          ),
          "schedulers" (
              c(
                  "scheduler" (
                    scheduler_object_type
                  )
              )
          ),
          "smtp" (
              c(
                  "primary-server" (
                      c(
                          "address" (
                            ipv4addr
                          ),
                          c(
                            "login" (
                              login_object
                            )
                          )
                      )
                  ),
                  "secondary-server" (
                      c(
                          "address" (
                            ipv4addr
                          ),
                          c(
                            "login" (
                              login_object
                            )
                          )
                      )
                  ),
                  "traceoptions" (
                      c(
                          "flag" ("IPC" | "protocol-exchange" | "configuration" | "send-request" | "all").as(:oneline)
                      )
                  )
              )
          ),
          "poe",
          "wlan",
          "ethernet-switching-options" (
            juniper_ethernet_options
          ),
          "vlans" (
              c(
                  "traceoptions" (
                      c(
                          "flag" ("all" | "kernel" | "change-events" | "kernel-detail" | "config-states") (
                              c(
                                  "disable"
                              )
                          ).as(:oneline)
                      )
                  ),
                  "vlan" (
                    vlan_type
                  )
              )
          ),
          "virtual-chassis" (
            c(
              "aliases" (
                "serial-number" arg (
                  "alias-name" arg
                )
              ),
              "auto-provisioned",
              "auto-sw-update" (
                arg (
                  "package-name" arg
                )
              ),
              "fast-failover" ("ge" | "vcp disable" | "xe"),
              "graceful-restart" (
                "disable"
              ),
              "id" arg,
              "mac-persistence-timer" (
                ("minutes" | "disable")
              ),
              "member" arg (
                c(
                  "location" arg,
                  "mastership-priority" arg,
                  "no-management-vlan",
                  "serial-number" arg,
                  "role" ("line-card" | "routing-engine")
                )
              ),
              "no-split-detection",
              "preprovisioned",
              "traceoptions" (
                c(
                  "file" (
                    c(
                      "files" arg,
                      "no-stamp",
                      "replace",
                      "size" arg,
                      "world-readable",
                      "no-world-readable",
                      arg
                    )
                  ),
                  "flag" ("detail" | "disable" | "receive" | "send")
                )
              ),
              "vc-port" (
                "lag-hash" ("packet-based" | "source-port-based")
              ),
              "vcp-no-hold-time"
            )
          )
      )
end

rule(:action_object_type) do
    c(
        "preferred-route" (
            c(
                "routing-instances" arg (
                    c(
                        "route" arg (
                            c(
                                "next-hop" (
                                  ipaddr_or_interface
                                ),
                                "metric" arg
                            )
                        )
                    )
                ),
                "route" arg (
                    c(
                        "next-hop" (
                          ipaddr_or_interface
                        ),
                        "preferred-metric" arg
                    )
                )
            )
        ),
        "interface" arg (
            c(
                c(
                  "enable",
                  "disable"
                )
            )
        )
    )
end

rule(:advisory_options_type) do
    c(
        "upstream-rate" arg,
        "downstream-rate" arg
    )
end

rule(:anti_spam_feature) do
    c(
        "address-whitelist" arg,
        "address-blacklist" arg,
        "traceoptions" (
          anti_spam_traceoptions
        ),
        "sbl" (
          sbl_type
        )
    )
end

rule(:anti_spam_traceoptions) do
    c(
        "flag" ("manager" | "sbl" | "all").as(:oneline)
    )
end

rule(:anti_virus_feature) do
    c(
        "mime-whitelist" (
            c(
                "list" arg,
                "exception" arg
            )
        ),
        "url-whitelist" arg,
        "type" arg,
        "traceoptions" (
          anti_virus_traceoptions
        ),
        "kaspersky-lab-engine",
        "juniper-express-engine",
        "sophos-engine" (
            c(
                "sxl-timeout" arg,
                "sxl-retry" arg,
                "pattern-update" (
                  anti_virus_pattern_update
                ),
                "profile" arg (
                    c(
                        "fallback-options" (
                          sophos_fallback_settings
                        ),
                        "scan-options" (
                          sophos_scan_options
                        ),
                        "trickling" (
                          anti_virus_trickling
                        ),
                        "notification-options" (
                          anti_virus_notification_options
                        )
                    )
                )
            )
        )
    )
end

rule(:anti_virus_notification_options) do
    c(
        "virus-detection" (
            c(
                "type" arg,
                "notify-mail-sender",
                "no-notify-mail-sender",
                "custom-message" arg,
                "custom-message-subject" arg
            )
        ),
        "fallback-block" (
            c(
                "type" arg,
                "notify-mail-sender",
                "no-notify-mail-sender",
                "custom-message" arg,
                "custom-message-subject" arg
            )
        ),
        "fallback-non-block" (
            c(
                "notify-mail-recipient",
                "no-notify-mail-recipient",
                "custom-message" arg,
                "custom-message-subject" arg
            )
        )
    )
end

rule(:anti_virus_pattern_update) do
    c(
        "email-notify" (
            c(
                "admin-email" arg,
                "custom-message" arg,
                "custom-message-subject" arg
            )
        ),
        "proxy" (
            c(
                "server" arg,
                "port" arg,
                "username" arg,
                "password" (
                  unreadable
                )
            )
        ),
        "url" arg,
        "interval" arg,
        "no-autoupdate"
    )
end

rule(:anti_virus_traceoptions) do
    c(
        "flag" ("basic" | "detail" | "engine" | "pattern" | "updater" | "manager" | "worker" | "sendmail" | "ipc" | "event" | "statistics" | "all").as(:oneline)
    )
end

rule(:anti_virus_trickling) do
    c(
        "timeout" arg
    ).as(:oneline)
end

rule(:any_filter) do
  arg.as(:arg) (
    c(
        "interface-specific",
        "term" arg (
            c(
                "from" (
                    c(
                        "interface" (
                          match_interface_object_oam
                        ),
                        "interface-set" (
                          match_interface_set_object
                        ),
                        c(
                          "packet-length" arg,
                          "packet-length-except" arg
                        ),
                        c(
                          "forwarding-class" arg,
                          "forwarding-class-except" arg
                        ),
                        c(
                          "loss-priority" (
                                ("low" | "high" | "medium-low" | "medium-high")
                          ),
                          "loss-priority-except" (
                                ("low" | "high" | "medium-low" | "medium-high")
                          )
                        )
                    )
                ),
                "then" (
                    c(
                        c(
                          "policer" arg,
                          "three-color-policer" (
                              c(
                                  c(
                                    "single-rate" arg,
                                    "two-rate" arg
                                  )
                              )
                          ),
                          "hierarchical-policer" arg
                        ),
                        "count" arg,
                        "loss-priority" arg,
                        "forwarding-class" arg,
                        c(
                          "accept",
                          "discard",
                          "next" arg
                        )
                    )
                )
            )
        )
    )
  )
end

rule(:application_object) do
  arg.as(:arg) (
    c(
        "application-protocol" arg,
        "protocol" arg,
        "source-port" arg,
        "destination-port" arg,
        "ether-type" arg,
        "snmp-command" arg,
        "icmp-type" arg,
        "icmp6-type" arg,
        "icmp-code" arg,
        "icmp6-code" arg,
        "ttl-threshold" arg,
        "rpc-program-number" arg,
        "uuid" arg,
        "inactivity-timeout" arg,
        "learn-sip-register",
        "sip-call-hold-timeout" arg,
        c(
          "do-not-translate-AAAA-query-to-A-query",
          "do-not-translate-A-query-to-AAAA-query"
        ),
        "description" arg,
        "term" (
          term_object
        )
    )
  )
end

rule(:application_set_object) do
  arg.as(:arg) (
    c(
        "description" arg,
        "application" arg,
        "application-set" arg
    )
  )
end

rule(:aps_type) do
    c(
        c(
          "working-circuit" arg,
          "protect-circuit" arg
        ),
        "annex-b",
        "wait-to-restore-time" arg,
        "preserve-interface",
        "neighbor" (
          ipv4addr
        ),
        "paired-group" arg,
        "authentication-key" (
            c(
                "auth_key" (
                  unreadable
                )
            )
        ).as(:oneline),
        "switching-mode" arg,
        "advertise-interval" arg,
        "hold-time" arg,
        "revert-time" arg,
        "break-before-make",
        "no-break-before-make",
        c(
          "request" arg,
          "force" arg,
          "lockout"
        )
    )
end

rule(:atm_policer_type) do
  arg.as(:arg) (
    c(
        "logical-interface-policer",
        "atm-service" arg,
        "peak-rate" arg,
        "sustained-rate" arg,
        "max-burst-size" arg,
        "cdvt" arg,
        "policing-action" arg
    )
  )
end

rule(:authentication_source_type) do
  ("local-authentication-table" | "unified-access-control" | "firewall-authentication" | "active-directory-authentication-table").as(:arg) (
    c(
        c(
          "priority" arg
        )
    )
  )
end

rule(:auto_configure_vlan_type) do
    c(
        "stacked-vlan-ranges" (
            c(
                "dynamic-profile" arg (
                    c(
                        "accept" (
                              ("inet" | "inet6" | "pppoe" | "dhcp-v4" | "dhcp-v6" | "any")
                        ),
                        "ranges" arg
                    )
                ),
                "override" (
                    c(
                        "outer-tag" arg (
                            c(
                                "inner-tag" arg,
                                "dynamic-profile" arg
                            )
                        )
                    )
                ),
                "authentication" (
                  auto_configure_authentication_type
                ),
                "access-profile" (
                    c(
                        "access-profile-name" arg
                    )
                ).as(:oneline)
            )
        ),
        "vlan-ranges" (
            c(
                "dynamic-profile" arg (
                    c(
                        "accept" (
                              ("inet" | "inet6" | "pppoe" | "dhcp-v4" | "dhcp-v6" | "any")
                        ),
                        "ranges" arg
                    )
                ),
                "override" (
                    c(
                        "tag" arg (
                            c(
                                "dynamic-profile" arg
                            )
                        )
                    )
                ),
                "authentication" (
                  auto_configure_authentication_type
                ),
                "access-profile" (
                    c(
                        "access-profile-name" arg
                    )
                ).as(:oneline)
            )
        ),
        "remove-when-no-subscribers"
    )
end

rule(:auto_configure_authentication_type) do
    c(
        "password" arg,
        "username-include" (
            c(
                "delimiter" arg,
                "domain-name" arg,
                "user-prefix" arg,
                "mac-address",
                "option-82",
                "circuit-type",
                "radius-realm" arg,
                "interface-name"
            )
        )
    )
end

rule(:bgp_logical_system) do
  arg.as(:arg) (
    c(
        "routing-instances" (
          bgp_routing_instances
        )
    )
  )
end

rule(:bgp_routing_instances) do
  arg.as(:arg)
end

rule(:bridge_filter) do
  arg.as(:arg) (
    c(
        "accounting-profile" arg,
        "interface-specific",
        "physical-interface-filter",
        "term" arg (
            c(
                "filter" arg,
                "from" (
                    c(
                        c(
                          "interface-group" arg,
                          "interface-group-except" arg
                        ),
                        c(
                          "ether-type" (
                                ("ipv4" | "ipv6" | "arp" | "appletalk" | "sna" | "aarp" | "ppp" | "mpls-unicast" | "mpls-multicast" | "pppoe-discovery" | "pppoe-session" | "oam" | "fcoe" | "fip" | "vlan" | arg)
                          ),
                          "ether-type-except" (
                                ("ipv4" | "ipv6" | "arp" | "appletalk" | "sna" | "aarp" | "ppp" | "mpls-unicast" | "mpls-multicast" | "pppoe-discovery" | "pppoe-session" | "oam" | "fcoe" | "fip" | "vlan" | arg)
                          )
                        ),
                        c(
                          "vlan-ether-type" (
                                ("ipv4" | "ipv6" | "arp" | "appletalk" | "sna" | "aarp" | "ppp" | "mpls-unicast" | "mpls-multicast" | "pppoe-discovery" | "pppoe-session" | "oam" | "fcoe" | "fip" | "vlan" | arg)
                          ),
                          "vlan-ether-type-except" (
                                ("ipv4" | "ipv6" | "arp" | "appletalk" | "sna" | "aarp" | "ppp" | "mpls-unicast" | "mpls-multicast" | "pppoe-discovery" | "pppoe-session" | "oam" | "fcoe" | "fip" | "vlan" | arg)
                          )
                        ),
                        "destination-mac-address" (
                          firewall_mac_addr_object
                        ),
                        "source-mac-address" (
                          firewall_mac_addr_object
                        ),
                        c(
                          "forwarding-class" arg,
                          "forwarding-class-except" arg
                        ),
                        c(
                          "loss-priority" (
                                ("low" | "high" | "medium-low" | "medium-high")
                          ),
                          "loss-priority-except" (
                                ("low" | "high" | "medium-low" | "medium-high")
                          )
                        ),
                        c(
                          "learn-vlan-id" arg,
                          "learn-vlan-id-except" arg
                        ),
                        c(
                          "learn-vlan-1p-priority" arg,
                          "learn-vlan-1p-priority-except" arg
                        ),
                        c(
                          "user-vlan-id" arg,
                          "user-vlan-id-except" arg
                        ),
                        c(
                          "user-vlan-1p-priority" arg,
                          "user-vlan-1p-priority-except" arg
                        ),
                        c(
                          "learn-vlan-dei" arg,
                          "learn-vlan-dei-except" arg
                        ),
                        c(
                          "traffic-type" (
                                ("broadcast" | "multicast" | "unknown-unicast" | "known-unicast")
                          ),
                          "traffic-type-except" (
                                ("broadcast" | "multicast" | "unknown-unicast" | "known-unicast")
                          )
                        ),
                        "ip-source-address" (
                          firewall_addr_object
                        ),
                        "ip-destination-address" (
                          firewall_addr_object
                        ),
                        "ip-address" (
                          firewall_addr_object
                        ),
                        c(
                          "ip-protocol" (
                                ("icmp" | "igmp" | "ipip" | "tcp" | "egp" | "udp" | "rsvp" | "gre" | "esp" | "ah" | "icmp6" | "ospf" | "pim" | "sctp" | "ipv6" | "dstopts" | "routing" | "fragment" | "no-next-header" | "hop-by-hop" | "vrrp" | arg)
                          ),
                          "ip-protocol-except" (
                                ("icmp" | "igmp" | "ipip" | "tcp" | "egp" | "udp" | "rsvp" | "gre" | "esp" | "ah" | "icmp6" | "ospf" | "pim" | "sctp" | "ipv6" | "dstopts" | "routing" | "fragment" | "no-next-header" | "hop-by-hop" | "vrrp" | arg)
                          )
                        ),
                        c(
                          "dscp" (
                                ("af11" | "af12" | "af13" | "af21" | "af22" | "af23" | "af31" | "af32" | "af33" | "af41" | "af42" | "af43" | "ef" | "cs0" | "cs1" | "cs2" | "cs3" | "cs4" | "cs5" | "cs6" | "cs7" | "be" | "range")
                          ),
                          "dscp-except" (
                                ("af11" | "af12" | "af13" | "af21" | "af22" | "af23" | "af31" | "af32" | "af33" | "af41" | "af42" | "af43" | "ef" | "cs0" | "cs1" | "cs2" | "cs3" | "cs4" | "cs5" | "cs6" | "cs7" | "be" | "range")
                          )
                        ),
                        c(
                          "ip-precedence" (
                                ("net-control" | "internet-control" | "critical-ecp" | "flash-override" | "flash" | "immediate" | "priority" | "routine" | "range")
                          ),
                          "ip-precedence-except" (
                                ("net-control" | "internet-control" | "critical-ecp" | "flash-override" | "flash" | "immediate" | "priority" | "routine" | "range")
                          )
                        ),
                        c(
                          "source-port" (
                                ("ftp-data" | "ftp" | "ssh" | "telnet" | "smtp" | "tacacs" | "tacacs-ds" | "domain" | "dhcp" | "bootps" | "bootpc" | "tftp" | "finger" | "http" | "kerberos-sec" | "pop3" | "sunrpc" | "ident" | "nntp" | "ntp" | "netbios-ns" | "netbios-dgm" | "netbios-ssn" | "imap" | "snmp" | "snmptrap" | "xdmcp" | "bgp" | "ldap" | "mobileip-agent" | "mobilip-mn" | "msdp" | "https" | "snpp" | "biff" | "exec" | "login" | "who" | "cmd" | "syslog" | "printer" | "talk" | "ntalk" | "rip" | "timed" | "klogin" | "kshell" | "ldp" | "krb-prop" | "krbupdate" | "kpasswd" | "socks" | "afs" | "pptp" | "radius" | "radacct" | "zephyr-srv" | "zephyr-clt" | "zephyr-hm" | "nfsd" | "eklogin" | "ekshell" | "rkinit" | "cvspserver" | arg)
                          ),
                          "source-port-except" (
                                ("ftp-data" | "ftp" | "ssh" | "telnet" | "smtp" | "tacacs" | "tacacs-ds" | "domain" | "dhcp" | "bootps" | "bootpc" | "tftp" | "finger" | "http" | "kerberos-sec" | "pop3" | "sunrpc" | "ident" | "nntp" | "ntp" | "netbios-ns" | "netbios-dgm" | "netbios-ssn" | "imap" | "snmp" | "snmptrap" | "xdmcp" | "bgp" | "ldap" | "mobileip-agent" | "mobilip-mn" | "msdp" | "https" | "snpp" | "biff" | "exec" | "login" | "who" | "cmd" | "syslog" | "printer" | "talk" | "ntalk" | "rip" | "timed" | "klogin" | "kshell" | "ldp" | "krb-prop" | "krbupdate" | "kpasswd" | "socks" | "afs" | "pptp" | "radius" | "radacct" | "zephyr-srv" | "zephyr-clt" | "zephyr-hm" | "nfsd" | "eklogin" | "ekshell" | "rkinit" | "cvspserver" | arg)
                          )
                        ),
                        c(
                          "destination-port" (
                                ("ftp-data" | "ftp" | "ssh" | "telnet" | "smtp" | "tacacs" | "tacacs-ds" | "domain" | "dhcp" | "bootps" | "bootpc" | "tftp" | "finger" | "http" | "kerberos-sec" | "pop3" | "sunrpc" | "ident" | "nntp" | "ntp" | "netbios-ns" | "netbios-dgm" | "netbios-ssn" | "imap" | "snmp" | "snmptrap" | "xdmcp" | "bgp" | "ldap" | "mobileip-agent" | "mobilip-mn" | "msdp" | "https" | "snpp" | "biff" | "exec" | "login" | "who" | "cmd" | "syslog" | "printer" | "talk" | "ntalk" | "rip" | "timed" | "klogin" | "kshell" | "ldp" | "krb-prop" | "krbupdate" | "kpasswd" | "socks" | "afs" | "pptp" | "radius" | "radacct" | "zephyr-srv" | "zephyr-clt" | "zephyr-hm" | "nfsd" | "eklogin" | "ekshell" | "rkinit" | "cvspserver" | arg)
                          ),
                          "destination-port-except" (
                                ("ftp-data" | "ftp" | "ssh" | "telnet" | "smtp" | "tacacs" | "tacacs-ds" | "domain" | "dhcp" | "bootps" | "bootpc" | "tftp" | "finger" | "http" | "kerberos-sec" | "pop3" | "sunrpc" | "ident" | "nntp" | "ntp" | "netbios-ns" | "netbios-dgm" | "netbios-ssn" | "imap" | "snmp" | "snmptrap" | "xdmcp" | "bgp" | "ldap" | "mobileip-agent" | "mobilip-mn" | "msdp" | "https" | "snpp" | "biff" | "exec" | "login" | "who" | "cmd" | "syslog" | "printer" | "talk" | "ntalk" | "rip" | "timed" | "klogin" | "kshell" | "ldp" | "krb-prop" | "krbupdate" | "kpasswd" | "socks" | "afs" | "pptp" | "radius" | "radacct" | "zephyr-srv" | "zephyr-clt" | "zephyr-hm" | "nfsd" | "eklogin" | "ekshell" | "rkinit" | "cvspserver" | arg)
                          )
                        ),
                        c(
                          "port" (
                                ("ftp-data" | "ftp" | "ssh" | "telnet" | "smtp" | "tacacs" | "tacacs-ds" | "domain" | "dhcp" | "bootps" | "bootpc" | "tftp" | "finger" | "http" | "kerberos-sec" | "pop3" | "sunrpc" | "ident" | "nntp" | "ntp" | "netbios-ns" | "netbios-dgm" | "netbios-ssn" | "imap" | "snmp" | "snmptrap" | "xdmcp" | "bgp" | "ldap" | "mobileip-agent" | "mobilip-mn" | "msdp" | "https" | "snpp" | "biff" | "exec" | "login" | "who" | "cmd" | "syslog" | "printer" | "talk" | "ntalk" | "rip" | "timed" | "klogin" | "kshell" | "ldp" | "krb-prop" | "krbupdate" | "kpasswd" | "socks" | "afs" | "pptp" | "radius" | "radacct" | "zephyr-srv" | "zephyr-clt" | "zephyr-hm" | "nfsd" | "eklogin" | "ekshell" | "rkinit" | "cvspserver" | arg)
                          ),
                          "port-except" (
                                ("ftp-data" | "ftp" | "ssh" | "telnet" | "smtp" | "tacacs" | "tacacs-ds" | "domain" | "dhcp" | "bootps" | "bootpc" | "tftp" | "finger" | "http" | "kerberos-sec" | "pop3" | "sunrpc" | "ident" | "nntp" | "ntp" | "netbios-ns" | "netbios-dgm" | "netbios-ssn" | "imap" | "snmp" | "snmptrap" | "xdmcp" | "bgp" | "ldap" | "mobileip-agent" | "mobilip-mn" | "msdp" | "https" | "snpp" | "biff" | "exec" | "login" | "who" | "cmd" | "syslog" | "printer" | "talk" | "ntalk" | "rip" | "timed" | "klogin" | "kshell" | "ldp" | "krb-prop" | "krbupdate" | "kpasswd" | "socks" | "afs" | "pptp" | "radius" | "radacct" | "zephyr-srv" | "zephyr-clt" | "zephyr-hm" | "nfsd" | "eklogin" | "ekshell" | "rkinit" | "cvspserver" | arg)
                          )
                        ),
                        "tcp-flags" arg,
                        c(
                          "icmp-type" (
                                ("echo-request" | "echo-reply" | "unreachable" | "source-quench" | "redirect" | "router-advertisement" | "router-solicit" | "time-exceeded" | "parameter-problem" | "timestamp" | "timestamp-reply" | "info-request" | "info-reply" | "mask-request" | "mask-reply" | arg)
                          ),
                          "icmp-type-except" (
                                ("echo-request" | "echo-reply" | "unreachable" | "source-quench" | "redirect" | "router-advertisement" | "router-solicit" | "time-exceeded" | "parameter-problem" | "timestamp" | "timestamp-reply" | "info-request" | "info-reply" | "mask-request" | "mask-reply" | arg)
                          )
                        ),
                        c(
                          "icmp-code" (
                                ("network-unreachable" | "host-unreachable" | "protocol-unreachable" | "port-unreachable" | "fragmentation-needed" | "source-route-failed" | "destination-network-unknown" | "destination-host-unknown" | "source-host-isolated" | "destination-network-prohibited" | "destination-host-prohibited" | "network-unreachable-for-tos" | "host-unreachable-for-tos" | "communication-prohibited-by-filtering" | "host-precedence-violation" | "precedence-cutoff-in-effect" | "redirect-for-network" | "redirect-for-host" | "redirect-for-tos-and-net" | "redirect-for-tos-and-host" | "ttl-eq-zero-during-transit" | "ttl-eq-zero-during-reassembly" | "ip-header-bad" | "required-option-missing" | arg)
                          ),
                          "icmp-code-except" (
                                ("network-unreachable" | "host-unreachable" | "protocol-unreachable" | "port-unreachable" | "fragmentation-needed" | "source-route-failed" | "destination-network-unknown" | "destination-host-unknown" | "source-host-isolated" | "destination-network-prohibited" | "destination-host-prohibited" | "network-unreachable-for-tos" | "host-unreachable-for-tos" | "communication-prohibited-by-filtering" | "host-precedence-violation" | "precedence-cutoff-in-effect" | "redirect-for-network" | "redirect-for-host" | "redirect-for-tos-and-net" | "redirect-for-tos-and-host" | "ttl-eq-zero-during-transit" | "ttl-eq-zero-during-reassembly" | "ip-header-bad" | "required-option-missing" | arg)
                          )
                        ),
                        "interface" (
                          match_interface_object
                        ),
                        "interface-set" (
                          match_interface_set_object
                        ),
                        "source-prefix-list" (
                          firewall_prefix_list
                        ),
                        "destination-prefix-list" (
                          firewall_prefix_list
                        ),
                        "prefix-list" (
                          firewall_prefix_list
                        ),
                        c(
                          "isid" arg,
                          "isid-except" arg
                        ),
                        c(
                          "isid-priority-code-point" arg,
                          "isid-priority-code-point-except" arg
                        ),
                        c(
                          "isid-dei" arg,
                          "isid-dei-except" arg
                        )
                    )
                ),
                "then" (
                    c(
                        c(
                          "policer" arg,
                          "three-color-policer" (
                              c(
                                  c(
                                    "single-rate" arg,
                                    "two-rate" arg
                                  )
                              )
                          ),
                          "hierarchical-policer" arg
                        ),
                        "count" arg,
                        "loss-priority" arg,
                        "forwarding-class" arg,
                        c(
                          "accept",
                          "discard",
                          "next" arg
                        ),
                        "port-mirror-instance" arg,
                        "port-mirror",
                        "next-hop-group" arg
                    )
                )
            )
        )
    )
  )
end

rule(:category_list_type) do
  arg.as(:arg) (
    c(
        "value" arg
    )
  )
end

rule(:ccc_filter) do
  arg.as(:arg) (
    c(
        "accounting-profile" arg,
        "interface-specific",
        "physical-interface-filter",
        "term" arg (
            c(
                "filter" arg,
                "from" (
                    c(
                        c(
                          "interface-group" arg,
                          "interface-group-except" arg
                        ),
                        c(
                          "forwarding-class" arg,
                          "forwarding-class-except" arg
                        ),
                        c(
                          "loss-priority" (
                                ("low" | "high" | "medium-low" | "medium-high")
                          ),
                          "loss-priority-except" (
                                ("low" | "high" | "medium-low" | "medium-high")
                          )
                        ),
                        c(
                          "learn-vlan-1p-priority" arg,
                          "learn-vlan-1p-priority-except" arg
                        ),
                        c(
                          "user-vlan-1p-priority" arg,
                          "user-vlan-1p-priority-except" arg
                        ),
                        "destination-mac-address" (
                          firewall_mac_addr_object
                        ),
                        "is-host-packet"
                    )
                ),
                "then" (
                    c(
                        c(
                          "policer" arg,
                          "three-color-policer" (
                              c(
                                  c(
                                    "single-rate" arg,
                                    "two-rate" arg
                                  )
                              )
                          ),
                          "hierarchical-policer" arg
                        ),
                        "count" arg,
                        "loss-priority" arg,
                        "forwarding-class" arg,
                        "port-mirror-instance" arg,
                        "next-hop-group" arg,
                        "port-mirror",
                        "packet-mode",
                        c(
                          "accept",
                          "discard",
                          "next" arg
                        )
                    )
                )
            )
        )
    )
  )
end

rule(:certificate_object) do
  arg.as(:arg) (
    c(
        "certificate" arg
    )
  )
end

rule(:chassis_type) do
    c(
        "nssu",
        "psu",
        "fpc-resync",
        "craft-lockout",
        "config-button" (
            c(
                "no-rescue",
                "no-clear"
            )
        ).as(:oneline),
        "packet-scheduling",
        "no-packet-scheduling",
        "policer-drop-probability-low",
        "memory-enhanced",
        "vrf-mtu-check",
        "maximum-ecmp" arg,
        "maximum-ecmp-32" arg,
        "redundancy" (
          chassis_redundancy_type
        ),
        "routing-engine" (
          chassis_routing_engine_type
        ),
        "aggregated-devices" (
          chassis_agg_dev_type
        ),
        "container-devices" (
          chassisd_agg_container_type
        ),
        "provider-instance-devices" (
          chassisd_provider_instance_type
        ),
        "fpc" (
          chassis_fpc_type
        ),
        "disable-power-management",
        "fpc-feb-connectivity",
        "ioc-npc-connectivity",
        "pem" (
          chassis_pem_type
        ),
        "sib" (
          chassis_sib_type
        ),
        "sfm" (
          chassis_sfm_type
        ),
        "feb" (
          chassis_feb_type
        ),
        "tfeb" (
          chassis_feb_type
        ),
        "alarm" (
          chassis_alarm_type
        ),
        "ppp-subscriber-services" arg,
        "network-services" arg,
        "usb",
        "node" arg (
            c(
                "fpc" (
                  chassis_fpc_type
                )
            )
        ),
        "lcc" arg (
            c(
                "fpc" (
                  chassis_fpc_type
                ),
                "pem" (
                  chassis_pem_type
                ),
                "spmb",
                c(
                  "online-expected",
                  "offline"
                )
            )
        ),
        "member",
        "fabric",
        "synchronization",
        "lcd-menu",
        "fru-poweron-sequence" arg,
        "auto-image-upgrade",
        "route-localization",
        "state",
        "multicast-loadbalance" (
          chassis_ae_lb_type
        ),
        "extended-statistics",
        "system-domains",
        "cluster" (
            c(
                "traceoptions" (
                    c(
                        "no-remote-trace",
                        "file" (
                            c(
                                "filename" arg,
                                "size" arg,
                                "files" arg,
                                "world-readable",
                                "no-world-readable",
                                "match" (
                                  regular_expression
                                )
                            )
                        ).as(:oneline),
                        "flag" ("cli" | "configuration" | "eventlib" | "fsm" | "heartbeat" | "interface" | "routing-socket" | "uspipc" | "init" | "socket" | "snmp" | "ip-monitoring" | "hw-monitoring" | "fabric-monitoring" | "schedule-monitoring" | "heartbeat-tlv" | "all").as(:oneline),
                        "level" arg
                    )
                ),
                "control-link-recovery",
                "reth-count" arg,
                "control-ports".as(:oneline),
                "heartbeat-interval" arg,
                "heartbeat-threshold" arg,
                "network-management",
                "redundancy-group" arg (
                    c(
                        "node" ("0" | "1") (
                            c(
                                "priority" arg
                            )
                        ).as(:oneline),
                        "preempt",
                        "gratuitous-arp-count" arg,
                        "hold-down-interval" arg,
                        "interface-monitor" arg (
                            c(
                                "weight" arg
                            )
                        ).as(:oneline),
                        "ip-monitoring" (
                            c(
                                "global-weight" arg,
                                "global-threshold" arg,
                                "retry-interval" arg,
                                "retry-count" arg,
                                "family" (
                                    c(
                                        "inet" (
                                            c(
                                                "address" (
                                                  ip_monitoring_address_type
                                                )
                                            )
                                        )
                                    )
                                )
                            )
                        )
                    )
                ),
                "configuration-synchronize" (
                    c(
                        "no-secondary-bootup-auto"
                    )
                )
            )
        ),
        "forwarding-options" (
          c(
            ("l2-profile-one" | "l2-profile-two" | "l2-profile-three" | "l3-profile") (
              c(
                "num-65-127-prefix" arg,
              )
            ),
            "lpm-profile" (
              c(
                "prefix-65-127-disable",
                "unicast-in-lpm"
              )
            )
          )
        )
    )
end

rule(:chassis_ae_lb_type) do
    c(
        "hash-mode" arg
    )
end

rule(:chassis_agg_dev_type) do
    c(
        "ethernet" (
          chassisd_agg_enet_type
        ),
        "sonet" (
          chassisd_agg_pos_type
        ),
        "maximum-links" arg
    )
end

rule(:chassis_alarm_type) do
    c(
        "management-ethernet" (
          chassis_alarm_ethernet_type
        ),
        "sonet" (
          chassis_alarm_sonet_type
        ),
        "t3" (
          chassis_alarm_ds3_type
        ),
        "ds1" (
          chassis_alarm_ds1_type
        ),
        "ethernet" (
          chassis_alarm_ethernet_type
        ),
        "integrated-services" (
          chassis_alarm_integrated_services_type
        ),
        "services" (
          chassis_alarm_services_type
        ),
        "serial" (
          chassis_alarm_serial_type
        ),
        "fibre-channel" (
          chassis_alarm_fibre_channel_type
        )
    )
end

rule(:chassis_alarm_ds1_type) do
    c(
        "ais" arg,
        "ylw" arg
    )
end

rule(:chassis_alarm_ds3_type) do
    c(
        "ais" arg,
        "exz" arg,
        "ferf" arg,
        "idle" arg,
        "lcv" arg,
        "lof" arg,
        "los" arg,
        "pll" arg,
        "ylw" arg
    )
end

rule(:chassis_alarm_ethernet_type) do
    c(
        "link-down" arg
    )
end

rule(:chassis_alarm_fibre_channel_type) do
    c(
        "link-down" arg
    )
end

rule(:chassis_alarm_integrated_services_type) do
    c(
        "failure" arg
    )
end

rule(:chassis_alarm_serial_type) do
    c(
        "loss-of-rx-clock" arg,
        "loss-of-tx-clock" arg,
        "dcd-absent" arg,
        "cts-absent" arg,
        "dsr-absent" arg,
        "tm-absent" arg
    )
end

rule(:chassis_alarm_services_type) do
    c(
        "pic-reset" arg,
        "pic-hold-reset" arg,
        "linkdown" arg,
        "rx-errors" arg,
        "tx-errors" arg,
        "sw-down" arg,
        "hw-down" arg
    )
end

rule(:chassis_alarm_sonet_type) do
    c(
        "lol" arg,
        "pll" arg,
        "lof" arg,
        "los" arg,
        "ais-l" arg,
        "ais-p" arg,
        "lop-p" arg,
        "ber-sd" arg,
        "ber-sf" arg,
        "rfi-l" arg,
        "rfi-p" arg,
        "uneq-p" arg,
        "locd" arg,
        "plm-p" arg
    )
end

rule(:chassis_feb_type) do
    c(
        "slot" arg (
          "sampling-instance" arg
        )
    )
end

rule(:chassis_fpc_type) do
  arg.as(:arg) (
    c(
        "error" ("fatal" | "major" | "minor") (
          c(
            "threshold" arg,
            "action" ("alarm" | "disable-pfe" | "offline-pic" | "log" | "get-state" | "offline" | "reset")
          )
        ),
        "sanity-poll",
        "pic" (
          chassis_pic_type
        ),
        "pfe" (
          chassis_pfe_type
        ),
        "power" arg,
        "route-localization" arg,
        "power-budget-priority" arg,
        c(
          "allow-sram-parity-errors"
        ),
        "offline",
        "offline-on-fabric-bandwidth-reduction",
        "port-mirror-instance",
        "sampling-instance" arg,
        "inline-services",
        "number-of-ports" arg
    )
  )
end

rule(:chassis_pem_type) do
    c(
        "minimum" arg,
        "feeds" arg
    )
end

rule(:chassis_pfe_type) do
  arg.as(:arg) (
    c(
        "tunnel-services"
    )
  )
end

rule(:chassis_pic_type) do
  arg.as(:arg) (
    c(
        "tunnel-port" (
          chassis_port_type
        ),
        "tunnel-services" (
          c(
            "bandwidth" ("1g" | "10g" | "20g" | "40g").as(:oneline),
            "tunnel-only"
          )
        ),
        "inline-services",
        c(
          "adaptive-services",
          "monitoring-services"
        ),
        "no-mcast-replication",
        "framing" arg,
        "synchronization",
        "recovered-clock",
        "vtmapping" arg,
        "no-concatenate",
        "no-multi-rate",
        "channelization",
        "linerate-mode",
        "no-pre-classifier",
        "aggregate-ports",
        "aggregated-devices",
        "sparse-dlcis",
        "q-pic-large-buffer" (
            c(
                c(
                  "small-scale",
                  "large-scale"
                )
            )
        ),
        "red-buffer-occupancy" (
            c(
                "weighted-averaged" (
                    c(
                        "instant-usage-weight-exponent" arg
                    )
                )
            )
        ),
        "traffic-manager" (
            c(
                "ingress-shaping-overhead" arg,
                "egress-shaping-overhead" arg,
                "mode" arg
            )
        ),
        "idle-cell-format" (
            c(
                "itu-t",
                "payload-pattern" arg
            )
        ),
        "atm-l2circuit-mode" (
            c(
                c(
                  "aal5",
                  "cell",
                  "trunk" (
                      c(
                          c(
                            "uni",
                            "nni"
                          )
                      )
                  )
                )
            )
        ),
        "atm-cell-relay-accumulation",
        "services-offload",
        "mlfr-uni-nni-bundles" arg,
        "ct3" (
            c(
                "port" (
                  ct3_port_type
                )
            )
        ),
        "ce1" (
            c(
                "e1" (
                  ce1_channel_type
                )
            )
        ),
        "max-queues-per-interface" arg,
        "shdsl" (
            c(
                "pic-mode" arg
            )
        ),
        "ethernet" (
            c(
                "pic-mode" arg
            )
        ),
        "tunnel-queuing",
        "port-mirror-instance" arg,
        "port" (
          chassis_pic_port_framing
        ),
        "fibre-channel" (
          chassis_fibre_channel_type
        ),
        "sfpplus",
        "hash-key",
        "ingress-policer-overhead" arg,
        "egress-policer-overhead" arg,
        "forwarding-mode"
    )
  )
end

rule(:ce1_channel_type) do
  arg.as(:arg) (
    c(
        "channel-group" arg (
            c(
                "timeslots" arg
            )
        ).as(:oneline)
    )
  )
end

rule(:chassis_fibre_channel_type) do
    c(
        "port",
        "port-range" (
            s(
              "port-range-low" arg,
              "port-range-high" arg
            )
        )
    )
end

rule(:chassis_pic_port_framing) do
  arg.as(:arg) (
    c(
        "framing" arg,
        "speed" arg,
        "channel-speed" ("10g" | "25g" | "50g" | "100g" | "disable-auto-speed-detection")
    )
  )
end

rule(:chassis_port_type) do
  arg.as(:arg) (
    c(
        "tunnel-services"
    )
  )
end

rule(:chassis_redundancy_type) do
    c(
        "routing-engine" (
          chassis_rdd_re_type
        ),
        "ssb" (
          chassis_rdd_id_type
        ),
        "cfeb" (
          chassis_rdd_cfeb_id_type
        ),
        "sfm" (
          chassis_rdd_sfm_id_type
        ),
        "failover" (
          chassis_rdd_failover_type
        ),
        "keepalive-time" arg,
        "graceful-switchover" (
          chassis_non_stop_forwarding_type
        ),
        "feb"
    )
end

rule(:chassis_non_stop_forwarding_type) do

end

rule(:chassis_rdd_cfeb_id_type) do
  arg.as(:arg) (
    c(
        c(
          "always",
          "preferred"
        )
    )
  ).as(:oneline)
end

rule(:chassis_rdd_failover_type) do
    c(
        "on-loss-of-keepalives",
        "on-disk-failure"
    )
end

rule(:chassis_rdd_id_type) do
  arg.as(:arg) (
    c(
        c(
          "always",
          "preferred"
        )
    )
  ).as(:oneline)
end

rule(:chassis_rdd_re_type) do
  arg.as(:arg) (
    c(
        c(
          "master",
          "backup",
          "disabled"
        )
    )
  ).as(:oneline)
end

rule(:chassis_rdd_sfm_id_type) do
  arg.as(:arg) (
    c(
        c(
          "always",
          "preferred"
        )
    )
  ).as(:oneline)
end

rule(:chassis_routing_engine_type) do
    c(
        "on-disk-failure" (
          chassis_re_on_disk_failure
        ),
        "control-interface",
        "bios",
        "usb-wwan"
    )
end

rule(:chassis_re_on_disk_failure) do
    c(
        c(
          "disk-failure-action" arg
        )
    ).as(:oneline)
end

rule(:chassis_sfm_type) do
  arg.as(:arg) (
    c(
        "power" arg
    )
  )
end

rule(:chassis_sib_type) do
    c(
        "minimum" arg,
        "power-off"
    )
end

rule(:chassisd_agg_container_type) do
    c(
        "device-count" arg
    )
end

rule(:chassisd_agg_enet_type) do
    c(
        "device-count" arg,
        "lacp" (
            c(
                "system-priority" arg,
                "link-protection" (
                    c(
                        "non-revertive"
                    )
                )
            )
        )
    )
end

rule(:chassisd_agg_pos_type) do
    c(
        "device-count" arg
    )
end

rule(:chassisd_provider_instance_type) do
    c(
        "device-count" arg
    )
end

rule(:client_address_object) do
  arg.as(:arg) (
    c(
        "restrict"
    )
  )
end

rule(:command_list_type) do
  arg.as(:arg) (
    c(
        "value" arg
    )
  )
end

rule(:content_filtering_feature) do
    c(
        "traceoptions" (
          content_filtering_traceoptions
        ),
        "profile" arg (
            c(
                "permit-command" arg,
                "block-command" arg,
                "block-extension" arg,
                "block-mime" (
                    c(
                        "list" arg,
                        "exception" arg
                    )
                ),
                "block-content-type" (
                    c(
                        "activex",
                        "java-applet",
                        "exe",
                        "zip",
                        "http-cookie"
                    )
                ),
                "notification-options" (
                    c(
                        "type" arg,
                        "notify-mail-sender",
                        "no-notify-mail-sender",
                        "custom-message" arg
                    )
                )
            )
        )
    )
end

rule(:content_filtering_traceoptions) do
    c(
        "flag" ("basic" | "detail" | "all").as(:oneline)
    )
end

rule(:cos_policer) do
  arg.as(:arg) (
    c(
        "premium" (
          ethernet_policer
        ),
        "aggregate" (
          ethernet_policer
        )
    )
  )
end

rule(:cos_policer_input_priority_map) do
    c(
        "ieee-802.1p" (
            c(
                "premium" arg
            )
        )
    )
end

rule(:cos_policer_output_priority_map) do
    c(
        "classifier" (
            c(
                "premium" (
                    c(
                        "forwarding-class" arg (
                            c(
                                "loss-priority" ("low" | "high").as(:oneline)
                            )
                        )
                    )
                )
            )
        )
    )
end

rule(:ct3_port_type) do
  arg.as(:arg) (
    c(
        "t1" (
          ct3_channel_type
        )
    )
  )
end

rule(:ct3_channel_type) do
  arg.as(:arg) (
    c(
        "channel-group" arg (
            c(
                "timeslots" arg
            )
        ).as(:oneline)
    )
  )
end

rule(:custom_attack_group_type) do
  arg.as(:arg) (
    c(
        "group-members" arg
    )
  )
end

rule(:custom_attack_type) do
  arg.as(:arg) (
    c(
        "recommended-action" arg,
        "severity" arg,
        "time-binding" (
            c(
                "count" arg,
                "scope" arg
            )
        ),
        "attack-type" (
            c(
                "signature" (
                    c(
                        "protocol-binding" (
                            c(
                                c(
                                  "tcp" (
                                      c(
                                          "minimum-port" (
                                            port_range
                                          )
                                      )
                                  ),
                                  "udp" (
                                      c(
                                          "minimum-port" (
                                            port_range
                                          )
                                      )
                                  ),
                                  "rpc" (
                                      c(
                                          "program-number" arg
                                      )
                                  ),
                                  "icmp",
                                  "icmpv6",
                                  "ip" (
                                      c(
                                          "protocol-number" arg
                                      )
                                  ),
                                  "ipv6" (
                                      c(
                                          "protocol-number" arg
                                      )
                                  ),
                                  "application" arg
                                )
                            )
                        ),
                        "context" arg,
                        "pattern" arg,
                        "regexp" arg,
                        "negate",
                        "direction" arg,
                        "shellcode" arg,
                        "protocol" (
                            c(
                                "ipv4" (
                                    c(
                                        "tos" (
                                            c(
                                                "match" arg,
                                                "value" arg
                                            )
                                        ),
                                        "total-length" (
                                            c(
                                                "match" arg,
                                                "value" arg
                                            )
                                        ),
                                        "identification" (
                                            c(
                                                "match" arg,
                                                "value" arg
                                            )
                                        ),
                                        "ip-flags" (
                                            c(
                                                "rb",
                                                "no-rb",
                                                "mf",
                                                "no-mf",
                                                "df",
                                                "no-df"
                                            )
                                        ).as(:oneline),
                                        "ttl" (
                                            c(
                                                "match" arg,
                                                "value" arg
                                            )
                                        ),
                                        "protocol" (
                                            c(
                                                "match" arg,
                                                "value" arg
                                            )
                                        ),
                                        "source" (
                                            c(
                                                "match" arg,
                                                "value" (
                                                  ipv4addr
                                                )
                                            )
                                        ),
                                        "destination" (
                                            c(
                                                "match" arg,
                                                "value" (
                                                  ipv4addr
                                                )
                                            )
                                        )
                                    )
                                ),
                                "ipv6" (
                                    c(
                                        "traffic-class" (
                                            c(
                                                "match" arg,
                                                "value" arg
                                            )
                                        ),
                                        "payload-length" (
                                            c(
                                                "match" arg,
                                                "value" arg
                                            )
                                        ),
                                        "flow-label" (
                                            c(
                                                "match" arg,
                                                "value" arg
                                            )
                                        ),
                                        "hop-limit" (
                                            c(
                                                "match" arg,
                                                "value" arg
                                            )
                                        ),
                                        "next-header" (
                                            c(
                                                "match" arg,
                                                "value" arg
                                            )
                                        ),
                                        "source" (
                                            c(
                                                "match" arg,
                                                "value" (
                                                  ipv6addr
                                                )
                                            )
                                        ),
                                        "destination" (
                                            c(
                                                "match" arg,
                                                "value" (
                                                  ipv6addr
                                                )
                                            )
                                        )
                                    )
                                ),
                                "tcp" (
                                    c(
                                        "source-port" (
                                            c(
                                                "match" arg,
                                                "value" arg
                                            )
                                        ),
                                        "destination-port" (
                                            c(
                                                "match" arg,
                                                "value" arg
                                            )
                                        ),
                                        "sequence-number" (
                                            c(
                                                "match" arg,
                                                "value" arg
                                            )
                                        ),
                                        "ack-number" (
                                            c(
                                                "match" arg,
                                                "value" arg
                                            )
                                        ),
                                        "header-length" (
                                            c(
                                                "match" arg,
                                                "value" arg
                                            )
                                        ),
                                        "window-size" (
                                            c(
                                                "match" arg,
                                                "value" arg
                                            )
                                        ),
                                        "urgent-pointer" (
                                            c(
                                                "match" arg,
                                                "value" arg
                                            )
                                        ),
                                        "tcp-flags" (
                                            c(
                                                "r1",
                                                "no-r1",
                                                "r2",
                                                "no-r2",
                                                "urg",
                                                "no-urg",
                                                "ack",
                                                "no-ack",
                                                "psh",
                                                "no-psh",
                                                "rst",
                                                "no-rst",
                                                "syn",
                                                "no-syn",
                                                "fin",
                                                "no-fin"
                                            )
                                        ).as(:oneline),
                                        "option" (
                                            c(
                                                "match" arg,
                                                "value" arg
                                            )
                                        ),
                                        "data-length" (
                                            c(
                                                "match" arg,
                                                "value" arg
                                            )
                                        ),
                                        "window-scale" (
                                            c(
                                                "match" arg,
                                                "value" arg
                                            )
                                        ),
                                        "mss" (
                                            c(
                                                "match" arg,
                                                "value" arg
                                            )
                                        )
                                    )
                                ),
                                "udp" (
                                    c(
                                        "source-port" (
                                            c(
                                                "match" arg,
                                                "value" arg
                                            )
                                        ),
                                        "destination-port" (
                                            c(
                                                "match" arg,
                                                "value" arg
                                            )
                                        ),
                                        "data-length" (
                                            c(
                                                "match" arg,
                                                "value" arg
                                            )
                                        )
                                    )
                                ),
                                "icmp" (
                                    c(
                                        "type" (
                                            c(
                                                "match" arg,
                                                "value" arg
                                            )
                                        ),
                                        "code" (
                                            c(
                                                "match" arg,
                                                "value" arg
                                            )
                                        ),
                                        "identification" (
                                            c(
                                                "match" arg,
                                                "value" arg
                                            )
                                        ),
                                        "sequence-number" (
                                            c(
                                                "match" arg,
                                                "value" arg
                                            )
                                        ),
                                        "data-length" (
                                            c(
                                                "match" arg,
                                                "value" arg
                                            )
                                        )
                                    )
                                ),
                                "icmpv6"
                            )
                        )
                    )
                ),
                "anomaly" (
                    c(
                        "service" arg,
                        "test" arg,
                        "direction" arg,
                        "shellcode" arg
                    )
                ),
                "chain" (
                    c(
                        "protocol-binding" (
                            c(
                                c(
                                  "tcp" (
                                      c(
                                          "minimum-port" (
                                            port_range
                                          )
                                      )
                                  ),
                                  "udp" (
                                      c(
                                          "minimum-port" (
                                            port_range
                                          )
                                      )
                                  ),
                                  "rpc" (
                                      c(
                                          "program-number" arg
                                      )
                                  ),
                                  "icmp",
                                  "icmpv6",
                                  "ip" (
                                      c(
                                          "protocol-number" arg
                                      )
                                  ),
                                  "ipv6" (
                                      c(
                                          "protocol-number" arg
                                      )
                                  ),
                                  "application" arg
                                )
                            )
                        ),
                        "scope" arg,
                        "order",
                        "reset",
                        "expression" arg,
                        "member" (
                          chain_member_type
                        )
                    )
                )
            )
        )
    )
  )
end

rule(:chain_member_type) do
  arg.as(:arg) (
    c(
        "attack-type" (
            c(
                "signature" (
                    c(
                        "context" arg,
                        "pattern" arg,
                        "regexp" arg,
                        "negate",
                        "direction" arg,
                        "shellcode" arg,
                        "protocol" (
                            c(
                                "ipv4" (
                                    c(
                                        "tos" (
                                            c(
                                                "match" arg,
                                                "value" arg
                                            )
                                        ),
                                        "total-length" (
                                            c(
                                                "match" arg,
                                                "value" arg
                                            )
                                        ),
                                        "identification" (
                                            c(
                                                "match" arg,
                                                "value" arg
                                            )
                                        ),
                                        "ip-flags" (
                                            c(
                                                "rb",
                                                "no-rb",
                                                "mf",
                                                "no-mf",
                                                "df",
                                                "no-df"
                                            )
                                        ).as(:oneline),
                                        "ttl" (
                                            c(
                                                "match" arg,
                                                "value" arg
                                            )
                                        ),
                                        "protocol" (
                                            c(
                                                "match" arg,
                                                "value" arg
                                            )
                                        ),
                                        "source" (
                                            c(
                                                "match" arg,
                                                "value" (
                                                  ipv4addr
                                                )
                                            )
                                        ),
                                        "destination" (
                                            c(
                                                "match" arg,
                                                "value" (
                                                  ipv4addr
                                                )
                                            )
                                        )
                                    )
                                ),
                                "ipv6" (
                                    c(
                                        "traffic-class" (
                                            c(
                                                "match" arg,
                                                "value" arg
                                            )
                                        ),
                                        "payload-length" (
                                            c(
                                                "match" arg,
                                                "value" arg
                                            )
                                        ),
                                        "flow-label" (
                                            c(
                                                "match" arg,
                                                "value" arg
                                            )
                                        ),
                                        "hop-limit" (
                                            c(
                                                "match" arg,
                                                "value" arg
                                            )
                                        ),
                                        "next-header" (
                                            c(
                                                "match" arg,
                                                "value" arg
                                            )
                                        ),
                                        "source" (
                                            c(
                                                "match" arg,
                                                "value" (
                                                  ipv6addr
                                                )
                                            )
                                        ),
                                        "destination" (
                                            c(
                                                "match" arg,
                                                "value" (
                                                  ipv6addr
                                                )
                                            )
                                        )
                                    )
                                ),
                                "tcp" (
                                    c(
                                        "source-port" (
                                            c(
                                                "match" arg,
                                                "value" arg
                                            )
                                        ),
                                        "destination-port" (
                                            c(
                                                "match" arg,
                                                "value" arg
                                            )
                                        ),
                                        "sequence-number" (
                                            c(
                                                "match" arg,
                                                "value" arg
                                            )
                                        ),
                                        "ack-number" (
                                            c(
                                                "match" arg,
                                                "value" arg
                                            )
                                        ),
                                        "header-length" (
                                            c(
                                                "match" arg,
                                                "value" arg
                                            )
                                        ),
                                        "window-size" (
                                            c(
                                                "match" arg,
                                                "value" arg
                                            )
                                        ),
                                        "urgent-pointer" (
                                            c(
                                                "match" arg,
                                                "value" arg
                                            )
                                        ),
                                        "tcp-flags" (
                                            c(
                                                "r1",
                                                "no-r1",
                                                "r2",
                                                "no-r2",
                                                "urg",
                                                "no-urg",
                                                "ack",
                                                "no-ack",
                                                "psh",
                                                "no-psh",
                                                "rst",
                                                "no-rst",
                                                "syn",
                                                "no-syn",
                                                "fin",
                                                "no-fin"
                                            )
                                        ).as(:oneline),
                                        "option" (
                                            c(
                                                "match" arg,
                                                "value" arg
                                            )
                                        ),
                                        "data-length" (
                                            c(
                                                "match" arg,
                                                "value" arg
                                            )
                                        ),
                                        "window-scale" (
                                            c(
                                                "match" arg,
                                                "value" arg
                                            )
                                        ),
                                        "mss" (
                                            c(
                                                "match" arg,
                                                "value" arg
                                            )
                                        )
                                    )
                                ),
                                "udp" (
                                    c(
                                        "source-port" (
                                            c(
                                                "match" arg,
                                                "value" arg
                                            )
                                        ),
                                        "destination-port" (
                                            c(
                                                "match" arg,
                                                "value" arg
                                            )
                                        ),
                                        "data-length" (
                                            c(
                                                "match" arg,
                                                "value" arg
                                            )
                                        )
                                    )
                                ),
                                "icmp" (
                                    c(
                                        "type" (
                                            c(
                                                "match" arg,
                                                "value" arg
                                            )
                                        ),
                                        "code" (
                                            c(
                                                "match" arg,
                                                "value" arg
                                            )
                                        ),
                                        "identification" (
                                            c(
                                                "match" arg,
                                                "value" arg
                                            )
                                        ),
                                        "sequence-number" (
                                            c(
                                                "match" arg,
                                                "value" arg
                                            )
                                        ),
                                        "data-length" (
                                            c(
                                                "match" arg,
                                                "value" arg
                                            )
                                        )
                                    )
                                ),
                                "icmpv6"
                            )
                        )
                    )
                ),
                "anomaly" (
                    c(
                        "test" arg,
                        "direction" arg,
                        "shellcode" arg
                    )
                )
            )
        )
    )
  )
end

rule(:dcd_rx_bucket_config) do
    c(
        "overflow" arg,
        "rate" arg,
        "threshold" arg
    )
end

rule(:dcd_shaping_config) do
    c(
        c(
          "cbr" (
              c(
                  "cbr-value" arg,
                  "cdvt" arg
              )
          ).as(:oneline),
          "vbr" (
              c(
                  "peak" arg,
                  "sustained" arg,
                  "burst" arg,
                  "cdvt" arg
              )
          ).as(:oneline),
          "rtvbr" (
              c(
                  "peak" arg,
                  "sustained" arg,
                  "burst" arg,
                  "cdvt" arg
              )
          ).as(:oneline)
        ),
        "queue-length" arg
    )
end

rule(:dcd_tx_bucket_config) do
    c(
        "overflow" arg,
        "rate" arg,
        "threshold" arg
    )
end

rule(:demux_options_type) do
    c(
        "underlying-interface" arg
    )
end

rule(:dhcp_client_type) do
    c(
        "client-identifier" (
            c(
                "user-id" (
                    c(
                        c(
                          "ascii" arg,
                          "hexadecimal" arg
                        )
                    )
                ).as(:oneline),
                "prefix" (
                    c(
                        "host-name",
                        "logical-system-name",
                        "routing-instance-name"
                    )
                ),
                "use-interface-description" arg
            )
        ).as(:oneline),
        "lease-time" arg,
        "retransmission-attempt" arg,
        "retransmission-interval" arg,
        "server-address" (
          ipv4addr
        ),
        "update-server",
        "vendor-id" arg
    )
end

rule(:dynamic_attack_group_type) do
  arg.as(:arg) (
    c(
        "filters" (
            c(
                "direction" (
                    c(
                        "expression" arg,
                        "values" arg
                    )
                ),
                "severity" (
                    c(
                        "values" arg
                    )
                ),
                "type" (
                    c(
                        "values" arg
                    )
                ),
                "recommended",
                "no-recommended",
                "performance" (
                    c(
                        "values" arg
                    )
                ),
                "category" (
                    c(
                        "values" arg
                    )
                ),
                "service" (
                    c(
                        "values" arg
                    )
                ),
                "false-positives" (
                    c(
                        "values" arg
                    )
                ),
                "products" (
                    c(
                        "values" arg
                    )
                )
            )
        )
    )
  )
end

rule(:dynamic_ifbw_parms_type) do
    c(
        "bandwidth" arg,
        "resource" arg,
        "latency" arg,
        "quality" arg,
        "data-rate" arg,
        "threshold" arg,
        "credit" (
            c(
                "interval" arg
            )
        )
    )
end

rule(:epd_threshold_config) do
    c(
        "epd-threshold-plp0" arg,
        "plp1" arg
    ).as(:oneline)
end

rule(:ethernet_switching_type) do
    c(
        "port-mode" ("access" | "trunk"),
        "interface-mode" ("access" | "trunk"),
        "reflective-relay",
        "vlan" (
            c(
                "members" ("all" | arg)
            )
        ),
        "native-vlan-id" arg,
        "filter" (
            c(
                "input" arg,
                "output" arg
            )
        ),
        "storm-control" (
          storm_control
        )
    )
end

rule(:ethernet_policer) do
    c(
        c(
          "bandwidth-limit" arg
        ),
        "burst-size-limit" arg
    )
end

rule(:extension_list_type) do
  arg.as(:arg) (
    c(
        "value" arg
    )
  )
end

rule(:fibre_channel_type) do
    c(
        "port-mode" arg,
        "no-npiv",
        "fc-fabric" (
            c(
                "members" arg
            )
        ),
        "native-fabric" arg
    )
end

rule(:firewall_addr_object) do
  arg.as(:arg) (
    c(
        "except"
    )
  ).as(:oneline)
end

rule(:firewall_hierpolicer) do
  arg.as(:arg) (
    c(
        c(
          "logical-interface-policer",
          "physical-interface-policer"
        ),
        "shared-bandwidth-policer",
        "filter-specific",
        "aggregate" (
          hierarchical_policer_aggregate_bucket
        ),
        "premium" (
          hierarchical_policer_premium_bucket
        )
    )
  )
end

rule(:firewall_load_balance_group) do
  arg.as(:arg) (
    c(
        "next-hop-group" arg
    )
  )
end

rule(:firewall_mac_addr_object) do
  arg.as(:arg) (
    c(
        "except"
    )
  ).as(:oneline)
end

rule(:firewall_policer) do
  arg.as(:arg) (
    c(
        "filter-specific",
        "logical-interface-policer",
        "physical-interface-policer",
        "logical-bandwidth-policer",
        "shared-bandwidth-policer",
        "if-exceeding" (
            c(
                c(
                  "bandwidth-limit" arg,
                  "bandwidth-percent" arg
                ),
                "burst-size-limit" arg
            )
        ),
        "then" (
            c(
                "discard",
                "loss-priority" arg,
                "forwarding-class" arg,
                "out-of-profile"
            )
        )
    )
  )
end

rule(:firewall_prefix_list) do
  arg.as(:arg) (
    c(
        "except"
    )
  ).as(:oneline)
end

rule(:flow_filter_type) do
  arg.as(:arg) (
    c(
        "protocol" arg,
        "source-prefix" (
          ipprefix
        ),
        "destination-prefix" (
          ipprefix
        ),
        "logical-system" arg,
        "source-port" arg,
        "destination-port" arg,
        "interface" (
          interface_name
        )
    )
  )
end

rule(:hierarchical_policer_aggregate_bucket) do
    c(
        "if-exceeding" (
            c(
                c(
                  "bandwidth-limit" arg
                ),
                "burst-size-limit" arg
            )
        ),
        "then" (
            c(
                c(
                  "discard",
                  "loss-priority" arg,
                  "forwarding-class" arg
                )
            )
        )
    )
end

rule(:hierarchical_policer_premium_bucket) do
    c(
        "if-exceeding" (
            c(
                c(
                  "bandwidth-limit" arg
                ),
                "burst-size-limit" arg
            )
        ),
        "then" (
            c(
                c(
                  "discard"
                )
            )
        )
    )
end

rule(:host_object) do
    c(
        "ipaddr" (
          ipaddr
        ),
        "port" arg
    )
end

rule(:idp_policy_type) do
  arg.as(:arg) (
    c(
        "rulebase-ips" (
            c(
                "rule" arg (
                    c(
                        "description" arg,
                        "match" (
                            c(
                                "from-zone" arg,
                                c(
                                  "source-address" arg,
                                  "source-except" arg,
                                  "source-prefix",
                                  "source-prefix-except"
                                ),
                                "to-zone" arg,
                                c(
                                  "destination-address" arg,
                                  "destination-except" arg,
                                  "destination-prefix",
                                  "destination-prefix-except"
                                ),
                                "application" arg,
                                "attacks" (
                                    c(
                                        "custom-attacks" arg,
                                        "custom-attack-groups" arg,
                                        "dynamic-attack-groups" arg,
                                        "predefined-attacks" arg,
                                        "predefined-attack-groups" arg
                                    )
                                )
                            )
                        ),
                        "then" (
                            c(
                                "action" (
                                    c(
                                        c(
                                          "no-action",
                                          "ignore-connection",
                                          "mark-diffserv" (
                                              c(
                                                  "codepoint" arg
                                              )
                                          ),
                                          "class-of-service",
                                          "drop-packet",
                                          "drop-connection",
                                          "close-client",
                                          "close-server",
                                          "close-client-and-server",
                                          "recommended"
                                        )
                                    )
                                ),
                                "ip-action" (
                                    c(
                                        c(
                                          "ip-notify",
                                          "ip-close",
                                          "ip-block"
                                        ),
                                        "target" arg,
                                        "log",
                                        "log-create",
                                        "timeout" arg,
                                        "refresh-timeout"
                                    )
                                ),
                                "notification" (
                                    c(
                                        "log-attacks" (
                                            c(
                                                "alert"
                                            )
                                        ),
                                        "packet-log" (
                                            c(
                                                "pre-attack" arg,
                                                "post-attack" arg,
                                                "post-attack-timeout" arg
                                            )
                                        )
                                    )
                                ),
                                "severity" arg
                            )
                        ),
                        "terminal"
                    )
                )
            )
        ),
        "rulebase-exempt" (
            c(
                "rule" arg (
                    c(
                        "description" arg,
                        "match" (
                            c(
                                "from-zone" arg,
                                c(
                                  "source-address" arg,
                                  "source-except" arg,
                                  "source-prefix",
                                  "source-prefix-except"
                                ),
                                "to-zone" arg,
                                c(
                                  "destination-address" arg,
                                  "destination-except" arg,
                                  "destination-prefix",
                                  "destination-prefix-except"
                                ),
                                "attacks" (
                                    c(
                                        "custom-attacks" arg,
                                        "custom-attack-groups" arg,
                                        "dynamic-attack-groups" arg,
                                        "predefined-attacks" arg,
                                        "predefined-attack-groups" arg
                                    )
                                )
                            )
                        )
                    )
                )
            )
        )
    )
  )
end

rule(:idpd_traceoptions_type) do
    c(
        "no-remote-trace",
        "file" (
            c(
                "filename" arg,
                "size" arg,
                "files" arg,
                "world-readable",
                "no-world-readable",
                "match" (
                  regular_expression
                )
            )
        ).as(:oneline),
        "flag" ("all").as(:oneline),
        "level" arg
    )
end

rule(:ids_option_type) do
  arg.as(:arg) (
    c(
        "description" arg,
        "alarm-without-drop",
        "icmp" (
            c(
                "ip-sweep" (
                    c(
                        "threshold" arg
                    )
                ).as(:oneline),
                "fragment",
                "large",
                "flood" (
                    c(
                        "threshold" arg
                    )
                ).as(:oneline),
                "ping-death",
                "icmpv6-malformed"
            )
        ),
        "ip" (
            c(
                "bad-option",
                "record-route-option",
                "timestamp-option",
                "security-option",
                "stream-option",
                "spoofing",
                "source-route-option",
                "loose-source-route-option",
                "strict-source-route-option",
                "unknown-protocol",
                "block-frag",
                "tear-drop",
                "ipv6-extension-header" (
                    c(
                        "hop-by-hop-header" (
                            c(
                                "jumbo-payload-option",
                                "router-alert-option",
                                "quick-start-option",
                                "CALIPSO-option",
                                "SMF-DPD-option",
                                "RPL-option",
                                "user-defined-option-type" arg (
                                    c(
                                        "to" (
                                            c(
                                                "type-high" arg
                                            )
                                        )
                                    )
                                ).as(:oneline)
                            )
                        ),
                        "routing-header",
                        "fragment-header",
                        "ESP-header",
                        "AH-header",
                        "no-next-header",
                        "destination-header" (
                            c(
                                "tunnel-encapsulation-limit-option",
                                "home-address-option",
                                "ILNP-nonce-option",
                                "line-identification-option",
                                "user-defined-option-type" arg (
                                    c(
                                        "to" (
                                            c(
                                                "type-high" arg
                                            )
                                        )
                                    )
                                ).as(:oneline)
                            )
                        ),
                        "shim6-header",
                        "mobility-header",
                        "HIP-header",
                        "user-defined-header-type" arg (
                            c(
                                "to" (
                                    c(
                                        "type-high" arg
                                    )
                                )
                            )
                        ).as(:oneline)
                    )
                ),
                "ipv6-extension-header-limit" arg,
                "ipv6-malformed-header"
            )
        ),
        "tcp" (
            c(
                "syn-fin",
                "fin-no-ack",
                "tcp-no-flag",
                "syn-frag",
                "port-scan" (
                    c(
                        "threshold" arg
                    )
                ).as(:oneline),
                "syn-ack-ack-proxy" (
                    c(
                        "threshold" arg
                    )
                ).as(:oneline),
                "syn-flood" (
                    c(
                        "alarm-threshold" arg,
                        "attack-threshold" arg,
                        "source-threshold" arg,
                        "destination-threshold" arg,
                        "timeout" arg,
                        "white-list" arg (
                            c(
                                "source-address" (
                                  ipprefix
                                ),
                                "destination-address" (
                                  ipprefix
                                )
                            )
                        )
                    )
                ),
                "land",
                "winnuke",
                "tcp-sweep" (
                    c(
                        "threshold" arg
                    )
                ).as(:oneline)
            )
        ),
        "udp" (
            c(
                "flood" (
                    c(
                        "threshold" arg
                    )
                ).as(:oneline),
                "udp-sweep" (
                    c(
                        "threshold" arg
                    )
                ).as(:oneline),
                "port-scan" (
                    c(
                        "threshold" arg
                    )
                ).as(:oneline)
            )
        ),
        "limit-session" (
            c(
                "source-ip-based" arg,
                "destination-ip-based" arg
            )
        )
    )
  )
end

rule(:inet6_dialer_filter) do
  arg.as(:arg) (
    c(
        "accounting-profile" arg,
        "term" arg (
            c(
                "from" (
                    c(
                        "source-address" (
                          firewall_addr6_object
                        ),
                        "destination-address" (
                          firewall_addr6_object
                        ),
                        "address" (
                          firewall_addr6_object
                        ),
                        "source-prefix-list" (
                          firewall_prefix_list
                        ),
                        "destination-prefix-list" (
                          firewall_prefix_list
                        ),
                        "prefix-list" (
                          firewall_prefix_list
                        ),
                        c(
                          "packet-length" arg,
                          "packet-length-except" arg
                        ),
                        c(
                          "next-header" (
                                ("icmp" | "igmp" | "ipip" | "tcp" | "egp" | "udp" | "rsvp" | "gre" | "esp" | "ah" | "icmp6" | "ospf" | "pim" | "sctp" | "ipv6" | "dstopts" | "routing" | "fragment" | "no-next-header" | "hop-by-hop" | "vrrp" | arg)
                          ),
                          "next-header-except" (
                                ("icmp" | "igmp" | "ipip" | "tcp" | "egp" | "udp" | "rsvp" | "gre" | "esp" | "ah" | "icmp6" | "ospf" | "pim" | "sctp" | "ipv6" | "dstopts" | "routing" | "fragment" | "no-next-header" | "hop-by-hop" | "vrrp" | arg)
                          )
                        ),
                        c(
                          "icmp-type" (
                                ("destination-unreachable" | "packet-too-big" | "time-exceeded" | "parameter-problem" | "echo-request" | "echo-reply" | "membership-query" | "membership-report" | "membership-termination" | "router-solicit" | "router-advertisement" | "redirect" | "neighbor-solicit" | "neighbor-advertisement" | "router-renumbering" | "node-information-request" | "node-information-reply" | "range")
                          ),
                          "icmp-type-except" (
                                ("destination-unreachable" | "packet-too-big" | "time-exceeded" | "parameter-problem" | "echo-request" | "echo-reply" | "membership-query" | "membership-report" | "membership-termination" | "router-solicit" | "router-advertisement" | "redirect" | "neighbor-solicit" | "neighbor-advertisement" | "router-renumbering" | "node-information-request" | "node-information-reply" | "range")
                          )
                        ),
                        c(
                          "icmp-code" (
                                ("no-route-to-destination" | "administratively-prohibited" | "address-unreachable" | "port-unreachable" | "ttl-eq-zero-during-transit" | "ttl-eq-zero-during-reassembly" | "ip6-header-bad" | "unrecognized-next-header" | "unrecognized-option" | "range")
                          ),
                          "icmp-code-except" (
                                ("no-route-to-destination" | "administratively-prohibited" | "address-unreachable" | "port-unreachable" | "ttl-eq-zero-during-transit" | "ttl-eq-zero-during-reassembly" | "ip6-header-bad" | "unrecognized-next-header" | "unrecognized-option" | "range")
                          )
                        ),
                        c(
                          "source-port" (
                                ("ftp-data" | "ftp" | "ssh" | "telnet" | "smtp" | "tacacs" | "tacacs-ds" | "domain" | "dhcp" | "bootps" | "bootpc" | "tftp" | "finger" | "http" | "kerberos-sec" | "pop3" | "sunrpc" | "ident" | "nntp" | "ntp" | "netbios-ns" | "netbios-dgm" | "netbios-ssn" | "imap" | "snmp" | "snmptrap" | "xdmcp" | "bgp" | "ldap" | "mobileip-agent" | "mobilip-mn" | "msdp" | "https" | "snpp" | "biff" | "exec" | "login" | "who" | "cmd" | "syslog" | "printer" | "talk" | "ntalk" | "rip" | "timed" | "klogin" | "kshell" | "ldp" | "krb-prop" | "krbupdate" | "kpasswd" | "socks" | "afs" | "pptp" | "radius" | "radacct" | "zephyr-srv" | "zephyr-clt" | "zephyr-hm" | "nfsd" | "eklogin" | "ekshell" | "rkinit" | "cvspserver" | arg)
                          ),
                          "source-port-except" (
                                ("ftp-data" | "ftp" | "ssh" | "telnet" | "smtp" | "tacacs" | "tacacs-ds" | "domain" | "dhcp" | "bootps" | "bootpc" | "tftp" | "finger" | "http" | "kerberos-sec" | "pop3" | "sunrpc" | "ident" | "nntp" | "ntp" | "netbios-ns" | "netbios-dgm" | "netbios-ssn" | "imap" | "snmp" | "snmptrap" | "xdmcp" | "bgp" | "ldap" | "mobileip-agent" | "mobilip-mn" | "msdp" | "https" | "snpp" | "biff" | "exec" | "login" | "who" | "cmd" | "syslog" | "printer" | "talk" | "ntalk" | "rip" | "timed" | "klogin" | "kshell" | "ldp" | "krb-prop" | "krbupdate" | "kpasswd" | "socks" | "afs" | "pptp" | "radius" | "radacct" | "zephyr-srv" | "zephyr-clt" | "zephyr-hm" | "nfsd" | "eklogin" | "ekshell" | "rkinit" | "cvspserver" | arg)
                          )
                        ),
                        c(
                          "destination-port" (
                                ("ftp-data" | "ftp" | "ssh" | "telnet" | "smtp" | "tacacs" | "tacacs-ds" | "domain" | "dhcp" | "bootps" | "bootpc" | "tftp" | "finger" | "http" | "kerberos-sec" | "pop3" | "sunrpc" | "ident" | "nntp" | "ntp" | "netbios-ns" | "netbios-dgm" | "netbios-ssn" | "imap" | "snmp" | "snmptrap" | "xdmcp" | "bgp" | "ldap" | "mobileip-agent" | "mobilip-mn" | "msdp" | "https" | "snpp" | "biff" | "exec" | "login" | "who" | "cmd" | "syslog" | "printer" | "talk" | "ntalk" | "rip" | "timed" | "klogin" | "kshell" | "ldp" | "krb-prop" | "krbupdate" | "kpasswd" | "socks" | "afs" | "pptp" | "radius" | "radacct" | "zephyr-srv" | "zephyr-clt" | "zephyr-hm" | "nfsd" | "eklogin" | "ekshell" | "rkinit" | "cvspserver" | arg)
                          ),
                          "destination-port-except" (
                                ("ftp-data" | "ftp" | "ssh" | "telnet" | "smtp" | "tacacs" | "tacacs-ds" | "domain" | "dhcp" | "bootps" | "bootpc" | "tftp" | "finger" | "http" | "kerberos-sec" | "pop3" | "sunrpc" | "ident" | "nntp" | "ntp" | "netbios-ns" | "netbios-dgm" | "netbios-ssn" | "imap" | "snmp" | "snmptrap" | "xdmcp" | "bgp" | "ldap" | "mobileip-agent" | "mobilip-mn" | "msdp" | "https" | "snpp" | "biff" | "exec" | "login" | "who" | "cmd" | "syslog" | "printer" | "talk" | "ntalk" | "rip" | "timed" | "klogin" | "kshell" | "ldp" | "krb-prop" | "krbupdate" | "kpasswd" | "socks" | "afs" | "pptp" | "radius" | "radacct" | "zephyr-srv" | "zephyr-clt" | "zephyr-hm" | "nfsd" | "eklogin" | "ekshell" | "rkinit" | "cvspserver" | arg)
                          )
                        ),
                        c(
                          "port" (
                                ("ftp-data" | "ftp" | "ssh" | "telnet" | "smtp" | "tacacs" | "tacacs-ds" | "domain" | "dhcp" | "bootps" | "bootpc" | "tftp" | "finger" | "http" | "kerberos-sec" | "pop3" | "sunrpc" | "ident" | "nntp" | "ntp" | "netbios-ns" | "netbios-dgm" | "netbios-ssn" | "imap" | "snmp" | "snmptrap" | "xdmcp" | "bgp" | "ldap" | "mobileip-agent" | "mobilip-mn" | "msdp" | "https" | "snpp" | "biff" | "exec" | "login" | "who" | "cmd" | "syslog" | "printer" | "talk" | "ntalk" | "rip" | "timed" | "klogin" | "kshell" | "ldp" | "krb-prop" | "krbupdate" | "kpasswd" | "socks" | "afs" | "pptp" | "radius" | "radacct" | "zephyr-srv" | "zephyr-clt" | "zephyr-hm" | "nfsd" | "eklogin" | "ekshell" | "rkinit" | "cvspserver" | arg)
                          ),
                          "port-except" (
                                ("ftp-data" | "ftp" | "ssh" | "telnet" | "smtp" | "tacacs" | "tacacs-ds" | "domain" | "dhcp" | "bootps" | "bootpc" | "tftp" | "finger" | "http" | "kerberos-sec" | "pop3" | "sunrpc" | "ident" | "nntp" | "ntp" | "netbios-ns" | "netbios-dgm" | "netbios-ssn" | "imap" | "snmp" | "snmptrap" | "xdmcp" | "bgp" | "ldap" | "mobileip-agent" | "mobilip-mn" | "msdp" | "https" | "snpp" | "biff" | "exec" | "login" | "who" | "cmd" | "syslog" | "printer" | "talk" | "ntalk" | "rip" | "timed" | "klogin" | "kshell" | "ldp" | "krb-prop" | "krbupdate" | "kpasswd" | "socks" | "afs" | "pptp" | "radius" | "radacct" | "zephyr-srv" | "zephyr-clt" | "zephyr-hm" | "nfsd" | "eklogin" | "ekshell" | "rkinit" | "cvspserver" | arg)
                          )
                        )
                    )
                ),
                "then" (
                    c(
                        "log",
                        "syslog",
                        "sample",
                        c(
                          "note",
                          "ignore"
                        )
                    )
                )
            )
        )
    )
  )
end

rule(:firewall_addr6_object) do
  arg.as(:arg) (
    c(
        "except"
    )
  ).as(:oneline)
end

rule(:inet6_filter) do
  arg.as(:arg) (
    c(
        "accounting-profile" arg,
        "interface-specific",
        "enhanced-mode",
        "physical-interface-filter",
        "term" arg (
            c(
                "filter" arg,
                "from" (
                    c(
                        c(
                          "destination-class" arg,
                          "destination-class-except" arg,
                          "source-class" arg,
                          "source-class-except" arg
                        ),
                        c(
                          "interface-group" arg,
                          "interface-group-except" arg
                        ),
                        "source-address" (
                          firewall_addr6_object
                        ),
                        "destination-address" (
                          firewall_addr6_object
                        ),
                        "address" (
                          firewall_addr6_object
                        ),
                        "source-prefix-list" (
                          firewall_prefix_list
                        ),
                        "destination-prefix-list" (
                          firewall_prefix_list
                        ),
                        "prefix-list" (
                          firewall_prefix_list
                        ),
                        c(
                          "next-header" (
                                ("icmp" | "igmp" | "ipip" | "tcp" | "egp" | "udp" | "rsvp" | "gre" | "esp" | "ah" | "icmp6" | "ospf" | "pim" | "sctp" | "ipv6" | "dstopts" | "routing" | "fragment" | "no-next-header" | "hop-by-hop" | "vrrp" | arg)
                          ),
                          "next-header-except" (
                                ("icmp" | "igmp" | "ipip" | "tcp" | "egp" | "udp" | "rsvp" | "gre" | "esp" | "ah" | "icmp6" | "ospf" | "pim" | "sctp" | "ipv6" | "dstopts" | "routing" | "fragment" | "no-next-header" | "hop-by-hop" | "vrrp" | arg)
                          )
                        ),
                        c(
                          "source-port" (
                                ("ftp-data" | "ftp" | "ssh" | "telnet" | "smtp" | "tacacs" | "tacacs-ds" | "domain" | "dhcp" | "bootps" | "bootpc" | "tftp" | "finger" | "http" | "kerberos-sec" | "pop3" | "sunrpc" | "ident" | "nntp" | "ntp" | "netbios-ns" | "netbios-dgm" | "netbios-ssn" | "imap" | "snmp" | "snmptrap" | "xdmcp" | "bgp" | "ldap" | "mobileip-agent" | "mobilip-mn" | "msdp" | "https" | "snpp" | "biff" | "exec" | "login" | "who" | "cmd" | "syslog" | "printer" | "talk" | "ntalk" | "rip" | "timed" | "klogin" | "kshell" | "ldp" | "krb-prop" | "krbupdate" | "kpasswd" | "socks" | "afs" | "pptp" | "radius" | "radacct" | "zephyr-srv" | "zephyr-clt" | "zephyr-hm" | "nfsd" | "eklogin" | "ekshell" | "rkinit" | "cvspserver" | arg)
                          ),
                          "source-port-except" (
                                ("ftp-data" | "ftp" | "ssh" | "telnet" | "smtp" | "tacacs" | "tacacs-ds" | "domain" | "dhcp" | "bootps" | "bootpc" | "tftp" | "finger" | "http" | "kerberos-sec" | "pop3" | "sunrpc" | "ident" | "nntp" | "ntp" | "netbios-ns" | "netbios-dgm" | "netbios-ssn" | "imap" | "snmp" | "snmptrap" | "xdmcp" | "bgp" | "ldap" | "mobileip-agent" | "mobilip-mn" | "msdp" | "https" | "snpp" | "biff" | "exec" | "login" | "who" | "cmd" | "syslog" | "printer" | "talk" | "ntalk" | "rip" | "timed" | "klogin" | "kshell" | "ldp" | "krb-prop" | "krbupdate" | "kpasswd" | "socks" | "afs" | "pptp" | "radius" | "radacct" | "zephyr-srv" | "zephyr-clt" | "zephyr-hm" | "nfsd" | "eklogin" | "ekshell" | "rkinit" | "cvspserver" | arg)
                          )
                        ),
                        c(
                          "destination-port" (
                                ("ftp-data" | "ftp" | "ssh" | "telnet" | "smtp" | "tacacs" | "tacacs-ds" | "domain" | "dhcp" | "bootps" | "bootpc" | "tftp" | "finger" | "http" | "kerberos-sec" | "pop3" | "sunrpc" | "ident" | "nntp" | "ntp" | "netbios-ns" | "netbios-dgm" | "netbios-ssn" | "imap" | "snmp" | "snmptrap" | "xdmcp" | "bgp" | "ldap" | "mobileip-agent" | "mobilip-mn" | "msdp" | "https" | "snpp" | "biff" | "exec" | "login" | "who" | "cmd" | "syslog" | "printer" | "talk" | "ntalk" | "rip" | "timed" | "klogin" | "kshell" | "ldp" | "krb-prop" | "krbupdate" | "kpasswd" | "socks" | "afs" | "pptp" | "radius" | "radacct" | "zephyr-srv" | "zephyr-clt" | "zephyr-hm" | "nfsd" | "eklogin" | "ekshell" | "rkinit" | "cvspserver" | arg)
                          ),
                          "destination-port-except" (
                                ("ftp-data" | "ftp" | "ssh" | "telnet" | "smtp" | "tacacs" | "tacacs-ds" | "domain" | "dhcp" | "bootps" | "bootpc" | "tftp" | "finger" | "http" | "kerberos-sec" | "pop3" | "sunrpc" | "ident" | "nntp" | "ntp" | "netbios-ns" | "netbios-dgm" | "netbios-ssn" | "imap" | "snmp" | "snmptrap" | "xdmcp" | "bgp" | "ldap" | "mobileip-agent" | "mobilip-mn" | "msdp" | "https" | "snpp" | "biff" | "exec" | "login" | "who" | "cmd" | "syslog" | "printer" | "talk" | "ntalk" | "rip" | "timed" | "klogin" | "kshell" | "ldp" | "krb-prop" | "krbupdate" | "kpasswd" | "socks" | "afs" | "pptp" | "radius" | "radacct" | "zephyr-srv" | "zephyr-clt" | "zephyr-hm" | "nfsd" | "eklogin" | "ekshell" | "rkinit" | "cvspserver" | arg)
                          )
                        ),
                        c(
                          "port" (
                                ("ftp-data" | "ftp" | "ssh" | "telnet" | "smtp" | "tacacs" | "tacacs-ds" | "domain" | "dhcp" | "bootps" | "bootpc" | "tftp" | "finger" | "http" | "kerberos-sec" | "pop3" | "sunrpc" | "ident" | "nntp" | "ntp" | "netbios-ns" | "netbios-dgm" | "netbios-ssn" | "imap" | "snmp" | "snmptrap" | "xdmcp" | "bgp" | "ldap" | "mobileip-agent" | "mobilip-mn" | "msdp" | "https" | "snpp" | "biff" | "exec" | "login" | "who" | "cmd" | "syslog" | "printer" | "talk" | "ntalk" | "rip" | "timed" | "klogin" | "kshell" | "ldp" | "krb-prop" | "krbupdate" | "kpasswd" | "socks" | "afs" | "pptp" | "radius" | "radacct" | "zephyr-srv" | "zephyr-clt" | "zephyr-hm" | "nfsd" | "eklogin" | "ekshell" | "rkinit" | "cvspserver" | arg)
                          ),
                          "port-except" (
                                ("ftp-data" | "ftp" | "ssh" | "telnet" | "smtp" | "tacacs" | "tacacs-ds" | "domain" | "dhcp" | "bootps" | "bootpc" | "tftp" | "finger" | "http" | "kerberos-sec" | "pop3" | "sunrpc" | "ident" | "nntp" | "ntp" | "netbios-ns" | "netbios-dgm" | "netbios-ssn" | "imap" | "snmp" | "snmptrap" | "xdmcp" | "bgp" | "ldap" | "mobileip-agent" | "mobilip-mn" | "msdp" | "https" | "snpp" | "biff" | "exec" | "login" | "who" | "cmd" | "syslog" | "printer" | "talk" | "ntalk" | "rip" | "timed" | "klogin" | "kshell" | "ldp" | "krb-prop" | "krbupdate" | "kpasswd" | "socks" | "afs" | "pptp" | "radius" | "radacct" | "zephyr-srv" | "zephyr-clt" | "zephyr-hm" | "nfsd" | "eklogin" | "ekshell" | "rkinit" | "cvspserver" | arg)
                          )
                        ),
                        c(
                          "packet-length" arg,
                          "packet-length-except" arg
                        ),
                        c(
                          "traffic-class" (
                                ("af11" | "af12" | "af13" | "af21" | "af22" | "af23" | "af31" | "af32" | "af33" | "af41" | "af42" | "af43" | "ef" | "cs0" | "cs1" | "cs2" | "cs3" | "cs4" | "cs5" | "cs6" | "cs7" | "be" | "range")
                          ),
                          "traffic-class-except" (
                                ("af11" | "af12" | "af13" | "af21" | "af22" | "af23" | "af31" | "af32" | "af33" | "af41" | "af42" | "af43" | "ef" | "cs0" | "cs1" | "cs2" | "cs3" | "cs4" | "cs5" | "cs6" | "cs7" | "be" | "range")
                          )
                        ),
                        c(
                          "icmp-type" (
                                ("destination-unreachable" | "packet-too-big" | "time-exceeded" | "parameter-problem" | "echo-request" | "echo-reply" | "membership-query" | "membership-report" | "membership-termination" | "router-solicit" | "router-advertisement" | "redirect" | "neighbor-solicit" | "neighbor-advertisement" | "router-renumbering" | "node-information-request" | "node-information-reply" | "range")
                          ),
                          "icmp-type-except" (
                                ("destination-unreachable" | "packet-too-big" | "time-exceeded" | "parameter-problem" | "echo-request" | "echo-reply" | "membership-query" | "membership-report" | "membership-termination" | "router-solicit" | "router-advertisement" | "redirect" | "neighbor-solicit" | "neighbor-advertisement" | "router-renumbering" | "node-information-request" | "node-information-reply" | "range")
                          )
                        ),
                        c(
                          "icmp-code" (
                                ("no-route-to-destination" | "administratively-prohibited" | "address-unreachable" | "port-unreachable" | "ttl-eq-zero-during-transit" | "ttl-eq-zero-during-reassembly" | "ip6-header-bad" | "unrecognized-next-header" | "unrecognized-option" | "range")
                          ),
                          "icmp-code-except" (
                                ("no-route-to-destination" | "administratively-prohibited" | "address-unreachable" | "port-unreachable" | "ttl-eq-zero-during-transit" | "ttl-eq-zero-during-reassembly" | "ip6-header-bad" | "unrecognized-next-header" | "unrecognized-option" | "range")
                          )
                        ),
                        "tcp-initial",
                        "tcp-established",
                        "tcp-flags" arg,
                        "interface" (
                          match_interface_object
                        ),
                        "interface-set" (
                          match_interface_set_object
                        ),
                        c(
                          "forwarding-class" arg,
                          "forwarding-class-except" arg
                        ),
                        c(
                          "loss-priority" (
                                ("low" | "high" | "medium-low" | "medium-high")
                          ),
                          "loss-priority-except" (
                                ("low" | "high" | "medium-low" | "medium-high")
                          )
                        ),
                        "service-filter-hit",
                        c(
                          "hop-limit" arg,
                          "hop-limit-except" arg
                        )
                    )
                ),
                "then" (
                    c(
                        c(
                          "policer" arg,
                          "three-color-policer" (
                              c(
                                  c(
                                    "single-rate" arg,
                                    "two-rate" arg
                                  )
                              )
                          ),
                          "hierarchical-policer" arg
                        ),
                        "count" arg,
                        "service-accounting",
                        "log",
                        "syslog",
                        "sample",
                        "port-mirror-instance" arg,
                        "port-mirror",
                        "analyzer" arg,
                        "loss-priority" arg,
                        "forwarding-class" arg,
                        "service-filter-hit",
                        c(
                          "accept",
                          "discard",
                          "traffic-class" arg,
                          "next" arg,
                          "logical-system" (
                              s(
                                "logical-system-name" arg,
                                c(
                                  "routing-instance" (
                                      c(
                                          "routing-instance-name" arg,
                                          "topology" arg
                                      )
                                  ).as(:oneline),
                                  "topology" arg
                                )
                              )
                          ).as(:oneline),
                          "routing-instance" (
                              c(
                                  "routing-instance-name" arg,
                                  "topology" arg
                              )
                          ).as(:oneline),
                          "topology" arg,
                          "reject" (
                              c(
                                  c(
                                    "no-route",
                                    "administratively-prohibited",
                                    "beyond-scope",
                                    "address-unreachable",
                                    "port-unreachable",
                                    "tcp-reset",
                                    "fragmentation-needed"
                                  )
                              )
                          ).as(:oneline)
                        )
                    )
                )
            )
        )
    )
  )
end

rule(:inet6_fuf) do
  arg.as(:arg) (
    c(
        "interface-specific",
        "match-order" (
              ("next-header" | "source-address" | "destination-address" | "source-port" | "destination-port" | "traffic-class")
        ),
        "term" arg (
            c(
                "only-at-create",
                "from" (
                    c(
                        "source-address" (
                          firewall_addr6_simple_object
                        ),
                        "destination-address" (
                          firewall_addr6_simple_object
                        ),
                        c(
                          "source-port" (
                            match_simple_port_value
                          )
                        ),
                        c(
                          "destination-port" (
                            match_simple_port_value
                          )
                        ),
                        c(
                          "next-header" (
                            match_simple_protocol_value
                          )
                        ),
                        c(
                          "traffic-class" (
                            match_simple_dscp_value
                          )
                        ),
                        "match-terms" arg
                    )
                ),
                "then" (
                    c(
                        c(
                          "policer" arg
                        ),
                        "count" arg,
                        "service-accounting",
                        "log",
                        "port-mirror",
                        "loss-priority" arg,
                        "forwarding-class" arg,
                        "action-terms" arg,
                        c(
                          "accept",
                          "discard",
                          "routing-instance" (
                              c(
                                  "routing-instance-name" arg,
                                  "topology" arg
                              )
                          ).as(:oneline)
                        )
                    )
                )
            )
        )
    )
  )
end

rule(:firewall_addr6_simple_object) do
    c(
        "address" (
          ipv6prefix
        )
    )
end

rule(:inet6_service_filter) do
  arg.as(:arg) (
    c(
        "term" arg (
            c(
                "from" (
                    c(
                        c(
                          "interface-group" arg,
                          "interface-group-except" arg
                        ),
                        "source-address" (
                          firewall_addr6_object
                        ),
                        "destination-address" (
                          firewall_addr6_object
                        ),
                        "address" (
                          firewall_addr6_object
                        ),
                        "source-prefix-list" (
                          firewall_prefix_list
                        ),
                        "destination-prefix-list" (
                          firewall_prefix_list
                        ),
                        "prefix-list" (
                          firewall_prefix_list
                        ),
                        c(
                          "next-header" (
                                ("icmp" | "igmp" | "ipip" | "tcp" | "egp" | "udp" | "rsvp" | "gre" | "esp" | "ah" | "icmp6" | "ospf" | "pim" | "sctp" | "ipv6" | "dstopts" | "routing" | "fragment" | "no-next-header" | "hop-by-hop" | "vrrp" | arg)
                          ),
                          "next-header-except" (
                                ("icmp" | "igmp" | "ipip" | "tcp" | "egp" | "udp" | "rsvp" | "gre" | "esp" | "ah" | "icmp6" | "ospf" | "pim" | "sctp" | "ipv6" | "dstopts" | "routing" | "fragment" | "no-next-header" | "hop-by-hop" | "vrrp" | arg)
                          )
                        ),
                        c(
                          "source-port" (
                                ("ftp-data" | "ftp" | "ssh" | "telnet" | "smtp" | "tacacs" | "tacacs-ds" | "domain" | "dhcp" | "bootps" | "bootpc" | "tftp" | "finger" | "http" | "kerberos-sec" | "pop3" | "sunrpc" | "ident" | "nntp" | "ntp" | "netbios-ns" | "netbios-dgm" | "netbios-ssn" | "imap" | "snmp" | "snmptrap" | "xdmcp" | "bgp" | "ldap" | "mobileip-agent" | "mobilip-mn" | "msdp" | "https" | "snpp" | "biff" | "exec" | "login" | "who" | "cmd" | "syslog" | "printer" | "talk" | "ntalk" | "rip" | "timed" | "klogin" | "kshell" | "ldp" | "krb-prop" | "krbupdate" | "kpasswd" | "socks" | "afs" | "pptp" | "radius" | "radacct" | "zephyr-srv" | "zephyr-clt" | "zephyr-hm" | "nfsd" | "eklogin" | "ekshell" | "rkinit" | "cvspserver" | arg)
                          ),
                          "source-port-except" (
                                ("ftp-data" | "ftp" | "ssh" | "telnet" | "smtp" | "tacacs" | "tacacs-ds" | "domain" | "dhcp" | "bootps" | "bootpc" | "tftp" | "finger" | "http" | "kerberos-sec" | "pop3" | "sunrpc" | "ident" | "nntp" | "ntp" | "netbios-ns" | "netbios-dgm" | "netbios-ssn" | "imap" | "snmp" | "snmptrap" | "xdmcp" | "bgp" | "ldap" | "mobileip-agent" | "mobilip-mn" | "msdp" | "https" | "snpp" | "biff" | "exec" | "login" | "who" | "cmd" | "syslog" | "printer" | "talk" | "ntalk" | "rip" | "timed" | "klogin" | "kshell" | "ldp" | "krb-prop" | "krbupdate" | "kpasswd" | "socks" | "afs" | "pptp" | "radius" | "radacct" | "zephyr-srv" | "zephyr-clt" | "zephyr-hm" | "nfsd" | "eklogin" | "ekshell" | "rkinit" | "cvspserver" | arg)
                          )
                        ),
                        c(
                          "destination-port" (
                                ("ftp-data" | "ftp" | "ssh" | "telnet" | "smtp" | "tacacs" | "tacacs-ds" | "domain" | "dhcp" | "bootps" | "bootpc" | "tftp" | "finger" | "http" | "kerberos-sec" | "pop3" | "sunrpc" | "ident" | "nntp" | "ntp" | "netbios-ns" | "netbios-dgm" | "netbios-ssn" | "imap" | "snmp" | "snmptrap" | "xdmcp" | "bgp" | "ldap" | "mobileip-agent" | "mobilip-mn" | "msdp" | "https" | "snpp" | "biff" | "exec" | "login" | "who" | "cmd" | "syslog" | "printer" | "talk" | "ntalk" | "rip" | "timed" | "klogin" | "kshell" | "ldp" | "krb-prop" | "krbupdate" | "kpasswd" | "socks" | "afs" | "pptp" | "radius" | "radacct" | "zephyr-srv" | "zephyr-clt" | "zephyr-hm" | "nfsd" | "eklogin" | "ekshell" | "rkinit" | "cvspserver" | arg)
                          ),
                          "destination-port-except" (
                                ("ftp-data" | "ftp" | "ssh" | "telnet" | "smtp" | "tacacs" | "tacacs-ds" | "domain" | "dhcp" | "bootps" | "bootpc" | "tftp" | "finger" | "http" | "kerberos-sec" | "pop3" | "sunrpc" | "ident" | "nntp" | "ntp" | "netbios-ns" | "netbios-dgm" | "netbios-ssn" | "imap" | "snmp" | "snmptrap" | "xdmcp" | "bgp" | "ldap" | "mobileip-agent" | "mobilip-mn" | "msdp" | "https" | "snpp" | "biff" | "exec" | "login" | "who" | "cmd" | "syslog" | "printer" | "talk" | "ntalk" | "rip" | "timed" | "klogin" | "kshell" | "ldp" | "krb-prop" | "krbupdate" | "kpasswd" | "socks" | "afs" | "pptp" | "radius" | "radacct" | "zephyr-srv" | "zephyr-clt" | "zephyr-hm" | "nfsd" | "eklogin" | "ekshell" | "rkinit" | "cvspserver" | arg)
                          )
                        ),
                        c(
                          "port" (
                                ("ftp-data" | "ftp" | "ssh" | "telnet" | "smtp" | "tacacs" | "tacacs-ds" | "domain" | "dhcp" | "bootps" | "bootpc" | "tftp" | "finger" | "http" | "kerberos-sec" | "pop3" | "sunrpc" | "ident" | "nntp" | "ntp" | "netbios-ns" | "netbios-dgm" | "netbios-ssn" | "imap" | "snmp" | "snmptrap" | "xdmcp" | "bgp" | "ldap" | "mobileip-agent" | "mobilip-mn" | "msdp" | "https" | "snpp" | "biff" | "exec" | "login" | "who" | "cmd" | "syslog" | "printer" | "talk" | "ntalk" | "rip" | "timed" | "klogin" | "kshell" | "ldp" | "krb-prop" | "krbupdate" | "kpasswd" | "socks" | "afs" | "pptp" | "radius" | "radacct" | "zephyr-srv" | "zephyr-clt" | "zephyr-hm" | "nfsd" | "eklogin" | "ekshell" | "rkinit" | "cvspserver" | arg)
                          ),
                          "port-except" (
                                ("ftp-data" | "ftp" | "ssh" | "telnet" | "smtp" | "tacacs" | "tacacs-ds" | "domain" | "dhcp" | "bootps" | "bootpc" | "tftp" | "finger" | "http" | "kerberos-sec" | "pop3" | "sunrpc" | "ident" | "nntp" | "ntp" | "netbios-ns" | "netbios-dgm" | "netbios-ssn" | "imap" | "snmp" | "snmptrap" | "xdmcp" | "bgp" | "ldap" | "mobileip-agent" | "mobilip-mn" | "msdp" | "https" | "snpp" | "biff" | "exec" | "login" | "who" | "cmd" | "syslog" | "printer" | "talk" | "ntalk" | "rip" | "timed" | "klogin" | "kshell" | "ldp" | "krb-prop" | "krbupdate" | "kpasswd" | "socks" | "afs" | "pptp" | "radius" | "radacct" | "zephyr-srv" | "zephyr-clt" | "zephyr-hm" | "nfsd" | "eklogin" | "ekshell" | "rkinit" | "cvspserver" | arg)
                          )
                        ),
                        c(
                          "esp-spi" arg,
                          "esp-spi-except" arg
                        ),
                        c(
                          "ah-spi" arg,
                          "ah-spi-except" arg
                        ),
                        "tcp-flags" arg
                    )
                ),
                "then" (
                    c(
                        "count" arg,
                        "log",
                        "sample",
                        "port-mirror",
                        c(
                          "service",
                          "skip"
                        )
                    )
                )
            )
        )
    )
  )
end

rule(:inet_dialer_filter) do
  arg.as(:arg) (
    c(
        "accounting-profile" arg,
        "term" arg (
            c(
                "from" (
                    c(
                        "source-address" (
                          firewall_addr_object
                        ),
                        "destination-address" (
                          firewall_addr_object
                        ),
                        "address" (
                          firewall_addr_object
                        ),
                        "source-prefix-list" (
                          firewall_prefix_list
                        ),
                        "destination-prefix-list" (
                          firewall_prefix_list
                        ),
                        "prefix-list" (
                          firewall_prefix_list
                        ),
                        c(
                          "packet-length" arg,
                          "packet-length-except" arg
                        ),
                        c(
                          "precedence" (
                                ("net-control" | "internet-control" | "critical-ecp" | "flash-override" | "flash" | "immediate" | "priority" | "routine" | "range")
                          ),
                          "precedence-except" (
                                ("net-control" | "internet-control" | "critical-ecp" | "flash-override" | "flash" | "immediate" | "priority" | "routine" | "range")
                          )
                        ),
                        c(
                          "dscp" (
                                ("af11" | "af12" | "af13" | "af21" | "af22" | "af23" | "af31" | "af32" | "af33" | "af41" | "af42" | "af43" | "ef" | "cs0" | "cs1" | "cs2" | "cs3" | "cs4" | "cs5" | "cs6" | "cs7" | "be" | "range")
                          ),
                          "dscp-except" (
                                ("af11" | "af12" | "af13" | "af21" | "af22" | "af23" | "af31" | "af32" | "af33" | "af41" | "af42" | "af43" | "ef" | "cs0" | "cs1" | "cs2" | "cs3" | "cs4" | "cs5" | "cs6" | "cs7" | "be" | "range")
                          )
                        ),
                        c(
                          "ip-options" (
                                ("any" | "strict-source-route" | "loose-source-route" | "route-record" | "timestamp" | "router-alert" | "security" | "stream-id" | "range")
                          ),
                          "ip-options-except" (
                                ("any" | "strict-source-route" | "loose-source-route" | "route-record" | "timestamp" | "router-alert" | "security" | "stream-id" | "range")
                          )
                        ),
                        "is-fragment",
                        "first-fragment",
                        c(
                          "fragment-offset" arg,
                          "fragment-offset-except" arg
                        ),
                        "fragment-flags" arg,
                        c(
                          "protocol" (
                                ("icmp" | "igmp" | "ipip" | "tcp" | "egp" | "udp" | "rsvp" | "gre" | "esp" | "ah" | "icmp6" | "ospf" | "pim" | "sctp" | "ipv6" | "dstopts" | "routing" | "fragment" | "no-next-header" | "hop-by-hop" | "vrrp" | arg)
                          ),
                          "protocol-except" (
                                ("icmp" | "igmp" | "ipip" | "tcp" | "egp" | "udp" | "rsvp" | "gre" | "esp" | "ah" | "icmp6" | "ospf" | "pim" | "sctp" | "ipv6" | "dstopts" | "routing" | "fragment" | "no-next-header" | "hop-by-hop" | "vrrp" | arg)
                          )
                        ),
                        c(
                          "ttl" arg,
                          "ttl-except" arg
                        ),
                        c(
                          "icmp-type" (
                                ("echo-request" | "echo-reply" | "unreachable" | "source-quench" | "redirect" | "router-advertisement" | "router-solicit" | "time-exceeded" | "parameter-problem" | "timestamp" | "timestamp-reply" | "info-request" | "info-reply" | "mask-request" | "mask-reply" | arg)
                          ),
                          "icmp-type-except" (
                                ("echo-request" | "echo-reply" | "unreachable" | "source-quench" | "redirect" | "router-advertisement" | "router-solicit" | "time-exceeded" | "parameter-problem" | "timestamp" | "timestamp-reply" | "info-request" | "info-reply" | "mask-request" | "mask-reply" | arg)
                          )
                        ),
                        c(
                          "icmp-code" (
                                ("network-unreachable" | "host-unreachable" | "protocol-unreachable" | "port-unreachable" | "fragmentation-needed" | "source-route-failed" | "destination-network-unknown" | "destination-host-unknown" | "source-host-isolated" | "destination-network-prohibited" | "destination-host-prohibited" | "network-unreachable-for-tos" | "host-unreachable-for-tos" | "communication-prohibited-by-filtering" | "host-precedence-violation" | "precedence-cutoff-in-effect" | "redirect-for-network" | "redirect-for-host" | "redirect-for-tos-and-net" | "redirect-for-tos-and-host" | "ttl-eq-zero-during-transit" | "ttl-eq-zero-during-reassembly" | "ip-header-bad" | "required-option-missing" | arg)
                          ),
                          "icmp-code-except" (
                                ("network-unreachable" | "host-unreachable" | "protocol-unreachable" | "port-unreachable" | "fragmentation-needed" | "source-route-failed" | "destination-network-unknown" | "destination-host-unknown" | "source-host-isolated" | "destination-network-prohibited" | "destination-host-prohibited" | "network-unreachable-for-tos" | "host-unreachable-for-tos" | "communication-prohibited-by-filtering" | "host-precedence-violation" | "precedence-cutoff-in-effect" | "redirect-for-network" | "redirect-for-host" | "redirect-for-tos-and-net" | "redirect-for-tos-and-host" | "ttl-eq-zero-during-transit" | "ttl-eq-zero-during-reassembly" | "ip-header-bad" | "required-option-missing" | arg)
                          )
                        ),
                        c(
                          "source-port" (
                                ("ftp-data" | "ftp" | "ssh" | "telnet" | "smtp" | "tacacs" | "tacacs-ds" | "domain" | "dhcp" | "bootps" | "bootpc" | "tftp" | "finger" | "http" | "kerberos-sec" | "pop3" | "sunrpc" | "ident" | "nntp" | "ntp" | "netbios-ns" | "netbios-dgm" | "netbios-ssn" | "imap" | "snmp" | "snmptrap" | "xdmcp" | "bgp" | "ldap" | "mobileip-agent" | "mobilip-mn" | "msdp" | "https" | "snpp" | "biff" | "exec" | "login" | "who" | "cmd" | "syslog" | "printer" | "talk" | "ntalk" | "rip" | "timed" | "klogin" | "kshell" | "ldp" | "krb-prop" | "krbupdate" | "kpasswd" | "socks" | "afs" | "pptp" | "radius" | "radacct" | "zephyr-srv" | "zephyr-clt" | "zephyr-hm" | "nfsd" | "eklogin" | "ekshell" | "rkinit" | "cvspserver" | arg)
                          ),
                          "source-port-except" (
                                ("ftp-data" | "ftp" | "ssh" | "telnet" | "smtp" | "tacacs" | "tacacs-ds" | "domain" | "dhcp" | "bootps" | "bootpc" | "tftp" | "finger" | "http" | "kerberos-sec" | "pop3" | "sunrpc" | "ident" | "nntp" | "ntp" | "netbios-ns" | "netbios-dgm" | "netbios-ssn" | "imap" | "snmp" | "snmptrap" | "xdmcp" | "bgp" | "ldap" | "mobileip-agent" | "mobilip-mn" | "msdp" | "https" | "snpp" | "biff" | "exec" | "login" | "who" | "cmd" | "syslog" | "printer" | "talk" | "ntalk" | "rip" | "timed" | "klogin" | "kshell" | "ldp" | "krb-prop" | "krbupdate" | "kpasswd" | "socks" | "afs" | "pptp" | "radius" | "radacct" | "zephyr-srv" | "zephyr-clt" | "zephyr-hm" | "nfsd" | "eklogin" | "ekshell" | "rkinit" | "cvspserver" | arg)
                          )
                        ),
                        c(
                          "destination-port" (
                                ("ftp-data" | "ftp" | "ssh" | "telnet" | "smtp" | "tacacs" | "tacacs-ds" | "domain" | "dhcp" | "bootps" | "bootpc" | "tftp" | "finger" | "http" | "kerberos-sec" | "pop3" | "sunrpc" | "ident" | "nntp" | "ntp" | "netbios-ns" | "netbios-dgm" | "netbios-ssn" | "imap" | "snmp" | "snmptrap" | "xdmcp" | "bgp" | "ldap" | "mobileip-agent" | "mobilip-mn" | "msdp" | "https" | "snpp" | "biff" | "exec" | "login" | "who" | "cmd" | "syslog" | "printer" | "talk" | "ntalk" | "rip" | "timed" | "klogin" | "kshell" | "ldp" | "krb-prop" | "krbupdate" | "kpasswd" | "socks" | "afs" | "pptp" | "radius" | "radacct" | "zephyr-srv" | "zephyr-clt" | "zephyr-hm" | "nfsd" | "eklogin" | "ekshell" | "rkinit" | "cvspserver" | arg)
                          ),
                          "destination-port-except" (
                                ("ftp-data" | "ftp" | "ssh" | "telnet" | "smtp" | "tacacs" | "tacacs-ds" | "domain" | "dhcp" | "bootps" | "bootpc" | "tftp" | "finger" | "http" | "kerberos-sec" | "pop3" | "sunrpc" | "ident" | "nntp" | "ntp" | "netbios-ns" | "netbios-dgm" | "netbios-ssn" | "imap" | "snmp" | "snmptrap" | "xdmcp" | "bgp" | "ldap" | "mobileip-agent" | "mobilip-mn" | "msdp" | "https" | "snpp" | "biff" | "exec" | "login" | "who" | "cmd" | "syslog" | "printer" | "talk" | "ntalk" | "rip" | "timed" | "klogin" | "kshell" | "ldp" | "krb-prop" | "krbupdate" | "kpasswd" | "socks" | "afs" | "pptp" | "radius" | "radacct" | "zephyr-srv" | "zephyr-clt" | "zephyr-hm" | "nfsd" | "eklogin" | "ekshell" | "rkinit" | "cvspserver" | arg)
                          )
                        ),
                        c(
                          "port" (
                                ("ftp-data" | "ftp" | "ssh" | "telnet" | "smtp" | "tacacs" | "tacacs-ds" | "domain" | "dhcp" | "bootps" | "bootpc" | "tftp" | "finger" | "http" | "kerberos-sec" | "pop3" | "sunrpc" | "ident" | "nntp" | "ntp" | "netbios-ns" | "netbios-dgm" | "netbios-ssn" | "imap" | "snmp" | "snmptrap" | "xdmcp" | "bgp" | "ldap" | "mobileip-agent" | "mobilip-mn" | "msdp" | "https" | "snpp" | "biff" | "exec" | "login" | "who" | "cmd" | "syslog" | "printer" | "talk" | "ntalk" | "rip" | "timed" | "klogin" | "kshell" | "ldp" | "krb-prop" | "krbupdate" | "kpasswd" | "socks" | "afs" | "pptp" | "radius" | "radacct" | "zephyr-srv" | "zephyr-clt" | "zephyr-hm" | "nfsd" | "eklogin" | "ekshell" | "rkinit" | "cvspserver" | arg)
                          ),
                          "port-except" (
                                ("ftp-data" | "ftp" | "ssh" | "telnet" | "smtp" | "tacacs" | "tacacs-ds" | "domain" | "dhcp" | "bootps" | "bootpc" | "tftp" | "finger" | "http" | "kerberos-sec" | "pop3" | "sunrpc" | "ident" | "nntp" | "ntp" | "netbios-ns" | "netbios-dgm" | "netbios-ssn" | "imap" | "snmp" | "snmptrap" | "xdmcp" | "bgp" | "ldap" | "mobileip-agent" | "mobilip-mn" | "msdp" | "https" | "snpp" | "biff" | "exec" | "login" | "who" | "cmd" | "syslog" | "printer" | "talk" | "ntalk" | "rip" | "timed" | "klogin" | "kshell" | "ldp" | "krb-prop" | "krbupdate" | "kpasswd" | "socks" | "afs" | "pptp" | "radius" | "radacct" | "zephyr-srv" | "zephyr-clt" | "zephyr-hm" | "nfsd" | "eklogin" | "ekshell" | "rkinit" | "cvspserver" | arg)
                          )
                        ),
                        "tcp-initial",
                        "tcp-established",
                        "tcp-flags" arg,
                        c(
                          "esp-spi" arg,
                          "esp-spi-except" arg
                        ),
                        c(
                          "ah-spi" arg,
                          "ah-spi-except" arg
                        )
                    )
                ),
                "then" (
                    c(
                        "log",
                        "syslog",
                        "sample",
                        c(
                          "note",
                          "ignore"
                        )
                    )
                )
            )
        )
    )
  )
end

rule(:inet_filter) do
  arg.as(:arg) (
    c(
        "accounting-profile" arg,
        "interface-specific",
        "physical-interface-filter",
        "enhanced-mode",
        "term" arg (
            c(
                "filter" arg,
                "from" (
                    c(
                        c(
                          "destination-class" arg,
                          "destination-class-except" arg,
                          "source-class" arg,
                          "source-class-except" arg
                        ),
                        c(
                          "interface-group" arg,
                          "interface-group-except" arg
                        ),
                        "source-address" (
                          firewall_addr_object
                        ),
                        "destination-address" (
                          firewall_addr_object
                        ),
                        "address" (
                          firewall_addr_object
                        ),
                        "source-prefix-list" (
                          firewall_prefix_list
                        ),
                        "destination-prefix-list" (
                          firewall_prefix_list
                        ),
                        "prefix-list" (
                          firewall_prefix_list
                        ),
                        c(
                          "packet-length" arg,
                          "packet-length-except" arg
                        ),
                        c(
                          "dscp" (
                                ("af11" | "af12" | "af13" | "af21" | "af22" | "af23" | "af31" | "af32" | "af33" | "af41" | "af42" | "af43" | "ef" | "cs0" | "cs1" | "cs2" | "cs3" | "cs4" | "cs5" | "cs6" | "cs7" | "be" | "range")
                          ),
                          "dscp-except" (
                                ("af11" | "af12" | "af13" | "af21" | "af22" | "af23" | "af31" | "af32" | "af33" | "af41" | "af42" | "af43" | "ef" | "cs0" | "cs1" | "cs2" | "cs3" | "cs4" | "cs5" | "cs6" | "cs7" | "be" | "range")
                          )
                        ),
                        c(
                          "precedence" (
                                ("net-control" | "internet-control" | "critical-ecp" | "flash-override" | "flash" | "immediate" | "priority" | "routine" | "range")
                          ),
                          "precedence-except" (
                                ("net-control" | "internet-control" | "critical-ecp" | "flash-override" | "flash" | "immediate" | "priority" | "routine" | "range")
                          )
                        ),
                        c(
                          "ip-options" (
                                ("any" | "strict-source-route" | "loose-source-route" | "route-record" | "timestamp" | "router-alert" | "security" | "stream-id" | "range")
                          ),
                          "ip-options-except" (
                                ("any" | "strict-source-route" | "loose-source-route" | "route-record" | "timestamp" | "router-alert" | "security" | "stream-id" | "range")
                          )
                        ),
                        "is-fragment",
                        "first-fragment",
                        "service-filter-hit",
                        c(
                          "fragment-offset" arg,
                          "fragment-offset-except" arg
                        ),
                        "fragment-flags" arg,
                        c(
                          "protocol" (
                                ("icmp" | "igmp" | "ipip" | "tcp" | "egp" | "udp" | "rsvp" | "gre" | "esp" | "ah" | "icmp6" | "ospf" | "pim" | "sctp" | "ipv6" | "dstopts" | "routing" | "fragment" | "no-next-header" | "hop-by-hop" | "vrrp" | arg)
                          ),
                          "protocol-except" (
                                ("icmp" | "igmp" | "ipip" | "tcp" | "egp" | "udp" | "rsvp" | "gre" | "esp" | "ah" | "icmp6" | "ospf" | "pim" | "sctp" | "ipv6" | "dstopts" | "routing" | "fragment" | "no-next-header" | "hop-by-hop" | "vrrp" | arg)
                          )
                        ),
                        c(
                          "ttl" arg,
                          "ttl-except" arg
                        ),
                        c(
                          "icmp-type" (
                                ("echo-request" | "echo-reply" | "unreachable" | "source-quench" | "redirect" | "router-advertisement" | "router-solicit" | "time-exceeded" | "parameter-problem" | "timestamp" | "timestamp-reply" | "info-request" | "info-reply" | "mask-request" | "mask-reply" | arg)
                          ),
                          "icmp-type-except" (
                                ("echo-request" | "echo-reply" | "unreachable" | "source-quench" | "redirect" | "router-advertisement" | "router-solicit" | "time-exceeded" | "parameter-problem" | "timestamp" | "timestamp-reply" | "info-request" | "info-reply" | "mask-request" | "mask-reply" | arg)
                          )
                        ),
                        c(
                          "icmp-code" (
                                ("network-unreachable" | "host-unreachable" | "protocol-unreachable" | "port-unreachable" | "fragmentation-needed" | "source-route-failed" | "destination-network-unknown" | "destination-host-unknown" | "source-host-isolated" | "destination-network-prohibited" | "destination-host-prohibited" | "network-unreachable-for-tos" | "host-unreachable-for-tos" | "communication-prohibited-by-filtering" | "host-precedence-violation" | "precedence-cutoff-in-effect" | "redirect-for-network" | "redirect-for-host" | "redirect-for-tos-and-net" | "redirect-for-tos-and-host" | "ttl-eq-zero-during-transit" | "ttl-eq-zero-during-reassembly" | "ip-header-bad" | "required-option-missing" | arg)
                          ),
                          "icmp-code-except" (
                                ("network-unreachable" | "host-unreachable" | "protocol-unreachable" | "port-unreachable" | "fragmentation-needed" | "source-route-failed" | "destination-network-unknown" | "destination-host-unknown" | "source-host-isolated" | "destination-network-prohibited" | "destination-host-prohibited" | "network-unreachable-for-tos" | "host-unreachable-for-tos" | "communication-prohibited-by-filtering" | "host-precedence-violation" | "precedence-cutoff-in-effect" | "redirect-for-network" | "redirect-for-host" | "redirect-for-tos-and-net" | "redirect-for-tos-and-host" | "ttl-eq-zero-during-transit" | "ttl-eq-zero-during-reassembly" | "ip-header-bad" | "required-option-missing" | arg)
                          )
                        ),
                        c(
                          "source-port" (
                                ("ftp-data" | "ftp" | "ssh" | "telnet" | "smtp" | "tacacs" | "tacacs-ds" | "domain" | "dhcp" | "bootps" | "bootpc" | "tftp" | "finger" | "http" | "kerberos-sec" | "pop3" | "sunrpc" | "ident" | "nntp" | "ntp" | "netbios-ns" | "netbios-dgm" | "netbios-ssn" | "imap" | "snmp" | "snmptrap" | "xdmcp" | "bgp" | "ldap" | "mobileip-agent" | "mobilip-mn" | "msdp" | "https" | "snpp" | "biff" | "exec" | "login" | "who" | "cmd" | "syslog" | "printer" | "talk" | "ntalk" | "rip" | "timed" | "klogin" | "kshell" | "ldp" | "krb-prop" | "krbupdate" | "kpasswd" | "socks" | "afs" | "pptp" | "radius" | "radacct" | "zephyr-srv" | "zephyr-clt" | "zephyr-hm" | "nfsd" | "eklogin" | "ekshell" | "rkinit" | "cvspserver" | arg)
                          ),
                          "source-port-except" (
                                ("ftp-data" | "ftp" | "ssh" | "telnet" | "smtp" | "tacacs" | "tacacs-ds" | "domain" | "dhcp" | "bootps" | "bootpc" | "tftp" | "finger" | "http" | "kerberos-sec" | "pop3" | "sunrpc" | "ident" | "nntp" | "ntp" | "netbios-ns" | "netbios-dgm" | "netbios-ssn" | "imap" | "snmp" | "snmptrap" | "xdmcp" | "bgp" | "ldap" | "mobileip-agent" | "mobilip-mn" | "msdp" | "https" | "snpp" | "biff" | "exec" | "login" | "who" | "cmd" | "syslog" | "printer" | "talk" | "ntalk" | "rip" | "timed" | "klogin" | "kshell" | "ldp" | "krb-prop" | "krbupdate" | "kpasswd" | "socks" | "afs" | "pptp" | "radius" | "radacct" | "zephyr-srv" | "zephyr-clt" | "zephyr-hm" | "nfsd" | "eklogin" | "ekshell" | "rkinit" | "cvspserver" | arg)
                          )
                        ),
                        c(
                          "destination-port" (
                                ("ftp-data" | "ftp" | "ssh" | "telnet" | "smtp" | "tacacs" | "tacacs-ds" | "domain" | "dhcp" | "bootps" | "bootpc" | "tftp" | "finger" | "http" | "kerberos-sec" | "pop3" | "sunrpc" | "ident" | "nntp" | "ntp" | "netbios-ns" | "netbios-dgm" | "netbios-ssn" | "imap" | "snmp" | "snmptrap" | "xdmcp" | "bgp" | "ldap" | "mobileip-agent" | "mobilip-mn" | "msdp" | "https" | "snpp" | "biff" | "exec" | "login" | "who" | "cmd" | "syslog" | "printer" | "talk" | "ntalk" | "rip" | "timed" | "klogin" | "kshell" | "ldp" | "krb-prop" | "krbupdate" | "kpasswd" | "socks" | "afs" | "pptp" | "radius" | "radacct" | "zephyr-srv" | "zephyr-clt" | "zephyr-hm" | "nfsd" | "eklogin" | "ekshell" | "rkinit" | "cvspserver" | arg)
                          ),
                          "destination-port-except" (
                                ("ftp-data" | "ftp" | "ssh" | "telnet" | "smtp" | "tacacs" | "tacacs-ds" | "domain" | "dhcp" | "bootps" | "bootpc" | "tftp" | "finger" | "http" | "kerberos-sec" | "pop3" | "sunrpc" | "ident" | "nntp" | "ntp" | "netbios-ns" | "netbios-dgm" | "netbios-ssn" | "imap" | "snmp" | "snmptrap" | "xdmcp" | "bgp" | "ldap" | "mobileip-agent" | "mobilip-mn" | "msdp" | "https" | "snpp" | "biff" | "exec" | "login" | "who" | "cmd" | "syslog" | "printer" | "talk" | "ntalk" | "rip" | "timed" | "klogin" | "kshell" | "ldp" | "krb-prop" | "krbupdate" | "kpasswd" | "socks" | "afs" | "pptp" | "radius" | "radacct" | "zephyr-srv" | "zephyr-clt" | "zephyr-hm" | "nfsd" | "eklogin" | "ekshell" | "rkinit" | "cvspserver" | arg)
                          )
                        ),
                        c(
                          "port" (
                                ("ftp-data" | "ftp" | "ssh" | "telnet" | "smtp" | "tacacs" | "tacacs-ds" | "domain" | "dhcp" | "bootps" | "bootpc" | "tftp" | "finger" | "http" | "kerberos-sec" | "pop3" | "sunrpc" | "ident" | "nntp" | "ntp" | "netbios-ns" | "netbios-dgm" | "netbios-ssn" | "imap" | "snmp" | "snmptrap" | "xdmcp" | "bgp" | "ldap" | "mobileip-agent" | "mobilip-mn" | "msdp" | "https" | "snpp" | "biff" | "exec" | "login" | "who" | "cmd" | "syslog" | "printer" | "talk" | "ntalk" | "rip" | "timed" | "klogin" | "kshell" | "ldp" | "krb-prop" | "krbupdate" | "kpasswd" | "socks" | "afs" | "pptp" | "radius" | "radacct" | "zephyr-srv" | "zephyr-clt" | "zephyr-hm" | "nfsd" | "eklogin" | "ekshell" | "rkinit" | "cvspserver" | arg)
                          ),
                          "port-except" (
                                ("ftp-data" | "ftp" | "ssh" | "telnet" | "smtp" | "tacacs" | "tacacs-ds" | "domain" | "dhcp" | "bootps" | "bootpc" | "tftp" | "finger" | "http" | "kerberos-sec" | "pop3" | "sunrpc" | "ident" | "nntp" | "ntp" | "netbios-ns" | "netbios-dgm" | "netbios-ssn" | "imap" | "snmp" | "snmptrap" | "xdmcp" | "bgp" | "ldap" | "mobileip-agent" | "mobilip-mn" | "msdp" | "https" | "snpp" | "biff" | "exec" | "login" | "who" | "cmd" | "syslog" | "printer" | "talk" | "ntalk" | "rip" | "timed" | "klogin" | "kshell" | "ldp" | "krb-prop" | "krbupdate" | "kpasswd" | "socks" | "afs" | "pptp" | "radius" | "radacct" | "zephyr-srv" | "zephyr-clt" | "zephyr-hm" | "nfsd" | "eklogin" | "ekshell" | "rkinit" | "cvspserver" | arg)
                          )
                        ),
                        "tcp-initial",
                        "tcp-established",
                        "tcp-flags" arg,
                        c(
                          "esp-spi" arg,
                          "esp-spi-except" arg
                        ),
                        c(
                          "ah-spi" arg,
                          "ah-spi-except" arg
                        ),
                        "interface" (
                          match_interface_object
                        ),
                        "interface-set" (
                          match_interface_set_object
                        ),
                        c(
                          "forwarding-class" arg,
                          "forwarding-class-except" arg
                        ),
                        c(
                          "loss-priority" (
                                ("low" | "high" | "medium-low" | "medium-high")
                          ),
                          "loss-priority-except" (
                                ("low" | "high" | "medium-low" | "medium-high")
                          )
                        )
                    )
                ),
                "then" (
                    c(
                        c(
                          "policer" arg,
                          "three-color-policer" (
                              c(
                                  c(
                                    "single-rate" arg,
                                    "two-rate" arg
                                  )
                              )
                          ),
                          "hierarchical-policer" arg
                        ),
                        "count" arg,
                        "service-accounting",
                        "log",
                        "packet-mode",
                        "syslog",
                        "sample",
                        "port-mirror-instance" arg,
                        "port-mirror",
                        "analyzer" arg,
                        "loss-priority" arg,
                        "forwarding-class" arg,
                        "service-filter-hit",
                        "virtual-channel" arg,
                        c(
                          "accept",
                          "discard" (
                              c(
                                  "accounting" arg
                              )
                          ),
                          "next" arg,
                          "logical-system" (
                              s(
                                "logical-system-name" arg,
                                c(
                                  "routing-instance" (
                                      c(
                                          "routing-instance-name" arg,
                                          "topology" arg
                                      )
                                  ).as(:oneline),
                                  "topology" arg
                                )
                              )
                          ).as(:oneline),
                          "routing-instance" (
                              c(
                                  "routing-instance-name" arg,
                                  "topology" arg
                              )
                          ).as(:oneline),
                          "topology" arg,
                          "ipsec-sa" arg,
                          "next-hop-group" arg,
                          "reject" (
                              c(
                                  c(
                                    "network-unreachable",
                                    "host-unreachable",
                                    "protocol-unreachable",
                                    "port-unreachable",
                                    "fragmentation-needed",
                                    "source-route-failed",
                                    "network-unknown",
                                    "host-unknown",
                                    "source-host-isolated",
                                    "network-prohibited",
                                    "host-prohibited",
                                    "bad-network-tos",
                                    "bad-host-tos",
                                    "administratively-prohibited",
                                    "precedence-violation",
                                    "precedence-cutoff",
                                    "tcp-reset"
                                  )
                              )
                          ).as(:oneline),
                          "load-balance" arg
                        ),
                        "dscp" arg,
                        "prefix-action" arg
                    )
                )
            )
        )
    )
  )
end

rule(:inet_fuf) do
  arg.as(:arg) (
    c(
        "interface-specific",
        "match-order" (
              ("protocol" | "source-address" | "destination-address" | "source-port" | "destination-port" | "dscp")
        ),
        "term" arg (
            c(
                "only-at-create",
                "from" (
                    c(
                        "source-address" (
                          firewall_addr_simple_object
                        ),
                        "destination-address" (
                          firewall_addr_simple_object
                        ),
                        c(
                          "source-port" (
                            match_simple_port_value
                          )
                        ),
                        c(
                          "destination-port" (
                            match_simple_port_value
                          )
                        ),
                        c(
                          "protocol" (
                            match_simple_protocol_value
                          )
                        ),
                        c(
                          "dscp" (
                            match_simple_dscp_value
                          )
                        ),
                        "match-terms" arg
                    )
                ),
                "then" (
                    c(
                        c(
                          "policer" arg
                        ),
                        "count" arg,
                        "service-accounting",
                        "log",
                        "port-mirror",
                        "loss-priority" arg,
                        "forwarding-class" arg,
                        "action-terms" arg,
                        c(
                          "accept",
                          "discard",
                          "routing-instance" (
                              c(
                                  "routing-instance-name" arg,
                                  "topology" arg
                              )
                          ).as(:oneline)
                        )
                    )
                )
            )
        )
    )
  )
end

rule(:firewall_addr_simple_object) do
    c(
        "address" (
          ipv4prefix
        )
    )
end

rule(:inet_service_filter) do
  arg.as(:arg) (
    c(
        "term" arg (
            c(
                "from" (
                    c(
                        c(
                          "interface-group" arg,
                          "interface-group-except" arg
                        ),
                        "source-address" (
                          firewall_addr_object
                        ),
                        "destination-address" (
                          firewall_addr_object
                        ),
                        "address" (
                          firewall_addr_object
                        ),
                        "source-prefix-list" (
                          firewall_prefix_list
                        ),
                        "destination-prefix-list" (
                          firewall_prefix_list
                        ),
                        "prefix-list" (
                          firewall_prefix_list
                        ),
                        c(
                          "protocol" (
                                ("icmp" | "igmp" | "ipip" | "tcp" | "egp" | "udp" | "rsvp" | "gre" | "esp" | "ah" | "icmp6" | "ospf" | "pim" | "sctp" | "ipv6" | "dstopts" | "routing" | "fragment" | "no-next-header" | "hop-by-hop" | "vrrp" | arg)
                          ),
                          "protocol-except" (
                                ("icmp" | "igmp" | "ipip" | "tcp" | "egp" | "udp" | "rsvp" | "gre" | "esp" | "ah" | "icmp6" | "ospf" | "pim" | "sctp" | "ipv6" | "dstopts" | "routing" | "fragment" | "no-next-header" | "hop-by-hop" | "vrrp" | arg)
                          )
                        ),
                        c(
                          "ip-options" (
                                ("any")
                          ),
                          "ip-options-except" (
                                ("any")
                          )
                        ),
                        c(
                          "source-port" (
                                ("ftp-data" | "ftp" | "ssh" | "telnet" | "smtp" | "tacacs" | "tacacs-ds" | "domain" | "dhcp" | "bootps" | "bootpc" | "tftp" | "finger" | "http" | "kerberos-sec" | "pop3" | "sunrpc" | "ident" | "nntp" | "ntp" | "netbios-ns" | "netbios-dgm" | "netbios-ssn" | "imap" | "snmp" | "snmptrap" | "xdmcp" | "bgp" | "ldap" | "mobileip-agent" | "mobilip-mn" | "msdp" | "https" | "snpp" | "biff" | "exec" | "login" | "who" | "cmd" | "syslog" | "printer" | "talk" | "ntalk" | "rip" | "timed" | "klogin" | "kshell" | "ldp" | "krb-prop" | "krbupdate" | "kpasswd" | "socks" | "afs" | "pptp" | "radius" | "radacct" | "zephyr-srv" | "zephyr-clt" | "zephyr-hm" | "nfsd" | "eklogin" | "ekshell" | "rkinit" | "cvspserver" | arg)
                          ),
                          "source-port-except" (
                                ("ftp-data" | "ftp" | "ssh" | "telnet" | "smtp" | "tacacs" | "tacacs-ds" | "domain" | "dhcp" | "bootps" | "bootpc" | "tftp" | "finger" | "http" | "kerberos-sec" | "pop3" | "sunrpc" | "ident" | "nntp" | "ntp" | "netbios-ns" | "netbios-dgm" | "netbios-ssn" | "imap" | "snmp" | "snmptrap" | "xdmcp" | "bgp" | "ldap" | "mobileip-agent" | "mobilip-mn" | "msdp" | "https" | "snpp" | "biff" | "exec" | "login" | "who" | "cmd" | "syslog" | "printer" | "talk" | "ntalk" | "rip" | "timed" | "klogin" | "kshell" | "ldp" | "krb-prop" | "krbupdate" | "kpasswd" | "socks" | "afs" | "pptp" | "radius" | "radacct" | "zephyr-srv" | "zephyr-clt" | "zephyr-hm" | "nfsd" | "eklogin" | "ekshell" | "rkinit" | "cvspserver" | arg)
                          )
                        ),
                        c(
                          "destination-port" (
                                ("ftp-data" | "ftp" | "ssh" | "telnet" | "smtp" | "tacacs" | "tacacs-ds" | "domain" | "dhcp" | "bootps" | "bootpc" | "tftp" | "finger" | "http" | "kerberos-sec" | "pop3" | "sunrpc" | "ident" | "nntp" | "ntp" | "netbios-ns" | "netbios-dgm" | "netbios-ssn" | "imap" | "snmp" | "snmptrap" | "xdmcp" | "bgp" | "ldap" | "mobileip-agent" | "mobilip-mn" | "msdp" | "https" | "snpp" | "biff" | "exec" | "login" | "who" | "cmd" | "syslog" | "printer" | "talk" | "ntalk" | "rip" | "timed" | "klogin" | "kshell" | "ldp" | "krb-prop" | "krbupdate" | "kpasswd" | "socks" | "afs" | "pptp" | "radius" | "radacct" | "zephyr-srv" | "zephyr-clt" | "zephyr-hm" | "nfsd" | "eklogin" | "ekshell" | "rkinit" | "cvspserver" | arg)
                          ),
                          "destination-port-except" (
                                ("ftp-data" | "ftp" | "ssh" | "telnet" | "smtp" | "tacacs" | "tacacs-ds" | "domain" | "dhcp" | "bootps" | "bootpc" | "tftp" | "finger" | "http" | "kerberos-sec" | "pop3" | "sunrpc" | "ident" | "nntp" | "ntp" | "netbios-ns" | "netbios-dgm" | "netbios-ssn" | "imap" | "snmp" | "snmptrap" | "xdmcp" | "bgp" | "ldap" | "mobileip-agent" | "mobilip-mn" | "msdp" | "https" | "snpp" | "biff" | "exec" | "login" | "who" | "cmd" | "syslog" | "printer" | "talk" | "ntalk" | "rip" | "timed" | "klogin" | "kshell" | "ldp" | "krb-prop" | "krbupdate" | "kpasswd" | "socks" | "afs" | "pptp" | "radius" | "radacct" | "zephyr-srv" | "zephyr-clt" | "zephyr-hm" | "nfsd" | "eklogin" | "ekshell" | "rkinit" | "cvspserver" | arg)
                          )
                        ),
                        c(
                          "port" (
                                ("ftp-data" | "ftp" | "ssh" | "telnet" | "smtp" | "tacacs" | "tacacs-ds" | "domain" | "dhcp" | "bootps" | "bootpc" | "tftp" | "finger" | "http" | "kerberos-sec" | "pop3" | "sunrpc" | "ident" | "nntp" | "ntp" | "netbios-ns" | "netbios-dgm" | "netbios-ssn" | "imap" | "snmp" | "snmptrap" | "xdmcp" | "bgp" | "ldap" | "mobileip-agent" | "mobilip-mn" | "msdp" | "https" | "snpp" | "biff" | "exec" | "login" | "who" | "cmd" | "syslog" | "printer" | "talk" | "ntalk" | "rip" | "timed" | "klogin" | "kshell" | "ldp" | "krb-prop" | "krbupdate" | "kpasswd" | "socks" | "afs" | "pptp" | "radius" | "radacct" | "zephyr-srv" | "zephyr-clt" | "zephyr-hm" | "nfsd" | "eklogin" | "ekshell" | "rkinit" | "cvspserver" | arg)
                          ),
                          "port-except" (
                                ("ftp-data" | "ftp" | "ssh" | "telnet" | "smtp" | "tacacs" | "tacacs-ds" | "domain" | "dhcp" | "bootps" | "bootpc" | "tftp" | "finger" | "http" | "kerberos-sec" | "pop3" | "sunrpc" | "ident" | "nntp" | "ntp" | "netbios-ns" | "netbios-dgm" | "netbios-ssn" | "imap" | "snmp" | "snmptrap" | "xdmcp" | "bgp" | "ldap" | "mobileip-agent" | "mobilip-mn" | "msdp" | "https" | "snpp" | "biff" | "exec" | "login" | "who" | "cmd" | "syslog" | "printer" | "talk" | "ntalk" | "rip" | "timed" | "klogin" | "kshell" | "ldp" | "krb-prop" | "krbupdate" | "kpasswd" | "socks" | "afs" | "pptp" | "radius" | "radacct" | "zephyr-srv" | "zephyr-clt" | "zephyr-hm" | "nfsd" | "eklogin" | "ekshell" | "rkinit" | "cvspserver" | arg)
                          )
                        ),
                        c(
                          "esp-spi" arg,
                          "esp-spi-except" arg
                        ),
                        "is-fragment",
                        "first-fragment",
                        c(
                          "fragment-offset" arg,
                          "fragment-offset-except" arg
                        ),
                        "fragment-flags" arg,
                        "tcp-flags" arg,
                        c(
                          "ah-spi" arg,
                          "ah-spi-except" arg
                        ),
                        c(
                          "loss-priority" (
                                ("low" | "high" | "medium-low" | "medium-high")
                          ),
                          "loss-priority-except" (
                                ("low" | "high" | "medium-low" | "medium-high")
                          )
                        )
                    )
                ),
                "then" (
                    c(
                        "count" arg,
                        "log",
                        "sample",
                        "port-mirror",
                        c(
                          "service",
                          "skip"
                        )
                    )
                )
            )
        )
    )
  )
end

rule(:inet_simple_filter) do
  arg.as(:arg) (
    c(
        "term" arg (
            c(
                "from" (
                    c(
                        "source-address" (
                          firewall_addr_simple_object
                        ),
                        "destination-address" (
                          firewall_addr_simple_object
                        ),
                        c(
                          "protocol" (
                            match_simple_protocol_value
                          )
                        ),
                        c(
                          "source-port" (
                            match_simple_port_value
                          )
                        ),
                        c(
                          "destination-port" (
                            match_simple_port_value
                          )
                        ),
                        c(
                          "forwarding-class" arg
                        )
                    )
                ),
                "then" (
                    c(
                        c(
                          "policer" arg,
                          "three-color-policer" (
                              c(
                                  c(
                                    "single-rate" arg,
                                    "two-rate" arg
                                  )
                              )
                          )
                        ),
                        "loss-priority" arg,
                        "forwarding-class" arg,
                        "discard",
                        "accept"
                    )
                )
            )
        )
    )
  )
end

rule(:interface_set_type) do
  arg.as(:arg) (
    c(
        "interface-list" arg
    )
  )
end

rule(:interfaces_type) do
  ("$junos-interface-ifd-name" | "interface-name").as(:arg) (
    c(
        "description" arg,
        "metadata" arg,
        c(
          "disable"
        ),
        "promiscuous-mode",
        "port-mirror-instance" arg,
        "multicast-statistics",
        "fabric-options" (
            c(
                "member-interfaces" arg
            )
        ),
        "traceoptions" (
            c(
                "flag" ("ipc" | "event" | "media" | "all" | "q921" | "q931").as(:oneline),
                "file" (
                    c(
                        "filename" arg,
                        "size" arg,
                        "files" arg,
                        "world-readable",
                        "no-world-readable"
                    )
                )
            )
        ),
        "passive-monitor-mode",
        c(
          "keepalives" (
            keepalives_type
          ).as(:oneline),
          "no-keepalives"
        ),
        "traps",
        "no-traps",
        "accounting-profile" arg,
        c(
          "per-unit-scheduler",
          "no-per-unit-scheduler",
          "shared-scheduler",
          "hierarchical-scheduler" (
              c(
                  "maximum-hierarchy-levels" arg
              )
          ).as(:oneline)
        ),
        "schedulers" arg,
        "interface-transmit-statistics",
        "dce",
        c(
          "vlan-tagging",
          "stacked-vlan-tagging",
          "flexible-vlan-tagging",
          "vlan-vci-tagging"
        ),
        "native-vlan-id" arg,
        "speed" arg,
        "auto-configure" (
          auto_configure_vlan_type
        ),
        "mtu" arg,
        "hold-time" (
            c(
                "up" arg,
                "down" arg
            )
        ).as(:oneline),
        "satop-options" (
            c(
                "idle-pattern" arg,
                "payload-size" arg,
                "excessive-packet-loss-rate" (
                    c(
                        "threshold" arg,
                        "sample-period" arg
                    )
                ),
                c(
                  "jitter-buffer-packets" arg,
                  "jitter-buffer-latency" arg,
                  "jitter-buffer-auto-adjust"
                ),
                "bit-rate" arg
            )
        ),
        "ima-group-options",
        "ima-link-options",
        "multi-chassis-protection" (
          multi_chassis_protection_group
        ),
        "clocking" (
            c(
                c(
                  "internal",
                  "external" (
                      c(
                          "interface" (
                            interface_device
                          )
                      )
                  )
                )
            )
        ).as(:oneline),
        "link-mode" arg,
        "media-type" arg,
        "encapsulation" arg,
        "framing" (
            c(
                c(
                  "lan-phy",
                  "wan-phy",
                  "sonet",
                  "sdh"
                )
            )
        ),
        "unidirectional",
        "lmi" (
            c(
                "n391dte" arg,
                "n392dce" arg,
                "n392dte" arg,
                "n393dce" arg,
                "n393dte" arg,
                "t391dte" arg,
                "t392dce" arg,
                "lmi-type" arg
            )
        ),
        "mlfr-uni-nni-bundle-options" (
            c(
                "cisco-interoperability" (
                    c(
                        "send-lip-remove-link-for-link-reject"
                    )
                ),
                "mrru" arg,
                "yellow-differential-delay" arg,
                "red-differential-delay" arg,
                "action-red-differential-delay" arg,
                "fragment-threshold" arg,
                "drop-timeout" arg,
                "link-layer-overhead" (
                  unsigned_float
                ),
                "lmi-type" arg,
                "minimum-links" arg,
                "hello-timer" arg,
                "acknowledge-timer" arg,
                "acknowledge-retries" arg,
                "n391" arg,
                "n392" arg,
                "n393" arg,
                "t391" arg,
                "t392" arg
            )
        ),
        "mac" (
          mac_unicaset
        ),
        "receive-bucket" (
          dcd_rx_bucket_config
        ),
        "transmit-bucket" (
          dcd_tx_bucket_config
        ),
        "shared-interface",
        "sonet-options" (
          sonet_options_type
        ),
        "logical-tunnel-options" (
            c(
                "per-unit-mac-disable"
            )
        ),
        "aggregated-sonet-options" (
            c(
                "minimum-links" arg,
                "link-speed" arg,
                "minimum-bandwidth" arg
            )
        ),
        "atm-options" (
            c(
                "pic-type" arg,
                "cell-bundle-size" arg,
                "plp-to-clp",
                "use-null-cw",
                "promiscuous-mode" (
                    c(
                        "vpi" arg.as(:oneline)
                    )
                ),
                "vpi" arg (
                    c(
                        "maximum-vcs" arg,
                        "shaping" (
                          dcd_shaping_config
                        ),
                        "oam-period" (
                            c(
                                c(
                                  "oam-period" arg,
                                  "disable".as(:oneline)
                                )
                            )
                        ).as(:oneline),
                        "oam-liveness" (
                            c(
                                "up-count" arg,
                                "down-count" arg
                            )
                        )
                    )
                ),
                "ilmi",
                "linear-red-profiles" arg (
                    c(
                        "queue-depth" arg,
                        "high-plp-threshold" arg,
                        "low-plp-threshold" arg,
                        "high-plp-max-threshold" arg,
                        "low-plp-max-threshold" arg
                    )
                ).as(:oneline),
                "scheduler-maps" arg (
                    c(
                        "vc-cos-mode" arg,
                        "forwarding-class" arg (
                            c(
                                "priority" arg,
                                "transmit-weight" (
                                    c(
                                        c(
                                          "percent" arg,
                                          "cells" arg
                                        )
                                    )
                                ).as(:oneline),
                                c(
                                  "epd-threshold" (
                                    epd_threshold_config
                                  ).as(:oneline),
                                  "linear-red-profile" arg
                                )
                            )
                        )
                    )
                ),
                "mpls" (
                  mpls_ifd_options
                ),
                "payload-scrambler",
                "no-payload-scrambler"
            )
        ),
        "multiservice-options" (
            c(
                "syslog",
                "no-syslog",
                "core-dump",
                "no-core-dump",
                "flow-control-options" (
                    c(
                        "dump-on-flow-control",
                        "reset-on-flow-control",
                        "down-on-flow-control"
                    )
                )
            )
        ),
        "ggsn-options" (
            c(
                "syslog",
                "no-syslog",
                "core-dump",
                "no-core-dump"
            )
        ),
        "ppp-options" (
          ppp_options_type
        ),
        "redundancy-options",
        "load-balancing-options",
        "lsq-failure-options",
        "services-options" (
            c(
                "syslog" (
                  service_set_syslog_object
                ),
                "open-timeout" arg,
                "inactivity-timeout" arg,
                "inactivity-tcp-timeout" arg,
                "inactivity-asymm-tcp-timeout" arg,
                "inactivity-non-tcp-timeout" arg,
                "session-timeout" arg,
                "disable-global-timeout-override",
                "tcp-tickles" arg,
                "trio-flow-offload",
                "cgn-pic",
                "session-limit" (
                    c(
                        "maximum" arg,
                        "rate" arg
                    )
                ),
                "ignore-errors" (
                    c(
                        "tcp",
                        "alg"
                    )
                ).as(:oneline)
            )
        ),
        "t3-options" (
            c(
                "loopback" arg,
                "long-buildout",
                "no-long-buildout",
                "loop-timing",
                "no-loop-timing",
                "unframed",
                "no-unframed",
                "compatibility-mode" (
                    c(
                        c(
                          "larscom" (
                              c(
                                  "subrate" arg
                              )
                          ).as(:oneline),
                          "verilink" (
                              c(
                                  "subrate" arg
                              )
                          ).as(:oneline),
                          "adtran" (
                              c(
                                  "subrate" arg
                              )
                          ).as(:oneline),
                          "kentrox" (
                              c(
                                  "subrate" arg
                              )
                          ).as(:oneline),
                          "digital-link" (
                              c(
                                  "subrate" arg
                              )
                          ).as(:oneline)
                        )
                    )
                ).as(:oneline),
                "payload-scrambler",
                "no-payload-scrambler",
                "cbit-parity",
                "no-cbit-parity",
                "fcs" arg,
                "idle-cycle-flag" arg,
                "start-end-flag" arg,
                "feac-loop-respond",
                "no-feac-loop-respond",
                "bert-algorithm" arg,
                "bert-error-rate" arg,
                "bert-period" arg,
                "buildout" arg,
                "atm-encapsulation" arg
            )
        ),
        "e3-options" (
            c(
                "loopback" arg,
                "unframed",
                "no-unframed",
                "compatibility-mode" (
                    c(
                        c(
                          "larscom",
                          "digital-link" (
                              c(
                                  "subrate" arg
                              )
                          ).as(:oneline),
                          "kentrox" (
                              c(
                                  "subrate" arg
                              )
                          ).as(:oneline)
                        )
                    )
                ).as(:oneline),
                "payload-scrambler",
                "no-payload-scrambler",
                "fcs" arg,
                "idle-cycle-flag" arg,
                "invert-data",
                "start-end-flag" arg,
                "bert-algorithm" arg,
                "bert-error-rate" arg,
                "bert-period" arg,
                "buildout" arg,
                "atm-encapsulation" arg,
                "framing" arg
            )
        ),
        "e1-options" (
            c(
                "timeslots" arg,
                "loopback" arg,
                "framing" arg,
                "fcs" arg,
                "invert-data",
                "idle-cycle-flag" arg,
                "start-end-flag" arg,
                "bert-algorithm" arg,
                "bert-error-rate" arg,
                "bert-period" arg
            )
        ),
        "t1-options" (
            c(
                "timeslots" arg,
                "voice-timeslots" arg,
                "loopback" arg,
                "buildout" arg,
                "byte-encoding" arg,
                "line-encoding" arg,
                "invert-data",
                "framing" arg,
                "fcs" arg,
                "idle-cycle-flag" arg,
                "start-end-flag" arg,
                "bert-algorithm" arg,
                "bert-error-rate" arg,
                "bert-period" arg,
                "remote-loopback-respond",
                "crc-major-alarm-threshold" arg,
                "crc-minor-alarm-threshold" arg,
                "alarm-compliance" arg
            )
        ),
        "ds0-options" (
            c(
                "loopback" arg,
                "byte-encoding" arg,
                "invert-data",
                "fcs" arg,
                "idle-cycle-flag" arg,
                "start-end-flag" arg,
                "bert-algorithm" arg,
                "bert-error-rate" arg,
                "bert-period" arg
            )
        ),
        "serial-options" (
            c(
                "line-protocol" arg,
                c(
                  "dte-options" (
                      c(
                          "ignore-all",
                          "dtr" (
                              c(
                                  c(
                                    "assert",
                                    "de-assert",
                                    "normal",
                                    "auto-synchronize" (
                                        c(
                                            "duration" arg,
                                            "interval" arg
                                        )
                                    )
                                  )
                              )
                          ).as(:oneline),
                          "control-signal" arg,
                          "rts" arg,
                          "dcd" arg,
                          "dsr" arg,
                          "cts" arg,
                          "indication" arg,
                          "tm" arg
                      )
                  ),
                  "dce-options" (
                      c(
                          "ignore-all",
                          "dtr" arg,
                          "rts" arg,
                          "dcd" arg,
                          "dsr" arg,
                          "cts" arg,
                          "tm" arg,
                          "dce-loopback-override"
                      )
                  )
                ),
                "dtr-circuit" arg,
                "dtr-polarity" arg,
                "rts-polarity" arg,
                "control-polarity" arg,
                "dcd-polarity" arg,
                "dsr-polarity" arg,
                "cts-polarity" arg,
                "indication-polarity" arg,
                "tm-polarity" arg,
                "clocking-mode" arg,
                "transmit-clock" arg,
                "clock-rate" arg,
                "loopback" arg,
                "encoding" arg,
                "idle-cycle-flag" arg
            )
        ),
        "gratuitous-arp-reply",
        "no-gratuitous-arp-reply",
        "no-gratuitous-arp-request",
        "no-no-gratuitous-arp-request",
        "fibrechannel-options",
        b("ether-options" | "gigether-options",
            c(
                "loopback",
                "no-loopback",
                "flow-control",
                "no-flow-control",
                "source-filtering",
                "no-source-filtering",
                c(
                  "no-auto-negotiation",
                  "auto-negotiation" (
                      c(
                          "remote-fault" arg
                      )
                  ).as(:oneline)
                ),
                "mac-mode" arg,
                "asynchronous-notification",
                "source-address-filter" arg.as(:oneline),
                "redundant-parent" (
                    c(
                        "parent" (
                          interface_device
                        )
                    )
                ),
                "ieee-802.3ad" (
                    c(
                        "lacp" (
                            c(
                                "port-priority" arg
                            )
                        ),
                        "bundle" (
                          interface_device
                        ),
                        "link-index" arg,
                        c(
                          "primary",
                          "backup"
                        )
                    )
                ),
                "ethernet-switch-profile" (
                    c(
                        "tag-protocol-id" arg,
                        "ethernet-policer-profile" (
                            c(
                                "input-priority-map" (
                                  cos_policer_input_priority_map
                                ),
                                "output-priority-map" (
                                  cos_policer_output_priority_map
                                ),
                                "policer" (
                                  cos_policer
                                )
                            )
                        ),
                        "mac-learn-enable",
                        "no-mac-learn-enable"
                    )
                ),
                "mpls" (
                  mpls_ifd_options
                ),
                "ignore-l3-incompletes",
                "no-auto-mdix"
            )
        ),
        "optics-options" (
            c(
                "wavelength" arg,
                "alarm" ("low-light-alarm") (
                    c(
                        c(
                          "syslog",
                          "link-down"
                        )
                    )
                ),
                "warning" ("low-light-warning") (
                    c(
                        c(
                          "syslog",
                          "link-down"
                        )
                    )
                )
            )
        ),
        "otn-options" (
          otn_options_type
        ),
        "fastether-options" (
            c(
                "loopback",
                "no-loopback",
                "flow-control",
                "no-flow-control",
                "source-filtering",
                "no-source-filtering",
                "auto-negotiation",
                "no-auto-negotiation",
                "ingress-rate-limit" arg,
                "source-address-filter" arg.as(:oneline),
                "redundant-parent" (
                    c(
                        "parent" (
                          interface_device
                        )
                    )
                ),
                "ieee-802.3ad" (
                    c(
                        "lacp" (
                            c(
                                "port-priority" arg
                            )
                        ),
                        "bundle" (
                          interface_device
                        ),
                        c(
                          "primary",
                          "backup"
                        )
                    )
                ),
                "mpls" (
                  mpls_ifd_options
                ),
                "ignore-l3-incompletes"
            )
        ),
        "redundant-ether-options" (
            c(
                "redundancy-group" arg,
                "loopback",
                "no-loopback",
                "flow-control",
                "no-flow-control",
                "source-filtering",
                "no-source-filtering",
                "source-address-filter" arg.as(:oneline),
                "link-speed" arg,
                "minimum-links" arg,
                "lacp" (
                    c(
                        c(
                          "active",
                          "passive"
                        ),
                        "periodic" arg
                    )
                )
            )
        ),
        "aggregated-ether-options" (
            c(
                "loopback",
                "no-loopback",
                "flow-control",
                "no-flow-control",
                "source-filtering",
                "no-source-filtering",
                "link-protection",
                "no-link-protection",
                "source-address-filter".as(:oneline),
                "minimum-links" arg,
                "logical-interface-fpc-redundancy",
                "rebalance-periodic" (
                    c(
                        "start-time" (
                          time
                        ),
                        "interval" arg
                    )
                ),
                "link-speed" arg,
                "lacp" (
                    c(
                        c(
                          "active",
                          "passive"
                        ),
                        "periodic" arg,
                        "link-protection" (
                            c(
                                "disable",
                                c(
                                  "revertive",
                                  "non-revertive"
                                )
                            )
                        ),
                        "system-priority" arg,
                        "system-id" (
                          mac_addr
                        ),
                        "admin-key" arg
                    )
                ),
                "ethernet-switch-profile" (
                    c(
                        "tag-protocol-id" arg
                    )
                ),
                "mc-ae"
            )
        ),
        "es-options" (
            c(
                "backup-interface" (
                  interface_device
                )
            )
        ),
        "dsl-options" (
            c(
                "operating-mode" arg
            )
        ),
        "vdsl-options" (
            c(
                "vdsl-profile" arg
            )
        ),
        "shdsl-options" (
            c(
                "annex" arg,
                "line-rate" arg,
                "loopback" arg,
                "snr-margin" (
                    c(
                        "current" arg,
                        "snext" arg
                    )
                )
            )
        ),
        "data-input" (
            c(
                c(
                  "system",
                  "interface" (
                    interface_device
                  )
                )
            )
        ),
        "switch-options" (
            c(
                "switch-port" arg (
                    c(
                        "auto-negotiation",
                        "no-auto-negotiation",
                        "link-mode" arg,
                        "speed" arg,
                        "vlan-id" arg,
                        "cascade-port"
                    )
                )
            )
        ),
        "container-options" (
            c(
                "container-type" (
                    c(
                        c(
                          "aps" (
                            aps_type
                          )
                        )
                    )
                ),
                "member-interface-type" (
                    c(
                        c(
                          "sonet" (
                              c(
                                  "member-interface-speed" arg
                              )
                          ),
                          "atm" (
                              c(
                                  "member-interface-speed" arg
                              )
                          )
                        )
                    )
                ),
                "redundancy" (
                    c(
                        "hold-time" (
                            c(
                                "up" arg,
                                "down" arg
                            )
                        ).as(:oneline)
                    )
                ),
                "container-list" (
                  interface_device
                ),
                c(
                    "primary",
                    "standby"
                ),
                "allow-configuration-override"
            )
        ),
        "layer2-policer",
        "unit" ("$junos-underlying-interface-unit" | "$junos-interface-unit" | "interface-unit-number") (
            c(
                "peer-psd" (
                    c(
                        "psd-name" arg
                    )
                ).as(:oneline),
                "peer-interface" (
                    c(
                        "interface-name" (
                          interface_unit
                        )
                    )
                ),
                "interface-shared-with" (
                    c(
                        "psd-name" arg
                    )
                ),
                c(
                  "disable"
                ),
                "passive-monitor-mode",
                "per-session-scheduler",
                "clear-dont-fragment-bit",
                "reassemble-packets",
                "rpm",
                "description" arg,
                "metadata" arg,
                "dial-options",
                "demux-source" (
                      ("inet" | "inet6")
                ),
                "demux-destination" (
                      ("inet" | "inet6")
                ),
                "encapsulation" arg,
                "mtu" arg,
                c(
                  "point-to-point",
                  "multipoint"
                ),
                "bandwidth" arg,
                "global-layer2-domainid" arg,
                "radio-router" (
                  dynamic_ifbw_parms_type
                ),
                "traps",
                "no-traps",
                "arp-resp" (
                    c(
                        c(
                          "unrestricted",
                          "restricted"
                        )
                    )
                ).as(:oneline),
                "proxy-arp" (
                    c(
                        c(
                          "unrestricted",
                          "restricted"
                        )
                    )
                ).as(:oneline),
                c(
                  "vlan-id" arg,
                  "vlan-id-range" arg,
                  "vlan-id-list" arg,
                  "vlan-tags" (
                      c(
                          "outer" arg,
                          c(
                            "inner" arg,
                            "inner-range" arg,
                            "inner-list" arg
                          )
                      )
                  ).as(:oneline)
                ),
                "native-inner-vlan-id" arg,
                "inner-vlan-id-range".as(:oneline),
                "accept-source-mac" (
                    c(
                        "mac-address" (
                          mac_list
                        )
                    )
                ),
                "input-vlan-map" (
                  vlan_map
                ),
                "output-vlan-map" (
                  vlan_map
                ),
                "swap-by-poppush",
                "receive-lsp" arg,
                "transmit-lsp" arg,
                "dlci" arg,
                "multicast-dlci" arg,
                c(
                  "vci" (
                    atm_vci
                  ),
                  "allow-any-vci",
                  "vpi" arg,
                  "trunk-id" arg
                ),
                "no-vpivci-swapping",
                c(
                  "psn-vci" (
                    atm_vci
                  ),
                  "psn-vpi" arg
                ),
                "atm-l2circuit-mode" (
                    c(
                        c(
                          "cell",
                          "aal5"
                        )
                    )
                ).as(:oneline),
                "vci-range" (
                    c(
                        "start" arg,
                        "end" arg
                    )
                ).as(:oneline),
                "trunk-bandwidth" arg,
                "multicast-vci" (
                  atm_vci
                ),
                "shaping" (
                  dcd_shaping_config
                ),
                "oam-period" (
                    c(
                        c(
                          "oam-period" arg,
                          "disable".as(:oneline)
                        )
                    )
                ).as(:oneline),
                "oam-liveness" (
                    c(
                        "up-count" arg,
                        "down-count" arg
                    )
                ),
                "ppp-options" (
                  ppp_options_type
                ),
                "pppoe-options" (
                  pppoe_options_type
                ),
                "pppoe-underlying-options" (
                  pppoe_underlying_options_type
                ),
                "advisory-options" (
                  advisory_options_type
                ),
                "demux-options" (
                  demux_options_type
                ),
                "targetted-distribution",
                c(
                  "keepalives" (
                    keepalives_type
                  ).as(:oneline),
                  "no-keepalives"
                ),
                "inverse-arp",
                "transmit-weight" arg,
                "epd-threshold" (
                  epd_threshold_config
                ).as(:oneline),
                "cell-bundle-size" arg,
                "plp-to-clp",
                "atm-scheduler-map" arg,
                "mrru" arg,
                "short-sequence",
                "fragment-threshold" arg,
                "drop-timeout" arg,
                "disable-mlppp-inner-ppp-pfc",
                "minimum-links" arg,
                "multilink-max-classes" arg,
                "compression" (
                    c(
                        "rtp" (
                            c(
                                "f-max-period" arg,
                                "queues" arg,
                                "port" (
                                    c(
                                        "minimum" arg,
                                        "maximum" arg
                                    )
                                ).as(:oneline),
                                "maximum-contexts" (
                                    c(
                                        "number" arg
                                    )
                                ).as(:oneline)
                            )
                        )
                    )
                ),
                "interleave-fragments",
                "link-layer-overhead" (
                  unsigned_float
                ),
                "accounting-profile" arg,
                "peer-unit" arg,
                "tunnel" (
                    c(
                        "source" (
                          ipaddr
                        ),
                        "destination" (
                          ipaddr
                        ),
                        "key" arg,
                        "backup-destination" (
                          ipaddr
                        ),
                        c(
                          "allow-fragmentation",
                          "do-not-fragment"
                        ),
                        "ttl" arg,
                        "traffic-class" arg,
                        "flow-label" arg,
                        "path-mtu-discovery",
                        "no-path-mtu-discovery",
                        "routing-instance" (
                            c(
                                "destination" arg
                            )
                        )
                    )
                ),
                "compression-device" (
                  interface_unit
                ),
                "atm-policer",
                "layer2-policer",
                "filter",
                "multi-chassis-protection" (
                  multi_chassis_protection_group
                ),
                "family" (
                    c(
                        "inet" (
                            c(
                                "targeted-broadcast" (
                                    c(
                                        c(
                                          "forward-and-send-to-re",
                                          "forward-only"
                                        )
                                    )
                                ),
                                "receive-options-packets",
                                "receive-ttl-exceeded",
                                "accounting" (
                                    c(
                                        "source-class-usage" (
                                            c(
                                                "input",
                                                "output"
                                            )
                                        ),
                                        "destination-class-usage"
                                    )
                                ),
                                "mac-validate" arg,
                                "rpf-check" (
                                    c(
                                        "fail-filter" arg,
                                        "mode" (
                                            c(
                                                "loose"
                                            )
                                        ).as(:oneline)
                                    )
                                ),
                                "mtu" arg,
                                "no-redirects",
                                "no-neighbor-learn",
                                "unconditional-src-learn",
                                "multicast-only",
                                "primary",
                                "ipsec-sa" arg,
                                "demux-source",
                                "demux-destination",
                                "filter" (
                                    c(
                                        c(
                                          "input" (
                                              c(
                                                  "filter-name" arg,
                                                  "precedence" arg
                                              )
                                          ).as(:oneline),
                                          "input-list" arg
                                        ),
                                        c(
                                          "output" (
                                              c(
                                                  "filter-name" arg,
                                                  "precedence" arg
                                              )
                                          ).as(:oneline),
                                          "output-list" arg
                                        ),
                                        "adf" (
                                            c(
                                                "rule" arg,
                                                "counter",
                                                "input-precedence" arg,
                                                "output-precedence" arg
                                            )
                                        ),
                                        "group" arg,
                                        "dialer" arg
                                    )
                                ),
                                "simple-filter" (
                                    c(
                                        "input" arg
                                    )
                                ),
                                "input-hierarchical-policer" arg,
                                "policer" (
                                    c(
                                        "arp" arg,
                                        "input" arg,
                                        "output" arg
                                    )
                                ),
                                "sampling" (
                                    c(
                                        "input",
                                        "output"
                                    )
                                ),
                                "next-hop-tunnel" arg (
                                    c(
                                        "ipsec-vpn" arg
                                    )
                                ),
                                "address" arg (
                                    c(
                                        "destination" (
                                          ipv4addr
                                        ),
                                        "destination-profile" arg,
                                        "broadcast" (
                                          ipv4addr
                                        ),
                                        "primary",
                                        "preferred",
                                        "master-only",
                                        "multipoint-destination" arg (
                                            c(
                                                c(
                                                  "dlci" arg,
                                                  "vci" (
                                                    atm_vci
                                                  )
                                                ),
                                                "shaping" (
                                                  dcd_shaping_config
                                                ),
                                                "oam-period" (
                                                    c(
                                                        c(
                                                          "oam_period" arg,
                                                          "disable".as(:oneline)
                                                        )
                                                    )
                                                ).as(:oneline),
                                                "oam-liveness" (
                                                    c(
                                                        "up-count" arg,
                                                        "down-count" arg
                                                    )
                                                ),
                                                "inverse-arp",
                                                "transmit-weight" arg,
                                                "epd-threshold" (
                                                  epd_threshold_config
                                                ).as(:oneline)
                                            )
                                        ),
                                        "arp" arg (
                                            c(
                                                "l2-interface" (
                                                  interface_name
                                                ),
                                                c(
                                                  "mac" (
                                                    mac_unicaset
                                                  ),
                                                  "multicast-mac" (
                                                    mac_multicast
                                                  )
                                                ),
                                                "publish"
                                            )
                                        ).as(:oneline),
                                        "web-authentication" (
                                            c(
                                                "http",
                                                "https",
                                                "redirect-to-https"
                                            )
                                        ),
                                        "vrrp-group" (
                                          vrrp_group
                                        )
                                    )
                                ),
                                "unnumbered-address" (
                                    c(
                                        "source" (
                                          interface_unit
                                        ),
                                        "preferred-source-address" arg,
                                        "destination" (
                                          ipv4addr
                                        ),
                                        "destination-profile" arg
                                    )
                                ).as(:oneline),
                                "location-pool-address",
                                "negotiate-address",
                                "dhcp" (
                                    c(
                                        "client-identifier" (
                                            c(
                                                c(
                                                  "ascii" arg,
                                                  "hexadecimal" arg
                                                )
                                            )
                                        ).as(:oneline),
                                        "lease-time" arg,
                                        "retransmission-attempt" arg,
                                        "retransmission-interval" arg,
                                        "server-address" (
                                          ipv4addr
                                        ),
                                        "update-server",
                                        "vendor-id" arg
                                    )
                                ),
                                "dhcp-client" (
                                  dhcp_client_type
                                )
                            )
                        ),
                        "iso" (
                            c(
                                "address" arg,
                                "mtu" arg
                            )
                        ),
                        "inet6" (
                            c(
                                "rpf-check" (
                                    c(
                                        "fail-filter" arg,
                                        "mode" (
                                            c(
                                                "loose"
                                            )
                                        ).as(:oneline)
                                    )
                                ),
                                "accounting" (
                                    c(
                                        "source-class-usage" (
                                            c(
                                                "input",
                                                "output"
                                            )
                                        ),
                                        "destination-class-usage"
                                    )
                                ),
                                "mtu" arg,
                                "nd6-stale-time" arg,
                                "no-neighbor-learn",
                                "filter" (
                                    c(
                                        c(
                                          "input" (
                                              c(
                                                  "filter-name" arg,
                                                  "precedence" arg
                                              )
                                          ).as(:oneline),
                                          "input-list" arg
                                        ),
                                        c(
                                          "output" (
                                              c(
                                                  "filter-name" arg,
                                                  "precedence" arg
                                              )
                                          ).as(:oneline),
                                          "output-list" arg
                                        ),
                                        "adf" (
                                            c(
                                                "rule" arg,
                                                "counter",
                                                "input-precedence" arg,
                                                "output-precedence" arg
                                            )
                                        ),
                                        "group" arg,
                                        "dialer" arg
                                    )
                                ),
                                "input-hierarchical-policer" arg,
                                "policer" (
                                    c(
                                        "input" arg,
                                        "output" arg
                                    )
                                ),
                                "sampling" (
                                    c(
                                        "input",
                                        "output"
                                    )
                                ),
                                "address" arg (
                                    c(
                                        "destination" (
                                          ipv6addr
                                        ),
                                        "eui-64",
                                        "primary",
                                        "preferred",
                                        "master-only",
                                        "ndp" arg (
                                            c(
                                                "l2-interface" (
                                                  interface_name
                                                ),
                                                c(
                                                  "mac" (
                                                    mac_unicaset
                                                  ),
                                                  "multicast-mac" (
                                                    mac_multicast
                                                  )
                                                ),
                                                "publish"
                                            )
                                        ).as(:oneline),
                                        "vrrp-inet6-group" (
                                          vrrp_group
                                        ),
                                        "web-authentication" (
                                            c(
                                                "http",
                                                "https",
                                                "redirect-to-https"
                                            )
                                        )
                                    )
                                ),
                                "demux-source",
                                "demux-destination",
                                "unnumbered-address" (
                                    c(
                                        "source" (
                                          interface_unit
                                        ),
                                        "preferred-source-address" arg
                                    )
                                ).as(:oneline),
                                "dad-disable",
                                "no-dad-disable",
                                "dhcpv6-client" (
                                    c(
                                        "client-type" arg,
                                        "client-ia-type" ("ia-na" | "ia-pd"),
                                        "rapid-commit",
                                        "update-router-advertisement" (
                                            c(
                                                "interface" arg
                                            )
                                        ),
                                        "client-identifier" (
                                            c(
                                                "duid-type" arg
                                            )
                                        ).as(:oneline),
                                        "req-option" ("dns-server" | "domain" | "ntp-server" | "time-zone" | "sip-server" | "sip-domain" | "nis-server" | "nis-domain" | "fqdn" | "vendor-spec"),
                                        "update-server",
                                        "retransmission-attempt" arg
                                    )
                                )
                            )
                        ),
                        "mpls" (
                            c(
                                "mtu" arg,
                                "maximum-labels" arg,
                                "filter" (
                                    c(
                                        c(
                                          "input" arg,
                                          "input-list" arg
                                        ),
                                        c(
                                          "output" arg,
                                          "output-list" arg
                                        ),
                                        "group" arg,
                                        "dialer" arg
                                    )
                                ),
                                "input-hierarchical-policer" arg,
                                "policer" (
                                    c(
                                        "input" arg,
                                        "output" arg
                                    )
                                )
                            )
                        ),
                        "mlppp" (
                            c(
                                "bundle" (
                                  interface_unit
                                )
                            )
                        ),
                        "mlfr-end-to-end" (
                            c(
                                "bundle" (
                                  interface_unit
                                )
                            )
                        ),
                        "mlfr-uni-nni" (
                            c(
                                "bundle" (
                                  interface_unit
                                )
                            )
                        ),
                        "ccc" (
                            c(
                                "filter" (
                                    c(
                                        c(
                                          "input" arg,
                                          "input-list" arg
                                        ),
                                        c(
                                          "output" arg,
                                          "output-list" arg
                                        ),
                                        "group" arg
                                    )
                                ),
                                "policer" (
                                    c(
                                        "input" arg,
                                        "output" arg
                                    )
                                ),
                                "translate-fecn-and-becn",
                                c(
                                  "translate-discard-eligible",
                                  "translate-plp-control-word-de"
                                ),
                                "keep-address-and-control"
                            )
                        ),
                        "tcc" (
                            c(
                                "policer" (
                                    c(
                                        "input" arg,
                                        "output" arg
                                    )
                                ),
                                "proxy" (
                                    c(
                                        "inet-address" (
                                          ipv4addr
                                        )
                                    )
                                ),
                                "remote" (
                                    c(
                                        "inet-address" (
                                          ipv4addr
                                        ),
                                        "mac-address" (
                                          mac_addr
                                        )
                                    )
                                ),
                                "protocols"
                            )
                        ),
                        "vpls" (
                            c(
                                "core-facing",
                                "filter" (
                                    c(
                                        c(
                                          "input" (
                                              c(
                                                  "filter-name" arg,
                                                  "precedence" arg
                                              )
                                          ).as(:oneline),
                                          "input-list" arg
                                        ),
                                        c(
                                          "output" (
                                              c(
                                                  "filter-name" arg,
                                                  "precedence" arg
                                              )
                                          ).as(:oneline),
                                          "output-list" arg
                                        ),
                                        "adf" (
                                            c(
                                                "rule" arg,
                                                "counter",
                                                "input-precedence" arg,
                                                "output-precedence" arg
                                            )
                                        ),
                                        "group" arg
                                    )
                                ),
                                "policer" (
                                    c(
                                        "input" arg,
                                        "output" arg
                                    )
                                )
                            )
                        ),
                        "bridge" (
                            c(
                                "core-facing",
                                "filter" (
                                    c(
                                        c(
                                          "input" (
                                              c(
                                                  "filter-name" arg,
                                                  "precedence" arg
                                              )
                                          ).as(:oneline),
                                          "input-list" arg
                                        ),
                                        c(
                                          "output" (
                                              c(
                                                  "filter-name" arg,
                                                  "precedence" arg
                                              )
                                          ).as(:oneline),
                                          "output-list" arg
                                        ),
                                        "adf" (
                                            c(
                                                "rule" arg,
                                                "counter",
                                                "input-precedence" arg,
                                                "output-precedence" arg
                                            )
                                        ),
                                        "group" arg
                                    )
                                ),
                                "policer" (
                                    c(
                                        "input" arg,
                                        "output" arg
                                    )
                                ),
                                "interface-mode" arg,
                                "bridge-domain-type" arg,
                                c(
                                  "vlan-id" arg,
                                  "vlan-id-list" arg,
                                  "inner-vlan-id-list" arg
                                ),
                                "vlan-rewrite" (
                                    c(
                                        "translate" arg (
                                            c(
                                                "to-vlan-id" arg
                                            )
                                        ).as(:oneline)
                                    )
                                ),
                                c(
                                  "isid-list" arg
                                ),
                                "storm-control" (
                                  storm_control
                                )
                            )
                        ),
                        "ethernet-switching" (
                          ethernet_switching_type
                        ),
                        "fibre-channel" (
                          fibre_channel_type
                        ),
                        "pppoe" (
                          pppoe_underlying_options_type
                        ),
                        "any" (
                            c(
                                "filter" (
                                    c(
                                        "input" arg,
                                        "group" arg
                                    )
                                )
                            )
                        )
                    )
                ),
                "service-domain" arg,
                "copy-tos-to-outer-ip-header",
                "dialer-options" (
                    c(
                        "pool" arg,
                        "dial-string" arg,
                        "incoming-map" (
                            c(
                                c(
                                  "caller" arg.as(:oneline),
                                  "accept-all"
                                )
                            )
                        ),
                        "callback",
                        "callback-wait-period" arg,
                        "redial-delay" arg,
                        "idle-timeout" arg,
                        "watch-list" arg,
                        "load-threshold" arg,
                        "load-interval" arg,
                        "activation-delay" arg,
                        "deactivation-delay" arg,
                        "initial-route-check" arg
                    )
                ),
                "backup-options" (
                    c(
                        "interface" (
                          interface_name
                        )
                    )
                ),
                "dynamic-call-admission-control"
            )
        ),
        "no-partition" (
            c(
                "interface-type" arg
            )
        ).as(:oneline),
        "partition" arg (
            c(
                "oc-slice" arg,
                "timeslots" arg,
                "interface-type" arg
            )
        ).as(:oneline),
        "modem-options" (
            c(
                "init-command-string" arg,
                "dialin" arg
            )
        ),
        "isdn-options" (
            c(
                "switch-type" arg,
                "media-type" arg,
                "spid1" arg,
                "spid2" arg,
                "calling-number" arg,
                "incoming-called-number" arg (
                    c(
                        "reject"
                    )
                ).as(:oneline),
                "tei-option" arg,
                "static-tei-val" arg,
                "t310" arg,
                "bchannel-allocation" arg
            )
        ),
        "dialer-options" (
            c(
                "pool" arg (
                    c(
                        "priority" arg
                    )
                ).as(:oneline)
            )
        ),
        "redundant-pseudo-interface-options" (
            c(
                "redundancy-group" arg
            )
        ),
        "cellular-options"
    )
  )
end

rule(:ip_monitoring_address_type) do
  arg.as(:arg) (
    c(
        "weight" arg,
        "interface" (
            s(
              "logical-interface-name" arg,
              "secondary-ip-address" arg
            )
        )
    )
  )
end

rule(:jsrc_partition_definition) do
    c(
        "partition"
    )
end

rule(:juniper_access_options) do
    c(
        "radius-server" (
          access_radius_server_object
        ),
        "radius-disconnect-port" arg,
        "radius-disconnect" (
          radius_disconnect_object
        ),
        "address-pool" (
          address_pool_object
        ),
        "group-profile" (
          group_profile_object
        ),
        "profile" arg (
            c(
                "accounting-order" arg,
                "authentication-order" arg,
                "authorization-order",
                "provisioning-order" arg,
                "client" (
                  access_client_object
                ),
                "address-assignment" (
                    c(
                        "pool" arg
                    )
                ),
                "radius" (
                    c(
                        "authentication-server" (
                          ipv4addr
                        ),
                        "accounting-server" (
                          ipv4addr
                        ),
                        "options",
                        "attributes" (
                            c(
                                "ignore" (
                                    c(
                                        "output-filter",
                                        "input-filter",
                                        "framed-ip-netmask",
                                        "logical-system-routing-instance",
                                        "dynamic-iflset-name"
                                    )
                                ),
                                "exclude" (
                                    c(
                                        "accounting-authentic" arg,
                                        "accounting-delay-time" arg,
                                        "accounting-session-id" arg,
                                        "accounting-terminate-cause" arg,
                                        "called-station-id" arg,
                                        "calling-station-id" arg,
                                        "class" arg,
                                        "delegated-ipv6-prefix" arg,
                                        "dhcp-options" arg,
                                        "dhcp-gi-address" arg,
                                        "dhcp-mac-address" arg,
                                        "output-filter" arg,
                                        "event-time-stamp" arg,
                                        "framed-ip-address" arg,
                                        "framed-ip-netmask" arg,
                                        "framed-ip-route" arg,
                                        "framed-ipv6-pool" arg,
                                        "framed-ipv6-prefix" arg,
                                        "framed-ipv6-route" arg,
                                        "framed-pool" arg,
                                        "input-filter" arg,
                                        "input-gigapackets" arg,
                                        "input-gigawords" arg,
                                        "input-ipv6-packets" arg,
                                        "input-ipv6-gigawords" arg,
                                        "input-ipv6-octets" arg,
                                        "interface-description" arg,
                                        "nas-identifier" arg,
                                        "nas-port" arg,
                                        "nas-port-id" arg,
                                        "nas-port-type" arg,
                                        "output-gigapackets" arg,
                                        "output-gigawords" arg,
                                        "output-ipv6-packets" arg,
                                        "output-ipv6-gigawords" arg,
                                        "output-ipv6-octets" arg,
                                        "dynamic-iflset-name" arg,
                                        "dsl-forum-attributes" arg,
                                        "l2c-upstream-data" arg,
                                        "l2c-downstream-data" arg,
                                        "acc-loop-cir-id" arg,
                                        "acc-aggr-cir-id-bin" arg,
                                        "acc-aggr-cir-id-asc" arg,
                                        "act-data-rate-up" arg,
                                        "act-data-rate-dn" arg,
                                        "min-data-rate-up" arg,
                                        "min-data-rate-dn" arg,
                                        "att-data-rate-up" arg,
                                        "att-data-rate-dn" arg,
                                        "max-data-rate-up" arg,
                                        "max-data-rate-dn" arg,
                                        "min-lp-data-rate-up" arg,
                                        "min-lp-data-rate-dn" arg,
                                        "max-interlv-delay-up" arg,
                                        "act-interlv-delay-up" arg,
                                        "max-interlv-delay-dn" arg,
                                        "act-interlv-delay-dn" arg,
                                        "dsl-line-state" arg,
                                        "dsl-type" arg,
                                        "downstream-calculated-qos-rate" arg,
                                        "upstream-calculated-qos-rate" arg,
                                        "framed-interface-id" arg
                                    )
                                )
                            )
                        )
                    )
                ),
                "session-options" (
                    c(
                        "client-group" arg,
                        "client-idle-timeout" arg,
                        "client-session-timeout" arg
                    )
                ),
                "client-name-filter" (
                  access_client_name_filter_object
                ),
                "ldap-options" (
                  access_ldap_options
                ),
                "ldap-server" (
                  ldap_server_object
                ),
                "radius-server" (
                  profile_radius_server_object
                ),
                "radius-options" (
                  access_radius_options
                ),
                "accounting" (
                    c(
                        "order" arg,
                        "accounting-stop-on-failure",
                        "accounting-stop-on-access-deny",
                        "immediate-update",
                        "coa-immediate-update",
                        "update-interval" arg,
                        "statistics" arg,
                        "duplication"
                    )
                ),
                "service"
            )
        ),
        "address-assignment" (
          address_assignment_type
        ),
        "address-protection",
        "tunnel-profile",
        "domain" (
          domain_map_type
        ),
        "ppp-options" (
            c(
                "compliance" (
                    c(
                        "rfc" arg
                    )
                )
            )
        ),
        "gx-plus" (
          gx_plus_definition
        ),
        "terminate-code" (
            c(
                "aaa" (
                    c(
                        "deny" (
                            c(
                                "authentication-denied" (
                                    c(
                                        "radius" (
                                            c(
                                                "acct-terminate-cause" arg
                                            )
                                        ).as(:oneline)
                                    )
                                ),
                                "no-resources" (
                                    c(
                                        "radius" (
                                            c(
                                                "acct-terminate-cause" arg
                                            )
                                        ).as(:oneline)
                                    )
                                ),
                                "server-request-timeout" (
                                    c(
                                        "radius" (
                                            c(
                                                "acct-terminate-cause" arg
                                            )
                                        ).as(:oneline)
                                    )
                                )
                            )
                        ),
                        "shutdown" (
                            c(
                                "administrative-reset" (
                                    c(
                                        "radius" (
                                            c(
                                                "acct-terminate-cause" arg
                                            )
                                        ).as(:oneline)
                                    )
                                ),
                                "remote-reset" (
                                    c(
                                        "radius" (
                                            c(
                                                "acct-terminate-cause" arg
                                            )
                                        ).as(:oneline)
                                    )
                                )
                            )
                        )
                    )
                ),
                "dhcp" (
                    c(
                        "client-request" (
                            c(
                                "radius" (
                                    c(
                                        "acct-terminate-cause" arg
                                    )
                                ).as(:oneline)
                            )
                        ),
                        "lost-carrier" (
                            c(
                                "radius" (
                                    c(
                                        "acct-terminate-cause" arg
                                    )
                                ).as(:oneline)
                            )
                        ),
                        "nak" (
                            c(
                                "radius" (
                                    c(
                                        "acct-terminate-cause" arg
                                    )
                                ).as(:oneline)
                            )
                        ),
                        "nas-logout" (
                            c(
                                "radius" (
                                    c(
                                        "acct-terminate-cause" arg
                                    )
                                ).as(:oneline)
                            )
                        ),
                        "no-offers" (
                            c(
                                "radius" (
                                    c(
                                        "acct-terminate-cause" arg
                                    )
                                ).as(:oneline)
                            )
                        )
                    )
                ),
                "l2tp",
                "ppp"
            )
        ),
        "radius-options" (
          access_radius_options
        ),
        "ldap-options" (
          access_ldap_options
        ),
        "ldap-server" (
          ldap_server_object
        ),
        "securid-server" (
          securid_server_object
        ),
        "firewall-authentication" (
            c(
                "pass-through" (
                    c(
                        "default-profile" arg,
                        "ftp" (
                          banner_object
                        ),
                        "telnet" (
                          banner_object
                        ),
                        "http" (
                          banner_object
                        )
                    )
                ),
                "web-authentication" (
                    c(
                        "default-profile" arg,
                        "banner" (
                            c(
                                "success" arg
                            )
                        )
                    )
                ),
                "traceoptions" (
                    c(
                        "no-remote-trace",
                        "file" (
                            c(
                                "filename" arg,
                                "size" arg,
                                "files" arg,
                                "world-readable",
                                "no-world-readable",
                                "match" (
                                  regular_expression
                                )
                            )
                        ).as(:oneline),
                        "flag" ("configuration" | "setup" | "authentication" | "all").as(:oneline)
                    )
                )
            )
        )
    )
end

rule(:access_client_name_filter_object) do
    c(
        "domain-name" arg,
        "separator" arg,
        "count" arg
    )
end

rule(:access_client_object) do
  arg.as(:arg) (
    c(
        "no-rfc2486",
        "chap-secret" (
          unreadable
        ),
        "pap-password" (
          unreadable
        ),
        c(
          "ppp",
          "l2tp"
        ),
        "group-profile" arg,
        "user-group-profile" arg,
        "xauth" (
            c(
                "ip-address" (
                  ipv4prefix
                )
            )
        ),
        "client-group" arg,
        "firewall-user" (
            c(
                "password" arg
            )
        )
    )
  )
end

rule(:access_ldap_options) do
    c(
        "revert-interval" arg,
        "base-distinguished-name" arg,
        c(
          "assemble" (
              c(
                  "common-name" arg
              )
          ),
          "search" (
              c(
                  "search-filter" arg,
                  "admin-search" (
                      c(
                          "distinguished-name" arg,
                          "password" (
                            unreadable
                          )
                      )
                  )
              )
          )
        )
    )
end

rule(:access_radius_options) do
    c(
        "revert-interval" arg,
        "request-rate" arg
    )
end

rule(:access_radius_server_object) do
  arg.as(:arg) (
    c(
        "port" arg,
        "accounting-port" arg,
        "secret" (
          unreadable
        ),
        "timeout" arg,
        "retry" arg,
        "max-outstanding-requests" arg,
        "source-address" (
          ipaddr
        ),
        "routing-instance" arg
    )
  )
end

rule(:address_assignment_type) do
    c(
        "neighbor-discovery-router-advertisement" (
            c(
                "ndra-name" arg
            )
        ).as(:oneline),
        "high-utilization" arg,
        "abated-utilization" arg,
        "high-utilization-v6" arg,
        "abated-utilization-v6" arg,
        "pool" arg (
            c(
                "link" arg,
                "family" (
                    c(
                        c(
                          "inet" (
                              c(
                                  "network" (
                                    ipv4prefix
                                  ),
                                  "range" arg (
                                      c(
                                          "low" (
                                            ipv4addr
                                          ),
                                          "high" (
                                            ipv4addr
                                          )
                                      )
                                  ),
                                  "dhcp-attributes" (
                                    dhcp_attribute_type
                                  ),
                                  "xauth-attributes" (
                                      c(
                                          "primary-dns" (
                                            ipv4prefix
                                          ),
                                          "secondary-dns" (
                                            ipv4prefix
                                          ),
                                          "primary-wins" (
                                            ipv4prefix
                                          ),
                                          "secondary-wins" (
                                            ipv4prefix
                                          )
                                      )
                                  ),
                                  "host" arg (
                                      c(
                                          "hardware-address" (
                                            mac_addr
                                          ),
                                          "ip-address" (
                                            ipv4addr
                                          )
                                      )
                                  )
                              )
                          ),
                          "inet6" (
                              c(
                                  "prefix" (
                                    ipv6prefix_mandatory
                                  ),
                                  "range" arg (
                                      c(
                                          "low" (
                                            ipv6prefix_mandatory
                                          ),
                                          "high" (
                                            ipv6prefix_mandatory
                                          ),
                                          "prefix-length" arg
                                      )
                                  ),
                                  "dhcp-attributes" (
                                    dhcp_attribute_type
                                  )
                              )
                          )
                        )
                    )
                )
            )
        ),
        "location-pool"
    )
end

rule(:address_pool_object) do
  arg.as(:arg) (
    c(
        c(
          "address" (
            ipv4prefix
          ),
          "address-range" (
              c(
                  "low" (
                    ipv4addr
                  ),
                  "high" (
                    ipv4addr
                  ),
                  "mask" (
                    ipv4addr
                  )
              )
          ).as(:oneline)
        ),
        "primary-dns" (
          hostname
        ),
        "secondary-dns" (
          hostname
        ),
        "primary-wins" (
          hostname
        ),
        "secondary-wins" (
          hostname
        )
    )
  )
end

rule(:banner_object) do
    c(
        "banner" (
            c(
                "login" arg,
                "success" arg,
                "fail" arg
            )
        )
    )
end

rule(:dhcp_attribute_type) do
    c(
        "option-match" (
            c(
                "option-82" (
                    c(
                        "circuit-id" arg (
                            c(
                                "range" arg
                            )
                        ).as(:oneline),
                        "remote-id" arg (
                            c(
                                "range" arg
                            )
                        ).as(:oneline)
                    )
                )
            )
        ),
        "maximum-lease-time" arg,
        "next-server" (
          ipv4addr
        ),
        "server-identifier" (
          ipv4addr
        ),
        "grace-period" arg,
        "domain-name" arg,
        "name-server" arg,
        "wins-server" arg,
        "router" arg,
        "boot-file" arg,
        "boot-server" arg,
        "tftp-server" (
          ipv4addr
        ),
        "netbios-node-type" arg,
        "sip-server" (
            c(
                "name" arg,
                "ip-address" arg
            )
        ),
        "sip-server-domain-name" arg,
        "sip-server-address" arg,
        "dns-server" arg,
        "propagate-settings" (
          interface_name
        ),
        "propagate-ppp-settings" (
          interface_name
        ),
        "option" arg (
            c(
                c(
                  "flag" arg,
                  "byte" arg,
                  "short" arg,
                  "unsigned-short" arg,
                  "integer" arg,
                  "unsigned-integer" arg,
                  "hex-string" arg,
                  "string" arg,
                  "ip-address" (
                    ipv4addr
                  ),
                  "ipv6-address" (
                    ipv6addr
                  ),
                  "array" (
                      c(
                          c(
                            "flag" arg,
                            "byte" arg,
                            "short" arg,
                            "unsigned-short" arg,
                            "integer" arg,
                            "unsigned-integer" arg,
                            "hex-string" arg,
                            "string" arg,
                            "ip-address" (
                              ipv4addr
                            ),
                            "ipv6-address" (
                              ipv6addr
                            )
                          )
                      )
                  )
                )
            )
        ).as(:oneline)
    )
end

rule(:domain_map_type) do
    c(
        "map" arg (
            c(
                c(
                  "aaa-routing-instance" arg,
                  "aaa-logical-system" arg (
                      c(
                          "aaa-routing-instance" arg
                      )
                  )
                ),
                "access-profile" arg,
                "address-pool" arg,
                "dynamic-profile" arg,
                "padn" arg (
                    c(
                        "mask" (
                          ipv4addr
                        ),
                        "metric" arg
                    )
                ),
                c(
                  "target-routing-instance" arg,
                  "target-logical-system" arg (
                      c(
                          "target-routing-instance" arg
                      )
                  )
                ),
                "strip-domain",
                "tunnel-profile" arg
            )
        ),
        "delimiter" (
            c(
                "characters" arg
            )
        ).as(:oneline),
        "parse-direction" (
            c(
                c(
                  "left-to-right",
                  "right-to-left"
                )
            )
        ).as(:oneline)
    )
end

rule(:group_profile_object) do
  arg.as(:arg) (
    c(
        "ppp" (
            c(
                "framed-pool" arg,
                "idle-timeout" arg,
                "ppp-options" (
                    c(
                        "pap",
                        "chap"
                    )
                ),
                "keepalive" arg,
                "primary-dns" arg,
                "secondary-dns" arg,
                "primary-wins" arg,
                "secondary-wins" arg,
                "encapsulation-overhead" arg,
                "cell-overhead",
                "interface-id" arg
            )
        ),
        "l2tp"
    )
  )
end

rule(:gx_plus_definition) do
    c(
        "partition" arg (
            c(
                "diameter-instance" arg,
                "destination-realm" arg,
                "destination-host" arg
            )
        ),
        "global" (
            c(
                "max-outstanding-requests" arg
            )
        )
    )
end

rule(:juniper_bridge_domains) do
  arg.as(:arg) (
    c(
        "description" arg,
        "domain-type" arg,
        c(
          "vlan-id" arg,
          "vlan-tags" (
              c(
                  "outer" arg,
                  "inner" arg
              )
          ).as(:oneline),
          "vlan-id-list" arg
        ),
        "service-id" arg,
        "no-local-switching",
        "no-irb-layer-2-copy",
        "interface" ("$junos-interface-name" | "interface-name"),
        "routing-interface" (
          interface_unit
        ),
        "forwarding-options" (
          juniper_bridge_forwarding_options
        ),
        "multicast-snooping-options" (
          juniper_multicast_snooping_options
        ),
        "bridge-options" (
          juniper_protocols_bd
        ),
        "protocols" (
            c(
                "igmp-snooping" (
                  juniper_protocols_igmp_snooping
                )
            )
        )
    )
  )
end

rule(:juniper_bridge_forwarding_options) do
    c(
        "filter" (
            c(
                "input" arg
            )
        ),
        "flood" (
            c(
                "input" arg
            )
        ),
        "dhcp-relay" (
          jdhcp_relay_type
        )
    )
end

rule(:jdhcp_relay_type) do
    c(
        "duplicate-clients-on-interface",
        "dhcpv6" (
          dhcpv6_relay_type
        ),
        "forward-snooped-clients".as(:oneline),
        "authentication" (
          authentication_type
        ),
        "liveness-detection" (
          dhcp_liveness_detection_type
        ),
        "dynamic-profile" (
          dynamic_profile_type
        ).as(:oneline),
        "service-profile" arg,
        "overrides" (
          override_type
        ),
        "relay-option-60" (
          relay_option_60_type_top
        ),
        "relay-option-82" (
          relay_option_82_type
        ),
        "server-group" (
          server_group_type
        ),
        "active-server-group" arg,
        "group" (
          dhcp_group
        )
    )
end

rule(:authentication_type) do
    c(
        "password" arg,
        "username-include" (
            c(
                "delimiter" arg,
                "domain-name" arg,
                "user-prefix" arg,
                "mac-address",
                "option-82" (
                    c(
                        "circuit-id",
                        "remote-id"
                    )
                ).as(:oneline),
                "logical-system-name",
                "routing-instance-name",
                "option-60",
                "circuit-type",
                "interface-name"
            )
        )
    )
end

rule(:dhcp_group) do
  arg.as(:arg) (
    c(
        "active-server-group" arg,
        "authentication" (
          authentication_type
        ),
        "liveness-detection" (
          dhcp_liveness_detection_type
        ),
        "dynamic-profile" (
          dynamic_profile_type
        ).as(:oneline),
        "service-profile" arg,
        "overrides" (
          override_type
        ),
        "relay-option-60" (
          relay_option_60_type_group
        ),
        "relay-option-82" (
          relay_option_82_type
        ),
        "interface" arg (
            c(
                "upto" (
                  interface_name
                ),
                "exclude",
                "trace",
                "overrides" (
                  override_type
                ),
                "dynamic-profile" (
                  dynamic_profile_type
                ).as(:oneline),
                "service-profile" arg
            )
        )
    )
  )
end

rule(:dhcp_liveness_detection_type) do
    c(
        "failure-action" (
          dhcp_liveness_detection_failure_action_type
        ).as(:oneline),
        "method" (
            c(
                c(
                  "bfd" (
                    dhcp_bfd_liveness_detection_type
                  )
                )
            )
        )
    )
end

rule(:dhcp_bfd_liveness_detection_type) do
    c(
        "version" arg,
        "minimum-interval" arg,
        "minimum-receive-interval" arg,
        "multiplier" arg,
        c(
          "no-adaptation"
        ),
        "transmit-interval" (
            c(
                "minimum-interval" arg,
                "threshold" arg
            )
        ),
        "detection-time" (
            c(
                "threshold" arg
            )
        ),
        "session-mode" arg,
        "holddown-interval" arg
    )
end

rule(:dhcp_liveness_detection_failure_action_type) do
    c(
        c(
          "clear-binding",
          "clear-binding-if-interface-up",
          "log-only"
        )
    ).as(:oneline)
end

rule(:dhcpv6_relay_type) do
    c(
        "authentication" (
          dhcpv6_authentication_type
        ),
        "liveness-detection" (
          dhcpv6_liveness_detection_type
        ),
        "dynamic-profile" (
          dynamic_profile_type
        ).as(:oneline),
        "service-profile" arg,
        "overrides" (
          dhcpv6_override_relay_type
        ),
        "group" (
          dhcpv6_relay_group
        ),
        "relay-agent-interface-id" (
          v6_relay_option_interface_id_type
        ),
        "server-group" (
          v6_server_group_type
        ),
        "active-server-group" arg
    )
end

rule(:dhcpv6_authentication_type) do
    c(
        "password" arg,
        "username-include" (
            c(
                "delimiter" arg,
                "domain-name" arg,
                "user-prefix" arg,
                "client-id",
                "relay-agent-remote-id",
                "logical-system-name",
                "routing-instance-name",
                "relay-agent-subscriber-id",
                "relay-agent-interface-id",
                "circuit-type",
                "interface-name"
            )
        )
    )
end

rule(:dhcpv6_liveness_detection_type) do
    c(
        "failure-action" (
          dhcp_liveness_detection_failure_action_type
        ).as(:oneline),
        "method" (
            c(
                c(
                  "bfd" (
                    dhcp_bfd_liveness_detection_type
                  )
                )
            )
        )
    )
end

rule(:dhcpv6_override_relay_type) do
    c(
        "allow-snooped-clients",
        "no-allow-snooped-clients",
        "interface-client-limit" arg,
        "no-bind-on-request",
        "send-release-on-delete"
    )
end

rule(:dhcpv6_relay_group) do
  arg.as(:arg) (
    c(
        "active-server-group" arg,
        "authentication" (
          dhcpv6_authentication_type
        ),
        "liveness-detection" (
          dhcpv6_liveness_detection_type
        ),
        "dynamic-profile" (
          dynamic_profile_type
        ).as(:oneline),
        "service-profile" arg,
        "overrides" (
          dhcpv6_override_relay_type
        ),
        "relay-agent-interface-id" (
          v6_relay_option_interface_id_type
        ),
        "interface" arg (
            c(
                "upto" (
                  interface_name
                ),
                "exclude",
                "trace",
                "overrides" (
                  dhcpv6_override_relay_type
                ),
                "dynamic-profile" (
                  dynamic_profile_type
                ).as(:oneline),
                "service-profile" arg
            )
        )
    )
  )
end

rule(:dynamic_profile_type) do
    c(
        "dynamic-profile" arg,
        c(
          "use-primary" arg,
          "aggregate-clients" (
              c(
                  c(
                    "merge",
                    "replace"
                  )
              )
          )
        )
    ).as(:oneline)
end

rule(:juniper_class_of_service_options) do
    c(
        "forwarding-policy" (
            c(
                "next-hop-map" arg (
                    c(
                        "forwarding-class" arg (
                            c(
                                "next-hop" (
                                  ipaddr_or_interface
                                ),
                                "lsp-next-hop" arg,
                                "non-lsp-next-hop",
                                "discard"
                            )
                        )
                    )
                ),
                "class" arg (
                    c(
                        "classification-override" (
                            c(
                                "forwarding-class" arg
                            )
                        )
                    )
                )
            )
        ),
        "classifiers" (
            c(
                "dscp" arg (
                    c(
                        "import" arg,
                        "forwarding-class" arg (
                            c(
                                "loss-priority" ("low" | "high" | "medium-low" | "medium-high") (
                                    c(
                                        "code-points" arg
                                    )
                                ).as(:oneline)
                            )
                        )
                    )
                ),
                "dscp-ipv6" arg (
                    c(
                        "import" arg,
                        "forwarding-class" arg (
                            c(
                                "loss-priority" ("low" | "high" | "medium-low" | "medium-high") (
                                    c(
                                        "code-points" arg
                                    )
                                ).as(:oneline)
                            )
                        )
                    )
                ),
                "exp" arg (
                    c(
                        "import" arg,
                        "forwarding-class" arg (
                            c(
                                "loss-priority" ("low" | "high" | "medium-low" | "medium-high") (
                                    c(
                                        "code-points" arg
                                    )
                                ).as(:oneline)
                            )
                        )
                    )
                ),
                "ieee-802.1" arg (
                    c(
                        "import" arg,
                        "forwarding-class" arg (
                            c(
                                "loss-priority" ("low" | "high" | "medium-low" | "medium-high") (
                                    c(
                                        "code-points" arg
                                    )
                                ).as(:oneline)
                            )
                        )
                    )
                ),
                "inet-precedence" arg (
                    c(
                        "import" arg,
                        "forwarding-class" arg (
                            c(
                                "loss-priority" ("low" | "high" | "medium-low" | "medium-high") (
                                    c(
                                        "code-points" arg
                                    )
                                ).as(:oneline)
                            )
                        )
                    )
                ),
                "ieee-802.1ad" arg (
                    c(
                        "import" arg,
                        "forwarding-class" arg (
                            c(
                                "loss-priority" ("low" | "high" | "medium-low" | "medium-high") (
                                    c(
                                        "code-points" arg
                                    )
                                ).as(:oneline)
                            )
                        )
                    )
                )
            )
        ),
        "forwarding-class-map",
        "loss-priority-maps" (
            c(
                "frame-relay-de" arg (
                    c(
                        "loss-priority" ("low" | "high" | "medium-low" | "medium-high") (
                            c(
                                "code-points" arg
                            )
                        ).as(:oneline)
                    )
                )
            )
        ),
        "loss-priority-rewrites",
        "code-point-aliases" (
            c(
                "dscp" arg (
                    c(
                        "bits" arg
                    )
                ).as(:oneline),
                "dscp-ipv6" arg (
                    c(
                        "bits" arg
                    )
                ).as(:oneline),
                "exp" arg (
                    c(
                        "bits" arg
                    )
                ).as(:oneline),
                "ieee-802.1" arg (
                    c(
                        "bits" arg
                    )
                ).as(:oneline),
                "inet-precedence" arg (
                    c(
                        "bits" arg
                    )
                ).as(:oneline),
                "ieee-802.1ad" arg (
                    c(
                        "bits" arg
                    )
                ).as(:oneline)
            )
        ),
        "translation-table" (
            c(
                "to-802.1p-from-dscp" arg (
                    c(
                        "to-code-point" arg (
                            c(
                                "from-code-points" arg
                            )
                        ).as(:oneline)
                    )
                ),
                "to-inet-precedence-from-inet-precedence",
                "to-dscp-from-dscp",
                "to-dscp-ipv6-from-dscp-ipv6",
                "to-exp-from-exp"
            )
        ),
        "host-outbound-traffic" (
            c(
                "forwarding-class" arg,
                "dscp-code-point" arg,
                "translation-table" (
                    c(
                        "to-802.1p-from-dscp" arg
                    )
                ).as(:oneline),
                "tcp" (
                    c(
                        "raise-internet-control-priority"
                    )
                ),
                "ieee-802.1"
            )
        ),
        "drop-profiles" arg (
            c(
                "fill-level" arg (
                    c(
                        "drop-probability" arg
                    )
                ).as(:oneline),
                "interpolate" (
                    c(
                        "fill-level" arg,
                        "drop-probability" arg
                    )
                )
            )
        ),
        "adaptive-shapers" arg (
            c(
                "trigger" ("becn") (
                    c(
                        "shaping-rate" (
                            c(
                                c(
                                  "absolute-rate" arg,
                                  "percent" arg
                                )
                            )
                        ).as(:oneline)
                    )
                ).as(:oneline)
            )
        ),
        "virtual-channels" arg,
        "virtual-channel-groups" arg (
            c(
                "channel" arg (
                    c(
                        "scheduler-map" arg,
                        "shaping-rate" (
                            c(
                                c(
                                  "absolute-rate" arg,
                                  "percent" arg
                                )
                            )
                        ).as(:oneline),
                        "default"
                    )
                )
            )
        ),
        "copy-plp-all",
        "tri-color",
        "shared-buffer" (
            c(
                "egress" (
                    c(
                        "buffer-partition" ("lossless" | "lossy" | "multicast") (
                            "percent" arg
                        ),
                        "percent" arg
                    )
                ),
                "ingress" (
                    c(
                        "buffer-partition" ("lossless-headroom" | "lossless" | "lossy") (
                            "percent" arg
                        ),
                        "percent" arg
                    )
                )
            )
        ),
        "forwarding-classes" (
            c(
                "class".as(:oneline),
                "queue" arg (
                    c(
                        "class-name" arg,
                        "priority" arg,
                        "policing-priority" arg
                    )
                ).as(:oneline)
            )
        ),
        "restricted-queues",
        "traffic-control-profiles" arg (
            c(
                "scheduler-map" arg,
                "atm-service" arg,
                "peak-rate" arg,
                "sustained-rate" arg,
                "max-burst-size" arg,
                "shaping-rate" (
                    c(
                        c(
                          "rate" arg,
                          "percent" arg
                        ),
                        "burst-size" arg
                    )
                ).as(:oneline),
                "overhead-accounting" (
                    c(
                        "mode" arg,
                        "bytes" arg
                    )
                ).as(:oneline),
                "shaping-rate-priority-high".as(:oneline),
                "shaping-rate-priority-medium".as(:oneline),
                "shaping-rate-priority-low".as(:oneline),
                "shaping-rate-excess-high".as(:oneline),
                "shaping-rate-excess-low".as(:oneline),
                "guaranteed-rate" (
                    c(
                        c(
                          "rate" arg,
                          "percent" arg
                        ),
                        "burst-size" arg
                    )
                ).as(:oneline),
                "excess-rate".as(:oneline),
                "excess-rate-high".as(:oneline),
                "excess-rate-low".as(:oneline),
                c(
                  "delay-buffer-rate" (
                      c(
                          c(
                            "rate" arg,
                            "percent" arg,
                            "cps" arg
                          )
                      )
                  ).as(:oneline)
                ),
                "adjust-minimum".as(:oneline)
            )
        ),
        "forwarding-class-sets",
        "congestion-notification-profile",
        "dynamic-class-of-service-options",
        "interfaces" (
            c(
                "interface-set",
                "interface" (
                  cos_interfaces_type
                )
            )
        ),
        "routing-instances" arg (
            c(
                "classifiers" (
                    c(
                        "exp" (
                            c(
                                "classifier-name" arg
                            )
                        ).as(:oneline),
                        "ieee-802.1".as(:oneline),
                        "dscp" (
                            c(
                                "classifier-name" arg
                            )
                        ).as(:oneline),
                        "dscp-ipv6" (
                            c(
                                "classifier-name" arg
                            )
                        ).as(:oneline)
                    )
                ),
                "rewrite-rules"
            )
        ),
        "rewrite-rules" (
            c(
                "dscp" arg (
                    c(
                        "import" arg,
                        "forwarding-class" arg (
                            c(
                                "loss-priority" ("low" | "high" | "medium-low" | "medium-high") (
                                    c(
                                        "code-point" arg
                                    )
                                ).as(:oneline)
                            )
                        )
                    )
                ),
                "dscp-ipv6" arg (
                    c(
                        "import" arg,
                        "forwarding-class" arg (
                            c(
                                "loss-priority" ("low" | "high" | "medium-low" | "medium-high") (
                                    c(
                                        "code-point" arg
                                    )
                                ).as(:oneline)
                            )
                        )
                    )
                ),
                "exp" arg (
                    c(
                        "import" arg,
                        "forwarding-class" arg (
                            c(
                                "loss-priority" ("low" | "high" | "medium-low" | "medium-high") (
                                    c(
                                        "code-point" arg
                                    )
                                ).as(:oneline)
                            )
                        )
                    )
                ),
                "ieee-802.1" arg (
                    c(
                        "import" arg,
                        "forwarding-class" arg (
                            c(
                                "loss-priority" ("low" | "high" | "medium-low" | "medium-high") (
                                    c(
                                        "code-point" arg
                                    )
                                ).as(:oneline)
                            )
                        )
                    )
                ),
                "inet-precedence" arg (
                    c(
                        "import" arg,
                        "forwarding-class" arg (
                            c(
                                "loss-priority" ("low" | "high" | "medium-low" | "medium-high") (
                                    c(
                                        "code-point" arg
                                    )
                                ).as(:oneline)
                            )
                        )
                    )
                ),
                "frame-relay-de" arg (
                    c(
                        "import" arg,
                        "forwarding-class" arg (
                            c(
                                "loss-priority" ("low" | "high" | "medium-low" | "medium-high") (
                                    c(
                                        "code-point" arg
                                    )
                                ).as(:oneline)
                            )
                        )
                    )
                ),
                "ieee-802.1ad" arg (
                    c(
                        "import" arg,
                        "forwarding-class" arg (
                            c(
                                "loss-priority" ("low" | "high" | "medium-low" | "medium-high") (
                                    c(
                                        "code-point" arg
                                    )
                                ).as(:oneline)
                            )
                        )
                    )
                )
            )
        ),
        "fabric",
        "scheduler-maps" arg (
            c(
                "forwarding-class" arg (
                    c(
                        "scheduler" arg
                    )
                ).as(:oneline)
            )
        ),
        "fragmentation-maps" arg (
            c(
                "forwarding-class" arg (
                    c(
                        c(
                          "fragment-threshold" arg,
                          "no-fragmentation"
                        ),
                        "multilink-class" arg,
                        "drop-timeout" arg
                    )
                )
            )
        ),
        "schedulers" arg (
            c(
                "transmit-rate" (
                    c(
                        c(
                          "rate" arg,
                          "percent" arg,
                          "remainder" (
                              c(
                                  "percent" arg
                              )
                          )
                        ),
                        c(
                          "exact",
                          "rate-limit"
                        )
                    )
                ),
                "excess-rate".as(:oneline),
                "shaping-rate" (
                    c(
                        c(
                          "rate" arg,
                          "percent" arg
                        ),
                        "burst-size" arg
                    )
                ).as(:oneline),
                "buffer-size" (
                    c(
                        c(
                          "percent" arg,
                          "remainder" (
                              c(
                                  "percent" arg
                              )
                          ),
                          "temporal" arg
                        ),
                        c(
                          "exact"
                        )
                    )
                ),
                "priority" arg,
                "excess-priority" arg,
                "drop-profile-map" (
                    s(
                      "loss-priority" (
                            ("low" | "high" | "medium-low" | "medium-high" | "any")
                      ),
                      "protocol" (
                            ("tcp" | "non-tcp" | "any")
                      ),
                      c(
                        "drop-profile" arg
                      )
                    )
                ).as(:oneline),
                "drop-profile-map-set",
                "adjust-percent" arg,
                "adjust-minimum" arg
            )
        ),
        "traceoptions" (
            c(
                "no-remote-trace",
                "file" (
                    c(
                        "filename" arg,
                        "size" arg,
                        "files" arg,
                        "world-readable",
                        "no-world-readable",
                        "match" (
                          regular_expression
                        )
                    )
                ).as(:oneline),
                "flag" ("init" | "show" | "route-socket" | "parse" | "process" | "util" | "restart" | "snmp" | "hardware-database" | "asynch" | "dynamic" | "cos-adjustment" | "performance-monitor" | "chassis-scheduler" | "all").as(:oneline)
            )
        ),
        "multi-destination",
        "application-traffic-control"
    )
end

rule(:cos_interfaces_type) do
  arg.as(:arg) (
    c(
        "forwarding-class-set",
        "congestion-notification-profile" arg,
        "scheduler-map" arg,
        "input-scheduler-map" arg,
        "scheduler-map-chassis" arg,
        "output-forwarding-class-map" arg,
        "shaping-rate" (
            c(
                "rate" arg
            )
        ).as(:oneline),
        "input-excess-bandwidth-share".as(:oneline),
        "excess-bandwidth-share".as(:oneline),
        "input-shaping-rate" (
            c(
                "rate" arg
            )
        ).as(:oneline),
        "input-traffic-control-profile" (
            c(
                "profile-name" arg
            )
        ).as(:oneline),
        "input-traffic-control-profile-remaining" (
            c(
                "profile-name" arg
            )
        ).as(:oneline),
        "output-traffic-control-profile".as(:oneline),
        "output-traffic-control-profile-remaining".as(:oneline),
        "member-link-scheduler" (
            c(
                c(
                  "scale",
                  "replicate"
                )
            )
        ).as(:oneline),
        "unit" ("*") (
            c(
                "output-forwarding-class-map" arg,
                "forwarding-class" arg,
                "virtual-channel-group" arg,
                "vc-shared-scheduler",
                "scheduler-map" arg,
                "input-scheduler-map" arg,
                "fragmentation-map" arg,
                "adaptive-shaper" arg,
                "shaping-rate" (
                    c(
                        c(
                          "rate" arg,
                          "percent" arg
                        )
                    )
                ).as(:oneline),
                "input-shaping-rate" (
                    c(
                        c(
                          "rate" arg,
                          "percent" arg
                        )
                    )
                ).as(:oneline),
                "input-traffic-control-profile" (
                    c(
                        "profile-name" arg,
                        "shared-instance" arg
                    )
                ).as(:oneline),
                "output-traffic-control-profile" (
                    c(
                        "profile-name" arg,
                        "shared-instance" arg
                    )
                ).as(:oneline),
                "classifiers" (
                    c(
                        "dscp" ("default") (
                            c(
                                "family" arg
                            )
                        ),
                        "dscp-ipv6" ("default") (
                            c(
                                "family" arg
                            )
                        ),
                        "exp" (
                            c(
                                "classifier-name" arg
                            )
                        ).as(:oneline),
                        "ieee-802.1" (
                            c(
                                "classifier-name" arg,
                                "vlan-tag" arg
                            )
                        ).as(:oneline),
                        "inet-precedence" (
                            c(
                                "classifier-name" arg
                            )
                        ).as(:oneline),
                        "ieee-802.1ad" (
                            c(
                                "classifier-name" arg,
                                "vlan-tag" arg
                            )
                        ).as(:oneline)
                    )
                ),
                "loss-priority-maps" (
                    c(
                        "frame-relay-de" (
                            c(
                                "lpmap-name" arg
                            )
                        ).as(:oneline)
                    )
                ),
                "rewrite-rules" (
                    c(
                        "dscp" ("default") (
                            c(
                                "protocol" arg
                            )
                        ).as(:oneline),
                        "dscp-ipv6" ("default") (
                            c(
                                "protocol" arg
                            )
                        ).as(:oneline),
                        "exp" ("default") (
                            c(
                                "protocol" arg
                            )
                        ).as(:oneline),
                        "ieee-802.1" (
                            c(
                                "rewrite-rule-name" arg,
                                "vlan-tag" arg
                            )
                        ).as(:oneline),
                        "inet-precedence" ("default") (
                            c(
                                "protocol" arg
                            )
                        ).as(:oneline),
                        "exp-swap-push-push".as(:oneline),
                        "exp-push-push-push".as(:oneline),
                        "frame-relay-de" (
                            c(
                                "rewrite-rule-name" arg
                            )
                        ).as(:oneline),
                        "ieee-802.1ad" (
                            c(
                                "rewrite-rule-name" arg,
                                "vlan-tag" arg
                            )
                        )
                    )
                ),
                "loss-priority-rewrites",
                "translation-table"
            )
        )
    )
  )
end

rule(:juniper_def_rtb_switch_options) do
    c(
        "mac-table-size" (
            c(
                "limit" arg,
                "packet-action" arg
            )
        ),
        "interface-mac-limit" (
            c(
                "limit" arg,
                "packet-action" arg
            )
        ),
        "mac-table-aging-time" arg,
        "no-mac-learning",
        "mac-statistics",
        "service-id" arg,
        "interface" arg (
            c(
                "interface-mac-limit" (
                    c(
                        "limit" arg,
                        "packet-action" arg
                    )
                ),
                "no-mac-learning"
            )
        )
    )
end

rule(:juniper_dynamic_profile_object) do
  arg.as(:arg) (
    c(
        "variables" (
          juniper_dynamic_variable_object
        ),
        "predefined-variable-defaults" (
            c(
                "cos-excess-rate" (
                    c(
                        "proportion" arg,
                        "percent" arg
                    )
                ),
                "cos-excess-rate-high" (
                    c(
                        "proportion" arg,
                        "percent" arg
                    )
                ),
                "cos-excess-rate-low" (
                    c(
                        "proportion" arg,
                        "percent" arg
                    )
                ),
                "cos-scheduler-tx" (
                    c(
                        "rate" arg,
                        "percent" arg
                    )
                ),
                "cos-scheduler-bs" (
                    c(
                        "percent" arg,
                        "temporal" arg
                    )
                ),
                "cos-scheduler-shaping-rate" (
                    c(
                        "rate" arg,
                        "percent" arg
                    )
                ),
                "other-variables" (
                  base_default_variable_object
                )
            )
        ),
        "routing-instances" (
            c(
                "instance" ("$junos-routing-instance") (
                    c(
                        "interface" ("$junos-interface-name" | "interface-name") (
                            c(
                                c(
                                  "any",
                                  "unicast",
                                  "multicast"
                                )
                            )
                        ),
                        "routing-options" (
                            c(
                                "rib" arg (
                                    c(
                                        "static" (
                                            c(
                                                "rib-group" arg,
                                                "defaults" (
                                                    c(
                                                        "retain",
                                                        "no-retain",
                                                        "install",
                                                        "no-install",
                                                        "readvertise",
                                                        "no-readvertise",
                                                        "resolve",
                                                        "no-resolve",
                                                        c(
                                                          "active",
                                                          "passive"
                                                        ),
                                                        "metric" (
                                                          rib_static_metric_type
                                                        ),
                                                        "metric2" (
                                                          rib_static_metric_type
                                                        ),
                                                        "metric3" (
                                                          rib_static_metric_type
                                                        ),
                                                        "metric4" (
                                                          rib_static_metric_type
                                                        ),
                                                        "tag" (
                                                          rib_static_metric_type
                                                        ),
                                                        "tag2" (
                                                          rib_static_metric_type
                                                        ),
                                                        "preference" (
                                                          rib_static_metric_type
                                                        ),
                                                        "preference2" (
                                                          rib_static_metric_type
                                                        ),
                                                        "color" (
                                                          rib_static_metric_type
                                                        ),
                                                        "color2" (
                                                          rib_static_metric_type
                                                        ),
                                                        "community" (
                                                          community
                                                        ),
                                                        "as-path" (
                                                            c(
                                                                "path" arg,
                                                                "origin" arg,
                                                                "atomic-aggregate",
                                                                "aggregator" (
                                                                    c(
                                                                        "as-number" arg,
                                                                        "address" (
                                                                          ipv4addr
                                                                        )
                                                                    )
                                                                )
                                                            )
                                                        )
                                                    )
                                                ),
                                                "route" arg (
                                                    c(
                                                        c(
                                                          "next-hop" (
                                                            ipaddr_or_interface
                                                          ),
                                                          "reject",
                                                          "discard",
                                                          "receive",
                                                          "next-table" arg
                                                        ),
                                                        "qualified-next-hop" (
                                                          qualified_nh_obj
                                                        ),
                                                        "lsp-next-hop" (
                                                          lsp_nh_obj
                                                        ),
                                                        "static-lsp-next-hop" (
                                                          lsp_nh_obj
                                                        ),
                                                        "p2mp-lsp-next-hop" (
                                                          lsp_nh_obj
                                                        ),
                                                        "backup-pe-group" arg,
                                                        "bfd-liveness-detection" (
                                                            c(
                                                                "version" arg,
                                                                "minimum-interval" arg,
                                                                "minimum-receive-interval" arg,
                                                                "multiplier" arg,
                                                                c(
                                                                  "no-adaptation"
                                                                ),
                                                                "transmit-interval" (
                                                                    c(
                                                                        "minimum-interval" arg,
                                                                        "threshold" arg
                                                                    )
                                                                ),
                                                                "detection-time" (
                                                                    c(
                                                                        "threshold" arg
                                                                    )
                                                                ),
                                                                "authentication" (
                                                                    c(
                                                                        "key-chain" arg,
                                                                        "algorithm" arg,
                                                                        "loose-check"
                                                                    )
                                                                ),
                                                                "neighbor" (
                                                                  ipaddr
                                                                ),
                                                                "local-address" (
                                                                  ipaddr
                                                                ),
                                                                "holddown-interval" arg,
                                                                "minimum-receive-ttl" arg
                                                            )
                                                        ),
                                                        "retain",
                                                        "no-retain",
                                                        "install",
                                                        "no-install",
                                                        "readvertise",
                                                        "no-readvertise",
                                                        "resolve",
                                                        "no-resolve",
                                                        c(
                                                          "active",
                                                          "passive"
                                                        ),
                                                        "metric" (
                                                          rib_static_metric_type
                                                        ),
                                                        "metric2" (
                                                          rib_static_metric_type
                                                        ),
                                                        "metric3" (
                                                          rib_static_metric_type
                                                        ),
                                                        "metric4" (
                                                          rib_static_metric_type
                                                        ),
                                                        "tag" (
                                                          rib_static_metric_type
                                                        ),
                                                        "tag2" (
                                                          rib_static_metric_type
                                                        ),
                                                        "preference" (
                                                          rib_static_metric_type
                                                        ),
                                                        "preference2" (
                                                          rib_static_metric_type
                                                        ),
                                                        "color" (
                                                          rib_static_metric_type
                                                        ),
                                                        "color2" (
                                                          rib_static_metric_type
                                                        ),
                                                        "community" (
                                                          community
                                                        ),
                                                        "as-path" (
                                                            c(
                                                                "path" arg,
                                                                "origin" arg,
                                                                "atomic-aggregate",
                                                                "aggregator" (
                                                                    c(
                                                                        "as-number" arg,
                                                                        "address" (
                                                                          ipv4addr
                                                                        )
                                                                    )
                                                                )
                                                            )
                                                        )
                                                    )
                                                ),
                                                "iso-route" arg (
                                                    c(
                                                        c(
                                                          "next-hop" (
                                                            ipaddr_or_interface
                                                          ),
                                                          "reject",
                                                          "discard",
                                                          "receive",
                                                          "next-table" arg
                                                        ),
                                                        "qualified-next-hop" (
                                                          qualified_nh_obj
                                                        ),
                                                        "lsp-next-hop" (
                                                          lsp_nh_obj
                                                        ),
                                                        "static-lsp-next-hop" (
                                                          lsp_nh_obj
                                                        ),
                                                        "p2mp-lsp-next-hop" (
                                                          lsp_nh_obj
                                                        ),
                                                        "backup-pe-group" arg,
                                                        "bfd-liveness-detection" (
                                                            c(
                                                                "version" arg,
                                                                "minimum-interval" arg,
                                                                "minimum-receive-interval" arg,
                                                                "multiplier" arg,
                                                                c(
                                                                  "no-adaptation"
                                                                ),
                                                                "transmit-interval" (
                                                                    c(
                                                                        "minimum-interval" arg,
                                                                        "threshold" arg
                                                                    )
                                                                ),
                                                                "detection-time" (
                                                                    c(
                                                                        "threshold" arg
                                                                    )
                                                                ),
                                                                "authentication" (
                                                                    c(
                                                                        "key-chain" arg,
                                                                        "algorithm" arg,
                                                                        "loose-check"
                                                                    )
                                                                ),
                                                                "neighbor" (
                                                                  ipaddr
                                                                ),
                                                                "local-address" (
                                                                  ipaddr
                                                                ),
                                                                "holddown-interval" arg,
                                                                "minimum-receive-ttl" arg
                                                            )
                                                        ),
                                                        "retain",
                                                        "no-retain",
                                                        "install",
                                                        "no-install",
                                                        "readvertise",
                                                        "no-readvertise",
                                                        "resolve",
                                                        "no-resolve",
                                                        c(
                                                          "active",
                                                          "passive"
                                                        ),
                                                        "metric" (
                                                          rib_static_metric_type
                                                        ),
                                                        "metric2" (
                                                          rib_static_metric_type
                                                        ),
                                                        "metric3" (
                                                          rib_static_metric_type
                                                        ),
                                                        "metric4" (
                                                          rib_static_metric_type
                                                        ),
                                                        "tag" (
                                                          rib_static_metric_type
                                                        ),
                                                        "tag2" (
                                                          rib_static_metric_type
                                                        ),
                                                        "preference" (
                                                          rib_static_metric_type
                                                        ),
                                                        "preference2" (
                                                          rib_static_metric_type
                                                        ),
                                                        "color" (
                                                          rib_static_metric_type
                                                        ),
                                                        "color2" (
                                                          rib_static_metric_type
                                                        ),
                                                        "community" (
                                                          community
                                                        ),
                                                        "as-path" (
                                                            c(
                                                                "path" arg,
                                                                "origin" arg,
                                                                "atomic-aggregate",
                                                                "aggregator" (
                                                                    c(
                                                                        "as-number" arg,
                                                                        "address" (
                                                                          ipv4addr
                                                                        )
                                                                    )
                                                                )
                                                            )
                                                        )
                                                    )
                                                )
                                            )
                                        ),
                                        "martians" (
                                          martian_type
                                        ),
                                        "aggregate" (
                                          rib_aggregate_type
                                        ),
                                        "generate" (
                                          rib_aggregate_type
                                        ),
                                        c(
                                          "maximum-paths" (
                                              c(
                                                  "limit" arg,
                                                  c(
                                                    "threshold" arg,
                                                    "log-only"
                                                  ),
                                                  "log-interval" arg
                                              )
                                          ).as(:oneline)
                                        ),
                                        "maximum-prefixes" (
                                            c(
                                                "limit" arg,
                                                c(
                                                  "threshold" arg,
                                                  "log-only"
                                                ),
                                                "log-interval" arg
                                            )
                                        ).as(:oneline),
                                        "multipath" (
                                            c(
                                                "vpn-unequal-cost" (
                                                    c(
                                                        "equal-external-internal"
                                                    )
                                                ).as(:oneline),
                                                "as-path-compare"
                                            )
                                        ),
                                        "label" (
                                            c(
                                                "allocation" (
                                                  policy_algebra
                                                ),
                                                "substitution" (
                                                  policy_algebra
                                                )
                                            )
                                        ),
                                        "access" (
                                            c(
                                                "route" arg (
                                                    c(
                                                        "next-hop" (
                                                          ipaddr_or_interface
                                                        ),
                                                        "qualified-next-hop" (
                                                          qualified_nh_obj
                                                        ),
                                                        "metric" arg,
                                                        "preference" arg,
                                                        "tag" arg
                                                    )
                                                )
                                            )
                                        ),
                                        "access-internal" (
                                            c(
                                                "route" arg (
                                                    c(
                                                        "next-hop" (
                                                          ipaddr_or_interface
                                                        ),
                                                        "qualified-next-hop" (
                                                          qualified_nh_obj
                                                        )
                                                    )
                                                )
                                            )
                                        )
                                    )
                                ),
                                "access" (
                                    c(
                                        "route" arg (
                                            c(
                                                "next-hop" (
                                                  ipaddr_or_interface
                                                ),
                                                "qualified-next-hop" (
                                                  qualified_nh_obj
                                                ),
                                                "metric" arg,
                                                "preference" arg,
                                                "tag" arg
                                            )
                                        )
                                    )
                                ),
                                "access-internal" (
                                    c(
                                        "route" arg (
                                            c(
                                                "next-hop" (
                                                  ipaddr_or_interface
                                                ),
                                                "qualified-next-hop" (
                                                  qualified_nh_obj
                                                )
                                            )
                                        )
                                    )
                                ),
                                "multicast" (
                                    c(
                                        "traceoptions" (
                                            c(
                                                "file" (
                                                  trace_file_type
                                                ),
                                                "flag" ("parse" | "config-internal" | "route" | "normal" | "general" | "state" | "policy" | "task" | "timer" | "all") (
                                                    c(
                                                        "disable"
                                                    )
                                                ).as(:oneline)
                                            )
                                        ),
                                        "scope" arg (
                                            c(
                                                "prefix" (
                                                  ipprefix
                                                ),
                                                "interface" (
                                                  interface_name
                                                )
                                            )
                                        ),
                                        "scope-policy" (
                                          policy_algebra
                                        ),
                                        "flow-map" arg (
                                            c(
                                                "policy" (
                                                  policy_algebra
                                                ),
                                                "bandwidth" (
                                                    c(
                                                        "bandwidth-value" arg,
                                                        "adaptive"
                                                    )
                                                ).as(:oneline),
                                                "redundant-sources" (
                                                  ipaddr
                                                ),
                                                "forwarding-cache" (
                                                    c(
                                                        "timeout" (
                                                            c(
                                                                c(
                                                                  "timeout-value" arg,
                                                                  "never" (
                                                                      c(
                                                                          "non-discard-entry-only"
                                                                      )
                                                                  )
                                                                )
                                                            )
                                                        ).as(:oneline)
                                                    )
                                                )
                                            )
                                        ),
                                        "ssm-groups" (
                                          ipprefix
                                        ),
                                        "asm-override-ssm",
                                        "rpf-check-policy" (
                                          policy_algebra
                                        ),
                                        "pim-to-igmp-proxy" (
                                            c(
                                                "upstream-interface" (
                                                  interface_name
                                                )
                                            )
                                        ),
                                        "pim-to-mld-proxy" (
                                            c(
                                                "upstream-interface" (
                                                  interface_name
                                                )
                                            )
                                        ),
                                        "forwarding-cache" (
                                            c(
                                                "threshold" (
                                                    c(
                                                        "suppress" arg,
                                                        "reuse" arg
                                                    )
                                                ),
                                                "timeout" arg
                                            )
                                        ),
                                        "interface" (
                                          multicast_interface_options_type
                                        ),
                                        "ssm-map" arg (
                                            c(
                                                "policy" (
                                                  policy_algebra
                                                ),
                                                "source" (
                                                  ipaddr
                                                )
                                            )
                                        ),
                                        "backup-pe-group" arg (
                                            c(
                                                "backups" (
                                                  ipaddr
                                                ),
                                                "local-address" (
                                                  ipaddr
                                                )
                                            )
                                        )
                                    )
                                )
                            )
                        )
                    )
                )
            )
        ),
        "interfaces" (
            c(
                "pic-set",
                "interface-set" ("$junos-interface-set-name" | "interface-set-name") (
                    c(
                        "interface" arg (
                            c(
                                "unit" arg,
                                "vlan-tags-outer" arg
                            )
                        )
                    )
                ),
                "traceoptions" (
                    c(
                        "no-remote-trace",
                        "file" (
                            c(
                                "filename" arg,
                                "size" arg,
                                "files" arg,
                                "world-readable",
                                "no-world-readable",
                                "match" (
                                  regular_expression
                                )
                            )
                        ).as(:oneline),
                        "flag" ("all" | "kernel" | "change-events" | "kernel-detail" | "config-states" | "resource-usage" | "gres-events" | "select-events") (
                            c(
                                "disable"
                            )
                        ).as(:oneline)
                    )
                ),
                "interface-range" arg (
                    c(
                        "member" arg,
                        "member-range" arg (
                            c(
                                "end-range" (
                                  interface_device
                                )
                            )
                        ).as(:oneline),
                        "description" arg,
                        "metadata" arg,
                        c(
                          "disable"
                        ),
                        "promiscuous-mode",
                        "port-mirror-instance" arg,
                        "multicast-statistics",
                        "fabric-options" (
                            c(
                                "member-interfaces" arg
                            )
                        ),
                        "traceoptions" (
                            c(
                                "flag" ("ipc" | "event" | "media" | "all" | "q921" | "q931").as(:oneline),
                                "file" (
                                    c(
                                        "filename" arg,
                                        "size" arg,
                                        "files" arg,
                                        "world-readable",
                                        "no-world-readable"
                                    )
                                )
                            )
                        ),
                        "passive-monitor-mode",
                        c(
                          "keepalives" (
                            keepalives_type
                          ).as(:oneline),
                          "no-keepalives"
                        ),
                        "traps",
                        "no-traps",
                        "accounting-profile" arg,
                        c(
                          "per-unit-scheduler",
                          "no-per-unit-scheduler",
                          "shared-scheduler",
                          "hierarchical-scheduler" (
                              c(
                                  "maximum-hierarchy-levels" arg
                              )
                          ).as(:oneline)
                        ),
                        "schedulers" arg,
                        "interface-transmit-statistics",
                        "dce",
                        c(
                          "vlan-tagging",
                          "stacked-vlan-tagging",
                          "flexible-vlan-tagging",
                          "vlan-vci-tagging"
                        ),
                        "native-vlan-id" arg,
                        "speed" arg,
                        "auto-configure" (
                          auto_configure_vlan_type
                        ),
                        "mtu" arg,
                        "hold-time" (
                            c(
                                "up" arg,
                                "down" arg
                            )
                        ).as(:oneline),
                        "satop-options" (
                            c(
                                "idle-pattern" arg,
                                "payload-size" arg,
                                "excessive-packet-loss-rate" (
                                    c(
                                        "threshold" arg,
                                        "sample-period" arg
                                    )
                                ),
                                c(
                                  "jitter-buffer-packets" arg,
                                  "jitter-buffer-latency" arg,
                                  "jitter-buffer-auto-adjust"
                                ),
                                "bit-rate" arg
                            )
                        ),
                        "ima-group-options",
                        "ima-link-options",
                        "multi-chassis-protection" (
                          multi_chassis_protection_group
                        ),
                        "clocking" (
                            c(
                                c(
                                  "internal",
                                  "external" (
                                      c(
                                          "interface" (
                                            interface_device
                                          )
                                      )
                                  )
                                )
                            )
                        ).as(:oneline),
                        "link-mode" arg,
                        "media-type" arg,
                        "encapsulation" arg,
                        "framing" (
                            c(
                                c(
                                  "lan-phy",
                                  "wan-phy",
                                  "sonet",
                                  "sdh"
                                )
                            )
                        ),
                        "unidirectional",
                        "lmi" (
                            c(
                                "n391dte" arg,
                                "n392dce" arg,
                                "n392dte" arg,
                                "n393dce" arg,
                                "n393dte" arg,
                                "t391dte" arg,
                                "t392dce" arg,
                                "lmi-type" arg
                            )
                        ),
                        "mlfr-uni-nni-bundle-options" (
                            c(
                                "cisco-interoperability" (
                                    c(
                                        "send-lip-remove-link-for-link-reject"
                                    )
                                ),
                                "mrru" arg,
                                "yellow-differential-delay" arg,
                                "red-differential-delay" arg,
                                "action-red-differential-delay" arg,
                                "fragment-threshold" arg,
                                "drop-timeout" arg,
                                "link-layer-overhead" (
                                  unsigned_float
                                ),
                                "lmi-type" arg,
                                "minimum-links" arg,
                                "hello-timer" arg,
                                "acknowledge-timer" arg,
                                "acknowledge-retries" arg,
                                "n391" arg,
                                "n392" arg,
                                "n393" arg,
                                "t391" arg,
                                "t392" arg
                            )
                        ),
                        "mac" (
                          mac_unicaset
                        ),
                        "receive-bucket" (
                          dcd_rx_bucket_config
                        ),
                        "transmit-bucket" (
                          dcd_tx_bucket_config
                        ),
                        "shared-interface",
                        "sonet-options" (
                          sonet_options_type
                        ),
                        "logical-tunnel-options" (
                            c(
                                "per-unit-mac-disable"
                            )
                        ),
                        "aggregated-sonet-options" (
                            c(
                                "minimum-links" arg,
                                "link-speed" arg,
                                "minimum-bandwidth" arg
                            )
                        ),
                        "atm-options" (
                            c(
                                "pic-type" arg,
                                "cell-bundle-size" arg,
                                "plp-to-clp",
                                "use-null-cw",
                                "promiscuous-mode" (
                                    c(
                                        "vpi" arg.as(:oneline)
                                    )
                                ),
                                "vpi" arg (
                                    c(
                                        "maximum-vcs" arg,
                                        "shaping" (
                                          dcd_shaping_config
                                        ),
                                        "oam-period" (
                                            c(
                                                c(
                                                  "oam-period" arg,
                                                  "disable".as(:oneline)
                                                )
                                            )
                                        ).as(:oneline),
                                        "oam-liveness" (
                                            c(
                                                "up-count" arg,
                                                "down-count" arg
                                            )
                                        )
                                    )
                                ),
                                "ilmi",
                                "linear-red-profiles" arg (
                                    c(
                                        "queue-depth" arg,
                                        "high-plp-threshold" arg,
                                        "low-plp-threshold" arg,
                                        "high-plp-max-threshold" arg,
                                        "low-plp-max-threshold" arg
                                    )
                                ).as(:oneline),
                                "scheduler-maps" arg (
                                    c(
                                        "vc-cos-mode" arg,
                                        "forwarding-class" arg (
                                            c(
                                                "priority" arg,
                                                "transmit-weight" (
                                                    c(
                                                        c(
                                                          "percent" arg,
                                                          "cells" arg
                                                        )
                                                    )
                                                ).as(:oneline),
                                                c(
                                                  "epd-threshold" (
                                                    epd_threshold_config
                                                  ).as(:oneline),
                                                  "linear-red-profile" arg
                                                )
                                            )
                                        )
                                    )
                                ),
                                "mpls" (
                                  mpls_ifd_options
                                ),
                                "payload-scrambler",
                                "no-payload-scrambler"
                            )
                        ),
                        "multiservice-options" (
                            c(
                                "syslog",
                                "no-syslog",
                                "core-dump",
                                "no-core-dump",
                                "flow-control-options" (
                                    c(
                                        "dump-on-flow-control",
                                        "reset-on-flow-control",
                                        "down-on-flow-control"
                                    )
                                )
                            )
                        ),
                        "ggsn-options" (
                            c(
                                "syslog",
                                "no-syslog",
                                "core-dump",
                                "no-core-dump"
                            )
                        ),
                        "ppp-options" (
                          ppp_options_type
                        ),
                        "redundancy-options",
                        "load-balancing-options",
                        "lsq-failure-options",
                        "services-options" (
                            c(
                                "syslog" (
                                  service_set_syslog_object
                                ),
                                "open-timeout" arg,
                                "inactivity-timeout" arg,
                                "inactivity-tcp-timeout" arg,
                                "inactivity-asymm-tcp-timeout" arg,
                                "inactivity-non-tcp-timeout" arg,
                                "session-timeout" arg,
                                "disable-global-timeout-override",
                                "tcp-tickles" arg,
                                "trio-flow-offload",
                                "cgn-pic",
                                "session-limit" (
                                    c(
                                        "maximum" arg,
                                        "rate" arg
                                    )
                                ),
                                "ignore-errors" (
                                    c(
                                        "tcp",
                                        "alg"
                                    )
                                ).as(:oneline)
                            )
                        ),
                        "t3-options" (
                            c(
                                "loopback" arg,
                                "long-buildout",
                                "no-long-buildout",
                                "loop-timing",
                                "no-loop-timing",
                                "unframed",
                                "no-unframed",
                                "compatibility-mode" (
                                    c(
                                        c(
                                          "larscom" (
                                              c(
                                                  "subrate" arg
                                              )
                                          ).as(:oneline),
                                          "verilink" (
                                              c(
                                                  "subrate" arg
                                              )
                                          ).as(:oneline),
                                          "adtran" (
                                              c(
                                                  "subrate" arg
                                              )
                                          ).as(:oneline),
                                          "kentrox" (
                                              c(
                                                  "subrate" arg
                                              )
                                          ).as(:oneline),
                                          "digital-link" (
                                              c(
                                                  "subrate" arg
                                              )
                                          ).as(:oneline)
                                        )
                                    )
                                ).as(:oneline),
                                "payload-scrambler",
                                "no-payload-scrambler",
                                "cbit-parity",
                                "no-cbit-parity",
                                "fcs" arg,
                                "idle-cycle-flag" arg,
                                "start-end-flag" arg,
                                "feac-loop-respond",
                                "no-feac-loop-respond",
                                "bert-algorithm" arg,
                                "bert-error-rate" arg,
                                "bert-period" arg,
                                "buildout" arg,
                                "atm-encapsulation" arg
                            )
                        ),
                        "e3-options" (
                            c(
                                "loopback" arg,
                                "unframed",
                                "no-unframed",
                                "compatibility-mode" (
                                    c(
                                        c(
                                          "larscom",
                                          "digital-link" (
                                              c(
                                                  "subrate" arg
                                              )
                                          ).as(:oneline),
                                          "kentrox" (
                                              c(
                                                  "subrate" arg
                                              )
                                          ).as(:oneline)
                                        )
                                    )
                                ).as(:oneline),
                                "payload-scrambler",
                                "no-payload-scrambler",
                                "fcs" arg,
                                "idle-cycle-flag" arg,
                                "invert-data",
                                "start-end-flag" arg,
                                "bert-algorithm" arg,
                                "bert-error-rate" arg,
                                "bert-period" arg,
                                "buildout" arg,
                                "atm-encapsulation" arg,
                                "framing" arg
                            )
                        ),
                        "e1-options" (
                            c(
                                "timeslots" arg,
                                "loopback" arg,
                                "framing" arg,
                                "fcs" arg,
                                "invert-data",
                                "idle-cycle-flag" arg,
                                "start-end-flag" arg,
                                "bert-algorithm" arg,
                                "bert-error-rate" arg,
                                "bert-period" arg
                            )
                        ),
                        "t1-options" (
                            c(
                                "timeslots" arg,
                                "voice-timeslots" arg,
                                "loopback" arg,
                                "buildout" arg,
                                "byte-encoding" arg,
                                "line-encoding" arg,
                                "invert-data",
                                "framing" arg,
                                "fcs" arg,
                                "idle-cycle-flag" arg,
                                "start-end-flag" arg,
                                "bert-algorithm" arg,
                                "bert-error-rate" arg,
                                "bert-period" arg,
                                "remote-loopback-respond",
                                "crc-major-alarm-threshold" arg,
                                "crc-minor-alarm-threshold" arg,
                                "alarm-compliance" arg
                            )
                        ),
                        "ds0-options" (
                            c(
                                "loopback" arg,
                                "byte-encoding" arg,
                                "invert-data",
                                "fcs" arg,
                                "idle-cycle-flag" arg,
                                "start-end-flag" arg,
                                "bert-algorithm" arg,
                                "bert-error-rate" arg,
                                "bert-period" arg
                            )
                        ),
                        "serial-options" (
                            c(
                                "line-protocol" arg,
                                c(
                                  "dte-options" (
                                      c(
                                          "ignore-all",
                                          "dtr" (
                                              c(
                                                  c(
                                                    "assert",
                                                    "de-assert",
                                                    "normal",
                                                    "auto-synchronize" (
                                                        c(
                                                            "duration" arg,
                                                            "interval" arg
                                                        )
                                                    )
                                                  )
                                              )
                                          ).as(:oneline),
                                          "control-signal" arg,
                                          "rts" arg,
                                          "dcd" arg,
                                          "dsr" arg,
                                          "cts" arg,
                                          "indication" arg,
                                          "tm" arg
                                      )
                                  ),
                                  "dce-options" (
                                      c(
                                          "ignore-all",
                                          "dtr" arg,
                                          "rts" arg,
                                          "dcd" arg,
                                          "dsr" arg,
                                          "cts" arg,
                                          "tm" arg,
                                          "dce-loopback-override"
                                      )
                                  )
                                ),
                                "dtr-circuit" arg,
                                "dtr-polarity" arg,
                                "rts-polarity" arg,
                                "control-polarity" arg,
                                "dcd-polarity" arg,
                                "dsr-polarity" arg,
                                "cts-polarity" arg,
                                "indication-polarity" arg,
                                "tm-polarity" arg,
                                "clocking-mode" arg,
                                "transmit-clock" arg,
                                "clock-rate" arg,
                                "loopback" arg,
                                "encoding" arg,
                                "idle-cycle-flag" arg
                            )
                        ),
                        "gratuitous-arp-reply",
                        "no-gratuitous-arp-reply",
                        "no-gratuitous-arp-request",
                        "no-no-gratuitous-arp-request",
                        "fibrechannel-options",
                        b("ether-options" | "gigether-options",
                            c(
                                "loopback",
                                "no-loopback",
                                "flow-control",
                                "no-flow-control",
                                "source-filtering",
                                "no-source-filtering",
                                c(
                                  "no-auto-negotiation",
                                  "auto-negotiation" (
                                      c(
                                          "remote-fault" arg
                                      )
                                  ).as(:oneline)
                                ),
                                "mac-mode" arg,
                                "asynchronous-notification",
                                "source-address-filter" arg.as(:oneline),
                                "redundant-parent" (
                                    c(
                                        "parent" (
                                          interface_device
                                        )
                                    )
                                ),
                                "ieee-802.3ad" (
                                    c(
                                        "lacp" (
                                            c(
                                                "port-priority" arg
                                            )
                                        ),
                                        "bundle" (
                                          interface_device
                                        ),
                                        "link-index" arg,
                                        c(
                                          "primary",
                                          "backup"
                                        )
                                    )
                                ),
                                "ethernet-switch-profile" (
                                    c(
                                        "tag-protocol-id" arg,
                                        "ethernet-policer-profile" (
                                            c(
                                                "input-priority-map" (
                                                  cos_policer_input_priority_map
                                                ),
                                                "output-priority-map" (
                                                  cos_policer_output_priority_map
                                                ),
                                                "policer" (
                                                  cos_policer
                                                )
                                            )
                                        ),
                                        "mac-learn-enable",
                                        "no-mac-learn-enable"
                                    )
                                ),
                                "mpls" (
                                  mpls_ifd_options
                                ),
                                "ignore-l3-incompletes",
                                "no-auto-mdix"
                            )
                        ),
                        "optics-options" (
                            c(
                                "wavelength" arg,
                                "alarm" ("low-light-alarm") (
                                    c(
                                        c(
                                          "syslog",
                                          "link-down"
                                        )
                                    )
                                ),
                                "warning" ("low-light-warning") (
                                    c(
                                        c(
                                          "syslog",
                                          "link-down"
                                        )
                                    )
                                )
                            )
                        ),
                        "otn-options" (
                          otn_options_type
                        ),
                        "fastether-options" (
                            c(
                                "loopback",
                                "no-loopback",
                                "flow-control",
                                "no-flow-control",
                                "source-filtering",
                                "no-source-filtering",
                                "auto-negotiation",
                                "no-auto-negotiation",
                                "ingress-rate-limit" arg,
                                "source-address-filter" arg.as(:oneline),
                                "redundant-parent" (
                                    c(
                                        "parent" (
                                          interface_device
                                        )
                                    )
                                ),
                                "ieee-802.3ad" (
                                    c(
                                        "lacp" (
                                            c(
                                                "port-priority" arg
                                            )
                                        ),
                                        "bundle" (
                                          interface_device
                                        ),
                                        c(
                                          "primary",
                                          "backup"
                                        )
                                    )
                                ),
                                "mpls" (
                                  mpls_ifd_options
                                ),
                                "ignore-l3-incompletes"
                            )
                        ),
                        "redundant-ether-options" (
                            c(
                                "redundancy-group" arg,
                                "loopback",
                                "no-loopback",
                                "flow-control",
                                "no-flow-control",
                                "source-filtering",
                                "no-source-filtering",
                                "source-address-filter" arg.as(:oneline),
                                "link-speed" arg,
                                "minimum-links" arg,
                                "lacp" (
                                    c(
                                        c(
                                          "active",
                                          "passive"
                                        ),
                                        "periodic" arg
                                    )
                                )
                            )
                        ),
                        "aggregated-ether-options" (
                            c(
                                "loopback",
                                "no-loopback",
                                "flow-control",
                                "no-flow-control",
                                "source-filtering",
                                "no-source-filtering",
                                "link-protection",
                                "no-link-protection",
                                "source-address-filter".as(:oneline),
                                "minimum-links" arg,
                                "logical-interface-fpc-redundancy",
                                "rebalance-periodic" (
                                    c(
                                        "start-time" (
                                          time
                                        ),
                                        "interval" arg
                                    )
                                ),
                                "link-speed" arg,
                                "lacp" (
                                    c(
                                        c(
                                          "active",
                                          "passive"
                                        ),
                                        "periodic" arg,
                                        "link-protection" (
                                            c(
                                                "disable",
                                                c(
                                                  "revertive",
                                                  "non-revertive"
                                                )
                                            )
                                        ),
                                        "system-priority" arg,
                                        "system-id" (
                                          mac_addr
                                        ),
                                        "admin-key" arg
                                    )
                                ),
                                "ethernet-switch-profile" (
                                    c(
                                        "tag-protocol-id" arg
                                    )
                                ),
                                "mc-ae"
                            )
                        ),
                        "es-options" (
                            c(
                                "backup-interface" (
                                  interface_device
                                )
                            )
                        ),
                        "dsl-options" (
                            c(
                                "operating-mode" arg
                            )
                        ),
                        "vdsl-options" (
                            c(
                                "vdsl-profile" arg
                            )
                        ),
                        "shdsl-options" (
                            c(
                                "annex" arg,
                                "line-rate" arg,
                                "loopback" arg,
                                "snr-margin" (
                                    c(
                                        "current" arg,
                                        "snext" arg
                                    )
                                )
                            )
                        ),
                        "data-input" (
                            c(
                                c(
                                  "system",
                                  "interface" (
                                    interface_device
                                  )
                                )
                            )
                        ),
                        "switch-options" (
                            c(
                                "switch-port" arg (
                                    c(
                                        "auto-negotiation",
                                        "no-auto-negotiation",
                                        "link-mode" arg,
                                        "speed" arg,
                                        "vlan-id" arg,
                                        "cascade-port"
                                    )
                                )
                            )
                        ),
                        "container-options" (
                            c(
                                "container-type" (
                                    c(
                                        c(
                                          "aps" (
                                            aps_type
                                          )
                                        )
                                    )
                                ),
                                "member-interface-type" (
                                    c(
                                        c(
                                          "sonet" (
                                              c(
                                                  "member-interface-speed" arg
                                              )
                                          ),
                                          "atm" (
                                              c(
                                                  "member-interface-speed" arg
                                              )
                                          )
                                        )
                                    )
                                ),
                                "redundancy" (
                                    c(
                                        "hold-time" (
                                            c(
                                                "up" arg,
                                                "down" arg
                                            )
                                        ).as(:oneline)
                                    )
                                ),
                                "container-list" (
                                  interface_device
                                ),
                                c(
                                    "primary",
                                    "standby"
                                ),
                                "allow-configuration-override"
                            )
                        ),
                        "layer2-policer",
                        "unit" ("$junos-underlying-interface-unit" | "$junos-interface-unit" | "interface-unit-number") (
                            c(
                                "peer-psd" (
                                    c(
                                        "psd-name" arg
                                    )
                                ).as(:oneline),
                                "peer-interface" (
                                    c(
                                        "interface-name" (
                                          interface_unit
                                        )
                                    )
                                ),
                                "interface-shared-with" (
                                    c(
                                        "psd-name" arg
                                    )
                                ),
                                c(
                                  "disable"
                                ),
                                "passive-monitor-mode",
                                "per-session-scheduler",
                                "clear-dont-fragment-bit",
                                "reassemble-packets",
                                "rpm",
                                "description" arg,
                                "metadata" arg,
                                "dial-options",
                                "demux-source" (
                                      ("inet" | "inet6")
                                ),
                                "demux-destination" (
                                      ("inet" | "inet6")
                                ),
                                "encapsulation" arg,
                                "mtu" arg,
                                c(
                                  "point-to-point",
                                  "multipoint"
                                ),
                                "bandwidth" arg,
                                "global-layer2-domainid" arg,
                                "radio-router" (
                                  dynamic_ifbw_parms_type
                                ),
                                "traps",
                                "no-traps",
                                "arp-resp" (
                                    c(
                                        c(
                                          "unrestricted",
                                          "restricted"
                                        )
                                    )
                                ).as(:oneline),
                                "proxy-arp" (
                                    c(
                                        c(
                                          "unrestricted",
                                          "restricted"
                                        )
                                    )
                                ).as(:oneline),
                                c(
                                  "vlan-id" arg,
                                  "vlan-id-range" arg,
                                  "vlan-id-list" arg,
                                  "vlan-tags" (
                                      c(
                                          "outer" arg,
                                          c(
                                            "inner" arg,
                                            "inner-range" arg,
                                            "inner-list" arg
                                          )
                                      )
                                  ).as(:oneline)
                                ),
                                "native-inner-vlan-id" arg,
                                "inner-vlan-id-range".as(:oneline),
                                "accept-source-mac" (
                                    c(
                                        "mac-address" (
                                          mac_list
                                        )
                                    )
                                ),
                                "input-vlan-map" (
                                  vlan_map
                                ),
                                "output-vlan-map" (
                                  vlan_map
                                ),
                                "swap-by-poppush",
                                "receive-lsp" arg,
                                "transmit-lsp" arg,
                                "dlci" arg,
                                "multicast-dlci" arg,
                                c(
                                  "vci" (
                                    atm_vci
                                  ),
                                  "allow-any-vci",
                                  "vpi" arg,
                                  "trunk-id" arg
                                ),
                                "no-vpivci-swapping",
                                c(
                                  "psn-vci" (
                                    atm_vci
                                  ),
                                  "psn-vpi" arg
                                ),
                                "atm-l2circuit-mode" (
                                    c(
                                        c(
                                          "cell",
                                          "aal5"
                                        )
                                    )
                                ).as(:oneline),
                                "vci-range" (
                                    c(
                                        "start" arg,
                                        "end" arg
                                    )
                                ).as(:oneline),
                                "trunk-bandwidth" arg,
                                "multicast-vci" (
                                  atm_vci
                                ),
                                "shaping" (
                                  dcd_shaping_config
                                ),
                                "oam-period" (
                                    c(
                                        c(
                                          "oam-period" arg,
                                          "disable".as(:oneline)
                                        )
                                    )
                                ).as(:oneline),
                                "oam-liveness" (
                                    c(
                                        "up-count" arg,
                                        "down-count" arg
                                    )
                                ),
                                "ppp-options" (
                                  ppp_options_type
                                ),
                                "pppoe-options" (
                                  pppoe_options_type
                                ),
                                "pppoe-underlying-options" (
                                  pppoe_underlying_options_type
                                ),
                                "advisory-options" (
                                  advisory_options_type
                                ),
                                "demux-options" (
                                  demux_options_type
                                ),
                                "targetted-distribution",
                                c(
                                  "keepalives" (
                                    keepalives_type
                                  ).as(:oneline),
                                  "no-keepalives"
                                ),
                                "inverse-arp",
                                "transmit-weight" arg,
                                "epd-threshold" (
                                  epd_threshold_config
                                ).as(:oneline),
                                "cell-bundle-size" arg,
                                "plp-to-clp",
                                "atm-scheduler-map" arg,
                                "mrru" arg,
                                "short-sequence",
                                "fragment-threshold" arg,
                                "drop-timeout" arg,
                                "disable-mlppp-inner-ppp-pfc",
                                "minimum-links" arg,
                                "multilink-max-classes" arg,
                                "compression" (
                                    c(
                                        "rtp" (
                                            c(
                                                "f-max-period" arg,
                                                "queues" arg,
                                                "port" (
                                                    c(
                                                        "minimum" arg,
                                                        "maximum" arg
                                                    )
                                                ).as(:oneline),
                                                "maximum-contexts" (
                                                    c(
                                                        "number" arg
                                                    )
                                                ).as(:oneline)
                                            )
                                        )
                                    )
                                ),
                                "interleave-fragments",
                                "link-layer-overhead" (
                                  unsigned_float
                                ),
                                "accounting-profile" arg,
                                "peer-unit" arg,
                                "tunnel" (
                                    c(
                                        "source" (
                                          ipaddr
                                        ),
                                        "destination" (
                                          ipaddr
                                        ),
                                        "key" arg,
                                        "backup-destination" (
                                          ipaddr
                                        ),
                                        c(
                                          "allow-fragmentation",
                                          "do-not-fragment"
                                        ),
                                        "ttl" arg,
                                        "traffic-class" arg,
                                        "flow-label" arg,
                                        "path-mtu-discovery",
                                        "no-path-mtu-discovery",
                                        "routing-instance" (
                                            c(
                                                "destination" arg
                                            )
                                        )
                                    )
                                ),
                                "compression-device" (
                                  interface_unit
                                ),
                                "atm-policer",
                                "layer2-policer",
                                "filter",
                                "multi-chassis-protection" (
                                  multi_chassis_protection_group
                                ),
                                "family" (
                                    c(
                                        "inet" (
                                            c(
                                                "targeted-broadcast" (
                                                    c(
                                                        c(
                                                          "forward-and-send-to-re",
                                                          "forward-only"
                                                        )
                                                    )
                                                ),
                                                "receive-options-packets",
                                                "receive-ttl-exceeded",
                                                "accounting" (
                                                    c(
                                                        "source-class-usage" (
                                                            c(
                                                                "input",
                                                                "output"
                                                            )
                                                        ),
                                                        "destination-class-usage"
                                                    )
                                                ),
                                                "mac-validate" arg,
                                                "rpf-check" (
                                                    c(
                                                        "fail-filter" arg,
                                                        "mode" (
                                                            c(
                                                                "loose"
                                                            )
                                                        ).as(:oneline)
                                                    )
                                                ),
                                                "mtu" arg,
                                                "no-redirects",
                                                "no-neighbor-learn",
                                                "unconditional-src-learn",
                                                "multicast-only",
                                                "primary",
                                                "ipsec-sa" arg,
                                                "demux-source",
                                                "demux-destination",
                                                "filter" (
                                                    c(
                                                        c(
                                                          "input" (
                                                              c(
                                                                  "filter-name" arg,
                                                                  "precedence" arg
                                                              )
                                                          ).as(:oneline),
                                                          "input-list" arg
                                                        ),
                                                        c(
                                                          "output" (
                                                              c(
                                                                  "filter-name" arg,
                                                                  "precedence" arg
                                                              )
                                                          ).as(:oneline),
                                                          "output-list" arg
                                                        ),
                                                        "adf" (
                                                            c(
                                                                "rule" arg,
                                                                "counter",
                                                                "input-precedence" arg,
                                                                "output-precedence" arg
                                                            )
                                                        ),
                                                        "group" arg,
                                                        "dialer" arg
                                                    )
                                                ),
                                                "simple-filter" (
                                                    c(
                                                        "input" arg
                                                    )
                                                ),
                                                "input-hierarchical-policer" arg,
                                                "policer" (
                                                    c(
                                                        "arp" arg,
                                                        "input" arg,
                                                        "output" arg
                                                    )
                                                ),
                                                "sampling" (
                                                    c(
                                                        "input",
                                                        "output"
                                                    )
                                                ),
                                                "next-hop-tunnel" arg (
                                                    c(
                                                        "ipsec-vpn" arg
                                                    )
                                                ),
                                                "address" arg (
                                                    c(
                                                        "destination" (
                                                          ipv4addr
                                                        ),
                                                        "destination-profile" arg,
                                                        "broadcast" (
                                                          ipv4addr
                                                        ),
                                                        "primary",
                                                        "preferred",
                                                        "master-only",
                                                        "multipoint-destination" arg (
                                                            c(
                                                                c(
                                                                  "dlci" arg,
                                                                  "vci" (
                                                                    atm_vci
                                                                  )
                                                                ),
                                                                "shaping" (
                                                                  dcd_shaping_config
                                                                ),
                                                                "oam-period" (
                                                                    c(
                                                                        c(
                                                                          "oam_period" arg,
                                                                          "disable".as(:oneline)
                                                                        )
                                                                    )
                                                                ).as(:oneline),
                                                                "oam-liveness" (
                                                                    c(
                                                                        "up-count" arg,
                                                                        "down-count" arg
                                                                    )
                                                                ),
                                                                "inverse-arp",
                                                                "transmit-weight" arg,
                                                                "epd-threshold" (
                                                                  epd_threshold_config
                                                                ).as(:oneline)
                                                            )
                                                        ),
                                                        "arp" arg (
                                                            c(
                                                                "l2-interface" (
                                                                  interface_name
                                                                ),
                                                                c(
                                                                  "mac" (
                                                                    mac_unicaset
                                                                  ),
                                                                  "multicast-mac" (
                                                                    mac_multicast
                                                                  )
                                                                ),
                                                                "publish"
                                                            )
                                                        ).as(:oneline),
                                                        "web-authentication" (
                                                            c(
                                                                "http",
                                                                "https",
                                                                "redirect-to-https"
                                                            )
                                                        ),
                                                        "vrrp-group" (
                                                          vrrp_group
                                                        )
                                                    )
                                                ),
                                                "unnumbered-address" (
                                                    c(
                                                        "source" (
                                                          interface_unit
                                                        ),
                                                        "preferred-source-address" arg,
                                                        "destination" (
                                                          ipv4addr
                                                        ),
                                                        "destination-profile" arg
                                                    )
                                                ).as(:oneline),
                                                "location-pool-address",
                                                "negotiate-address",
                                                "dhcp" (
                                                    c(
                                                        "client-identifier" (
                                                            c(
                                                                c(
                                                                  "ascii" arg,
                                                                  "hexadecimal" arg
                                                                )
                                                            )
                                                        ).as(:oneline),
                                                        "lease-time" arg,
                                                        "retransmission-attempt" arg,
                                                        "retransmission-interval" arg,
                                                        "server-address" (
                                                          ipv4addr
                                                        ),
                                                        "update-server",
                                                        "vendor-id" arg
                                                    )
                                                ),
                                                "dhcp-client" (
                                                  dhcp_client_type
                                                )
                                            )
                                        ),
                                        "iso" (
                                            c(
                                                "address" arg,
                                                "mtu" arg
                                            )
                                        ),
                                        "inet6" (
                                            c(
                                                "rpf-check" (
                                                    c(
                                                        "fail-filter" arg,
                                                        "mode" (
                                                            c(
                                                                "loose"
                                                            )
                                                        ).as(:oneline)
                                                    )
                                                ),
                                                "accounting" (
                                                    c(
                                                        "source-class-usage" (
                                                            c(
                                                                "input",
                                                                "output"
                                                            )
                                                        ),
                                                        "destination-class-usage"
                                                    )
                                                ),
                                                "mtu" arg,
                                                "nd6-stale-time" arg,
                                                "no-neighbor-learn",
                                                "filter" (
                                                    c(
                                                        c(
                                                          "input" (
                                                              c(
                                                                  "filter-name" arg,
                                                                  "precedence" arg
                                                              )
                                                          ).as(:oneline),
                                                          "input-list" arg
                                                        ),
                                                        c(
                                                          "output" (
                                                              c(
                                                                  "filter-name" arg,
                                                                  "precedence" arg
                                                              )
                                                          ).as(:oneline),
                                                          "output-list" arg
                                                        ),
                                                        "adf" (
                                                            c(
                                                                "rule" arg,
                                                                "counter",
                                                                "input-precedence" arg,
                                                                "output-precedence" arg
                                                            )
                                                        ),
                                                        "group" arg,
                                                        "dialer" arg
                                                    )
                                                ),
                                                "input-hierarchical-policer" arg,
                                                "policer" (
                                                    c(
                                                        "input" arg,
                                                        "output" arg
                                                    )
                                                ),
                                                "sampling" (
                                                    c(
                                                        "input",
                                                        "output"
                                                    )
                                                ),
                                                "address" arg (
                                                    c(
                                                        "destination" (
                                                          ipv6addr
                                                        ),
                                                        "eui-64",
                                                        "primary",
                                                        "preferred",
                                                        "master-only",
                                                        "ndp" arg (
                                                            c(
                                                                "l2-interface" (
                                                                  interface_name
                                                                ),
                                                                c(
                                                                  "mac" (
                                                                    mac_unicaset
                                                                  ),
                                                                  "multicast-mac" (
                                                                    mac_multicast
                                                                  )
                                                                ),
                                                                "publish"
                                                            )
                                                        ).as(:oneline),
                                                        "vrrp-inet6-group" (
                                                          vrrp_group
                                                        ),
                                                        "web-authentication" (
                                                            c(
                                                                "http",
                                                                "https",
                                                                "redirect-to-https"
                                                            )
                                                        )
                                                    )
                                                ),
                                                "demux-source",
                                                "demux-destination",
                                                "unnumbered-address" (
                                                    c(
                                                        "source" (
                                                          interface_unit
                                                        ),
                                                        "preferred-source-address" arg
                                                    )
                                                ).as(:oneline),
                                                "dad-disable",
                                                "no-dad-disable",
                                                "dhcpv6-client" (
                                                    c(
                                                        "client-type" arg,
                                                        "client-ia-type" ("ia-na" | "ia-pd"),
                                                        "rapid-commit",
                                                        "update-router-advertisement" (
                                                            c(
                                                                "interface" arg
                                                            )
                                                        ),
                                                        "client-identifier" (
                                                            c(
                                                                "duid-type" arg
                                                            )
                                                        ).as(:oneline),
                                                        "req-option" ("dns-server" | "domain" | "ntp-server" | "time-zone" | "sip-server" | "sip-domain" | "nis-server" | "nis-domain" | "fqdn" | "vendor-spec"),
                                                        "update-server",
                                                        "retransmission-attempt" arg
                                                    )
                                                )
                                            )
                                        ),
                                        "mpls" (
                                            c(
                                                "mtu" arg,
                                                "maximum-labels" arg,
                                                "filter" (
                                                    c(
                                                        c(
                                                          "input" arg,
                                                          "input-list" arg
                                                        ),
                                                        c(
                                                          "output" arg,
                                                          "output-list" arg
                                                        ),
                                                        "group" arg,
                                                        "dialer" arg
                                                    )
                                                ),
                                                "input-hierarchical-policer" arg,
                                                "policer" (
                                                    c(
                                                        "input" arg,
                                                        "output" arg
                                                    )
                                                )
                                            )
                                        ),
                                        "mlppp" (
                                            c(
                                                "bundle" (
                                                  interface_unit
                                                )
                                            )
                                        ),
                                        "mlfr-end-to-end" (
                                            c(
                                                "bundle" (
                                                  interface_unit
                                                )
                                            )
                                        ),
                                        "mlfr-uni-nni" (
                                            c(
                                                "bundle" (
                                                  interface_unit
                                                )
                                            )
                                        ),
                                        "ccc" (
                                            c(
                                                "filter" (
                                                    c(
                                                        c(
                                                          "input" arg,
                                                          "input-list" arg
                                                        ),
                                                        c(
                                                          "output" arg,
                                                          "output-list" arg
                                                        ),
                                                        "group" arg
                                                    )
                                                ),
                                                "policer" (
                                                    c(
                                                        "input" arg,
                                                        "output" arg
                                                    )
                                                ),
                                                "translate-fecn-and-becn",
                                                c(
                                                  "translate-discard-eligible",
                                                  "translate-plp-control-word-de"
                                                ),
                                                "keep-address-and-control"
                                            )
                                        ),
                                        "tcc" (
                                            c(
                                                "policer" (
                                                    c(
                                                        "input" arg,
                                                        "output" arg
                                                    )
                                                ),
                                                "proxy" (
                                                    c(
                                                        "inet-address" (
                                                          ipv4addr
                                                        )
                                                    )
                                                ),
                                                "remote" (
                                                    c(
                                                        "inet-address" (
                                                          ipv4addr
                                                        ),
                                                        "mac-address" (
                                                          mac_addr
                                                        )
                                                    )
                                                ),
                                                "protocols"
                                            )
                                        ),
                                        "vpls" (
                                            c(
                                                "core-facing",
                                                "filter" (
                                                    c(
                                                        c(
                                                          "input" (
                                                              c(
                                                                  "filter-name" arg,
                                                                  "precedence" arg
                                                              )
                                                          ).as(:oneline),
                                                          "input-list" arg
                                                        ),
                                                        c(
                                                          "output" (
                                                              c(
                                                                  "filter-name" arg,
                                                                  "precedence" arg
                                                              )
                                                          ).as(:oneline),
                                                          "output-list" arg
                                                        ),
                                                        "adf" (
                                                            c(
                                                                "rule" arg,
                                                                "counter",
                                                                "input-precedence" arg,
                                                                "output-precedence" arg
                                                            )
                                                        ),
                                                        "group" arg
                                                    )
                                                ),
                                                "policer" (
                                                    c(
                                                        "input" arg,
                                                        "output" arg
                                                    )
                                                )
                                            )
                                        ),
                                        "bridge" (
                                            c(
                                                "core-facing",
                                                "filter" (
                                                    c(
                                                        c(
                                                          "input" (
                                                              c(
                                                                  "filter-name" arg,
                                                                  "precedence" arg
                                                              )
                                                          ).as(:oneline),
                                                          "input-list" arg
                                                        ),
                                                        c(
                                                          "output" (
                                                              c(
                                                                  "filter-name" arg,
                                                                  "precedence" arg
                                                              )
                                                          ).as(:oneline),
                                                          "output-list" arg
                                                        ),
                                                        "adf" (
                                                            c(
                                                                "rule" arg,
                                                                "counter",
                                                                "input-precedence" arg,
                                                                "output-precedence" arg
                                                            )
                                                        ),
                                                        "group" arg
                                                    )
                                                ),
                                                "policer" (
                                                    c(
                                                        "input" arg,
                                                        "output" arg
                                                    )
                                                ),
                                                "interface-mode" arg,
                                                "bridge-domain-type" arg,
                                                c(
                                                  "vlan-id" arg,
                                                  "vlan-id-list" arg,
                                                  "inner-vlan-id-list" arg
                                                ),
                                                "vlan-rewrite" (
                                                    c(
                                                        "translate" arg (
                                                            c(
                                                                "to-vlan-id" arg
                                                            )
                                                        ).as(:oneline)
                                                    )
                                                ),
                                                c(
                                                  "isid-list" arg
                                                ),
                                                "storm-control" (
                                                  storm_control
                                                )
                                            )
                                        ),
                                        "ethernet-switching" (
                                          ethernet_switching_type
                                        ),
                                        "fibre-channel" (
                                          fibre_channel_type
                                        ),
                                        "pppoe" (
                                          pppoe_underlying_options_type
                                        ),
                                        "any" (
                                            c(
                                                "filter" (
                                                    c(
                                                        "input" arg,
                                                        "group" arg
                                                    )
                                                )
                                            )
                                        )
                                    )
                                ),
                                "service-domain" arg,
                                "copy-tos-to-outer-ip-header",
                                "dialer-options" (
                                    c(
                                        "pool" arg,
                                        "dial-string" arg,
                                        "incoming-map" (
                                            c(
                                                c(
                                                  "caller" arg.as(:oneline),
                                                  "accept-all"
                                                )
                                            )
                                        ),
                                        "callback",
                                        "callback-wait-period" arg,
                                        "redial-delay" arg,
                                        "idle-timeout" arg,
                                        "watch-list" arg,
                                        "load-threshold" arg,
                                        "load-interval" arg,
                                        "activation-delay" arg,
                                        "deactivation-delay" arg,
                                        "initial-route-check" arg
                                    )
                                ),
                                "backup-options" (
                                    c(
                                        "interface" (
                                          interface_name
                                        )
                                    )
                                ),
                                "dynamic-call-admission-control"
                            )
                        ),
                        "no-partition" (
                            c(
                                "interface-type" arg
                            )
                        ).as(:oneline),
                        "partition" arg (
                            c(
                                "oc-slice" arg,
                                "timeslots" arg,
                                "interface-type" arg
                            )
                        ).as(:oneline),
                        "modem-options" (
                            c(
                                "init-command-string" arg,
                                "dialin" arg
                            )
                        ),
                        "isdn-options" (
                            c(
                                "switch-type" arg,
                                "media-type" arg,
                                "spid1" arg,
                                "spid2" arg,
                                "calling-number" arg,
                                "incoming-called-number" arg (
                                    c(
                                        "reject"
                                    )
                                ).as(:oneline),
                                "tei-option" arg,
                                "static-tei-val" arg,
                                "t310" arg,
                                "bchannel-allocation" arg
                            )
                        ),
                        "dialer-options" (
                            c(
                                "pool" arg (
                                    c(
                                        "priority" arg
                                    )
                                ).as(:oneline)
                            )
                        ),
                        "redundant-pseudo-interface-options" (
                            c(
                                "redundancy-group" arg
                            )
                        ),
                        "cellular-options"
                    )
                ),
                "interface" (
                  interfaces_type
                )
            )
        ),
        "protocols" (
            c(
                "igmp" (
                    c(
                        "traceoptions" (
                            c(
                                "file" (
                                  trace_file_type
                                ),
                                "flag" ("packets" | "query" | "report" | "leave" | "mtrace" | "group" | "client-notification" | "host-notification" | "route" | "normal" | "general" | "state" | "policy" | "task" | "timer" | "all") (
                                    c(
                                        "send",
                                        "receive",
                                        "detail",
                                        "disable"
                                    )
                                ).as(:oneline)
                            )
                        ),
                        "query-interval" arg,
                        "query-response-interval" arg,
                        "query-last-member-interval" arg,
                        "robust-count" arg,
                        "maximum-transmit-rate" arg,
                        "accounting",
                        "interface" ("$junos-interface-name" | "interface-name") (
                            c(
                                c(
                                  "disable"
                                ),
                                "version" arg,
                                "static" (
                                    c(
                                        "group" arg (
                                            c(
                                                "group-increment" (
                                                  ipv4addr
                                                ),
                                                "group-count" arg,
                                                "exclude",
                                                "source" arg (
                                                    c(
                                                        "source-increment" (
                                                          ipv4addr
                                                        ),
                                                        "source-count" arg
                                                    )
                                                )
                                            )
                                        )
                                    )
                                ),
                                "ssm-map" arg,
                                "ssm-map-policy" (
                                  policy_algebra
                                ),
                                "immediate-leave",
                                "promiscuous-mode",
                                "accounting",
                                "no-accounting",
                                "group-policy" (
                                  policy_algebra
                                ),
                                "group-limit" arg,
                                "passive" (
                                    c(
                                        "allow-receive",
                                        "send-general-query",
                                        "send-group-query"
                                    )
                                ).as(:oneline),
                                "oif-map" (
                                  policy_algebra
                                )
                            )
                        )
                    )
                ),
                "oam" (
                    c(
                        "ethernet" (
                            c(
                                "link-fault-management" (
                                    c(
                                        "traceoptions" (
                                            c(
                                                "no-remote-trace",
                                                "file" (
                                                    c(
                                                        "filename" arg,
                                                        "size" arg,
                                                        "files" arg,
                                                        "world-readable",
                                                        "no-world-readable",
                                                        "match" (
                                                          regular_expression
                                                        )
                                                    )
                                                ).as(:oneline),
                                                "flag" ("configuration" | "routing-socket" | "protocol" | "action-profile" | "all").as(:oneline)
                                            )
                                        ),
                                        "action-profile" arg (
                                            c(
                                                "event" (
                                                    c(
                                                        "link-adjacency-loss",
                                                        "protocol-down",
                                                        "link-event-rate" (
                                                            c(
                                                                "symbol-period" arg,
                                                                "frame-error" arg,
                                                                "frame-period" arg,
                                                                "frame-period-summary" arg
                                                            )
                                                        )
                                                    )
                                                ),
                                                "action" (
                                                    c(
                                                        "syslog",
                                                        "link-down",
                                                        "send-critical-event"
                                                    )
                                                )
                                            )
                                        ),
                                        "interface" arg (
                                            c(
                                                "apply-action-profile" arg,
                                                "pdu-interval" arg,
                                                "link-discovery" arg,
                                                "pdu-threshold" arg,
                                                "remote-loopback",
                                                "negotiation-options" (
                                                    c(
                                                        "no-allow-link-events",
                                                        "allow-remote-loopback"
                                                    )
                                                ),
                                                "event-thresholds" (
                                                    c(
                                                        "symbol-period" arg,
                                                        "frame-error" arg,
                                                        "frame-period" arg,
                                                        "frame-period-summary" arg
                                                    )
                                                )
                                            )
                                        )
                                    )
                                ),
                                "connectivity-fault-management" (
                                    c(
                                        "performance-monitoring",
                                        "connection-protection",
                                        "traceoptions" (
                                          cfm_traceoptions
                                        ),
                                        "action-profile" arg (
                                            c(
                                                "event" (
                                                    c(
                                                        "adjacency-loss",
                                                        "rdi",
                                                        "connection-protection-tlv" arg
                                                    )
                                                ),
                                                "action" (
                                                    c(
                                                        "interface-down",
                                                        "propagate-remote-mac-flush"
                                                    )
                                                ),
                                                "clear-action" (
                                                    c(
                                                        "interface-down" (
                                                            c(
                                                                "peer-interface"
                                                            )
                                                        ).as(:oneline),
                                                        "propagate-remote-mac-flush"
                                                    )
                                                ),
                                                "default-actions" (
                                                    c(
                                                        "interface-down"
                                                    )
                                                )
                                            )
                                        ),
                                        "policer" (
                                            c(
                                                "continuity-check" arg,
                                                "other" arg,
                                                "all" arg
                                            )
                                        ),
                                        "linktrace" (
                                            c(
                                                "path-database-size" arg,
                                                "age" arg
                                            )
                                        ),
                                        "maintenance-domain" ("default-0" | "default-1" | "default-2" | "default-3" | "default-4" | "default-5" | "default-6" | "default-7" | "md-name") (
                                            c(
                                                "bridge-domain" arg (
                                                    c(
                                                        "vlan-id" arg
                                                    )
                                                ).as(:oneline),
                                                "virtual-switch" arg (
                                                    c(
                                                        "bridge-domain" arg (
                                                            c(
                                                                "vlan-id" arg
                                                            )
                                                        ).as(:oneline)
                                                    )
                                                ),
                                                "instance" arg.as(:oneline),
                                                "interface" arg.as(:oneline),
                                                "level" arg,
                                                "name-format" arg,
                                                "mip-half-function" arg,
                                                "maintenance-association" arg (
                                                    c(
                                                        "short-name-format" arg,
                                                        "protect-maintenance-association".as(:oneline),
                                                        "primary-vid" arg,
                                                        "continuity-check" (
                                                            c(
                                                                "interval" arg,
                                                                "loss-threshold" arg,
                                                                "hold-interval" arg,
                                                                "port-status-tlv",
                                                                "interface-status-tlv",
                                                                "connection-protection-tlv",
                                                                "convey-loss-threshold"
                                                            )
                                                        ),
                                                        "mip-half-function" arg,
                                                        "mep" arg (
                                                            c(
                                                                "interface" (
                                                                    c(
                                                                        "interface-name" (
                                                                          interface_unit
                                                                        ),
                                                                        "vlan" arg,
                                                                        c(
                                                                          "working",
                                                                          "protect"
                                                                        ),
                                                                        "vlan-id" arg
                                                                    )
                                                                ).as(:oneline),
                                                                "direction" arg,
                                                                "priority" arg,
                                                                "auto-discovery",
                                                                "remote-mep" arg (
                                                                    c(
                                                                        "action-profile" arg,
                                                                        "sla-iterator-profile" arg (
                                                                            c(
                                                                                "iteration-count" arg,
                                                                                "priority" arg,
                                                                                "data-tlv-size" arg
                                                                            )
                                                                        )
                                                                    )
                                                                ),
                                                                "lowest-priority-defect" arg
                                                            )
                                                        ),
                                                        "policer" (
                                                            c(
                                                                "continuity-check" arg,
                                                                "other" arg,
                                                                "all" arg
                                                            )
                                                        )
                                                    )
                                                ),
                                                "vlan-name" arg
                                            )
                                        ),
                                        "esp-traceoptions" (
                                            c(
                                                "file" (
                                                  esp_trace_file_type
                                                ),
                                                "flag" ("krt" | "error" | "esp" | "normal" | "task" | "lib" | "timer" | "interface" | "all") (
                                                    c(
                                                        "disable"
                                                    )
                                                ).as(:oneline)
                                            )
                                        )
                                    )
                                ),
                                "evcs" arg (
                                    c(
                                        "evc-protocol" (
                                            c(
                                                c(
                                                  "cfm" (
                                                      c(
                                                          "maintenance-domain" arg,
                                                          "maintenance-association" arg
                                                      )
                                                  ).as(:oneline),
                                                  "vpls" (
                                                      c(
                                                          "routing-instance" arg
                                                      )
                                                  ).as(:oneline)
                                                )
                                            )
                                        ).as(:oneline),
                                        "remote-uni-count" arg,
                                        "multipoint-to-multipoint"
                                    )
                                ),
                                "lmi" (
                                    c(
                                        "traceoptions" (
                                            c(
                                                "no-remote-trace",
                                                "file" (
                                                    c(
                                                        "filename" arg,
                                                        "size" arg,
                                                        "files" arg,
                                                        "world-readable",
                                                        "no-world-readable",
                                                        "match" (
                                                          regular_expression
                                                        )
                                                    )
                                                ).as(:oneline),
                                                "flag" ("configuration" | "routing-socket" | "protocol" | "init" | "error" | "packet" | "all").as(:oneline)
                                            )
                                        ),
                                        "status-counter" arg,
                                        "polling-verification-timer" arg,
                                        "interface" arg (
                                            c(
                                                "uni-id" arg,
                                                "status-counter" arg,
                                                "polling-verification-timer" arg,
                                                "evc-map-type" arg,
                                                "evc" arg (
                                                    c(
                                                        "default-evc",
                                                        "vlan-list" arg
                                                    )
                                                )
                                            )
                                        )
                                    )
                                )
                            )
                        ),
                        "gre-tunnel"
                    )
                ),
                "mld" (
                    c(
                        "traceoptions" (
                            c(
                                "file" (
                                  trace_file_type
                                ),
                                "flag" ("packets" | "query" | "report" | "leave" | "mtrace" | "group" | "client-notification" | "host-notification" | "route" | "normal" | "general" | "state" | "policy" | "task" | "timer" | "all") (
                                    c(
                                        "send",
                                        "receive",
                                        "detail",
                                        "disable"
                                    )
                                ).as(:oneline)
                            )
                        ),
                        "query-interval" arg,
                        "query-response-interval" arg,
                        "query-last-member-interval" arg,
                        "robust-count" arg,
                        "maximum-transmit-rate" arg,
                        "accounting",
                        "interface" ("$junos-interface-name" | "interface-name") (
                            c(
                                c(
                                  "disable"
                                ),
                                "version" arg,
                                "static" (
                                    c(
                                        "group" arg (
                                            c(
                                                "group-increment" (
                                                  ipv6addr
                                                ),
                                                "group-count" arg,
                                                "exclude",
                                                "source" arg (
                                                    c(
                                                        "source-increment" (
                                                          ipv6addr
                                                        ),
                                                        "source-count" arg
                                                    )
                                                )
                                            )
                                        )
                                    )
                                ),
                                "ssm-map" arg,
                                "ssm-map-policy" (
                                  policy_algebra
                                ),
                                "immediate-leave",
                                "group-policy" (
                                  policy_algebra
                                ),
                                "group-limit" arg,
                                "accounting",
                                "no-accounting",
                                "passive" (
                                    c(
                                        "allow-receive",
                                        "send-general-query",
                                        "send-group-query"
                                    )
                                ).as(:oneline),
                                "oif-map" (
                                  policy_algebra
                                )
                            )
                        )
                    )
                ),
                "router-advertisement" (
                    c(
                        "traceoptions" (
                            c(
                                "file" (
                                  trace_file_type
                                ),
                                "flag" ("route" | "normal" | "general" | "state" | "policy" | "task" | "timer" | "all").as(:oneline)
                            )
                        ),
                        "interface" ("$junos-interface-name" | "interface-name") (
                            c(
                                "max-advertisement-interval" arg,
                                "min-advertisement-interval" arg,
                                "managed-configuration",
                                "no-managed-configuration",
                                "other-stateful-configuration",
                                "no-other-stateful-configuration",
                                "link-mtu",
                                "no-link-mtu",
                                "reachable-time" arg,
                                "retransmit-timer" arg,
                                "virtual-router-only",
                                "current-hop-limit" arg,
                                "default-lifetime" arg,
                                "prefix" arg (
                                    c(
                                        "valid-lifetime" arg,
                                        "on-link",
                                        "no-on-link",
                                        "preferred-lifetime" arg,
                                        "autonomous",
                                        "no-autonomous"
                                    )
                                )
                            )
                        )
                    )
                )
            )
        ),
        "class-of-service" (
          juniper_class_of_service_options
        ),
        "routing-options" (
            c(
                "rib" arg (
                    c(
                        "static" (
                            c(
                                "rib-group" arg,
                                "defaults" (
                                    c(
                                        "retain",
                                        "no-retain",
                                        "install",
                                        "no-install",
                                        "readvertise",
                                        "no-readvertise",
                                        "resolve",
                                        "no-resolve",
                                        c(
                                          "active",
                                          "passive"
                                        ),
                                        "metric" (
                                          rib_static_metric_type
                                        ),
                                        "metric2" (
                                          rib_static_metric_type
                                        ),
                                        "metric3" (
                                          rib_static_metric_type
                                        ),
                                        "metric4" (
                                          rib_static_metric_type
                                        ),
                                        "tag" (
                                          rib_static_metric_type
                                        ),
                                        "tag2" (
                                          rib_static_metric_type
                                        ),
                                        "preference" (
                                          rib_static_metric_type
                                        ),
                                        "preference2" (
                                          rib_static_metric_type
                                        ),
                                        "color" (
                                          rib_static_metric_type
                                        ),
                                        "color2" (
                                          rib_static_metric_type
                                        ),
                                        "community" (
                                          community
                                        ),
                                        "as-path" (
                                            c(
                                                "path" arg,
                                                "origin" arg,
                                                "atomic-aggregate",
                                                "aggregator" (
                                                    c(
                                                        "as-number" arg,
                                                        "address" (
                                                          ipv4addr
                                                        )
                                                    )
                                                )
                                            )
                                        )
                                    )
                                ),
                                "route" arg (
                                    c(
                                        c(
                                          "next-hop" (
                                            ipaddr_or_interface
                                          ),
                                          "reject",
                                          "discard",
                                          "receive",
                                          "next-table" arg
                                        ),
                                        "qualified-next-hop" (
                                          qualified_nh_obj
                                        ),
                                        "lsp-next-hop" (
                                          lsp_nh_obj
                                        ),
                                        "static-lsp-next-hop" (
                                          lsp_nh_obj
                                        ),
                                        "p2mp-lsp-next-hop" (
                                          lsp_nh_obj
                                        ),
                                        "backup-pe-group" arg,
                                        "bfd-liveness-detection" (
                                            c(
                                                "version" arg,
                                                "minimum-interval" arg,
                                                "minimum-receive-interval" arg,
                                                "multiplier" arg,
                                                c(
                                                  "no-adaptation"
                                                ),
                                                "transmit-interval" (
                                                    c(
                                                        "minimum-interval" arg,
                                                        "threshold" arg
                                                    )
                                                ),
                                                "detection-time" (
                                                    c(
                                                        "threshold" arg
                                                    )
                                                ),
                                                "authentication" (
                                                    c(
                                                        "key-chain" arg,
                                                        "algorithm" arg,
                                                        "loose-check"
                                                    )
                                                ),
                                                "neighbor" (
                                                  ipaddr
                                                ),
                                                "local-address" (
                                                  ipaddr
                                                ),
                                                "holddown-interval" arg,
                                                "minimum-receive-ttl" arg
                                            )
                                        ),
                                        "retain",
                                        "no-retain",
                                        "install",
                                        "no-install",
                                        "readvertise",
                                        "no-readvertise",
                                        "resolve",
                                        "no-resolve",
                                        c(
                                          "active",
                                          "passive"
                                        ),
                                        "metric" (
                                          rib_static_metric_type
                                        ),
                                        "metric2" (
                                          rib_static_metric_type
                                        ),
                                        "metric3" (
                                          rib_static_metric_type
                                        ),
                                        "metric4" (
                                          rib_static_metric_type
                                        ),
                                        "tag" (
                                          rib_static_metric_type
                                        ),
                                        "tag2" (
                                          rib_static_metric_type
                                        ),
                                        "preference" (
                                          rib_static_metric_type
                                        ),
                                        "preference2" (
                                          rib_static_metric_type
                                        ),
                                        "color" (
                                          rib_static_metric_type
                                        ),
                                        "color2" (
                                          rib_static_metric_type
                                        ),
                                        "community" (
                                          community
                                        ),
                                        "as-path" (
                                            c(
                                                "path" arg,
                                                "origin" arg,
                                                "atomic-aggregate",
                                                "aggregator" (
                                                    c(
                                                        "as-number" arg,
                                                        "address" (
                                                          ipv4addr
                                                        )
                                                    )
                                                )
                                            )
                                        )
                                    )
                                ),
                                "iso-route" arg (
                                    c(
                                        c(
                                          "next-hop" (
                                            ipaddr_or_interface
                                          ),
                                          "reject",
                                          "discard",
                                          "receive",
                                          "next-table" arg
                                        ),
                                        "qualified-next-hop" (
                                          qualified_nh_obj
                                        ),
                                        "lsp-next-hop" (
                                          lsp_nh_obj
                                        ),
                                        "static-lsp-next-hop" (
                                          lsp_nh_obj
                                        ),
                                        "p2mp-lsp-next-hop" (
                                          lsp_nh_obj
                                        ),
                                        "backup-pe-group" arg,
                                        "bfd-liveness-detection" (
                                            c(
                                                "version" arg,
                                                "minimum-interval" arg,
                                                "minimum-receive-interval" arg,
                                                "multiplier" arg,
                                                c(
                                                  "no-adaptation"
                                                ),
                                                "transmit-interval" (
                                                    c(
                                                        "minimum-interval" arg,
                                                        "threshold" arg
                                                    )
                                                ),
                                                "detection-time" (
                                                    c(
                                                        "threshold" arg
                                                    )
                                                ),
                                                "authentication" (
                                                    c(
                                                        "key-chain" arg,
                                                        "algorithm" arg,
                                                        "loose-check"
                                                    )
                                                ),
                                                "neighbor" (
                                                  ipaddr
                                                ),
                                                "local-address" (
                                                  ipaddr
                                                ),
                                                "holddown-interval" arg,
                                                "minimum-receive-ttl" arg
                                            )
                                        ),
                                        "retain",
                                        "no-retain",
                                        "install",
                                        "no-install",
                                        "readvertise",
                                        "no-readvertise",
                                        "resolve",
                                        "no-resolve",
                                        c(
                                          "active",
                                          "passive"
                                        ),
                                        "metric" (
                                          rib_static_metric_type
                                        ),
                                        "metric2" (
                                          rib_static_metric_type
                                        ),
                                        "metric3" (
                                          rib_static_metric_type
                                        ),
                                        "metric4" (
                                          rib_static_metric_type
                                        ),
                                        "tag" (
                                          rib_static_metric_type
                                        ),
                                        "tag2" (
                                          rib_static_metric_type
                                        ),
                                        "preference" (
                                          rib_static_metric_type
                                        ),
                                        "preference2" (
                                          rib_static_metric_type
                                        ),
                                        "color" (
                                          rib_static_metric_type
                                        ),
                                        "color2" (
                                          rib_static_metric_type
                                        ),
                                        "community" (
                                          community
                                        ),
                                        "as-path" (
                                            c(
                                                "path" arg,
                                                "origin" arg,
                                                "atomic-aggregate",
                                                "aggregator" (
                                                    c(
                                                        "as-number" arg,
                                                        "address" (
                                                          ipv4addr
                                                        )
                                                    )
                                                )
                                            )
                                        )
                                    )
                                )
                            )
                        ),
                        "martians" (
                          martian_type
                        ),
                        "aggregate" (
                          rib_aggregate_type
                        ),
                        "generate" (
                          rib_aggregate_type
                        ),
                        c(
                          "maximum-paths" (
                              c(
                                  "limit" arg,
                                  c(
                                    "threshold" arg,
                                    "log-only"
                                  ),
                                  "log-interval" arg
                              )
                          ).as(:oneline)
                        ),
                        "maximum-prefixes" (
                            c(
                                "limit" arg,
                                c(
                                  "threshold" arg,
                                  "log-only"
                                ),
                                "log-interval" arg
                            )
                        ).as(:oneline),
                        "multipath" (
                            c(
                                "vpn-unequal-cost" (
                                    c(
                                        "equal-external-internal"
                                    )
                                ).as(:oneline),
                                "as-path-compare"
                            )
                        ),
                        "label" (
                            c(
                                "allocation" (
                                  policy_algebra
                                ),
                                "substitution" (
                                  policy_algebra
                                )
                            )
                        ),
                        "access" (
                            c(
                                "route" arg (
                                    c(
                                        "next-hop" (
                                          ipaddr_or_interface
                                        ),
                                        "qualified-next-hop" (
                                          qualified_nh_obj
                                        ),
                                        "metric" arg,
                                        "preference" arg,
                                        "tag" arg
                                    )
                                )
                            )
                        ),
                        "access-internal" (
                            c(
                                "route" arg (
                                    c(
                                        "next-hop" (
                                          ipaddr_or_interface
                                        ),
                                        "qualified-next-hop" (
                                          qualified_nh_obj
                                        )
                                    )
                                )
                            )
                        )
                    )
                ),
                "access" (
                    c(
                        "route" arg (
                            c(
                                "next-hop" (
                                  ipaddr_or_interface
                                ),
                                "qualified-next-hop" (
                                  qualified_nh_obj
                                ),
                                "metric" arg,
                                "preference" arg,
                                "tag" arg
                            )
                        )
                    )
                ),
                "access-internal" (
                    c(
                        "route" arg (
                            c(
                                "next-hop" (
                                  ipaddr_or_interface
                                ),
                                "qualified-next-hop" (
                                  qualified_nh_obj
                                )
                            )
                        )
                    )
                ),
                "multicast" (
                    c(
                        "traceoptions" (
                            c(
                                "file" (
                                  trace_file_type
                                ),
                                "flag" ("parse" | "config-internal" | "route" | "normal" | "general" | "state" | "policy" | "task" | "timer" | "all") (
                                    c(
                                        "disable"
                                    )
                                ).as(:oneline)
                            )
                        ),
                        "scope" arg (
                            c(
                                "prefix" (
                                  ipprefix
                                ),
                                "interface" (
                                  interface_name
                                )
                            )
                        ),
                        "scope-policy" (
                          policy_algebra
                        ),
                        "flow-map" arg (
                            c(
                                "policy" (
                                  policy_algebra
                                ),
                                "bandwidth" (
                                    c(
                                        "bandwidth-value" arg,
                                        "adaptive"
                                    )
                                ).as(:oneline),
                                "redundant-sources" (
                                  ipaddr
                                ),
                                "forwarding-cache" (
                                    c(
                                        "timeout" (
                                            c(
                                                c(
                                                  "timeout-value" arg,
                                                  "never" (
                                                      c(
                                                          "non-discard-entry-only"
                                                      )
                                                  )
                                                )
                                            )
                                        ).as(:oneline)
                                    )
                                )
                            )
                        ),
                        "ssm-groups" (
                          ipprefix
                        ),
                        "asm-override-ssm",
                        "rpf-check-policy" (
                          policy_algebra
                        ),
                        "pim-to-igmp-proxy" (
                            c(
                                "upstream-interface" (
                                  interface_name
                                )
                            )
                        ),
                        "pim-to-mld-proxy" (
                            c(
                                "upstream-interface" (
                                  interface_name
                                )
                            )
                        ),
                        "forwarding-cache" (
                            c(
                                "threshold" (
                                    c(
                                        "suppress" arg,
                                        "reuse" arg
                                    )
                                ),
                                "timeout" arg
                            )
                        ),
                        "interface" (
                          multicast_interface_options_type
                        ),
                        "ssm-map" arg (
                            c(
                                "policy" (
                                  policy_algebra
                                ),
                                "source" (
                                  ipaddr
                                )
                            )
                        ),
                        "backup-pe-group" arg (
                            c(
                                "backups" (
                                  ipaddr
                                ),
                                "local-address" (
                                  ipaddr
                                )
                            )
                        )
                    )
                )
            )
        ),
        "firewall" (
            c(
                "family" (
                    c(
                        "inet" (
                            c(
                                "dialer-filter" (
                                  inet_dialer_filter
                                ),
                                "prefix-action" (
                                  prefix_action
                                ),
                                "filter" (
                                  inet_filter
                                ),
                                "simple-filter" (
                                  inet_simple_filter
                                ),
                                "service-filter" (
                                  inet_service_filter
                                ),
                                "fast-update-filter" (
                                  inet_fuf
                                )
                            )
                        ),
                        "inet6" (
                            c(
                                "dialer-filter" (
                                  inet6_dialer_filter
                                ),
                                "filter" (
                                  inet6_filter
                                ),
                                "service-filter" (
                                  inet6_service_filter
                                ),
                                "fast-update-filter" (
                                  inet6_fuf
                                )
                            )
                        ),
                        "mpls" (
                            c(
                                "dialer-filter" (
                                  mpls_dialer_filter
                                ),
                                "filter" (
                                  mpls_filter
                                )
                            )
                        ),
                        "vpls" (
                            c(
                                "filter" (
                                  vpls_filter
                                )
                            )
                        ),
                        "bridge" (
                            c(
                                "filter" (
                                  bridge_filter
                                )
                            )
                        ),
                        "ccc" (
                            c(
                                "filter" (
                                  ccc_filter
                                )
                            )
                        ),
                        "any" (
                            c(
                                "filter" (
                                  any_filter
                                )
                            )
                        ),
                        "ethernet-switching"
                    )
                ),
                "policer" (
                  firewall_policer
                ),
                "hierarchical-policer" (
                  firewall_hierpolicer
                ),
                "interface-set" (
                  interface_set_type
                ),
                "load-balance-group" (
                  firewall_load_balance_group
                ),
                "atm-policer" (
                  atm_policer_type
                ),
                "three-color-policer" (
                  three_color_policer_type
                ),
                "filter" (
                  inet_filter
                )
            )
        ),
        "profile-variable-set" (
          juniper_dynamic_profile_varset_object
        ),
        "policy-options" (
            c(
                "prefix-list" arg (
                    c(
                        "prefix-list-item" (
                          prefix_list_items
                        ),
                        "apply-path" arg
                    )
                )
            )
        )
    )
  )
end

rule(:base_default_variable_object) do
  ("igmp-enable" | "igmp-access-group-name" | "igmp-access-source-group-name" | "igmp-version" | "igmp-immediate-leave" | "mld-access-group-name" | "mld-access-source-group-name" | "mld-immediate-leave" | "input-filter" | "output-filter" | "input-ipv6-filter" | "output-ipv6-filter" | "adf-rule-v4" | "adf-rule-v6" | "cos-scheduler-map" | "cos-shaping-rate" | "cos-guaranteed-rate" | "cos-delay-buffer-rate" | "cos-traffic-control-profile" | "cos-shaping-mode" | "cos-byte-adjust" | "cos-scheduler" | "cos-scheduler-pri" | "cos-scheduler-dropfile-low" | "cos-scheduler-dropfile-medium-low" | "cos-scheduler-dropfile-medium-high" | "cos-scheduler-dropfile-high" | "cos-scheduler-dropfile-any" | "cos-scheduler-excess-rate" | "cos-scheduler-excess-priority" | "interface-set-name" | "cos-adjust-minimum" | "cos-excess-rate-high" | "cos-excess-rate-low" | "cos-shaping-rate-burst" | "cos-guaranteed-rate-burst").as(:arg) (
    c(
        "default-value" arg
    )
  )
end

rule(:cfm_traceoptions) do
    c(
        "no-remote-trace",
        "file" (
            c(
                "filename" arg,
                "size" arg,
                "files" arg,
                "world-readable",
                "no-world-readable",
                "match" (
                  regular_expression
                )
            )
        ).as(:oneline),
        "flag" ("configuration" | "routing-socket" | "protocol" | "init" | "error" | "issu" | "all").as(:oneline)
    )
end

rule(:esp_trace_file_type) do
    c(
        "filename" arg,
        "replace",
        "size" arg,
        "files" arg,
        "no-stamp",
        "world-readable",
        "no-world-readable"
    ).as(:oneline)
end

rule(:juniper_dynamic_profile_varset_object) do
  arg.as(:arg) (
    c(
        "junos-mep-id" arg,
        "junos-md-level" arg,
        "junos-remote-mep-id" arg,
        "junos-md-name" arg,
        "junos-ma-name" arg,
        "junos-layer2-output-policer" arg
    )
  )
end

rule(:juniper_dynamic_variable_object) do
  arg.as(:arg) (
    c(
        "equals" arg,
        "default-value" arg,
        "mandatory",
        "uid-reference",
        "uid"
    )
  )
end

rule(:juniper_ethernet_options) do
    c(
        "traceoptions" (
            c(
                "file" (
                  esp_trace_file_type
                ),
                "flag" ("parse" | "regex-parse" | "config-internal" | "normal" | "general" | "state" | "task" | "timer" | "krt" | "vlan" | "forwarding-database" | "nexthop" | "interface" | "lib" | "stp" | "filter" | "access-security" | "rtg" | "ip-source-guard" | "analyzer" | "layer2-protocol-tunneling" | "unknown-unicast-forwarding" | "all") (
                    c(
                        "disable"
                    )
                ).as(:oneline)
            )
        ),
        "voip" (
            c(
                "interface" ("name" | "access-ports") (
                    c(
                        "vlan" arg,
                        "forwarding-class" arg
                    )
                )
            )
        ),
        "unknown-unicast-forwarding" (
            c(
                "vlan" arg (
                    c(
                        "interface" (
                          interface_name
                        )
                    )
                )
            )
        ),
        "dot1q-tunneling" (
            c(
                "ether-type" arg
            )
        ),
        "mac-notification" (
            c(
                "notification-interval" arg
            )
        ),
        "interfaces" (
            c(
                "esw-interface" (
                  esw_interface_type
                )
            )
        ),
        "mac-table-aging-time" (
          mac_aging_time_config
        ),
        "nonstop-bridging",
        "static" (
            c(
                "vlan" arg (
                    c(
                        "mac" arg (
                            c(
                                "next-hop" (
                                  interface_name
                                )
                            )
                        ).as(:oneline)
                    )
                )
            )
        ),
        "secure-access-port" (
            c(
                "interface" arg (
                    c(
                        "mac-limit" (
                            c(
                                "limit" arg,
                                "action" arg
                            )
                        ).as(:oneline),
                        "static-ip" (
                          juniper_ip_mac_static
                        ),
                        "allowed-mac" (
                          mac_addr
                        ),
                        "no-allowed-mac-log",
                        "dhcp-trusted",
                        "no-dhcp-trusted",
                        "fcoe-trusted",
                        "no-fcoe-trusted",
                        "persistent-learning"
                    )
                ),
                "vlan" ("all" | "vlan-name") (
                    c(
                        c(
                          "arp-inspection" (
                              c(
                                  "forwarding-class" arg
                              )
                          ).as(:oneline),
                          "no-arp-inspection"
                        ),
                        c(
                          "examine-dhcp" (
                              c(
                                  "forwarding-class" arg
                              )
                          ).as(:oneline),
                          "no-examine-dhcp"
                        ),
                        "examine-fip",
                        "mac-move-limit" (
                            c(
                                "limit" arg,
                                "action" arg
                            )
                        ).as(:oneline),
                        "ip-source-guard",
                        "no-ip-source-guard",
                        "dhcp-option82" (
                          dhcp_option82_type
                        )
                    )
                ),
                "dhcp-snooping-file" (
                    c(
                        "location" (
                          filename
                        ),
                        "write-interval" arg,
                        "timeout" arg
                    )
                )
            )
        ),
        "authentication-whitelist" arg (
            c(
                "vlan-assignment" arg,
                "interface" (
                  interface_name
                )
            )
        ),
        "analyzer" (
          analyzer_type
        ),
        "port-error-disable" (
            c(
                "disable-timeout" arg
            )
        ),
        "bpdu-block" (
            c(
                "interface" ("all" | "name"),
                "disable-timeout" arg
            )
        ),
        "redundant-trunk-group" (
            c(
                "group" arg (
                    c(
                        "preempt-cutover-timer" arg,
                        "description" arg,
                        "interface" arg (
                            c(
                                "primary"
                            )
                        )
                    )
                )
            )
        ),
        "storm-control" (
            c(
                "action-shutdown",
                "interface" ("all" | "name") (
                    c(
                        "bandwidth" arg,
                        "no-broadcast",
                        "no-unknown-unicast",
                        "level" arg,
                        c(
                          "multicast",
                          "no-multicast",
                          "no-registered-multicast",
                          "no-unregistered-multicast"
                        )
                    )
                )
            )
        )
    )
end

rule(:analyzer_type) do
  arg.as(:arg) (
    c(
        "ratio" arg,
        "loss-priority" arg,
        "input" (
          analyzer_input_type
        ),
        "output" (
          analyzer_output_type
        )
    )
  )
end

rule(:analyzer_input_type) do
    c(
        "ingress" (
          analyzer_ingress_type
        ),
        "egress" (
          analyzer_egress_type
        )
    )
end

rule(:analyzer_egress_type) do
    c(
        "interface" (
          analyzer_egress_interface_type
        ),
        "vlan" (
          analyzer_vlan_type
        )
    )
end

rule(:analyzer_egress_interface_type) do
  ("name" | "all").as(:arg)
end

rule(:analyzer_ingress_type) do
    c(
        "interface" (
          analyzer_ingress_interface_type
        ),
        "vlan" (
          analyzer_vlan_type
        )
    )
end

rule(:analyzer_ingress_interface_type) do
  ("name" | "all").as(:arg)
end

rule(:analyzer_output_type) do
    c(
        "interface" arg,
        "vlan" arg (
            c(
                "no-tag"
            )
        )
    )
end

rule(:analyzer_vlan_type) do
  arg.as(:arg)
end

rule(:dhcp_option82_type) do
    c(
        "disable",
        "circuit-id" (
            c(
                "prefix" arg,
                "use-interface-description",
                "use-vlan-id"
            )
        ),
        "remote-id" (
            c(
                "prefix" arg,
                "use-interface-description",
                "use-string" arg
            )
        ),
        "vendor-id" (
            c(
                "use-string" arg
            )
        )
    )
end

rule(:esw_interface_type) do
  arg.as(:arg) (
    c(
        "no-mac-learning"
    )
  )
end

rule(:juniper_forwarding_options) do
    c(
        c(
          "sampling" (
            juniper_sampling_options
          ),
          "packet-capture" (
            juniper_packet_capture_options
          )
        ),
        "monitoring" (
          juniper_monitoring_options
        ),
        "accounting" (
          juniper_packet_accounting_options
        ),
        "analyzer" (
          smpl_analyzer_type
        ),
        "port-mirroring" (
          juniper_port_mirror_options
        ),
        "load-balance" (
            c(
                "indexed-load-balance",
                "per-flow" (
                    c(
                        "hash-seed"
                    )
                ),
                "per-prefix" (
                    c(
                        "hash-seed" arg
                    )
                )
            )
        ),
        "hash-key" (
            c(
                "family" (
                    c(
                        "inet" (
                            c(
                                "layer-3" (
                                    c(
                                        "destination-address"
                                    )
                                ),
                                "layer-4",
                                "session-id",
                                "symmetric-hash"
                            )
                        ),
                        "mpls" (
                            c(
                                "label-1",
                                "label-2",
                                "label-3",
                                "no-labels",
                                "no-label-1-exp",
                                "payload" (
                                    c(
                                        "ether-pseudowire",
                                        "ip" (
                                            c(
                                                c(
                                                  "layer-3-only",
                                                  "port-data" (
                                                      c(
                                                          "source-msb",
                                                          "source-lsb",
                                                          "destination-msb",
                                                          "destination-lsb"
                                                      )
                                                  )
                                                )
                                            )
                                        )
                                    )
                                )
                            )
                        ),
                        "multiservice" (
                            c(
                                "source-mac",
                                "destination-mac",
                                "label-1",
                                "label-2",
                                "payload",
                                "symmetric-hash"
                            )
                        )
                    )
                )
            )
        ),
        "enhanced-hash-key",
        "rpf-loose-mode-discard",
        "helpers" (
            c(
                "traceoptions" (
                    c(
                        "no-remote-trace",
                        "file" (
                            c(
                                "filename" arg,
                                "size" arg,
                                "files" arg,
                                "world-readable",
                                "no-world-readable",
                                "match" (
                                  regular_expression
                                )
                            )
                        ).as(:oneline),
                        "level" arg,
                        "flag" ("trace" | "address" | "main" | "config" | "ifdb" | "io" | "rtsock" | "ui" | "util" | "domain" | "tftp" | "bootp" | "port" | "if-rtsdb" | "all").as(:oneline)
                    )
                ),
                "rtsdb-client-traceoptions" (
                    c(
                        "if-rtsdb" (
                            c(
                                "flag" ("init" | "routing-socket" | "map" | "all") (
                                    c(
                                        "disable"
                                    )
                                ).as(:oneline)
                            )
                        )
                    )
                ),
                "domain" (
                    c(
                        "description" arg,
                        "server" (
                            c(
                                "address" (
                                  ipv4addr
                                ),
                                c(
                                  "logical-system" (
                                      c(
                                          "logical-system-name" arg,
                                          "routing-instance" arg
                                      )
                                  ).as(:oneline),
                                  "routing-instance" arg
                                )
                            )
                        ).as(:oneline),
                        "interface" arg (
                            c(
                                "no-listen",
                                "broadcast",
                                "description" arg,
                                "server" (
                                    c(
                                        "address" (
                                          ipv4addr
                                        ),
                                        c(
                                          "logical-system" (
                                              c(
                                                  "logical-system-name" arg,
                                                  "routing-instance" arg
                                              )
                                          ).as(:oneline),
                                          "routing-instance" arg
                                        )
                                    )
                                ).as(:oneline)
                            )
                        )
                    )
                ),
                "tftp" (
                    c(
                        "description" arg,
                        "server" (
                            c(
                                "address" (
                                  ipv4addr
                                ),
                                c(
                                  "logical-system" (
                                      c(
                                          "logical-system-name" arg,
                                          "routing-instance" arg
                                      )
                                  ).as(:oneline),
                                  "routing-instance" arg
                                )
                            )
                        ).as(:oneline),
                        "interface" arg (
                            c(
                                "no-listen",
                                "broadcast",
                                "description" arg,
                                "server" (
                                    c(
                                        "address" (
                                          ipv4addr
                                        ),
                                        c(
                                          "logical-system" (
                                              c(
                                                  "logical-system-name" arg,
                                                  "routing-instance" arg
                                              )
                                          ).as(:oneline),
                                          "routing-instance" arg
                                        )
                                    )
                                ).as(:oneline)
                            )
                        )
                    )
                ),
                "bootp" (
                    c(
                        "relay-agent-option",
                        "dhcp-option82" (
                          dhcp_option82_type
                        ),
                        "description" arg,
                        "server" arg (
                            c(
                                "logical-system" arg (
                                    c(
                                        "routing-instance" arg
                                    )
                                ).as(:oneline),
                                "routing-instance" arg
                            )
                        ),
                        "maximum-hop-count" arg,
                        "minimum-wait-time" arg,
                        "client-response-ttl" arg,
                        "source-address-giaddr",
                        "vpn",
                        "interface" arg (
                            c(
                                "no-listen",
                                "broadcast",
                                "description" arg,
                                "server" arg (
                                    c(
                                        "logical-system" arg (
                                            c(
                                                "routing-instance" arg
                                            )
                                        ).as(:oneline),
                                        "routing-instance" arg
                                    )
                                ),
                                "maximum-hop-count" arg,
                                "minimum-wait-time" arg,
                                "client-response-ttl" arg,
                                "source-address-giaddr",
                                "vpn",
                                "dhcp-option82" (
                                  dhcp_option82_type
                                )
                            )
                        )
                    )
                ),
                "port" arg (
                    c(
                        "description" arg,
                        "server" (
                            c(
                                "address" (
                                  ipv4addr
                                ),
                                c(
                                  "logical-system" (
                                      c(
                                          "logical-system-name" arg,
                                          "routing-instance" arg
                                      )
                                  ).as(:oneline),
                                  "routing-instance" arg
                                )
                            )
                        ).as(:oneline),
                        "interface" arg (
                            c(
                                "no-listen",
                                "broadcast",
                                "description" arg,
                                "server" (
                                    c(
                                        "address" (
                                          ipv4addr
                                        ),
                                        c(
                                          "logical-system" (
                                              c(
                                                  "logical-system-name" arg,
                                                  "routing-instance" arg
                                              )
                                          ).as(:oneline),
                                          "routing-instance" arg
                                        )
                                    )
                                ).as(:oneline)
                            )
                        )
                    )
                )
            )
        ),
        "family" (
            c(
                "inet" (
                    c(
                        "filter" (
                            c(
                                "input" arg,
                                "output" arg
                            )
                        )
                    )
                ),
                "inet6" (
                    c(
                        "filter" (
                            c(
                                "input" arg,
                                "output" arg
                            )
                        ),
                        "route-accounting"
                    )
                ),
                "mpls" (
                    c(
                        "filter" (
                            c(
                                "input" arg,
                                "output" arg
                            )
                        )
                    )
                ),
                "vpls" (
                    c(
                        "filter" (
                            c(
                                "input" arg
                            )
                        ),
                        "flood" (
                            c(
                                "input" arg
                            )
                        )
                    )
                )
            )
        ),
        "next-hop-group" (
          juniper_next_hop_group_options
        ),
        "dhcp-relay" (
          jdhcp_relay_type
        ),
        "fast-reroute-priority" arg,
        "cut-through",
        "ipmc-miss-do-l2mc",
        "storm-control-profiles" arg (
          c(
            "action-shutdown",
            "all" (
              c(
                "bandwidth-level" arg,
                "bandwidth-percentage" arg,
                "no-broadcast",
                "no-multicast",
                "no-registered-multicast",
                "no-unknown-unicast",
                "no-unregistered-multicast"
              )
            )
          )
        )
    )
end

rule(:juniper_ip_mac_static) do
  arg.as(:arg) (
    c(
        "vlan" arg,
        "mac" (
          mac_addr
        )
    )
  ).as(:oneline)
end

rule(:juniper_logical_system) do
  arg.as(:arg) (
    c(
        "interfaces" (
            c(
                "interface" (
                  lr_interfaces_type
                )
            )
        ),
        "protocols" (
          juniper_protocols
        ),
        "policy-options" (
          juniper_policy_options
        ),
        "routing-instances" (
            c(
                "instance" (
                  juniper_routing_instance
                )
            )
        ),
        "routing-options" (
          juniper_routing_options
        ),
        "forwarding-options" (
            c(
                "dhcp-relay" (
                  jdhcp_relay_type
                ),
                "sampling" (
                    c(
                        "family" (
                            c(
                                "inet" (
                                    c(
                                        "output" (
                                            c(
                                                "flow-server" (
                                                  cflowd_sampling_inet_lr_type
                                                )
                                            )
                                        )
                                    )
                                ),
                                "mpls" (
                                    c(
                                        "output" (
                                            c(
                                                "flow-server" (
                                                  cflowd_sampling_mpls_lr_type
                                                )
                                            )
                                        )
                                    )
                                )
                            )
                        ),
                        "instance"
                    )
                )
            )
        ),
        "system" (
            c(
                "services" (
                    c(
                        "dhcp-local-server" (
                          jdhcp_local_server_type
                        ),
                        "static-subscribers" (
                          jsscd_static_subscribers_type
                        )
                    )
                )
            )
        ),
        "access" (
            c(
                "address-assignment" (
                  address_assignment_type
                ),
                "address-protection",
                "firewall-authentication" (
                    c(
                        "pass-through" (
                            c(
                                "default-profile" arg,
                                "ftp" (
                                  banner_object
                                ),
                                "telnet" (
                                  banner_object
                                ),
                                "http" (
                                  banner_object
                                )
                            )
                        ),
                        "web-authentication" (
                            c(
                                "default-profile" arg,
                                "banner" (
                                    c(
                                        "success" arg
                                    )
                                )
                            )
                        ),
                        "traceoptions" (
                            c(
                                "no-remote-trace",
                                "file" (
                                    c(
                                        "filename" arg,
                                        "size" arg,
                                        "files" arg,
                                        "world-readable",
                                        "no-world-readable",
                                        "match" (
                                          regular_expression
                                        )
                                    )
                                ).as(:oneline),
                                "flag" ("configuration" | "setup" | "authentication" | "all").as(:oneline)
                            )
                        )
                    )
                )
            )
        ),
        "access-profile" (
            c(
                "access-profile-name" arg
            )
        ).as(:oneline),
        "firewall" (
            c(
                "family" (
                    c(
                        "inet" (
                            c(
                                "dialer-filter" (
                                  inet_dialer_filter
                                ),
                                "prefix-action" (
                                  prefix_action
                                ),
                                "filter" (
                                  inet_filter
                                ),
                                "simple-filter" (
                                  inet_simple_filter
                                ),
                                "service-filter" (
                                  inet_service_filter
                                ),
                                "fast-update-filter" (
                                  inet_fuf
                                )
                            )
                        ),
                        "inet6" (
                            c(
                                "dialer-filter" (
                                  inet6_dialer_filter
                                ),
                                "filter" (
                                  inet6_filter
                                ),
                                "service-filter" (
                                  inet6_service_filter
                                ),
                                "fast-update-filter" (
                                  inet6_fuf
                                )
                            )
                        ),
                        "mpls" (
                            c(
                                "dialer-filter" (
                                  mpls_dialer_filter
                                ),
                                "filter" (
                                  mpls_filter
                                )
                            )
                        ),
                        "vpls" (
                            c(
                                "filter" (
                                  vpls_filter
                                )
                            )
                        ),
                        "bridge" (
                            c(
                                "filter" (
                                  bridge_filter
                                )
                            )
                        ),
                        "ccc" (
                            c(
                                "filter" (
                                  ccc_filter
                                )
                            )
                        ),
                        "any" (
                            c(
                                "filter" (
                                  any_filter
                                )
                            )
                        ),
                        "ethernet-switching"
                    )
                ),
                "policer" (
                  firewall_policer
                ),
                "hierarchical-policer" (
                  firewall_hierpolicer
                ),
                "interface-set" (
                  interface_set_type
                ),
                "load-balance-group" (
                  firewall_load_balance_group
                ),
                "atm-policer" (
                  atm_policer_type
                ),
                "three-color-policer" (
                  three_color_policer_type
                ),
                "filter" (
                  inet_filter
                )
            )
        ),
        "services" (
            c(
                "mobile-ip" (
                  juniper_protocols_mobile_ipv4
                ),
                "flow-monitoring" (
                    c(
                        "version9" (
                            c(
                                "template" (
                                  version9_template
                                )
                            )
                        )
                    )
                )
            )
        ),
        "bridge-domains" (
            c(
                "domain" (
                  juniper_bridge_domains
                )
            )
        ),
        "switch-options" (
          juniper_def_rtb_switch_options
        ),
        "security" (
            c(
                "alarms" (
                    c(
                        "audible" (
                            c(
                                "continuous"
                            )
                        ),
                        "potential-violation" (
                            c(
                                "authentication" arg,
                                "cryptographic-self-test",
                                "decryption-failures" (
                                    c(
                                        "threshold" arg
                                    )
                                ),
                                "encryption-failures" (
                                    c(
                                        "threshold" arg
                                    )
                                ),
                                "ike-phase1-failures" (
                                    c(
                                        "threshold" arg
                                    )
                                ),
                                "ike-phase2-failures" (
                                    c(
                                        "threshold" arg
                                    )
                                ),
                                "key-generation-self-test",
                                "non-cryptographic-self-test",
                                "policy" (
                                    c(
                                        "source-ip" (
                                            c(
                                                "threshold" arg,
                                                "duration" arg,
                                                "size" arg
                                            )
                                        ),
                                        "destination-ip" (
                                            c(
                                                "threshold" arg,
                                                "duration" arg,
                                                "size" arg
                                            )
                                        ),
                                        "application" (
                                            c(
                                                "threshold" arg,
                                                "duration" arg,
                                                "size" arg
                                            )
                                        ),
                                        "policy-match" (
                                            c(
                                                "threshold" arg,
                                                "duration" arg,
                                                "size" arg
                                            )
                                        )
                                    )
                                ),
                                "replay-attacks" (
                                    c(
                                        "threshold" arg
                                    )
                                ),
                                "security-log-percent-full" arg,
                                "idp"
                            )
                        )
                    )
                ),
                "log" (
                    c(
                        "cache" (
                            c(
                                "exclude" arg (
                                    c(
                                        "destination-address" (
                                          ipaddr
                                        ),
                                        "destination-port" arg,
                                        "event-id" arg,
                                        "failure",
                                        "interface-name" arg,
                                        "policy-name" arg,
                                        "process" arg,
                                        "protocol" arg,
                                        "source-address" (
                                          ipaddr
                                        ),
                                        "source-port" arg,
                                        "success",
                                        "username" arg
                                    )
                                ),
                                "limit" arg
                            )
                        ),
                        "disable",
                        "utc-timestamp",
                        "mode" arg,
                        "event-rate" arg,
                        "format" arg,
                        "rate-cap" arg,
                        c(
                          "source-address" (
                            ipaddr
                          ),
                          "source-interface" (
                            interface_name
                          )
                        ),
                        "transport" (
                            c(
                                "tcp-connections" arg,
                                "protocol" arg,
                                "tls-profile" arg
                            )
                        ),
                        "stream" arg (
                            c(
                                "severity" arg,
                                "format" arg,
                                "category" arg,
                                "host" (
                                  host_object
                                )
                            )
                        ),
                        "file" (
                            c(
                                "filename" arg,
                                "size" arg,
                                "path" arg,
                                "files" arg
                            )
                        ),
                        "traceoptions" (
                            c(
                                "no-remote-trace",
                                "file" (
                                    c(
                                        "filename" arg,
                                        "size" arg,
                                        "files" arg,
                                        "world-readable",
                                        "no-world-readable",
                                        "match" (
                                          regular_expression
                                        )
                                    )
                                ).as(:oneline),
                                "flag" ("source" | "configuration" | "all" | "report" | "hpl").as(:oneline)
                            )
                        )
                    )
                ),
                "certificates" (
                    c(
                        "local" (
                          certificate_object
                        ),
                        "path-length" arg,
                        "maximum-certificates" arg,
                        "cache-size" arg,
                        "cache-timeout-negative" arg,
                        "enrollment-retry" arg,
                        "certification-authority" arg (
                            c(
                                "ca-name" arg,
                                "file" arg,
                                "crl" arg,
                                "enrollment-url" arg,
                                "ldap-url" arg,
                                "encoding" arg
                            )
                        )
                    )
                ),
                "ssh-known-hosts" (
                    c(
                        "host" arg (
                            c(
                                "rsa1-key" arg,
                                "rsa-key" arg,
                                "dsa-key" arg,
                                "ecdsa-sha2-nistp256-key" arg,
                                "ecdsa-sha2-nistp384-key" arg,
                                "ecdsa-sha2-nistp521-key" arg,
                                "ed25519-key" arg
                            )
                        )
                    )
                ),
                "key-protection",
                "pki" (
                  security_pki
                ),
                "idp" (
                    c(
                        "idp-policy" (
                          idp_policy_type
                        ),
                        "active-policy" arg,
                        "custom-attack" (
                          custom_attack_type
                        ),
                        "custom-attack-group" (
                          custom_attack_group_type
                        ),
                        "dynamic-attack-group" (
                          dynamic_attack_group_type
                        ),
                        "traceoptions" (
                          idpd_traceoptions_type
                        ),
                        "security-package" (
                            c(
                                "url" arg,
                                "source-address" (
                                  ipv4addr
                                ),
                                "install" (
                                    c(
                                        "ignore-version-check"
                                    )
                                ),
                                "automatic" (
                                    c(
                                        "start-time" (
                                          time
                                        ),
                                        "interval" arg,
                                        c(
                                          "enable"
                                        )
                                    )
                                )
                            )
                        ),
                        "sensor-configuration" (
                            c(
                                "log" (
                                    c(
                                        "cache-size" arg,
                                        "suppression" (
                                            c(
                                                c(
                                                  "disable"
                                                ),
                                                "include-destination-address",
                                                "no-include-destination-address",
                                                "start-log" arg,
                                                "max-logs-operate" arg,
                                                "max-time-report" arg
                                            )
                                        )
                                    )
                                ),
                                "packet-log" (
                                    c(
                                        "total-memory" arg,
                                        "max-sessions" arg,
                                        "threshold-logging-interval" arg,
                                        "source-address" (
                                          ipv4addr
                                        ),
                                        "host" (
                                            c(
                                                "ipaddr" (
                                                  ipv4addr
                                                ),
                                                "port" arg
                                            )
                                        )
                                    )
                                ),
                                "application-identification" (
                                    c(
                                        c(
                                          "disable"
                                        ),
                                        "application-system-cache",
                                        "no-application-system-cache",
                                        "max-tcp-session-packet-memory" arg,
                                        "max-udp-session-packet-memory" arg,
                                        "max-sessions" arg,
                                        "max-packet-memory-ratio" arg,
                                        "max-reass-packet-memory-ratio" arg,
                                        "application-system-cache-timeout" arg
                                    )
                                ),
                                "flow" (
                                    c(
                                        "log-errors",
                                        "no-log-errors",
                                        "reset-on-policy",
                                        "no-reset-on-policy",
                                        "allow-icmp-without-flow",
                                        "no-allow-icmp-without-flow",
                                        "hash-table-size" arg,
                                        "reject-timeout" arg,
                                        "max-timers-poll-ticks" arg,
                                        "fifo-max-size" arg,
                                        "udp-anticipated-timeout" arg,
                                        "allow-nonsyn-connection",
                                        "drop-on-limit",
                                        "drop-on-failover",
                                        "drop-if-no-policy-loaded",
                                        "max-sessions-offset" arg,
                                        "min-objcache-limit-lt" arg,
                                        "min-objcache-limit-ut" arg
                                    )
                                ),
                                "re-assembler" (
                                    c(
                                        "ignore-memory-overflow",
                                        "no-ignore-memory-overflow",
                                        "ignore-reassembly-memory-overflow",
                                        "no-ignore-reassembly-memory-overflow",
                                        "ignore-reassembly-overflow",
                                        "max-flow-mem" arg,
                                        "max-packet-mem-ratio" arg,
                                        "action-on-reassembly-failure" arg,
                                        "tcp-error-logging",
                                        "no-tcp-error-logging",
                                        "max-synacks-queued" arg
                                    )
                                ),
                                "ips" (
                                    c(
                                        "process-override",
                                        "no-process-override",
                                        "detect-shellcode",
                                        "no-detect-shellcode",
                                        "process-ignore-s2c",
                                        "no-process-ignore-s2c",
                                        "ignore-regular-expression",
                                        "no-ignore-regular-expression",
                                        "process-port" arg,
                                        "fifo-max-size" arg,
                                        "log-supercede-min" arg,
                                        "content-decompression-max-memory-kb" arg,
                                        "content-decompression-max-ratio" arg,
                                        "session-pkt-depth" arg
                                    )
                                ),
                                "global" (
                                    c(
                                        "enable-packet-pool",
                                        "no-enable-packet-pool",
                                        "enable-all-qmodules",
                                        "no-enable-all-qmodules",
                                        "policy-lookup-cache",
                                        "no-policy-lookup-cache",
                                        "memory-limit-percent" arg,
                                        "gtp" (
                                            c(
                                                "decapsulation",
                                                "no-decapsulation"
                                            )
                                        )
                                    )
                                ),
                                "detector" (
                                    c(
                                        "protocol-name" (
                                          proto_object
                                        )
                                    )
                                ),
                                "ssl-inspection",
                                "disable-low-memory-handling",
                                "high-availability" (
                                    c(
                                        "no-policy-cold-synchronization"
                                    )
                                ),
                                "security-configuration" (
                                    c(
                                        "protection-mode" arg
                                    )
                                )
                            )
                        ),
                        "processes"
                    )
                ),
                "ike" (
                  security_ike
                ),
                "ipsec" (
                  security_ipsec_vpn
                ),
                "group-vpn" (
                  security_group_vpn
                ),
                "address-book" (
                  named_address_book_type
                ),
                "alg" (
                    c(
                        "traceoptions" (
                            c(
                                "no-remote-trace",
                                "file" (
                                    c(
                                        "filename" arg,
                                        "size" arg,
                                        "files" arg,
                                        "world-readable",
                                        "no-world-readable",
                                        "match" (
                                          regular_expression
                                        )
                                    )
                                ).as(:oneline),
                                "level" arg
                            )
                        ),
                        "alg-manager" (
                            c(
                                "traceoptions" (
                                    c(
                                        "flag" ("all") (
                                            c(
                                                c(
                                                  "extensive"
                                                )
                                            )
                                        ).as(:oneline)
                                    )
                                )
                            )
                        ).as(:oneline),
                        "alg-support-lib" (
                            c(
                                "traceoptions" (
                                    c(
                                        "flag" ("all") (
                                            c(
                                                c(
                                                  "extensive"
                                                )
                                            )
                                        ).as(:oneline)
                                    )
                                )
                            )
                        ).as(:oneline),
                        "dns" (
                            c(
                                "disable",
                                "maximum-message-length" arg,
                                "doctoring" (
                                    c(
                                        c(
                                          "none",
                                          "sanity-check"
                                        )
                                    )
                                ),
                                "traceoptions" (
                                    c(
                                        "flag" ("all") (
                                            c(
                                                c(
                                                  "extensive"
                                                )
                                            )
                                        ).as(:oneline)
                                    )
                                )
                            )
                        ),
                        "ftp" (
                            c(
                                "disable",
                                "ftps-extension",
                                "line-break-extension",
                                "allow-mismatch-ip-address",
                                "traceoptions" (
                                    c(
                                        "flag" ("all") (
                                            c(
                                                c(
                                                  "extensive"
                                                )
                                            )
                                        ).as(:oneline)
                                    )
                                )
                            )
                        ).as(:oneline),
                        "h323" (
                            c(
                                "disable",
                                "endpoint-registration-timeout" arg,
                                "media-source-port-any",
                                "application-screen" (
                                    c(
                                        "unknown-message" (
                                            c(
                                                "permit-nat-applied",
                                                "permit-routed"
                                            )
                                        ),
                                        "message-flood" (
                                            c(
                                                "gatekeeper" (
                                                    c(
                                                        "threshold" arg
                                                    )
                                                ).as(:oneline)
                                            )
                                        )
                                    )
                                ),
                                "dscp-rewrite" (
                                    c(
                                        "code-point" arg
                                    )
                                ),
                                "traceoptions" (
                                    c(
                                        "flag" ("q931" | "h245" | "ras" | "h225-asn1" | "h245-asn1" | "ras-asn1" | "chassis-cluster" | "all") (
                                            c(
                                                c(
                                                  "terse",
                                                  "detail",
                                                  "extensive"
                                                )
                                            )
                                        ).as(:oneline)
                                    )
                                )
                            )
                        ),
                        "mgcp" (
                            c(
                                "disable",
                                "inactive-media-timeout" arg,
                                "transaction-timeout" arg,
                                "maximum-call-duration" arg,
                                "application-screen" (
                                    c(
                                        "unknown-message" (
                                            c(
                                                "permit-nat-applied",
                                                "permit-routed"
                                            )
                                        ),
                                        "message-flood" (
                                            c(
                                                "threshold" arg
                                            )
                                        ).as(:oneline),
                                        "connection-flood" (
                                            c(
                                                "threshold" arg
                                            )
                                        ).as(:oneline)
                                    )
                                ),
                                "dscp-rewrite" (
                                    c(
                                        "code-point" arg
                                    )
                                ),
                                "traceoptions" (
                                    c(
                                        "flag" ("call" | "decode" | "error" | "chassis-cluster" | "nat" | "packet" | "rm" | "all") (
                                            c(
                                                c(
                                                  "extensive"
                                                )
                                            )
                                        ).as(:oneline)
                                    )
                                )
                            )
                        ),
                        "msrpc" (
                            c(
                                "disable",
                                "traceoptions" (
                                    c(
                                        "flag" ("all") (
                                            c(
                                                c(
                                                  "extensive"
                                                )
                                            )
                                        ).as(:oneline)
                                    )
                                )
                            )
                        ).as(:oneline),
                        "sunrpc" (
                            c(
                                "disable",
                                "traceoptions" (
                                    c(
                                        "flag" ("all") (
                                            c(
                                                c(
                                                  "extensive"
                                                )
                                            )
                                        ).as(:oneline)
                                    )
                                )
                            )
                        ).as(:oneline),
                        "rsh" (
                            c(
                                "disable",
                                "traceoptions" (
                                    c(
                                        "flag" ("all") (
                                            c(
                                                c(
                                                  "extensive"
                                                )
                                            )
                                        ).as(:oneline)
                                    )
                                )
                            )
                        ).as(:oneline),
                        "rtsp" (
                            c(
                                "disable",
                                "traceoptions" (
                                    c(
                                        "flag" ("all") (
                                            c(
                                                c(
                                                  "extensive"
                                                )
                                            )
                                        ).as(:oneline)
                                    )
                                )
                            )
                        ).as(:oneline),
                        "sccp" (
                            c(
                                "disable",
                                "inactive-media-timeout" arg,
                                "application-screen" (
                                    c(
                                        "unknown-message" (
                                            c(
                                                "permit-nat-applied",
                                                "permit-routed"
                                            )
                                        ),
                                        "call-flood" (
                                            c(
                                                "threshold" arg
                                            )
                                        ).as(:oneline)
                                    )
                                ),
                                "dscp-rewrite" (
                                    c(
                                        "code-point" arg
                                    )
                                ),
                                "traceoptions" (
                                    c(
                                        "flag" ("call" | "cli" | "decode" | "error" | "chassis-cluster" | "init" | "nat" | "rm" | "all") (
                                            c(
                                                c(
                                                  "extensive"
                                                )
                                            )
                                        ).as(:oneline)
                                    )
                                )
                            )
                        ),
                        "sip" (
                            c(
                                "disable",
                                "inactive-media-timeout" arg,
                                "maximum-call-duration" arg,
                                "t1-interval" arg,
                                "t4-interval" arg,
                                "c-timeout" arg,
                                "retain-hold-resource",
                                "application-screen" (
                                    c(
                                        "unknown-message" (
                                            c(
                                                "permit-nat-applied",
                                                "permit-routed"
                                            )
                                        ),
                                        "protect" (
                                            c(
                                                "deny" (
                                                    c(
                                                        c(
                                                          "destination-ip" arg,
                                                          "all"
                                                        ),
                                                        "timeout" arg
                                                    )
                                                )
                                            )
                                        )
                                    )
                                ),
                                "dscp-rewrite" (
                                    c(
                                        "code-point" arg
                                    )
                                ),
                                "traceoptions" (
                                    c(
                                        "flag" ("call" | "chassis-cluster" | "nat" | "parser" | "rm" | "all") (
                                            c(
                                                c(
                                                  "terse",
                                                  "detail",
                                                  "extensive"
                                                )
                                            )
                                        ).as(:oneline)
                                    )
                                )
                            )
                        ),
                        "sql" (
                            c(
                                "disable",
                                "traceoptions" (
                                    c(
                                        "flag" ("all") (
                                            c(
                                                c(
                                                  "extensive"
                                                )
                                            )
                                        ).as(:oneline)
                                    )
                                )
                            )
                        ).as(:oneline),
                        "talk" (
                            c(
                                "disable",
                                "traceoptions" (
                                    c(
                                        "flag" ("all") (
                                            c(
                                                c(
                                                  "extensive"
                                                )
                                            )
                                        ).as(:oneline)
                                    )
                                )
                            )
                        ).as(:oneline),
                        "tftp" (
                            c(
                                "disable",
                                "traceoptions" (
                                    c(
                                        "flag" ("all") (
                                            c(
                                                c(
                                                  "extensive"
                                                )
                                            )
                                        ).as(:oneline)
                                    )
                                )
                            )
                        ).as(:oneline),
                        "pptp" (
                            c(
                                "disable",
                                "traceoptions" (
                                    c(
                                        "flag" ("all") (
                                            c(
                                                c(
                                                  "extensive"
                                                )
                                            )
                                        ).as(:oneline)
                                    )
                                )
                            )
                        ).as(:oneline),
                        "ike-esp-nat" (
                            c(
                                "enable",
                                "esp-gate-timeout" arg,
                                "esp-session-timeout" arg,
                                "state-timeout" arg,
                                "traceoptions" (
                                    c(
                                        "flag" ("all") (
                                            c(
                                                c(
                                                  "extensive"
                                                )
                                            )
                                        ).as(:oneline)
                                    )
                                )
                            )
                        )
                    )
                ),
                "application-firewall",
                "application-tracking",
                "utm" (
                    c(
                        "traceoptions" (
                          utm_traceoptions
                        ),
                        "application-proxy" (
                            c(
                                "traceoptions" (
                                  utm_apppxy_traceoptions
                                )
                            )
                        ),
                        "ipc" (
                            c(
                                "traceoptions" (
                                  utm_ipc_traceoptions
                                )
                            )
                        ),
                        "custom-objects" (
                            c(
                                "mime-pattern" (
                                  mime_list_type
                                ),
                                "filename-extension" (
                                  extension_list_type
                                ),
                                "url-pattern" (
                                  url_list_type
                                ),
                                "custom-url-category" (
                                  category_list_type
                                ),
                                "protocol-command" (
                                  command_list_type
                                )
                            )
                        ),
                        "feature-profile" (
                            c(
                                "anti-virus" (
                                  anti_virus_feature
                                ),
                                "web-filtering" (
                                  webfilter_feature
                                ),
                                "anti-spam" (
                                  anti_spam_feature
                                ),
                                "content-filtering" (
                                  content_filtering_feature
                                )
                            )
                        ),
                        "utm-policy" (
                          profile_setting
                        )
                    )
                ),
                "dynamic-vpn",
                "softwires" (
                    c(
                        "softwire-name" (
                          softwire_option_type
                        ),
                        "traceoptions" (
                            c(
                                "no-remote-trace",
                                "file" (
                                    c(
                                        "filename" arg,
                                        "size" arg,
                                        "files" arg,
                                        "world-readable",
                                        "no-world-readable",
                                        "match" (
                                          regular_expression
                                        )
                                    )
                                ).as(:oneline),
                                "flag" ("configuration" | "flow" | "all").as(:oneline)
                            )
                        )
                    )
                ),
                "forwarding-options" (
                    c(
                        "family" (
                            c(
                                "inet6" (
                                    c(
                                        "mode" arg
                                    )
                                ),
                                "mpls" (
                                    c(
                                        "mode" arg
                                    )
                                ),
                                "iso" (
                                    c(
                                        "mode" arg
                                    )
                                )
                            )
                        ),
                        "mirror-filter" (
                          mirror_filter_type
                        )
                    )
                ),
                "advanced-services",
                "flow" (
                    c(
                        "enhanced-routing-mode",
                        "traceoptions" (
                            c(
                                "no-remote-trace",
                                "file" (
                                    c(
                                        "filename" arg,
                                        "size" arg,
                                        "files" arg,
                                        "world-readable",
                                        "no-world-readable",
                                        "match" (
                                          regular_expression
                                        )
                                    )
                                ).as(:oneline),
                                "flag" ("all" | "basic-datapath" | "high-availability" | "host-traffic" | "fragmentation" | "multicast" | "route" | "session" | "session-scan" | "tcp-basic" | "tunnel").as(:oneline),
                                "rate-limit" arg,
                                "packet-filter" (
                                  flow_filter_type
                                ),
                                "trace-level" (
                                    c(
                                        c(
                                          "error",
                                          "brief",
                                          "detail"
                                        )
                                    )
                                )
                            )
                        ),
                        "pending-sess-queue-length" arg,
                        "allow-dns-reply",
                        "route-change-timeout" arg,
                        "syn-flood-protection-mode" arg,
                        "sync-icmp-session",
                        "ipsec-performance-acceleration",
                        "aging" (
                            c(
                                "early-ageout" arg,
                                "low-watermark" arg,
                                "high-watermark" arg
                            )
                        ),
                        "bridge" (
                            c(
                                "block-non-ip-all",
                                "bypass-non-ip-unicast",
                                "no-packet-flooding" (
                                    c(
                                        "no-trace-route"
                                    )
                                ),
                                "bpdu-vlan-flooding"
                            )
                        ),
                        "tcp-mss" (
                            c(
                                "all-tcp" (
                                    c(
                                        "mss" arg
                                    )
                                ),
                                "ipsec-vpn" (
                                    c(
                                        "mss" arg
                                    )
                                ),
                                "gre-in" (
                                    c(
                                        "mss" arg
                                    )
                                ),
                                "gre-out" (
                                    c(
                                        "mss" arg
                                    )
                                )
                            )
                        ),
                        "tcp-session" (
                            c(
                                "rst-invalidate-session",
                                "fin-invalidate-session",
                                "rst-sequence-check",
                                "no-syn-check",
                                "strict-syn-check",
                                "no-syn-check-in-tunnel",
                                "no-sequence-check",
                                "tcp-initial-timeout" arg,
                                "time-wait-state" (
                                    c(
                                        c(
                                          "session-ageout",
                                          "session-timeout" arg
                                        ),
                                        "apply-to-half-close-state"
                                    )
                                )
                            )
                        ),
                        "force-ip-reassembly",
                        "load-distribution" (
                            c(
                                "session-affinity"
                            )
                        )
                    )
                ),
                "firewall-authentication" (
                    c(
                        "traceoptions" (
                            c(
                                "flag" ("authentication" | "proxy" | "all") (
                                    c(
                                        c(
                                          "terse",
                                          "detail",
                                          "extensive"
                                        )
                                    )
                                ).as(:oneline)
                            )
                        )
                    )
                ),
                "screen" (
                    c(
                        "ids-option" (
                          ids_option_type
                        ),
                        "traceoptions" (
                            c(
                                "no-remote-trace",
                                "file" (
                                    c(
                                        "filename" arg,
                                        "size" arg,
                                        "files" arg,
                                        "world-readable",
                                        "no-world-readable",
                                        "match" (
                                          regular_expression
                                        )
                                    )
                                ).as(:oneline),
                                "flag" ("configuration" | "flow" | "all").as(:oneline)
                            )
                        )
                    )
                ),
                "nat" (
                    c(
                        "traceoptions" (
                            c(
                                "no-remote-trace",
                                "file" (
                                    c(
                                        "filename" arg,
                                        "size" arg,
                                        "files" arg,
                                        "world-readable",
                                        "no-world-readable",
                                        "match" (
                                          regular_expression
                                        )
                                    )
                                ).as(:oneline),
                                "flag" ("configuration" | "flow" | "routing-socket" | "routing-protocol" | "all" | "source-nat-re" | "source-nat-rt" | "source-nat-pfe" | "destination-nat-re" | "destination-nat-rt" | "destination-nat-pfe" | "static-nat-re" | "static-nat-rt" | "static-nat-pfe") (
                                    c(
                                        "syslog"
                                    )
                                ).as(:oneline)
                            )
                        ),
                        "source" (
                          ssg_source_nat_object
                        ),
                        "destination" (
                          ssg_destination_nat_object
                        ),
                        "static" (
                          ssg_static_nat_object
                        ),
                        "proxy-arp" (
                          ssg_proxy_arp_object
                        ),
                        "proxy-ndp" (
                          ssg_proxy_ndp_object
                        ),
                        "natv6v4" (
                            c(
                                "no-v6-frag-header"
                            )
                        )
                    )
                ),
                "forwarding-process",
                "policies" (
                    c(
                        "traceoptions" (
                            c(
                                "no-remote-trace",
                                "file" (
                                    c(
                                        "filename" arg,
                                        "size" arg,
                                        "files" arg,
                                        "world-readable",
                                        "no-world-readable",
                                        "match" (
                                          regular_expression
                                        )
                                    )
                                ).as(:oneline),
                                "flag" ("configuration" | "routing-socket" | "compilation" | "ipc" | "rules" | "lookup" | "all").as(:oneline)
                            )
                        ),
                        "policy" (
                            s(
                              "from-zone-name" arg,
                              "to-zone-name" arg,
                              c(
                                "policy" (
                                  policy_type
                                )
                              )
                            )
                        ),
                        "global" (
                            c(
                                "policy" (
                                  policy_type
                                )
                            )
                        ),
                        "default-policy" (
                            c(
                                c(
                                  "permit-all",
                                  "deny-all"
                                )
                            )
                        ),
                        "policy-rematch",
                        "policy-stats" (
                            c(
                                "system-wide" arg
                            )
                        )
                    )
                ),
                "resource-manager" (
                    c(
                        "traceoptions" (
                            c(
                                "flag" ("client" | "group" | "resource" | "gate" | "session" | "chassis cluster" | "messaging" | "service pinhole" | "error" | "all") (
                                    c(
                                        c(
                                          "terse",
                                          "detail",
                                          "extensive"
                                        )
                                    )
                                ).as(:oneline)
                            )
                        )
                    )
                ),
                "analysis" (
                    c(
                        "no-report"
                    )
                ),
                "traceoptions" (
                    c(
                        "no-remote-trace",
                        "file" (
                            c(
                                "filename" arg,
                                "size" arg,
                                "files" arg,
                                "world-readable",
                                "no-world-readable",
                                "match" (
                                  regular_expression
                                )
                            )
                        ).as(:oneline),
                        "flag" ("configuration" | "routing-socket" | "compilation" | "all").as(:oneline),
                        "rate-limit" arg
                    )
                ),
                "datapath-debug",
                "user-identification" (
                    c(
                        "traceoptions" (
                            c(
                                "no-remote-trace",
                                "file" (
                                    c(
                                        "filename" arg,
                                        "size" arg,
                                        "files" arg,
                                        "world-readable",
                                        "no-world-readable",
                                        "match" (
                                          regular_expression
                                        )
                                    )
                                ).as(:oneline),
                                "flag" ("all").as(:oneline)
                            )
                        ),
                        "authentication-source" (
                          authentication_source_type
                        )
                    )
                ),
                "zones" (
                    c(
                        "functional-zone" (
                            c(
                                "management" (
                                    c(
                                        "interfaces" (
                                          zone_interface_list_type
                                        ),
                                        "screen" arg,
                                        "host-inbound-traffic" (
                                          zone_host_inbound_traffic_t
                                        ),
                                        "description" arg
                                    )
                                )
                            )
                        ),
                        "security-zone" (
                          security_zone_type
                        )
                    )
                )
            )
        ),
        "applications" (
            c(
                "application" (
                  application_object
                ),
                "application-set" (
                  application_set_object
                )
            )
        ),
        "schedulers" (
            c(
                "scheduler" (
                  scheduler_object_type
                )
            )
        )
    )
  )
end

rule(:cflowd_sampling_inet_lr_type) do
  arg.as(:arg) (
    c(
        "port" arg,
        "autonomous-system-type" arg,
        "aggregation" (
          aggregation_type
        ),
        "local-dump",
        "no-local-dump",
        "source-address" (
          ipv4addr
        ),
        "version9" (
            c(
                "template" (
                    c(
                        "template-name" arg
                    )
                )
            )
        )
    )
  )
end

rule(:aggregation_type) do
    c(
        "autonomous-system",
        "protocol-port",
        "source-prefix",
        "destination-prefix",
        "source-destination-prefix" (
            c(
                "caida-compliant"
            )
        )
    )
end

rule(:cflowd_sampling_mpls_lr_type) do
  arg.as(:arg) (
    c(
        "port" arg,
        "autonomous-system-type" arg,
        "aggregation" (
          aggregation_type
        ),
        "local-dump",
        "no-local-dump",
        "source-address" (
          ipv4addr
        ),
        "version9"
    )
  )
end

rule(:jdhcp_local_server_type) do
    c(
        "dhcpv6" (
          dhcpv6_local_server_type
        ),
        "pool-match-order",
        "duplicate-clients-on-interface",
        "forward-snooped-clients".as(:oneline),
        "authentication" (
          authentication_type
        ),
        "liveness-detection" (
          dhcp_liveness_detection_type
        ),
        "reconfigure" (
          reconfigure_type
        ),
        "overrides" (
          override_local_server_type
        ),
        "dynamic-profile" (
          dynamic_profile_type
        ).as(:oneline),
        "service-profile" arg,
        "group" (
          dhcp_local_server_group
        )
    )
end

rule(:dhcp_local_server_group) do
  arg.as(:arg) (
    c(
        "authentication" (
          authentication_type
        ),
        "liveness-detection" (
          dhcp_liveness_detection_type
        ),
        "reconfigure" (
          reconfigure_type
        ),
        "overrides" (
          override_local_server_type
        ),
        "dynamic-profile" (
          dynamic_profile_type
        ).as(:oneline),
        "service-profile" arg,
        "interface" arg (
            c(
                "upto" (
                  interface_name
                ),
                "exclude",
                "trace",
                "overrides" (
                  override_local_server_type
                ),
                "dynamic-profile" (
                  dynamic_profile_type
                ).as(:oneline),
                "service-profile" arg
            )
        )
    )
  )
end

rule(:dhcpv6_local_server_type) do
    c(
        "authentication" (
          dhcpv6_authentication_type
        ),
        "liveness-detection" (
          dhcpv6_liveness_detection_type
        ),
        "reconfigure" (
          dhcpv6_reconfigure_type
        ),
        "dynamic-profile" (
          dynamic_profile_type
        ).as(:oneline),
        "service-profile" arg,
        "overrides" (
          dhcpv6_override_local_server_type
        ),
        "group" (
          dhcpv6_local_server_group
        )
    )
end

rule(:dhcpv6_local_server_group) do
  arg.as(:arg) (
    c(
        "authentication" (
          dhcpv6_authentication_type
        ),
        "liveness-detection" (
          dhcpv6_liveness_detection_type
        ),
        "reconfigure" (
          dhcpv6_reconfigure_type
        ),
        "dynamic-profile" (
          dynamic_profile_type
        ).as(:oneline),
        "service-profile" arg,
        "overrides" (
          dhcpv6_override_local_server_type
        ),
        "interface" arg (
            c(
                "upto" (
                  interface_name
                ),
                "exclude",
                "trace",
                "overrides" (
                  dhcpv6_override_local_server_type
                ),
                "dynamic-profile" (
                  dynamic_profile_type
                ).as(:oneline),
                "service-profile" arg
            )
        )
    )
  )
end

rule(:dhcpv6_override_local_server_type) do
    c(
        "interface-client-limit" arg,
        "rapid-commit",
        "process-inform" (
            c(
                "pool" arg
            )
        ),
        "delegated-pool" arg
    )
end

rule(:dhcpv6_reconfigure_type) do
    c(
        "strict",
        "clear-on-abort",
        "attempts" arg,
        "timeout" arg,
        "token" arg,
        "trigger" (
          reconfigure_trigger_type
        )
    )
end

rule(:jsscd_static_subscribers_type) do
    c(
        "access-profile" (
          jsscd_access_profile_type
        ),
        "dynamic-profile" (
          jsscd_dynamic_profile_type
        ),
        "authentication" (
          jsscd_authentication_type
        ),
        "group" (
          jsscd_group_type
        )
    )
end

rule(:jsscd_access_profile_type) do
    c(
        "access-profile-name" arg
    )
end

rule(:jsscd_authentication_type) do
    c(
        "password" (
          unreadable
        ),
        "username-include" (
            c(
                "domain-name" arg,
                "user-prefix" arg,
                "interface",
                "logical-system-name",
                "routing-instance-name"
            )
        )
    )
end

rule(:jsscd_dynamic_profile_type) do
    c(
        "dynamic-profile-name" arg,
        "aggregate-clients" (
            c(
                c(
                  "merge",
                  "replace"
                )
            )
        )
    )
end

rule(:jsscd_group_type) do
  arg.as(:arg) (
    c(
        "access-profile" (
          jsscd_access_profile_type
        ),
        "dynamic-profile" (
          jsscd_dynamic_profile_type
        ),
        "authentication" (
          jsscd_authentication_type
        ),
        "interface" arg (
            c(
                "upto" (
                  interface_unit
                ),
                "exclude"
            )
        ).as(:oneline)
    )
  )
end

rule(:juniper_monitoring_options) do
  arg.as(:arg) (
    c(
        "family" (
            c(
                "inet" (
                    c(
                        "output" (
                          monitoring_output_type
                        )
                    )
                )
            )
        )
    )
  )
end

rule(:juniper_multicast_snooping_options) do

end

rule(:juniper_next_hop_group_options) do
  arg.as(:arg) (
    c(
        "group-type" arg,
        "interface" (
          next_hop_group_intf_type
        ),
        "next-hop-subgroup" (
          juniper_next_hop_subgroup_options
        )
    )
  )
end

rule(:juniper_next_hop_subgroup_options) do
  arg.as(:arg) (
    c(
        "interface" (
          next_hop_subgroup_intf_type
        )
    )
  )
end

rule(:juniper_packet_accounting_options) do
  arg.as(:arg) (
    c(
        "output" (
          packet_accounting_output_type
        )
    )
  )
end

rule(:juniper_packet_capture_options) do
    c(
        c(
          "disable"
        ),
        "file" (
            c(
                "filename" arg,
                "files" arg,
                "size" arg,
                "world-readable",
                "no-world-readable"
            )
        ).as(:oneline),
        "maximum-capture-size" arg
    )
end

rule(:juniper_policy_options) do
    c(
        "prefix-list" arg (
            c(
                "prefix-list-item" (
                  prefix_list_items
                ),
                "apply-path" arg
            )
        ),
        "vsi-policy" arg (
            c(
                "from" (
                    c(
                        "vsi-manager" (
                            s(
                              "vsi-manager-id" arg,
                              "vsi-type" arg,
                              "vsi-version" arg,
                              "vsi-instance" arg
                            )
                        )
                    )
                ),
                "then" (
                    c(
                        "filter" arg
                    )
                )
            )
        ),
        "policy-statement" arg (
            c(
                "term" arg (
                    c(
                        "from" (
                            c(
                                "instance" arg,
                                "family" arg,
                                "protocol" arg,
                                "rib" arg,
                                "neighbor" arg,
                                "next-hop" (
                                  ipaddr
                                ),
                                "interface" (
                                  ipaddr_or_interface
                                ),
                                "area" (
                                  areaid
                                ),
                                "as-path" arg,
                                "as-path-group" arg,
                                "origin" arg,
                                "community" arg,
                                "level" arg,
                                "external" (
                                    c(
                                        "type" arg
                                    )
                                ),
                                "metric" arg,
                                "metric2" arg,
                                "metric3" arg,
                                "metric4" arg,
                                "tag" arg,
                                "tag2" arg,
                                "preference" arg,
                                "preference2" arg,
                                "color" arg,
                                "color2" arg,
                                "local-preference" arg,
                                "policy" (
                                  policy_algebra
                                ),
                                "route-filter" (
                                  control_route_filter_type
                                ),
                                "source-address-filter" (
                                  control_source_address_filter_type
                                ),
                                "prefix-list" (
                                  control_prefix_list_type
                                ),
                                "prefix-list-filter" (
                                  control_prefix_list_filter_type
                                ),
                                "multicast-scope" (
                                    c(
                                        c(
                                          "node-local",
                                          "link-local",
                                          "site-local",
                                          "organization-local",
                                          "global",
                                          "scope_value" arg
                                        ),
                                        c(
                                          "orhigher",
                                          "orlower"
                                        )
                                    )
                                ).as(:oneline),
                                "aggregate-contributor",
                                "state" arg,
                                "route-type" arg,
                                "next-hop-type" arg,
                                "condition" arg,
                                "community-count" (
                                  community_count_type
                                )
                            )
                        ),
                        "to" (
                            c(
                                "instance" arg,
                                "family" arg,
                                "protocol" arg,
                                "rib" arg,
                                "neighbor" arg,
                                "next-hop" (
                                  ipaddr
                                ),
                                "interface" (
                                  ipaddr_or_interface
                                ),
                                "area" (
                                  areaid
                                ),
                                "as-path" arg,
                                "as-path-group" arg,
                                "origin" arg,
                                "community" arg,
                                "level" arg,
                                "external" (
                                    c(
                                        "type" arg
                                    )
                                ),
                                "metric" arg,
                                "metric2" arg,
                                "metric3" arg,
                                "metric4" arg,
                                "tag" arg,
                                "tag2" arg,
                                "preference" arg,
                                "preference2" arg,
                                "color" arg,
                                "color2" arg,
                                "local-preference" arg,
                                "policy" (
                                  policy_algebra
                                )
                            )
                        ),
                        "then" (
                            c(
                                "metric" (
                                    c(
                                        c(
                                          "metric" arg,
                                          "add" arg,
                                          "subtract" arg,
                                          "igp" (
                                              c(
                                                  "metric_offset" arg
                                              )
                                          ).as(:oneline),
                                          "minimum-igp" (
                                              c(
                                                  "metric_offset" arg
                                              )
                                          ).as(:oneline),
                                          "expression" (
                                            metric_expression_type
                                          )
                                        )
                                    )
                                ),
                                "metric2" (
                                    c(
                                        c(
                                          "metric2" arg,
                                          "add" arg,
                                          "subtract" arg
                                        )
                                    )
                                ),
                                "metric3" (
                                    c(
                                        c(
                                          "metric3" arg,
                                          "add" arg,
                                          "subtract" arg
                                        )
                                    )
                                ),
                                "metric4" (
                                    c(
                                        c(
                                          "metric4" arg,
                                          "add" arg,
                                          "subtract" arg
                                        )
                                    )
                                ),
                                "tag" (
                                    c(
                                        c(
                                          "tag" arg,
                                          "add" arg,
                                          "subtract" arg
                                        )
                                    )
                                ),
                                "tag2" (
                                    c(
                                        c(
                                          "tag2" arg,
                                          "add" arg,
                                          "subtract" arg
                                        )
                                    )
                                ),
                                "preference" (
                                    c(
                                        c(
                                          "preference" arg,
                                          "add" arg,
                                          "subtract" arg
                                        )
                                    )
                                ),
                                "preference2" (
                                    c(
                                        c(
                                          "preference2" arg,
                                          "add" arg,
                                          "subtract" arg
                                        )
                                    )
                                ),
                                "color" (
                                    c(
                                        c(
                                          "color" arg,
                                          "add" arg,
                                          "subtract" arg
                                        )
                                    )
                                ),
                                "color2" (
                                    c(
                                        c(
                                          "color2" arg,
                                          "add" arg,
                                          "subtract" arg
                                        )
                                    )
                                ),
                                "local-preference" (
                                    c(
                                        c(
                                          "local-preference" arg,
                                          "add" arg,
                                          "subtract" arg
                                        )
                                    )
                                ),
                                "priority" arg,
                                "label-allocation" arg,
                                "origin" arg,
                                "aigp-originate" (
                                    c(
                                        "distance" arg
                                    )
                                ).as(:oneline),
                                "community" (
                                    s(
                                      c(
                                        "equal-literal" arg,
                                        "set" arg,
                                        "plus-literal" arg,
                                        "add" arg,
                                        "minus-literal" arg,
                                        "delete" arg
                                      ),
                                      "community-name" arg
                                    )
                                ).as(:oneline),
                                "damping" arg,
                                "as-path-prepend" arg,
                                "as-path-expand" (
                                    c(
                                        c(
                                          "last-as" (
                                              c(
                                                  "count" arg
                                              )
                                          ).as(:oneline),
                                          "aspath" arg
                                        )
                                    )
                                ).as(:oneline),
                                "next-hop" (
                                    c(
                                        c(
                                          "self",
                                          "peer-address",
                                          "address" (
                                            ipaddr
                                          ),
                                          "reject",
                                          "discard",
                                          "next-table" arg
                                        )
                                    )
                                ).as(:oneline),
                                "install-nexthop" (
                                    c(
                                        "strict",
                                        c(
                                          "lsp" arg,
                                          "lsp-regex" arg,
                                          "static-lsp" arg,
                                          "static-lsp-regex" arg
                                        ),
                                        "except" (
                                            c(
                                                c(
                                                  "lsp" arg,
                                                  "lsp-regex" arg,
                                                  "static-lsp" arg,
                                                  "static-lsp-regex" arg
                                                )
                                            )
                                        )
                                    )
                                ).as(:oneline),
                                "trace",
                                "external" (
                                    c(
                                        "type" arg
                                    )
                                ),
                                "load-balance" (
                                    c(
                                        c(
                                          "per-packet",
                                          "per-prefix"
                                        )
                                    )
                                ).as(:oneline),
                                "no-route-localize",
                                "install-to-fib",
                                "no-install-to-fib",
                                "class" arg,
                                "destination-class" arg,
                                "source-class" arg,
                                "forwarding-class" arg,
                                "map-to-interface" (
                                    c(
                                        c(
                                          "self",
                                          "interface" (
                                            interface_name
                                          )
                                        )
                                    )
                                ).as(:oneline),
                                "ssm-source" (
                                  ipaddr
                                ),
                                "cos-next-hop-map" arg,
                                "default-action" arg,
                                "next" arg,
                                c(
                                  "accept",
                                  "reject"
                                )
                            )
                        )
                    )
                ),
                "from" (
                    c(
                        "instance" arg,
                        "family" arg,
                        "protocol" arg,
                        "rib" arg,
                        "neighbor" arg,
                        "next-hop" (
                          ipaddr
                        ),
                        "interface" (
                          ipaddr_or_interface
                        ),
                        "area" (
                          areaid
                        ),
                        "as-path" arg,
                        "as-path-group" arg,
                        "origin" arg,
                        "community" arg,
                        "level" arg,
                        "external" (
                            c(
                                "type" arg
                            )
                        ),
                        "metric" arg,
                        "metric2" arg,
                        "metric3" arg,
                        "metric4" arg,
                        "tag" arg,
                        "tag2" arg,
                        "preference" arg,
                        "preference2" arg,
                        "color" arg,
                        "color2" arg,
                        "local-preference" arg,
                        "policy" (
                          policy_algebra
                        ),
                        "route-filter" (
                          control_route_filter_type
                        ),
                        "source-address-filter" (
                          control_source_address_filter_type
                        ),
                        "prefix-list" (
                          control_prefix_list_type
                        ),
                        "prefix-list-filter" (
                          control_prefix_list_filter_type
                        ),
                        "multicast-scope" (
                            c(
                                c(
                                  "node-local",
                                  "link-local",
                                  "site-local",
                                  "organization-local",
                                  "global",
                                  "scope_value" arg
                                ),
                                c(
                                  "orhigher",
                                  "orlower"
                                )
                            )
                        ).as(:oneline),
                        "aggregate-contributor",
                        "state" arg,
                        "route-type" arg,
                        "next-hop-type" arg,
                        "condition" arg,
                        "community-count" (
                          community_count_type
                        )
                    )
                ),
                "to" (
                    c(
                        "instance" arg,
                        "family" arg,
                        "protocol" arg,
                        "rib" arg,
                        "neighbor" arg,
                        "next-hop" (
                          ipaddr
                        ),
                        "interface" (
                          ipaddr_or_interface
                        ),
                        "area" (
                          areaid
                        ),
                        "as-path" arg,
                        "as-path-group" arg,
                        "origin" arg,
                        "community" arg,
                        "level" arg,
                        "external" (
                            c(
                                "type" arg
                            )
                        ),
                        "metric" arg,
                        "metric2" arg,
                        "metric3" arg,
                        "metric4" arg,
                        "tag" arg,
                        "tag2" arg,
                        "preference" arg,
                        "preference2" arg,
                        "color" arg,
                        "color2" arg,
                        "local-preference" arg,
                        "policy" (
                          policy_algebra
                        )
                    )
                ),
                "then" (
                    c(
                        "metric" (
                            c(
                                c(
                                  "metric" arg,
                                  "add" arg,
                                  "subtract" arg,
                                  "igp" (
                                      c(
                                          "metric_offset" arg
                                      )
                                  ).as(:oneline),
                                  "minimum-igp" (
                                      c(
                                          "metric_offset" arg
                                      )
                                  ).as(:oneline),
                                  "expression" (
                                    metric_expression_type
                                  )
                                )
                            )
                        ),
                        "metric2" (
                            c(
                                c(
                                  "metric2" arg,
                                  "add" arg,
                                  "subtract" arg
                                )
                            )
                        ),
                        "metric3" (
                            c(
                                c(
                                  "metric3" arg,
                                  "add" arg,
                                  "subtract" arg
                                )
                            )
                        ),
                        "metric4" (
                            c(
                                c(
                                  "metric4" arg,
                                  "add" arg,
                                  "subtract" arg
                                )
                            )
                        ),
                        "tag" (
                            c(
                                c(
                                  "tag" arg,
                                  "add" arg,
                                  "subtract" arg
                                )
                            )
                        ),
                        "tag2" (
                            c(
                                c(
                                  "tag2" arg,
                                  "add" arg,
                                  "subtract" arg
                                )
                            )
                        ),
                        "preference" (
                            c(
                                c(
                                  "preference" arg,
                                  "add" arg,
                                  "subtract" arg
                                )
                            )
                        ),
                        "preference2" (
                            c(
                                c(
                                  "preference2" arg,
                                  "add" arg,
                                  "subtract" arg
                                )
                            )
                        ),
                        "color" (
                            c(
                                c(
                                  "color" arg,
                                  "add" arg,
                                  "subtract" arg
                                )
                            )
                        ),
                        "color2" (
                            c(
                                c(
                                  "color2" arg,
                                  "add" arg,
                                  "subtract" arg
                                )
                            )
                        ),
                        "local-preference" (
                            c(
                                c(
                                  "local-preference" arg,
                                  "add" arg,
                                  "subtract" arg
                                )
                            )
                        ),
                        "priority" arg,
                        "label-allocation" arg,
                        "origin" arg,
                        "aigp-originate" (
                            c(
                                "distance" arg
                            )
                        ).as(:oneline),
                        "community" (
                            s(
                              c(
                                "equal-literal" arg,
                                "set" arg,
                                "plus-literal" arg,
                                "add" arg,
                                "minus-literal" arg,
                                "delete" arg
                              ),
                              "community-name" arg
                            )
                        ).as(:oneline),
                        "damping" arg,
                        "as-path-prepend" arg,
                        "as-path-expand" (
                            c(
                                c(
                                  "last-as" (
                                      c(
                                          "count" arg
                                      )
                                  ).as(:oneline),
                                  "aspath" arg
                                )
                            )
                        ).as(:oneline),
                        "next-hop" (
                            c(
                                c(
                                  "self",
                                  "peer-address",
                                  "address" (
                                    ipaddr
                                  ),
                                  "reject",
                                  "discard",
                                  "next-table" arg
                                )
                            )
                        ).as(:oneline),
                        "install-nexthop" (
                            c(
                                "strict",
                                c(
                                  "lsp" arg,
                                  "lsp-regex" arg,
                                  "static-lsp" arg,
                                  "static-lsp-regex" arg
                                ),
                                "except" (
                                    c(
                                        c(
                                          "lsp" arg,
                                          "lsp-regex" arg,
                                          "static-lsp" arg,
                                          "static-lsp-regex" arg
                                        )
                                    )
                                )
                            )
                        ).as(:oneline),
                        "trace",
                        "external" (
                            c(
                                "type" arg
                            )
                        ),
                        "load-balance" (
                            c(
                                c(
                                  "per-packet",
                                  "per-prefix"
                                )
                            )
                        ).as(:oneline),
                        "no-route-localize",
                        "install-to-fib",
                        "no-install-to-fib",
                        "class" arg,
                        "destination-class" arg,
                        "source-class" arg,
                        "forwarding-class" arg,
                        "map-to-interface" (
                            c(
                                c(
                                  "self",
                                  "interface" (
                                    interface_name
                                  )
                                )
                            )
                        ).as(:oneline),
                        "ssm-source" (
                          ipaddr
                        ),
                        "cos-next-hop-map" arg,
                        "default-action" arg,
                        "next" arg,
                        c(
                          "accept",
                          "reject"
                        )
                    )
                )
            )
        ),
        "community" arg (
            c(
                "invert-match",
                "members" arg
            )
        ),
        "as-path" arg (
            c(
                "path" arg
            )
        ),
        "as-path-group" arg (
            c(
                "as-path" arg (
                    c(
                        "path" arg
                    )
                ).as(:oneline)
            )
        ),
        "damping" arg (
            c(
                c(
                  "disable"
                ),
                "half-life" arg,
                "reuse" arg,
                "suppress" arg,
                "max-suppress" arg
            )
        ),
        "condition" arg (
            c(
                c(
                  "route-active-on" arg,
                  "if-route-exists" (
                      c(
                          "address" (
                            ipprefix
                          ),
                          "table" arg
                      )
                  )
                )
            )
        ),
        "application-maps" (
          application_map_object
        )
    )
end

rule(:application_map_object) do
  arg.as(:arg) (
    c(
        "application" arg (
            c(
                "code-points" arg
            )
        ).as(:oneline)
    )
  )
end

rule(:community_count_type) do
  arg.as(:arg) (
    c(
        c(
          "equal",
          "orhigher",
          "orlower"
        )
    )
  ).as(:oneline)
end

rule(:control_prefix_list_filter_type) do
    s(
      "list_name" arg,
      c(
        "exact" arg,
        "longer" arg,
        "orlonger" arg
      ),
      c(
        "metric" (
            c(
                c(
                  "metric" arg,
                  "add" arg,
                  "subtract" arg,
                  "igp" (
                      c(
                          "metric_offset" arg
                      )
                  ).as(:oneline),
                  "minimum-igp" (
                      c(
                          "metric_offset" arg
                      )
                  ).as(:oneline),
                  "expression" (
                    metric_expression_type
                  )
                )
            )
        ),
        "metric2" (
            c(
                c(
                  "metric2" arg,
                  "add" arg,
                  "subtract" arg
                )
            )
        ),
        "metric3" (
            c(
                c(
                  "metric3" arg,
                  "add" arg,
                  "subtract" arg
                )
            )
        ),
        "metric4" (
            c(
                c(
                  "metric4" arg,
                  "add" arg,
                  "subtract" arg
                )
            )
        ),
        "tag" (
            c(
                c(
                  "tag" arg,
                  "add" arg,
                  "subtract" arg
                )
            )
        ),
        "tag2" (
            c(
                c(
                  "tag2" arg,
                  "add" arg,
                  "subtract" arg
                )
            )
        ),
        "preference" (
            c(
                c(
                  "preference" arg,
                  "add" arg,
                  "subtract" arg
                )
            )
        ),
        "preference2" (
            c(
                c(
                  "preference2" arg,
                  "add" arg,
                  "subtract" arg
                )
            )
        ),
        "color" (
            c(
                c(
                  "color" arg,
                  "add" arg,
                  "subtract" arg
                )
            )
        ),
        "color2" (
            c(
                c(
                  "color2" arg,
                  "add" arg,
                  "subtract" arg
                )
            )
        ),
        "local-preference" (
            c(
                c(
                  "local-preference" arg,
                  "add" arg,
                  "subtract" arg
                )
            )
        ),
        "priority" arg,
        "label-allocation" arg,
        "origin" arg,
        "aigp-originate" (
            c(
                "distance" arg
            )
        ).as(:oneline),
        "community" (
            s(
              c(
                "equal-literal" arg,
                "set" arg,
                "plus-literal" arg,
                "add" arg,
                "minus-literal" arg,
                "delete" arg
              ),
              "community-name" arg
            )
        ).as(:oneline),
        "damping" arg,
        "as-path-prepend" arg,
        "as-path-expand" (
            c(
                c(
                  "last-as" (
                      c(
                          "count" arg
                      )
                  ).as(:oneline),
                  "aspath" arg
                )
            )
        ).as(:oneline),
        "next-hop" (
            c(
                c(
                  "self",
                  "peer-address",
                  "address" (
                    ipaddr
                  ),
                  "reject",
                  "discard",
                  "next-table" arg
                )
            )
        ).as(:oneline),
        "install-nexthop" (
            c(
                "strict",
                c(
                  "lsp" arg,
                  "lsp-regex" arg,
                  "static-lsp" arg,
                  "static-lsp-regex" arg
                ),
                "except" (
                    c(
                        c(
                          "lsp" arg,
                          "lsp-regex" arg,
                          "static-lsp" arg,
                          "static-lsp-regex" arg
                        )
                    )
                )
            )
        ).as(:oneline),
        "trace",
        "external" (
            c(
                "type" arg
            )
        ),
        "load-balance" (
            c(
                c(
                  "per-packet",
                  "per-prefix"
                )
            )
        ).as(:oneline),
        "no-route-localize",
        "install-to-fib",
        "no-install-to-fib",
        "class" arg,
        "destination-class" arg,
        "source-class" arg,
        "forwarding-class" arg,
        "map-to-interface" (
            c(
                c(
                  "self",
                  "interface" (
                    interface_name
                  )
                )
            )
        ).as(:oneline),
        "ssm-source" (
          ipaddr
        ),
        "cos-next-hop-map" arg,
        "default-action" arg,
        "next" arg,
        c(
          "accept",
          "reject"
        )
      )
    )
end

rule(:control_prefix_list_type) do
  arg.as(:arg)
end

rule(:control_route_filter_type) do
    s(
      "address" arg,
      c(
        "exact" arg,
        "longer" arg,
        "orlonger" arg,
        "upto" arg,
        "through" arg,
        "prefix-length-range" arg,
        "address-mask" arg
      ),
      c(
        "metric" (
            c(
                c(
                  "metric" arg,
                  "add" arg,
                  "subtract" arg,
                  "igp" (
                      c(
                          "metric_offset" arg
                      )
                  ).as(:oneline),
                  "minimum-igp" (
                      c(
                          "metric_offset" arg
                      )
                  ).as(:oneline),
                  "expression" (
                    metric_expression_type
                  )
                )
            )
        ),
        "metric2" (
            c(
                c(
                  "metric2" arg,
                  "add" arg,
                  "subtract" arg
                )
            )
        ),
        "metric3" (
            c(
                c(
                  "metric3" arg,
                  "add" arg,
                  "subtract" arg
                )
            )
        ),
        "metric4" (
            c(
                c(
                  "metric4" arg,
                  "add" arg,
                  "subtract" arg
                )
            )
        ),
        "tag" (
            c(
                c(
                  "tag" arg,
                  "add" arg,
                  "subtract" arg
                )
            )
        ),
        "tag2" (
            c(
                c(
                  "tag2" arg,
                  "add" arg,
                  "subtract" arg
                )
            )
        ),
        "preference" (
            c(
                c(
                  "preference" arg,
                  "add" arg,
                  "subtract" arg
                )
            )
        ),
        "preference2" (
            c(
                c(
                  "preference2" arg,
                  "add" arg,
                  "subtract" arg
                )
            )
        ),
        "color" (
            c(
                c(
                  "color" arg,
                  "add" arg,
                  "subtract" arg
                )
            )
        ),
        "color2" (
            c(
                c(
                  "color2" arg,
                  "add" arg,
                  "subtract" arg
                )
            )
        ),
        "local-preference" (
            c(
                c(
                  "local-preference" arg,
                  "add" arg,
                  "subtract" arg
                )
            )
        ),
        "priority" arg,
        "label-allocation" arg,
        "origin" arg,
        "aigp-originate" (
            c(
                "distance" arg
            )
        ).as(:oneline),
        "community" (
            s(
              c(
                "equal-literal" arg,
                "set" arg,
                "plus-literal" arg,
                "add" arg,
                "minus-literal" arg,
                "delete" arg
              ),
              "community-name" arg
            )
        ).as(:oneline),
        "damping" arg,
        "as-path-prepend" arg,
        "as-path-expand" (
            c(
                c(
                  "last-as" (
                      c(
                          "count" arg
                      )
                  ).as(:oneline),
                  "aspath" arg
                )
            )
        ).as(:oneline),
        "next-hop" (
            c(
                c(
                  "self",
                  "peer-address",
                  "address" (
                    ipaddr
                  ),
                  "reject",
                  "discard",
                  "next-table" arg
                )
            )
        ).as(:oneline),
        "install-nexthop" (
            c(
                "strict",
                c(
                  "lsp" arg,
                  "lsp-regex" arg,
                  "static-lsp" arg,
                  "static-lsp-regex" arg
                ),
                "except" (
                    c(
                        c(
                          "lsp" arg,
                          "lsp-regex" arg,
                          "static-lsp" arg,
                          "static-lsp-regex" arg
                        )
                    )
                )
            )
        ).as(:oneline),
        "trace",
        "external" (
            c(
                "type" arg
            )
        ),
        "load-balance" (
            c(
                c(
                  "per-packet",
                  "per-prefix"
                )
            )
        ).as(:oneline),
        "no-route-localize",
        "install-to-fib",
        "no-install-to-fib",
        "class" arg,
        "destination-class" arg,
        "source-class" arg,
        "forwarding-class" arg,
        "map-to-interface" (
            c(
                c(
                  "self",
                  "interface" (
                    interface_name
                  )
                )
            )
        ).as(:oneline),
        "ssm-source" (
          ipaddr
        ),
        "cos-next-hop-map" arg,
        "default-action" arg,
        "next" arg,
        c(
          "accept",
          "reject"
        )
      )
    )
end

rule(:control_source_address_filter_type) do
    s(
      "address" arg,
      c(
        "exact" arg,
        "longer" arg,
        "orlonger" arg,
        "upto" arg,
        "through" arg,
        "prefix-length-range" arg
      ),
      c(
        "metric" (
            c(
                c(
                  "metric" arg,
                  "add" arg,
                  "subtract" arg,
                  "igp" (
                      c(
                          "metric_offset" arg
                      )
                  ).as(:oneline),
                  "minimum-igp" (
                      c(
                          "metric_offset" arg
                      )
                  ).as(:oneline),
                  "expression" (
                    metric_expression_type
                  )
                )
            )
        ),
        "metric2" (
            c(
                c(
                  "metric2" arg,
                  "add" arg,
                  "subtract" arg
                )
            )
        ),
        "metric3" (
            c(
                c(
                  "metric3" arg,
                  "add" arg,
                  "subtract" arg
                )
            )
        ),
        "metric4" (
            c(
                c(
                  "metric4" arg,
                  "add" arg,
                  "subtract" arg
                )
            )
        ),
        "tag" (
            c(
                c(
                  "tag" arg,
                  "add" arg,
                  "subtract" arg
                )
            )
        ),
        "tag2" (
            c(
                c(
                  "tag2" arg,
                  "add" arg,
                  "subtract" arg
                )
            )
        ),
        "preference" (
            c(
                c(
                  "preference" arg,
                  "add" arg,
                  "subtract" arg
                )
            )
        ),
        "preference2" (
            c(
                c(
                  "preference2" arg,
                  "add" arg,
                  "subtract" arg
                )
            )
        ),
        "color" (
            c(
                c(
                  "color" arg,
                  "add" arg,
                  "subtract" arg
                )
            )
        ),
        "color2" (
            c(
                c(
                  "color2" arg,
                  "add" arg,
                  "subtract" arg
                )
            )
        ),
        "local-preference" (
            c(
                c(
                  "local-preference" arg,
                  "add" arg,
                  "subtract" arg
                )
            )
        ),
        "priority" arg,
        "label-allocation" arg,
        "origin" arg,
        "aigp-originate" (
            c(
                "distance" arg
            )
        ).as(:oneline),
        "community" (
            s(
              c(
                "equal-literal" arg,
                "set" arg,
                "plus-literal" arg,
                "add" arg,
                "minus-literal" arg,
                "delete" arg
              ),
              "community-name" arg
            )
        ).as(:oneline),
        "damping" arg,
        "as-path-prepend" arg,
        "as-path-expand" (
            c(
                c(
                  "last-as" (
                      c(
                          "count" arg
                      )
                  ).as(:oneline),
                  "aspath" arg
                )
            )
        ).as(:oneline),
        "next-hop" (
            c(
                c(
                  "self",
                  "peer-address",
                  "address" (
                    ipaddr
                  ),
                  "reject",
                  "discard",
                  "next-table" arg
                )
            )
        ).as(:oneline),
        "install-nexthop" (
            c(
                "strict",
                c(
                  "lsp" arg,
                  "lsp-regex" arg,
                  "static-lsp" arg,
                  "static-lsp-regex" arg
                ),
                "except" (
                    c(
                        c(
                          "lsp" arg,
                          "lsp-regex" arg,
                          "static-lsp" arg,
                          "static-lsp-regex" arg
                        )
                    )
                )
            )
        ).as(:oneline),
        "trace",
        "external" (
            c(
                "type" arg
            )
        ),
        "load-balance" (
            c(
                c(
                  "per-packet",
                  "per-prefix"
                )
            )
        ).as(:oneline),
        "no-route-localize",
        "install-to-fib",
        "no-install-to-fib",
        "class" arg,
        "destination-class" arg,
        "source-class" arg,
        "forwarding-class" arg,
        "map-to-interface" (
            c(
                c(
                  "self",
                  "interface" (
                    interface_name
                  )
                )
            )
        ).as(:oneline),
        "ssm-source" (
          ipaddr
        ),
        "cos-next-hop-map" arg,
        "default-action" arg,
        "next" arg,
        c(
          "accept",
          "reject"
        )
      )
    )
end

rule(:juniper_port_mirror_options) do
    c(
        "traceoptions" (
          sampling_traceoptions_type
        ),
        "disable",
        "disable-all-instances",
        "mirror-once",
        "input" (
          pm_family_input_type
        ),
        "family" (
            c(
                "inet" (
                    c(
                        "output" (
                          inet_pm_family_output_type
                        )
                    )
                ),
                "inet6" (
                    c(
                        "output" (
                          inet6_pm_family_output_type
                        )
                    )
                ),
                "any",
                "vpls" (
                    c(
                        "output" (
                          layer2_pm_family_output_type
                        )
                    )
                ),
                "ccc" (
                    c(
                        "output" (
                          layer2_pm_family_output_type
                        )
                    )
                )
            )
        ),
        "instance"
    )
end

rule(:inet6_pm_family_output_type) do
    c(
        c(
          "interface" (
            inet6_pm_intf_type
          )
        ),
        "no-filter-check"
    )
end

rule(:inet6_pm_intf_type) do
  arg.as(:arg) (
    c(
        "next-hop" (
          inet6_next_hop_type
        )
    )
  )
end

rule(:inet6_next_hop_type) do
  arg.as(:arg)
end

rule(:inet_pm_family_output_type) do
    c(
        c(
          "interface" (
            inet_pm_intf_type
          ),
          "next-hop-group" arg
        ),
        "no-filter-check"
    )
end

rule(:inet_pm_intf_type) do
  arg.as(:arg) (
    c(
        "next-hop" (
          inet_next_hop_type
        )
    )
  )
end

rule(:inet_next_hop_type) do
  arg.as(:arg)
end

rule(:juniper_protocols) do
    c(
        "l2iw" (
            c(
                "traceoptions" (
                    c(
                        "file" (
                          trace_file_type
                        ),
                        "flag" ("error" | "route" | "normal" | "general" | "state" | "policy" | "task" | "timer" | "all") (
                            c(
                                "send",
                                "receive",
                                "detail",
                                "disable"
                            )
                        ).as(:oneline)
                    )
                )
            )
        ),
        "igmp" (
            c(
                "traceoptions" (
                    c(
                        "file" (
                          trace_file_type
                        ),
                        "flag" ("packets" | "query" | "report" | "leave" | "mtrace" | "group" | "client-notification" | "host-notification" | "route" | "normal" | "general" | "state" | "policy" | "task" | "timer" | "all") (
                            c(
                                "send",
                                "receive",
                                "detail",
                                "disable"
                            )
                        ).as(:oneline)
                    )
                ),
                "query-interval" arg,
                "query-response-interval" arg,
                "query-last-member-interval" arg,
                "robust-count" arg,
                "maximum-transmit-rate" arg,
                "accounting",
                "interface" ("$junos-interface-name" | "interface-name") (
                    c(
                        c(
                          "disable"
                        ),
                        "version" arg,
                        "static" (
                            c(
                                "group" arg (
                                    c(
                                        "group-increment" (
                                          ipv4addr
                                        ),
                                        "group-count" arg,
                                        "exclude",
                                        "source" arg (
                                            c(
                                                "source-increment" (
                                                  ipv4addr
                                                ),
                                                "source-count" arg
                                            )
                                        )
                                    )
                                )
                            )
                        ),
                        "ssm-map" arg,
                        "ssm-map-policy" (
                          policy_algebra
                        ),
                        "immediate-leave",
                        "promiscuous-mode",
                        "accounting",
                        "no-accounting",
                        "group-policy" (
                          policy_algebra
                        ),
                        "group-limit" arg,
                        "passive" (
                            c(
                                "allow-receive",
                                "send-general-query",
                                "send-group-query"
                            )
                        ).as(:oneline),
                        "oif-map" (
                          policy_algebra
                        )
                    )
                )
            )
        ),
        "mld" (
            c(
                "traceoptions" (
                    c(
                        "file" (
                          trace_file_type
                        ),
                        "flag" ("packets" | "query" | "report" | "leave" | "mtrace" | "group" | "client-notification" | "host-notification" | "route" | "normal" | "general" | "state" | "policy" | "task" | "timer" | "all") (
                            c(
                                "send",
                                "receive",
                                "detail",
                                "disable"
                            )
                        ).as(:oneline)
                    )
                ),
                "query-interval" arg,
                "query-response-interval" arg,
                "query-last-member-interval" arg,
                "robust-count" arg,
                "maximum-transmit-rate" arg,
                "accounting",
                "interface" ("$junos-interface-name" | "interface-name") (
                    c(
                        c(
                          "disable"
                        ),
                        "version" arg,
                        "static" (
                            c(
                                "group" arg (
                                    c(
                                        "group-increment" (
                                          ipv6addr
                                        ),
                                        "group-count" arg,
                                        "exclude",
                                        "source" arg (
                                            c(
                                                "source-increment" (
                                                  ipv6addr
                                                ),
                                                "source-count" arg
                                            )
                                        )
                                    )
                                )
                            )
                        ),
                        "ssm-map" arg,
                        "ssm-map-policy" (
                          policy_algebra
                        ),
                        "immediate-leave",
                        "group-policy" (
                          policy_algebra
                        ),
                        "group-limit" arg,
                        "accounting",
                        "no-accounting",
                        "passive" (
                            c(
                                "allow-receive",
                                "send-general-query",
                                "send-group-query"
                            )
                        ).as(:oneline),
                        "oif-map" (
                          policy_algebra
                        )
                    )
                )
            )
        ),
        "amt" (
          juniper_protocols_amt
        ),
        "router-discovery" (
          juniper_protocols_router_discovery
        ),
        "router-advertisement" (
            c(
                "traceoptions" (
                    c(
                        "file" (
                          trace_file_type
                        ),
                        "flag" ("route" | "normal" | "general" | "state" | "policy" | "task" | "timer" | "all").as(:oneline)
                    )
                ),
                "interface" ("$junos-interface-name" | "interface-name") (
                    c(
                        "max-advertisement-interval" arg,
                        "min-advertisement-interval" arg,
                        "managed-configuration",
                        "no-managed-configuration",
                        "other-stateful-configuration",
                        "no-other-stateful-configuration",
                        "link-mtu",
                        "no-link-mtu",
                        "reachable-time" arg,
                        "retransmit-timer" arg,
                        "virtual-router-only",
                        "current-hop-limit" arg,
                        "default-lifetime" arg,
                        "prefix" arg (
                            c(
                                "valid-lifetime" arg,
                                "on-link",
                                "no-on-link",
                                "preferred-lifetime" arg,
                                "autonomous",
                                "no-autonomous"
                            )
                        )
                    )
                )
            )
        ),
        "sap" (
            c(
                c(
                  "disable"
                ),
                "listen" arg (
                    c(
                        "port" arg
                    )
                ).as(:oneline)
            )
        ),
        "rsvp" (
            c(
                c(
                  "disable"
                ),
                "graceful-restart" (
                    c(
                        c(
                          "disable"
                        ),
                        "helper-disable",
                        "maximum-helper-restart-time" arg,
                        "maximum-helper-recovery-time" arg
                    )
                ),
                "tunnel-services" (
                    c(
                        "devices" (
                          interface_device
                        )
                    )
                ),
                "no-p2mp-sublsp",
                "no-node-id-subobject",
                "no-interface-hello",
                "hello-acknowledgements",
                "node-hello" (
                    c(
                        "hello-interval" arg
                    )
                ).as(:oneline),
                "no-local-reversion",
                "fast-reroute" (
                    c(
                        "optimize-timer" arg
                    )
                ),
                "load-balance" (
                    c(
                        "bandwidth"
                    )
                ),
                "traceoptions" (
                    c(
                        "file" (
                          trace_file_type
                        ),
                        "flag" ("packets" | "path" | "resv" | "pathtear" | "resvtear" | "state" | "error" | "route" | "lmp" | "event" | "nsr-synchronization" | "lsp-prefix" | "all") (
                            c(
                                "send",
                                "receive",
                                "detail",
                                "disable"
                            )
                        ).as(:oneline)
                    )
                ),
                "refresh-time" arg,
                "keep-multiplier" arg,
                "graceful-deletion-timeout" arg,
                "setup-protection",
                "preemption" (
                    c(
                        c(
                          "disabled",
                          "normal",
                          "aggressive"
                        ),
                        "soft-preemption" (
                            c(
                                "cleanup-timer" arg
                            )
                        )
                    )
                ),
                "interface" arg (
                    c(
                        c(
                          "disable"
                        ),
                        "authentication-key" (
                          unreadable
                        ),
                        "aggregate",
                        "no-aggregate",
                        "reliable",
                        "no-reliable",
                        "hello-interval" arg,
                        "subscription" (
                          subscription_type
                        ),
                        "bandwidth" arg,
                        "update-threshold" arg,
                        "link-protection" (
                            c(
                                c(
                                  "disable"
                                ),
                                "bandwidth" (
                                  bandwidth_type
                                ),
                                "max-bypasses" arg,
                                "subscription" arg,
                                "no-node-protection",
                                "optimize-timer" arg,
                                "class-of-service" arg,
                                "hop-limit" arg,
                                "no-cspf",
                                "exclude-srlg",
                                "priority" (
                                    c(
                                        "setup-priority" arg,
                                        "reservation-priority" arg
                                    )
                                ),
                                "path" arg (
                                    c(
                                        c(
                                          "loose",
                                          "strict"
                                        )
                                    )
                                ).as(:oneline),
                                "admin-group" (
                                  admin_group_include_exclude
                                ),
                                "bypass" arg (
                                    c(
                                        "to" (
                                          ipv4addr
                                        ),
                                        "bandwidth" (
                                          bandwidth_type
                                        ),
                                        "description" arg,
                                        "priority" (
                                            c(
                                                "setup-priority" arg,
                                                "reservation-priority" arg
                                            )
                                        ),
                                        "class-of-service" arg,
                                        "hop-limit" arg,
                                        "no-cspf",
                                        "exclude-srlg",
                                        "path" arg (
                                            c(
                                                c(
                                                  "loose",
                                                  "strict"
                                                )
                                            )
                                        ).as(:oneline),
                                        "admin-group" (
                                          admin_group_include_exclude
                                        )
                                    )
                                )
                            )
                        )
                    )
                ),
                "peer-interface" arg (
                    c(
                        c(
                          "disable"
                        ),
                        "authentication-key" (
                          unreadable
                        ),
                        "aggregate",
                        "no-aggregate",
                        "reliable",
                        "no-reliable",
                        "hello-interval" arg
                    )
                ),
                "lsp-set" arg (
                    c(
                        c(
                          "disable"
                        ),
                        "match-criteria" (
                          lsp_set_match_type
                        ),
                        "traceoptions" (
                            c(
                                "file" (
                                  trace_file_type
                                ),
                                "flag" ("packets" | "path" | "resv" | "pathtear" | "resvtear" | "state" | "error" | "route" | "lmp" | "event" | "nsr-synchronization" | "lsp-prefix" | "all") (
                                    c(
                                        "send",
                                        "receive",
                                        "detail",
                                        "disable"
                                    )
                                ).as(:oneline)
                            )
                        )
                    )
                )
            )
        ),
        "mpls" (
          juniper_protocols_mpls
        ),
        "bgp" (
          juniper_protocols_bgp
        ),
        "bfd" (
          juniper_protocols_bfd
        ),
        "dvmrp" (
            c(
                c(
                  "disable"
                ),
                "traceoptions" (
                    c(
                        "file" (
                          trace_file_type
                        ),
                        "flag" ("route" | "poison" | "packets" | "probe" | "report" | "neighbor" | "prune" | "graft" | "normal" | "general" | "state" | "policy" | "task" | "timer" | "all") (
                            c(
                                "send",
                                "receive",
                                "detail",
                                "disable"
                            )
                        ).as(:oneline)
                    )
                ),
                "rib-group" (
                  rib_group_inet_type
                ),
                "import" (
                  policy_algebra
                ),
                "export" (
                  policy_algebra
                ),
                "interface" arg (
                    c(
                        c(
                          "disable"
                        ),
                        "mode" arg,
                        "metric" arg,
                        "hold-time" arg
                    )
                )
            )
        ),
        "isis" (
          juniper_protocols_isis
        ),
        "esis" (
          juniper_protocols_esis
        ),
        "msdp" (
          juniper_protocols_msdp
        ),
        "ospf" (
          juniper_protocols_ospf
        ),
        "ospf3" (
            c(
                "realm" ("ipv6-unicast" | "ipv6-multicast" | "ipv4-unicast" | "ipv4-multicast") (
                    c(
                        c(
                          "disable"
                        ),
                        "traceoptions" (
                            c(
                                "file" (
                                  trace_file_type
                                ),
                                "flag" ("spf" | "error" | "event" | "packet-dump" | "flooding" | "lsa-analysis" | "packets" | "hello" | "database-description" | "lsa-request" | "lsa-update" | "lsa-ack" | "ldp-synchronization" | "on-demand" | "nsr-synchronization" | "graceful-restart" | "restart-signaling" | "route" | "normal" | "general" | "state" | "policy" | "task" | "timer" | "all") (
                                    c(
                                        "send",
                                        "receive",
                                        "detail",
                                        "disable"
                                    )
                                ).as(:oneline)
                            )
                        ),
                        "topology" ("default" | "ipv4-multicast" | arg) (
                            c(
                                "disable",
                                "topology-id" arg,
                                "overload",
                                "rib-group" arg,
                                "spf-options" (
                                    c(
                                        "delay" arg,
                                        "holddown" arg,
                                        "rapid-runs" arg,
                                        "no-ignore-our-externals"
                                    )
                                ),
                                "backup-spf-options" (
                                    c(
                                        "disable",
                                        "no-install",
                                        "downstream-paths-only"
                                    )
                                ),
                                "prefix-export-limit" arg
                            )
                        ),
                        "spf-options" (
                            c(
                                "delay" arg,
                                "holddown" arg,
                                "rapid-runs" arg,
                                "no-ignore-our-externals"
                            )
                        ),
                        "backup-spf-options" (
                            c(
                                "disable",
                                "no-install",
                                "downstream-paths-only"
                            )
                        ),
                        "prefix-export-limit" arg,
                        "rib-group" arg,
                        "overload" (
                            c(
                                "timeout" arg
                            )
                        ),
                        "database-protection" (
                            c(
                                "maximum-lsa" arg,
                                "warning-only",
                                "warning-threshold" arg,
                                "ignore-count" arg,
                                "ignore-time" arg,
                                "reset-time" arg
                            )
                        ),
                        "graceful-restart" (
                            c(
                                c(
                                  "disable"
                                ),
                                "restart-duration" arg,
                                "notify-duration" arg,
                                "helper-disable" (
                                    c(
                                        c(
                                          "standard",
                                          "restart-signaling",
                                          "both"
                                        )
                                    )
                                ),
                                "no-strict-lsa-checking"
                            )
                        ),
                        "traffic-engineering" (
                            c(
                                "no-topology",
                                "multicast-rpf-routes",
                                "ignore-lsp-metrics",
                                "shortcuts" (
                                    c(
                                        "lsp-metric-into-summary"
                                    )
                                ),
                                "advertise-unnumbered-interfaces",
                                "credibility-protocol-preference"
                            )
                        ),
                        "route-type-community" arg,
                        "domain-id" (
                            c(
                                c(
                                  "domain-id" arg,
                                  "disable"
                                )
                            )
                        ).as(:oneline),
                        c(
                          "domain-vpn-tag" arg,
                          "no-domain-vpn-tag"
                        ),
                        "preference" arg,
                        "external-preference" arg,
                        "export" (
                          policy_algebra
                        ),
                        "import" (
                          policy_algebra
                        ),
                        "reference-bandwidth" arg,
                        "no-rfc-1583",
                        c(
                          "no-nssa-abr"
                        ),
                        "sham-link" (
                            c(
                                "local" (
                                  ipaddr
                                )
                            )
                        ),
                        "area" arg (
                            c(
                                c(
                                  "stub" (
                                      c(
                                          "default-metric" arg,
                                          "summaries",
                                          "no-summaries"
                                      )
                                  ).as(:oneline),
                                  "nssa" (
                                      c(
                                          "default-lsa" (
                                              c(
                                                  "default-metric" arg,
                                                  "metric-type" arg,
                                                  "type-7"
                                              )
                                          ),
                                          "summaries",
                                          "no-summaries",
                                          "area-range" arg (
                                              c(
                                                  "restrict",
                                                  "exact",
                                                  "override-metric" (
                                                      c(
                                                          "metric" arg,
                                                          "metric-type" arg
                                                      )
                                                  )
                                              )
                                          )
                                      )
                                  )
                                ),
                                "area-range" arg (
                                    c(
                                        "restrict",
                                        "exact",
                                        "override-metric" arg
                                    )
                                ),
                                "network-summary-export" (
                                  policy_algebra
                                ),
                                "network-summary-import" (
                                  policy_algebra
                                ),
                                "inter-area-prefix-export" (
                                  policy_algebra
                                ),
                                "inter-area-prefix-import" (
                                  policy_algebra
                                ),
                                "virtual-link" (
                                    s(
                                      "neighbor-id" arg,
                                      "transit-area" arg,
                                      c(
                                        c(
                                          "disable"
                                        ),
                                        "retransmit-interval" arg,
                                        "transit-delay" arg,
                                        "hello-interval" arg,
                                        "dead-interval" arg,
                                        c(
                                          "authentication" (
                                            juniper_ospf_authentication
                                          )
                                        ),
                                        "demand-circuit",
                                        "flood-reduction",
                                        "no-neighbor-down-notification",
                                        "ipsec-sa" arg,
                                        "topology" ("default" | "ipv4-multicast" | arg) (
                                            c(
                                                "disable",
                                                "metric" arg,
                                                "bandwidth-based-metrics" (
                                                    c(
                                                        "bandwidth" arg (
                                                            c(
                                                                "metric" arg
                                                            )
                                                        ).as(:oneline)
                                                    )
                                                )
                                            )
                                        )
                                      )
                                    )
                                ),
                                "sham-link-remote" arg (
                                    c(
                                        "metric" arg,
                                        "ipsec-sa" arg,
                                        "demand-circuit",
                                        "flood-reduction",
                                        "topology" ("default" | "ipv4-multicast" | arg) (
                                            c(
                                                "disable",
                                                "metric" arg,
                                                "bandwidth-based-metrics" (
                                                    c(
                                                        "bandwidth" arg (
                                                            c(
                                                                "metric" arg
                                                            )
                                                        ).as(:oneline)
                                                    )
                                                )
                                            )
                                        )
                                    )
                                ),
                                "interface" arg (
                                    c(
                                        c(
                                          "disable"
                                        ),
                                        "interface-type" arg,
                                        c(
                                          "link-protection",
                                          "node-link-protection"
                                        ),
                                        "no-eligible-backup",
                                        "passive" (
                                            c(
                                                "traffic-engineering" (
                                                    c(
                                                        "remote-node-id" (
                                                          ipaddr
                                                        )
                                                    )
                                                )
                                            )
                                        ),
                                        "secondary",
                                        "own-router-lsa",
                                        "bandwidth-based-metrics" (
                                            c(
                                                "bandwidth" arg (
                                                    c(
                                                        "metric" arg
                                                    )
                                                ).as(:oneline)
                                            )
                                        ),
                                        "metric" arg,
                                        "te-metric" arg,
                                        "priority" arg,
                                        "ldp-synchronization" (
                                          ldp_sync_obj
                                        ),
                                        "retransmit-interval" arg,
                                        "transit-delay" arg,
                                        "hello-interval" arg,
                                        "dead-interval" arg,
                                        c(
                                          "authentication" (
                                            juniper_ospf_authentication
                                          )
                                        ),
                                        "demand-circuit",
                                        "flood-reduction",
                                        "no-neighbor-down-notification",
                                        "ipsec-sa" arg,
                                        "topology" ("default" | "ipv4-multicast" | arg) (
                                            c(
                                                "disable",
                                                "metric" arg,
                                                "bandwidth-based-metrics" (
                                                    c(
                                                        "bandwidth" arg (
                                                            c(
                                                                "metric" arg
                                                            )
                                                        ).as(:oneline)
                                                    )
                                                )
                                            )
                                        ),
                                        "bfd-liveness-detection" (
                                            c(
                                                "version" arg,
                                                "minimum-interval" arg,
                                                "minimum-receive-interval" arg,
                                                "multiplier" arg,
                                                c(
                                                  "no-adaptation"
                                                ),
                                                "transmit-interval" (
                                                    c(
                                                        "minimum-interval" arg,
                                                        "threshold" arg
                                                    )
                                                ),
                                                "detection-time" (
                                                    c(
                                                        "threshold" arg
                                                    )
                                                ),
                                                "authentication" (
                                                    c(
                                                        "key-chain" arg,
                                                        "algorithm" arg,
                                                        "loose-check"
                                                    )
                                                ),
                                                "full-neighbors-only"
                                            )
                                        ),
                                        "dynamic-neighbors",
                                        "neighbor" arg (
                                            c(
                                                "eligible"
                                            )
                                        ).as(:oneline),
                                        "poll-interval" arg,
                                        "no-interface-state-traps"
                                    )
                                ),
                                "no-context-identifier-advertisement",
                                "context-identifier" arg,
                                "label-switched-path" arg (
                                    c(
                                        c(
                                          "disable"
                                        ),
                                        "metric" arg,
                                        "topology" ("default" | "ipv4-multicast" | arg) (
                                            c(
                                                "disable",
                                                "metric" arg,
                                                "bandwidth-based-metrics" (
                                                    c(
                                                        "bandwidth" arg (
                                                            c(
                                                                "metric" arg
                                                            )
                                                        ).as(:oneline)
                                                    )
                                                )
                                            )
                                        )
                                    )
                                ),
                                "peer-interface" arg (
                                    c(
                                        c(
                                          "disable"
                                        ),
                                        "retransmit-interval" arg,
                                        "transit-delay" arg,
                                        "hello-interval" arg,
                                        "dead-interval" arg,
                                        c(
                                          "authentication" (
                                            juniper_ospf_authentication
                                          )
                                        ),
                                        "demand-circuit",
                                        "flood-reduction",
                                        "no-neighbor-down-notification"
                                    )
                                )
                            )
                        )
                    )
                ),
                c(
                  "disable"
                ),
                "traceoptions" (
                    c(
                        "file" (
                          trace_file_type
                        ),
                        "flag" ("spf" | "error" | "event" | "packet-dump" | "flooding" | "lsa-analysis" | "packets" | "hello" | "database-description" | "lsa-request" | "lsa-update" | "lsa-ack" | "ldp-synchronization" | "on-demand" | "nsr-synchronization" | "graceful-restart" | "restart-signaling" | "route" | "normal" | "general" | "state" | "policy" | "task" | "timer" | "all") (
                            c(
                                "send",
                                "receive",
                                "detail",
                                "disable"
                            )
                        ).as(:oneline)
                    )
                ),
                "topology" ("default" | "ipv4-multicast" | arg) (
                    c(
                        "disable",
                        "topology-id" arg,
                        "overload",
                        "rib-group" arg,
                        "spf-options" (
                            c(
                                "delay" arg,
                                "holddown" arg,
                                "rapid-runs" arg,
                                "no-ignore-our-externals"
                            )
                        ),
                        "backup-spf-options" (
                            c(
                                "disable",
                                "no-install",
                                "downstream-paths-only"
                            )
                        ),
                        "prefix-export-limit" arg
                    )
                ),
                "spf-options" (
                    c(
                        "delay" arg,
                        "holddown" arg,
                        "rapid-runs" arg,
                        "no-ignore-our-externals"
                    )
                ),
                "backup-spf-options" (
                    c(
                        "disable",
                        "no-install",
                        "downstream-paths-only"
                    )
                ),
                "prefix-export-limit" arg,
                "rib-group" arg,
                "overload" (
                    c(
                        "timeout" arg
                    )
                ),
                "database-protection" (
                    c(
                        "maximum-lsa" arg,
                        "warning-only",
                        "warning-threshold" arg,
                        "ignore-count" arg,
                        "ignore-time" arg,
                        "reset-time" arg
                    )
                ),
                "graceful-restart" (
                    c(
                        c(
                          "disable"
                        ),
                        "restart-duration" arg,
                        "notify-duration" arg,
                        "helper-disable" (
                            c(
                                c(
                                  "standard",
                                  "restart-signaling",
                                  "both"
                                )
                            )
                        ),
                        "no-strict-lsa-checking"
                    )
                ),
                "traffic-engineering" (
                    c(
                        "no-topology",
                        "multicast-rpf-routes",
                        "ignore-lsp-metrics",
                        "shortcuts" (
                            c(
                                "lsp-metric-into-summary"
                            )
                        ),
                        "advertise-unnumbered-interfaces",
                        "credibility-protocol-preference"
                    )
                ),
                "route-type-community" arg,
                "domain-id" (
                    c(
                        c(
                          "domain-id" arg,
                          "disable"
                        )
                    )
                ).as(:oneline),
                c(
                  "domain-vpn-tag" arg,
                  "no-domain-vpn-tag"
                ),
                "preference" arg,
                "external-preference" arg,
                "export" (
                  policy_algebra
                ),
                "import" (
                  policy_algebra
                ),
                "reference-bandwidth" arg,
                "no-rfc-1583",
                c(
                  "no-nssa-abr"
                ),
                "sham-link" (
                    c(
                        "local" (
                          ipaddr
                        )
                    )
                ),
                "area" arg (
                    c(
                        c(
                          "stub" (
                              c(
                                  "default-metric" arg,
                                  "summaries",
                                  "no-summaries"
                              )
                          ).as(:oneline),
                          "nssa" (
                              c(
                                  "default-lsa" (
                                      c(
                                          "default-metric" arg,
                                          "metric-type" arg,
                                          "type-7"
                                      )
                                  ),
                                  "summaries",
                                  "no-summaries",
                                  "area-range" arg (
                                      c(
                                          "restrict",
                                          "exact",
                                          "override-metric" (
                                              c(
                                                  "metric" arg,
                                                  "metric-type" arg
                                              )
                                          )
                                      )
                                  )
                              )
                          )
                        ),
                        "area-range" arg (
                            c(
                                "restrict",
                                "exact",
                                "override-metric" arg
                            )
                        ),
                        "network-summary-export" (
                          policy_algebra
                        ),
                        "network-summary-import" (
                          policy_algebra
                        ),
                        "inter-area-prefix-export" (
                          policy_algebra
                        ),
                        "inter-area-prefix-import" (
                          policy_algebra
                        ),
                        "virtual-link" (
                            s(
                              "neighbor-id" arg,
                              "transit-area" arg,
                              c(
                                c(
                                  "disable"
                                ),
                                "retransmit-interval" arg,
                                "transit-delay" arg,
                                "hello-interval" arg,
                                "dead-interval" arg,
                                c(
                                  "authentication" (
                                    juniper_ospf_authentication
                                  )
                                ),
                                "demand-circuit",
                                "flood-reduction",
                                "no-neighbor-down-notification",
                                "ipsec-sa" arg,
                                "topology" ("default" | "ipv4-multicast" | arg) (
                                    c(
                                        "disable",
                                        "metric" arg,
                                        "bandwidth-based-metrics" (
                                            c(
                                                "bandwidth" arg (
                                                    c(
                                                        "metric" arg
                                                    )
                                                ).as(:oneline)
                                            )
                                        )
                                    )
                                )
                              )
                            )
                        ),
                        "sham-link-remote" arg (
                            c(
                                "metric" arg,
                                "ipsec-sa" arg,
                                "demand-circuit",
                                "flood-reduction",
                                "topology" ("default" | "ipv4-multicast" | arg) (
                                    c(
                                        "disable",
                                        "metric" arg,
                                        "bandwidth-based-metrics" (
                                            c(
                                                "bandwidth" arg (
                                                    c(
                                                        "metric" arg
                                                    )
                                                ).as(:oneline)
                                            )
                                        )
                                    )
                                )
                            )
                        ),
                        "interface" arg (
                            c(
                                c(
                                  "disable"
                                ),
                                "interface-type" arg,
                                c(
                                  "link-protection",
                                  "node-link-protection"
                                ),
                                "no-eligible-backup",
                                "passive" (
                                    c(
                                        "traffic-engineering" (
                                            c(
                                                "remote-node-id" (
                                                  ipaddr
                                                )
                                            )
                                        )
                                    )
                                ),
                                "secondary",
                                "own-router-lsa",
                                "bandwidth-based-metrics" (
                                    c(
                                        "bandwidth" arg (
                                            c(
                                                "metric" arg
                                            )
                                        ).as(:oneline)
                                    )
                                ),
                                "metric" arg,
                                "te-metric" arg,
                                "priority" arg,
                                "ldp-synchronization" (
                                  ldp_sync_obj
                                ),
                                "retransmit-interval" arg,
                                "transit-delay" arg,
                                "hello-interval" arg,
                                "dead-interval" arg,
                                c(
                                  "authentication" (
                                    juniper_ospf_authentication
                                  )
                                ),
                                "demand-circuit",
                                "flood-reduction",
                                "no-neighbor-down-notification",
                                "ipsec-sa" arg,
                                "topology" ("default" | "ipv4-multicast" | arg) (
                                    c(
                                        "disable",
                                        "metric" arg,
                                        "bandwidth-based-metrics" (
                                            c(
                                                "bandwidth" arg (
                                                    c(
                                                        "metric" arg
                                                    )
                                                ).as(:oneline)
                                            )
                                        )
                                    )
                                ),
                                "bfd-liveness-detection" (
                                    c(
                                        "version" arg,
                                        "minimum-interval" arg,
                                        "minimum-receive-interval" arg,
                                        "multiplier" arg,
                                        c(
                                          "no-adaptation"
                                        ),
                                        "transmit-interval" (
                                            c(
                                                "minimum-interval" arg,
                                                "threshold" arg
                                            )
                                        ),
                                        "detection-time" (
                                            c(
                                                "threshold" arg
                                            )
                                        ),
                                        "authentication" (
                                            c(
                                                "key-chain" arg,
                                                "algorithm" arg,
                                                "loose-check"
                                            )
                                        ),
                                        "full-neighbors-only"
                                    )
                                ),
                                "dynamic-neighbors",
                                "neighbor" arg (
                                    c(
                                        "eligible"
                                    )
                                ).as(:oneline),
                                "poll-interval" arg,
                                "no-interface-state-traps"
                            )
                        ),
                        "no-context-identifier-advertisement",
                        "context-identifier" arg,
                        "label-switched-path" arg (
                            c(
                                c(
                                  "disable"
                                ),
                                "metric" arg,
                                "topology" ("default" | "ipv4-multicast" | arg) (
                                    c(
                                        "disable",
                                        "metric" arg,
                                        "bandwidth-based-metrics" (
                                            c(
                                                "bandwidth" arg (
                                                    c(
                                                        "metric" arg
                                                    )
                                                ).as(:oneline)
                                            )
                                        )
                                    )
                                )
                            )
                        ),
                        "peer-interface" arg (
                            c(
                                c(
                                  "disable"
                                ),
                                "retransmit-interval" arg,
                                "transit-delay" arg,
                                "hello-interval" arg,
                                "dead-interval" arg,
                                c(
                                  "authentication" (
                                    juniper_ospf_authentication
                                  )
                                ),
                                "demand-circuit",
                                "flood-reduction",
                                "no-neighbor-down-notification"
                            )
                        )
                    )
                )
            )
        ),
        "ldp" (
          juniper_protocols_ldp
        ),
        "pim" (
          juniper_protocols_pim
        ),
        "rip" (
          juniper_protocols_rip
        ),
        "ripng" (
          juniper_protocols_ripng
        ),
        "connections" (
            c(
                "interface-switch" arg (
                    c(
                        "interface" arg
                    )
                ),
                "remote-interface-switch" arg (
                    c(
                        "interface" (
                          interface_name
                        ),
                        "transmit-lsp" arg,
                        "receive-lsp" arg
                    )
                ),
                "lsp-switch" arg (
                    c(
                        "transmit-lsp" arg,
                        "receive-lsp" arg
                    )
                ),
                "p2mp-transmit-switch" arg (
                    c(
                        "input-interface" (
                          interface_name
                        ),
                        "transmit-p2mp-lsp" arg
                    )
                ),
                "p2mp-receive-switch" arg (
                    c(
                        "receive-p2mp-lsp" arg,
                        "output-interface" (
                          interface_name
                        )
                    )
                )
            )
        ),
        "vrrp" (
            c(
                "traceoptions" (
                    c(
                        "no-remote-trace",
                        "file" (
                            c(
                                "filename" arg,
                                "size" arg,
                                "files" arg,
                                "world-readable",
                                "no-world-readable",
                                "match" (
                                  regular_expression
                                ),
                                "microsecond-stamp"
                            )
                        ).as(:oneline),
                        "flag" ("database" | "general" | "interfaces" | "normal" | "packets" | "state" | "timer" | "ppm" | "all").as(:oneline)
                    )
                ),
                "failover-delay" arg,
                "startup-silent-period" arg,
                "asymmetric-hold-time",
                "delegate-processing",
                "skew-timer-disable",
                "global-advertisements-thrshold" arg
            )
        ),
        "l2circuit" (
            c(
                "traceoptions" (
                    c(
                        "file" (
                          trace_file_type
                        ),
                        "flag" ("error" | "topology" | "fec" | "connections" | "oam" | "egress-protection" | "route" | "normal" | "general" | "state" | "policy" | "task" | "timer" | "all") (
                            c(
                                "send",
                                "receive",
                                "detail",
                                "disable"
                            )
                        ).as(:oneline)
                    )
                ),
                "neighbor" arg (
                    c(
                        "interface" arg (
                            c(
                                "static" (
                                    c(
                                        "incoming-label" arg,
                                        "outgoing-label" arg,
                                        "send-oam"
                                    )
                                ),
                                "psn-tunnel-endpoint" (
                                  ipv4addr
                                ),
                                "protect-interface" (
                                  interface_name
                                ),
                                "virtual-circuit-id" arg,
                                "description" arg,
                                "control-word",
                                "no-control-word",
                                "community" arg,
                                "mtu" arg,
                                "encapsulation-type" arg,
                                "ignore-encapsulation-mismatch",
                                "ignore-mtu-mismatch",
                                "no-revert",
                                "bandwidth" (
                                  bandwidth_type
                                ),
                                "pseudowire-status-tlv",
                                "switchover-delay" arg,
                                "revert-time" arg,
                                "connection-protection",
                                "backup-neighbor" arg (
                                    c(
                                        "static" (
                                            c(
                                                "incoming-label" arg,
                                                "outgoing-label" arg
                                            )
                                        ),
                                        "virtual-circuit-id" arg,
                                        "community" arg,
                                        "psn-tunnel-endpoint" (
                                          ipv4addr
                                        ),
                                        "standby"
                                    )
                                ),
                                "oam",
                                "egress-protection" (
                                    c(
                                        c(
                                          "protector-interface" (
                                            interface_name
                                          ),
                                          "protector-pe" (
                                              c(
                                                  "address" (
                                                    ipv4addr
                                                  ),
                                                  "context-identifier" (
                                                    ipv4addr
                                                  ),
                                                  "lsp" arg
                                              )
                                          ).as(:oneline)
                                        ),
                                        "protected-l2circuit" (
                                            c(
                                                "l2circuit-name" arg,
                                                "ingress-pe" (
                                                  ipv4addr
                                                ),
                                                "egress-pe" (
                                                  ipv4addr
                                                ),
                                                "virtual-circuit-id" arg
                                            )
                                        ).as(:oneline)
                                    )
                                )
                            )
                        )
                    )
                ),
                "local-switching" (
                    c(
                        "interface" arg (
                            c(
                                "no-revert",
                                "protect-interface" (
                                  interface_name
                                ),
                                "end-interface" (
                                    c(
                                        "interface" (
                                          interface_name
                                        ),
                                        "no-revert",
                                        "protect-interface" (
                                          interface_name
                                        )
                                    )
                                ),
                                "description" arg,
                                "encapsulation-type" arg,
                                "ignore-encapsulation-mismatch",
                                "ignore-mtu-mismatch"
                            )
                        )
                    )
                )
            )
        ),
        "link-management" (
          juniper_protocols_lmp
        ),
        "pgm" (
          juniper_protocols_pgm
        ),
        "bfd" (
            c(
                "traceoptions" (
                    c(
                        "no-remote-trace",
                        "file" (
                            c(
                                "filename" arg,
                                "size" arg,
                                "files" arg,
                                "world-readable",
                                "no-world-readable",
                                "match" (
                                  regular_expression
                                )
                            )
                        ).as(:oneline),
                        "flag" ("adjacency" | "event" | "error" | "packet" | "ppm-packet" | "pipe" | "pipe-detail" | "state" | "timer" | "nsr-synchronization" | "nsr-packet" | "issu" | "all").as(:oneline)
                    )
                ),
                "no-issu-timer-negotiation"
            )
        ),
        "vpls",
        "neighbor-discovery" (
            c(
                "onlink-subnet-only",
                "no-dad-on-state-change",
                "secure"
            )
        ),
        "iccp" (
            c(
                "local-ip-addr" (
                  ipv4addr
                ),
                "session-establishment-hold-time" arg,
                "authentication-key" arg,
                "peer" (
                  peer_group
                ),
                "traceoptions" (
                    c(
                        "no-remote-trace",
                        "file" (
                            c(
                                "filename" arg,
                                "size" arg,
                                "files" arg,
                                "world-readable",
                                "no-world-readable",
                                "match" (
                                  regular_expression
                                )
                            )
                        ).as(:oneline),
                        "flag" ("error" | "event" | "packet" | "pipe" | "pipe-detail" | "all").as(:oneline)
                    )
                )
            )
        ),
        "ilmi" (
            c(
                "traceoptions" (
                    c(
                        "no-remote-trace",
                        "file" (
                            c(
                                "filename" arg,
                                "size" arg,
                                "files" arg,
                                "world-readable",
                                "no-world-readable",
                                "match" (
                                  regular_expression
                                )
                            )
                        ).as(:oneline),
                        "flag" ("database" | "routing-socket" | "state" | "debug" | "event" | "packet" | "all").as(:oneline)
                    )
                )
            )
        ),
        "lacp" (
            c(
                "traceoptions" (
                    c(
                        "no-remote-trace",
                        "file" (
                            c(
                                "filename" arg,
                                "size" arg,
                                "files" arg,
                                "world-readable",
                                "no-world-readable",
                                "match" (
                                  regular_expression
                                )
                            )
                        ).as(:oneline),
                        "flag" ("configuration" | "routing-socket" | "process" | "startup" | "protocol" | "packet" | "ppm" | "mc-ae" | "all").as(:oneline)
                    )
                ),
                "ppm" arg
            )
        ),
        "oam" (
            c(
                "ethernet" (
                    c(
                        "link-fault-management" (
                            c(
                                "traceoptions" (
                                    c(
                                        "no-remote-trace",
                                        "file" (
                                            c(
                                                "filename" arg,
                                                "size" arg,
                                                "files" arg,
                                                "world-readable",
                                                "no-world-readable",
                                                "match" (
                                                  regular_expression
                                                )
                                            )
                                        ).as(:oneline),
                                        "flag" ("configuration" | "routing-socket" | "protocol" | "action-profile" | "all").as(:oneline)
                                    )
                                ),
                                "action-profile" arg (
                                    c(
                                        "event" (
                                            c(
                                                "link-adjacency-loss",
                                                "protocol-down",
                                                "link-event-rate" (
                                                    c(
                                                        "symbol-period" arg,
                                                        "frame-error" arg,
                                                        "frame-period" arg,
                                                        "frame-period-summary" arg
                                                    )
                                                )
                                            )
                                        ),
                                        "action" (
                                            c(
                                                "syslog",
                                                "link-down",
                                                "send-critical-event"
                                            )
                                        )
                                    )
                                ),
                                "interface" arg (
                                    c(
                                        "apply-action-profile" arg,
                                        "pdu-interval" arg,
                                        "link-discovery" arg,
                                        "pdu-threshold" arg,
                                        "remote-loopback",
                                        "negotiation-options" (
                                            c(
                                                "no-allow-link-events",
                                                "allow-remote-loopback"
                                            )
                                        ),
                                        "event-thresholds" (
                                            c(
                                                "symbol-period" arg,
                                                "frame-error" arg,
                                                "frame-period" arg,
                                                "frame-period-summary" arg
                                            )
                                        )
                                    )
                                )
                            )
                        ),
                        "connectivity-fault-management" (
                            c(
                                "performance-monitoring",
                                "connection-protection",
                                "traceoptions" (
                                  cfm_traceoptions
                                ),
                                "action-profile" arg (
                                    c(
                                        "event" (
                                            c(
                                                "adjacency-loss",
                                                "rdi",
                                                "connection-protection-tlv" arg
                                            )
                                        ),
                                        "action" (
                                            c(
                                                "interface-down",
                                                "propagate-remote-mac-flush"
                                            )
                                        ),
                                        "clear-action" (
                                            c(
                                                "interface-down" (
                                                    c(
                                                        "peer-interface"
                                                    )
                                                ).as(:oneline),
                                                "propagate-remote-mac-flush"
                                            )
                                        ),
                                        "default-actions" (
                                            c(
                                                "interface-down"
                                            )
                                        )
                                    )
                                ),
                                "policer" (
                                    c(
                                        "continuity-check" arg,
                                        "other" arg,
                                        "all" arg
                                    )
                                ),
                                "linktrace" (
                                    c(
                                        "path-database-size" arg,
                                        "age" arg
                                    )
                                ),
                                "maintenance-domain" ("default-0" | "default-1" | "default-2" | "default-3" | "default-4" | "default-5" | "default-6" | "default-7" | "md-name") (
                                    c(
                                        "bridge-domain" arg (
                                            c(
                                                "vlan-id" arg
                                            )
                                        ).as(:oneline),
                                        "virtual-switch" arg (
                                            c(
                                                "bridge-domain" arg (
                                                    c(
                                                        "vlan-id" arg
                                                    )
                                                ).as(:oneline)
                                            )
                                        ),
                                        "instance" arg.as(:oneline),
                                        "interface" arg.as(:oneline),
                                        "level" arg,
                                        "name-format" arg,
                                        "mip-half-function" arg,
                                        "maintenance-association" arg (
                                            c(
                                                "short-name-format" arg,
                                                "protect-maintenance-association".as(:oneline),
                                                "primary-vid" arg,
                                                "continuity-check" (
                                                    c(
                                                        "interval" arg,
                                                        "loss-threshold" arg,
                                                        "hold-interval" arg,
                                                        "port-status-tlv",
                                                        "interface-status-tlv",
                                                        "connection-protection-tlv",
                                                        "convey-loss-threshold"
                                                    )
                                                ),
                                                "mip-half-function" arg,
                                                "mep" arg (
                                                    c(
                                                        "interface" (
                                                            c(
                                                                "interface-name" (
                                                                  interface_unit
                                                                ),
                                                                "vlan" arg,
                                                                c(
                                                                  "working",
                                                                  "protect"
                                                                ),
                                                                "vlan-id" arg
                                                            )
                                                        ).as(:oneline),
                                                        "direction" arg,
                                                        "priority" arg,
                                                        "auto-discovery",
                                                        "remote-mep" arg (
                                                            c(
                                                                "action-profile" arg,
                                                                "sla-iterator-profile" arg (
                                                                    c(
                                                                        "iteration-count" arg,
                                                                        "priority" arg,
                                                                        "data-tlv-size" arg
                                                                    )
                                                                )
                                                            )
                                                        ),
                                                        "lowest-priority-defect" arg
                                                    )
                                                ),
                                                "policer" (
                                                    c(
                                                        "continuity-check" arg,
                                                        "other" arg,
                                                        "all" arg
                                                    )
                                                )
                                            )
                                        ),
                                        "vlan-name" arg
                                    )
                                ),
                                "esp-traceoptions" (
                                    c(
                                        "file" (
                                          esp_trace_file_type
                                        ),
                                        "flag" ("krt" | "error" | "esp" | "normal" | "task" | "lib" | "timer" | "interface" | "all") (
                                            c(
                                                "disable"
                                            )
                                        ).as(:oneline)
                                    )
                                )
                            )
                        ),
                        "evcs" arg (
                            c(
                                "evc-protocol" (
                                    c(
                                        c(
                                          "cfm" (
                                              c(
                                                  "maintenance-domain" arg,
                                                  "maintenance-association" arg
                                              )
                                          ).as(:oneline),
                                          "vpls" (
                                              c(
                                                  "routing-instance" arg
                                              )
                                          ).as(:oneline)
                                        )
                                    )
                                ).as(:oneline),
                                "remote-uni-count" arg,
                                "multipoint-to-multipoint"
                            )
                        ),
                        "lmi" (
                            c(
                                "traceoptions" (
                                    c(
                                        "no-remote-trace",
                                        "file" (
                                            c(
                                                "filename" arg,
                                                "size" arg,
                                                "files" arg,
                                                "world-readable",
                                                "no-world-readable",
                                                "match" (
                                                  regular_expression
                                                )
                                            )
                                        ).as(:oneline),
                                        "flag" ("configuration" | "routing-socket" | "protocol" | "init" | "error" | "packet" | "all").as(:oneline)
                                    )
                                ),
                                "status-counter" arg,
                                "polling-verification-timer" arg,
                                "interface" arg (
                                    c(
                                        "uni-id" arg,
                                        "status-counter" arg,
                                        "polling-verification-timer" arg,
                                        "evc-map-type" arg,
                                        "evc" arg (
                                            c(
                                                "default-evc",
                                                "vlan-list" arg
                                            )
                                        )
                                    )
                                )
                            )
                        )
                    )
                ),
                "gre-tunnel"
            )
        ),
        "ppp-service" (
            c(
                "traceoptions" (
                    c(
                        "no-remote-trace",
                        "file" (
                            c(
                                "filename" arg,
                                "size" arg,
                                "files" arg,
                                "world-readable",
                                "no-world-readable",
                                "match" (
                                  regular_expression
                                )
                            )
                        ).as(:oneline),
                        "level" arg,
                        "flag" ("accounting-statistics" | "authentication" | "chap" | "events" | "gres" | "init" | "interface-db" | "lcp" | "memory" | "ncp" | "packet-error" | "pap" | "parse" | "profile" | "receive-packets" | "routing-process" | "rtp" | "rtsock" | "session-db" | "smi-services-sentry" | "states" | "transmit-packets" | "tunnel" | "all").as(:oneline)
                    )
                )
            )
        ),
        "l2-learning" (
          juniper_protocols_bridge
        ),
        "ppp" (
            c(
                "traceoptions" (
                  ppp_traceoptions_type
                ),
                "monitor-session" (
                    s(
                      "session-name" (
                            ("all" | "name")
                      )
                    )
                )
            )
        ),
        "pppoe" (
            c(
                "traceoptions" (
                  pppoe_traceoptions_type
                ),
                "pado-advertise",
                "service-name-tables"
            )
        ),
        "r2cp" (
            c(
                c(
                  "disable"
                ),
                "traceoptions" (
                  r2cp_traceoptions_type
                ),
                "server-port" arg,
                "client-port" (
                    c(
                        c(
                          "port-number" arg,
                          c(
                            "any"
                          )
                        )
                    )
                ).as(:oneline),
                "node-terminate-count" arg,
                "node-terminate-interval" arg,
                "session-terminate-count" arg,
                "session-terminate-interval" arg,
                "radio" arg (
                    c(
                        "interface" (
                          interface_unit
                        ),
                        "virtual-channel-group" arg,
                        "radio-interface" arg
                    )
                )
            )
        ),
        "dcbx" (
          c(
            "disable",
            "interface" ("all" | arg) (
              c(
                "application-map" arg,
                "applications" (
                  "fcoe" (
                    "no-auto-negotiation"
                  )
                ),
                "disable",
                "priority-flow-control" (
                  "no-auto-negotiation"
                )
              )
            )
          )
        ),

        "lldp" (
            c(
                c(
                  "disable"
                ),
                "traceoptions" (
                    c(
                        "file" (
                          esp_trace_file_type
                        ),
                        "flag" ("all" | "configuration" | "rtsock" | "packet" | "interface" | "vlan" | "snmp" | "netbios") (
                            c(
                                "disable"
                            )
                        ).as(:oneline)
                    )
                ),
                "management-address" (
                  ipaddr
                ),
                "advertisement-interval" arg,
                "transmit-delay" arg,
                "hold-multiplier" arg,
                "ptopo-configuration-trap-interval" arg,
                "ptopo-configuration-maximum-hold-time" arg,
                "lldp-configuration-notification-interval" arg,
                "netbios-snooping",
                "interface" ("name" | "all") (
                    c(
                        c(
                          "disable"
                        )
                    )
                )
            )
        ),
        "lldp-med" (
            c(
                c(
                  "disable"
                ),
                "fast-start" arg,
                "interface" ("name" | "all") (
                    c(
                        c(
                          "disable"
                        ),
                        "location" (
                            c(
                                c(
                                  "civic-based" (
                                    civic_address_elements
                                  ),
                                  "elin" arg,
                                  "co-ordinate" (
                                    co_ordinate_elements
                                  )
                                )
                            )
                        )
                    )
                )
            )
        ),
        "dot1x" (
          juniper_protocols_dot1x
        ),
        "gvrp" (
            c(
                c(
                  "disable"
                ),
                "join-timer" arg,
                "leave-timer" arg,
                "leaveall-timer" arg,
                "interface" ("all" | "name") (
                    c(
                        c(
                          "disable"
                        )
                    )
                ),
                "traceoptions" (
                    c(
                        "file" (
                          esp_trace_file_type
                        ),
                        "flag" ("event" | "receive" | "transmit" | "eswd" | "error" | "state" | "all") (
                            c(
                                "disable"
                            )
                        ).as(:oneline)
                    )
                )
            )
        ),
        "mvrp" (
            c(
                c(
                  "disable"
                ),
                "no-dynamic-vlan",
                "add-attribute-length-in-pdu",
                "interface" ("all" | "name") (
                    c(
                        c(
                          "disable"
                        ),
                        "join-timer" arg,
                        "leave-timer" arg,
                        "leaveall-timer" arg,
                        "registration" arg
                    )
                ),
                "traceoptions" (
                    c(
                        "file" (
                          esp_trace_file_type
                        ),
                        "flag" ("eswd" | "event" | "receive" | "transmit" | "error" | "timer" | "all") (
                            c(
                                "disable"
                            )
                        ).as(:oneline)
                    )
                )
            )
        ),
        "protection-group" (
          juniper_protocols_protection_group
        ),
        "stp" (
          juniper_protocols_stp
        ),
        "rstp" (
          juniper_protocols_stp
        ),
        "mstp" (
          juniper_protocols_mstp
        ),
        "vstp" (
          juniper_protocols_vstp
        ),
        "edge-virtual-bridging",
        "igmp-snooping" (
          juniper_protocols_igmp_snooping
        ),
        "mld-snooping" (
          juniper_protocols_mld_snooping
        ),
        "layer2-control" (
          juniper_protocols_layer2_control
        ),
        "sflow" (
          juniper_protocols_sflow
        )
    )
end

rule(:admin_group_include_exclude) do
    c(
        c(
          "include-any" arg
        ),
        c(
          "include-all" arg
        ),
        c(
          "exclude" arg
        )
    )
end

rule(:bandwidth_type) do
    c(
        "per-traffic-class-bandwidth" arg,
        "ct0" arg,
        "ct1" arg,
        "ct2" arg,
        "ct3" arg
    )
end

rule(:civic_address_elements) do
    c(
        "what" arg,
        "country-code" arg,
        "ca-type" arg (
            c(
                "ca-value" arg
            )
        )
    )
end

rule(:co_ordinate_elements) do
    c(
        "longitude" arg,
        "lattitude" arg
    )
end

rule(:juniper_ospf_authentication) do
    c(
        c(
          "simple-password" (
            unreadable
          ),
          "md5" arg (
              c(
                  "key" (
                    unreadable
                  ),
                  "start-time" (
                    time
                  )
              )
          ).as(:oneline)
        )
    )
end

rule(:juniper_protocols_amt) do
    c(
        "traceoptions" (
            c(
                "file" (
                  trace_file_type
                ),
                "flag" ("packets" | "errors" | "tunnels" | "route" | "normal" | "general" | "state" | "policy" | "task" | "timer" | "all") (
                    c(
                        "send",
                        "receive",
                        "detail",
                        "disable"
                    )
                ).as(:oneline)
            )
        ),
        "relay" (
          juniper_protocols_amt_relay
        )
    )
end

rule(:juniper_protocols_amt_relay) do
    c(
        "family" (
            c(
                "inet" (
                    c(
                        "anycast-prefix" (
                          ipv4prefix
                        ),
                        "local-address" (
                          ipv4addr
                        )
                    )
                )
            )
        ),
        "secret-key-timeout" arg,
        "tunnel-limit" arg,
        "accounting"
    )
end

rule(:juniper_protocols_bd) do
    c(
        "mac-table-size" (
            c(
                "limit" arg,
                "packet-action" arg
            )
        ),
        "interface-mac-limit" (
            c(
                "limit" arg,
                "packet-action" arg
            )
        ),
        "mac-table-aging-time" arg,
        "no-mac-learning",
        "mac-statistics",
        "interface" arg (
            c(
                "interface-mac-limit" (
                    c(
                        "limit" arg,
                        "packet-action" arg
                    )
                ),
                "remote-site-id" arg,
                "static-mac" arg (
                    c(
                        "vlan-id" arg
                    )
                ),
                "no-mac-learning",
                "description" arg
            )
        )
    )
end

rule(:juniper_protocols_bgp) do
    c(
        c(
          "disable"
        ),
        "precision-timers",
        "no-precision-timers",
        "path-selection" (
            c(
                "cisco-non-deterministic",
                "always-compare-med",
                "med-plus-igp" (
                    c(
                        "med-multiplier" arg,
                        "igp-multiplier" arg
                    )
                ),
                "external-router-id",
                "as-path-ignore"
            )
        ),
        "traceoptions" (
            c(
                "file" (
                  trace_file_type
                ),
                "flag" ("damping" | "packets" | "open" | "update" | "keepalive" | "refresh" | "nsr-synchronization" | "bfd" | "4byte-as" | "add-path" | "graceful-restart" | "route" | "normal" | "general" | "state" | "policy" | "task" | "timer" | "all") (
                    c(
                        "send",
                        "receive",
                        "detail",
                        "disable",
                        "filter" (
                          bgp_filter_obj
                        )
                    )
                ).as(:oneline)
            )
        ),
        "description" arg,
        "metric-out" (
            c(
                c(
                  "metric-value" arg,
                  "minimum-igp" (
                      c(
                          "metric-offset" arg
                      )
                  ).as(:oneline),
                  "igp" (
                      c(
                          "metric-offset" arg,
                          "delay-med-update"
                      )
                  ).as(:oneline)
                )
            )
        ).as(:oneline),
        "multihop" (
            c(
                "ttl" arg,
                "no-nexthop-change"
            )
        ),
        "accept-remote-nexthop",
        "preference" arg,
        "local-preference" arg,
        "local-address" (
          ipaddr
        ),
        "local-interface" (
          interface_name
        ),
        "hold-time" arg,
        "passive",
        "advertise-inactive",
        "advertise-peer-as",
        "no-advertise-peer-as",
        "advertise-external" (
            c(
                "conditional"
            )
        ).as(:oneline),
        "keep" arg,
        "no-aggregator-id",
        "mtu-discovery",
        "out-delay" arg,
        "log-updown",
        "damping",
        "import" (
          policy_algebra
        ),
        "family" (
            c(
                "inet" (
                    c(
                        "unicast" (
                          bgp_afi_topo
                        ),
                        "multicast" (
                          bgp_afi_default
                        ),
                        "flow" (
                          bgp_afi_flow
                        ),
                        "any" (
                          bgp_afi_default
                        ),
                        "labeled-unicast" (
                          bgp_afi_labeled
                        )
                    )
                ),
                "inet-vpn" (
                    c(
                        "unicast" (
                          bgp_afi_vpn
                        ),
                        "multicast" (
                          bgp_afi_vpn
                        ),
                        "flow" (
                          bgp_afi_default
                        ),
                        "any" (
                          bgp_afi_vpn
                        )
                    )
                ),
                "inet6" (
                    c(
                        "unicast" (
                          bgp_afi_topo
                        ),
                        "multicast" (
                          bgp_afi_default
                        ),
                        "any" (
                          bgp_afi_default
                        ),
                        "labeled-unicast" (
                          bgp_afi_inet6_labeled
                        )
                    )
                ),
                "inet6-vpn" (
                    c(
                        "unicast" (
                          bgp_afi_vpn
                        ),
                        "multicast" (
                          bgp_afi_vpn
                        ),
                        "any" (
                          bgp_afi_vpn
                        )
                    )
                ),
                "iso-vpn" (
                    c(
                        "unicast" (
                          bgp_afi_vpn
                        )
                    )
                ),
                "l2vpn" (
                    c(
                        "auto-discovery-only" (
                          bgp_afi_default
                        ),
                        "signaling" (
                          bgp_afi_l2vpn
                        )
                    )
                ),
                "inet-mvpn" (
                    c(
                        "signaling" (
                          bgp_afi_default
                        )
                    )
                ),
                "inet6-mvpn" (
                    c(
                        "signaling" (
                          bgp_afi_default
                        )
                    )
                ),
                "inet-mdt" (
                    c(
                        "signaling" (
                          bgp_afi_default
                        )
                    )
                ),
                "route-target" (
                    c(
                        "prefix-limit" (
                          bgpaf_prefix_limit
                        ),
                        "accepted-prefix-limit" (
                          bgpaf_accepted_prefix_limit
                        ),
                        "external-paths" arg,
                        "advertise-default"
                    )
                ),
                "bridge-vpn",
                "fabric-vpn"
            )
        ),
        "authentication-key" arg,
        "authentication-algorithm" arg,
        "authentication-key-chain" arg,
        "export" (
          policy_algebra
        ),
        "vpn-apply-export",
        "remove-private" (
            c(
                "all" (
                    c(
                        "replace" (
                            c(
                                "nearest"
                            )
                        ).as(:oneline)
                    )
                ).as(:oneline)
            )
        ).as(:oneline),
        "cluster" (
          areaid
        ),
        "no-client-reflect",
        "peer-as" arg,
        "local-as" (
            c(
                "as-number" arg,
                "loops" arg,
                "private",
                "alias",
                "no-prepend-global-as"
            )
        ).as(:oneline),
        "ipsec-sa" arg,
        "unconfigured-peer-graceful-restart",
        "graceful-restart" (
            c(
                c(
                  "disable"
                ),
                "restart-time" arg,
                "stale-routes-time" arg
            )
        ),
        "include-mp-next-hop",
        "idle-after-switch-over" (
            c(
                c(
                  "forever",
                  "timeout" arg
                )
            )
        ).as(:oneline),
        "outbound-route-filter" (
            c(
                "bgp-orf-cisco-mode",
                "prefix-based" (
                    c(
                        "accept" (
                            c(
                                "inet",
                                "inet6"
                            )
                        )
                    )
                )
            )
        ),
        "tcp-mss" arg,
        "bfd-liveness-detection" (
            c(
                "version" arg,
                "minimum-interval" arg,
                "minimum-receive-interval" arg,
                "multiplier" arg,
                c(
                  "no-adaptation"
                ),
                "transmit-interval" (
                    c(
                        "minimum-interval" arg,
                        "threshold" arg
                    )
                ),
                "detection-time" (
                    c(
                        "threshold" arg
                    )
                ),
                "authentication" (
                    c(
                        "key-chain" arg,
                        "algorithm" arg,
                        "loose-check"
                    )
                ),
                "session-mode" arg,
                "holddown-interval" arg
            )
        ),
        "group" arg (
            c(
                "type" arg,
                "traceoptions" (
                    c(
                        "file" (
                          trace_file_type
                        ),
                        "flag" ("damping" | "packets" | "open" | "update" | "keepalive" | "refresh" | "nsr-synchronization" | "bfd" | "4byte-as" | "add-path" | "graceful-restart" | "route" | "normal" | "general" | "state" | "policy" | "task" | "timer" | "all") (
                            c(
                                "send",
                                "receive",
                                "detail",
                                "disable",
                                "filter" (
                                  bgp_filter_obj
                                )
                            )
                        ).as(:oneline)
                    )
                ),
                "description" arg,
                "metric-out" (
                    c(
                        c(
                          "metric-value" arg,
                          "minimum-igp" (
                              c(
                                  "metric-offset" arg
                              )
                          ).as(:oneline),
                          "igp" (
                              c(
                                  "metric-offset" arg,
                                  "delay-med-update"
                              )
                          ).as(:oneline)
                        )
                    )
                ).as(:oneline),
                "multihop" (
                    c(
                        "ttl" arg,
                        "no-nexthop-change"
                    )
                ),
                "accept-remote-nexthop",
                "preference" arg,
                "local-preference" arg,
                "local-address" (
                  ipaddr
                ),
                "local-interface" (
                  interface_name
                ),
                "hold-time" arg,
                "passive",
                "advertise-inactive",
                "advertise-peer-as",
                "no-advertise-peer-as",
                "advertise-external" (
                    c(
                        "conditional"
                    )
                ).as(:oneline),
                "keep" arg,
                "no-aggregator-id",
                "mtu-discovery",
                "out-delay" arg,
                "log-updown",
                "damping",
                "import" (
                  policy_algebra
                ),
                "family" (
                    c(
                        "inet" (
                            c(
                                "unicast" (
                                  bgp_afi_topo
                                ),
                                "multicast" (
                                  bgp_afi_default
                                ),
                                "flow" (
                                  bgp_afi_flow
                                ),
                                "any" (
                                  bgp_afi_default
                                ),
                                "labeled-unicast" (
                                  bgp_afi_labeled
                                )
                            )
                        ),
                        "inet-vpn" (
                            c(
                                "unicast" (
                                  bgp_afi_vpn
                                ),
                                "multicast" (
                                  bgp_afi_vpn
                                ),
                                "flow" (
                                  bgp_afi_default
                                ),
                                "any" (
                                  bgp_afi_vpn
                                )
                            )
                        ),
                        "inet6" (
                            c(
                                "unicast" (
                                  bgp_afi_topo
                                ),
                                "multicast" (
                                  bgp_afi_default
                                ),
                                "any" (
                                  bgp_afi_default
                                ),
                                "labeled-unicast" (
                                  bgp_afi_inet6_labeled
                                )
                            )
                        ),
                        "inet6-vpn" (
                            c(
                                "unicast" (
                                  bgp_afi_vpn
                                ),
                                "multicast" (
                                  bgp_afi_vpn
                                ),
                                "any" (
                                  bgp_afi_vpn
                                )
                            )
                        ),
                        "iso-vpn" (
                            c(
                                "unicast" (
                                  bgp_afi_vpn
                                )
                            )
                        ),
                        "l2vpn" (
                            c(
                                "auto-discovery-only" (
                                  bgp_afi_default
                                ),
                                "signaling" (
                                  bgp_afi_l2vpn
                                )
                            )
                        ),
                        "inet-mvpn" (
                            c(
                                "signaling" (
                                  bgp_afi_default
                                )
                            )
                        ),
                        "inet6-mvpn" (
                            c(
                                "signaling" (
                                  bgp_afi_default
                                )
                            )
                        ),
                        "inet-mdt" (
                            c(
                                "signaling" (
                                  bgp_afi_default
                                )
                            )
                        ),
                        "route-target" (
                            c(
                                "prefix-limit" (
                                  bgpaf_prefix_limit
                                ),
                                "accepted-prefix-limit" (
                                  bgpaf_accepted_prefix_limit
                                ),
                                "external-paths" arg,
                                "advertise-default"
                            )
                        ),
                        "bridge-vpn",
                        "fabric-vpn"
                    )
                ),
                "authentication-key" arg,
                "authentication-algorithm" arg,
                "authentication-key-chain" arg,
                "export" (
                  policy_algebra
                ),
                "vpn-apply-export",
                "remove-private" (
                    c(
                        "all" (
                            c(
                                "replace" (
                                    c(
                                        "nearest"
                                    )
                                ).as(:oneline)
                            )
                        ).as(:oneline)
                    )
                ).as(:oneline),
                "cluster" (
                  areaid
                ),
                "no-client-reflect",
                "peer-as" arg,
                "local-as" (
                    c(
                        "as-number" arg,
                        "loops" arg,
                        "private",
                        "alias",
                        "no-prepend-global-as"
                    )
                ).as(:oneline),
                "ipsec-sa" arg,
                "unconfigured-peer-graceful-restart",
                "graceful-restart" (
                    c(
                        c(
                          "disable"
                        ),
                        "restart-time" arg,
                        "stale-routes-time" arg
                    )
                ),
                "include-mp-next-hop",
                "idle-after-switch-over" (
                    c(
                        c(
                          "forever",
                          "timeout" arg
                        )
                    )
                ).as(:oneline),
                "outbound-route-filter" (
                    c(
                        "bgp-orf-cisco-mode",
                        "prefix-based" (
                            c(
                                "accept" (
                                    c(
                                        "inet",
                                        "inet6"
                                    )
                                )
                            )
                        )
                    )
                ),
                "tcp-mss" arg,
                "bfd-liveness-detection" (
                    c(
                        "version" arg,
                        "minimum-interval" arg,
                        "minimum-receive-interval" arg,
                        "multiplier" arg,
                        c(
                          "no-adaptation"
                        ),
                        "transmit-interval" (
                            c(
                                "minimum-interval" arg,
                                "threshold" arg
                            )
                        ),
                        "detection-time" (
                            c(
                                "threshold" arg
                            )
                        ),
                        "authentication" (
                            c(
                                "key-chain" arg,
                                "algorithm" arg,
                                "loose-check"
                            )
                        ),
                        "session-mode" arg,
                        "holddown-interval" arg
                    )
                ),
                "multipath" (
                    c(
                        "multiple-as"
                    )
                ).as(:oneline),
                "as-override",
                "allow" (
                  ipprefix
                ),
                "mvpn-iana-rt-import",
                "neighbor" arg (
                    c(
                        "traceoptions" (
                            c(
                                "file" (
                                  trace_file_type
                                ),
                                "flag" ("damping" | "packets" | "open" | "update" | "keepalive" | "refresh" | "nsr-synchronization" | "bfd" | "4byte-as" | "add-path" | "graceful-restart" | "route" | "normal" | "general" | "state" | "policy" | "task" | "timer" | "all") (
                                    c(
                                        "send",
                                        "receive",
                                        "detail",
                                        "disable",
                                        "filter" (
                                          bgp_filter_obj
                                        )
                                    )
                                ).as(:oneline)
                            )
                        ),
                        "description" arg,
                        "metric-out" (
                            c(
                                c(
                                  "metric-value" arg,
                                  "minimum-igp" (
                                      c(
                                          "metric-offset" arg
                                      )
                                  ).as(:oneline),
                                  "igp" (
                                      c(
                                          "metric-offset" arg,
                                          "delay-med-update"
                                      )
                                  ).as(:oneline)
                                )
                            )
                        ).as(:oneline),
                        "multihop" (
                            c(
                                "ttl" arg,
                                "no-nexthop-change"
                            )
                        ),
                        "accept-remote-nexthop",
                        "preference" arg,
                        "local-preference" arg,
                        "local-address" (
                          ipaddr
                        ),
                        "local-interface" (
                          interface_name
                        ),
                        "hold-time" arg,
                        "passive",
                        "advertise-inactive",
                        "advertise-peer-as",
                        "no-advertise-peer-as",
                        "advertise-external" (
                            c(
                                "conditional"
                            )
                        ).as(:oneline),
                        "keep" arg,
                        "no-aggregator-id",
                        "mtu-discovery",
                        "out-delay" arg,
                        "log-updown",
                        "damping",
                        "import" (
                          policy_algebra
                        ),
                        "family" (
                            c(
                                "inet" (
                                    c(
                                        "unicast" (
                                          bgp_afi_topo
                                        ),
                                        "multicast" (
                                          bgp_afi_default
                                        ),
                                        "flow" (
                                          bgp_afi_flow
                                        ),
                                        "any" (
                                          bgp_afi_default
                                        ),
                                        "labeled-unicast" (
                                          bgp_afi_labeled
                                        )
                                    )
                                ),
                                "inet-vpn" (
                                    c(
                                        "unicast" (
                                          bgp_afi_vpn
                                        ),
                                        "multicast" (
                                          bgp_afi_vpn
                                        ),
                                        "flow" (
                                          bgp_afi_default
                                        ),
                                        "any" (
                                          bgp_afi_vpn
                                        )
                                    )
                                ),
                                "inet6" (
                                    c(
                                        "unicast" (
                                          bgp_afi_topo
                                        ),
                                        "multicast" (
                                          bgp_afi_default
                                        ),
                                        "any" (
                                          bgp_afi_default
                                        ),
                                        "labeled-unicast" (
                                          bgp_afi_inet6_labeled
                                        )
                                    )
                                ),
                                "inet6-vpn" (
                                    c(
                                        "unicast" (
                                          bgp_afi_vpn
                                        ),
                                        "multicast" (
                                          bgp_afi_vpn
                                        ),
                                        "any" (
                                          bgp_afi_vpn
                                        )
                                    )
                                ),
                                "iso-vpn" (
                                    c(
                                        "unicast" (
                                          bgp_afi_vpn
                                        )
                                    )
                                ),
                                "l2vpn" (
                                    c(
                                        "auto-discovery-only" (
                                          bgp_afi_default
                                        ),
                                        "signaling" (
                                          bgp_afi_l2vpn
                                        )
                                    )
                                ),
                                "inet-mvpn" (
                                    c(
                                        "signaling" (
                                          bgp_afi_default
                                        )
                                    )
                                ),
                                "inet6-mvpn" (
                                    c(
                                        "signaling" (
                                          bgp_afi_default
                                        )
                                    )
                                ),
                                "inet-mdt" (
                                    c(
                                        "signaling" (
                                          bgp_afi_default
                                        )
                                    )
                                ),
                                "route-target" (
                                    c(
                                        "prefix-limit" (
                                          bgpaf_prefix_limit
                                        ),
                                        "accepted-prefix-limit" (
                                          bgpaf_accepted_prefix_limit
                                        ),
                                        "external-paths" arg,
                                        "advertise-default"
                                    )
                                ),
                                "bridge-vpn",
                                "fabric-vpn"
                            )
                        ),
                        "authentication-key" arg,
                        "authentication-algorithm" arg,
                        "authentication-key-chain" arg,
                        "export" (
                          policy_algebra
                        ),
                        "vpn-apply-export",
                        "remove-private" (
                            c(
                                "all" (
                                    c(
                                        "replace" (
                                            c(
                                                "nearest"
                                            )
                                        ).as(:oneline)
                                    )
                                ).as(:oneline)
                            )
                        ).as(:oneline),
                        "cluster" (
                          areaid
                        ),
                        "no-client-reflect",
                        "peer-as" arg,
                        "local-as" (
                            c(
                                "as-number" arg,
                                "loops" arg,
                                "private",
                                "alias",
                                "no-prepend-global-as"
                            )
                        ).as(:oneline),
                        "ipsec-sa" arg,
                        "unconfigured-peer-graceful-restart",
                        "graceful-restart" (
                            c(
                                c(
                                  "disable"
                                ),
                                "restart-time" arg,
                                "stale-routes-time" arg
                            )
                        ),
                        "include-mp-next-hop",
                        "idle-after-switch-over" (
                            c(
                                c(
                                  "forever",
                                  "timeout" arg
                                )
                            )
                        ).as(:oneline),
                        "outbound-route-filter" (
                            c(
                                "bgp-orf-cisco-mode",
                                "prefix-based" (
                                    c(
                                        "accept" (
                                            c(
                                                "inet",
                                                "inet6"
                                            )
                                        )
                                    )
                                )
                            )
                        ),
                        "tcp-mss" arg,
                        "bfd-liveness-detection" (
                            c(
                                "version" arg,
                                "minimum-interval" arg,
                                "minimum-receive-interval" arg,
                                "multiplier" arg,
                                c(
                                  "no-adaptation"
                                ),
                                "transmit-interval" (
                                    c(
                                        "minimum-interval" arg,
                                        "threshold" arg
                                    )
                                ),
                                "detection-time" (
                                    c(
                                        "threshold" arg
                                    )
                                ),
                                "authentication" (
                                    c(
                                        "key-chain" arg,
                                        "algorithm" arg,
                                        "loose-check"
                                    )
                                ),
                                "session-mode" arg,
                                "holddown-interval" arg
                            )
                        ),
                        "multipath" (
                            c(
                                "multiple-as"
                            )
                        ).as(:oneline),
                        "as-override"
                    )
                )
            )
        ),
        "drop-path-attributes" arg
    )
end

rule(:juniper_protocols_bfd) do
  "traceoptions" (
    c(
      "file" (
        trace_file_type
      ),
      "flag" ("adjacency" | "all" | "error" | "event" | "issu" | "nsr-packet" | "nsr-synchronization" | "packet" | "pipe" | "pipe-detail" | "ppm-packet" | "state" | "timer") (
        "disable"
      )
    )
  )
end

rule(:bgp_afi_default) do
    c(
        "prefix-limit" (
          bgpaf_prefix_limit
        ),
        "accepted-prefix-limit" (
          bgpaf_accepted_prefix_limit
        ),
        "rib-group" (
          rib_group_inet_type
        ),
        "add-path" (
          apath_options
        ),
        "aigp" (
          bgpaf_aigp_options
        ),
        "loops" (
          bgpaf_loops
        ).as(:oneline)
    )
end

rule(:apath_options) do
    c(
        "receive",
        "send" (
            c(
                "prefix-policy" (
                  policy_algebra
                ),
                "path-count" arg
            )
        )
    )
end

rule(:bgp_afi_flow) do
    c(
        "prefix-limit" (
          bgpaf_prefix_limit
        ),
        "accepted-prefix-limit" (
          bgpaf_accepted_prefix_limit
        ),
        "rib-group" (
          rib_group_inet_type
        ),
        "add-path" (
          apath_options
        ),
        "aigp" (
          bgpaf_aigp_options
        ),
        "loops" (
          bgpaf_loops
        ).as(:oneline),
        "no-validate" (
          policy_algebra
        )
    )
end

rule(:bgp_afi_inet6_labeled) do
    c(
        "prefix-limit" (
          bgpaf_prefix_limit
        ),
        "accepted-prefix-limit" (
          bgpaf_accepted_prefix_limit
        ),
        "rib-group" (
          rib_group_inet_type
        ),
        "add-path" (
          apath_options
        ),
        "aigp" (
          bgpaf_aigp_options
        ),
        "loops" (
          bgpaf_loops
        ).as(:oneline),
        "aggregate-label" (
            c(
                "community" arg
            )
        ),
        "per-group-label",
        "traffic-statistics" (
          bgpaf_traffic_statistics
        ),
        "explicit-null".as(:oneline)
    )
end

rule(:bgp_afi_l2vpn) do
    c(
        "prefix-limit" (
          bgpaf_prefix_limit
        ),
        "accepted-prefix-limit" (
          bgpaf_accepted_prefix_limit
        ),
        "rib-group" (
          rib_group_inet_type
        ),
        "add-path" (
          apath_options
        ),
        "aigp" (
          bgpaf_aigp_options
        ),
        "loops" (
          bgpaf_loops
        ).as(:oneline)
    )
end

rule(:bgp_afi_labeled) do
    c(
        "prefix-limit" (
          bgpaf_prefix_limit
        ),
        "accepted-prefix-limit" (
          bgpaf_accepted_prefix_limit
        ),
        "rib-group" (
          rib_group_inet_type
        ),
        "add-path" (
          apath_options
        ),
        "aigp" (
          bgpaf_aigp_options
        ),
        "loops" (
          bgpaf_loops
        ).as(:oneline),
        "aggregate-label" (
            c(
                "community" arg
            )
        ),
        "per-group-label",
        "traffic-statistics" (
          bgpaf_traffic_statistics
        ),
        "rib" (
            c(
                "inet.3"
            )
        ),
        "explicit-null" (
            c(
                "connected-only"
            )
        ).as(:oneline),
        "resolve-vpn"
    )
end

rule(:bgp_afi_topo) do
    c(
        "prefix-limit" (
          bgpaf_prefix_limit
        ),
        "accepted-prefix-limit" (
          bgpaf_accepted_prefix_limit
        ),
        "rib-group" (
          rib_group_inet_type
        ),
        "add-path" (
          apath_options
        ),
        "aigp" (
          bgpaf_aigp_options
        ),
        "loops" (
          bgpaf_loops
        ).as(:oneline),
        "topology" arg (
            c(
                "community" arg
            )
        )
    )
end

rule(:bgp_afi_vpn) do
    c(
        "prefix-limit" (
          bgpaf_prefix_limit
        ),
        "accepted-prefix-limit" (
          bgpaf_accepted_prefix_limit
        ),
        "rib-group" (
          rib_group_inet_type
        ),
        "add-path" (
          apath_options
        ),
        "aigp" (
          bgpaf_aigp_options
        ),
        "loops" (
          bgpaf_loops
        ).as(:oneline),
        "aggregate-label" (
            c(
                "community" arg
            )
        )
    )
end

rule(:bgp_filter_obj) do
    c(
        "match-on" arg,
        "policy" (
          policy_algebra
        )
    ).as(:oneline)
end

rule(:bgpaf_accepted_prefix_limit) do
    c(
        "maximum" arg,
        "teardown" (
            c(
                "limit-threshold" arg,
                "idle-timeout" (
                    c(
                        c(
                          "forever",
                          "timeout" arg
                        )
                    )
                ).as(:oneline)
            )
        ).as(:oneline)
    )
end

rule(:bgpaf_aigp_options) do
    c(
        "disable"
    )
end

rule(:bgpaf_loops) do
    c(
        "loops" arg
    ).as(:oneline)
end

rule(:bgpaf_prefix_limit) do
    c(
        "maximum" arg,
        "teardown" (
            c(
                "limit-threshold" arg,
                "idle-timeout" (
                    c(
                        c(
                          "forever",
                          "timeout" arg
                        )
                    )
                ).as(:oneline)
            )
        ).as(:oneline)
    )
end

rule(:bgpaf_traffic_statistics) do
    c(
        "file" (
          trace_file_type
        ),
        "interval" arg
    )
end

rule(:juniper_protocols_bridge) do
    c(
        "global-mac-table-aging-time" arg,
        "global-le-aging-time" arg,
        "global-le-bridge-domain-aging-time" arg,
        "global-mac-limit" (
            c(
                "mac-limit" arg,
                "packet-action" arg
            )
        ),
        "global-mac-statistics",
        "global-no-mac-learning"
    )
end

rule(:juniper_protocols_dot1x) do
    c(
        "traceoptions" (
            c(
                "file" (
                  esp_trace_file_type
                ),
                "flag" ("dot1x-debug" | "parse" | "esw-if" | "eapol" | "config-internal" | "normal" | "general" | "state" | "task" | "timer" | "vlan" | "all") (
                    c(
                        "disable"
                    )
                ).as(:oneline)
            )
        ),
        "authenticator" (
            c(
                "authentication-profile-name" arg,
                "no-mac-table-binding",
                "static" arg (
                    c(
                        "vlan-assignment" arg,
                        "interface" (
                          interface_name
                        )
                    )
                ),
                "interface" ("all" | "name") (
                    c(
                        "disable",
                        "supplicant" arg,
                        "retries" arg,
                        "quiet-period" arg,
                        "transmit-period" arg,
                        "mac-radius" (
                            c(
                                "restrict",
                                "flap-on-disconnect"
                            )
                        ),
                        c(
                          "no-reauthentication",
                          "reauthentication" arg
                        ),
                        "supplicant-timeout" arg,
                        "server-timeout" arg,
                        "maximum-requests" arg,
                        "guest-vlan" arg,
                        "server-reject-vlan" (
                            c(
                                "vlan-name" arg,
                                "block-interval" arg,
                                "eapol-block"
                            )
                        ).as(:oneline),
                        "lldp-med-bypass",
                        "server-fail" (
                            c(
                                c(
                                  "deny",
                                  "permit",
                                  "vlan-name" arg,
                                  "use-cache"
                                )
                            )
                        ).as(:oneline)
                    )
                )
            )
        )
    )
end

rule(:juniper_protocols_esis) do
    c(
        c(
          "disable"
        ),
        "traceoptions" (
            c(
                "file" (
                  trace_file_type
                ),
                "flag" ("error" | "esh" | "ish" | "graceful-restart" | "route" | "normal" | "general" | "state" | "policy" | "task" | "timer" | "all") (
                    c(
                        "send",
                        "receive",
                        "detail",
                        "disable"
                    )
                ).as(:oneline)
            )
        ),
        "preference" arg,
        "graceful-restart" (
            c(
                c(
                  "disable"
                ),
                "restart-duration" arg
            )
        ).as(:oneline),
        "interface" arg (
            c(
                "hold-time" arg,
                "end-system-configuration-timer" arg,
                c(
                  "disable"
                )
            )
        )
    )
end

rule(:juniper_protocols_igmp_snooping) do
    c(
        "traceoptions" (
            c(
                "file" (
                  esp_trace_file_type
                ),
                "flag" ("packets" | "query" | "report" | "leave" | "vlan" | "nexthop" | "krt" | "route" | "normal" | "general" | "state" | "policy" | "task" | "timer" | "all") (
                    c(
                        "send",
                        "receive",
                        "detail",
                        "disable"
                    )
                ).as(:oneline)
            )
        ),
        "vlan" ("all" | "vlan-name") (
            c(
                "disable",
                "version" arg,
                "query-interval" arg,
                "query-last-member-interval" arg,
                "query-response-interval" arg,
                "robust-count" arg,
                "immediate-leave",
                "no-default-flooding",
                "proxy" (
                    c(
                        "source-address" (
                          ipv4addr
                        )
                    )
                ),
                "data-forwarding" (
                    c(
                        c(
                          "source" (
                              c(
                                  "groups" (
                                    ipv4prefix
                                  )
                              )
                          ),
                          "receiver" (
                              c(
                                  "source-vlans" arg,
                                  "install"
                              )
                          )
                        )
                    )
                ),
                "interface" ("all" | "interface-name") (
                    c(
                        "static" (
                            c(
                                "group" arg
                            )
                        ),
                        "multicast-router-interface"
                    )
                )
            )
        )
    )
end

rule(:juniper_protocols_isis) do
    c(
        c(
          "disable"
        ),
        "traceoptions" (
            c(
                "file" (
                  trace_file_type
                ),
                "flag" ("error" | "spf" | "packets" | "hello" | "lsp" | "psn" | "csn" | "lsp-generation" | "graceful-restart" | "ldp-synchronization" | "nsr-synchronization" | "route" | "normal" | "general" | "state" | "policy" | "task" | "timer" | "all") (
                    c(
                        "send",
                        "receive",
                        "detail",
                        "disable"
                    )
                ).as(:oneline)
            )
        ),
        "export" (
          policy_algebra
        ),
        "reference-bandwidth" arg,
        "lsp-lifetime" arg,
        "loose-authentication-check",
        "max-areas" arg,
        "no-authentication-check",
        "no-ipv4-routing",
        "no-ipv6-routing",
        "clns-routing",
        "no-adjacency-holddown",
        "ignore-attached-bit",
        "rib-group" (
          rib_group_type
        ),
        "spf-options" (
            c(
                "delay" arg,
                "holddown" arg,
                "rapid-runs" arg
            )
        ),
        "topologies" (
            c(
                "ipv4-multicast",
                "ipv6-unicast",
                "ipv6-multicast"
            )
        ),
        "overload" (
            c(
                "timeout" arg,
                "advertise-high-metrics",
                "allow-route-leaking"
            )
        ),
        "traffic-engineering" (
            c(
                c(
                  "disable"
                ),
                "credibility-protocol-preference",
                "ignore-lsp-metrics",
                "family" ("inet" | "inet6") (
                    c(
                        "shortcuts" (
                            c(
                                "multicast-rpf-routes"
                            )
                        )
                    )
                ),
                "multipath" (
                    c(
                        "lsp-equal-cost"
                    )
                )
            )
        ),
        "graceful-restart" (
            c(
                c(
                  "disable"
                ),
                "helper-disable",
                "restart-duration" arg
            )
        ).as(:oneline),
        "level" arg (
            c(
                c(
                  "disable"
                ),
                "authentication-key" (
                  unreadable
                ),
                "authentication-type" arg,
                "no-hello-authentication",
                "no-csnp-authentication",
                "no-psnp-authentication",
                "authentication-key-chain" arg,
                "wide-metrics-only",
                "preference" arg,
                "external-preference" arg,
                "prefix-export-limit" arg
            )
        ),
        "interface" arg (
            c(
                c(
                  "disable"
                ),
                "hello-padding-type" arg,
                "ldp-synchronization" (
                  ldp_sync_obj
                ),
                "lsp-interval" arg,
                "csnp-interval" (
                    c(
                        c(
                          "csnp-interval-number" arg,
                          "disable"
                        )
                    )
                ).as(:oneline),
                "mesh-group" (
                    c(
                        c(
                          "mesh-group-number" arg,
                          "blocked"
                        )
                    )
                ).as(:oneline),
                "point-to-point",
                c(
                  "link-protection",
                  "node-link-protection"
                ),
                "no-eligible-backup",
                "passive",
                "checksum",
                "no-unicast-topology",
                "no-ipv4-multicast",
                "no-ipv6-unicast",
                "no-ipv6-multicast",
                "no-adjacency-down-notification",
                "bfd-liveness-detection" (
                    c(
                        "version" arg,
                        "minimum-interval" arg,
                        "minimum-receive-interval" arg,
                        "multiplier" arg,
                        c(
                          "no-adaptation"
                        ),
                        "transmit-interval" (
                            c(
                                "minimum-interval" arg,
                                "threshold" arg
                            )
                        ),
                        "detection-time" (
                            c(
                                "threshold" arg
                            )
                        ),
                        "authentication" (
                            c(
                                "key-chain" arg,
                                "algorithm" arg,
                                "loose-check"
                            )
                        )
                    )
                ),
                "level" arg (
                    c(
                        c(
                          "disable"
                        ),
                        "metric" arg,
                        "ipv4-multicast-metric" arg,
                        "ipv6-unicast-metric" arg,
                        "ipv6-multicast-metric" arg,
                        "te-metric" arg,
                        "hello-authentication-key" (
                          unreadable
                        ),
                        "hello-authentication-type" arg,
                        "hello-authentication-key-chain" arg,
                        "hello-interval" arg,
                        "hold-time" arg,
                        "priority" arg,
                        "passive"
                    )
                )
            )
        ),
        "label-switched-path" arg (
            c(
                "level" arg (
                    c(
                        c(
                          "disable"
                        ),
                        "metric" arg
                    )
                )
            )
        ),
        "context-identifier" arg (
            c(
                "level" arg (
                    c(
                        c(
                          "disable"
                        )
                    )
                )
            )
        )
    )
end

rule(:juniper_protocols_ldp) do
    c(
        "traceoptions" (
            c(
                "file" (
                  trace_file_type
                ),
                "flag" ("error" | "event" | "packets" | "periodic" | "initialization" | "notification" | "address" | "label" | "binding" | "path" | "ppmd" | "nsr-synchronization" | "route" | "normal" | "general" | "state" | "policy" | "task" | "timer" | "all") (
                    c(
                        "send",
                        "receive",
                        "detail",
                        "disable",
                        "filter" (
                          ldp_filter_obj
                        )
                    )
                ).as(:oneline)
            )
        ),
        "traffic-statistics" (
            c(
                "file" (
                  trace_file_type
                ),
                "interval" arg,
                "no-penultimate-hop"
            )
        ),
        "graceful-restart" (
            c(
                c(
                  "disable"
                ),
                "helper-disable",
                "recovery-time" arg,
                "maximum-neighbor-recovery-time" arg,
                "reconnect-time" arg,
                "maximum-neighbor-reconnect-time" arg
            )
        ),
        "preference" arg,
        "no-forwarding",
        "l2-smart-policy",
        "track-igp-metric",
        "strict-targeted-hellos",
        "import" (
          policy_algebra
        ),
        "export" (
          policy_algebra
        ),
        "egress-policy" (
          policy_algebra
        ),
        "next-hop" (
            c(
                "merged" (
                    c(
                        "policy" (
                          policy_algebra
                        )
                    )
                )
            )
        ),
        "deaggregate",
        "no-deaggregate",
        "explicit-null",
        "label-withdrawal-delay" arg,
        "transport-address" (
            c(
                c(
                  "router-id",
                  "interface",
                  "address" (
                    ipaddr
                  )
                )
            )
        ).as(:oneline),
        "keepalive-interval" arg,
        "keepalive-timeout" arg,
        "interface" arg (
            c(
                c(
                  "disable"
                ),
                "hello-interval" arg,
                "hold-time" arg,
                "transport-address" arg,
                "allow-subnet-mismatch",
                "no-allow-subnet-mismatch"
            )
        ),
        "session" arg (
            c(
                "authentication-key" arg,
                "authentication-algorithm" arg,
                "authentication-key-chain" arg
            )
        ),
        "session-protection" (
            c(
                "timeout" arg
            )
        ).as(:oneline),
        "igp-synchronization" (
            c(
                "holddown-interval" arg
            )
        ),
        "log-updown" (
            c(
                "trap" (
                    c(
                        c(
                          "disable"
                        )
                    )
                ).as(:oneline)
            )
        ),
        "policing" (
            c(
                "fec" arg (
                    c(
                        "ingress-traffic" arg,
                        "transit-traffic" arg
                    )
                )
            )
        ),
        "oam" (
            c(
                "ingress-policy" (
                  policy_algebra
                ),
                "fec" arg (
                    c(
                        c(
                          "bfd-liveness-detection" (
                              c(
                                  "version" arg,
                                  "minimum-interval" arg,
                                  "minimum-receive-interval" arg,
                                  "multiplier" arg,
                                  c(
                                    "no-adaptation"
                                  ),
                                  "transmit-interval" (
                                      c(
                                          "minimum-interval" arg,
                                          "threshold" arg
                                      )
                                  ),
                                  "detection-time" (
                                      c(
                                          "threshold" arg
                                      )
                                  ),
                                  "ecmp",
                                  "failure-action" (
                                      c(
                                          c(
                                            "remove-route",
                                            "remove-nexthop"
                                          )
                                      )
                                  ).as(:oneline),
                                  "holddown-interval" arg
                              )
                          ),
                          "no-bfd-liveness-detection"
                        ),
                        "periodic-traceroute" (
                            c(
                                "frequency" arg,
                                "ttl" arg,
                                "retries" arg,
                                "wait" arg,
                                "paths" arg,
                                "source" (
                                  ipv4addr
                                ),
                                "exp" arg,
                                "fanout" arg,
                                "disable"
                            )
                        )
                    )
                ),
                "bfd-liveness-detection" (
                    c(
                        "version" arg,
                        "minimum-interval" arg,
                        "minimum-receive-interval" arg,
                        "multiplier" arg,
                        c(
                          "no-adaptation"
                        ),
                        "transmit-interval" (
                            c(
                                "minimum-interval" arg,
                                "threshold" arg
                            )
                        ),
                        "detection-time" (
                            c(
                                "threshold" arg
                            )
                        ),
                        "ecmp",
                        "failure-action" (
                            c(
                                c(
                                  "remove-route",
                                  "remove-nexthop"
                                )
                            )
                        ).as(:oneline),
                        "holddown-interval" arg
                    )
                ),
                "periodic-traceroute" (
                    c(
                        "frequency" arg,
                        "ttl" arg,
                        "retries" arg,
                        "wait" arg,
                        "paths" arg,
                        "source" (
                          ipv4addr
                        ),
                        "exp" arg,
                        "fanout" arg
                    )
                ),
                "lsp-ping-interval" arg
            )
        ),
        "targeted-hello" (
            c(
                "hello-interval" arg,
                "hold-time" arg
            )
        ),
        "p2mp",
        "upstream-label-assignment"
    )
end

rule(:juniper_protocols_lmp) do
    c(
        "te-link" arg (
            c(
                "local-address" (
                  ipaddr
                ),
                "remote-address" (
                  ipaddr
                ),
                "remote-id" arg,
                "te-metric" arg,
                c(
                  "disable"
                ),
                c(
                  "interface" arg (
                      c(
                          "local-address" (
                            ipaddr
                          ),
                          "remote-address" (
                            ipaddr
                          ),
                          "remote-id" arg,
                          c(
                            "disable"
                          )
                      )
                  ),
                  "label-switched-path" arg (
                      c(
                          "local-address" (
                            ipaddr
                          ),
                          "remote-address" (
                            ipaddr
                          ),
                          "remote-id" arg,
                          c(
                            "disable"
                          )
                      )
                  )
                )
            )
        ),
        "peer" arg (
            c(
                "address" (
                  ipaddr
                ),
                "lmp-protocol" (
                    c(
                        "hello-interval" arg,
                        "hello-dead-interval" arg,
                        "retransmission-interval" arg,
                        "retry-limit" arg,
                        "passive"
                    )
                ),
                "control-channel" (
                  interface_name
                ),
                "lmp-control-channel" (
                  lmp_control_channel_type
                ),
                "te-link" arg
            )
        ),
        "traceoptions" (
            c(
                "file" (
                  trace_file_type
                ),
                "flag" ("init" | "show" | "route-socket" | "parse" | "process" | "server" | "routing" | "packets" | "hello-packets" | "state" | "all").as(:oneline)
            )
        )
    )
end

rule(:juniper_protocols_mld_snooping) do
    c(
        "traceoptions" (
            c(
                "file" (
                  esp_trace_file_type
                ),
                "flag" ("packets" | "query" | "report" | "leave" | "vlan" | "nexthop" | "krt" | "route" | "normal" | "general" | "state" | "policy" | "task" | "timer" | "all") (
                    c(
                        "send",
                        "receive",
                        "detail",
                        "disable"
                    )
                ).as(:oneline)
            )
        ),
        "vlan" ("all" | "vlan-name") (
            c(
                "disable",
                "version" arg,
                "query-interval" arg,
                "query-last-member-interval" arg,
                "query-response-interval" arg,
                "robust-count" arg,
                "immediate-leave",
                "interface" ("all" | "interface-name") (
                    c(
                        "static" (
                            c(
                                "group" arg
                            )
                        ),
                        "multicast-router-interface"
                    )
                )
            )
        )
    )
end

rule(:juniper_protocols_layer2_control) do
  c(
    "bpdu-block" (
      c(
        "disable-timeout" arg,
        "interface" any
      )
    ),
    "mac-rewrite" (
      "interface" arg (
        c(
          "enable-all-ifl",
          "protocol" (
            c(
              "cdp",
              "stp",
              "vtp",
              "pvstp"
            )
          )
        )
      )
    ),
    "nonstop-bridging",
    "traceoptions" (
      c(
        "file" (
          c(
            "filename" arg,
            "size" arg,
            "files" arg,
            "world-readable",
            "no-world-readable",
            "match" (
              regular_expression
            )
          )
        ).as(:oneline),
        "flag" ("all" | "kernel" | "change-events" | "kernel-detail" | "config-states" | "resource-usage" | "gres-events" | "select-events") (
          c(
            "disable"
          )
        ).as(:oneline)
      )
    )
  )
end

rule(:juniper_protocols_mobile_ipv4) do
    c(
        "traceoptions" (
          mip_trace_options_type
        ),
        "authenticate" (
            c(
                "order" arg
            )
        ),
        "home-agent" (
          mip_home_agent_type
        ),
        "peer" (
          mip_peer_type
        ),
        "access-type" (
          mip_access_type
        ),
        "dynamic-home-assignment" (
          dynamic_home_assignment_type
        )
    )
end

rule(:dynamic_home_assignment_type) do
    c(
        "home-agent" (
            c(
                "nai" arg (
                    c(
                        "home-agent" (
                          ipv4addr
                        )
                    )
                )
            )
        )
    )
end

rule(:juniper_protocols_msdp) do
    c(
        "data-encapsulation" arg,
        "rib-group" (
          rib_group_inet_type
        ),
        "active-source-limit" (
            c(
                "maximum" arg,
                "threshold" arg
            )
        ),
        c(
          "disable"
        ),
        "export" (
          policy_algebra
        ),
        "import" (
          policy_algebra
        ),
        "local-address" (
          ipv4addr
        ),
        "traceoptions" (
            c(
                "file" (
                  trace_file_type
                ),
                "flag" ("packets" | "route" | "nsr-synchronization" | "source-active" | "source-active-request" | "source-active-response" | "keepalive" | "normal" | "general" | "state" | "policy" | "task" | "timer" | "all") (
                    c(
                        "send",
                        "receive",
                        "detail",
                        "disable"
                    )
                ).as(:oneline)
            )
        ),
        "peer" arg (
            c(
                c(
                  "disable"
                ),
                "export" (
                  policy_algebra
                ),
                "import" (
                  policy_algebra
                ),
                "local-address" (
                  ipv4addr
                ),
                "traceoptions" (
                    c(
                        "file" (
                          trace_file_type
                        ),
                        "flag" ("packets" | "route" | "nsr-synchronization" | "source-active" | "source-active-request" | "source-active-response" | "keepalive" | "normal" | "general" | "state" | "policy" | "task" | "timer" | "all") (
                            c(
                                "send",
                                "receive",
                                "detail",
                                "disable"
                            )
                        ).as(:oneline)
                    )
                ),
                "active-source-limit" (
                    c(
                        "maximum" arg,
                        "threshold" arg
                    )
                ),
                "default-peer",
                "authentication-key" arg
            )
        ),
        "source" arg (
            c(
                "active-source-limit" (
                    c(
                        "maximum" arg,
                        "threshold" arg
                    )
                )
            )
        ),
        "group" arg (
            c(
                "mode" arg,
                c(
                  "disable"
                ),
                "export" (
                  policy_algebra
                ),
                "import" (
                  policy_algebra
                ),
                "local-address" (
                  ipv4addr
                ),
                "traceoptions" (
                    c(
                        "file" (
                          trace_file_type
                        ),
                        "flag" ("packets" | "route" | "nsr-synchronization" | "source-active" | "source-active-request" | "source-active-response" | "keepalive" | "normal" | "general" | "state" | "policy" | "task" | "timer" | "all") (
                            c(
                                "send",
                                "receive",
                                "detail",
                                "disable"
                            )
                        ).as(:oneline)
                    )
                ),
                "peer" arg (
                    c(
                        c(
                          "disable"
                        ),
                        "export" (
                          policy_algebra
                        ),
                        "import" (
                          policy_algebra
                        ),
                        "local-address" (
                          ipv4addr
                        ),
                        "traceoptions" (
                            c(
                                "file" (
                                  trace_file_type
                                ),
                                "flag" ("packets" | "route" | "nsr-synchronization" | "source-active" | "source-active-request" | "source-active-response" | "keepalive" | "normal" | "general" | "state" | "policy" | "task" | "timer" | "all") (
                                    c(
                                        "send",
                                        "receive",
                                        "detail",
                                        "disable"
                                    )
                                ).as(:oneline)
                            )
                        ),
                        "active-source-limit" (
                            c(
                                "maximum" arg,
                                "threshold" arg
                            )
                        ),
                        "default-peer",
                        "authentication-key" arg
                    )
                )
            )
        )
    )
end

rule(:juniper_protocols_mstp) do
    c(
        c(
          "disable"
        ),
        "configuration-name" arg,
        "revision-level" arg,
        "max-hops" arg,
        "max-age" arg,
        "hello-time" arg,
        "forward-delay" arg,
        "traceoptions" (
          stp_trace_options_esp
        ),
        "bridge-priority" arg,
        "interface" ("all" | "name") (
            c(
                "priority" arg,
                "cost" arg,
                "disable",
                "arp-on-stp",
                "mode" arg,
                "edge",
                "bpdu-timeout-action" (
                    c(
                        "block",
                        "log"
                    )
                ),
                "no-root-port"
            )
        ),
        "msti" arg (
            c(
                "bridge-priority" arg,
                "vlan" arg,
                "interface" arg (
                    c(
                        "priority" arg,
                        "cost" arg,
                        "disable",
                        "arp-on-stp"
                    )
                )
            )
        ),
        "bpdu-block-on-edge"
    )
end

rule(:juniper_protocols_ospf) do
    c(
        c(
          "disable"
        ),
        "traceoptions" (
            c(
                "file" (
                  trace_file_type
                ),
                "flag" ("spf" | "error" | "event" | "packet-dump" | "flooding" | "lsa-analysis" | "packets" | "hello" | "database-description" | "lsa-request" | "lsa-update" | "lsa-ack" | "ldp-synchronization" | "on-demand" | "nsr-synchronization" | "graceful-restart" | "restart-signaling" | "route" | "normal" | "general" | "state" | "policy" | "task" | "timer" | "all") (
                    c(
                        "send",
                        "receive",
                        "detail",
                        "disable"
                    )
                ).as(:oneline)
            )
        ),
        "topology" ("default" | "ipv4-multicast" | arg) (
            c(
                "disable",
                "topology-id" arg,
                "overload",
                "rib-group" arg,
                "spf-options" (
                    c(
                        "delay" arg,
                        "holddown" arg,
                        "rapid-runs" arg,
                        "no-ignore-our-externals"
                    )
                ),
                "backup-spf-options" (
                    c(
                        "disable",
                        "no-install",
                        "downstream-paths-only"
                    )
                ),
                "prefix-export-limit" arg
            )
        ),
        "spf-options" (
            c(
                "delay" arg,
                "holddown" arg,
                "rapid-runs" arg,
                "no-ignore-our-externals"
            )
        ),
        "backup-spf-options" (
            c(
                "disable",
                "no-install",
                "downstream-paths-only"
            )
        ),
        "prefix-export-limit" arg,
        "rib-group" arg,
        "overload" (
            c(
                "timeout" arg
            )
        ),
        "database-protection" (
            c(
                "maximum-lsa" arg,
                "warning-only",
                "warning-threshold" arg,
                "ignore-count" arg,
                "ignore-time" arg,
                "reset-time" arg
            )
        ),
        "graceful-restart" (
            c(
                c(
                  "disable"
                ),
                "restart-duration" arg,
                "notify-duration" arg,
                "helper-disable" (
                    c(
                        c(
                          "standard",
                          "restart-signaling",
                          "both"
                        )
                    )
                ),
                "no-strict-lsa-checking"
            )
        ),
        "traffic-engineering" (
            c(
                "no-topology",
                "multicast-rpf-routes",
                "ignore-lsp-metrics",
                "shortcuts" (
                    c(
                        "lsp-metric-into-summary"
                    )
                ),
                "advertise-unnumbered-interfaces",
                "credibility-protocol-preference"
            )
        ),
        "route-type-community" arg,
        "domain-id" (
            c(
                c(
                  "domain-id" arg,
                  "disable"
                )
            )
        ).as(:oneline),
        c(
          "domain-vpn-tag" arg,
          "no-domain-vpn-tag"
        ),
        "preference" arg,
        "external-preference" arg,
        "export" (
          policy_algebra
        ),
        "import" (
          policy_algebra
        ),
        "reference-bandwidth" arg,
        "no-rfc-1583",
        c(
          "no-nssa-abr"
        ),
        "sham-link" (
            c(
                "local" (
                  ipaddr
                )
            )
        ),
        "area" arg (
            c(
                c(
                  "stub" (
                      c(
                          "default-metric" arg,
                          "summaries",
                          "no-summaries"
                      )
                  ).as(:oneline),
                  "nssa" (
                      c(
                          "default-lsa" (
                              c(
                                  "default-metric" arg,
                                  "metric-type" arg,
                                  "type-7"
                              )
                          ),
                          "summaries",
                          "no-summaries",
                          "area-range" arg (
                              c(
                                  "restrict",
                                  "exact",
                                  "override-metric" (
                                      c(
                                          "metric" arg,
                                          "metric-type" arg
                                      )
                                  )
                              )
                          )
                      )
                  )
                ),
                "area-range" arg (
                    c(
                        "restrict",
                        "exact",
                        "override-metric" arg
                    )
                ),
                "network-summary-export" (
                  policy_algebra
                ),
                "network-summary-import" (
                  policy_algebra
                ),
                "inter-area-prefix-export" (
                  policy_algebra
                ),
                "inter-area-prefix-import" (
                  policy_algebra
                ),
                "virtual-link" (
                    s(
                      "neighbor-id" arg,
                      "transit-area" arg,
                      c(
                        c(
                          "disable"
                        ),
                        "retransmit-interval" arg,
                        "transit-delay" arg,
                        "hello-interval" arg,
                        "dead-interval" arg,
                        c(
                          "authentication" (
                            juniper_ospf_authentication
                          )
                        ),
                        "demand-circuit",
                        "flood-reduction",
                        "no-neighbor-down-notification",
                        "ipsec-sa" arg,
                        "topology" ("default" | "ipv4-multicast" | arg) (
                            c(
                                "disable",
                                "metric" arg,
                                "bandwidth-based-metrics" (
                                    c(
                                        "bandwidth" arg (
                                            c(
                                                "metric" arg
                                            )
                                        ).as(:oneline)
                                    )
                                )
                            )
                        )
                      )
                    )
                ),
                "sham-link-remote" arg (
                    c(
                        "metric" arg,
                        "ipsec-sa" arg,
                        "demand-circuit",
                        "flood-reduction",
                        "topology" ("default" | "ipv4-multicast" | arg) (
                            c(
                                "disable",
                                "metric" arg,
                                "bandwidth-based-metrics" (
                                    c(
                                        "bandwidth" arg (
                                            c(
                                                "metric" arg
                                            )
                                        ).as(:oneline)
                                    )
                                )
                            )
                        )
                    )
                ),
                "interface" arg (
                    c(
                        c(
                          "disable"
                        ),
                        "interface-type" arg,
                        c(
                          "link-protection",
                          "node-link-protection"
                        ),
                        "no-eligible-backup",
                        "passive" (
                            c(
                                "traffic-engineering" (
                                    c(
                                        "remote-node-id" (
                                          ipaddr
                                        )
                                    )
                                )
                            )
                        ),
                        "secondary",
                        "own-router-lsa",
                        "bandwidth-based-metrics" (
                            c(
                                "bandwidth" arg (
                                    c(
                                        "metric" arg
                                    )
                                ).as(:oneline)
                            )
                        ),
                        "metric" arg,
                        "te-metric" arg,
                        "priority" arg,
                        "ldp-synchronization" (
                          ldp_sync_obj
                        ),
                        "retransmit-interval" arg,
                        "transit-delay" arg,
                        "hello-interval" arg,
                        "dead-interval" arg,
                        c(
                          "authentication" (
                            juniper_ospf_authentication
                          )
                        ),
                        "demand-circuit",
                        "flood-reduction",
                        "no-neighbor-down-notification",
                        "ipsec-sa" arg,
                        "topology" ("default" | "ipv4-multicast" | arg) (
                            c(
                                "disable",
                                "metric" arg,
                                "bandwidth-based-metrics" (
                                    c(
                                        "bandwidth" arg (
                                            c(
                                                "metric" arg
                                            )
                                        ).as(:oneline)
                                    )
                                )
                            )
                        ),
                        "bfd-liveness-detection" (
                            c(
                                "version" arg,
                                "minimum-interval" arg,
                                "minimum-receive-interval" arg,
                                "multiplier" arg,
                                c(
                                  "no-adaptation"
                                ),
                                "transmit-interval" (
                                    c(
                                        "minimum-interval" arg,
                                        "threshold" arg
                                    )
                                ),
                                "detection-time" (
                                    c(
                                        "threshold" arg
                                    )
                                ),
                                "authentication" (
                                    c(
                                        "key-chain" arg,
                                        "algorithm" arg,
                                        "loose-check"
                                    )
                                ),
                                "full-neighbors-only"
                            )
                        ),
                        "dynamic-neighbors",
                        "neighbor" arg (
                            c(
                                "eligible"
                            )
                        ).as(:oneline),
                        "poll-interval" arg,
                        "no-interface-state-traps"
                    )
                ),
                "no-context-identifier-advertisement",
                "context-identifier" arg,
                "label-switched-path" arg (
                    c(
                        c(
                          "disable"
                        ),
                        "metric" arg,
                        "topology" ("default" | "ipv4-multicast" | arg) (
                            c(
                                "disable",
                                "metric" arg,
                                "bandwidth-based-metrics" (
                                    c(
                                        "bandwidth" arg (
                                            c(
                                                "metric" arg
                                            )
                                        ).as(:oneline)
                                    )
                                )
                            )
                        )
                    )
                ),
                "peer-interface" arg (
                    c(
                        c(
                          "disable"
                        ),
                        "retransmit-interval" arg,
                        "transit-delay" arg,
                        "hello-interval" arg,
                        "dead-interval" arg,
                        c(
                          "authentication" (
                            juniper_ospf_authentication
                          )
                        ),
                        "demand-circuit",
                        "flood-reduction",
                        "no-neighbor-down-notification"
                    )
                )
            )
        )
    )
end

rule(:juniper_protocols_pgm) do
    c(
        "traceoptions" (
            c(
                "flag" ("init" | "show" | "route-socket" | "parse" | "state" | "packets" | "all") (
                    c(
                        "send",
                        "receive",
                        "detail",
                        "disable"
                    )
                ).as(:oneline)
            )
        )
    )
end

rule(:juniper_protocols_pim) do
    c(
        "family" (
            c(
                "inet" (
                    c(
                        c(
                          "disable"
                        )
                    )
                ),
                "inet6" (
                    c(
                        c(
                          "disable"
                        )
                    )
                )
            )
        ),
        c(
          "disable"
        ),
        "nonstop-routing" (
            c(
                c(
                  "disable"
                )
            )
        ),
        "traceoptions" (
            c(
                "file" (
                  trace_file_type
                ),
                "flag" ("route" | "packets" | "hello" | "register" | "join" | "prune" | "graft" | "bootstrap" | "rp" | "autorp" | "assert" | "mdt" | "nsr-synchronization" | "bidirectional-df-election" | "normal" | "general" | "state" | "policy" | "task" | "timer" | "all") (
                    c(
                        "send",
                        "receive",
                        "detail",
                        "disable",
                        "filter" (
                          pim_filter_obj
                        )
                    )
                ).as(:oneline)
            )
        ),
        "dense-groups" (
          pim_dense_group_type
        ),
        "vpn-tunnel-source" (
          ipv4addr
        ),
        "vpn-group-address" (
          ipv4addr
        ),
        "tunnel-devices" (
          interface_device
        ),
        "rpf-selection" (
            c(
                "group" arg (
                    c(
                        "wildcard-source" (
                            c(
                                "next-hop" (
                                  ipaddr
                                )
                            )
                        ),
                        "source" arg (
                            c(
                                "next-hop" (
                                  ipaddr
                                )
                            )
                        )
                    )
                ),
                "prefix-list" arg (
                    c(
                        "wildcard-source" (
                            c(
                                "next-hop" (
                                  ipaddr
                                )
                            )
                        ),
                        "source" arg (
                            c(
                                "next-hop" (
                                  ipaddr
                                )
                            )
                        )
                    )
                )
            )
        ),
        "mvpn" (
            c(
                "autodiscovery" (
                    c(
                        "inet-mdt"
                    )
                )
            )
        ),
        "rib-group" (
          rib_group_type
        ),
        "import" (
          policy_algebra
        ),
        "export" (
          policy_algebra
        ),
        "assert-timeout" arg,
        "join-prune-timeout" arg,
        "spt-threshold" (
            c(
                "infinity" (
                  policy_algebra
                )
            )
        ),
        "rp" (
            c(
                "bootstrap-priority" arg,
                "bootstrap-import" (
                  policy_algebra
                ),
                "bootstrap-export" (
                  policy_algebra
                ),
                "bootstrap" (
                    c(
                        "family" (
                            c(
                                "inet" (
                                  pim_bootstrap_options_type
                                ),
                                "inet6" (
                                  pim_bootstrap_options_type
                                )
                            )
                        )
                    )
                ),
                "rp-register-policy" (
                  policy_algebra
                ),
                "dr-register-policy" (
                  policy_algebra
                ),
                "local" (
                    c(
                        "address" (
                          ipv4addr
                        ),
                        c(
                          "disable"
                        ),
                        "priority" arg,
                        "hold-time" arg,
                        "group-ranges" arg,
                        "override",
                        "family" (
                            c(
                                "inet" (
                                    c(
                                        "address" (
                                          ipv4addr
                                        ),
                                        c(
                                          "disable"
                                        ),
                                        "priority" arg,
                                        "hold-time" arg,
                                        "group-ranges" arg,
                                        "override",
                                        "anycast-pim" (
                                            c(
                                                "rp-set" (
                                                    c(
                                                        "address" arg (
                                                            c(
                                                                "forward-msdp-sa"
                                                            )
                                                        )
                                                    )
                                                ),
                                                "local-address" (
                                                  ipaddr
                                                )
                                            )
                                        )
                                    )
                                ),
                                "inet6" (
                                    c(
                                        "address" (
                                          ipv6addr
                                        ),
                                        c(
                                          "disable"
                                        ),
                                        "priority" arg,
                                        "hold-time" arg,
                                        "group-ranges" arg,
                                        "override",
                                        "anycast-pim" (
                                            c(
                                                "rp-set" (
                                                    c(
                                                        "address" arg
                                                    )
                                                ),
                                                "local-address" (
                                                  ipv6addr
                                                )
                                            )
                                        )
                                    )
                                )
                            )
                        )
                    )
                ),
                "embedded-rp" (
                    c(
                        "group-ranges" (
                          pim_rp_group_range_type
                        ),
                        "maximum-rps" arg
                    )
                ),
                "auto-rp" (
                    c(
                        c(
                          "discovery",
                          "announce",
                          "mapping"
                        ),
                        "mapping-agent-election",
                        "no-mapping-agent-election"
                    )
                ),
                "static" (
                    c(
                        "address" arg (
                            c(
                                "version" arg,
                                "group-ranges" (
                                  pim_rp_group_range_type
                                ),
                                "override"
                            )
                        )
                    )
                ),
                "bidirectional"
            )
        ),
        "interface" arg (
            c(
                "family" (
                    c(
                        "inet" (
                            c(
                                c(
                                  "disable"
                                )
                            )
                        ),
                        "inet6" (
                            c(
                                c(
                                  "disable"
                                )
                            )
                        )
                    )
                ),
                c(
                  "disable"
                ),
                "bidirectional",
                "mode" arg,
                "priority" arg,
                "version" arg,
                "hello-interval" arg,
                "neighbor-policy" (
                  policy_algebra
                ),
                "accept-remote-source",
                "reset-tracking-bit",
                "propagation-delay" arg,
                "override-interval" arg,
                "bfd-liveness-detection" (
                    c(
                        "version" arg,
                        "minimum-interval" arg,
                        "minimum-receive-interval" arg,
                        "multiplier" arg,
                        c(
                          "no-adaptation"
                        ),
                        "transmit-interval" (
                            c(
                                "minimum-interval" arg,
                                "threshold" arg
                            )
                        ),
                        "detection-time" (
                            c(
                                "threshold" arg
                            )
                        ),
                        "authentication" (
                            c(
                                "key-chain" arg,
                                "algorithm" arg,
                                "loose-check"
                            )
                        )
                    )
                )
            )
        ),
        "mdt" (
            c(
                "threshold" (
                    c(
                        "group" arg (
                            c(
                                "source" arg (
                                    c(
                                        "rate" arg
                                    )
                                )
                            )
                        )
                    )
                ),
                "data-mdt-reuse",
                "tunnel-limit" arg,
                "group-range" (
                  ipprefix
                )
            )
        ),
        "graceful-restart" (
            c(
                c(
                  "disable"
                ),
                "restart-duration" arg,
                "no-bidirectional-mode"
            )
        ),
        "join-load-balance",
        "dr-election-on-p2p",
        "no-wildcard-register-stop",
        "nexthop-hold-time" arg,
        "mpls-internet-multicast",
        "reset-tracking-bit",
        "propagation-delay" arg,
        "override-interval" arg,
        "default-vpn-source" (
            c(
                "interface-name" (
                  interface_unit
                )
            )
        )
    )
end

rule(:juniper_protocols_protection_group) do
    c(
        "ethernet-aps" (
          juniper_protocols_protection_group_eaps
        ),
        "traceoptions" (
          erp_trace_options
        ),
        "restore-interval" arg,
        "guard-interval" arg,
        "ethernet-ring" (
          juniper_protocols_protection_group_ethernet_ring
        ),
        "hold-interval" arg
    )
end

rule(:erp_trace_options) do
    c(
        "file" (
          esp_trace_file_type
        ),
        "flag" ("config" | "debug" | "normal" | "events" | "pdu" | "timers" | "state-machine" | "periodic-packet-management" | "all").as(:oneline)
    )
end

rule(:juniper_protocols_protection_group_eaps) do
    c(
        "profile" (
          juniper_protocols_protection_group_eaps_profile
        )
    )
end

rule(:juniper_protocols_protection_group_eaps_profile) do
  arg.as(:arg) (
    c(
        "protocol" arg,
        "revert-time" arg,
        "hold-time" arg,
        "local-request" arg
    )
  )
end

rule(:juniper_protocols_protection_group_ethernet_ring) do
  arg.as(:arg) (
    c(
        "node-id" (
          mac_unicaset
        ),
        "ring-protection-link-owner",
        "restore-interval" arg,
        "guard-interval" arg,
        "hold-interval" arg,
        "east-interface" (
          erp_interface
        ),
        "west-interface" (
          erp_interface
        ),
        "control-vlan" arg,
        "data-channel" (
          erp_data_channel
        )
    )
  )
end

rule(:erp_data_channel) do
    c(
        "vlan" arg
    )
end

rule(:erp_interface) do
    c(
        "control-channel" (
            c(
                "interface" (
                  interface_name
                ),
                "vlan" arg
            )
        ),
        "ring-protection-link-end",
        "interface-none"
    )
end

rule(:juniper_protocols_rip) do
    c(
        "traceoptions" (
            c(
                "file" (
                  trace_file_type
                ),
                "flag" ("auth" | "error" | "expiration" | "holddown" | "packets" | "request" | "trigger" | "update" | "nsr-synchronization" | "route" | "normal" | "general" | "state" | "policy" | "task" | "timer" | "all") (
                    c(
                        "send",
                        "receive",
                        "detail",
                        "disable",
                        "filter" (
                          rip_filter_obj
                        )
                    )
                ).as(:oneline)
            )
        ),
        "rib-group" (
          rib_group_inet_type
        ),
        "metric-in" arg,
        "send" (
            c(
                c(
                  "broadcast",
                  "multicast",
                  "none",
                  "version-1"
                )
            )
        ).as(:oneline),
        "receive" (
            c(
                c(
                  "both",
                  "none",
                  "version-1",
                  "version-2"
                )
            )
        ).as(:oneline),
        "check-zero",
        "no-check-zero",
        "message-size" arg,
        "import" (
          policy_algebra
        ),
        "holddown" arg,
        "route-timeout" arg,
        "update-interval" arg,
        "authentication-type" arg,
        "authentication-key" (
          unreadable
        ),
        "group" arg (
            c(
                "route-timeout" arg,
                "update-interval" arg,
                "preference" arg,
                "metric-out" arg,
                "export" (
                  policy_algebra
                ),
                "import" (
                  policy_algebra
                ),
                "demand-circuit",
                "max-retrans-time" arg,
                "bfd-liveness-detection" (
                    c(
                        "version" arg,
                        "minimum-interval" arg,
                        "minimum-receive-interval" arg,
                        "multiplier" arg,
                        c(
                          "no-adaptation"
                        ),
                        "transmit-interval" (
                            c(
                                "minimum-interval" arg,
                                "threshold" arg
                            )
                        ),
                        "detection-time" (
                            c(
                                "threshold" arg
                            )
                        ),
                        "authentication" (
                            c(
                                "key-chain" arg,
                                "algorithm" arg,
                                "loose-check"
                            )
                        )
                    )
                ),
                "neighbor" arg (
                    c(
                        "route-timeout" arg,
                        "update-interval" arg,
                        "interface-type" arg,
                        "dynamic-peers",
                        "peer" arg.as(:oneline),
                        "metric-in" arg,
                        "send" (
                            c(
                                c(
                                  "broadcast",
                                  "multicast",
                                  "none",
                                  "version-1"
                                )
                            )
                        ).as(:oneline),
                        "receive" (
                            c(
                                c(
                                  "both",
                                  "none",
                                  "version-1",
                                  "version-2"
                                )
                            )
                        ).as(:oneline),
                        "demand-circuit",
                        "max-retrans-time" arg,
                        "check-zero",
                        "no-check-zero",
                        "any-sender",
                        "message-size" arg,
                        "import" (
                          policy_algebra
                        ),
                        "authentication-type" arg,
                        "authentication-key" (
                          unreadable
                        ),
                        "bfd-liveness-detection" (
                            c(
                                "version" arg,
                                "minimum-interval" arg,
                                "minimum-receive-interval" arg,
                                "multiplier" arg,
                                c(
                                  "no-adaptation"
                                ),
                                "transmit-interval" (
                                    c(
                                        "minimum-interval" arg,
                                        "threshold" arg
                                    )
                                ),
                                "detection-time" (
                                    c(
                                        "threshold" arg
                                    )
                                ),
                                "authentication" (
                                    c(
                                        "key-chain" arg,
                                        "algorithm" arg,
                                        "loose-check"
                                    )
                                )
                            )
                        )
                    )
                )
            )
        ),
        "graceful-restart" (
            c(
                c(
                  "disable"
                ),
                "restart-time" arg
            )
        )
    )
end

rule(:juniper_protocols_ripng) do
    c(
        "traceoptions" (
            c(
                "file" (
                  trace_file_type
                ),
                "flag" ("error" | "expiration" | "holddown" | "packets" | "request" | "trigger" | "update" | "nsr-synchronization" | "route" | "normal" | "general" | "state" | "policy" | "task" | "timer" | "all") (
                    c(
                        "send",
                        "receive",
                        "detail",
                        "disable"
                    )
                ).as(:oneline)
            )
        ),
        "metric-in" arg,
        "send" (
            c(
                c(
                  "none"
                )
            )
        ).as(:oneline),
        "receive" (
            c(
                c(
                  "none"
                )
            )
        ).as(:oneline),
        "import" (
          policy_algebra
        ),
        "holddown" arg,
        "route-timeout" arg,
        "update-interval" arg,
        "group" arg (
            c(
                "route-timeout" arg,
                "update-interval" arg,
                "preference" arg,
                "metric-out" arg,
                "export" (
                  policy_algebra
                ),
                "import" (
                  policy_algebra
                ),
                "neighbor" arg (
                    c(
                        "route-timeout" arg,
                        "update-interval" arg,
                        "metric-in" arg,
                        "send" (
                            c(
                                c(
                                  "none"
                                )
                            )
                        ).as(:oneline),
                        "receive" (
                            c(
                                c(
                                  "none"
                                )
                            )
                        ).as(:oneline),
                        "import" (
                          policy_algebra
                        )
                    )
                )
            )
        ),
        "graceful-restart" (
            c(
                c(
                  "disable"
                ),
                "restart-time" arg
            )
        )
    )
end

rule(:juniper_protocols_router_discovery) do
    c(
        c(
          "disable"
        ),
        "traceoptions" (
            c(
                "file" (
                  trace_file_type
                ),
                "flag" ("route" | "normal" | "general" | "state" | "policy" | "task" | "timer" | "all").as(:oneline)
            )
        ),
        "interface" arg (
            c(
                "max-advertisement-interval" arg,
                "min-advertisement-interval" arg,
                "lifetime" arg
            )
        ),
        "address" arg (
            c(
                "advertise",
                "ignore",
                "broadcast",
                "multicast",
                "ineligible",
                "priority" arg
            )
        )
    )
end

rule(:juniper_protocols_stp) do
    c(
        c(
          "disable"
        ),
        "bridge-priority" arg,
        "max-age" arg,
        "hello-time" arg,
        "forward-delay" arg,
        "traceoptions" (
          stp_trace_options_esp
        ),
        "interface" ("all" | "name") (
            c(
                "priority" arg,
                "cost" arg,
                "disable",
                "arp-on-stp",
                "mode" arg,
                "edge",
                "bpdu-timeout-action" (
                    c(
                        "block",
                        "log"
                    )
                ),
                "no-root-port"
            )
        ),
        "bpdu-block-on-edge"
    )
end

rule(:juniper_protocols_vstp) do
    c(
        c(
          "disable"
        ),
        "force-version" arg,
        "bpdu-block-on-edge",
        "vlan-group" (
            c(
                "group" arg (
                    c(
                        "vlan" arg,
                        "bridge-priority" arg,
                        "max-age" arg,
                        "hello-time" arg,
                        "forward-delay" arg,
                        "traceoptions" (
                          stp_trace_options_esp
                        ),
                        "interface" ("all" | "name") (
                            c(
                                "priority" arg,
                                "cost" arg,
                                "disable",
                                "arp-on-stp",
                                "mode" arg,
                                "edge",
                                "bpdu-timeout-action" (
                                    c(
                                        "block",
                                        "log"
                                    )
                                ),
                                "no-root-port"
                            )
                        )
                    )
                )
            )
        ),
        "vlan" ("id-name" | "all") (
            c(
                "bridge-priority" arg,
                "max-age" arg,
                "hello-time" arg,
                "forward-delay" arg,
                "traceoptions" (
                  stp_trace_options_esp
                ),
                "interface" ("all" | "name") (
                    c(
                        "priority" arg,
                        "cost" arg,
                        "disable",
                        "arp-on-stp",
                        "mode" arg,
                        "edge",
                        "bpdu-timeout-action" (
                            c(
                                "block",
                                "log"
                            )
                        ),
                        "no-root-port"
                    )
                )
            )
        ),
        "interface" arg (
          c(
            "priority" arg,
            "cost" arg,
            "mode" ("p2p" | "shared"),
            "edge"
          )
        )
    )
end

rule(:juniper_routing_instance) do
  arg.as(:arg) (
    c(
        "description" arg,
        "vlan-model" arg,
        "instance-role" arg,
        "instance-type" arg,
        c(
          "no-vrf-propagate-ttl",
          "vrf-propagate-ttl"
        ),
        c(
          "vlan-id" arg,
          "vlan-tags" (
              c(
                  "outer" arg,
                  "inner" arg
              )
          ).as(:oneline)
        ),
        "system" (
            c(
                "services" (
                    c(
                        "dhcp-local-server" (
                          jdhcp_local_server_type
                        ),
                        "static-subscribers" (
                          jsscd_static_subscribers_type
                        )
                    )
                )
            )
        ),
        "services" (
            c(
                "mobile-ip" (
                  juniper_protocols_mobile_ipv4
                )
            )
        ),
        "access" (
            c(
                "address-assignment" (
                  address_assignment_type
                ),
                "address-protection"
            )
        ),
        "access-profile" (
            c(
                "access-profile-name" arg
            )
        ).as(:oneline),
        "interface" ("$junos-interface-name" | "interface-name") (
            c(
                c(
                  "any",
                  "unicast",
                  "multicast"
                )
            )
        ),
        "routing-interface" (
          interface_unit
        ),
        "no-local-switching",
        "qualified-bum-pruning-mode",
        "no-irb-layer-2-copy",
        "route-distinguisher" (
            c(
                "rd-type" arg
            )
        ).as(:oneline),
        "l2vpn-id" (
            c(
                "community" arg
            )
        ),
        "provider-tunnel" (
            c(
                c(
                  "rsvp-te" (
                      c(
                          c(
                            "static-lsp" arg,
                            "label-switched-path-template" (
                                c(
                                    c(
                                      "template-name" arg,
                                      "default-template"
                                    )
                                )
                            )
                          )
                      )
                  ),
                  "ldp-p2mp",
                  "ingress-replication" (
                      c(
                          "create-new-ucast-tunnel",
                          "label-switched-path" (
                              c(
                                  "label-switched-path-template" (
                                      c(
                                          c(
                                            "template-name" arg,
                                            "default-template"
                                          )
                                      )
                                  )
                              )
                          )
                      )
                  ),
                  "pim-asm" (
                      c(
                          "group-address" (
                            ipv4addr
                          )
                      )
                  ),
                  "pim-ssm" (
                      c(
                          "group-address" (
                            ipv4addr
                          )
                      )
                  )
                ),
                "selective" (
                    c(
                        "tunnel-limit" arg,
                        "wildcard-group-inet" (
                            c(
                                "wildcard-source" (
                                    c(
                                        "threshold-rate" arg,
                                        c(
                                          "ingress-replication" (
                                              c(
                                                  "create-new-ucast-tunnel",
                                                  "label-switched-path" (
                                                      c(
                                                          "label-switched-path-template" (
                                                              c(
                                                                  c(
                                                                    "template-name" arg,
                                                                    "default-template"
                                                                  )
                                                              )
                                                          )
                                                      )
                                                  )
                                              )
                                          ),
                                          "rsvp-te" (
                                              c(
                                                  c(
                                                    "static-lsp" arg,
                                                    "label-switched-path-template" (
                                                        c(
                                                            c(
                                                              "template-name" arg,
                                                              "default-template"
                                                            )
                                                        )
                                                    )
                                                  )
                                              )
                                          ),
                                          "ldp-p2mp",
                                          "pim-ssm" (
                                              c(
                                                  "group-range" (
                                                    ipv4prefix
                                                  )
                                              )
                                          )
                                        )
                                    )
                                )
                            )
                        ),
                        "wildcard-group-inet6" (
                            c(
                                "wildcard-source" (
                                    c(
                                        "threshold-rate" arg,
                                        c(
                                          "ingress-replication" (
                                              c(
                                                  "create-new-ucast-tunnel",
                                                  "label-switched-path" (
                                                      c(
                                                          "label-switched-path-template" (
                                                              c(
                                                                  c(
                                                                    "template-name" arg,
                                                                    "default-template"
                                                                  )
                                                              )
                                                          )
                                                      )
                                                  )
                                              )
                                          ),
                                          "rsvp-te" (
                                              c(
                                                  c(
                                                    "static-lsp" arg,
                                                    "label-switched-path-template" (
                                                        c(
                                                            c(
                                                              "template-name" arg,
                                                              "default-template"
                                                            )
                                                        )
                                                    )
                                                  )
                                              )
                                          ),
                                          "ldp-p2mp",
                                          "pim-ssm" (
                                              c(
                                                  "group-range" (
                                                    ipv4prefix
                                                  )
                                              )
                                          )
                                        )
                                    )
                                )
                            )
                        ),
                        "group" arg (
                            c(
                                "wildcard-source" (
                                    c(
                                        "threshold-rate" arg,
                                        c(
                                          "ingress-replication" (
                                              c(
                                                  "create-new-ucast-tunnel",
                                                  "label-switched-path" (
                                                      c(
                                                          "label-switched-path-template" (
                                                              c(
                                                                  c(
                                                                    "template-name" arg,
                                                                    "default-template"
                                                                  )
                                                              )
                                                          )
                                                      )
                                                  )
                                              )
                                          ),
                                          "rsvp-te" (
                                              c(
                                                  c(
                                                    "static-lsp" arg,
                                                    "label-switched-path-template" (
                                                        c(
                                                            c(
                                                              "template-name" arg,
                                                              "default-template"
                                                            )
                                                        )
                                                    )
                                                  )
                                              )
                                          ),
                                          "ldp-p2mp",
                                          "pim-ssm" (
                                              c(
                                                  "group-range" (
                                                    ipv4prefix
                                                  )
                                              )
                                          )
                                        )
                                    )
                                ),
                                "source" arg (
                                    c(
                                        c(
                                          "ingress-replication" (
                                              c(
                                                  "create-new-ucast-tunnel",
                                                  "label-switched-path" (
                                                      c(
                                                          "label-switched-path-template" (
                                                              c(
                                                                  c(
                                                                    "template-name" arg,
                                                                    "default-template"
                                                                  )
                                                              )
                                                          )
                                                      )
                                                  )
                                              )
                                          ),
                                          "rsvp-te" (
                                              c(
                                                  c(
                                                    "static-lsp" arg,
                                                    "label-switched-path-template" (
                                                        c(
                                                            c(
                                                              "template-name" arg,
                                                              "default-template"
                                                            )
                                                        )
                                                    )
                                                  )
                                              )
                                          ),
                                          "pim-ssm" (
                                              c(
                                                  "group-range" (
                                                    ipv4prefix
                                                  )
                                              )
                                          ),
                                          "ldp-p2mp"
                                        ),
                                        "threshold-rate" arg
                                    )
                                )
                            )
                        )
                    )
                ),
                "mdt" (
                    c(
                        "threshold" (
                            c(
                                "group" arg (
                                    c(
                                        "source" arg (
                                            c(
                                                "rate" arg
                                            )
                                        )
                                    )
                                )
                            )
                        ),
                        "data-mdt-reuse",
                        "tunnel-limit" arg,
                        "group-range" (
                          ipprefix
                        )
                    )
                )
            )
        ),
        "vrf-import" (
          policy_algebra
        ),
        "vrf-export" (
          policy_algebra
        ),
        "vrf-target" (
            c(
                "community" arg,
                "import" arg,
                "export" arg
            )
        ),
        "no-vrf-advertise",
        "vrf-advertise-selective" (
            c(
                "family" (
                    c(
                        "inet-mvpn",
                        "inet6-mvpn"
                    )
                )
            )
        ),
        "vrf-table-label" (
            c(
                "source-class-usage"
            )
        ).as(:oneline),
        "routing-options" (
          juniper_routing_options
        ),
        "forwarding-options" (
          juniper_forwarding_options
        ),
        "multicast-snooping-options" (
          juniper_multicast_snooping_options
        ),
        "protocols" (
            c(
                "bgp" (
                  juniper_protocols_bgp
                ),
                "bfd" (
                  juniper_protocols_bfd
                ),
                "ospf" (
                  juniper_protocols_ospf
                ),
                "ospf3" (
                    c(
                        "realm" ("ipv6-unicast" | "ipv6-multicast" | "ipv4-unicast" | "ipv4-multicast") (
                            c(
                                c(
                                  "disable"
                                ),
                                "traceoptions" (
                                    c(
                                        "file" (
                                          trace_file_type
                                        ),
                                        "flag" ("spf" | "error" | "event" | "packet-dump" | "flooding" | "lsa-analysis" | "packets" | "hello" | "database-description" | "lsa-request" | "lsa-update" | "lsa-ack" | "ldp-synchronization" | "on-demand" | "nsr-synchronization" | "graceful-restart" | "restart-signaling" | "route" | "normal" | "general" | "state" | "policy" | "task" | "timer" | "all") (
                                            c(
                                                "send",
                                                "receive",
                                                "detail",
                                                "disable"
                                            )
                                        ).as(:oneline)
                                    )
                                ),
                                "topology" ("default" | "ipv4-multicast" | arg) (
                                    c(
                                        "disable",
                                        "topology-id" arg,
                                        "overload",
                                        "rib-group" arg,
                                        "spf-options" (
                                            c(
                                                "delay" arg,
                                                "holddown" arg,
                                                "rapid-runs" arg,
                                                "no-ignore-our-externals"
                                            )
                                        ),
                                        "backup-spf-options" (
                                            c(
                                                "disable",
                                                "no-install",
                                                "downstream-paths-only"
                                            )
                                        ),
                                        "prefix-export-limit" arg
                                    )
                                ),
                                "spf-options" (
                                    c(
                                        "delay" arg,
                                        "holddown" arg,
                                        "rapid-runs" arg,
                                        "no-ignore-our-externals"
                                    )
                                ),
                                "backup-spf-options" (
                                    c(
                                        "disable",
                                        "no-install",
                                        "downstream-paths-only"
                                    )
                                ),
                                "prefix-export-limit" arg,
                                "rib-group" arg,
                                "overload" (
                                    c(
                                        "timeout" arg
                                    )
                                ),
                                "database-protection" (
                                    c(
                                        "maximum-lsa" arg,
                                        "warning-only",
                                        "warning-threshold" arg,
                                        "ignore-count" arg,
                                        "ignore-time" arg,
                                        "reset-time" arg
                                    )
                                ),
                                "graceful-restart" (
                                    c(
                                        c(
                                          "disable"
                                        ),
                                        "restart-duration" arg,
                                        "notify-duration" arg,
                                        "helper-disable" (
                                            c(
                                                c(
                                                  "standard",
                                                  "restart-signaling",
                                                  "both"
                                                )
                                            )
                                        ),
                                        "no-strict-lsa-checking"
                                    )
                                ),
                                "traffic-engineering" (
                                    c(
                                        "no-topology",
                                        "multicast-rpf-routes",
                                        "ignore-lsp-metrics",
                                        "shortcuts" (
                                            c(
                                                "lsp-metric-into-summary"
                                            )
                                        ),
                                        "advertise-unnumbered-interfaces",
                                        "credibility-protocol-preference"
                                    )
                                ),
                                "route-type-community" arg,
                                "domain-id" (
                                    c(
                                        c(
                                          "domain-id" arg,
                                          "disable"
                                        )
                                    )
                                ).as(:oneline),
                                c(
                                  "domain-vpn-tag" arg,
                                  "no-domain-vpn-tag"
                                ),
                                "preference" arg,
                                "external-preference" arg,
                                "export" (
                                  policy_algebra
                                ),
                                "import" (
                                  policy_algebra
                                ),
                                "reference-bandwidth" arg,
                                "no-rfc-1583",
                                c(
                                  "no-nssa-abr"
                                ),
                                "sham-link" (
                                    c(
                                        "local" (
                                          ipaddr
                                        )
                                    )
                                ),
                                "area" arg (
                                    c(
                                        c(
                                          "stub" (
                                              c(
                                                  "default-metric" arg,
                                                  "summaries",
                                                  "no-summaries"
                                              )
                                          ).as(:oneline),
                                          "nssa" (
                                              c(
                                                  "default-lsa" (
                                                      c(
                                                          "default-metric" arg,
                                                          "metric-type" arg,
                                                          "type-7"
                                                      )
                                                  ),
                                                  "summaries",
                                                  "no-summaries",
                                                  "area-range" arg (
                                                      c(
                                                          "restrict",
                                                          "exact",
                                                          "override-metric" (
                                                              c(
                                                                  "metric" arg,
                                                                  "metric-type" arg
                                                              )
                                                          )
                                                      )
                                                  )
                                              )
                                          )
                                        ),
                                        "area-range" arg (
                                            c(
                                                "restrict",
                                                "exact",
                                                "override-metric" arg
                                            )
                                        ),
                                        "network-summary-export" (
                                          policy_algebra
                                        ),
                                        "network-summary-import" (
                                          policy_algebra
                                        ),
                                        "inter-area-prefix-export" (
                                          policy_algebra
                                        ),
                                        "inter-area-prefix-import" (
                                          policy_algebra
                                        ),
                                        "virtual-link" (
                                            s(
                                              "neighbor-id" arg,
                                              "transit-area" arg,
                                              c(
                                                c(
                                                  "disable"
                                                ),
                                                "retransmit-interval" arg,
                                                "transit-delay" arg,
                                                "hello-interval" arg,
                                                "dead-interval" arg,
                                                c(
                                                  "authentication" (
                                                    juniper_ospf_authentication
                                                  )
                                                ),
                                                "demand-circuit",
                                                "flood-reduction",
                                                "no-neighbor-down-notification",
                                                "ipsec-sa" arg,
                                                "topology" ("default" | "ipv4-multicast" | arg) (
                                                    c(
                                                        "disable",
                                                        "metric" arg,
                                                        "bandwidth-based-metrics" (
                                                            c(
                                                                "bandwidth" arg (
                                                                    c(
                                                                        "metric" arg
                                                                    )
                                                                ).as(:oneline)
                                                            )
                                                        )
                                                    )
                                                )
                                              )
                                            )
                                        ),
                                        "sham-link-remote" arg (
                                            c(
                                                "metric" arg,
                                                "ipsec-sa" arg,
                                                "demand-circuit",
                                                "flood-reduction",
                                                "topology" ("default" | "ipv4-multicast" | arg) (
                                                    c(
                                                        "disable",
                                                        "metric" arg,
                                                        "bandwidth-based-metrics" (
                                                            c(
                                                                "bandwidth" arg (
                                                                    c(
                                                                        "metric" arg
                                                                    )
                                                                ).as(:oneline)
                                                            )
                                                        )
                                                    )
                                                )
                                            )
                                        ),
                                        "interface" arg (
                                            c(
                                                c(
                                                  "disable"
                                                ),
                                                "interface-type" arg,
                                                c(
                                                  "link-protection",
                                                  "node-link-protection"
                                                ),
                                                "no-eligible-backup",
                                                "passive" (
                                                    c(
                                                        "traffic-engineering" (
                                                            c(
                                                                "remote-node-id" (
                                                                  ipaddr
                                                                )
                                                            )
                                                        )
                                                    )
                                                ),
                                                "secondary",
                                                "own-router-lsa",
                                                "bandwidth-based-metrics" (
                                                    c(
                                                        "bandwidth" arg (
                                                            c(
                                                                "metric" arg
                                                            )
                                                        ).as(:oneline)
                                                    )
                                                ),
                                                "metric" arg,
                                                "te-metric" arg,
                                                "priority" arg,
                                                "ldp-synchronization" (
                                                  ldp_sync_obj
                                                ),
                                                "retransmit-interval" arg,
                                                "transit-delay" arg,
                                                "hello-interval" arg,
                                                "dead-interval" arg,
                                                c(
                                                  "authentication" (
                                                    juniper_ospf_authentication
                                                  )
                                                ),
                                                "demand-circuit",
                                                "flood-reduction",
                                                "no-neighbor-down-notification",
                                                "ipsec-sa" arg,
                                                "topology" ("default" | "ipv4-multicast" | arg) (
                                                    c(
                                                        "disable",
                                                        "metric" arg,
                                                        "bandwidth-based-metrics" (
                                                            c(
                                                                "bandwidth" arg (
                                                                    c(
                                                                        "metric" arg
                                                                    )
                                                                ).as(:oneline)
                                                            )
                                                        )
                                                    )
                                                ),
                                                "bfd-liveness-detection" (
                                                    c(
                                                        "version" arg,
                                                        "minimum-interval" arg,
                                                        "minimum-receive-interval" arg,
                                                        "multiplier" arg,
                                                        c(
                                                          "no-adaptation"
                                                        ),
                                                        "transmit-interval" (
                                                            c(
                                                                "minimum-interval" arg,
                                                                "threshold" arg
                                                            )
                                                        ),
                                                        "detection-time" (
                                                            c(
                                                                "threshold" arg
                                                            )
                                                        ),
                                                        "authentication" (
                                                            c(
                                                                "key-chain" arg,
                                                                "algorithm" arg,
                                                                "loose-check"
                                                            )
                                                        ),
                                                        "full-neighbors-only"
                                                    )
                                                ),
                                                "dynamic-neighbors",
                                                "neighbor" arg (
                                                    c(
                                                        "eligible"
                                                    )
                                                ).as(:oneline),
                                                "poll-interval" arg,
                                                "no-interface-state-traps"
                                            )
                                        ),
                                        "no-context-identifier-advertisement",
                                        "context-identifier" arg,
                                        "label-switched-path" arg (
                                            c(
                                                c(
                                                  "disable"
                                                ),
                                                "metric" arg,
                                                "topology" ("default" | "ipv4-multicast" | arg) (
                                                    c(
                                                        "disable",
                                                        "metric" arg,
                                                        "bandwidth-based-metrics" (
                                                            c(
                                                                "bandwidth" arg (
                                                                    c(
                                                                        "metric" arg
                                                                    )
                                                                ).as(:oneline)
                                                            )
                                                        )
                                                    )
                                                )
                                            )
                                        ),
                                        "peer-interface" arg (
                                            c(
                                                c(
                                                  "disable"
                                                ),
                                                "retransmit-interval" arg,
                                                "transit-delay" arg,
                                                "hello-interval" arg,
                                                "dead-interval" arg,
                                                c(
                                                  "authentication" (
                                                    juniper_ospf_authentication
                                                  )
                                                ),
                                                "demand-circuit",
                                                "flood-reduction",
                                                "no-neighbor-down-notification"
                                            )
                                        )
                                    )
                                )
                            )
                        ),
                        c(
                          "disable"
                        ),
                        "traceoptions" (
                            c(
                                "file" (
                                  trace_file_type
                                ),
                                "flag" ("spf" | "error" | "event" | "packet-dump" | "flooding" | "lsa-analysis" | "packets" | "hello" | "database-description" | "lsa-request" | "lsa-update" | "lsa-ack" | "ldp-synchronization" | "on-demand" | "nsr-synchronization" | "graceful-restart" | "restart-signaling" | "route" | "normal" | "general" | "state" | "policy" | "task" | "timer" | "all") (
                                    c(
                                        "send",
                                        "receive",
                                        "detail",
                                        "disable"
                                    )
                                ).as(:oneline)
                            )
                        ),
                        "topology" ("default" | "ipv4-multicast" | arg) (
                            c(
                                "disable",
                                "topology-id" arg,
                                "overload",
                                "rib-group" arg,
                                "spf-options" (
                                    c(
                                        "delay" arg,
                                        "holddown" arg,
                                        "rapid-runs" arg,
                                        "no-ignore-our-externals"
                                    )
                                ),
                                "backup-spf-options" (
                                    c(
                                        "disable",
                                        "no-install",
                                        "downstream-paths-only"
                                    )
                                ),
                                "prefix-export-limit" arg
                            )
                        ),
                        "spf-options" (
                            c(
                                "delay" arg,
                                "holddown" arg,
                                "rapid-runs" arg,
                                "no-ignore-our-externals"
                            )
                        ),
                        "backup-spf-options" (
                            c(
                                "disable",
                                "no-install",
                                "downstream-paths-only"
                            )
                        ),
                        "prefix-export-limit" arg,
                        "rib-group" arg,
                        "overload" (
                            c(
                                "timeout" arg
                            )
                        ),
                        "database-protection" (
                            c(
                                "maximum-lsa" arg,
                                "warning-only",
                                "warning-threshold" arg,
                                "ignore-count" arg,
                                "ignore-time" arg,
                                "reset-time" arg
                            )
                        ),
                        "graceful-restart" (
                            c(
                                c(
                                  "disable"
                                ),
                                "restart-duration" arg,
                                "notify-duration" arg,
                                "helper-disable" (
                                    c(
                                        c(
                                          "standard",
                                          "restart-signaling",
                                          "both"
                                        )
                                    )
                                ),
                                "no-strict-lsa-checking"
                            )
                        ),
                        "traffic-engineering" (
                            c(
                                "no-topology",
                                "multicast-rpf-routes",
                                "ignore-lsp-metrics",
                                "shortcuts" (
                                    c(
                                        "lsp-metric-into-summary"
                                    )
                                ),
                                "advertise-unnumbered-interfaces",
                                "credibility-protocol-preference"
                            )
                        ),
                        "route-type-community" arg,
                        "domain-id" (
                            c(
                                c(
                                  "domain-id" arg,
                                  "disable"
                                )
                            )
                        ).as(:oneline),
                        c(
                          "domain-vpn-tag" arg,
                          "no-domain-vpn-tag"
                        ),
                        "preference" arg,
                        "external-preference" arg,
                        "export" (
                          policy_algebra
                        ),
                        "import" (
                          policy_algebra
                        ),
                        "reference-bandwidth" arg,
                        "no-rfc-1583",
                        c(
                          "no-nssa-abr"
                        ),
                        "sham-link" (
                            c(
                                "local" (
                                  ipaddr
                                )
                            )
                        ),
                        "area" arg (
                            c(
                                c(
                                  "stub" (
                                      c(
                                          "default-metric" arg,
                                          "summaries",
                                          "no-summaries"
                                      )
                                  ).as(:oneline),
                                  "nssa" (
                                      c(
                                          "default-lsa" (
                                              c(
                                                  "default-metric" arg,
                                                  "metric-type" arg,
                                                  "type-7"
                                              )
                                          ),
                                          "summaries",
                                          "no-summaries",
                                          "area-range" arg (
                                              c(
                                                  "restrict",
                                                  "exact",
                                                  "override-metric" (
                                                      c(
                                                          "metric" arg,
                                                          "metric-type" arg
                                                      )
                                                  )
                                              )
                                          )
                                      )
                                  )
                                ),
                                "area-range" arg (
                                    c(
                                        "restrict",
                                        "exact",
                                        "override-metric" arg
                                    )
                                ),
                                "network-summary-export" (
                                  policy_algebra
                                ),
                                "network-summary-import" (
                                  policy_algebra
                                ),
                                "inter-area-prefix-export" (
                                  policy_algebra
                                ),
                                "inter-area-prefix-import" (
                                  policy_algebra
                                ),
                                "virtual-link" (
                                    s(
                                      "neighbor-id" arg,
                                      "transit-area" arg,
                                      c(
                                        c(
                                          "disable"
                                        ),
                                        "retransmit-interval" arg,
                                        "transit-delay" arg,
                                        "hello-interval" arg,
                                        "dead-interval" arg,
                                        c(
                                          "authentication" (
                                            juniper_ospf_authentication
                                          )
                                        ),
                                        "demand-circuit",
                                        "flood-reduction",
                                        "no-neighbor-down-notification",
                                        "ipsec-sa" arg,
                                        "topology" ("default" | "ipv4-multicast" | arg) (
                                            c(
                                                "disable",
                                                "metric" arg,
                                                "bandwidth-based-metrics" (
                                                    c(
                                                        "bandwidth" arg (
                                                            c(
                                                                "metric" arg
                                                            )
                                                        ).as(:oneline)
                                                    )
                                                )
                                            )
                                        )
                                      )
                                    )
                                ),
                                "sham-link-remote" arg (
                                    c(
                                        "metric" arg,
                                        "ipsec-sa" arg,
                                        "demand-circuit",
                                        "flood-reduction",
                                        "topology" ("default" | "ipv4-multicast" | arg) (
                                            c(
                                                "disable",
                                                "metric" arg,
                                                "bandwidth-based-metrics" (
                                                    c(
                                                        "bandwidth" arg (
                                                            c(
                                                                "metric" arg
                                                            )
                                                        ).as(:oneline)
                                                    )
                                                )
                                            )
                                        )
                                    )
                                ),
                                "interface" arg (
                                    c(
                                        c(
                                          "disable"
                                        ),
                                        "interface-type" arg,
                                        c(
                                          "link-protection",
                                          "node-link-protection"
                                        ),
                                        "no-eligible-backup",
                                        "passive" (
                                            c(
                                                "traffic-engineering" (
                                                    c(
                                                        "remote-node-id" (
                                                          ipaddr
                                                        )
                                                    )
                                                )
                                            )
                                        ),
                                        "secondary",
                                        "own-router-lsa",
                                        "bandwidth-based-metrics" (
                                            c(
                                                "bandwidth" arg (
                                                    c(
                                                        "metric" arg
                                                    )
                                                ).as(:oneline)
                                            )
                                        ),
                                        "metric" arg,
                                        "te-metric" arg,
                                        "priority" arg,
                                        "ldp-synchronization" (
                                          ldp_sync_obj
                                        ),
                                        "retransmit-interval" arg,
                                        "transit-delay" arg,
                                        "hello-interval" arg,
                                        "dead-interval" arg,
                                        c(
                                          "authentication" (
                                            juniper_ospf_authentication
                                          )
                                        ),
                                        "demand-circuit",
                                        "flood-reduction",
                                        "no-neighbor-down-notification",
                                        "ipsec-sa" arg,
                                        "topology" ("default" | "ipv4-multicast" | arg) (
                                            c(
                                                "disable",
                                                "metric" arg,
                                                "bandwidth-based-metrics" (
                                                    c(
                                                        "bandwidth" arg (
                                                            c(
                                                                "metric" arg
                                                            )
                                                        ).as(:oneline)
                                                    )
                                                )
                                            )
                                        ),
                                        "bfd-liveness-detection" (
                                            c(
                                                "version" arg,
                                                "minimum-interval" arg,
                                                "minimum-receive-interval" arg,
                                                "multiplier" arg,
                                                c(
                                                  "no-adaptation"
                                                ),
                                                "transmit-interval" (
                                                    c(
                                                        "minimum-interval" arg,
                                                        "threshold" arg
                                                    )
                                                ),
                                                "detection-time" (
                                                    c(
                                                        "threshold" arg
                                                    )
                                                ),
                                                "authentication" (
                                                    c(
                                                        "key-chain" arg,
                                                        "algorithm" arg,
                                                        "loose-check"
                                                    )
                                                ),
                                                "full-neighbors-only"
                                            )
                                        ),
                                        "dynamic-neighbors",
                                        "neighbor" arg (
                                            c(
                                                "eligible"
                                            )
                                        ).as(:oneline),
                                        "poll-interval" arg,
                                        "no-interface-state-traps"
                                    )
                                ),
                                "no-context-identifier-advertisement",
                                "context-identifier" arg,
                                "label-switched-path" arg (
                                    c(
                                        c(
                                          "disable"
                                        ),
                                        "metric" arg,
                                        "topology" ("default" | "ipv4-multicast" | arg) (
                                            c(
                                                "disable",
                                                "metric" arg,
                                                "bandwidth-based-metrics" (
                                                    c(
                                                        "bandwidth" arg (
                                                            c(
                                                                "metric" arg
                                                            )
                                                        ).as(:oneline)
                                                    )
                                                )
                                            )
                                        )
                                    )
                                ),
                                "peer-interface" arg (
                                    c(
                                        c(
                                          "disable"
                                        ),
                                        "retransmit-interval" arg,
                                        "transit-delay" arg,
                                        "hello-interval" arg,
                                        "dead-interval" arg,
                                        c(
                                          "authentication" (
                                            juniper_ospf_authentication
                                          )
                                        ),
                                        "demand-circuit",
                                        "flood-reduction",
                                        "no-neighbor-down-notification"
                                    )
                                )
                            )
                        )
                    )
                ),
                "rip" (
                  juniper_protocols_rip
                ),
                "ripng" (
                  juniper_protocols_ripng
                ),
                "isis" (
                  juniper_protocols_isis
                ),
                "esis" (
                  juniper_protocols_esis
                ),
                c(
                  "l2vpn" (
                    juniper_protocols_l2vpn
                  ),
                  "vpls" (
                    juniper_protocols_l2vpn
                  )
                ),
                "pim" (
                  juniper_protocols_pim
                ),
                "amt" (
                  juniper_protocols_amt
                ),
                "ldp" (
                  juniper_protocols_ldp
                ),
                "router-discovery" (
                  juniper_protocols_router_discovery
                ),
                "msdp" (
                  juniper_protocols_msdp
                ),
                "mvpn" (
                  juniper_protocols_mvpn
                ),
                "igmp-snooping" (
                  juniper_protocols_igmp_snooping
                ),
                "mpls" (
                  juniper_protocols_mpls
                ),
            )
        ),
        "bridge-domains" (
            c(
                "domain" (
                  juniper_bridge_domains
                )
            )
        ),
        "switch-options" (
          juniper_routing_instance_switch_options
        ),
        "pbb-options" (
          juniper_routing_instance_pbb_options
        ),
        "service-groups" (
          juniper_routing_instance_service_groups
        ),
        "layer3-domain-identifier" arg
    )
  )
end

rule(:juniper_protocols_l2vpn) do
    c(
        "traceoptions" (
            c(
                "file" (
                  trace_file_type
                ),
                "flag" ("error" | "topology" | "nlri" | "connections" | "automatic-site" | "oam" | "route" | "normal" | "general" | "state" | "policy" | "task" | "timer" | "all") (
                    c(
                        "send",
                        "receive",
                        "detail",
                        "disable"
                    )
                ).as(:oneline)
            )
        ),
        "encapsulation-type" arg,
        "control-word",
        "no-control-word",
        "site-range" arg,
        "label-block-size" arg,
        "mac-table-size" (
            c(
                "limit" arg,
                "packet-action" arg
            )
        ),
        "interface-mac-limit" (
            c(
                "limit" arg,
                "packet-action" arg
            )
        ),
        "mac-table-aging-time" arg,
        "no-mac-learning",
        "mac-statistics",
        "interface" arg (
            c(
                "interface-mac-limit" (
                    c(
                        "limit" arg,
                        "packet-action" arg
                    )
                ),
                "remote-site-id" arg,
                "static-mac" arg (
                    c(
                        "vlan-id" arg
                    )
                ),
                "no-mac-learning",
                "description" arg
            )
        ),
        c(
          "tunnel-services" (
              c(
                  "devices" (
                    interface_device
                  ),
                  "primary" (
                    interface_device
                  )
              )
          ),
          "no-tunnel-services"
        ),
        "site" arg (
            c(
                c(
                  "site-identifier" arg,
                  "automatic-site-id" (
                      c(
                          "startup-wait-time" arg,
                          "new-site-wait-time" arg,
                          "collision-detect-time" arg,
                          "reclaim-wait-time" (
                              c(
                                  "minimum" arg,
                                  "maximum" arg
                              )
                          ).as(:oneline)
                      )
                  )
                ),
                "multi-homing",
                "site-preference" arg,
                "mtu" arg,
                "ignore-mtu-mismatch",
                "mesh-group" arg,
                "active-interface" (
                    c(
                        c(
                          "any",
                          "primary" (
                            interface_name
                          )
                        )
                    )
                ).as(:oneline),
                "interface" arg (
                    c(
                        "interface-mac-limit" (
                            c(
                                "limit" arg,
                                "packet-action" arg
                            )
                        ),
                        "remote-site-id" arg,
                        "static-mac" arg (
                            c(
                                "vlan-id" arg
                            )
                        ),
                        "no-mac-learning",
                        "description" arg
                    )
                )
            )
        ),
        "community" arg,
        "vpls-id" arg,
        "mtu" arg,
        "ignore-mtu-mismatch",
        "mac-flush" (
            c(
                "any-interface",
                "any-spoke",
                "propagate"
            )
        ),
        "ignore-encapsulation-mismatch",
        "neighbor" arg (
            c(
                "static" (
                    c(
                        "incoming-label" arg,
                        "outgoing-label" arg
                    )
                ),
                "associate-profile",
                "psn-tunnel-endpoint" (
                  ipv4addr
                ),
                "community" arg,
                "encapsulation-type" arg,
                "ignore-encapsulation-mismatch",
                "pseudowire-status-tlv",
                "switchover-delay" arg,
                "revert-time" arg,
                "connection-protection",
                "backup-neighbor" arg (
                    c(
                        "static" (
                            c(
                                "incoming-label" arg,
                                "outgoing-label" arg
                            )
                        ),
                        "community" arg,
                        "psn-tunnel-endpoint" (
                          ipv4addr
                        ),
                        "standby"
                    )
                ),
                "oam"
            )
        ),
        "associate-profile",
        "mesh-group" arg (
            c(
                "associate-profile",
                c(
                  "peer-as" (
                      c(
                          "all"
                      )
                  )
                ),
                "vpls-id" arg,
                "vrf-import",
                "vrf-export",
                "vrf-target",
                "mac-flush",
                "local-switching",
                "neighbor",
                "route-distinguisher".as(:oneline)
            )
        ),
        "connectivity-type" arg,
        "oam"
    )
end

rule(:juniper_protocols_mvpn) do
    c(
        "traceoptions" (
            c(
                "file" (
                  trace_file_type
                ),
                "flag" ("error" | "topology" | "nlri" | "route" | "normal" | "general" | "state" | "policy" | "task" | "timer" | "all") (
                    c(
                        "send",
                        "receive",
                        "detail",
                        "disable"
                    )
                ).as(:oneline)
            )
        ),
        "autodiscovery-only" (
            c(
                "intra-as" (
                    c(
                        "inclusive"
                    )
                )
            )
        ),
        c(
          "receiver-site",
          "sender-site"
        ),
        "unicast-umh-election",
        "mvpn-mode" (
            c(
                c(
                  "rpt-spt" (
                      c(
                          "spt-switch-timer" arg
                      )
                  ),
                  "spt-only"
                )
            )
        ),
        "route-target" (
            c(
                "import-target" (
                    c(
                        "unicast" (
                            c(
                                c(
                                  "receiver",
                                  "sender"
                                )
                            )
                        ).as(:oneline),
                        "target" (
                            c(
                                "target-value" arg,
                                c(
                                  "receiver",
                                  "sender"
                                )
                            )
                        ).as(:oneline)
                    )
                ),
                "export-target" (
                    c(
                        "unicast",
                        "target" arg
                    )
                )
            )
        ),
        "mvpn-join-load-balance" (
            c(
                c(
                  "bytewise-xor-hash"
                )
            )
        )
    )
end

rule(:juniper_routing_instance_pbb_options) do
    c(
        "peer-instance" arg,
        "vlan-id" arg (
            c(
                "isid-list" arg
            )
        ).as(:oneline),
        "default-bvlan" arg
    )
end

rule(:juniper_routing_instance_service_groups) do
  arg.as(:arg) (
    c(
        "service-type" arg,
        "pbb-service-options" (
            c(
                "isid" arg (
                    c(
                        c(
                          "vlan-id-list" arg,
                          "interface" (
                            interface_name
                          )
                        )
                    )
                ).as(:oneline),
                "default-isid" arg,
                "mac-address" (
                  mac_addr
                )
            )
        )
    )
  )
end

rule(:juniper_routing_instance_switch_options) do
    c(
        "mac-table-size" (
            c(
                "limit" arg,
                "packet-action" arg
            )
        ),
        "interface-mac-limit" (
            c(
                "limit" arg,
                "packet-action" arg
            )
        ),
        "mac-table-aging-time" arg,
        "no-mac-learning",
        "mac-statistics",
        "service-id" arg,
        "interface" arg (
            c(
                "interface-mac-limit" (
                    c(
                        "limit" arg,
                        "packet-action" arg
                    )
                ),
                "remote-site-id" arg,
                "static-mac" arg (
                    c(
                        "vlan-id" arg
                    )
                ),
                "no-mac-learning",
                "description" arg
            )
        )
    )
end

rule(:juniper_routing_options) do
    c(
        "med-igp-update-interval" arg,
        "bmp" (
            c(
                "station-address" (
                  ipv4addr
                ),
                "station-port" arg,
                "statistics-timeout" arg,
                "memory-limit" arg
            )
        ),
        "bgp-orf-cisco-mode",
        "ppm" (
            c(
                "no-delegate-processing"
            )
        ),
        "source-routing" (
            c(
                "ip",
                "ipv6"
            )
        ),
        "srlg" arg (
            c(
                "srlg-value" arg,
                "srlg-cost" arg
            )
        ),
        "admin-groups-extended-range" (
            c(
                "minimum" arg,
                "maximum" arg
            )
        ),
        "admin-groups-extended" arg (
            c(
                "group-value" arg
            )
        ),
        "traceoptions" (
            c(
                "file" (
                  trace_file_type
                ),
                "flag" ("parse" | "regex-parse" | "config-internal" | "nsr-synchronization" | "condition-manager" | "graceful-restart" | "route" | "normal" | "general" | "state" | "policy" | "task" | "timer" | "all") (
                    c(
                        "disable"
                    )
                ).as(:oneline)
            )
        ),
        "options" (
            c(
                "syslog" (
                    c(
                        "level" (
                            c(
                                "emergency",
                                "alert",
                                "critical",
                                "error",
                                "warning",
                                "notice",
                                "info",
                                "debug"
                            )
                        ).as(:oneline),
                        "upto" arg
                    )
                ),
                "mark" arg
            )
        ),
        "graceful-restart" (
            c(
                c(
                  "disable"
                ),
                "restart-duration" arg
            )
        ),
        "nonstop-routing",
        "interface-routes" (
            c(
                "rib-group" (
                  rib_group_type
                ),
                "family" ("inet" | "inet6") (
                    c(
                        "import" (
                          policy_algebra
                        ),
                        "export" (
                            c(
                                "point-to-point",
                                "lan"
                            )
                        )
                    )
                )
            )
        ),
        "rib" arg (
            c(
                "static" (
                    c(
                        "rib-group" arg,
                        "defaults" (
                            c(
                                "retain",
                                "no-retain",
                                "install",
                                "no-install",
                                "readvertise",
                                "no-readvertise",
                                "resolve",
                                "no-resolve",
                                c(
                                  "active",
                                  "passive"
                                ),
                                "metric" (
                                  rib_static_metric_type
                                ),
                                "metric2" (
                                  rib_static_metric_type
                                ),
                                "metric3" (
                                  rib_static_metric_type
                                ),
                                "metric4" (
                                  rib_static_metric_type
                                ),
                                "tag" (
                                  rib_static_metric_type
                                ),
                                "tag2" (
                                  rib_static_metric_type
                                ),
                                "preference" (
                                  rib_static_metric_type
                                ),
                                "preference2" (
                                  rib_static_metric_type
                                ),
                                "color" (
                                  rib_static_metric_type
                                ),
                                "color2" (
                                  rib_static_metric_type
                                ),
                                "community" (
                                  community
                                ),
                                "as-path" (
                                    c(
                                        "path" arg,
                                        "origin" arg,
                                        "atomic-aggregate",
                                        "aggregator" (
                                            c(
                                                "as-number" arg,
                                                "address" (
                                                  ipv4addr
                                                )
                                            )
                                        )
                                    )
                                )
                            )
                        ),
                        "route" arg (
                            c(
                                c(
                                  "next-hop" (
                                    ipaddr_or_interface
                                  ),
                                  "reject",
                                  "discard",
                                  "receive",
                                  "next-table" arg
                                ),
                                "qualified-next-hop" (
                                  qualified_nh_obj
                                ),
                                "lsp-next-hop" (
                                  lsp_nh_obj
                                ),
                                "static-lsp-next-hop" (
                                  lsp_nh_obj
                                ),
                                "p2mp-lsp-next-hop" (
                                  lsp_nh_obj
                                ),
                                "backup-pe-group" arg,
                                "bfd-liveness-detection" (
                                    c(
                                        "version" arg,
                                        "minimum-interval" arg,
                                        "minimum-receive-interval" arg,
                                        "multiplier" arg,
                                        c(
                                          "no-adaptation"
                                        ),
                                        "transmit-interval" (
                                            c(
                                                "minimum-interval" arg,
                                                "threshold" arg
                                            )
                                        ),
                                        "detection-time" (
                                            c(
                                                "threshold" arg
                                            )
                                        ),
                                        "authentication" (
                                            c(
                                                "key-chain" arg,
                                                "algorithm" arg,
                                                "loose-check"
                                            )
                                        ),
                                        "neighbor" (
                                          ipaddr
                                        ),
                                        "local-address" (
                                          ipaddr
                                        ),
                                        "holddown-interval" arg,
                                        "minimum-receive-ttl" arg
                                    )
                                ),
                                "retain",
                                "no-retain",
                                "install",
                                "no-install",
                                "readvertise",
                                "no-readvertise",
                                "resolve",
                                "no-resolve",
                                c(
                                  "active",
                                  "passive"
                                ),
                                "metric" (
                                  rib_static_metric_type
                                ),
                                "metric2" (
                                  rib_static_metric_type
                                ),
                                "metric3" (
                                  rib_static_metric_type
                                ),
                                "metric4" (
                                  rib_static_metric_type
                                ),
                                "tag" (
                                  rib_static_metric_type
                                ),
                                "tag2" (
                                  rib_static_metric_type
                                ),
                                "preference" (
                                  rib_static_metric_type
                                ),
                                "preference2" (
                                  rib_static_metric_type
                                ),
                                "color" (
                                  rib_static_metric_type
                                ),
                                "color2" (
                                  rib_static_metric_type
                                ),
                                "community" (
                                  community
                                ),
                                "as-path" (
                                    c(
                                        "path" arg,
                                        "origin" arg,
                                        "atomic-aggregate",
                                        "aggregator" (
                                            c(
                                                "as-number" arg,
                                                "address" (
                                                  ipv4addr
                                                )
                                            )
                                        )
                                    )
                                )
                            )
                        ),
                        "iso-route" arg (
                            c(
                                c(
                                  "next-hop" (
                                    ipaddr_or_interface
                                  ),
                                  "reject",
                                  "discard",
                                  "receive",
                                  "next-table" arg
                                ),
                                "qualified-next-hop" (
                                  qualified_nh_obj
                                ),
                                "lsp-next-hop" (
                                  lsp_nh_obj
                                ),
                                "static-lsp-next-hop" (
                                  lsp_nh_obj
                                ),
                                "p2mp-lsp-next-hop" (
                                  lsp_nh_obj
                                ),
                                "backup-pe-group" arg,
                                "bfd-liveness-detection" (
                                    c(
                                        "version" arg,
                                        "minimum-interval" arg,
                                        "minimum-receive-interval" arg,
                                        "multiplier" arg,
                                        c(
                                          "no-adaptation"
                                        ),
                                        "transmit-interval" (
                                            c(
                                                "minimum-interval" arg,
                                                "threshold" arg
                                            )
                                        ),
                                        "detection-time" (
                                            c(
                                                "threshold" arg
                                            )
                                        ),
                                        "authentication" (
                                            c(
                                                "key-chain" arg,
                                                "algorithm" arg,
                                                "loose-check"
                                            )
                                        ),
                                        "neighbor" (
                                          ipaddr
                                        ),
                                        "local-address" (
                                          ipaddr
                                        ),
                                        "holddown-interval" arg,
                                        "minimum-receive-ttl" arg
                                    )
                                ),
                                "retain",
                                "no-retain",
                                "install",
                                "no-install",
                                "readvertise",
                                "no-readvertise",
                                "resolve",
                                "no-resolve",
                                c(
                                  "active",
                                  "passive"
                                ),
                                "metric" (
                                  rib_static_metric_type
                                ),
                                "metric2" (
                                  rib_static_metric_type
                                ),
                                "metric3" (
                                  rib_static_metric_type
                                ),
                                "metric4" (
                                  rib_static_metric_type
                                ),
                                "tag" (
                                  rib_static_metric_type
                                ),
                                "tag2" (
                                  rib_static_metric_type
                                ),
                                "preference" (
                                  rib_static_metric_type
                                ),
                                "preference2" (
                                  rib_static_metric_type
                                ),
                                "color" (
                                  rib_static_metric_type
                                ),
                                "color2" (
                                  rib_static_metric_type
                                ),
                                "community" (
                                  community
                                ),
                                "as-path" (
                                    c(
                                        "path" arg,
                                        "origin" arg,
                                        "atomic-aggregate",
                                        "aggregator" (
                                            c(
                                                "as-number" arg,
                                                "address" (
                                                  ipv4addr
                                                )
                                            )
                                        )
                                    )
                                )
                            )
                        )
                    )
                ),
                "martians" (
                  martian_type
                ),
                "aggregate" (
                  rib_aggregate_type
                ),
                "generate" (
                  rib_aggregate_type
                ),
                c(
                  "maximum-paths" (
                      c(
                          "limit" arg,
                          c(
                            "threshold" arg,
                            "log-only"
                          ),
                          "log-interval" arg
                      )
                  ).as(:oneline)
                ),
                "maximum-prefixes" (
                    c(
                        "limit" arg,
                        c(
                          "threshold" arg,
                          "log-only"
                        ),
                        "log-interval" arg
                    )
                ).as(:oneline),
                "multipath" (
                    c(
                        "vpn-unequal-cost" (
                            c(
                                "equal-external-internal"
                            )
                        ).as(:oneline),
                        "as-path-compare"
                    )
                ),
                "label" (
                    c(
                        "allocation" (
                          policy_algebra
                        ),
                        "substitution" (
                          policy_algebra
                        )
                    )
                ),
                "access" (
                    c(
                        "route" arg (
                            c(
                                "next-hop" (
                                  ipaddr_or_interface
                                ),
                                "qualified-next-hop" (
                                  qualified_nh_obj
                                ),
                                "metric" arg,
                                "preference" arg,
                                "tag" arg
                            )
                        )
                    )
                ),
                "access-internal" (
                    c(
                        "route" arg (
                            c(
                                "next-hop" (
                                  ipaddr_or_interface
                                ),
                                "qualified-next-hop" (
                                  qualified_nh_obj
                                )
                            )
                        )
                    )
                )
            )
        ),
        "static" (
            c(
                "rib-group" arg,
                "defaults" (
                    c(
                        "retain",
                        "no-retain",
                        "install",
                        "no-install",
                        "readvertise",
                        "no-readvertise",
                        "resolve",
                        "no-resolve",
                        c(
                          "active",
                          "passive"
                        ),
                        "metric" (
                          rib_static_metric_type
                        ),
                        "metric2" (
                          rib_static_metric_type
                        ),
                        "metric3" (
                          rib_static_metric_type
                        ),
                        "metric4" (
                          rib_static_metric_type
                        ),
                        "tag" (
                          rib_static_metric_type
                        ),
                        "tag2" (
                          rib_static_metric_type
                        ),
                        "preference" (
                          rib_static_metric_type
                        ),
                        "preference2" (
                          rib_static_metric_type
                        ),
                        "color" (
                          rib_static_metric_type
                        ),
                        "color2" (
                          rib_static_metric_type
                        ),
                        "community" (
                          community
                        ),
                        "as-path" (
                            c(
                                "path" arg,
                                "origin" arg,
                                "atomic-aggregate",
                                "aggregator" (
                                    c(
                                        "as-number" arg,
                                        "address" (
                                          ipv4addr
                                        )
                                    )
                                )
                            )
                        )
                    )
                ),
                "route" arg (
                    c(
                        c(
                          "next-hop" (
                            ipaddr_or_interface
                          ),
                          "reject",
                          "discard",
                          "receive",
                          "next-table" arg
                        ),
                        "qualified-next-hop" (
                          qualified_nh_obj
                        ),
                        "lsp-next-hop" (
                          lsp_nh_obj
                        ),
                        "static-lsp-next-hop" (
                          lsp_nh_obj
                        ),
                        "p2mp-lsp-next-hop" (
                          lsp_nh_obj
                        ),
                        "backup-pe-group" arg,
                        "bfd-liveness-detection" (
                            c(
                                "version" arg,
                                "minimum-interval" arg,
                                "minimum-receive-interval" arg,
                                "multiplier" arg,
                                c(
                                  "no-adaptation"
                                ),
                                "transmit-interval" (
                                    c(
                                        "minimum-interval" arg,
                                        "threshold" arg
                                    )
                                ),
                                "detection-time" (
                                    c(
                                        "threshold" arg
                                    )
                                ),
                                "authentication" (
                                    c(
                                        "key-chain" arg,
                                        "algorithm" arg,
                                        "loose-check"
                                    )
                                ),
                                "neighbor" (
                                  ipaddr
                                ),
                                "local-address" (
                                  ipaddr
                                ),
                                "holddown-interval" arg,
                                "minimum-receive-ttl" arg
                            )
                        ),
                        "retain",
                        "no-retain",
                        "install",
                        "no-install",
                        "readvertise",
                        "no-readvertise",
                        "resolve",
                        "no-resolve",
                        c(
                          "active",
                          "passive"
                        ),
                        "metric" (
                          rib_static_metric_type
                        ),
                        "metric2" (
                          rib_static_metric_type
                        ),
                        "metric3" (
                          rib_static_metric_type
                        ),
                        "metric4" (
                          rib_static_metric_type
                        ),
                        "tag" (
                          rib_static_metric_type
                        ),
                        "tag2" (
                          rib_static_metric_type
                        ),
                        "preference" (
                          rib_static_metric_type
                        ),
                        "preference2" (
                          rib_static_metric_type
                        ),
                        "color" (
                          rib_static_metric_type
                        ),
                        "color2" (
                          rib_static_metric_type
                        ),
                        "community" (
                          community
                        ),
                        "as-path" (
                            c(
                                "path" arg,
                                "origin" arg,
                                "atomic-aggregate",
                                "aggregator" (
                                    c(
                                        "as-number" arg,
                                        "address" (
                                          ipv4addr
                                        )
                                    )
                                )
                            )
                        )
                    )
                ),
                "iso-route" arg (
                    c(
                        c(
                          "next-hop" (
                            ipaddr_or_interface
                          ),
                          "reject",
                          "discard",
                          "receive",
                          "next-table" arg
                        ),
                        "qualified-next-hop" (
                          qualified_nh_obj
                        ),
                        "lsp-next-hop" (
                          lsp_nh_obj
                        ),
                        "static-lsp-next-hop" (
                          lsp_nh_obj
                        ),
                        "p2mp-lsp-next-hop" (
                          lsp_nh_obj
                        ),
                        "backup-pe-group" arg,
                        "bfd-liveness-detection" (
                            c(
                                "version" arg,
                                "minimum-interval" arg,
                                "minimum-receive-interval" arg,
                                "multiplier" arg,
                                c(
                                  "no-adaptation"
                                ),
                                "transmit-interval" (
                                    c(
                                        "minimum-interval" arg,
                                        "threshold" arg
                                    )
                                ),
                                "detection-time" (
                                    c(
                                        "threshold" arg
                                    )
                                ),
                                "authentication" (
                                    c(
                                        "key-chain" arg,
                                        "algorithm" arg,
                                        "loose-check"
                                    )
                                ),
                                "neighbor" (
                                  ipaddr
                                ),
                                "local-address" (
                                  ipaddr
                                ),
                                "holddown-interval" arg,
                                "minimum-receive-ttl" arg
                            )
                        ),
                        "retain",
                        "no-retain",
                        "install",
                        "no-install",
                        "readvertise",
                        "no-readvertise",
                        "resolve",
                        "no-resolve",
                        c(
                          "active",
                          "passive"
                        ),
                        "metric" (
                          rib_static_metric_type
                        ),
                        "metric2" (
                          rib_static_metric_type
                        ),
                        "metric3" (
                          rib_static_metric_type
                        ),
                        "metric4" (
                          rib_static_metric_type
                        ),
                        "tag" (
                          rib_static_metric_type
                        ),
                        "tag2" (
                          rib_static_metric_type
                        ),
                        "preference" (
                          rib_static_metric_type
                        ),
                        "preference2" (
                          rib_static_metric_type
                        ),
                        "color" (
                          rib_static_metric_type
                        ),
                        "color2" (
                          rib_static_metric_type
                        ),
                        "community" (
                          community
                        ),
                        "as-path" (
                            c(
                                "path" arg,
                                "origin" arg,
                                "atomic-aggregate",
                                "aggregator" (
                                    c(
                                        "as-number" arg,
                                        "address" (
                                          ipv4addr
                                        )
                                    )
                                )
                            )
                        )
                    )
                )
            )
        ),
        "martians" (
          martian_type
        ),
        "aggregate" (
          rib_aggregate_type
        ),
        "generate" (
          rib_aggregate_type
        ),
        c(
          "maximum-paths" (
              c(
                  "limit" arg,
                  c(
                    "threshold" arg,
                    "log-only"
                  ),
                  "log-interval" arg
              )
          ).as(:oneline)
        ),
        "maximum-prefixes" (
            c(
                "limit" arg,
                c(
                  "threshold" arg,
                  "log-only"
                ),
                "log-interval" arg
            )
        ).as(:oneline),
        "multipath" (
            c(
                "vpn-unequal-cost" (
                    c(
                        "equal-external-internal"
                    )
                ).as(:oneline),
                "as-path-compare"
            )
        ),
        "label" (
            c(
                "allocation" (
                  policy_algebra
                ),
                "substitution" (
                  policy_algebra
                )
            )
        ),
        "access" (
            c(
                "route" arg (
                    c(
                        "next-hop" (
                          ipaddr_or_interface
                        ),
                        "qualified-next-hop" (
                          qualified_nh_obj
                        ),
                        "metric" arg,
                        "preference" arg,
                        "tag" arg
                    )
                )
            )
        ),
        "access-internal" (
            c(
                "route" arg (
                    c(
                        "next-hop" (
                          ipaddr_or_interface
                        ),
                        "qualified-next-hop" (
                          qualified_nh_obj
                        )
                    )
                )
            )
        ),
        "rib-groups" (
          rpd_rib_group_type
        ),
        "route-record",
        "router-id" (
          ipv4addr
        ),
        "route-distinguisher-id" (
          ipv4addr
        ),
        "autonomous-system" (
            c(
                "as-number" arg,
                "loops" arg,
                "asdot-notation",
                "independent-domain" (
                    c(
                        "no-attrset"
                    )
                ).as(:oneline)
            )
        ).as(:oneline),
        "confederation" (
            c(
                "confederation-as" arg,
                "members" arg
            )
        ).as(:oneline),
        "forwarding-table" (
          forwarding_table_type
        ),
        "resolution" (
            c(
                "tracefilter" (
                  policy_algebra
                ),
                "traceoptions" (
                    c(
                        "file" (
                          trace_file_type
                        ),
                        "flag" ("event" | "flash" | "kernel" | "indirect" | "task" | "all") (
                            c(
                                "send",
                                "receive",
                                "detail",
                                "disable"
                            )
                        ).as(:oneline)
                    )
                ),
                "rib" arg (
                    c(
                        "resolution-ribs" arg,
                        "import" (
                          policy_algebra
                        )
                    )
                )
            )
        ),
        "multicast" (
            c(
                "traceoptions" (
                    c(
                        "file" (
                          trace_file_type
                        ),
                        "flag" ("parse" | "config-internal" | "route" | "normal" | "general" | "state" | "policy" | "task" | "timer" | "all") (
                            c(
                                "disable"
                            )
                        ).as(:oneline)
                    )
                ),
                "scope" arg (
                    c(
                        "prefix" (
                          ipprefix
                        ),
                        "interface" (
                          interface_name
                        )
                    )
                ),
                "scope-policy" (
                  policy_algebra
                ),
                "flow-map" arg (
                    c(
                        "policy" (
                          policy_algebra
                        ),
                        "bandwidth" (
                            c(
                                "bandwidth-value" arg,
                                "adaptive"
                            )
                        ).as(:oneline),
                        "redundant-sources" (
                          ipaddr
                        ),
                        "forwarding-cache" (
                            c(
                                "timeout" (
                                    c(
                                        c(
                                          "timeout-value" arg,
                                          "never" (
                                              c(
                                                  "non-discard-entry-only"
                                              )
                                          )
                                        )
                                    )
                                ).as(:oneline)
                            )
                        )
                    )
                ),
                "ssm-groups" (
                  ipprefix
                ),
                "asm-override-ssm",
                "rpf-check-policy" (
                  policy_algebra
                ),
                "pim-to-igmp-proxy" (
                    c(
                        "upstream-interface" (
                          interface_name
                        )
                    )
                ),
                "pim-to-mld-proxy" (
                    c(
                        "upstream-interface" (
                          interface_name
                        )
                    )
                ),
                "forwarding-cache" (
                    c(
                        "threshold" (
                            c(
                                "suppress" arg,
                                "reuse" arg
                            )
                        ),
                        "timeout" arg
                    )
                ),
                "interface" (
                  multicast_interface_options_type
                ),
                "ssm-map" arg (
                    c(
                        "policy" (
                          policy_algebra
                        ),
                        "source" (
                          ipaddr
                        )
                    )
                ),
                "backup-pe-group" arg (
                    c(
                        "backups" (
                          ipaddr
                        ),
                        "local-address" (
                          ipaddr
                        )
                    )
                )
            )
        ),
        "instance-import" (
          policy_algebra
        ),
        "instance-export" (
          policy_algebra
        ),
        "auto-export" (
            c(
                c(
                  "disable"
                ),
                "traceoptions" (
                    c(
                        "file" (
                          trace_file_type
                        ),
                        "flag" ("export" | "route" | "normal" | "general" | "state" | "policy" | "task" | "timer" | "all") (
                            c(
                                "send",
                                "receive",
                                "detail",
                                "disable"
                            )
                        ).as(:oneline)
                    )
                ),
                "family" (
                    c(
                        "inet" (
                          export_af_obj
                        ),
                        "inet6" (
                          export_af_obj
                        ),
                        "iso" (
                          export_af_obj
                        )
                    )
                )
            )
        ),
        "dynamic-tunnels" (
            c(
                "traceoptions" (
                    c(
                        "file" (
                          trace_file_type
                        ),
                        "flag" ("kernel" | "tunnel" | "task" | "all") (
                            c(
                                "send",
                                "receive",
                                "detail",
                                "disable"
                            )
                        ).as(:oneline)
                    )
                ),
                "dynamic-tunnel" (
                  dynamic_tunnel_type
                )
            )
        ),
        "flow" (
            c(
                "validation" (
                    c(
                        "traceoptions" (
                          flow_dep_traceoptions
                        )
                    )
                ),
                "route" arg (
                    c(
                        "match" (
                          flow_route_qualifier
                        ),
                        "then" (
                          flow_route_op
                        )
                    )
                ),
                "term-order" arg
            )
        ),
        "topologies" (
            c(
                "family" ("inet" | "inet6") (
                    c(
                        "topology" arg
                    )
                )
            )
        ),
        "fate-sharing" (
            c(
                "group" arg (
                    c(
                        "cost" arg,
                        "from" (
                          fate_sharing_links
                        )
                    )
                )
            )
        )
    )
end

rule(:dynamic_tunnel_type) do
  arg.as(:arg) (
    c(
        "source-address" (
          ipaddr
        ),
        c(
          "rsvp-te" arg (
              c(
                  "label-switched-path-template" (
                      c(
                          c(
                            "template-name" arg,
                            "default-template"
                          )
                      )
                  ),
                  "destination-networks" (
                    network_type
                  )
              )
          ),
          "gre",
          "udp",
        ),
        "destination-networks" (
          network_type
        )
    )
  )
end

rule(:export_af_obj) do
    c(
        c(
          "disable"
        ),
        "unicast" (
          export_subaf_obj
        ),
        "multicast" (
          export_subaf_obj
        ),
        "flow" (
          export_subaf_obj
        )
    )
end

rule(:export_subaf_obj) do
    c(
        c(
          "disable"
        ),
        "rib-group" arg
    )
end

rule(:fate_sharing_links) do
  arg.as(:arg) (
    c(
        "to" (
          ipv4addr
        )
    )
  ).as(:oneline)
end

rule(:flow_dep_traceoptions) do
    c(
        "file" (
          trace_file_type
        ),
        "flag" ("resolution" | "flash" | "route" | "normal" | "general" | "state" | "policy" | "task" | "timer" | "all") (
            c(
                "send",
                "receive",
                "detail",
                "disable",
                "filter" (
                    c(
                        "match-on" arg,
                        "policy" (
                          policy_algebra
                        )
                    )
                ).as(:oneline)
            )
        ).as(:oneline)
    )
end

rule(:flow_route_op) do
    c(
        "community" arg,
        c(
          "accept",
          "discard",
          "rate-limit" arg
        ),
        "routing-instance" arg,
        "sample",
        "next-term"
    )
end

rule(:flow_route_qualifier) do
    c(
        "destination" (
          ipprefix
        ),
        "source" (
          ipprefix
        ),
        "protocol" arg,
        "port" arg,
        "destination-port" arg,
        "source-port" arg,
        "icmp-type" arg,
        "icmp-code" arg,
        "tcp-flags" arg,
        "packet-length" (
          policy_algebra
        ),
        "dscp" (
          policy_algebra
        ),
        "fragment" arg
    )
end

rule(:forwarding_table_type) do
    c(
        "export" (
          policy_algebra
        ),
        "indirect-next-hop",
        "no-indirect-next-hop",
        "indirect-next-hop-change-acknowledgements",
        "no-indirect-next-hop-change-acknowledgements",
        "indexed-next-hop",
        "unicast-reverse-path" arg,
        "chained-composite-next-hop"
    )
end

rule(:juniper_sampling_options) do
    c(
        c(
          "disable"
        ),
        "traceoptions" (
          sampling_traceoptions_type
        ),
        "sample-once",
        "input" (
          sampling_input_type
        ),
        "family" (
            c(
                ("inet" | "mpls") (
                    c(
                        c(
                          "disable"
                        ),
                        "output" (
                          sampling_instance_inet_global_output_type
                        )
                    )
                ),
                "inet6" (
                    c(
                        c(
                          "disable"
                        ),
                        "output" (
                          sampling_family_inet6_output_type
                        )
                    )
                )
            )
        ),
        "instance" arg (
          c(
            "disable",
            "input" (
              c(
                "rate" arg,
                "run-length" arg,
                "max-packets-per-second" arg,
                "maximum-packet-length" arg
              )
            ),
            "family" ("mpls" | "inet6" | "inet" ) (
              c(
                "disable",
                "output" (
                  c(
                    "aggregate-export-interval" arg,
                    "flow-active-timeout" arg,
                    "flow-inactive-timeout" arg,
                    "extension-service" arg,
                    "flow-server" arg (
                      c(
                        "aggregation" (
                          c(
                            "autonomous-system",
                            "destination-prefix",
                            "protocol-port",
                            "source-destination-prefix" (
                              "caida-compliant"
                            ),
                            "source-prefix"
                          )
                        ),
                        "autonomous-system-type" ("origin" | "peer"),
                        ("local-dump" | "no-local-dump"),
                        "port" arg,
                        "source-address" ipaddr,
                        "version" arg,
                        "version9" (
                          "template" arg
                        )
                      )
                    ),
                    "interface" arg (
                      c(
                        "engine-id" arg,
                        "engine-type" arg,
                        "source-address" ipaddr
                      )
                    ),
                    "inline-jflow" (
                      "source-address" ipaddr,
                      "flow-export-rate" arg
                    )
                  )
                )
              )
            )
          )
        )
    )
end

rule(:juniper_services_captive_portal) do
    c(
        "authentication-profile-name" arg,
        "traceoptions" (
            c(
                "file" (
                  esp_trace_file_type
                ),
                "flag" ("dot1x-debug" | "parse" | "esw-if" | "config-internal" | "normal" | "general" | "state" | "task" | "timer" | "all") (
                    c(
                        "disable"
                    )
                ).as(:oneline)
            )
        ),
        "interface" ("all" | "name") (
            c(
                "supplicant" arg,
                "retries" arg,
                "quiet-period" arg,
                "server-timeout" arg,
                "session-expiry" arg
            )
        ),
        "secure-authentication" arg,
        "custom-options" (
            c(
                "header-logo" arg,
                "header-bgcolor" arg,
                "header-text-color" arg,
                "header-message" arg,
                "banner-message" arg,
                "form-header-message" arg,
                "form-header-bgcolor" arg,
                "form-header-text-color" arg,
                "form-submit-label" arg,
                "form-reset-label" arg,
                "footer-message" arg,
                "footer-bgcolor" arg,
                "footer-text-color" arg,
                "post-authentication-url" arg
            )
        )
    )
end

rule(:juniper_system) do
    c(
        "autoinstallation" (
            c(
                "interfaces" arg (
                    c(
                        "bootp",
                        "rarp",
                        "slarp"
                    )
                ),
                "configuration-servers" arg (
                    c(
                        "password" (
                          unreadable
                        )
                    )
                ).as(:oneline),
                "usb"
            )
        ),
        "host-name" arg,
        "auto-snapshot",
        "domain-name" arg,
        "domain-search" arg,
        "backup-router" (
            c(
                "address" (
                  ipv4addr
                ),
                "destination" (
                  ipv4prefix
                )
            )
        ).as(:oneline),
        "inet6-backup-router" (
            c(
                "address" (
                  ipv6addr
                ),
                "destination" (
                  ipv6prefix
                )
            )
        ).as(:oneline),
        "time-zone" arg,
        "use-imported-time-zones",
        "no-debugger-on-alt-break",
        "default-address-selection",
        "nd-maxmcast-solicit" arg,
        "nd-retrasmit-timer" arg,
        "no-neighbor-learn",
        "no-multicast-echo",
        "no-redirects",
        "no-ping-record-route",
        "no-ping-time-stamp",
        "dump-device" arg,
        "arp" (
            c(
                "aging-timer" arg,
                "interfaces" (
                    c(
                        "arp-interface" (
                          arp_interface_type
                        )
                    )
                ),
                "passive-learning",
                "purging",
                "gratuitous-arp-on-ifup",
                "gratuitous-arp-delay" arg
            )
        ),
        "saved-core-files" arg,
        "saved-core-context",
        "no-saved-core-context",
        "kernel-replication",
        "mirror-flash-on-disk",
        "internet-options" (
            c(
                "icmpv4-rate-limit" (
                    c(
                        "packet-rate" arg,
                        "bucket-size" arg
                    )
                ).as(:oneline),
                "icmpv6-rate-limit" (
                    c(
                        "packet-rate" arg,
                        "bucket-size" arg
                    )
                ).as(:oneline),
                "path-mtu-discovery",
                "no-path-mtu-discovery",
                "gre-path-mtu-discovery",
                "no-gre-path-mtu-discovery",
                "ipip-path-mtu-discovery",
                "no-ipip-path-mtu-discovery",
                "source-port" (
                    c(
                        "upper-limit" arg
                    )
                ),
                "source-quench",
                "no-source-quench",
                "tcp-mss" arg,
                "tcp-drop-synfin-set",
                "no-tcp-rfc1323",
                "no-tcp-rfc1323-paws",
                "ipv6-reject-zero-hop-limit",
                "no-ipv6-reject-zero-hop-limit",
                "ipv6-duplicate-addr-detection-transmits" arg,
                "ipv6-path-mtu-discovery",
                "no-ipv6-path-mtu-discovery",
                "ipv6-path-mtu-discovery-timeout" arg,
                "no-tcp-reset" arg
            )
        ),
        "authentication-order" arg,
        "location" (
          location_type
        ),
        "ports" (
            c(
                "console" (
                  tty_port_object
                ),
                "auxiliary" (
                  tty_port_object
                )
            )
        ),
        "diag-port-authentication" (
            c(
                "plain-text-password-value" arg,
                "encrypted-password" arg
            )
        ),
        "pic-console-authentication" (
            c(
                "plain-text-password-value" arg,
                "encrypted-password" arg
            )
        ),
        "root-authentication" (
          authentication_object
        ),
        "name-server" (
          nameserver_object
        ),
        "radius-server" (
          radius_server_object
        ),
        "dynamic-profile-options" (
          dynamic_profile_option_object
        ),
        "tacplus-server" (
          tacplus_server_object
        ),
        "radius-options" (
            c(
                "password-protocol" arg,
                "attributes" (
                    c(
                        "nas-ip-address" (
                          ipaddr
                        )
                    )
                )
            )
        ),
        "tacplus-options" (
            c(
                "service-name" arg,
                c(
                  "no-cmd-attribute-value",
                  "exclude-cmd-attribute"
                ),
                "timestamp-and-timezone"
            )
        ),
        "accounting" (
            c(
                "events" arg,
                "traceoptions" (
                    c(
                        "no-remote-trace",
                        "file" (
                            c(
                                "filename" arg,
                                "size" arg,
                                "files" arg,
                                "world-readable",
                                "no-world-readable"
                            )
                        ).as(:oneline),
                        "flag" ("all" | "events" | "config" | "radius").as(:oneline)
                    )
                ),
                "destination" (
                    c(
                        "radius" (
                            c(
                                "server" (
                                  radius_server_object
                                )
                            )
                        ),
                        "tacplus" (
                            c(
                                "server" (
                                  tacplus_server_object
                                )
                            )
                        )
                    )
                )
            )
        ),
        "allow-v4mapped-packets",
        "donot-disable-ip6op-ondad",
        "scripts" (
          scripts_type
        ),
        "login" (
            c(
                "announcement" arg,
                "message" arg,
                "retry-options" (
                    c(
                        "tries-before-disconnect" arg,
                        "backoff-threshold" arg,
                        "backoff-factor" arg,
                        "minimum-time" arg,
                        "maximum-time" arg,
                        "lockout-period" arg
                    )
                ),
                "class" (
                  login_class_object
                ),
                "user" (
                  login_user_object
                ),
                "password" (
                    c(
                        "minimum-length" arg,
                        "maximum-length" arg,
                        "change-type" arg,
                        "minimum-changes" arg,
                        "format" arg
                    )
                ),
                "deny-sources" (
                    c(
                        "address" (
                          ipprefix_optional
                        )
                    )
                )
            )
        ),
        "static-host-mapping" arg (
            c(
                "inet" (
                  ipv4addr
                ),
                "inet6" (
                  ipv6addr
                ),
                "sysid" (
                  sysid
                ),
                "alias" arg
            )
        ),
        "services" (
            c(
                "finger" (
                    c(
                        "connection-limit" arg,
                        "rate-limit" arg
                    )
                ),
                "ftp" (
                    c(
                        "connection-limit" arg,
                        "rate-limit" arg
                    )
                ),
                "ssh" (
                    c(
                        "root-login" arg,
                        c(
                          "tcp-forwarding",
                          "no-tcp-forwarding",
                          "no-passwords",
                          "no-public-keys"
                        ),
                        "protocol-version" arg,
                        "max-sessions-per-connection" arg,
                        "ciphers" arg,
                        "macs" arg,
                        "key-exchange" arg,
                        "client-alive-count-max" arg,
                        "client-alive-interval" arg,
                        "hostkey-algorithm" (
                            c(
                                c(
                                  "no-ssh-dss",
                                  "ssh-dss"
                                ),
                                c(
                                  "no-ssh-rsa",
                                  "ssh-rsa"
                                ),
                                c(
                                  "no-ssh-ecdsa",
                                  "ssh-ecdsa"
                                ),
                                c(
                                  "no-ssh-ed25519",
                                  "ssh-ed25519"
                                )
                            )
                        ),
                        "connection-limit" arg,
                        "rate-limit" arg,
                        "authentication-order" any
                    )
                ),
                "telnet" (
                    c(
                        "connection-limit" arg,
                        "rate-limit" arg
                    )
                ),
                "xnm-clear-text" (
                    c(
                        "connection-limit" arg,
                        "rate-limit" arg
                    )
                ),
                "xnm-ssl" (
                    c(
                        "local-certificate" arg,
                        "connection-limit" arg,
                        "rate-limit" arg
                    )
                ),
                "netconf" (
                    c(
                        "ssh" (
                            c(
                                "connection-limit" arg,
                                "rate-limit" arg,
                                "port" arg
                            )
                        ),
                        "traceoptions" (
                            c(
                                "no-remote-trace",
                                "file" (
                                    c(
                                        "filename" arg,
                                        "size" arg,
                                        "files" arg,
                                        "world-readable",
                                        "no-world-readable",
                                        "match" (
                                          regular_expression
                                        )
                                    )
                                ).as(:oneline),
                                "flag" ("all" | "incoming" | "outgoing").as(:oneline),
                                "on-demand"
                            )
                        )
                    )
                ),
                "flow-tap-dtcp",
                "reverse" (
                    c(
                        "telnet" (
                            c(
                                "port" arg
                            )
                        ),
                        "ssh" (
                            c(
                                "port" arg
                            )
                        )
                    )
                ),
                "dns" (
                    c(
                        "max-cache-ttl" arg,
                        "max-ncache-ttl" arg,
                        "traceoptions" (
                            c(
                                "no-remote-trace",
                                "file" (
                                    c(
                                        "filename" arg,
                                        "size" arg,
                                        "files" arg,
                                        "world-readable",
                                        "no-world-readable"
                                    )
                                ).as(:oneline),
                                "debug-level" arg,
                                "category" ("default" | "general" | "database" | "security" | "config" | "resolver" | "xfer-in" | "xfer-out" | "notify" | "client" | "unmatched" | "network" | "update" | "update-security" | "queries" | "dispatch" | "dnssec" | "lame-servers" | "delegation-only" | "edns-disabled").as(:oneline),
                                "level" arg,
                                "flag" ("ddns" | "config" | "ui" | "rtsock" | "all" | "trace").as(:oneline)
                            )
                        ),
                        "forwarders" arg,
                        "dnssec" (
                            c(
                                "disable",
                                "trusted-keys" (
                                    c(
                                        "key" arg
                                    )
                                ),
                                "dlv" (
                                    s(
                                      "domain" arg,
                                      "trusted-anchor" arg
                                    )
                                ).as(:oneline),
                                "secure-domains" arg
                            )
                        ),
                        "dns-proxy" (
                            c(
                                "propogate-setting" arg,
                                "interface" arg,
                                "default-domain" arg (
                                    c(
                                        "forwarders" arg
                                    )
                                ),
                                "cache" arg (
                                    c(
                                        "inet" (
                                          ipaddr
                                        )
                                    )
                                ).as(:oneline),
                                "view" arg (
                                    c(
                                        "match-clients" arg,
                                        "domain" arg (
                                            c(
                                                "forward-only",
                                                "forwarders" arg
                                            )
                                        )
                                    )
                                )
                            )
                        )
                    )
                ),
                "service-deployment" (
                    c(
                        "local-certificate" arg,
                        "source-address" (
                          ipv4addr
                        ),
                        "servers" arg (
                            c(
                                "port" arg,
                                "user" arg,
                                "security-options" (
                                    c(
                                        c(
                                          "tls",
                                          "ssl3"
                                        )
                                    )
                                )
                            )
                        ),
                        "traceoptions" (
                            c(
                                "no-remote-trace",
                                "file" (
                                    c(
                                        "filename" arg,
                                        "size" arg,
                                        "files" arg,
                                        "world-readable",
                                        "no-world-readable",
                                        "match" (
                                          regular_expression
                                        )
                                    )
                                ).as(:oneline),
                                "flag" ("beep" | "profile" | "application" | "io" | "all").as(:oneline)
                            )
                        )
                    )
                ),
                "outbound-ssh" (
                    c(
                        "traceoptions" (
                            c(
                                "no-remote-trace",
                                "file" (
                                    c(
                                        "filename" arg,
                                        "size" arg,
                                        "files" arg,
                                        "world-readable",
                                        "no-world-readable",
                                        "match" (
                                          regular_expression
                                        )
                                    )
                                ).as(:oneline),
                                "flag" ("configuration" | "connectivity" | "all").as(:oneline)
                            )
                        ),
                        "client" arg (
                            c(
                                "device-id" arg,
                                "secret" (
                                  unreadable
                                ),
                                "keep-alive" (
                                    c(
                                        "retry" arg,
                                        "timeout" arg
                                    )
                                ),
                                "reconnect-strategy" arg,
                                "services" arg,
                                "servers" arg (
                                    c(
                                        "port" arg,
                                        "retry" arg,
                                        "timeout" arg
                                    )
                                )
                            )
                        )
                    )
                ),
                "subscriber-management-helper" (
                  smihelperd_type
                ),
                "dhcp-local-server" (
                  jdhcp_local_server_type
                ),
                "database-replication" (
                  bdbrepd_type
                ),
                "web-management" (
                    c(
                        "traceoptions" (
                          httpd_traceoptions_type
                        ),
                        "management-url" arg,
                        "http" (
                            c(
                                "port" arg,
                                "interface" (
                                  interface_name
                                )
                            )
                        ),
                        "https" (
                            c(
                                "port" arg,
                                c(
                                  "local-certificate" arg,
                                  "pki-local-certificate" arg,
                                  "system-generated-certificate"
                                ),
                                "interface" (
                                  interface_name
                                )
                            )
                        ),
                        "control" (
                            c(
                                "max-threads" arg
                            )
                        ),
                        "session" (
                            c(
                                "idle-timeout" arg,
                                "session-limit" arg
                            )
                        )
                    )
                ),
                "packet-triggered-subscribers",
                "static-subscribers" (
                  jsscd_static_subscribers_type
                ),
                "local-policy-decision-function",
                "subscriber-management" (
                  smid_type
                ),
                "dhcp" (
                    c(
                        "maximum-lease-time" arg,
                        "default-lease-time" arg,
                        "domain-name" arg,
                        "name-server" arg,
                        "domain-search" arg,
                        "wins-server" arg,
                        "router" arg,
                        "boot-file" arg,
                        "boot-server" arg,
                        "next-server" (
                          ipv4addr
                        ),
                        "server-identifier" (
                          ipv4addr
                        ),
                        "option" arg (
                            c(
                                c(
                                  "flag" arg,
                                  "byte" arg,
                                  "short" arg,
                                  "unsigned-short" arg,
                                  "integer" arg,
                                  "unsigned-integer" arg,
                                  "string" arg,
                                  "ip-address" (
                                    ipv4addr
                                  ),
                                  "array" (
                                      c(
                                          c(
                                            "flag" arg,
                                            "byte" arg,
                                            "short" arg,
                                            "unsigned-short" arg,
                                            "integer" arg,
                                            "unsigned-integer" arg,
                                            "string" arg,
                                            "ip-address" (
                                              ipv4addr
                                            )
                                          )
                                      )
                                  ),
                                  "byte-stream" arg
                                )
                            )
                        ).as(:oneline),
                        "sip-server" (
                            c(
                                "name" arg,
                                "address" arg
                            )
                        ),
                        "traceoptions" (
                          dhcp_traceoptions_type
                        ),
                        "pool" arg (
                            c(
                                "address-range" (
                                    c(
                                        "low" (
                                          ipv4addr
                                        ),
                                        "high" (
                                          ipv4addr
                                        )
                                    )
                                ).as(:oneline),
                                "exclude-address" arg,
                                "maximum-lease-time" arg,
                                "default-lease-time" arg,
                                "domain-name" arg,
                                "name-server" arg,
                                "domain-search" arg,
                                "wins-server" arg,
                                "router" arg,
                                "boot-file" arg,
                                "boot-server" arg,
                                "next-server" (
                                  ipv4addr
                                ),
                                "server-identifier" (
                                  ipv4addr
                                ),
                                "option" arg (
                                    c(
                                        c(
                                          "flag" arg,
                                          "byte" arg,
                                          "short" arg,
                                          "unsigned-short" arg,
                                          "integer" arg,
                                          "unsigned-integer" arg,
                                          "string" arg,
                                          "ip-address" (
                                            ipv4addr
                                          ),
                                          "array" (
                                              c(
                                                  c(
                                                    "flag" arg,
                                                    "byte" arg,
                                                    "short" arg,
                                                    "unsigned-short" arg,
                                                    "integer" arg,
                                                    "unsigned-integer" arg,
                                                    "string" arg,
                                                    "ip-address" (
                                                      ipv4addr
                                                    )
                                                  )
                                              )
                                          ),
                                          "byte-stream" arg
                                        )
                                    )
                                ).as(:oneline),
                                "sip-server" (
                                    c(
                                        "name" arg,
                                        "address" arg
                                    )
                                ),
                                "propagate-settings" arg,
                                "propagate-ppp-settings" (
                                  interface_name
                                )
                            )
                        ),
                        "static-binding" arg (
                            c(
                                "fixed-address" arg,
                                "host-name" arg,
                                "client-identifier" (
                                    c(
                                        c(
                                          "ascii" arg,
                                          "hexadecimal" arg
                                        )
                                    )
                                ).as(:oneline),
                                "domain-name" arg,
                                "name-server" arg,
                                "domain-search" arg,
                                "wins-server" arg,
                                "router" arg,
                                "boot-file" arg,
                                "boot-server" arg,
                                "next-server" (
                                  ipv4addr
                                ),
                                "server-identifier" (
                                  ipv4addr
                                ),
                                "option" arg (
                                    c(
                                        c(
                                          "flag" arg,
                                          "byte" arg,
                                          "short" arg,
                                          "unsigned-short" arg,
                                          "integer" arg,
                                          "unsigned-integer" arg,
                                          "string" arg,
                                          "ip-address" (
                                            ipv4addr
                                          ),
                                          "array" (
                                              c(
                                                  c(
                                                    "flag" arg,
                                                    "byte" arg,
                                                    "short" arg,
                                                    "unsigned-short" arg,
                                                    "integer" arg,
                                                    "unsigned-integer" arg,
                                                    "string" arg,
                                                    "ip-address" (
                                                      ipv4addr
                                                    )
                                                  )
                                              )
                                          ),
                                          "byte-stream" arg
                                        )
                                    )
                                ).as(:oneline),
                                "sip-server" (
                                    c(
                                        "name" arg,
                                        "address" arg
                                    )
                                )
                            )
                        ),
                        "propagate-settings" arg,
                        "propagate-ppp-settings" (
                          interface_name
                        )
                    )
                ),
                "dynamic-dns" (
                    c(
                        "client" arg (
                            c(
                                "server" arg,
                                "agent" arg,
                                "username" arg,
                                "password" (
                                  unreadable
                                ),
                                "interface" (
                                  interface_name
                                )
                            )
                        )
                    )
                )
            )
        ),
        "syslog" (
            c(
                "archive" (
                  archive_object
                ),
                "user" arg (
                    c(
                        "contents" (
                          syslog_object
                        ).as(:oneline),
                        "match" (
                          regular_expression
                        ),
                        "allow-duplicates"
                    )
                ),
                "host" ("other-routing-engine" | "scc-master" | "sfc0-master" | arg) (
                    c(
                        "contents" (
                          syslog_object
                        ).as(:oneline),
                        "match" (
                          regular_expression
                        ),
                        "allow-duplicates",
                        "port" arg,
                        "facility-override" arg,
                        "log-prefix" arg,
                        "source-address" (
                          ipaddr
                        ),
                        "explicit-priority",
                        "structured-data" (
                            c(
                                c(
                                  "brief"
                                )
                            )
                        )
                    )
                ),
                "allow-duplicates",
                "file" arg (
                    c(
                        "contents" (
                          syslog_object
                        ).as(:oneline),
                        "match" (
                          regular_expression
                        ),
                        "allow-duplicates",
                        "archive" (
                          archive_object
                        ),
                        "explicit-priority",
                        "structured-data" (
                            c(
                                c(
                                  "brief"
                                )
                            )
                        )
                    )
                ),
                "console" ("any" | "authorization" | "daemon" | "ftp" | "ntp" | "security" | "kernel" | "user" | "dfc" | "external" | "firewall" | "pfe" | "conflict-log" | "change-log" | "interactive-commands") (
                    c(
                        c(
                          "any",
                          "emergency",
                          "alert",
                          "critical",
                          "error",
                          "warning",
                          "notice",
                          "info",
                          "none"
                        )
                    )
                ).as(:oneline),
                "time-format" (
                    c(
                        "year",
                        "millisecond"
                    )
                ).as(:oneline),
                "source-address" (
                  ipaddr
                ),
                "log-rotate-frequency" arg
            )
        ),
        "tracing" (
            c(
                "destination-override" (
                    c(
                        "syslog" (
                            c(
                                "host" (
                                  ipv4addr
                                )
                            )
                        ).as(:oneline)
                    )
                ).as(:oneline)
            )
        ).as(:oneline),
        "encrypt-configuration-files",
        "compress-configuration-files",
        "no-compress-configuration-files",
        "max-configurations-on-flash" arg,
        "max-configuration-rollbacks" arg,
        "archival" (
            c(
                "configuration" (
                    c(
                        c(
                          "transfer-interval" arg,
                          "transfer-on-commit"
                        ),
                        "archive-sites" arg (
                            c(
                                "password" (
                                  unreadable
                                )
                            )
                        ).as(:oneline)
                    )
                )
            )
        ),
        "extensions" (
            c(
                "providers" arg (
                    c(
                        "license-type" arg (
                            c(
                                "deployment-scope" arg
                            )
                        ).as(:oneline)
                    )
                ),
                "resource-limits" (
                    c(
                        "process" arg (
                            c(
                                "resources" (
                                  resources_type
                                )
                            )
                        ),
                        "package" arg (
                            c(
                                "resources" (
                                  resources_type
                                )
                            )
                        )
                    )
                )
            )
        ),
        "license" (
          license_object
        ),
        "proxy" (
          proxy_object
        ),
        "commit" (
            c(
                "synchronize",
                "server" (
                    c(
                        "maximum-aggregate-pool" arg,
                        "maximum-entries" arg,
                        "commit-interval" arg,
                        "days-to-keep-error-logs" arg,
                        "traceoptions" (
                            c(
                                "no-remote-trace",
                                "file" (
                                    c(
                                        "filename" arg,
                                        "size" arg,
                                        "files" arg,
                                        "world-readable",
                                        "no-world-readable",
                                        "microsecond-stamp"
                                    )
                                ).as(:oneline),
                                "flag" ("all" | "commit-server" | "batch" | "configuration").as(:oneline)
                            )
                        )
                    )
                )
            )
        ),
        "fips" (
            c(
                "level" arg,
                "self-test" (
                    c(
                        "periodic" (
                            c(
                                "start-time" arg,
                                "day-of-month" arg,
                                "month" arg,
                                "day-of-week" arg
                            )
                        )
                    )
                )
            )
        ),
        "auto-configuration" (
            c(
                "traceoptions" (
                  autoconf_traceoptions_type
                )
            )
        ),
        "processes" (
            c(
                "routing" (
                    c(
                        c(
                          "disable"
                        ),
                        "failover" arg
                    )
                ).as(:oneline),
                "software-forwarding".as(:oneline),
                "packet-forwarding-engine".as(:oneline),
                "chassis-control" (
                    c(
                        c(
                          "disable"
                        ),
                        "failover" arg
                    )
                ).as(:oneline),
                "service-pics" (
                    c(
                        c(
                          "disable"
                        ),
                        "failover" arg
                    )
                ).as(:oneline),
                "ntp" (
                    c(
                        c(
                          "disable"
                        ),
                        "failover" arg
                    )
                ).as(:oneline),
                "watchdog" (
                    c(
                        c(
                          "enable",
                          "disable"
                        ),
                        "timeout" arg
                    )
                ).as(:oneline),
                "process-monitor" (
                    c(
                        c(
                          "disable"
                        ),
                        "traceoptions" (
                          pmond_traceoptions_type
                        )
                    )
                ),
                "resource-cleanup" (
                    c(
                        c(
                          "disable"
                        ),
                        "traceoptions" (
                          res_cleanupd_traceoptions_type
                        )
                    )
                ),
                "routing-socket-proxy" (
                    c(
                        c(
                          "disable"
                        ),
                        "failover" arg
                    )
                ).as(:oneline),
                "web-management" (
                    c(
                        c(
                          "disable"
                        ),
                        "failover" arg
                    )
                ).as(:oneline),
                "named-service" (
                    c(
                        c(
                          "disable"
                        ),
                        "failover" arg
                    )
                ),
                "cfm" (
                    c(
                        c(
                          "disable"
                        )
                    )
                ).as(:oneline),
                "general-authentication-service" (
                    c(
                        c(
                          "disable"
                        ),
                        "traceoptions" (
                            c(
                                "no-remote-trace",
                                "file" (
                                    c(
                                        "filename" arg,
                                        "size" arg,
                                        "files" arg,
                                        "world-readable",
                                        "no-world-readable",
                                        "match" (
                                          regular_expression
                                        )
                                    )
                                ).as(:oneline),
                                "flag" ("configuration" | "framework" | "radius" | "local-authentication" | "ldap" | "address-assignment" | "jsrc" | "gx-plus" | "session-db" | "profile-db" | "lib-stats" | "all").as(:oneline)
                            )
                        )
                    )
                ),
                "dhcp-service" (
                    c(
                        c(
                          "disable"
                        ),
                        "failover" arg,
                        "traceoptions" (
                          jdhcp_traceoptions_level_type
                        ),
                        "interface-traceoptions" (
                          jdhcp_interface_traceoptions_level_type
                        )
                    )
                ),
                "diameter-service" (
                    c(
                        c(
                          "disable"
                        ),
                        "traceoptions"
                    )
                ),
                "mac-validation",
                "sbc-configuration-process" (
                    c(
                        c(
                          "disable"
                        ),
                        "failover" arg,
                        "traceoptions" (
                          sbc_traceoptions
                        )
                    )
                ),
                "sdk-service" (
                    c(
                        c(
                          "disable"
                        ),
                        "traceoptions" (
                          ssd_traceoptions_type
                        )
                    )
                ),
                "datapath-trace-service" (
                    c(
                        c(
                          "disable"
                        ),
                        "traceoptions" (
                          datapath_traced_traceoptions_type
                        )
                    )
                ),
                "send" (
                    c(
                        c(
                          "disable"
                        )
                    )
                ).as(:oneline),
                "static-subscribers" (
                    c(
                        c(
                          "disable"
                        ),
                        "traceoptions"
                    )
                ),
                "daemon-process" (
                  daemon_process
                ),
                "dialer-services" (
                    c(
                        c(
                          "disable"
                        ),
                        "traceoptions" (
                            c(
                                "no-remote-trace",
                                "file" (
                                    c(
                                        "filename" arg,
                                        "size" arg,
                                        "files" arg,
                                        "world-readable",
                                        "no-world-readable",
                                        "match" (
                                          regular_expression
                                        )
                                    )
                                ).as(:oneline),
                                "flag" ("config" | "kernel" | "route" | "interface" | "error" | "memory" | "all").as(:oneline)
                            )
                        )
                    )
                ),
                "isdn-signaling" (
                    c(
                        c(
                          "disable"
                        ),
                        "traceoptions" (
                            c(
                                "no-remote-trace",
                                "file" (
                                    c(
                                        "filename" arg,
                                        "size" arg,
                                        "files" arg,
                                        "world-readable",
                                        "no-world-readable",
                                        "match" (
                                          regular_expression
                                        )
                                    )
                                ).as(:oneline),
                                "flag" ("daemon" | "stack" | "all").as(:oneline)
                            )
                        ),
                        "reject-incoming"
                    )
                ),
                "telephony-gateway-module",
                "wireless-wan-service",
                "wireless-lan-service",
                "network-security" (
                    c(
                        c(
                          "disable"
                        )
                    )
                ).as(:oneline),
                "firewall-authentication-service" (
                    c(
                        c(
                          "disable"
                        )
                    )
                ).as(:oneline),
                "jsrp-service" (
                    c(
                        c(
                          "disable"
                        )
                    )
                ).as(:oneline),
                "wan-acceleration" (
                    c(
                        c(
                          "disable"
                        ),
                        "traceoptions" (
                            c(
                                "no-remote-trace",
                                "file" (
                                    c(
                                        "filename" arg,
                                        "size" arg,
                                        "files" arg,
                                        "world-readable",
                                        "no-world-readable",
                                        "match" (
                                          regular_expression
                                        )
                                    )
                                ).as(:oneline),
                                "flag" ("configuration" | "ssam" | "memory" | "fpc-ipc" | "fpc-ipc-heart-beat" | "wx-login" | "all").as(:oneline)
                            )
                        )
                    )
                ),
                "smtpd-service" (
                    c(
                        c(
                          "disable"
                        )
                    )
                ).as(:oneline),
                "logical-system-service" (
                    c(
                        c(
                          "disable"
                        ),
                        "traceoptions" (
                            c(
                                "no-remote-trace",
                                "file" (
                                    c(
                                        "filename" arg,
                                        "size" arg,
                                        "files" arg,
                                        "world-readable",
                                        "no-world-readable",
                                        "match" (
                                          regular_expression
                                        )
                                    )
                                ).as(:oneline),
                                "flag" ("configuration" | "all").as(:oneline)
                            )
                        )
                    )
                ),
                "system-health-management" (
                    c(
                        c(
                          "disable"
                        )
                    )
                ),
                "system-log-vital" (
                    c(
                        c(
                          "disable"
                        )
                    )
                ),
                "app-engine-management-service" (
                  app_engine_management_service
                ),
                "app-engine-virtual-machine-management-service" (
                  app_engine_management_service
                )
            )
        ),
        "ddos-protection",
        "packet-triggered-subscribers-partition",
        "ntp" (
            c(
                "boot-server" (
                  ipaddr
                ),
                "authentication-key" arg (
                    c(
                        "type" arg,
                        "value" (
                          unreadable
                        )
                    )
                ).as(:oneline),
                "peer" arg (
                    c(
                        "key" arg,
                        "version" arg,
                        "prefer"
                    )
                ).as(:oneline),
                "server" arg (
                    c(
                        "key" arg,
                        "version" arg,
                        "prefer"
                    )
                ).as(:oneline),
                "broadcast" arg (
                    c(
                        "key" arg,
                        "version" arg,
                        "ttl" arg
                    )
                ).as(:oneline),
                "broadcast-client",
                "multicast-client" (
                    c(
                        "address" (
                          ipaddr
                        )
                    )
                ).as(:oneline),
                "trusted-key" arg,
                "source-address" (
                  ipaddr
                )
            )
        ),
        "log-vital" (
            c(
                "interval" arg,
                "files" arg,
                "storage-limit" arg,
                "file-size" arg,
                "add" arg (
                    c(
                        "comment" (
                            c(
                                "comment-string" arg
                            )
                        )
                    )
                ),
                "group" (
                    c(
                        "operating",
                        "idp",
                        "storage",
                        "cluster-counter",
                        "screen" arg,
                        "spu" arg
                    )
                )
            )
        ),
        "security-profile"
    )
end

rule(:archive_object) do
    c(
        "size" arg,
        "files" arg,
        "world-readable",
        "no-world-readable",
        "binary-data",
        "no-binary-data",
        "transfer-interval" arg,
        "start-time" (
          time
        ),
        "archive-sites" arg (
            c(
                "password" (
                  unreadable
                )
            )
        ).as(:oneline)
    ).as(:oneline)
end

rule(:arp_interface_type) do
  arg.as(:arg) (
    c(
        "aging-timer" arg
    )
  )
end

rule(:authentication_object) do
    c(
        "plain-text-password-value" arg,
        "encrypted-password" arg,
        "ssh-rsa" arg (
            c(
                "from" arg
            )
        ).as(:oneline),
        "ssh-dsa" arg (
            c(
                "from" arg
            )
        ).as(:oneline),
        "ssh-ecdsa" arg (
            c(
                "from" arg
            )
        ).as(:oneline),
        "ssh-ed25519" arg (
            c(
                "from" arg
            )
        ).as(:oneline)
    )
end

rule(:autoconf_traceoptions_type) do
    c(
        "no-remote-trace",
        "file" (
            c(
                "filename" arg,
                "size" arg,
                "files" arg,
                "world-readable",
                "no-world-readable",
                "match" (
                  regular_expression
                )
            )
        ).as(:oneline),
        "level" arg,
        "flag" ("configuration" | "interfaces" | "io" | "rtsock" | "ui" | "auth" | "all").as(:oneline)
    )
end

rule(:bdbrepd_type) do
    c(
        "traceoptions" (
          bdbrepd_traceoptions_type
        )
    )
end

rule(:bdbrepd_traceoptions_type) do
    c(
        "no-remote-trace",
        "file" (
            c(
                "filename" arg,
                "size" arg,
                "files" arg,
                "world-readable",
                "no-world-readable",
                "match" (
                  regular_expression
                )
            )
        ).as(:oneline),
        "flag" ("database" | "mirror" | "replication" | "ui" | "general" | "session-db" | "server" | "all").as(:oneline)
    )
end

rule(:daemon_process) do
  arg.as(:arg) (
    c(
        c(
          "disable"
        ),
        "failover" arg,
        "command" arg
    )
  ).as(:oneline)
end

rule(:datapath_traced_traceoptions_type) do
    c(
        "no-remote-trace",
        "file" (
            c(
                "filename" arg,
                "size" arg,
                "files" arg,
                "world-readable",
                "no-world-readable",
                "match" (
                  regular_expression
                )
            )
        ).as(:oneline),
        "level" arg,
        "flag" ("datapath-traced-infrastructure" | "datapath-traced-server" | "client-management" | "all").as(:oneline)
    )
end

rule(:dhcp_traceoptions_type) do
    c(
        "no-remote-trace",
        "file" (
            c(
                "filename" arg,
                "size" arg,
                "files" arg,
                "world-readable",
                "no-world-readable",
                "match" (
                  regular_expression
                )
            )
        ).as(:oneline),
        "level" arg,
        "flag" ("binding" | "config" | "conflict" | "event" | "ifdb" | "io" | "lease" | "main" | "misc" | "option" | "packet" | "pool" | "protocol" | "relay" | "rtsock" | "scope" | "signal" | "trace" | "ui" | "all" | "client").as(:oneline)
    )
end

rule(:dynamic_profile_option_object) do
    c(
        "versioning"
    )
end

rule(:httpd_traceoptions_type) do
    c(
        "no-remote-trace",
        "file" (
            c(
                "filename" arg,
                "size" arg,
                "files" arg,
                "world-readable",
                "no-world-readable",
                "match" (
                  regular_expression
                )
            )
        ).as(:oneline),
        "level" arg,
        "flag" ("configuration" | "mgd" | "webauth" | "dynamic-vpn" | "init" | "all").as(:oneline)
    )
end

rule(:jdhcp_interface_traceoptions_level_type) do
    c(
        "no-remote-trace",
        "file" (
            c(
                "filename" arg,
                "size" arg,
                "files" arg,
                "world-readable",
                "no-world-readable",
                "match" (
                  regular_expression
                )
            )
        ).as(:oneline),
        "level" arg,
        "flag" ("state" | "packet" | "all").as(:oneline)
    )
end

rule(:jdhcp_traceoptions_level_type) do
    c(
        "no-remote-trace",
        "file" (
            c(
                "filename" arg,
                "size" arg,
                "files" arg,
                "world-readable",
                "no-world-readable",
                "match" (
                  regular_expression
                )
            )
        ).as(:oneline),
        "level" arg,
        "flag" ("state" | "packet" | "all" | "database" | "interface" | "rtsock" | "io" | "ha" | "ui" | "general" | "fwd" | "rpd" | "auth" | "profile" | "session-db" | "performance" | "statistics" | "liveness-detection").as(:oneline)
    )
end

rule(:juniper_accounting_options) do
    c(
        "policy-decision-statistics-profile",
        "selective-aggregate-interface-stats".as(:oneline),
        "periodic-refresh" (
            c(
                c(
                  "disable"
                )
            )
        ).as(:oneline),
        "file" arg (
            c(
                "nonpersistent",
                "size" arg,
                "files" arg,
                "transfer-interval" arg,
                "start-time" (
                  time
                ),
                "archive-sites" arg (
                    c(
                        "password" (
                          unreadable
                        )
                    )
                ).as(:oneline)
            )
        ),
        "interface-profile" arg (
            c(
                "file" arg,
                "interval" arg,
                "fields" (
                    c(
                        "input-bytes",
                        "output-bytes",
                        "input-packets",
                        "output-packets",
                        "input-errors",
                        "output-errors",
                        "input-multicast",
                        "output-multicast",
                        "input-unicast",
                        "output-unicast",
                        "unsupported-protocol",
                        "rpf-check-bytes",
                        "rpf-check-packets",
                        "rpf-check6-bytes",
                        "rpf-check6-packets"
                    )
                )
            )
        ),
        "filter-profile" arg (
            c(
                "file" arg,
                "interval" arg,
                "counters" (
                  counter_object
                )
            )
        ),
        "class-usage-profile" arg (
            c(
                "file" arg,
                "interval" arg,
                c(
                  "destination-classes" (
                    dest_class_name_object
                  ),
                  "source-classes" (
                    source_class_name_object
                  )
                )
            )
        ),
        "routing-engine-profile" arg (
            c(
                "file" arg,
                "interval" arg,
                "fields" (
                    c(
                        "host-name",
                        "date",
                        "time-of-day",
                        "uptime",
                        "cpu-load-1",
                        "cpu-load-5",
                        "cpu-load-15",
                        "memory-usage",
                        "total-cpu-usage"
                    )
                )
            )
        ),
        "mib-profile" arg (
            c(
                "file" arg,
                "interval" arg,
                "operation" arg,
                "object-names" (
                  mib_variable_name_object
                )
            )
        )
    )
end

rule(:counter_object) do
  arg.as(:arg).as(:oneline)
end

rule(:dest_class_name_object) do
  arg.as(:arg).as(:oneline)
end

rule(:keepalives_type) do
    c(
        "interval" arg,
        "up-count" arg,
        "down-count" arg
    ).as(:oneline)
end

rule(:layer2_pm_family_output_type) do
    c(
        c(
          "interface" (
            interface_name
          ),
          "next-hop-group" arg
        ),
        "no-filter-check"
    )
end

rule(:ldap_server_object) do
  arg.as(:arg) (
    c(
        "port" arg,
        "source-address" (
          ipv4addr
        ),
        "routing-instance" arg,
        "retry" arg,
        "timeout" arg
    )
  )
end

rule(:ldp_sync_obj) do
    c(
        c(
          "disable"
        ),
        "hold-time" arg
    )
end

rule(:ldp_filter_obj) do
    c(
        "match-on" arg,
        "policy" (
          policy_algebra
        )
    ).as(:oneline)
end

rule(:license_object) do
    c(
        "autoupdate" (
            c(
                "url" arg (
                    c(
                        "password" arg
                    )
                ).as(:oneline)
            )
        ),
        "renew" (
            c(
                "before-expiration" arg,
                "interval" arg
            )
        ).as(:oneline),
        "traceoptions" (
            c(
                "no-remote-trace",
                "file" (
                    c(
                        "filename" arg,
                        "size" arg,
                        "files" arg,
                        "world-readable",
                        "no-world-readable",
                        "match" (
                          regular_expression
                        )
                    )
                ).as(:oneline),
                "flag" ("all" | "events" | "config").as(:oneline)
            )
        )
    )
end

rule(:lmp_control_channel_type) do
  arg.as(:arg) (
    c(
        "remote-address" (
          ipaddr
        )
    )
  )
end

rule(:location_type) do
    c(
        "country-code" arg,
        "postal-code" arg,
        "npa-nxx" arg,
        "latitude" arg,
        "longitude" arg,
        "altitude" arg,
        "lata" arg,
        "vcoord" arg,
        "hcoord" arg,
        "building" arg,
        "floor" arg,
        "rack" arg,
        "lcc" arg (
            c(
                "floor" arg,
                "rack" arg
            )
        )
    )
end

rule(:login_class_object) do
  arg.as(:arg) (
    c(
        "allowed-days" arg,
        "access-start" (
          time
        ),
        "access-end" (
          time
        ),
        "idle-timeout" arg,
        "logical-system" arg,
        "login-alarms",
        "login-script" arg,
        "login-tip",
        "permissions" arg,
        "allow-commands" (
          regular_expression
        ),
        "deny-commands" (
          regular_expression
        ),
        "allow-configuration" (
          regular_expression
        ),
        "deny-configuration" (
          regular_expression
        ),
        "security-role" arg,
        "allow-configuration-regexps" arg,
        "deny-configuration-regexps" arg
    )
  )
end

rule(:login_object) do
  arg.as(:arg) (
    c(
        "password" (
          unreadable
        )
    )
  )
end

rule(:login_user_object) do
  arg.as(:arg) (
    c(
        "full-name" arg,
        "uid" arg,
        "class" arg,
        "authentication" (
          authentication_object
        )
    )
  )
end

rule(:lr_interfaces_type) do
  arg.as(:arg) (
    c(
        "unit" ("$junos-underlying-interface-unit" | "$junos-interface-unit" | "interface-unit-number") (
            c(
                "peer-psd" (
                    c(
                        "psd-name" arg
                    )
                ).as(:oneline),
                "peer-interface" (
                    c(
                        "interface-name" (
                          interface_unit
                        )
                    )
                ),
                "interface-shared-with" (
                    c(
                        "psd-name" arg
                    )
                ),
                c(
                  "disable"
                ),
                "passive-monitor-mode",
                "per-session-scheduler",
                "clear-dont-fragment-bit",
                "reassemble-packets",
                "rpm",
                "description" arg,
                "metadata" arg,
                "dial-options",
                "demux-source" (
                      ("inet" | "inet6")
                ),
                "demux-destination" (
                      ("inet" | "inet6")
                ),
                "encapsulation" arg,
                "mtu" arg,
                c(
                  "point-to-point",
                  "multipoint"
                ),
                "bandwidth" arg,
                "global-layer2-domainid" arg,
                "radio-router" (
                  dynamic_ifbw_parms_type
                ),
                "traps",
                "no-traps",
                "arp-resp" (
                    c(
                        c(
                          "unrestricted",
                          "restricted"
                        )
                    )
                ).as(:oneline),
                "proxy-arp" (
                    c(
                        c(
                          "unrestricted",
                          "restricted"
                        )
                    )
                ).as(:oneline),
                c(
                  "vlan-id" arg,
                  "vlan-id-range" arg,
                  "vlan-id-list" arg,
                  "vlan-tags" (
                      c(
                          "outer" arg,
                          c(
                            "inner" arg,
                            "inner-range" arg,
                            "inner-list" arg
                          )
                      )
                  ).as(:oneline)
                ),
                "native-inner-vlan-id" arg,
                "inner-vlan-id-range".as(:oneline),
                "accept-source-mac" (
                    c(
                        "mac-address" (
                          mac_list
                        )
                    )
                ),
                "input-vlan-map" (
                  vlan_map
                ),
                "output-vlan-map" (
                  vlan_map
                ),
                "swap-by-poppush",
                "receive-lsp" arg,
                "transmit-lsp" arg,
                "dlci" arg,
                "multicast-dlci" arg,
                c(
                  "vci" (
                    atm_vci
                  ),
                  "allow-any-vci",
                  "vpi" arg,
                  "trunk-id" arg
                ),
                "no-vpivci-swapping",
                c(
                  "psn-vci" (
                    atm_vci
                  ),
                  "psn-vpi" arg
                ),
                "atm-l2circuit-mode" (
                    c(
                        c(
                          "cell",
                          "aal5"
                        )
                    )
                ).as(:oneline),
                "vci-range" (
                    c(
                        "start" arg,
                        "end" arg
                    )
                ).as(:oneline),
                "trunk-bandwidth" arg,
                "multicast-vci" (
                  atm_vci
                ),
                "shaping" (
                  dcd_shaping_config
                ),
                "oam-period" (
                    c(
                        c(
                          "oam-period" arg,
                          "disable".as(:oneline)
                        )
                    )
                ).as(:oneline),
                "oam-liveness" (
                    c(
                        "up-count" arg,
                        "down-count" arg
                    )
                ),
                "ppp-options" (
                  ppp_options_type
                ),
                "pppoe-options" (
                  pppoe_options_type
                ),
                "pppoe-underlying-options" (
                  pppoe_underlying_options_type
                ),
                "advisory-options" (
                  advisory_options_type
                ),
                "demux-options" (
                  demux_options_type
                ),
                "targetted-distribution",
                c(
                  "keepalives" (
                    keepalives_type
                  ).as(:oneline),
                  "no-keepalives"
                ),
                "inverse-arp",
                "transmit-weight" arg,
                "epd-threshold" (
                  epd_threshold_config
                ).as(:oneline),
                "cell-bundle-size" arg,
                "plp-to-clp",
                "atm-scheduler-map" arg,
                "mrru" arg,
                "short-sequence",
                "fragment-threshold" arg,
                "drop-timeout" arg,
                "disable-mlppp-inner-ppp-pfc",
                "minimum-links" arg,
                "multilink-max-classes" arg,
                "compression" (
                    c(
                        "rtp" (
                            c(
                                "f-max-period" arg,
                                "queues" arg,
                                "port" (
                                    c(
                                        "minimum" arg,
                                        "maximum" arg
                                    )
                                ).as(:oneline),
                                "maximum-contexts" (
                                    c(
                                        "number" arg
                                    )
                                ).as(:oneline)
                            )
                        )
                    )
                ),
                "interleave-fragments",
                "link-layer-overhead" (
                  unsigned_float
                ),
                "accounting-profile" arg,
                "peer-unit" arg,
                "tunnel" (
                    c(
                        "source" (
                          ipaddr
                        ),
                        "destination" (
                          ipaddr
                        ),
                        "key" arg,
                        "backup-destination" (
                          ipaddr
                        ),
                        c(
                          "allow-fragmentation",
                          "do-not-fragment"
                        ),
                        "ttl" arg,
                        "traffic-class" arg,
                        "flow-label" arg,
                        "path-mtu-discovery",
                        "no-path-mtu-discovery",
                        "routing-instance" (
                            c(
                                "destination" arg
                            )
                        )
                    )
                ),
                "compression-device" (
                  interface_unit
                ),
                "atm-policer",
                "layer2-policer",
                "filter",
                "multi-chassis-protection" (
                  multi_chassis_protection_group
                ),
                "family" (
                    c(
                        "inet" (
                            c(
                                "targeted-broadcast" (
                                    c(
                                        c(
                                          "forward-and-send-to-re",
                                          "forward-only"
                                        )
                                    )
                                ),
                                "receive-options-packets",
                                "receive-ttl-exceeded",
                                "accounting" (
                                    c(
                                        "source-class-usage" (
                                            c(
                                                "input",
                                                "output"
                                            )
                                        ),
                                        "destination-class-usage"
                                    )
                                ),
                                "mac-validate" arg,
                                "rpf-check" (
                                    c(
                                        "fail-filter" arg,
                                        "mode" (
                                            c(
                                                "loose"
                                            )
                                        ).as(:oneline)
                                    )
                                ),
                                "mtu" arg,
                                "no-redirects",
                                "no-neighbor-learn",
                                "unconditional-src-learn",
                                "multicast-only",
                                "primary",
                                "ipsec-sa" arg,
                                "demux-source",
                                "demux-destination",
                                "filter" (
                                    c(
                                        c(
                                          "input" (
                                              c(
                                                  "filter-name" arg,
                                                  "precedence" arg
                                              )
                                          ).as(:oneline),
                                          "input-list" arg
                                        ),
                                        c(
                                          "output" (
                                              c(
                                                  "filter-name" arg,
                                                  "precedence" arg
                                              )
                                          ).as(:oneline),
                                          "output-list" arg
                                        ),
                                        "adf" (
                                            c(
                                                "rule" arg,
                                                "counter",
                                                "input-precedence" arg,
                                                "output-precedence" arg
                                            )
                                        ),
                                        "group" arg,
                                        "dialer" arg
                                    )
                                ),
                                "simple-filter" (
                                    c(
                                        "input" arg
                                    )
                                ),
                                "input-hierarchical-policer" arg,
                                "policer" (
                                    c(
                                        "arp" arg,
                                        "input" arg,
                                        "output" arg
                                    )
                                ),
                                "sampling" (
                                    c(
                                        "input",
                                        "output"
                                    )
                                ),
                                "next-hop-tunnel" arg (
                                    c(
                                        "ipsec-vpn" arg
                                    )
                                ),
                                "address" arg (
                                    c(
                                        "destination" (
                                          ipv4addr
                                        ),
                                        "destination-profile" arg,
                                        "broadcast" (
                                          ipv4addr
                                        ),
                                        "primary",
                                        "preferred",
                                        "master-only",
                                        "multipoint-destination" arg (
                                            c(
                                                c(
                                                  "dlci" arg,
                                                  "vci" (
                                                    atm_vci
                                                  )
                                                ),
                                                "shaping" (
                                                  dcd_shaping_config
                                                ),
                                                "oam-period" (
                                                    c(
                                                        c(
                                                          "oam_period" arg,
                                                          "disable".as(:oneline)
                                                        )
                                                    )
                                                ).as(:oneline),
                                                "oam-liveness" (
                                                    c(
                                                        "up-count" arg,
                                                        "down-count" arg
                                                    )
                                                ),
                                                "inverse-arp",
                                                "transmit-weight" arg,
                                                "epd-threshold" (
                                                  epd_threshold_config
                                                ).as(:oneline)
                                            )
                                        ),
                                        "arp" arg (
                                            c(
                                                "l2-interface" (
                                                  interface_name
                                                ),
                                                c(
                                                  "mac" (
                                                    mac_unicaset
                                                  ),
                                                  "multicast-mac" (
                                                    mac_multicast
                                                  )
                                                ),
                                                "publish"
                                            )
                                        ).as(:oneline),
                                        "web-authentication" (
                                            c(
                                                "http",
                                                "https",
                                                "redirect-to-https"
                                            )
                                        ),
                                        "vrrp-group" (
                                          vrrp_group
                                        )
                                    )
                                ),
                                "unnumbered-address" (
                                    c(
                                        "source" (
                                          interface_unit
                                        ),
                                        "preferred-source-address" arg,
                                        "destination" (
                                          ipv4addr
                                        ),
                                        "destination-profile" arg
                                    )
                                ).as(:oneline),
                                "location-pool-address",
                                "negotiate-address",
                                "dhcp" (
                                    c(
                                        "client-identifier" (
                                            c(
                                                c(
                                                  "ascii" arg,
                                                  "hexadecimal" arg
                                                )
                                            )
                                        ).as(:oneline),
                                        "lease-time" arg,
                                        "retransmission-attempt" arg,
                                        "retransmission-interval" arg,
                                        "server-address" (
                                          ipv4addr
                                        ),
                                        "update-server",
                                        "vendor-id" arg
                                    )
                                ),
                                "dhcp-client" (
                                  dhcp_client_type
                                )
                            )
                        ),
                        "iso" (
                            c(
                                "address" arg,
                                "mtu" arg
                            )
                        ),
                        "inet6" (
                            c(
                                "rpf-check" (
                                    c(
                                        "fail-filter" arg,
                                        "mode" (
                                            c(
                                                "loose"
                                            )
                                        ).as(:oneline)
                                    )
                                ),
                                "accounting" (
                                    c(
                                        "source-class-usage" (
                                            c(
                                                "input",
                                                "output"
                                            )
                                        ),
                                        "destination-class-usage"
                                    )
                                ),
                                "mtu" arg,
                                "nd6-stale-time" arg,
                                "no-neighbor-learn",
                                "filter" (
                                    c(
                                        c(
                                          "input" (
                                              c(
                                                  "filter-name" arg,
                                                  "precedence" arg
                                              )
                                          ).as(:oneline),
                                          "input-list" arg
                                        ),
                                        c(
                                          "output" (
                                              c(
                                                  "filter-name" arg,
                                                  "precedence" arg
                                              )
                                          ).as(:oneline),
                                          "output-list" arg
                                        ),
                                        "adf" (
                                            c(
                                                "rule" arg,
                                                "counter",
                                                "input-precedence" arg,
                                                "output-precedence" arg
                                            )
                                        ),
                                        "group" arg,
                                        "dialer" arg
                                    )
                                ),
                                "input-hierarchical-policer" arg,
                                "policer" (
                                    c(
                                        "input" arg,
                                        "output" arg
                                    )
                                ),
                                "sampling" (
                                    c(
                                        "input",
                                        "output"
                                    )
                                ),
                                "address" arg (
                                    c(
                                        "destination" (
                                          ipv6addr
                                        ),
                                        "eui-64",
                                        "primary",
                                        "preferred",
                                        "master-only",
                                        "ndp" arg (
                                            c(
                                                "l2-interface" (
                                                  interface_name
                                                ),
                                                c(
                                                  "mac" (
                                                    mac_unicaset
                                                  ),
                                                  "multicast-mac" (
                                                    mac_multicast
                                                  )
                                                ),
                                                "publish"
                                            )
                                        ).as(:oneline),
                                        "vrrp-inet6-group" (
                                          vrrp_group
                                        ),
                                        "web-authentication" (
                                            c(
                                                "http",
                                                "https",
                                                "redirect-to-https"
                                            )
                                        )
                                    )
                                ),
                                "demux-source",
                                "demux-destination",
                                "unnumbered-address" (
                                    c(
                                        "source" (
                                          interface_unit
                                        ),
                                        "preferred-source-address" arg
                                    )
                                ).as(:oneline),
                                "dad-disable",
                                "no-dad-disable",
                                "dhcpv6-client" (
                                    c(
                                        "client-type" arg,
                                        "client-ia-type" ("ia-na" | "ia-pd"),
                                        "rapid-commit",
                                        "update-router-advertisement" (
                                            c(
                                                "interface" arg
                                            )
                                        ),
                                        "client-identifier" (
                                            c(
                                                "duid-type" arg
                                            )
                                        ).as(:oneline),
                                        "req-option" ("dns-server" | "domain" | "ntp-server" | "time-zone" | "sip-server" | "sip-domain" | "nis-server" | "nis-domain" | "fqdn" | "vendor-spec"),
                                        "update-server",
                                        "retransmission-attempt" arg
                                    )
                                )
                            )
                        ),
                        "mpls" (
                            c(
                                "mtu" arg,
                                "maximum-labels" arg,
                                "filter" (
                                    c(
                                        c(
                                          "input" arg,
                                          "input-list" arg
                                        ),
                                        c(
                                          "output" arg,
                                          "output-list" arg
                                        ),
                                        "group" arg,
                                        "dialer" arg
                                    )
                                ),
                                "input-hierarchical-policer" arg,
                                "policer" (
                                    c(
                                        "input" arg,
                                        "output" arg
                                    )
                                )
                            )
                        ),
                        "mlppp" (
                            c(
                                "bundle" (
                                  interface_unit
                                )
                            )
                        ),
                        "mlfr-end-to-end" (
                            c(
                                "bundle" (
                                  interface_unit
                                )
                            )
                        ),
                        "mlfr-uni-nni" (
                            c(
                                "bundle" (
                                  interface_unit
                                )
                            )
                        ),
                        "ccc" (
                            c(
                                "filter" (
                                    c(
                                        c(
                                          "input" arg,
                                          "input-list" arg
                                        ),
                                        c(
                                          "output" arg,
                                          "output-list" arg
                                        ),
                                        "group" arg
                                    )
                                ),
                                "policer" (
                                    c(
                                        "input" arg,
                                        "output" arg
                                    )
                                ),
                                "translate-fecn-and-becn",
                                c(
                                  "translate-discard-eligible",
                                  "translate-plp-control-word-de"
                                ),
                                "keep-address-and-control"
                            )
                        ),
                        "tcc" (
                            c(
                                "policer" (
                                    c(
                                        "input" arg,
                                        "output" arg
                                    )
                                ),
                                "proxy" (
                                    c(
                                        "inet-address" (
                                          ipv4addr
                                        )
                                    )
                                ),
                                "remote" (
                                    c(
                                        "inet-address" (
                                          ipv4addr
                                        ),
                                        "mac-address" (
                                          mac_addr
                                        )
                                    )
                                ),
                                "protocols"
                            )
                        ),
                        "vpls" (
                            c(
                                "core-facing",
                                "filter" (
                                    c(
                                        c(
                                          "input" (
                                              c(
                                                  "filter-name" arg,
                                                  "precedence" arg
                                              )
                                          ).as(:oneline),
                                          "input-list" arg
                                        ),
                                        c(
                                          "output" (
                                              c(
                                                  "filter-name" arg,
                                                  "precedence" arg
                                              )
                                          ).as(:oneline),
                                          "output-list" arg
                                        ),
                                        "adf" (
                                            c(
                                                "rule" arg,
                                                "counter",
                                                "input-precedence" arg,
                                                "output-precedence" arg
                                            )
                                        ),
                                        "group" arg
                                    )
                                ),
                                "policer" (
                                    c(
                                        "input" arg,
                                        "output" arg
                                    )
                                )
                            )
                        ),
                        "bridge" (
                            c(
                                "core-facing",
                                "filter" (
                                    c(
                                        c(
                                          "input" (
                                              c(
                                                  "filter-name" arg,
                                                  "precedence" arg
                                              )
                                          ).as(:oneline),
                                          "input-list" arg
                                        ),
                                        c(
                                          "output" (
                                              c(
                                                  "filter-name" arg,
                                                  "precedence" arg
                                              )
                                          ).as(:oneline),
                                          "output-list" arg
                                        ),
                                        "adf" (
                                            c(
                                                "rule" arg,
                                                "counter",
                                                "input-precedence" arg,
                                                "output-precedence" arg
                                            )
                                        ),
                                        "group" arg
                                    )
                                ),
                                "policer" (
                                    c(
                                        "input" arg,
                                        "output" arg
                                    )
                                ),
                                "interface-mode" arg,
                                "bridge-domain-type" arg,
                                c(
                                  "vlan-id" arg,
                                  "vlan-id-list" arg,
                                  "inner-vlan-id-list" arg
                                ),
                                "vlan-rewrite" (
                                    c(
                                        "translate" arg (
                                            c(
                                                "to-vlan-id" arg
                                            )
                                        ).as(:oneline)
                                    )
                                ),
                                c(
                                  "isid-list" arg
                                ),
                                "storm-control" (
                                  storm_control
                                )
                            )
                        ),
                        "ethernet-switching" (
                          ethernet_switching_type
                        ),
                        "fibre-channel" (
                          fibre_channel_type
                        ),
                        "pppoe" (
                          pppoe_underlying_options_type
                        ),
                        "any" (
                            c(
                                "filter" (
                                    c(
                                        "input" arg,
                                        "group" arg
                                    )
                                )
                            )
                        )
                    )
                ),
                "service-domain" arg,
                "copy-tos-to-outer-ip-header",
                "dialer-options" (
                    c(
                        "pool" arg,
                        "dial-string" arg,
                        "incoming-map" (
                            c(
                                c(
                                  "caller" arg.as(:oneline),
                                  "accept-all"
                                )
                            )
                        ),
                        "callback",
                        "callback-wait-period" arg,
                        "redial-delay" arg,
                        "idle-timeout" arg,
                        "watch-list" arg,
                        "load-threshold" arg,
                        "load-interval" arg,
                        "activation-delay" arg,
                        "deactivation-delay" arg,
                        "initial-route-check" arg
                    )
                ),
                "backup-options" (
                    c(
                        "interface" (
                          interface_name
                        )
                    )
                ),
                "dynamic-call-admission-control"
            )
        )
    )
  )
end

rule(:lsp_set_match_type) do
    c(
        "lsp-name" arg,
        "lsp-regex" arg,
        "p2mp-name" arg,
        "p2mp-regex" arg,
        c(
          "egress",
          "ingress",
          "transit"
        )
    )
end

rule(:lsp_nh_obj) do
  arg.as(:arg) (
    c(
        "preference" arg,
        "metric" arg
    )
  )
end

rule(:mac_aging_time_config) do
    c(
        c(
          "time" arg,
          "unlimited"
        )
    )
end

rule(:mac_list) do
  arg.as(:arg) (
    c(
        "policer" (
            c(
                "input" arg,
                "output" arg
            )
        )
    )
  )
end

rule(:martian_type) do
    s(
      "address" arg,
      c(
        "exact" arg,
        "longer" arg,
        "orlonger" arg,
        "upto" arg,
        "through" arg,
        "prefix-length-range" arg
      ),
      c(
        "allow"
      )
    ).as(:oneline)
end

rule(:match_interface_object) do
  arg.as(:arg).as(:oneline)
end

rule(:match_interface_object_oam) do
  arg.as(:arg).as(:oneline)
end

rule(:match_interface_set_object) do
  arg.as(:arg).as(:oneline)
end

rule(:match_simple_dscp_value) do
    c(
        c(
          "af11",
          "af12",
          "af13",
          "af21",
          "af22",
          "af23",
          "af31",
          "af32",
          "af33",
          "af41",
          "af42",
          "af43",
          "ef",
          "cs0",
          "cs1",
          "cs2",
          "cs3",
          "cs4",
          "cs5",
          "cs6",
          "cs7",
          "be",
          "range"
        )
    )
end

rule(:match_simple_port_value) do
    c(
        c(
          "ftp-data",
          "ftp",
          "ssh",
          "telnet",
          "smtp",
          "tacacs",
          "tacacs-ds",
          "domain",
          "dhcp",
          "bootps",
          "bootpc",
          "tftp",
          "finger",
          "http",
          "kerberos-sec",
          "pop3",
          "sunrpc",
          "ident",
          "nntp",
          "ntp",
          "netbios-ns",
          "netbios-dgm",
          "netbios-ssn",
          "imap",
          "snmp",
          "snmptrap",
          "xdmcp",
          "bgp",
          "ldap",
          "mobileip-agent",
          "mobilip-mn",
          "msdp",
          "https",
          "snpp",
          "biff",
          "exec",
          "login",
          "who",
          "cmd",
          "syslog",
          "printer",
          "talk",
          "ntalk",
          "rip",
          "timed",
          "klogin",
          "kshell",
          "ldp",
          "krb-prop",
          "krbupdate",
          "kpasswd",
          "socks",
          "afs",
          "pptp",
          "radius",
          "radacct",
          "zephyr-srv",
          "zephyr-clt",
          "zephyr-hm",
          "nfsd",
          "eklogin",
          "ekshell",
          "rkinit",
          "cvspserver",
          "range"
        )
    )
end

rule(:match_simple_protocol_value) do
    c(
        c(
          "icmp",
          "igmp",
          "ipip",
          "tcp",
          "egp",
          "udp",
          "rsvp",
          "gre",
          "esp",
          "ah",
          "icmp6",
          "ospf",
          "pim",
          "sctp",
          "ipv6",
          "dstopts",
          "routing",
          "fragment",
          "no-next-header",
          "hop-by-hop",
          "vrrp",
          "range"
        )
    )
end

rule(:metric_expression_type) do
    c(
        "metric" (
            c(
                "multiplier" (
                  float
                ),
                "offset" arg
            )
        ).as(:oneline),
        "metric2" (
            c(
                "multiplier" (
                  float
                ),
                "offset" arg
            )
        ).as(:oneline)
    )
end

rule(:mib_variable_name_object) do
  arg.as(:arg).as(:oneline)
end

rule(:mime_list_type) do
  arg.as(:arg) (
    c(
        "value" arg
    )
  )
end

rule(:mip_access_type) do
    c(
        c(
          "wimax",
          "generic"
        )
    )
end

rule(:mip_home_agent_type) do
    c(
        "virtual-network" (
          mip_virtual_home_agent_address_type
        ),
        "enable-service" arg,
        "pool-match-order" ("external-authority" | "home-agent-address")
    )
end

rule(:mip_peer_type) do
    c(
        "ip-address" arg (
            c(
                "spi" (
                  spi_type
                )
            )
        ),
        "nai" arg (
            c(
                "spi" (
                  spi_type
                )
            )
        )
    )
end

rule(:mip_trace_options_type) do

end

rule(:mip_virtual_home_agent_address_type) do
    c(
        "home-agent-address" arg (
            c(
                "registration-lifetime" arg,
                "timestamp-tolerance" arg,
                "starting-ip-address" (
                  ipv4addr
                ),
                "ending-ip-address" (
                  ipv4addr
                ),
                "revocation-required"
            )
        )
    )
end

rule(:mirror_filter_type) do
  arg.as(:arg) (
    c(
        "protocol" arg,
        "source-prefix" (
          ipprefix
        ),
        "destination-prefix" (
          ipprefix
        ),
        "source-port" arg,
        "destination-port" arg,
        "interface-in" (
          interface_name
        ),
        "interface-out" (
          interface_name
        ),
        "output" (
            c(
                "interface" (
                  interface_name
                ),
                "destination-mac" arg
            )
        )
    )
  )
end

rule(:monitoring_output_type) do
    c(
        "export-format" arg,
        "flow-active-timeout" arg,
        "flow-inactive-timeout" arg,
        "flow-export-destination" arg,
        "cflowd" (
          cflowd_monitoring_type
        ),
        "interface" (
          monitor_export_intf_type
        )
    )
end

rule(:cflowd_monitoring_type) do
  arg.as(:arg) (
    c(
        "port" arg
    )
  )
end

rule(:monitor_export_intf_type) do
  arg.as(:arg) (
    c(
        "engine-id" arg,
        "engine-type" arg,
        "input-interface-index" arg,
        "output-interface-index" arg,
        "source-address" (
          ipv4addr
        )
    )
  )
end

rule(:mpls_dialer_filter) do
  arg.as(:arg) (
    c(
        "accounting-profile" arg,
        "term" arg (
            c(
                "from" (
                    c(
                        c(
                          "exp" arg,
                          "exp-except" arg
                        )
                    )
                ),
                "then" (
                    c(
                        "log",
                        "syslog",
                        "sample",
                        c(
                          "note",
                          "ignore"
                        )
                    )
                )
            )
        )
    )
  )
end

rule(:mpls_filter) do
  arg.as(:arg) (
    c(
        "accounting-profile" arg,
        "interface-specific",
        "physical-interface-filter",
        "term" arg (
            c(
                "filter" arg,
                "from" (
                    c(
                        "ip-version",
                        c(
                          "exp" arg,
                          "exp-except" arg
                        ),
                        "interface" (
                          match_interface_object
                        ),
                        "interface-set" (
                          match_interface_set_object
                        ),
                        c(
                          "forwarding-class" arg,
                          "forwarding-class-except" arg
                        ),
                        c(
                          "loss-priority" (
                                ("low" | "high" | "medium-low" | "medium-high")
                          ),
                          "loss-priority-except" (
                                ("low" | "high" | "medium-low" | "medium-high")
                          )
                        )
                    )
                ),
                "then" (
                    c(
                        c(
                          "policer" arg,
                          "three-color-policer" (
                              c(
                                  c(
                                    "single-rate" arg,
                                    "two-rate" arg
                                  )
                              )
                          ),
                          "hierarchical-policer" arg
                        ),
                        "count" arg,
                        "sample",
                        "loss-priority" arg,
                        "forwarding-class" arg,
                        "packet-mode",
                        c(
                          "accept",
                          "discard",
                          "next" arg
                        )
                    )
                )
            )
        )
    )
  )
end

rule(:mpls_ifd_options) do
    c(
        "pop-all-labels" (
            c(
                "required-depth" arg
            )
        )
    )
end

rule(:multi_chassis_protection_group) do
  arg.as(:arg) (
    c(
        "interface" arg
    )
  )
end

rule(:multicast_interface_options_type) do
  arg.as(:arg) (
    c(
        "maximum-bandwidth" (
            c(
                "bandwidth-limit" arg
            )
        ).as(:oneline),
        "reverse-oif-mapping" (
            c(
                "no-qos-adjust"
            )
        ),
        "subscriber-leave-timer" arg,
        "no-qos-adjust"
    )
  )
end

rule(:named_address_book_type) do
  ("global" | arg).as(:arg) (
    c(
        "description" arg,
        "address" (
          address_type
        ),
        "address-set" (
          address_set_type
        ),
        "attach" (
            c(
                "zone" arg
            )
        )
    )
  )
end

rule(:address_set_type) do
  arg.as(:arg) (
    c(
        "description" arg,
        "address" arg,
        "address-set" arg
    )
  )
end

rule(:address_type) do
  arg.as(:arg) (
    c(
        "description" arg,
        c(
          "ip-prefix" (
            ipprefix
          ),
          "dns-name" (
            dns_name_type
          ),
          "wildcard-address" (
            wildcard_address_type
          ),
          "range-address" (
            range_address_type
          )
        )
    )
  )
end

rule(:dns_name_type) do
  arg.as(:arg) (
    c(
        "ipv4-only",
        "ipv6-only"
    )
  )
end

rule(:nameserver_object) do
  arg.as(:arg).as(:oneline)
end

rule(:network_type) do
  arg.as(:arg)
end

rule(:next_hop_group_intf_type) do
  arg.as(:arg) (
    c(
        "next-hop" (
          inet_next_hop_type
        )
    )
  )
end

rule(:next_hop_subgroup_intf_type) do
  arg.as(:arg) (
    c(
        "next-hop" (
          inet_next_hop_type
        )
    )
  )
end

rule(:otn_options_type) do
    c(
        "laser-enable",
        "no-laser-enable",
        "line-loopback",
        "no-line-loopback",
        "fec" arg,
        "rate" arg,
        "bytes" (
            c(
                "transmit-payload-type" arg
            )
        ),
        "tti" (
            c(
                "otu-dapi" arg,
                "otu-sapi" arg,
                "otu-expected-receive-dapi" arg,
                "otu-expected-receive-sapi" arg,
                "odu-dapi" arg,
                "odu-sapi" arg,
                "odu-expected-receive-dapi" arg,
                "odu-expected-receive-sapi" arg
            )
        ),
        "trigger" (
            c(
                "oc-los" (
                    c(
                        c(
                          "ignore",
                          "hold-time" (
                              c(
                                  "up" arg,
                                  "down" arg
                              )
                          ).as(:oneline)
                        )
                    )
                ).as(:oneline),
                "oc-lof" (
                    c(
                        c(
                          "ignore",
                          "hold-time" (
                              c(
                                  "up" arg,
                                  "down" arg
                              )
                          ).as(:oneline)
                        )
                    )
                ).as(:oneline),
                "oc-lom" (
                    c(
                        c(
                          "ignore",
                          "hold-time" (
                              c(
                                  "up" arg,
                                  "down" arg
                              )
                          ).as(:oneline)
                        )
                    )
                ).as(:oneline),
                "oc-wavelength-lock" (
                    c(
                        c(
                          "ignore",
                          "hold-time" (
                              c(
                                  "up" arg,
                                  "down" arg
                              )
                          ).as(:oneline)
                        )
                    )
                ).as(:oneline),
                "otu-ais" (
                    c(
                        c(
                          "ignore",
                          "hold-time" (
                              c(
                                  "up" arg,
                                  "down" arg
                              )
                          ).as(:oneline)
                        )
                    )
                ).as(:oneline),
                "otu-bdi" (
                    c(
                        c(
                          "ignore",
                          "hold-time" (
                              c(
                                  "up" arg,
                                  "down" arg
                              )
                          ).as(:oneline)
                        )
                    )
                ).as(:oneline),
                "otu-iae" (
                    c(
                        c(
                          "ignore",
                          "hold-time" (
                              c(
                                  "up" arg,
                                  "down" arg
                              )
                          ).as(:oneline)
                        )
                    )
                ).as(:oneline),
                "otu-ttim" (
                    c(
                        c(
                          "ignore",
                          "hold-time" (
                              c(
                                  "up" arg,
                                  "down" arg
                              )
                          ).as(:oneline)
                        )
                    )
                ).as(:oneline),
                "otu-sd" (
                    c(
                        c(
                          "ignore",
                          "hold-time" (
                              c(
                                  "up" arg,
                                  "down" arg
                              )
                          ).as(:oneline)
                        )
                    )
                ).as(:oneline),
                "otu-fec-deg" (
                    c(
                        c(
                          "ignore",
                          "hold-time" (
                              c(
                                  "up" arg,
                                  "down" arg
                              )
                          ).as(:oneline)
                        )
                    )
                ).as(:oneline),
                "otu-fec-exe" (
                    c(
                        c(
                          "ignore",
                          "hold-time" (
                              c(
                                  "up" arg,
                                  "down" arg
                              )
                          ).as(:oneline)
                        )
                    )
                ).as(:oneline),
                "otu-tca-es" (
                    c(
                        c(
                          "ignore",
                          "hold-time" (
                              c(
                                  "up" arg,
                                  "down" arg
                              )
                          ).as(:oneline)
                        )
                    )
                ).as(:oneline),
                "otu-tca-ses" (
                    c(
                        c(
                          "ignore",
                          "hold-time" (
                              c(
                                  "up" arg,
                                  "down" arg
                              )
                          ).as(:oneline)
                        )
                    )
                ).as(:oneline),
                "otu-tca-uas" (
                    c(
                        c(
                          "ignore",
                          "hold-time" (
                              c(
                                  "up" arg,
                                  "down" arg
                              )
                          ).as(:oneline)
                        )
                    )
                ).as(:oneline),
                "otu-tca-bbe" (
                    c(
                        c(
                          "ignore",
                          "hold-time" (
                              c(
                                  "up" arg,
                                  "down" arg
                              )
                          ).as(:oneline)
                        )
                    )
                ).as(:oneline),
                "odu-ais" (
                    c(
                        c(
                          "ignore",
                          "hold-time" (
                              c(
                                  "up" arg,
                                  "down" arg
                              )
                          ).as(:oneline)
                        )
                    )
                ).as(:oneline),
                "odu-bdi" (
                    c(
                        c(
                          "ignore",
                          "hold-time" (
                              c(
                                  "up" arg,
                                  "down" arg
                              )
                          ).as(:oneline)
                        )
                    )
                ).as(:oneline),
                "odu-oci" (
                    c(
                        c(
                          "ignore",
                          "hold-time" (
                              c(
                                  "up" arg,
                                  "down" arg
                              )
                          ).as(:oneline)
                        )
                    )
                ).as(:oneline),
                "odu-lck" (
                    c(
                        c(
                          "ignore",
                          "hold-time" (
                              c(
                                  "up" arg,
                                  "down" arg
                              )
                          ).as(:oneline)
                        )
                    )
                ).as(:oneline),
                "odu-ttim" (
                    c(
                        c(
                          "ignore",
                          "hold-time" (
                              c(
                                  "up" arg,
                                  "down" arg
                              )
                          ).as(:oneline)
                        )
                    )
                ).as(:oneline),
                "odu-sd" (
                    c(
                        c(
                          "ignore",
                          "hold-time" (
                              c(
                                  "up" arg,
                                  "down" arg
                              )
                          ).as(:oneline)
                        )
                    )
                ).as(:oneline),
                "odu-tca-es" (
                    c(
                        c(
                          "ignore",
                          "hold-time" (
                              c(
                                  "up" arg,
                                  "down" arg
                              )
                          ).as(:oneline)
                        )
                    )
                ).as(:oneline),
                "odu-tca-ses" (
                    c(
                        c(
                          "ignore",
                          "hold-time" (
                              c(
                                  "up" arg,
                                  "down" arg
                              )
                          ).as(:oneline)
                        )
                    )
                ).as(:oneline),
                "odu-tca-uas" (
                    c(
                        c(
                          "ignore",
                          "hold-time" (
                              c(
                                  "up" arg,
                                  "down" arg
                              )
                          ).as(:oneline)
                        )
                    )
                ).as(:oneline),
                "odu-tca-bbe" (
                    c(
                        c(
                          "ignore",
                          "hold-time" (
                              c(
                                  "up" arg,
                                  "down" arg
                              )
                          ).as(:oneline)
                        )
                    )
                ).as(:oneline),
                "opu-ptim" (
                    c(
                        c(
                          "ignore",
                          "hold-time" (
                              c(
                                  "up" arg,
                                  "down" arg
                              )
                          ).as(:oneline)
                        )
                    )
                ).as(:oneline)
            )
        )
    )
end

rule(:override_local_server_type) do
    c(
        "interface-client-limit" arg,
        "no-arp",
        "client-discover-match".as(:oneline),
        "process-inform" (
            c(
                "pool" arg
            )
        )
    )
end

rule(:override_type) do
    c(
        "allow-snooped-clients",
        "no-allow-snooped-clients",
        "always-write-giaddr",
        "always-write-option-82",
        "layer2-unicast-replies",
        "trust-option-82",
        "disable-relay",
        "no-bind-on-request",
        "interface-client-limit" arg,
        "no-arp",
        "passive-client-processing",
        "client-discover-match".as(:oneline),
        "proxy-mode",
        "replace-ip-source-with".as(:oneline),
        "send-release-on-delete"
    )
end

rule(:packet_accounting_output_type) do
    c(
        "aggregate-export-interval" arg,
        "flow-inactive-timeout" arg,
        "flow-active-timeout" arg,
        "cflowd" (
          cflowd_packet_accounting_type
        ),
        "interface" (
          packet_export_intf_type
        )
    )
end

rule(:cflowd_packet_accounting_type) do
  arg.as(:arg) (
    c(
        "port" arg,
        "version" arg,
        "autonomous-system-type" arg,
        "aggregation" (
          aggregation_type
        )
    )
  )
end

rule(:packet_export_intf_type) do
  arg.as(:arg) (
    c(
        "engine-id" arg,
        "engine-type" arg,
        "source-address" (
          ipaddr
        )
    )
  )
end

rule(:peer_group) do
  arg.as(:arg) (
    c(
        "local-ip-addr" (
          ipv4addr
        ),
        "session-establishment-hold-time" arg,
        "redundancy-group-id-list" arg,
        "liveness-detection" (
            c(
                "version" arg,
                "minimum-interval" arg,
                "minimum-receive-interval" arg,
                "multiplier" arg,
                c(
                  "no-adaptation"
                ),
                "transmit-interval" (
                    c(
                        "minimum-interval" arg,
                        "threshold" arg
                    )
                ),
                "detection-time" (
                    c(
                        "threshold" arg
                    )
                )
            )
        ),
        "authentication-key" arg
    )
  )
end

rule(:periodic_oam) do
    c(
        "mpls-tp-mode",
        "bfd-liveness-detection" (
            c(
                "version" arg,
                "minimum-interval" arg,
                "minimum-receive-interval" arg,
                "multiplier" arg,
                c(
                  "no-adaptation"
                ),
                "transmit-interval" (
                    c(
                        "minimum-interval" arg,
                        "threshold" arg
                    )
                ),
                "detection-time" (
                    c(
                        "threshold" arg
                    )
                ),
                "failure-action" (
                    c(
                        c(
                          "teardown",
                          "make-before-break" (
                              c(
                                  "teardown-timeout" arg
                              )
                          )
                        )
                    )
                ).as(:oneline)
            )
        ),
        "lsp-ping-interval" arg,
        "traceoptions" (
            c(
                "no-remote-trace",
                "file" (
                    c(
                        "filename" arg,
                        "size" arg,
                        "files" arg,
                        "world-readable",
                        "no-world-readable",
                        "match" (
                          regular_expression
                        )
                    )
                ).as(:oneline),
                "flag" ("configuration" | "pipe" | "rpc-packet-details" | "database" | "network" | "traceroute" | "all").as(:oneline)
            )
        )
    )
end

rule(:pim_bootstrap_options_type) do
    c(
        "priority" arg,
        "import" (
          policy_algebra
        ),
        "export" (
          policy_algebra
        )
    )
end

rule(:pim_dense_group_type) do
  arg.as(:arg) (
    c(
        c(
          "reject",
          "announce"
        )
    )
  ).as(:oneline)
end

rule(:pim_filter_obj) do
    c(
        "match-on" arg,
        "policy" (
          policy_algebra
        )
    ).as(:oneline)
end

rule(:pim_rp_group_range_type) do
  arg.as(:arg) (
    c(
        "nexthop-hold-time" arg
    )
  )
end

rule(:pm_family_input_type) do
    c(
        "rate" arg,
        "run-length" arg,
        "maximum-packet-length" arg
    )
end

rule(:pmond_traceoptions_type) do
    c(
        "no-remote-trace",
        "file" (
            c(
                "filename" arg,
                "size" arg,
                "files" arg,
                "world-readable",
                "no-world-readable",
                "match" (
                  regular_expression
                )
            )
        ).as(:oneline),
        "level" arg,
        "flag" ("events" | "heartbeat" | "process-tracking" | "ui" | "all").as(:oneline)
    )
end

rule(:policy_type) do
  arg.as(:arg) (
    c(
        "description" arg,
        "match" (
            c(
                c(
                  "source-address" (
                        ("any" | "any-ipv4" | "any-ipv6" | "address")
                  )
                ),
                c(
                  "destination-address" (
                        ("any" | "any-ipv4" | "any-ipv6" | "address")
                  )
                ),
                "source-address-excluded",
                "destination-address-excluded",
                c(
                  "application" arg
                ),
                c(
                  "source-identity" (
                        ("any" | "authenticated-user" | "unauthenticated-user" | "unknown-user" | arg)
                  )
                ),
                c(
                  "from-zone" (
                        ("any" | "from-zone-name")
                  )
                ),
                c(
                  "to-zone" (
                        ("any" | "to-zone-name")
                  )
                )
            )
        ),
        "then" (
            c(
                c(
                  "deny",
                  "reject",
                  "permit" (
                      c(
                          "tunnel" (
                            tunnel_type
                          ),
                          "firewall-authentication" (
                            firewall_authentication_type
                          ),
                          "destination-address" (
                            destination_nat_enable_type
                          ),
                          "application-services" (
                            application_services_type
                          ),
                          "tcp-options" (
                              c(
                                  "syn-check-required",
                                  "sequence-check-required"
                              )
                          ),
                          "services-offload"
                      )
                  )
                ),
                "log" (
                  log_type
                ),
                "count" (
                  count_type
                )
            )
        ),
        "scheduler-name" arg
    )
  )
end

rule(:application_services_type) do
    c(
        "gprs-gtp-profile" arg,
        "gprs-sctp-profile" arg,
        "idp",
        "ssl-proxy",
        "uac-policy" (
            c(
                "captive-portal" arg
            )
        ),
        "utm-policy" arg,
        "application-firewall" (
          jsf_service_rule_set_type
        ),
        "application-traffic-control" (
          jsf_application_traffic_control_rule_set_type
        ),
        c(
          "redirect-wx",
          "reverse-redirect-wx"
        )
    )
end

rule(:count_type) do
    c(
        "alarm" (
            c(
                "per-second-threshold" arg,
                "per-minute-threshold" arg
            )
        ).as(:oneline)
    )
end

rule(:destination_nat_enable_type) do
    c(
        c(
          "drop-translated",
          "drop-untranslated"
        )
    )
end

rule(:firewall_authentication_type) do
    c(
        c(
          "pass-through" (
              c(
                  "access-profile" arg,
                  "client-match" arg,
                  "web-redirect",
                  "web-redirect-to-https",
                  "ssl-termination-profile" arg
              )
          ),
          "web-authentication" (
              c(
                  "client-match" arg
              )
          ),
          "user-firewall" (
              c(
                  "access-profile" arg,
                  "ssl-termination-profile" arg,
                  "domain" arg
              )
          )
        )
    )
end

rule(:jsf_application_traffic_control_rule_set_type) do
    c(
        "rule-set" arg
    )
end

rule(:jsf_service_rule_set_type) do
    c(
        "rule-set" arg
    )
end

rule(:log_type) do
    c(
        "session-init",
        "session-close"
    )
end

rule(:port_range) do
  arg.as(:arg) (
    c(
        "maximum-port" arg
    )
  ).as(:oneline)
end

rule(:ppp_traceoptions_type) do
    c(
        "no-remote-trace",
        "file" (
            c(
                "filename" arg,
                "size" arg,
                "files" arg,
                "world-readable",
                "no-world-readable",
                "match" (
                  regular_expression
                )
            )
        ).as(:oneline),
        "level" arg,
        "flag" ("access" | "address-pool" | "auth" | "chap" | "pap" | "config" | "ifdb" | "lcp" | "memory" | "message" | "mlppp" | "ncp" | "ppp" | "radius" | "redundancy" | "rtsock" | "session" | "signal" | "timer" | "ui" | "ci" | "all").as(:oneline)
    )
end

rule(:ppp_options_type) do
    c(
        "dynamic-profile" arg,
        "chap" (
            c(
                c(
                  "access-profile" arg,
                  "default-chap-secret" (
                    unreadable
                  )
                ),
                "local-name" arg,
                "no-rfc2486",
                "passive"
            )
        ),
        "pap" (
            c(
                c(
                  "access-profile" arg,
                  "default-password" (
                    unreadable
                  )
                ),
                "local-name" arg,
                "no-rfc2486",
                "local-password" (
                  unreadable
                ),
                "passive"
            )
        ),
        "compression" (
            c(
                "acfc",
                "pfc"
            )
        ).as(:oneline),
        "lcp-restart-timer" arg,
        "ncp-restart-timer" arg,
        "no-termination-request",
        "loopback-clear-timer" arg,
        "lcp-max-conf-req" arg,
        "ncp-max-conf-req" arg
    )
end

rule(:pppoe_traceoptions_type) do
    c(
        "no-remote-trace",
        "file" (
            c(
                "filename" arg,
                "size" arg,
                "files" arg,
                "world-readable",
                "no-world-readable",
                "match" (
                  regular_expression
                )
            )
        ).as(:oneline),
        "level" arg,
        "flag" ("config" | "events" | "gres" | "init" | "interface-db" | "memory" | "protocol" | "rtsock" | "session-db" | "signal" | "state" | "timer" | "ui" | "all").as(:oneline)
    )
end

rule(:pppoe_options_type) do
    c(
        "underlying-interface" arg,
        "idle-timeout" arg,
        "access-concentrator" arg,
        "service-name" arg,
        "auto-reconnect" arg,
        c(
          "server",
          "client"
        )
    )
end

rule(:pppoe_underlying_options_type) do
    c(
        "access-concentrator" arg,
        "duplicate-protection",
        "dynamic-profile" arg,
        "max-sessions" arg,
        "max-sessions-vsa-ignore",
        "service-name-table" arg,
        "short-cycle-protection" (
            c(
                "lockout-time-min" arg,
                "lockout-time-max" arg
            )
        )
    )
end

rule(:prefix_action) do
  arg.as(:arg) (
    c(
        "policer" arg,
        "count",
        "filter-specific",
        "subnet-prefix-length" arg,
        c(
          "source-prefix-length" arg,
          "destination-prefix-length" arg
        )
    )
  )
end

rule(:prefix_list_items) do
  arg.as(:arg)
end

rule(:profile_radius_server_object) do
  arg.as(:arg) (
    c(
        "port" arg,
        "accounting-port" arg,
        "secret" (
          unreadable
        ),
        "timeout" arg,
        "retry" arg,
        "max-outstanding-requests" arg,
        "source-address" (
          ipaddr
        ),
        "routing-instance" arg
    )
  )
end

rule(:profile_setting) do
  arg.as(:arg) (
    c(
        "anti-virus" (
            c(
                "http-profile" arg,
                "ftp" (
                    c(
                        "upload-profile" arg,
                        "download-profile" arg
                    )
                ),
                "smtp-profile" arg,
                "pop3-profile" arg,
                "imap-profile" arg
            )
        ),
        "content-filtering" (
            c(
                "http-profile" arg,
                "ftp" (
                    c(
                        "upload-profile" arg,
                        "download-profile" arg
                    )
                ),
                "smtp-profile" arg,
                "pop3-profile" arg,
                "imap-profile" arg
            )
        ),
        "web-filtering" (
            c(
                "http-profile" arg
            )
        ),
        "anti-spam" (
            c(
                "smtp-profile" arg
            )
        ),
        "traffic-options" (
            c(
                "sessions-per-client" (
                    c(
                        "limit" arg,
                        "over-limit" arg
                    )
                )
            )
        )
    )
  )
end

rule(:proto_object) do
  arg.as(:arg) (
    c(
        "tunable-name" (
          tunable_object
        )
    )
  )
end

rule(:proxy_object) do
    c(
        "server" arg,
        "port" arg,
        "username" arg,
        "password" (
          unreadable
        )
    )
end

rule(:qualified_nh_obj) do
  arg.as(:arg) (
    c(
        "preference" arg,
        "metric" arg,
        "interface" (
          interface_name
        ),
        "mac-address" (
          mac_unicaset
        ),
        "bfd-liveness-detection" (
            c(
                "version" arg,
                "minimum-interval" arg,
                "minimum-receive-interval" arg,
                "multiplier" arg,
                c(
                  "no-adaptation"
                ),
                "transmit-interval" (
                    c(
                        "minimum-interval" arg,
                        "threshold" arg
                    )
                ),
                "detection-time" (
                    c(
                        "threshold" arg
                    )
                ),
                "authentication" (
                    c(
                        "key-chain" arg,
                        "algorithm" arg,
                        "loose-check"
                    )
                ),
                "neighbor" (
                  ipaddr
                ),
                "local-address" (
                  ipaddr
                ),
                "holddown-interval" arg,
                "minimum-receive-ttl" arg
            )
        )
    )
  )
end

rule(:r2cp_traceoptions_type) do
    c(
        "no-remote-trace",
        "file" (
            c(
                "filename" arg,
                "size" arg,
                "files" arg,
                "world-readable",
                "no-world-readable",
                "match" (
                  regular_expression
                )
            )
        ).as(:oneline),
        "level" arg,
        "flag" ("configuration" | "event" | "interface" | "node" | "packet" | "rtsock" | "session" | "socket" | "timer" | "virtual-channel" | "all").as(:oneline)
    )
end

rule(:radius_disconnect_object) do
  arg.as(:arg) (
    c(
        "secret" (
          unreadable
        )
    )
  )
end

rule(:radius_server_object) do
  arg.as(:arg) (
    c(
        "port" arg,
        "accounting-port" arg,
        "secret" (
          unreadable
        ),
        "timeout" arg,
        "retry" arg,
        "max-outstanding-requests" arg,
        "source-address" (
          ipaddr
        )
    )
  )
end

rule(:range_address_type) do
  arg.as(:arg) (
    c(
        "to" (
            c(
                "range-high" (
                  ipv4addr
                )
            )
        )
    )
  )
end

rule(:reconfigure_trigger_type) do
    c(
        "radius-disconnect"
    )
end

rule(:reconfigure_type) do
    c(
        "clear-on-abort",
        "attempts" arg,
        "timeout" arg,
        "token" arg,
        "trigger" (
          reconfigure_trigger_type
        )
    )
end

rule(:relay_option_60_type_group) do
    c(
        "vendor-option" (
            c(
                "equals" (
                  relay_option_60_match_group
                ),
                "starts-with" (
                  relay_option_60_match_group
                ),
                c(
                  "default-relay-server-group" arg,
                  "default-local-server-group" arg,
                  "drop"
                )
            )
        )
    )
end

rule(:relay_option_60_match_group) do
    c(
        "ascii" arg (
            c(
                c(
                  "relay-server-group" arg,
                  "local-server-group" arg,
                  "drop"
                )
            )
        ),
        "hexadecimal" arg (
            c(
                c(
                  "relay-server-group" arg,
                  "local-server-group" arg,
                  "drop"
                )
            )
        )
    )
end

rule(:relay_option_60_type_top) do
    c(
        "vendor-option" (
            c(
                "equals" (
                  relay_option_60_match_top
                ),
                "starts-with" (
                  relay_option_60_match_top
                ),
                c(
                  "default-relay-server-group" arg,
                  "default-local-server-group" arg,
                  "drop"
                )
            )
        )
    )
end

rule(:relay_option_60_match_top) do
    c(
        "ascii" arg (
            c(
                c(
                  "relay-server-group" arg,
                  "local-server-group" arg,
                  "drop"
                )
            )
        ),
        "hexadecimal" arg (
            c(
                c(
                  "relay-server-group" arg,
                  "local-server-group" arg,
                  "drop"
                )
            )
        )
    )
end

rule(:relay_option_82_type) do
    c(
        "circuit-id" (
            c(
                "prefix" (
                    c(
                        "host-name",
                        "logical-system-name",
                        "routing-instance-name"
                    )
                ),
                "use-interface-description" arg
            )
        )
    )
end

rule(:res_cleanupd_traceoptions_type) do
    c(
        "no-remote-trace",
        "file" (
            c(
                "filename" arg,
                "size" arg,
                "files" arg,
                "world-readable",
                "no-world-readable",
                "match" (
                  regular_expression
                )
            )
        ).as(:oneline),
        "level" arg,
        "flag" ("events" | "gencfg" | "module" | "sysvsem" | "sysvshm" | "tracking" | "ui" | "all").as(:oneline)
    )
end

rule(:resources_type) do
    c(
        "cpu" (
            c(
                "priority" arg,
                "time" arg
            )
        ),
        "memory" (
            c(
                "data-size" arg,
                "locked-in" arg,
                "resident-set-size" arg,
                "socket-buffers" arg,
                "stack-size" arg
            )
        ),
        "file" (
            c(
                "size" arg,
                "open" arg,
                "core-size" arg
            )
        )
    )
end

rule(:rib_aggregate_type) do
    c(
        "defaults" (
            c(
                "metric" (
                  rib_static_metric_type
                ),
                "metric2" (
                  rib_static_metric_type
                ),
                "metric3" (
                  rib_static_metric_type
                ),
                "metric4" (
                  rib_static_metric_type
                ),
                "tag" (
                  rib_static_metric_type
                ),
                "tag2" (
                  rib_static_metric_type
                ),
                "preference" (
                  rib_static_metric_type
                ),
                "preference2" (
                  rib_static_metric_type
                ),
                "color" (
                  rib_static_metric_type
                ),
                "color2" (
                  rib_static_metric_type
                ),
                "community" (
                  community
                ),
                "as-path" (
                    c(
                        "path" arg,
                        "origin" arg,
                        "atomic-aggregate",
                        "aggregator" (
                            c(
                                "as-number" arg,
                                "address" (
                                  ipv4addr
                                )
                            )
                        )
                    )
                ),
                "discard",
                c(
                  "brief",
                  "full"
                ),
                c(
                  "active",
                  "passive"
                )
            )
        ),
        "route" arg (
            c(
                "policy" (
                  policy_algebra
                ),
                "metric" (
                  rib_static_metric_type
                ),
                "metric2" (
                  rib_static_metric_type
                ),
                "metric3" (
                  rib_static_metric_type
                ),
                "metric4" (
                  rib_static_metric_type
                ),
                "tag" (
                  rib_static_metric_type
                ),
                "tag2" (
                  rib_static_metric_type
                ),
                "preference" (
                  rib_static_metric_type
                ),
                "preference2" (
                  rib_static_metric_type
                ),
                "color" (
                  rib_static_metric_type
                ),
                "color2" (
                  rib_static_metric_type
                ),
                "community" (
                  community
                ),
                "as-path" (
                    c(
                        "path" arg,
                        "origin" arg,
                        "atomic-aggregate",
                        "aggregator" (
                            c(
                                "as-number" arg,
                                "address" (
                                  ipv4addr
                                )
                            )
                        )
                    )
                ),
                "discard",
                c(
                  "brief",
                  "full"
                ),
                c(
                  "active",
                  "passive"
                )
            )
        )
    )
end

rule(:rib_group_inet_type) do
    c(
        "ribgroup-name" arg
    ).as(:oneline)
end

rule(:rib_group_type) do
    c(
        "inet" arg,
        "inet6" arg
    )
end

rule(:rib_static_metric_type) do
    c(
        "metric-value" arg,
        "type" arg
    ).as(:oneline)
end

rule(:rip_filter_obj) do
    c(
        "match-on" arg,
        "policy" (
          policy_algebra
        )
    ).as(:oneline)
end

rule(:rpd_rib_group_type) do
  arg.as(:arg) (
    c(
        "export-rib" arg,
        "import-rib" arg,
        "import-policy" (
          policy_algebra
        )
    )
  )
end

rule(:sampling_family_inet6_output_type) do
    c(
        "aggregate-export-interval" arg,
        "flow-inactive-timeout" arg,
        "flow-active-timeout" arg,
        "flow-server" (
          cflowd_sampling_inet6_sampling_type
        ),
        "interface" (
          packet_export_intf_type
        ),
        "inline-jflow" (
          packet_export_inline
        ),
        "extension-service" arg
    )
end

rule(:cflowd_sampling_inet6_sampling_type) do
  arg.as(:arg) (
    c(
        "port" arg,
        "autonomous-system-type" arg,
        "aggregation" (
          aggregation_type
        ),
        "local-dump",
        "no-local-dump",
        "source-address" (
          ipv4addr
        ),
        "version9" (
            c(
                "template" (
                    c(
                        "template-name" arg
                    )
                )
            )
        )
    )
  )
end

rule(:packet_export_inline) do
    c(
        "source-address" (
          ipaddr
        ),
        "flow-export-rate" arg
    )
end

rule(:sampling_input_type) do
    c(
        "rate" arg,
        "run-length" arg,
        "max-packets-per-second" arg,
        "maximum-packet-length" arg
    )
end

rule(:sampling_instance_inet_global_output_type) do
    c(
        "aggregate-export-interval" arg,
        "flow-inactive-timeout" arg,
        "flow-active-timeout" arg,
        "file" (
            c(
                c(
                  "disable"
                ),
                "filename" arg,
                "files" arg,
                "size" arg,
                "world-readable",
                "no-world-readable",
                "stamp",
                "no-stamp"
            )
        ).as(:oneline),
        "flow-server" (
          cflowd_sampling_inet_type
        ),
        "interface" (
          packet_export_intf_type
        ),
        "inline-jflow" (
          packet_export_inline
        ),
        "extension-service" arg
    )
end

rule(:cflowd_sampling_inet_type) do
  arg.as(:arg) (
    c(
        "port" arg,
        "autonomous-system-type" arg,
        "aggregation" (
          aggregation_type
        ),
        "local-dump",
        "no-local-dump",
        "source-address" (
          ipv4addr
        ),
        "version9" (
            c(
                "template" (
                    c(
                        "template-name" arg
                    )
                )
            )
        ),
        "version" arg
    )
  )
end

rule(:sampling_traceoptions_type) do
    c(
        "no-remote-trace",
        "file" (
            c(
                "filename" arg,
                "size" arg,
                "files" arg,
                "world-readable",
                "no-world-readable",
                "match" (
                  regular_expression
                )
            )
        ).as(:oneline)
    )
end

rule(:sbc_traceoptions) do
    c(
        "no-remote-trace",
        "file" (
            c(
                "filename" arg,
                "size" arg,
                "files" arg,
                "world-readable",
                "no-world-readable",
                "match" (
                  regular_expression
                )
            )
        ).as(:oneline),
        "flag" (
            c(
                "configuration" arg,
                "ipc" arg,
                "device-monitor" arg,
                "ui" arg,
                "common" arg,
                "memory-pool" arg,
                "packet-capture" arg,
                "all" arg
            )
        )
    )
end

rule(:sbl_type) do
    c(
        "profile" arg (
            c(
                "sbl-default-server",
                "no-sbl-default-server",
                "spam-action" arg,
                "custom-tag-string" arg
            )
        )
    )
end

rule(:scheduler_object_type) do
  arg.as(:arg) (
    c(
        "description" arg,
        "start-date" (
            s(
              "start-date" arg,
              "stop-date" arg
            )
        ),
        "daily" (
          daily_object
        ),
        "sunday" (
          daily_object
        ),
        "monday" (
          daily_object
        ),
        "tuesday" (
          daily_object
        ),
        "wednesday" (
          daily_object
        ),
        "thursday" (
          daily_object
        ),
        "friday" (
          daily_object
        ),
        "saturday" (
          daily_object
        )
    )
  )
end

rule(:daily_object) do
    c(
        c(
          "start-time" (
              s(
                "start-time-value" arg,
                "stop-time" arg
              )
          ),
          "exclude",
          "all-day"
        )
    )
end

rule(:scripts_type) do
    c(
        "commit" (
            c(
                "allow-transients",
                "traceoptions" (
                  script_traceoptions
                ),
                "refresh",
                "refresh-from" arg,
                "direct-access",
                "file" (
                  commit_scripts_file_type
                )
            )
        ),
        "op" (
            c(
                "traceoptions" (
                  script_traceoptions
                ),
                "file" (
                  op_scripts_file_type
                ),
                "refresh",
                "refresh-from" arg,
                "no-allow-url"
            )
        ),
        "load-scripts-from-flash"
    )
end

rule(:commit_scripts_file_type) do
  arg.as(:arg) (
    c(
        "optional",
        "source" arg,
        "refresh",
        "refresh-from" arg,
        "checksum" (
            c(
                "md5" arg,
                "sha1" arg,
                "sha-256" arg
            )
        )
    )
  )
end

rule(:op_scripts_file_type) do
  arg.as(:arg) (
    c(
        "command" arg,
        "description" arg,
        "source" arg,
        "refresh",
        "refresh-from" arg,
        "arguments" arg (
            c(
                "description" arg
            )
        ),
        "checksum" (
            c(
                "md5" arg,
                "sha1" arg,
                "sha-256" arg
            )
        )
    )
  )
end

rule(:script_traceoptions) do
    c(
        "no-remote-trace",
        "file" (
            c(
                "filename" arg,
                "size" arg,
                "files" arg,
                "world-readable",
                "no-world-readable"
            )
        ).as(:oneline),
        "flag" ("all" | "events" | "input" | "offline" | "output" | "rpc" | "xslt").as(:oneline)
    )
end

rule(:securid_server_object) do
  arg.as(:arg) (
    c(
        "configuration-file" arg
    )
  )
end

rule(:security_group_vpn) do
    c(
        "member" (
          gvpn_member
        ),
        "server" (
          gvpn_server
        ),
        "co-location"
    )
end

rule(:gvpn_member) do
    c(
        "ike" (
          gvpn_member_ike
        ),
        "ipsec" (
          gvpn_member_ipsec_vpn
        )
    )
end

rule(:gvpn_member_ike) do
    c(
        "proposal" (
          gvpn_member_ike_proposal
        ),
        "policy" (
          gvpn_member_ike_policy
        ),
        "gateway" arg (
            c(
                "ike-policy" arg,
                c(
                  "address" (
                    hostname
                  )
                ),
                "local-identity" (
                    c(
                        c(
                          "inet" (
                              c(
                                  "identity-ipv4" (
                                    ipv4addr
                                  )
                              )
                          ),
                          "hostname" (
                              c(
                                  "identity-hostname" arg
                              )
                          ),
                          "user-at-hostname" (
                              c(
                                  "identity-user" arg
                              )
                          ),
                          "distinguished-name"
                        )
                    )
                ).as(:oneline),
                "local-address" (
                  ipv4addr
                )
            )
        )
    )
end

rule(:gvpn_member_ike_policy) do
  arg.as(:arg) (
    c(
        "mode" arg,
        "description" arg,
        "proposals" arg,
        "certificate" (
            c(
                "local-certificate" arg,
                "peer-certificate-type" arg
            )
        ),
        "proposal-set" arg,
        "pre-shared-key" (
            c(
                c(
                  "ascii-text" (
                    unreadable
                  ),
                  "hexadecimal" (
                    unreadable
                  )
                )
            )
        ).as(:oneline)
    )
  )
end

rule(:gvpn_member_ike_proposal) do
  arg.as(:arg) (
    c(
        "description" arg,
        "authentication-method" arg,
        "dh-group" arg,
        "authentication-algorithm" arg,
        "encryption-algorithm" arg,
        "lifetime-seconds" arg
    )
  )
end

rule(:gvpn_member_ipsec_vpn) do
    c(
        "vpn" (
          ipsec_gvpn_member_template
        )
    )
end

rule(:gvpn_server) do
    c(
        "traceoptions" (
          gvpn_server_traceoptions
        ),
        "ike" (
          gvpn_server_ike
        ),
        "ipsec" (
          gvpn_server_ipsec_vpn
        ),
        "group" (
          gvpn_server_group_template
        )
    )
end

rule(:gvpn_server_group_template) do
  arg.as(:arg) (
    c(
        "description" arg,
        "group-id" arg,
        "ike-gateway" (
          gvpn_server_ike_gateway
        ),
        "activation-time-delay" arg,
        c(
          "anti-replay-time-window" arg,
          "no-anti-replay"
        ),
        "server-address" (
          ipv4addr
        ),
        "server-member-communication" (
          gvpn_server_member_communication
        ),
        "ipsec-sa" (
          gvpn_server_group_ipsecsa
        )
    )
  )
end

rule(:gvpn_server_group_ipsecsa) do
  arg.as(:arg) (
    c(
        "proposal" arg,
        "match-policy" (
          gvpn_server_group_ipsecsa_match
        )
    )
  )
end

rule(:gvpn_server_group_ipsecsa_match) do
  arg.as(:arg) (
    c(
        "source" (
          ipv4prefix_mandatory
        ),
        "destination" (
          ipv4prefix_mandatory
        ),
        "source-port" arg,
        "destination-port" arg,
        "protocol" arg
    )
  )
end

rule(:gvpn_server_ike) do
    c(
        "proposal" (
          gvpn_server_ike_proposal
        ),
        "policy" (
          ike_policy
        ),
        "gateway" arg (
            c(
                "ike-policy" arg,
                c(
                  "address" arg,
                  "dynamic" (
                      c(
                          c(
                            "distinguished-name" (
                                c(
                                    "container" arg,
                                    "wildcard" arg
                                )
                            ),
                            "hostname" arg,
                            "inet" (
                              ipv4addr
                            ),
                            "user-at-hostname" arg
                          )
                      )
                  )
                ),
                "local-identity" (
                    c(
                        c(
                          "inet" (
                              c(
                                  "identity-ipv4" (
                                    ipv4addr
                                  )
                              )
                          ),
                          "hostname" (
                              c(
                                  "identity-hostname" arg
                              )
                          ),
                          "user-at-hostname" (
                              c(
                                  "identity-user" arg
                              )
                          ),
                          "distinguished-name"
                        )
                    )
                ).as(:oneline)
            )
        )
    )
end

rule(:gvpn_server_ike_gateway) do
  arg.as(:arg)
end

rule(:gvpn_server_ike_proposal) do
  arg.as(:arg) (
    c(
        "description" arg,
        "authentication-method" arg,
        "dh-group" arg,
        "authentication-algorithm" arg,
        "encryption-algorithm" arg
    )
  )
end

rule(:gvpn_server_ipsec_vpn) do
    c(
        "proposal" (
          gvpn_server_ipsec_proposal
        )
    )
end

rule(:gvpn_server_ipsec_proposal) do
  arg.as(:arg) (
    c(
        "description" arg,
        "authentication-algorithm" arg,
        "encryption-algorithm" arg,
        "lifetime-seconds" arg
    )
  )
end

rule(:gvpn_server_member_communication) do
    c(
        "communication-type" arg,
        "multicast-group" (
          ipv4addr
        ),
        "multicast-outgoing-interface" (
          gvpn_server_multicast_interface
        ),
        "lifetime-seconds" arg,
        "retransmission-period" arg,
        "number-of-retransmission" arg,
        "heartbeat" arg,
        "encryption-algorithm" arg,
        "sig-hash-algorithm" arg,
        "certificate" arg
    )
end

rule(:gvpn_server_multicast_interface) do
  arg.as(:arg)
end

rule(:gvpn_server_traceoptions) do
    c(
        "no-remote-trace",
        "file" (
            c(
                "filename" arg,
                "size" arg,
                "files" arg,
                "world-readable",
                "no-world-readable",
                "match" (
                  regular_expression
                )
            )
        ).as(:oneline),
        "flag" ("timer" | "routing-socket" | "parse" | "config" | "ike" | "policy-manager" | "general" | "database" | "certificates" | "snmp" | "thread" | "high-availability" | "next-hop-tunnels" | "all").as(:oneline)
    )
end

rule(:ike_policy) do
  arg.as(:arg) (
    c(
        "mode" arg,
        "description" arg,
        "proposals" arg,
        "certificate" (
            c(
                "local-certificate" arg,
                "peer-certificate-type" arg
            )
        ),
        "proposal-set" arg,
        "pre-shared-key" (
            c(
                c(
                  "ascii-text" (
                    unreadable
                  ),
                  "hexadecimal" (
                    unreadable
                  )
                )
            )
        ).as(:oneline)
    )
  )
end

rule(:ipsec_gvpn_member_template) do
  arg.as(:arg) (
    c(
        "ike-gateway" arg,
        "group-vpn-external-interface" (
          interface_name
        ),
        "group" arg,
        "heartbeat-threshold" arg
    )
  )
end

rule(:security_ike) do
    c(
        "traceoptions" (
          security_traceoptions
        ),
        "respond-bad-spi" (
            c(
                "max-responses" arg
            )
        ).as(:oneline),
        "proposal" (
          ike_proposal
        ),
        "policy" (
          ike_policy
        ),
        "gateway" arg (
            c(
                "ike-policy" arg,
                c(
                  "address" arg,
                  "dynamic" (
                      c(
                          c(
                            "distinguished-name" (
                                c(
                                    "container" arg,
                                    "wildcard" arg
                                )
                            ),
                            "hostname" arg,
                            "inet" (
                              ipv4addr
                            ),
                            "inet6" (
                              ipv6addr
                            ),
                            "user-at-hostname" arg
                          ),
                          "connections-limit" arg,
                          "ike-user-type" arg
                      )
                  )
                ),
                "dead-peer-detection" (
                    c(
                        c(
                          "optimized",
                          "probe-idle-tunnel",
                          "always-send"
                        ),
                        "interval" arg,
                        "threshold" arg
                    )
                ),
                "no-nat-traversal",
                "nat-keepalive" arg,
                "local-identity" (
                    c(
                        c(
                          "inet" (
                              c(
                                  "identity-ipv4" (
                                    ipv4addr
                                  )
                              )
                          ),
                          "inet6" (
                              c(
                                  "identity-ipv6" (
                                    ipv6addr
                                  )
                              )
                          ),
                          "hostname" (
                              c(
                                  "identity-hostname" arg
                              )
                          ),
                          "user-at-hostname" (
                              c(
                                  "identity-user" arg
                              )
                          ),
                          "distinguished-name"
                        )
                    )
                ).as(:oneline),
                "remote-identity" (
                    c(
                        c(
                          "inet" (
                              c(
                                  "identity-ipv4" (
                                    ipv4addr
                                  )
                              )
                          ),
                          "inet6" (
                              c(
                                  "identity-ipv6" (
                                    ipv6addr
                                  )
                              )
                          ),
                          "hostname" (
                              c(
                                  "identity-hostname" arg
                              )
                          ),
                          "user-at-hostname" (
                              c(
                                  "identity-user" arg
                              )
                          ),
                          "distinguished-name" (
                              c(
                                  "container" arg,
                                  "wildcard" arg
                              )
                          )
                        )
                    )
                ).as(:oneline),
                "external-interface" (
                  interface_unit
                ),
                "local-address" (
                  ipaddr
                ),
                "xauth" (
                    c(
                        "access-profile" arg
                    )
                ).as(:oneline),
                "general-ikeid",
                "version" arg
            )
        )
    )
end

rule(:ike_proposal) do
  arg.as(:arg) (
    c(
        "description" arg,
        "authentication-method" arg,
        "dh-group" arg,
        "authentication-algorithm" arg,
        "encryption-algorithm" arg,
        "lifetime-seconds" arg
    )
  )
end

rule(:security_ipsec_vpn) do
    c(
        "internal" (
            c(
                "security-association" (
                  ipsec_internal_sa
                )
            )
        ),
        "traceoptions" (
          ipsec_traceoptions
        ),
        "vpn-monitor-options" (
          ipsec_vpn_monitor
        ),
        "proposal" (
          ipsec_proposal
        ),
        "policy" (
          ipsec_policy
        ),
        "vpn" (
          ipsec_vpn_template
        ),
        "security-association" (
          ipsec_sa
        )
    )
end

rule(:ipsec_internal_sa) do
    c(
        "manual" (
            c(
                "encryption" (
                    c(
                        "algorithm" arg,
                        "ike-ha-link-encryption" arg,
                        "key" (
                            c(
                                c(
                                  "ascii-text" (
                                    unreadable
                                  )
                                )
                            )
                        ).as(:oneline)
                    )
                )
            )
        )
    )
end

rule(:ipsec_policy) do
  arg.as(:arg) (
    c(
        "description" arg,
        "perfect-forward-secrecy" (
            c(
                "keys" arg
            )
        ),
        "proposals" arg,
        "proposal-set" arg
    )
  )
end

rule(:ipsec_proposal) do
  arg.as(:arg) (
    c(
        "description" arg,
        "protocol" arg,
        "authentication-algorithm" arg,
        "encryption-algorithm" arg,
        "lifetime-seconds" arg,
        "lifetime-kilobytes" arg
    )
  )
end

rule(:ipsec_sa) do
  arg.as(:arg) (
    c(
        "description" arg,
        "mode" arg,
        c(
          "manual" (
            security_association_manual
          )
        )
    )
  )
end

rule(:ipsec_traceoptions) do
    c(
        "flag" ("packet-processing" | "packet-drops" | "security-associations" | "next-hop-tunnel-binding" | "all").as(:oneline)
    )
end

rule(:ipsec_vpn_monitor) do
    c(
        "interval" arg,
        "threshold" arg
    )
end

rule(:ipsec_vpn_template) do
  arg.as(:arg) (
    c(
        "bind-interface" (
          interface_name
        ),
        "df-bit" arg,
        "vpn-monitor" (
          ipsec_template_monitor
        ),
        c(
          "manual" (
              c(
                  "gateway" (
                    hostname
                  ),
                  "external-interface" (
                    interface_unit
                  ),
                  "protocol" arg,
                  "spi" arg,
                  "authentication" (
                      c(
                          "algorithm" arg,
                          "key" (
                              c(
                                  c(
                                    "ascii-text" (
                                      unreadable
                                    ),
                                    "hexadecimal" (
                                      unreadable
                                    )
                                  )
                              )
                          ).as(:oneline)
                      )
                  ),
                  "encryption" (
                      c(
                          "algorithm" arg,
                          "key" (
                              c(
                                  c(
                                    "ascii-text" (
                                      unreadable
                                    ),
                                    "hexadecimal" (
                                      unreadable
                                    )
                                  )
                              )
                          ).as(:oneline)
                      )
                  )
              )
          ),
          "ike" (
              c(
                  "gateway" arg,
                  "idle-time" arg,
                  "no-anti-replay",
                  "proxy-identity" (
                    ipsec_template_proxy_id
                  ),
                  "ipsec-policy" arg,
                  "install-interval" arg
              )
          )
        ),
        "traffic-selector" arg (
            c(
                "local-ip" (
                  ipprefix_mandatory
                ),
                "remote-ip" (
                  ipprefix_mandatory
                )
            )
        ),
        "establish-tunnels" arg
    )
  )
end

rule(:ipsec_template_monitor) do
    c(
        "optimized",
        "source-interface" (
          interface_unit
        ),
        "destination-ip" (
          ipaddr
        )
    )
end

rule(:ipsec_template_proxy_id) do
    c(
        "local" (
          ipprefix_mandatory
        ),
        "remote" (
          ipprefix_mandatory
        ),
        "service" arg
    )
end

rule(:security_association_manual) do
    c(
        "direction" ("bidirectional") (
            c(
                "protocol" arg,
                "spi" arg,
                "authentication" (
                    c(
                        "algorithm" arg,
                        "key" (
                            c(
                                c(
                                  "ascii-text" (
                                    unreadable
                                  ),
                                  "hexadecimal" (
                                    unreadable
                                  )
                                )
                            )
                        ).as(:oneline)
                    )
                ),
                "encryption" (
                    c(
                        "algorithm" arg,
                        "key" (
                            c(
                                c(
                                  "ascii-text" (
                                    unreadable
                                  ),
                                  "hexadecimal" (
                                    unreadable
                                  )
                                )
                            )
                        ).as(:oneline)
                    )
                )
            )
        )
    )
end

rule(:security_model_access) do
  ("any" | "usm" | "v1" | "v2c").as(:arg) (
    c(
        "security-level" ("none" | "authentication" | "privacy") (
            c(
                "context-match" arg,
                "read-view" arg,
                "write-view" arg,
                "notify-view" arg
            )
        )
    )
  )
end

rule(:security_pki) do
    c(
        "ca-profile" arg (
            c(
                "ca-identity" arg,
                "routing-instance" arg,
                "enrollment" (
                    c(
                        "url" arg,
                        "retry" arg,
                        "retry-interval" arg
                    )
                ),
                "revocation-check" (
                    c(
                        c(
                          "use-crl",
                          "use-ocsp",
                          "disable"
                        ),
                        "ocsp" (
                            c(
                                "url" arg,
                                "nonce-payload" arg,
                                "disable-responder-revocation-check",
                                "accept-unknown-status",
                                "connection-failure" (
                                    c(
                                        c(
                                          "fallback-crl",
                                          "disable"
                                        )
                                    )
                                )
                            )
                        ),
                        "crl" (
                            c(
                                "disable" (
                                    c(
                                        "on-download-failure"
                                    )
                                ).as(:oneline),
                                "url" arg (
                                    c(
                                        "password" (
                                          unreadable
                                        )
                                    )
                                ),
                                "refresh-interval" arg
                            )
                        )
                    )
                ),
                "administrator" (
                    c(
                        "email-address" arg
                    )
                )
            )
        ),
        "auto-re-enrollment" (
            c(
                "certificate-id" arg (
                    c(
                        "ca-profile-name" arg,
                        "challenge-password" (
                          unreadable
                        ),
                        "re-enroll-trigger-time-percentage" arg,
                        "re-generate-keypair",
                        "scep-encryption-algorithm" (
                            c(
                                c(
                                  "des",
                                  "des3"
                                )
                            )
                        ),
                        "scep-digest-algorithm" (
                            c(
                                c(
                                  "md5",
                                  "sha1"
                                )
                            )
                        )
                    )
                )
            )
        ),
        "traceoptions" (
            c(
                "no-remote-trace",
                "file" (
                    c(
                        "filename" arg,
                        "size" arg,
                        "files" arg,
                        "world-readable",
                        "no-world-readable",
                        "match" (
                          regular_expression
                        )
                    )
                ).as(:oneline),
                "flag" ("certificate-verification" | "online-crl-check" | "enrollment" | "all").as(:oneline)
            )
        )
    )
end

rule(:security_traceoptions) do
    c(
        "no-remote-trace",
        "file" (
            c(
                "filename" arg,
                "size" arg,
                "files" arg,
                "world-readable",
                "no-world-readable",
                "match" (
                  regular_expression
                )
            )
        ).as(:oneline),
        "rate-limit" arg,
        "filter",
        "flag" ("timer" | "routing-socket" | "parse" | "config" | "ike" | "policy-manager" | "general" | "database" | "certificates" | "snmp" | "thread" | "high-availability" | "next-hop-tunnels" | "all").as(:oneline)
    )
end

rule(:security_zone_type) do
  arg.as(:arg) (
    c(
        "description" arg,
        "tcp-rst",
        "address-book" (
          address_book_type
        ),
        "screen" arg,
        "host-inbound-traffic" (
          zone_host_inbound_traffic_t
        ),
        "interfaces" (
          zone_interface_list_type
        ),
        "application-tracking"
    )
  )
end

rule(:address_book_type) do
    c(
        "address" (
          address_type
        ),
        "address-set" (
          address_set_type
        )
    )
end

rule(:server_group_type) do
    c(
        "server-group" arg (
            c(
                "address" arg
            )
        )
    )
end

rule(:service_device_pool_object) do
  arg.as(:arg) (
    c(
        "interface" arg
    )
  )
end

rule(:service_interface_pool_object) do
  arg.as(:arg) (
    c(
        "interface" arg
    )
  )
end

rule(:service_set_syslog_object) do
    c(
        "host" arg (
            c(
                "contents" ("services") (
                    c(
                        c(
                          "any",
                          "emergency",
                          "alert",
                          "critical",
                          "error",
                          "warning",
                          "notice",
                          "info",
                          "none"
                        )
                    )
                ).as(:oneline),
                "facility-override" arg,
                "log-prefix" arg,
                "port" arg,
                "class" (
                    c(
                        "session-logs" (
                            c(
                                "open",
                                "close"
                            )
                        ).as(:oneline),
                        "packet-logs",
                        "stateful-firewall-logs",
                        "alg-logs",
                        "nat-logs",
                        "ids-logs"
                    )
                )
            )
        ),
        "message-rate-limit" arg
    )
end

rule(:smid_type) do
    c(
        "traceoptions" (
          smid_traceoptions_type
        ),
        "maintain-subscriber" (
          smid_maintain_subscriber_type
        ),
        "gres-route-flush-delay",
        "enforce-strict-scale-limit-license"
    )
end

rule(:smid_maintain_subscriber_type) do
    c(
        "interface-delete"
    )
end

rule(:smid_traceoptions_type) do
    c(
        "no-remote-trace",
        "file" (
            c(
                "filename" arg,
                "size" arg,
                "files" arg,
                "world-readable",
                "no-world-readable",
                "match" (
                  regular_expression
                )
            )
        ).as(:oneline),
        "flag" ("database" | "ui" | "general" | "session-db" | "server" | "issu" | "all").as(:oneline)
    )
end

rule(:smihelperd_type) do
    c(
        "traceoptions" (
          smihelperd_traceoptions_type
        )
    )
end

rule(:smihelperd_traceoptions_type) do
    c(
        "no-remote-trace",
        "file" (
            c(
                "filename" arg,
                "size" arg,
                "files" arg,
                "world-readable",
                "no-world-readable",
                "match" (
                  regular_expression
                )
            )
        ).as(:oneline),
        "flag" ("sdb" | "general" | "ui" | "snmp" | "all").as(:oneline)
    )
end

rule(:softwire_option_type) do
  arg.as(:arg) (
    c(
        "softwire-concentrator" (
          ipv6addr
        ),
        "softwire-type" arg
    )
  )
end

rule(:sonet_options_type) do
    c(
        "vtmapping" arg,
        "fcs" arg,
        "path-trace" arg,
        "loopback" arg,
        "trigger" (
            c(
                "lol" (
                    c(
                        c(
                          "ignore",
                          "hold-time" (
                              c(
                                  "up" arg,
                                  "down" arg
                              )
                          ).as(:oneline)
                        )
                    )
                ).as(:oneline),
                "pll" (
                    c(
                        c(
                          "ignore",
                          "hold-time" (
                              c(
                                  "up" arg,
                                  "down" arg
                              )
                          ).as(:oneline)
                        )
                    )
                ).as(:oneline),
                "lof" (
                    c(
                        c(
                          "ignore",
                          "hold-time" (
                              c(
                                  "up" arg,
                                  "down" arg
                              )
                          ).as(:oneline)
                        )
                    )
                ).as(:oneline),
                "los" (
                    c(
                        c(
                          "ignore",
                          "hold-time" (
                              c(
                                  "up" arg,
                                  "down" arg
                              )
                          ).as(:oneline)
                        )
                    )
                ).as(:oneline),
                "ais-l" (
                    c(
                        c(
                          "ignore",
                          "hold-time" (
                              c(
                                  "up" arg,
                                  "down" arg
                              )
                          ).as(:oneline)
                        )
                    )
                ).as(:oneline),
                "rfi-l" (
                    c(
                        c(
                          "ignore",
                          "hold-time" (
                              c(
                                  "up" arg,
                                  "down" arg
                              )
                          ).as(:oneline)
                        )
                    )
                ).as(:oneline),
                "ber-sd" (
                    c(
                        c(
                          "ignore",
                          "hold-time" (
                              c(
                                  "up" arg,
                                  "down" arg
                              )
                          ).as(:oneline)
                        )
                    )
                ),
                "ber-sf" (
                    c(
                        c(
                          "ignore",
                          "hold-time" (
                              c(
                                  "up" arg,
                                  "down" arg
                              )
                          ).as(:oneline)
                        )
                    )
                ),
                "ais-p" (
                    c(
                        c(
                          "ignore",
                          "hold-time" (
                              c(
                                  "up" arg,
                                  "down" arg
                              )
                          ).as(:oneline)
                        )
                    )
                ).as(:oneline),
                "lop-p" (
                    c(
                        c(
                          "ignore",
                          "hold-time" (
                              c(
                                  "up" arg,
                                  "down" arg
                              )
                          ).as(:oneline)
                        )
                    )
                ).as(:oneline),
                "rfi-p" (
                    c(
                        c(
                          "ignore",
                          "hold-time" (
                              c(
                                  "up" arg,
                                  "down" arg
                              )
                          ).as(:oneline)
                        )
                    )
                ).as(:oneline),
                "uneq-p" (
                    c(
                        c(
                          "ignore",
                          "hold-time" (
                              c(
                                  "up" arg,
                                  "down" arg
                              )
                          ).as(:oneline)
                        )
                    )
                ).as(:oneline),
                "plm-p" (
                    c(
                        c(
                          "ignore",
                          "hold-time" (
                              c(
                                  "up" arg,
                                  "down" arg
                              )
                          ).as(:oneline)
                        )
                    )
                ).as(:oneline),
                "locd" (
                    c(
                        c(
                          "ignore",
                          "hold-time" (
                              c(
                                  "up" arg,
                                  "down" arg
                              )
                          ).as(:oneline)
                        )
                    )
                ).as(:oneline),
                "lcdp" (
                    c(
                        c(
                          "ignore",
                          "hold-time" (
                              c(
                                  "up" arg,
                                  "down" arg
                              )
                          ).as(:oneline)
                        )
                    )
                ).as(:oneline)
            )
        ),
        "aps" (
          aps_type
        ),
        c(
          "payload-scrambler".as(:oneline),
          "no-payload-scrambler"
        ),
        "z0-increment",
        "no-z0-increment",
        "loop-timing",
        "no-loop-timing",
        "bytes" (
            c(
                "e1-quiet" arg,
                "f1" arg,
                "f2" arg,
                "s1" arg,
                "z3" arg,
                "z4" arg,
                "c2" arg
            )
        ),
        "rfc-2615",
        "aggregate" (
          interface_device
        ),
        "mpls" (
          mpls_ifd_options
        )
    )
end

rule(:sophos_fallback_settings) do
    c(
        "default" arg,
        "content-size" arg,
        "engine-not-ready" arg,
        "timeout" arg,
        "out-of-resources" arg,
        "too-many-requests" arg
    )
end

rule(:sophos_scan_options) do
    c(
        "uri-check",
        "no-uri-check",
        "content-size-limit" arg,
        "timeout" arg
    )
end

rule(:source_class_name_object) do
  arg.as(:arg).as(:oneline)
end

rule(:spi_type) do
  arg.as(:arg) (
    c(
        "entity-type" (
          peer_entity_type
        ),
        "algorithm" (
          peer_algorithm_type
        ),
        "key" (
          peer_key_type
        ),
        "replay-method" (
            c(
                c(
                  "timestamp" (
                      c(
                          "seconds" arg
                      )
                  ),
                  "none"
                )
            )
        ).as(:oneline)
    )
  )
end

rule(:peer_algorithm_type) do
    c(
        c(
          "hmac-md5",
          "md5"
        )
    ).as(:oneline)
end

rule(:peer_entity_type) do
    c(
        c(
          "host",
          "mobility-agent"
        )
    ).as(:oneline)
end

rule(:peer_key_type) do
    c(
        c(
          "hex" (
              c(
                  "hex-value" arg
              )
          ),
          "ascii" (
              c(
                  "ascii-value" arg
              )
          )
        )
    ).as(:oneline)
end

rule(:ssd_traceoptions_type) do
    c(
        "no-remote-trace",
        "file" (
            c(
                "filename" arg,
                "size" arg,
                "files" arg,
                "world-readable",
                "no-world-readable",
                "match" (
                  regular_expression
                )
            )
        ).as(:oneline),
        "level" arg,
        "flag" ("ssd-infrastructure" | "ssd-server" | "client-management" | "route-management" | "nexthop-management" | "all").as(:oneline)
    )
end

rule(:ssg_destination_nat_object) do
    c(
        "pool" arg (
            c(
                "description" arg,
                "routing-instance" (
                    c(
                        c(
                          "default",
                          "ri-name" arg
                        )
                    )
                ),
                "address" (
                    c(
                        "ipaddr" (
                          ipprefix
                        ),
                        c(
                          "to" (
                              c(
                                  "ipaddr" (
                                    ipprefix
                                  )
                              )
                          ),
                          "port" arg
                        )
                    )
                ).as(:oneline)
            )
        ),
        "rule-set" arg (
            c(
                "description" arg,
                "from" (
                    c(
                        c(
                          "routing-instance" (
                                ("default" | "routing-instance-name")
                          ),
                          "zone" arg,
                          "interface" (
                            interface_name
                          )
                        )
                    )
                ).as(:oneline),
                "rule" (
                  dest_nat_rule_object
                )
            )
        )
    )
end

rule(:dest_nat_rule_object) do
  arg.as(:arg) (
    c(
        "description" arg,
        "dest-nat-rule-match" (
            c(
                "source-address" (
                  ipprefix
                ),
                "source-address-name" arg,
                c(
                  "destination-address" (
                      c(
                          "dst-addr" (
                            ipprefix
                          )
                      )
                  ).as(:oneline),
                  "destination-address-name" (
                      c(
                          "dst-addr-name" arg
                      )
                  ).as(:oneline)
                ),
                "destination-port" arg (
                    c(
                        "to" (
                            c(
                                "high" arg
                            )
                        )
                    )
                ).as(:oneline),
                "protocol" (
                      ("icmp" | "igmp" | "ipip" | "tcp" | "egp" | "udp" | "rsvp" | "gre" | "esp" | "ah" | "icmp6" | "ospf" | "pim" | "sctp" | arg)
                ),
                "application" arg
            )
        ),
        "then" (
            c(
                "destination-nat" (
                    c(
                        c(
                          "off",
                          "pool" (
                              c(
                                  "pool-name" arg
                              )
                          )
                        ),
                        "rule-session-count-alarm" (
                          nat_rule_session_count_alarm_object
                        ).as(:oneline)
                    )
                )
            )
        )
    )
  )
end

rule(:nat_rule_session_count_alarm_object) do
    c(
        "raise-threshold" arg,
        "clear-threshold" arg
    ).as(:oneline)
end

rule(:ssg_proxy_arp_object) do
    c(
        "interface" (
          ssg_interface_object
        )
    )
end

rule(:ssg_interface_object) do
  arg.as(:arg) (
    c(
        "address" arg (
            c(
                "to" (
                    c(
                        "ipaddr" (
                          ipv4prefix
                        )
                    )
                )
            )
        ).as(:oneline)
    )
  )
end

rule(:ssg_proxy_ndp_object) do
    c(
        "interface" (
          ssg_proxy_ndp_interface_object
        )
    )
end

rule(:ssg_proxy_ndp_interface_object) do
  arg.as(:arg) (
    c(
        "address" arg (
            c(
                "to" (
                    c(
                        "ipv6addr" (
                          ipv6addr
                        )
                    )
                )
            )
        ).as(:oneline)
    )
  )
end

rule(:ssg_source_nat_object) do
    c(
        "pool" arg (
            c(
                "description" arg,
                "routing-instance" (
                    c(
                        "ri-name" arg
                    )
                ),
                "address" arg (
                    c(
                        "to" (
                            c(
                                "ipaddr" (
                                  ipprefix
                                )
                            )
                        )
                    )
                ).as(:oneline),
                "host-address-base" (
                    c(
                        "ipaddr" (
                          ipprefix
                        )
                    )
                ).as(:oneline),
                "port" (
                    c(
                        c(
                          "no-translation",
                          "range" (
                              c(
                                  "low" arg,
                                  "to" (
                                      c(
                                          "high" arg
                                      )
                                  ),
                                  "twin-port" (
                                      c(
                                          "low" arg,
                                          "to" (
                                              c(
                                                  "high" arg
                                              )
                                          )
                                      )
                                  )
                              )
                          ),
                          "port-overloading-factor" arg
                        ),
                        "block-allocation" (
                          block_allocation_object
                        ),
                        "deterministic" (
                          deterministic_object
                        )
                    )
                ),
                "overflow-pool" (
                    c(
                        c(
                          "pool-name" arg,
                          "interface"
                        )
                    )
                ).as(:oneline),
                "address-shared",
                "address-pooling" (
                    c(
                        c(
                          "paired",
                          "no-paired"
                        )
                    )
                ).as(:oneline),
                "address-persistent" (
                    c(
                        "subscriber" (
                            c(
                                "ipv6-prefix-length" arg
                            )
                        ).as(:oneline)
                    )
                ).as(:oneline),
                "pool-utilization-alarm" (
                  source_nat_pool_utilization_alarm_object
                ).as(:oneline)
            )
        ),
        "address-persistent",
        "pool-utilization-alarm" (
          source_nat_pool_utilization_alarm_object
        ).as(:oneline),
        "port-randomization" (
            c(
                c(
                  "disable"
                )
            )
        ).as(:oneline),
        "pool-default-port-range" (
            c(
                "low" arg,
                "to" (
                    c(
                        "high" arg
                    )
                )
            )
        ).as(:oneline),
        "pool-default-twin-port-range" (
            c(
                "low" arg,
                "to" (
                    c(
                        "high" arg
                    )
                )
            )
        ).as(:oneline),
        "interface" (
            c(
                c(
                  "port-overloading" (
                      c(
                          "off"
                      )
                  ).as(:oneline),
                  "port-overloading-factor" arg
                )
            )
        ),
        "rule-set" arg (
            c(
                "description" arg,
                "from" (
                    c(
                        c(
                          "routing-instance" (
                                ("default" | "routing-instance-name")
                          ),
                          "zone" arg,
                          "interface" (
                            interface_name
                          )
                        )
                    )
                ).as(:oneline),
                "to" (
                    c(
                        c(
                          "routing-instance" (
                                ("default" | "routing-instance-name")
                          ),
                          "zone" arg,
                          "interface" (
                            interface_name
                          )
                        )
                    )
                ).as(:oneline),
                "rule" (
                  src_nat_rule_object
                )
            )
        )
    )
end

rule(:block_allocation_object) do
    c(
        "block-size" arg,
        "maximum-blocks-per-host" arg,
        "active-block-timeout" arg,
        "log" (
            c(
                c(
                  "disable"
                )
            )
        ).as(:oneline)
    )
end

rule(:deterministic_object) do
    c(
        "block-size" arg,
        "host" (
            c(
                "address" (
                  ipprefix
                ),
                "address-name" arg
            )
        ).as(:oneline)
    )
end

rule(:source_nat_pool_utilization_alarm_object) do
    c(
        "raise-threshold" arg,
        "clear-threshold" arg
    ).as(:oneline)
end

rule(:src_nat_rule_object) do
  arg.as(:arg) (
    c(
        "description" arg,
        "src-nat-rule-match" (
            c(
                "source-address" (
                  ipprefix
                ),
                "source-address-name" arg,
                "source-port" arg (
                    c(
                        "to" (
                            c(
                                "high" arg
                            )
                        )
                    )
                ).as(:oneline),
                "destination-address" (
                  ipprefix
                ),
                "destination-address-name" arg,
                "destination-port" arg (
                    c(
                        "to" (
                            c(
                                "high" arg
                            )
                        )
                    )
                ).as(:oneline),
                "protocol" (
                      ("icmp" | "igmp" | "ipip" | "tcp" | "egp" | "udp" | "rsvp" | "gre" | "esp" | "ah" | "icmp6" | "ospf" | "pim" | "sctp" | arg)
                ),
                "application" arg
            )
        ),
        "then" (
            c(
                "source-nat" (
                    c(
                        c(
                          "off",
                          "pool" (
                              c(
                                  "pool-name" arg,
                                  "persistent-nat" (
                                    persistent_nat_object
                                  )
                              )
                          ),
                          "interface" (
                              c(
                                  "persistent-nat" (
                                    persistent_nat_object
                                  )
                              )
                          )
                        ),
                        "rule-session-count-alarm" (
                          nat_rule_session_count_alarm_object
                        ).as(:oneline)
                    )
                )
            )
        )
    )
  )
end

rule(:persistent_nat_object) do
    c(
        "permit" (
            c(
                c(
                  "any-remote-host",
                  "target-host",
                  "target-host-port"
                )
            )
        ).as(:oneline),
        "address-mapping",
        "inactivity-timeout" arg,
        "max-session-number" arg
    )
end

rule(:ssg_static_nat_object) do
    c(
        "rule-set" arg (
            c(
                "description" arg,
                "from" (
                    c(
                        c(
                          "routing-instance" (
                                ("default" | "routing-instance-name")
                          ),
                          "zone" arg,
                          "interface" (
                            interface_name
                          )
                        )
                    )
                ).as(:oneline),
                "rule" (
                  static_nat_rule_object
                )
            )
        )
    )
end

rule(:static_nat_rule_object) do
  arg.as(:arg) (
    c(
        "description" arg,
        "static-nat-rule-match" (
            c(
                "source-address" (
                  ipprefix
                ),
                "source-address-name" arg,
                "source-port" arg (
                    c(
                        "to" (
                            c(
                                "high" arg
                            )
                        )
                    )
                ).as(:oneline),
                c(
                  "destination-address" (
                      c(
                          "dst-addr" (
                            ipprefix
                          )
                      )
                  ).as(:oneline),
                  "destination-address-name" (
                      c(
                          "dst-addr-name" arg
                      )
                  ).as(:oneline)
                ),
                "destination-port" (
                    c(
                        "low" arg,
                        "to" (
                            c(
                                "high" arg
                            )
                        )
                    )
                ).as(:oneline)
            )
        ),
        "then" (
            c(
                "static-nat" (
                    c(
                        c(
                          "inet" (
                              c(
                                  "routing-instance" arg
                              )
                          ),
                          "prefix" (
                              c(
                                  "addr-prefix" (
                                    ipprefix
                                  ),
                                  "mapped-port" (
                                    static_nat_rule_mapped_port_object
                                  ).as(:oneline),
                                  "routing-instance" arg
                              )
                          ),
                          "prefix-name" (
                              c(
                                  "addr-prefix-name" arg,
                                  "mapped-port" (
                                    static_nat_rule_mapped_port_object
                                  ).as(:oneline),
                                  "routing-instance" arg
                              )
                          )
                        ),
                        "rule-session-count-alarm" (
                          nat_rule_session_count_alarm_object
                        ).as(:oneline)
                    )
                )
            )
        )
    )
  )
end

rule(:static_nat_rule_mapped_port_object) do
    c(
        "low" arg,
        "to" (
            c(
                "high" arg
            )
        )
    ).as(:oneline)
end

rule(:stp_trace_options_esp) do
    c(
        "file" (
          esp_trace_file_type
        ),
        "flag" ("events" | "bpdu" | "timers" | "port-information-state-machine" | "port-receive-state-machine" | "port-role-select-state-machine" | "port-role-transit-state-machine" | "port-state-transit-state-machine" | "port-migration-state-machine" | "port-transmit-state-machine" | "topology-change-state-machine" | "bridge-detection-state-machine" | "state-machine-variables" | "ppmd" | "all-failures" | "all") (
            c(
                "disable"
            )
        ).as(:oneline)
    )
end

rule(:subscription_type) do
    c(
        "link-subscription" arg,
        "ct0" arg,
        "ct1" arg,
        "ct2" arg,
        "ct3" arg
    )
end

rule(:syslog_object) do
  ("any" | "authorization" | "daemon" | "ftp" | "ntp" | "security" | "kernel" | "user" | "dfc" | "external" | "firewall" | "pfe" | "conflict-log" | "change-log" | "interactive-commands").as(:arg) (
    c(
        c(
          "any",
          "emergency",
          "alert",
          "critical",
          "error",
          "warning",
          "notice",
          "info",
          "none"
        )
    )
  ).as(:oneline)
end

rule(:tacplus_server_object) do
  arg.as(:arg) (
    c(
        "port" arg,
        "secret" (
          unreadable
        ),
        "timeout" arg,
        "single-connection",
        "source-address" (
          ipv4addr
        )
    )
  )
end

rule(:te_class_object) do
    c(
        "traffic-class" arg,
        "priority" arg
    ).as(:oneline)
end

rule(:term_object) do
  arg.as(:arg) (
    c(
        "alg" arg,
        "protocol" arg,
        "source-port" arg,
        "destination-port" arg,
        "icmp-type" arg,
        "icmp-code" arg,
        "icmp6-type" arg,
        "icmp6-code" arg,
        "rpc-program-number" arg,
        "uuid" arg,
        "inactivity-timeout" arg
    )
  ).as(:oneline)
end

rule(:three_color_policer_type) do
  arg.as(:arg) (
    c(
        "filter-specific",
        "logical-interface-policer",
        "physical-interface-policer",
        "shared-bandwidth-policer",
        "action" (
            c(
                "loss-priority" (
                  three_color_policer_action
                ).as(:oneline)
            )
        ),
        c(
          "single-rate" (
              c(
                  c(
                    "color-blind",
                    "color-aware"
                  ),
                  "committed-information-rate" arg,
                  "committed-burst-size" arg,
                  "excess-burst-size" arg
              )
          ),
          "two-rate" (
              c(
                  c(
                    "color-blind",
                    "color-aware"
                  ),
                  "committed-information-rate" arg,
                  "committed-burst-size" arg,
                  "peak-information-rate" arg,
                  "peak-burst-size" arg
              )
          )
        )
    )
  )
end

rule(:three_color_policer_action) do
  ("high").as(:arg) (
    c(
        "then" (
            c(
                "discard"
            )
        )
    )
  ).as(:oneline)
end

rule(:trace_file_type) do
    c(
        "filename" arg,
        "size" arg,
        "files" arg,
        "world-readable",
        "no-world-readable"
    ).as(:oneline)
end

rule(:tty_port_object) do
    c(
        "log-out-on-disconnect",
        "port-type" arg,
        "disable",
        "insecure",
        "type" arg,
        "silent-with-modem"
    )
end

rule(:tunable_object) do
  arg.as(:arg) (
    c(
        "tunable-value" arg
    )
  )
end

rule(:tunnel_type) do
    c(
        c(
          "ipsec-vpn" arg,
          "ipsec-group-vpn" arg
        ),
        "pair-policy" arg
    )
end

rule(:url_list_type) do
  arg.as(:arg) (
    c(
        "value" arg
    )
  )
end

rule(:user_group_mapping_type) do
    c(
        "ldap" (
            c(
                "authentication-algorithm" arg,
                "ssl",
                "base" arg,
                "user" (
                    c(
                        "user-name" arg,
                        "password" arg
                    )
                ),
                "address" arg (
                    c(
                        "port" arg
                    )
                )
            )
        )
    )
end

rule(:utm_apppxy_traceoptions) do
    c(
        "flag" ("abort" | "application-objects" | "utm-realtime" | "anti-virus" | "basic" | "buffer" | "detail" | "ftp-data" | "ftp-control" | "http" | "imap" | "memory" | "parser" | "pfe" | "pop3" | "queue" | "smtp" | "tcp" | "timer" | "connection-rating" | "express-anti-virus" | "mime" | "regex-engine" | "sophos-anti-virus" | "all").as(:oneline)
    )
end

rule(:utm_ipc_traceoptions) do
    c(
        "flag" ("basic" | "detail" | "connection-manager" | "connection-status" | "pfe" | "utm-realtime" | "all").as(:oneline)
    )
end

rule(:utm_traceoptions) do
    c(
        "flag" ("cli" | "daemon" | "ipc" | "pfe" | "all").as(:oneline)
    )
end

rule(:v3_user_config) do
  arg.as(:arg) (
    c(
        c(
          "authentication-md5" (
            auth_object
          ),
          "authentication-sha" (
            auth_object
          ),
          "authentication-none"
        ),
        c(
          "privacy-des" (
            priv_object
          ),
          "privacy-3des" (
            priv_object
          ),
          "privacy-aes128" (
            priv_object
          ),
          "privacy-none"
        )
    )
  )
end

rule(:auth_object) do
    c(
        "authentication-password" arg,
        "authentication-key" (
          unreadable
        )
    )
end

rule(:priv_object) do
    c(
        "privacy-password" arg
    )
end

rule(:v6_relay_option_interface_id_type) do
    c(
        "prefix" (
            c(
                "host-name",
                "logical-system-name",
                "routing-instance-name"
            )
        ),
        "use-interface-description" arg
    )
end

rule(:v6_server_group_type) do
    c(
        "server-group" arg (
            c(
                "address" arg
            )
        )
    )
end

rule(:version9_template) do
  arg.as(:arg) (
    c(
        "flow-active-timeout" arg,
        "flow-inactive-timeout" arg,
        "template-refresh-rate" (
            c(
                "packets" arg,
                "seconds" arg
            )
        ),
        "option-refresh-rate" (
            c(
                "packets" arg,
                "seconds" arg
            )
        ),
        c(
          "mpls-ipv4-template" (
            "label-position" any
          ),
          "mpls-template" (
            "label-position" any
          ),
          "ipv6-template" (
              c(
                  "nexthop-options"
              )
          ),
          "peer-as-billing-template",
          "ipv4-template" (
              c(
                  "nexthop-options" (
                    "mpls" (
                      "label-position" any
                    )
                  )
              )
          )
        )
    )
  )
end

rule(:vlan_type) do
  arg.as(:arg) (
    c(
        "description" arg,
        c(
          "vlan-id" arg,
          "vlan-range" arg
        ),
        "global-layer2-domainid" arg,
        "global-layer2-domainid-range",
        "interface" arg (
            c(
                "pvlan-trunk",
                c(
                  "ingress",
                  "egress"
                ),
                "mapping" (
                    c(
                        "mapping-data" (
                          vlan_mapping_type
                        ),
                        "policy"
                    )
                )
            )
        ),
        "filter" (
            c(
                c(
                  "input" arg
                ),
                c(
                  "output" arg
                )
            )
        ),
        "l3-interface" (
          interface_name
        ),
        "l3-interface-ingress-counting",
        "mac-table-aging-time" (
          mac_aging_time_config
        ),
        "mac-limit" (
            c(
                "limit" arg,
                "action" arg
            )
        ).as(:oneline),
        "dot1q-tunneling" (
            c(
                "customer-vlans" arg,
                "layer2-protocol-tunneling" (
                    c(
                        "l2pt-protocol" (
                          l2pt_proto_entry
                        )
                    )
                )
            )
        ),
        "no-local-switching",
        "isolation-id" arg,
        "primary-vlan" arg,
        "no-mac-learning"
    )
  )
end

rule(:l2pt_proto_entry) do
  ("all" | "802.1x" | "802.3ah" | "cdp" | "udld" | "e-lmi" | "gvrp" | "lacp" | "lldp" | "mmrp" | "mvrp" | "stp" | "vstp" | "vtp").as(:arg) (
    c(
        "drop-threshold" arg,
        "shutdown-threshold" arg
    )
  )
end

rule(:vlan_mapping_type) do
  ("native" | "tag").as(:arg) (
    c(
        c(
          "push",
          "swap"
        )
    )
  )
end

rule(:vlan_map) do
    c(
        c(
          "push",
          "swap",
          "pop",
          "push-push",
          "swap-push",
          "swap-swap",
          "pop-swap",
          "pop-pop"
        ),
        "tag-protocol-id" arg,
        "inner-tag-protocol-id" arg,
        "vlan-id" arg,
        "inner-vlan-id" arg
    )
end

rule(:vpls_filter) do
  arg.as(:arg) (
    c(
        "accounting-profile" arg,
        "interface-specific",
        "physical-interface-filter",
        "term" arg (
            c(
                "filter" arg,
                "from" (
                    c(
                        c(
                          "interface-group" arg,
                          "interface-group-except" arg
                        ),
                        c(
                          "ether-type" (
                                ("ipv4" | "ipv6" | "arp" | "appletalk" | "sna" | "aarp" | "ppp" | "mpls-unicast" | "mpls-multicast" | "pppoe-discovery" | "pppoe-session" | "oam" | "fcoe" | "fip" | "vlan" | arg)
                          ),
                          "ether-type-except" (
                                ("ipv4" | "ipv6" | "arp" | "appletalk" | "sna" | "aarp" | "ppp" | "mpls-unicast" | "mpls-multicast" | "pppoe-discovery" | "pppoe-session" | "oam" | "fcoe" | "fip" | "vlan" | arg)
                          )
                        ),
                        c(
                          "vlan-ether-type" (
                                ("ipv4" | "ipv6" | "arp" | "appletalk" | "sna" | "aarp" | "ppp" | "mpls-unicast" | "mpls-multicast" | "pppoe-discovery" | "pppoe-session" | "oam" | "fcoe" | "fip" | "vlan" | arg)
                          ),
                          "vlan-ether-type-except" (
                                ("ipv4" | "ipv6" | "arp" | "appletalk" | "sna" | "aarp" | "ppp" | "mpls-unicast" | "mpls-multicast" | "pppoe-discovery" | "pppoe-session" | "oam" | "fcoe" | "fip" | "vlan" | arg)
                          )
                        ),
                        "destination-mac-address" (
                          firewall_mac_addr_object
                        ),
                        "source-mac-address" (
                          firewall_mac_addr_object
                        ),
                        c(
                          "forwarding-class" arg,
                          "forwarding-class-except" arg
                        ),
                        c(
                          "loss-priority" (
                                ("low" | "high" | "medium-low" | "medium-high")
                          ),
                          "loss-priority-except" (
                                ("low" | "high" | "medium-low" | "medium-high")
                          )
                        ),
                        c(
                          "learn-vlan-id" arg,
                          "learn-vlan-id-except" arg
                        ),
                        c(
                          "learn-vlan-1p-priority" arg,
                          "learn-vlan-1p-priority-except" arg
                        ),
                        c(
                          "user-vlan-id" arg,
                          "user-vlan-id-except" arg
                        ),
                        c(
                          "user-vlan-1p-priority" arg,
                          "user-vlan-1p-priority-except" arg
                        ),
                        c(
                          "learn-vlan-dei" arg,
                          "learn-vlan-dei-except" arg
                        ),
                        c(
                          "traffic-type" (
                                ("broadcast" | "multicast" | "unknown-unicast" | "known-unicast")
                          ),
                          "traffic-type-except" (
                                ("broadcast" | "multicast" | "unknown-unicast" | "known-unicast")
                          )
                        ),
                        "ip-source-address" (
                          firewall_addr_object
                        ),
                        "ip-destination-address" (
                          firewall_addr_object
                        ),
                        "ip-address" (
                          firewall_addr_object
                        ),
                        c(
                          "ip-protocol" (
                                ("icmp" | "igmp" | "ipip" | "tcp" | "egp" | "udp" | "rsvp" | "gre" | "esp" | "ah" | "icmp6" | "ospf" | "pim" | "sctp" | "ipv6" | "dstopts" | "routing" | "fragment" | "no-next-header" | "hop-by-hop" | "vrrp" | arg)
                          ),
                          "ip-protocol-except" (
                                ("icmp" | "igmp" | "ipip" | "tcp" | "egp" | "udp" | "rsvp" | "gre" | "esp" | "ah" | "icmp6" | "ospf" | "pim" | "sctp" | "ipv6" | "dstopts" | "routing" | "fragment" | "no-next-header" | "hop-by-hop" | "vrrp" | arg)
                          )
                        ),
                        c(
                          "dscp" (
                                ("af11" | "af12" | "af13" | "af21" | "af22" | "af23" | "af31" | "af32" | "af33" | "af41" | "af42" | "af43" | "ef" | "cs0" | "cs1" | "cs2" | "cs3" | "cs4" | "cs5" | "cs6" | "cs7" | "be" | "range")
                          ),
                          "dscp-except" (
                                ("af11" | "af12" | "af13" | "af21" | "af22" | "af23" | "af31" | "af32" | "af33" | "af41" | "af42" | "af43" | "ef" | "cs0" | "cs1" | "cs2" | "cs3" | "cs4" | "cs5" | "cs6" | "cs7" | "be" | "range")
                          )
                        ),
                        c(
                          "ip-precedence" (
                                ("net-control" | "internet-control" | "critical-ecp" | "flash-override" | "flash" | "immediate" | "priority" | "routine" | "range")
                          ),
                          "ip-precedence-except" (
                                ("net-control" | "internet-control" | "critical-ecp" | "flash-override" | "flash" | "immediate" | "priority" | "routine" | "range")
                          )
                        ),
                        c(
                          "source-port" (
                                ("ftp-data" | "ftp" | "ssh" | "telnet" | "smtp" | "tacacs" | "tacacs-ds" | "domain" | "dhcp" | "bootps" | "bootpc" | "tftp" | "finger" | "http" | "kerberos-sec" | "pop3" | "sunrpc" | "ident" | "nntp" | "ntp" | "netbios-ns" | "netbios-dgm" | "netbios-ssn" | "imap" | "snmp" | "snmptrap" | "xdmcp" | "bgp" | "ldap" | "mobileip-agent" | "mobilip-mn" | "msdp" | "https" | "snpp" | "biff" | "exec" | "login" | "who" | "cmd" | "syslog" | "printer" | "talk" | "ntalk" | "rip" | "timed" | "klogin" | "kshell" | "ldp" | "krb-prop" | "krbupdate" | "kpasswd" | "socks" | "afs" | "pptp" | "radius" | "radacct" | "zephyr-srv" | "zephyr-clt" | "zephyr-hm" | "nfsd" | "eklogin" | "ekshell" | "rkinit" | "cvspserver" | arg)
                          ),
                          "source-port-except" (
                                ("ftp-data" | "ftp" | "ssh" | "telnet" | "smtp" | "tacacs" | "tacacs-ds" | "domain" | "dhcp" | "bootps" | "bootpc" | "tftp" | "finger" | "http" | "kerberos-sec" | "pop3" | "sunrpc" | "ident" | "nntp" | "ntp" | "netbios-ns" | "netbios-dgm" | "netbios-ssn" | "imap" | "snmp" | "snmptrap" | "xdmcp" | "bgp" | "ldap" | "mobileip-agent" | "mobilip-mn" | "msdp" | "https" | "snpp" | "biff" | "exec" | "login" | "who" | "cmd" | "syslog" | "printer" | "talk" | "ntalk" | "rip" | "timed" | "klogin" | "kshell" | "ldp" | "krb-prop" | "krbupdate" | "kpasswd" | "socks" | "afs" | "pptp" | "radius" | "radacct" | "zephyr-srv" | "zephyr-clt" | "zephyr-hm" | "nfsd" | "eklogin" | "ekshell" | "rkinit" | "cvspserver" | arg)
                          )
                        ),
                        c(
                          "destination-port" (
                                ("ftp-data" | "ftp" | "ssh" | "telnet" | "smtp" | "tacacs" | "tacacs-ds" | "domain" | "dhcp" | "bootps" | "bootpc" | "tftp" | "finger" | "http" | "kerberos-sec" | "pop3" | "sunrpc" | "ident" | "nntp" | "ntp" | "netbios-ns" | "netbios-dgm" | "netbios-ssn" | "imap" | "snmp" | "snmptrap" | "xdmcp" | "bgp" | "ldap" | "mobileip-agent" | "mobilip-mn" | "msdp" | "https" | "snpp" | "biff" | "exec" | "login" | "who" | "cmd" | "syslog" | "printer" | "talk" | "ntalk" | "rip" | "timed" | "klogin" | "kshell" | "ldp" | "krb-prop" | "krbupdate" | "kpasswd" | "socks" | "afs" | "pptp" | "radius" | "radacct" | "zephyr-srv" | "zephyr-clt" | "zephyr-hm" | "nfsd" | "eklogin" | "ekshell" | "rkinit" | "cvspserver" | arg)
                          ),
                          "destination-port-except" (
                                ("ftp-data" | "ftp" | "ssh" | "telnet" | "smtp" | "tacacs" | "tacacs-ds" | "domain" | "dhcp" | "bootps" | "bootpc" | "tftp" | "finger" | "http" | "kerberos-sec" | "pop3" | "sunrpc" | "ident" | "nntp" | "ntp" | "netbios-ns" | "netbios-dgm" | "netbios-ssn" | "imap" | "snmp" | "snmptrap" | "xdmcp" | "bgp" | "ldap" | "mobileip-agent" | "mobilip-mn" | "msdp" | "https" | "snpp" | "biff" | "exec" | "login" | "who" | "cmd" | "syslog" | "printer" | "talk" | "ntalk" | "rip" | "timed" | "klogin" | "kshell" | "ldp" | "krb-prop" | "krbupdate" | "kpasswd" | "socks" | "afs" | "pptp" | "radius" | "radacct" | "zephyr-srv" | "zephyr-clt" | "zephyr-hm" | "nfsd" | "eklogin" | "ekshell" | "rkinit" | "cvspserver" | arg)
                          )
                        ),
                        c(
                          "port" (
                                ("ftp-data" | "ftp" | "ssh" | "telnet" | "smtp" | "tacacs" | "tacacs-ds" | "domain" | "dhcp" | "bootps" | "bootpc" | "tftp" | "finger" | "http" | "kerberos-sec" | "pop3" | "sunrpc" | "ident" | "nntp" | "ntp" | "netbios-ns" | "netbios-dgm" | "netbios-ssn" | "imap" | "snmp" | "snmptrap" | "xdmcp" | "bgp" | "ldap" | "mobileip-agent" | "mobilip-mn" | "msdp" | "https" | "snpp" | "biff" | "exec" | "login" | "who" | "cmd" | "syslog" | "printer" | "talk" | "ntalk" | "rip" | "timed" | "klogin" | "kshell" | "ldp" | "krb-prop" | "krbupdate" | "kpasswd" | "socks" | "afs" | "pptp" | "radius" | "radacct" | "zephyr-srv" | "zephyr-clt" | "zephyr-hm" | "nfsd" | "eklogin" | "ekshell" | "rkinit" | "cvspserver" | arg)
                          ),
                          "port-except" (
                                ("ftp-data" | "ftp" | "ssh" | "telnet" | "smtp" | "tacacs" | "tacacs-ds" | "domain" | "dhcp" | "bootps" | "bootpc" | "tftp" | "finger" | "http" | "kerberos-sec" | "pop3" | "sunrpc" | "ident" | "nntp" | "ntp" | "netbios-ns" | "netbios-dgm" | "netbios-ssn" | "imap" | "snmp" | "snmptrap" | "xdmcp" | "bgp" | "ldap" | "mobileip-agent" | "mobilip-mn" | "msdp" | "https" | "snpp" | "biff" | "exec" | "login" | "who" | "cmd" | "syslog" | "printer" | "talk" | "ntalk" | "rip" | "timed" | "klogin" | "kshell" | "ldp" | "krb-prop" | "krbupdate" | "kpasswd" | "socks" | "afs" | "pptp" | "radius" | "radacct" | "zephyr-srv" | "zephyr-clt" | "zephyr-hm" | "nfsd" | "eklogin" | "ekshell" | "rkinit" | "cvspserver" | arg)
                          )
                        ),
                        "tcp-flags" arg,
                        c(
                          "icmp-type" (
                                ("echo-request" | "echo-reply" | "unreachable" | "source-quench" | "redirect" | "router-advertisement" | "router-solicit" | "time-exceeded" | "parameter-problem" | "timestamp" | "timestamp-reply" | "info-request" | "info-reply" | "mask-request" | "mask-reply" | arg)
                          ),
                          "icmp-type-except" (
                                ("echo-request" | "echo-reply" | "unreachable" | "source-quench" | "redirect" | "router-advertisement" | "router-solicit" | "time-exceeded" | "parameter-problem" | "timestamp" | "timestamp-reply" | "info-request" | "info-reply" | "mask-request" | "mask-reply" | arg)
                          )
                        ),
                        c(
                          "icmp-code" (
                                ("network-unreachable" | "host-unreachable" | "protocol-unreachable" | "port-unreachable" | "fragmentation-needed" | "source-route-failed" | "destination-network-unknown" | "destination-host-unknown" | "source-host-isolated" | "destination-network-prohibited" | "destination-host-prohibited" | "network-unreachable-for-tos" | "host-unreachable-for-tos" | "communication-prohibited-by-filtering" | "host-precedence-violation" | "precedence-cutoff-in-effect" | "redirect-for-network" | "redirect-for-host" | "redirect-for-tos-and-net" | "redirect-for-tos-and-host" | "ttl-eq-zero-during-transit" | "ttl-eq-zero-during-reassembly" | "ip-header-bad" | "required-option-missing" | arg)
                          ),
                          "icmp-code-except" (
                                ("network-unreachable" | "host-unreachable" | "protocol-unreachable" | "port-unreachable" | "fragmentation-needed" | "source-route-failed" | "destination-network-unknown" | "destination-host-unknown" | "source-host-isolated" | "destination-network-prohibited" | "destination-host-prohibited" | "network-unreachable-for-tos" | "host-unreachable-for-tos" | "communication-prohibited-by-filtering" | "host-precedence-violation" | "precedence-cutoff-in-effect" | "redirect-for-network" | "redirect-for-host" | "redirect-for-tos-and-net" | "redirect-for-tos-and-host" | "ttl-eq-zero-during-transit" | "ttl-eq-zero-during-reassembly" | "ip-header-bad" | "required-option-missing" | arg)
                          )
                        ),
                        "interface" (
                          match_interface_object
                        ),
                        "interface-set" (
                          match_interface_set_object
                        ),
                        "source-prefix-list" (
                          firewall_prefix_list
                        ),
                        "destination-prefix-list" (
                          firewall_prefix_list
                        ),
                        "prefix-list" (
                          firewall_prefix_list
                        )
                    )
                ),
                "then" (
                    c(
                        c(
                          "policer" arg,
                          "three-color-policer" (
                              c(
                                  c(
                                    "single-rate" arg,
                                    "two-rate" arg
                                  )
                              )
                          ),
                          "hierarchical-policer" arg
                        ),
                        "count" arg,
                        "loss-priority" arg,
                        "forwarding-class" arg,
                        c(
                          "accept",
                          "discard",
                          "next" arg
                        ),
                        "port-mirror-instance" arg,
                        "port-mirror",
                        "next-hop-group" arg
                    )
                )
            )
        )
    )
  )
end

rule(:vrrp_group) do
  arg.as(:arg) (
    c(
        c(
          "virtual-address" (
            ipv4addr
          ),
          "virtual-inet6-address" (
            ipv6addr
          )
        ),
        "virtual-link-local-address" (
          ipv6addr
        ),
        "priority" arg,
        c(
          "advertise-interval" arg,
          "fast-interval" arg,
          "inet6-advertise-interval" arg
        ),
        c(
          "preempt" (
              c(
                  "hold-time" arg
              )
          ),
          "no-preempt"
        ),
        c(
          "accept-data",
          "no-accept-data"
        ),
        "authentication-type" arg,
        "authentication-key" (
          unreadable
        ),
        "track" (
            c(
                "priority-hold-time" arg,
                "interface" arg (
                    c(
                        "bandwidth-threshold" arg (
                            c(
                                "priority-cost" arg
                            )
                        ).as(:oneline),
                        "priority-cost" arg
                    )
                ),
                "route" (
                    s(
                      "route_address" arg,
                      "routing-instance" arg,
                      c(
                        "priority-cost" arg
                      )
                    )
                ).as(:oneline)
            )
        ),
        "vrrp-inherit-from" (
            c(
                "active-interface" (
                  interface_unit
                ),
                "active-group" arg
            )
        ),
        "advertisements-threshold" arg
    )
  )
end

rule(:webfilter_feature) do
    c(
        "url-whitelist" arg,
        "url-blacklist" arg,
        "type" arg,
        "traceoptions" (
          web_filtering_traceoptions
        ),
        "surf-control-integrated" (
          surf_control_integrated_type
        ),
        "websense-redirect" (
          websense_type
        ),
        "juniper-local" (
          juniper_local_type
        ),
        "juniper-enhanced" (
          juniper_enhanced_type
        )
    )
end

rule(:juniper_enhanced_type) do
    c(
        "cache" (
            c(
                "timeout" arg,
                "size" arg
            )
        ),
        "server" (
          juniper_enhanced_server
        ),
        "profile" arg (
            c(
                "category" (
                  juniper_enhanced_category_type
                ),
                "site-reputation-action" (
                  juniper_enhanced_site_reputation_setting
                ),
                "default" arg,
                "custom-block-message" arg,
                "quarantine-custom-message" arg,
                "fallback-settings" (
                  web_filtering_fallback_setting
                ),
                "timeout" arg,
                "no-safe-search",
                "block-message" (
                  web_filtering_block_message
                ),
                "quarantine-message" (
                  web_filtering_quarantine_message
                )
            )
        )
    )
end

rule(:juniper_enhanced_category_type) do
  arg.as(:arg) (
    c(
        "action" arg,
        "reputation-action" (
          juniper_enhanced_site_reputation_setting
        )
    )
  )
end

rule(:juniper_enhanced_server) do
    c(
        "host" arg,
        "port" arg
    )
end

rule(:juniper_enhanced_site_reputation_setting) do
    c(
        "very-safe" arg,
        "moderately-safe" arg,
        "fairly-safe" arg,
        "suspicious" arg,
        "harmful" arg
    )
end

rule(:juniper_local_type) do
    c(
        "profile" arg (
            c(
                "default" arg,
                "custom-block-message" arg,
                "fallback-settings" (
                  web_filtering_fallback_setting
                ),
                "timeout" arg
            )
        )
    )
end

rule(:surf_control_integrated_type) do
    c(
        "cache" (
            c(
                "timeout" arg,
                "size" arg
            )
        ),
        "server" (
          server
        ),
        "profile" arg (
            c(
                "category" (
                  surf_control_integrated_category_type
                ),
                "default" arg,
                "custom-block-message" arg,
                "fallback-settings" (
                  web_filtering_fallback_setting
                ),
                "timeout" arg
            )
        )
    )
end

rule(:server) do
    c(
        "host" arg,
        "port" arg
    )
end

rule(:surf_control_integrated_category_type) do
  arg.as(:arg) (
    c(
        "action" arg
    )
  )
end

rule(:web_filtering_block_message) do
    c(
        "type" arg,
        "url" arg
    )
end

rule(:web_filtering_fallback_setting) do
    c(
        "default" arg,
        "server-connectivity" arg,
        "timeout" arg,
        "too-many-requests" arg
    )
end

rule(:web_filtering_quarantine_message) do
    c(
        "type" arg,
        "url" arg
    )
end

rule(:web_filtering_traceoptions) do
    c(
        "flag" ("basic" | "session-manager" | "heartbeat" | "packet" | "profile" | "requests" | "response" | "socket" | "timer" | "ipc" | "cache" | "enhanced" | "all").as(:oneline)
    )
end

rule(:websense_type) do
    c(
        "profile" arg (
            c(
                "server" (
                  server
                ),
                "custom-block-message" arg,
                "fallback-settings" (
                  web_filtering_fallback_setting
                ),
                "timeout" arg,
                "sockets" arg,
                "account" arg
            )
        )
    )
end

rule(:wildcard_address_type) do
  arg.as(:arg)
end

rule(:zone_interface_list_type) do
  arg.as(:arg) (
    c(
        "host-inbound-traffic" (
          interface_host_inbound_traffic_t
        )
    )
  )
end

rule(:interface_host_inbound_traffic_t) do
    c(
        "system-services" (
          interface_system_services_object_type
        ),
        "protocols" (
          host_inbound_protocols_object_type
        )
    )
end

rule(:host_inbound_protocols_object_type) do
  ("all" | "bfd" | "bgp" | "dvmrp" | "igmp" | "ldp" | "msdp" | "nhrp" | "ospf" | "ospf3" | "pgm" | "pim" | "rip" | "ripng" | "router-discovery" | "rsvp" | "sap" | "vrrp").as(:arg) (
    c(
        "except"
    )
  )
end

rule(:interface_system_services_object_type) do
  ("all" | "bootp" | "dhcp" | "dhcpv6" | "dns" | "finger" | "ftp" | "ident-reset" | "http" | "https" | "ike" | "netconf" | "ping" | "rlogin" | "reverse-telnet" | "reverse-ssh" | "rpm" | "rsh" | "snmp" | "snmp-trap" | "ssh" | "telnet" | "traceroute" | "xnm-ssl" | "xnm-clear-text" | "tftp" | "lsping" | "ntp" | "sip" | "r2cp" | "any-service").as(:arg) (
    c(
        "except"
    )
  )
end

rule(:zone_host_inbound_traffic_t) do
    c(
        "system-services" (
          zone_system_services_object_type
        ),
        "protocols" (
          host_inbound_protocols_object_type
        )
    )
end

rule(:zone_system_services_object_type) do
  ("all" | "dns" | "finger" | "ftp" | "ident-reset" | "http" | "https" | "ike" | "netconf" | "ping" | "rlogin" | "reverse-telnet" | "reverse-ssh" | "rpm" | "rsh" | "snmp" | "snmp-trap" | "ssh" | "telnet" | "traceroute" | "xnm-ssl" | "xnm-clear-text" | "tftp" | "lsping" | "ntp" | "sip" | "r2cp" | "any-service").as(:arg) (
    c(
        "except"
    )
  )
end

rule(:service_set_object) do
  arg.as(:arg) (
    c(
      "allow-multicast",
      "extension-service" arg (
        any
      ),
      "ids-rules" arg,
      "ids-rule-sets" arg,
      "interface-service" (
        "service-interface" arg
      ),
      "ipsec-vpn-options" (
        c(
          "anti-replay-window-size" arg,
          "clear-dont-fragment-bit" arg,
          "ike-access-profile" arg,
          "local-gateway" arg,
          "no-anti-replay",
          "passive-mode-tunneling",
          "trusted-ca" any,
          "tunnel-mtu" arg
        )
      ),
      "ip-reassembly-rules" arg,
      "ipsec-vpn-rules" arg,
      "ipsec-vpn-rule-sets" arg,
      "max-flows" arg,
      "max-drop-flows" (
        c(
          "ingress" arg,
          "egress" arg
        )
      ),
      "nat-options" (
        c(
          "land-attack-check" ("ip-only" | "ip-port"),
          "max-sessions-per-subscriber" arg,
          "stateful-nat64" (
            "clear-dont-fragment-bit"
          )
        )
      ),
      "nat-rules" arg,
      "nat-rule-sets" arg,
      "next-hop-service" (
        c(
          "inside-service-interface" dotted,
          "outside-service-interface" dotted,
          "outside-service-interface-type local",
          "service-interface-pool" arg
        )
      ),
      "pgcp-rules" arg,
      "pgcp-rule-sets" arg,
      "ptsp-rules" arg,
      "ptsp-rule-sets" arg,
      "service-set-options" (
        c(
          "bypass-traffic-on-exceeding-flow-limits",
          "bypass-traffic-on-pic-failure",
          "enable-asymmetric-traffic-processing",
          "support-uni-directional-traffic"
        )
      ),
      "snmp-trap-thresholds" (
        c(
          "flows" (
            c(
              "high" arg,
              "low" arg
            )
          ),
          "nat-address-port" (
            c(
              "high" arg,
              "low" arg
            )
          )
        )
      ),
      "softwire-options" (
        "dslite-ipv6-prefix-length" arg
      ),
      "softwire-rules" arg,
      "softwire-rule-sets" arg,
      "stateful-firewall-rules" arg,
      "stateful-firewall-rule-sets" arg,
      "syslog" (
        "host" arg (
          "class" (
            c(
              "alg-logs",
              "ids-logs",
              "nat-logs",
              "packet-logs",
              "pcp-logs",
              "session-logs" (
                c(
                  ("open" | "close"),
                  "stateful-firewall-logs"
                )
              ),
              "services" arg,
              "facility-override" arg,
              "interface-service" arg
            )
          )
        )
      ),
      "jflow-rules" (
        c(
          "sampling"
        )
      ),
      "sampling-service" (
        c(
          "service-interface" arg
        )
      )
    )
  )
end

rule(:service_nat_object) do
  c(
    "pool" arg (
      c(
        "address" prefix,
        b(s("address-range", "low", arg, "high", arg) | "port",
          c(
            "automatic" ("sequential" | "random-allocation"),
            s("range", "low", arg, "high", arg) | "preserve-parity",
            "preserve-range" any
          )
        )
      )
    ),

    "rule" arg (
      c(
        "match-direction" ("input" | "output"),
        "term" arg (
          c(
            "from" (
              c(
                "application-sets" arg,
                "applications" any,
                "destination-address" (
                  (prefix | "any-unicast") (
                    "except"
                  )
                ),
                b(s("destination-address-range", "low", arg, "high", arg),
                  "except"
                ),
                "source-address" (
                  (prefix | "any-unicast") (
                    "except"
                  )
                ),
                b(s("source-address-range", "low", arg, "high", arg),
                  "except"
                )
              )
            ),
            "then" (
              c(
                "no-translation",
                "translated" (
                  c(
                    "address-pooling paired",
                    "destination-pool" arg,
                    "destination-prefix" arg,
                    "dns-alg-pool" arg,
                    "dns-alg-prefix" arg,
                    "filtering-type" arg,
                    "mapping-type" arg,
                    "overload-pool" arg,
                    "overload-prefix" arg,
                    "source-pool" arg,
                    "source-prefix" arg,
                    "translation-type" (
                      ("basic-nat-pt" | "basic-nat44" | "basic-nat66" | "dnat-44" | "dynamic-nat44" | "napt-44" | "napt-66" | "napt-pt" | "stateful-nat64" | "twice-basic-nat-44" | "twice-dynamic-nat-44" | "twice-napt-44")
                    )
                  )
                )
              )
            ),
            "syslog"
          )
        )
      )
    )
  )
end

rule(:storm_control) do
  c(
    "default",
    "action-shutdown",
    "interface" ("all" | "name") (
      c(
        "bandwidth" arg,
        "no-broadcast",
        "no-unknown-unicast",
        "level" arg,
        c(
          "multicast",
          "no-multicast",
          "no-registered-multicast",
          "no-unregistered-multicast"
        )
      )
    )
  )
end

rule(:app_engine_management_service) do
  c(
    "disable",
    "traceoptions" (
      c(
        "no-remote-trace",
        "file" (
          c(
            "filename" arg,
            "size" arg,
            "files" arg,
            "world-readable",
            "no-world-readable",
            "match" (
              regular_expression
            )
          )
        ).as(:oneline),
        "level" arg,
        "flag" ("active-directory-authentication" | "configuration" | "db" | "ip-user-mapping" | "ip-user-probe" | "ipc" | "user-group-mapping" | "wmic" | "all").as(:oneline)
      )
    )
  )
end

rule(:juniper_protocols_sflow) do
  c(
    "agent-id" ipaddr,
    "collector" ipaddr (
      "udp-port" arg
    ),
    "interfaces" arg (
      c(
        "polling-interval" arg,
        "sample-rate" (
          c(
            "egress" arg,
            "ingress" arg,
          )
        )
      )
    ),
    "polling-interval" arg,
    "sample-rate" (
      c(
        "egress" arg,
        "ingress" arg
      )
    ),
    "source-ip" ipaddr,
    "disable-sw-rate-limiter",
    "traceoptions" (
      c(
        "file" (
          c(
            "filename" arg,
            "files" arg,
            "no-stamp",
            "replace",
            "size" arg,
            "world-readable",
            "no-world-readable",
            arg
          )
        ),
        "flag" ("all" | "client-server" | "configuration" | "interface" | "rtsock").as(:oneline)
      )
    )
  )
end

rule(:smpl_analyzer_type) do
  arg.as(:arg) (
    c(
        "input" (
          smpl_analyzer_input_type
        ),
        "output" (
          smpl_analyzer_output_type
        )
    )
  )
end

rule(:smpl_analyzer_input_type) do
    c(
        "rate" arg,
        "maximum-packet-length" arg,
        "ingress" (
          smpl_analyzer_ingress_type
        ),
        "egress" (
          smpl_analyzer_egress_type
        )
    )
end

rule(:smpl_analyzer_egress_type) do
    c(
        "interface" (
          analyzer_egress_interface_type
        ),
        "routing-instance" (
          analyzer_egress_routing_instance_type
        ),
        "vlan" (
          analyzer_egress_vlan_type
        ),
        "bridge-domain" (
          analyzer_egress_bridge_domain_type
        )
    )
end

rule(:analyzer_egress_bridge_domain_type) do
  arg.as(:arg)
end

rule(:analyzer_egress_interface_type) do
  ("name" | "all").as(:arg)
end

rule(:analyzer_egress_routing_instance_type) do
  arg.as(:arg) (
    c(
        "vlan" (
          analyzer_egress_vlan_type
        ),
        "bridge-domain" (
          analyzer_egress_bridge_domain_type
        )
    )
  )
end

rule(:analyzer_egress_vlan_type) do
  arg.as(:arg)
end

rule(:smpl_analyzer_ingress_type) do
    c(
        "interface" (
          analyzer_ingress_interface_type
        ),
        "routing-instance" (
          analyzer_ingress_routing_instance_type
        ),
        "vlan" (
          analyzer_ingress_vlan_type
        ),
        "bridge-domain" (
          analyzer_ingress_bridge_domain_type
        )
    )
end

rule(:analyzer_ingress_bridge_domain_type) do
  arg.as(:arg)
end

rule(:analyzer_ingress_interface_type) do
  ("name" | "all").as(:arg)
end

rule(:analyzer_ingress_routing_instance_type) do
  arg.as(:arg) (
    c(
        "vlan" (
          analyzer_ingress_vlan_type
        ),
        "bridge-domain" (
          analyzer_ingress_bridge_domain_type
        )
    )
  )
end

rule(:analyzer_ingress_vlan_type) do
  arg.as(:arg)
end

rule(:smpl_analyzer_output_type) do
    c(
        c(
          "interface" (
            interface_name
          ),
          "ip-address" (
            ipv4addr
          ),
          "next-hop-group" arg,
          "routing-instance" (
            output_routing_instance_type
          ),
          "vlan" (
            pm_rspan_vlan
          ),
          "bridge-domain" (
            pm_rspan_bridge_domain
          )
        )
    )
end

rule(:output_routing_instance_type) do
  arg.as(:arg) (
    c(
        "ip-address" (
          ipv4addr
        ),
        "vlan" (
          pm_rspan_vlan
        ),
        "bridge-domain" (
          pm_rspan_bridge_domain
        )
    )
  )
end

rule(:pm_rspan_bridge_domain) do
  arg.as(:arg)
end

rule(:pm_rspan_vlan) do
  arg.as(:arg) (
    c(
        "no-tag"
    )
  )
end

rule(:juniper_protocols_mpls) do
  c(
    c(
      "disable"
    ),
    "path-mtu" (
      c(
        "allow-fragmentation",
        "rsvp" (
          c(
            "mtu-signaling"
          )
        )
      )
    ),
    "diffserv-te" (
      c(
        "bandwidth-model" arg,
        "te-class-matrix" (
          c(
            "te0" (
              te_class_object
            ).as(:oneline),
            "te1" (
              te_class_object
            ).as(:oneline),
            "te2" (
              te_class_object
            ).as(:oneline),
            "te3" (
              te_class_object
            ).as(:oneline),
            "te4" (
              te_class_object
            ).as(:oneline),
            "te5" (
              te_class_object
            ).as(:oneline),
            "te6" (
              te_class_object
            ).as(:oneline),
            "te7" (
              te_class_object
            ).as(:oneline)
          )
        )
      )
    ),
    "auto-policing" (
      c(
        "class" ("all" | "ct0" | "ct1" | "ct2" | "ct3") (
          c(
            c(
              "drop",
              "loss-priority-high",
              "loss-priority-low"
            )
          )
        )
      )
    ),
    "statistics" (
      c(
        "file" (
          trace_file_type
        ),
        "interval" arg,
        "auto-bandwidth",
        "no-transit-statistics"
      )
    ),
    "log-updown" (
      c(
        "syslog",
        "no-syslog",
        c(
          "trap",
          "no-trap" (
            c(
              "mpls-lsp-traps",
              "rfc3812-traps"
            )
          )
        ),
        "trap-path-down",
        "trap-path-up"
      )
    ),
    "traffic-engineering" arg,
    "traceoptions" (
      c(
        "file" (
          trace_file_type
        ),
        "flag" ("connection" | "connection-detail" | "cspf" | "cspf-node" | "cspf-link" | "state" | "error" | "lsping" | "graceful-restart" | "nsr-synchronization" | "nsr-synchronization-detail" | "static" | "egress-protection" | "all").as(:oneline)
      )
    ),
    "admin-groups" arg (
      c(
        "group-value" arg
      )
    ),
    "advertisement-hold-time" arg,
    "rsvp-error-hold-time" arg,
    "optimize-aggressive",
    "smart-optimize-timer" arg,
    "optimize-switchover-delay" arg,
    "no-propagate-ttl",
    "explicit-null",
    "ipv6-tunneling",
    "icmp-tunneling",
    "revert-timer" arg,
    "optimize-hold-dead-delay" arg,
    "expand-loose-hop",
    "mib-mpls-show-p2mp",
    "bandwidth" (
      bandwidth_type
    ),
    "class-of-service" arg,
    "no-decrement-ttl",
    "hop-limit" arg,
    "no-cspf",
    "admin-down",
    "optimize-timer" arg,
    "preference" arg,
    "priority" (
      c(
        "setup-priority" arg,
        "reservation-priority" arg
      )
    ),
    "record",
    "no-record",
    "standby",
    "exclude-srlg",
    "admin-group" (
      admin_group_include_exclude
    ),
    "admin-group-extended" (
      admin_group_include_exclude
    ),
    "oam" (
      periodic_oam
    ),
    "label-switched-path" arg (
      c(
        c(
          "disable"
        ),
        "traceoptions" (
          c(
            "file" (
              trace_file_type
            ),
            "flag" ("cspf" | "cspf-node" | "cspf-link" | "state" | "all").as(:oneline)
          )
        ),
        "no-install-to-address",
        "backup",
        "from" (
          ipv4addr
        ),
        c(
          "to" (
            ipv4addr
          ),
          "template"
        ),
        "metric" arg,
        "ldp-tunneling",
        "soft-preemption",
        "install" arg (
          c(
            "active"
          )
        ).as(:oneline),
        "retry-timer" arg,
        "retry-limit" arg,
        "lsp-attributes" (
          c(
            "signal-bandwidth" arg,
            "switching-type" arg,
            "encoding-type" arg,
            "gpid" arg
          )
        ),
        "revert-timer" arg,
        "optimize-hold-dead-delay" arg,
        "bandwidth" (
          bandwidth_type
        ),
        "class-of-service" arg,
        "no-decrement-ttl",
        "hop-limit" arg,
        "no-cspf",
        "admin-down",
        "optimize-timer" arg,
        "preference" arg,
        "priority" (
          c(
            "setup-priority" arg,
            "reservation-priority" arg
          )
        ),
        "record",
        "no-record",
        "standby",
        "exclude-srlg",
        "admin-group" (
          admin_group_include_exclude
        ),
        "admin-group-extended" (
          admin_group_include_exclude
        ),
        "oam" (
          periodic_oam
        ),
        c(
          "random",
          "least-fill",
          "most-fill"
        ),
        "description" arg,
        c(
          "link-protection",
          "node-link-protection"
        ),
        "inter-domain",
        "adaptive",
        "fast-reroute" (
          c(
            "hop-limit" arg,
            c(
              "bandwidth" arg,
              "bandwidth-percent" arg
            ),
            c(
              "no-include-any",
              "include-any" arg
            ),
            c(
              "no-include-all",
              "include-all" arg
            ),
            c(
              "no-exclude",
              "exclude" arg
            )
          )
        ),
        "p2mp" (
          c(
            "path_name" arg
          )
        ).as(:oneline),
        "auto-bandwidth" (
          c(
            "adjust-interval" arg,
            "adjust-threshold" arg,
            "minimum-bandwidth" arg,
            "maximum-bandwidth" arg,
            "monitor-bandwidth",
            "adjust-threshold-overflow-limit" arg,
            "adjust-threshold-underflow-limit" arg
          )
        ),
        "associate-lsp" arg (
          c(
            "from" (
              ipv4addr
            )
          )
        ),
        "primary" arg (
          c(
            "bandwidth" (
              bandwidth_type
            ),
            "class-of-service" arg,
            "no-decrement-ttl",
            "hop-limit" arg,
            "no-cspf",
            "admin-down",
            "optimize-timer" arg,
            "preference" arg,
            "priority" (
              c(
                "setup-priority" arg,
                "reservation-priority" arg
              )
            ),
            "record",
            "no-record",
            "standby",
            "exclude-srlg",
            "admin-group" (
              admin_group_include_exclude
            ),
            "admin-group-extended" (
              admin_group_include_exclude
            ),
            "oam" (
              periodic_oam
            ),
            "adaptive",
            "select" arg
          )
        ),
        "secondary" arg (
          c(
            "bandwidth" (
              bandwidth_type
            ),
            "class-of-service" arg,
            "no-decrement-ttl",
            "hop-limit" arg,
            "no-cspf",
            "admin-down",
            "optimize-timer" arg,
            "preference" arg,
            "priority" (
              c(
                "setup-priority" arg,
                "reservation-priority" arg
              )
            ),
            "record",
            "no-record",
            "standby",
            "exclude-srlg",
            "admin-group" (
              admin_group_include_exclude
            ),
            "admin-group-extended" (
              admin_group_include_exclude
            ),
            "oam" (
              periodic_oam
            ),
            "adaptive",
            "select" arg
          )
        ),
        "policing" (
          c(
            "filter" arg,
            "no-auto-policing"
          )
        ).as(:oneline),
        "associate-backup-pe-groups",
        "egress-protection"
      )
    ),
    "transit-lsp-association" arg (
      c(
        "lsp-name-1" arg,
        "from-1" (
          ipv4addr
        ),
        "lsp-name-2" arg,
        "from-2" (
          ipv4addr
        )
      )
    ),
    "path" arg (
      c(
        "path-list" arg (
          c(
            c(
              "loose",
              "strict"
            )
          )
        ).as(:oneline)
      )
    ),
    "static-label-switched-path" arg (
      c(
        c(
          "bypass" (
            c(
              "bandwidth" arg,
              "description" arg,
              "next-hop" (
                ipv4addr_or_interface
              ),
              "push" arg,
              "to" (
                ipv4addr
              )
            )
          ),
          "transit" arg (
            c(
              "bandwidth" arg,
              "description" arg,
              "link-protection" (
                c(
                  "bypass-name" arg
                )
              ).as(:oneline),
              "next-hop" (
                ipv4addr_or_interface
              ),
              "node-protection" (
                c(
                  "bypass-name" arg,
                  "next-next-label" arg
                )
              ).as(:oneline),
              c(
                "swap" arg,
                "pop"
              )
            )
          ),
          "ingress" (
            c(
              "bandwidth" arg,
              "class-of-service" arg,
              "description" arg,
              "install" arg (
                c(
                  "active"
                )
              ).as(:oneline),
              "metric" arg,
              "next-hop" (
                ipv4addr_or_interface
              ),
              "link-protection" (
                c(
                  "bypass-name" arg
                )
              ).as(:oneline),
              "node-protection" (
                c(
                  "bypass-name" arg,
                  "next-next-label" arg
                )
              ).as(:oneline),
              "no-install-to-address",
              "policing" (
                c(
                  "filter" arg,
                  "no-auto-policing"
                )
              ).as(:oneline),
              "preference" arg,
              "to" (
                ipv4addr
              ),
              "push" arg
            )
          )
        )
      )
    ),
    "interface" arg (
      c(
        c(
          "disable"
        ),
        "srlg" arg,
        "always-mark-connection-protection-tlv",
        "switch-away-lsps",
        "admin-group" arg,
        "admin-group-extended" arg,
        "static" (
          c(
            "protection-revert-time" arg
          )
        )
      )
    ),
    "egress-protection" (
      c(
        "context-identifier" arg (
          c(
            c(
              "primary",
              "protector"
            ),
            "metric" arg
          )
        )
      )
    )
  )
end
