---
Function {
 argument: Destructured {
  identifier: None,
  arguments: [
   DestructuredArgument {
    identifier: "config",
    default: None,
   },
   DestructuredArgument {
    identifier: "lib",
    default: None,
   },
   DestructuredArgument {
    identifier: "pkgs",
    default: None,
   },
   DestructuredArgument {
    identifier: "options",
    default: None,
   },
  ],
  ellipsis: false,
 },
 definition: With {
  expression: Variable {
   identifier: "lib",
   position: (3, 6),
  },
  target: LetIn {
   bindings: [
    Binding {
     from: AttributePath {
      parts: [
       Raw {
        content: "cfg",
        position: (6, 3),
       },
      ],
     },
     to: PropertyAccess {
      expression: Variable {
       identifier: "config",
       position: (6, 9),
      },
      attribute_path: AttributePath {
       parts: [
        Raw {
         content: "services",
         position: (6, 16),
        },
        Raw {
         content: "prometheus",
         position: (6, 25),
        },
        Raw {
         content: "exporters",
         position: (6, 36),
        },
        Raw {
         content: "unifi-poller",
         position: (6, 46),
        },
       ],
      },
      default: None,
     },
    },
    Binding {
     from: AttributePath {
      parts: [
       Raw {
        content: "configFile",
        position: (8, 3),
       },
      ],
     },
     to: FunctionApplication {
      function: PropertyAccess {
       expression: Variable {
        identifier: "pkgs",
        position: (8, 16),
       },
       attribute_path: AttributePath {
        parts: [
         Raw {
          content: "writeText",
          position: (8, 21),
         },
        ],
       },
       default: None,
      },
      arguments: [
       String {
        parts: [
         Raw {
          content: "prometheus-unifi-poller-exporter.json",
          position: (8, 32),
         },
        ],
        position: (8, 31),
       },
       Parentheses {
        expression: FunctionApplication {
         function: PropertyAccess {
          expression: Variable {
           identifier: "generators",
           position: (8, 72),
          },
          attribute_path: AttributePath {
           parts: [
            Raw {
             content: "toJSON",
             position: (8, 83),
            },
           ],
          },
          default: None,
         },
         arguments: [
          Map {
           bindings: [],
           recursive: false,
           position: (8, 90),
          },
          Map {
           bindings: [
            Binding {
             from: AttributePath {
              parts: [
               Raw {
                content: "poller",
                position: (9, 5),
               },
              ],
             },
             to: Map {
              bindings: [
               Inherit {
                from: Some(
                 PropertyAccess {
                  expression: Variable {
                   identifier: "cfg",
                   position: (9, 25),
                  },
                  attribute_path: AttributePath {
                   parts: [
                    Raw {
                     content: "log",
                     position: (9, 29),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                attributes: [
                 Raw {
                  content: "debug",
                  position: (9, 34),
                 },
                 Raw {
                  content: "quiet",
                  position: (9, 40),
                 },
                ],
               },
              ],
              recursive: false,
              position: (9, 14),
             },
            },
            Binding {
             from: AttributePath {
              parts: [
               Raw {
                content: "unifi",
                position: (10, 5),
               },
              ],
             },
             to: Map {
              bindings: [
               Inherit {
                from: Some(
                 Variable {
                  identifier: "cfg",
                  position: (10, 24),
                 },
                ),
                attributes: [
                 Raw {
                  content: "controllers",
                  position: (10, 29),
                 },
                ],
               },
              ],
              recursive: false,
              position: (10, 13),
             },
            },
            Binding {
             from: AttributePath {
              parts: [
               Raw {
                content: "influxdb",
                position: (11, 5),
               },
               Raw {
                content: "disable",
                position: (11, 14),
               },
              ],
             },
             to: Variable {
              identifier: "true",
              position: (11, 24),
             },
            },
            Binding {
             from: AttributePath {
              parts: [
               Raw {
                content: "prometheus",
                position: (12, 5),
               },
              ],
             },
             to: Map {
              bindings: [
               Binding {
                from: AttributePath {
                 parts: [
                  Raw {
                   content: "http_listen",
                   position: (13, 7),
                  },
                 ],
                },
                to: String {
                 parts: [
                  Interpolation {
                   expression: PropertyAccess {
                    expression: Variable {
                     identifier: "cfg",
                     position: (13, 24),
                    },
                    attribute_path: AttributePath {
                     parts: [
                      Raw {
                       content: "listenAddress",
                       position: (13, 28),
                      },
                     ],
                    },
                    default: None,
                   },
                  },
                  Raw {
                   content: ":",
                   position: (13, 42),
                  },
                  Interpolation {
                   expression: FunctionApplication {
                    function: Variable {
                     identifier: "toString",
                     position: (13, 45),
                    },
                    arguments: [
                     PropertyAccess {
                      expression: Variable {
                       identifier: "cfg",
                       position: (13, 54),
                      },
                      attribute_path: AttributePath {
                       parts: [
                        Raw {
                         content: "port",
                         position: (13, 58),
                        },
                       ],
                      },
                      default: None,
                     },
                    ],
                   },
                  },
                 ],
                 position: (13, 21),
                },
               },
               Binding {
                from: AttributePath {
                 parts: [
                  Raw {
                   content: "report_errors",
                   position: (14, 7),
                  },
                 ],
                },
                to: PropertyAccess {
                 expression: Variable {
                  identifier: "cfg",
                  position: (14, 23),
                 },
                 attribute_path: AttributePath {
                  parts: [
                   Raw {
                    content: "log",
                    position: (14, 27),
                   },
                   Raw {
                    content: "prometheusErrors",
                    position: (14, 31),
                   },
                  ],
                 },
                 default: None,
                },
               },
              ],
              recursive: false,
              position: (12, 18),
             },
            },
           ],
           recursive: false,
           position: (8, 93),
          },
         ],
        },
        position: (8, 71),
       },
      ],
     },
    },
   ],
   target: Map {
    bindings: [
     Binding {
      from: AttributePath {
       parts: [
        Raw {
         content: "port",
         position: (19, 3),
        },
       ],
      },
      to: Int {
       value: 9130,
       position: (19, 10),
      },
     },
     Binding {
      from: AttributePath {
       parts: [
        Raw {
         content: "extraOpts",
         position: (21, 3),
        },
       ],
      },
      to: Map {
       bindings: [
        Inherit {
         from: Some(
          PropertyAccess {
           expression: Variable {
            identifier: "options",
            position: (22, 14),
           },
           attribute_path: AttributePath {
            parts: [
             Raw {
              content: "services",
              position: (22, 22),
             },
             Raw {
              content: "unifi-poller",
              position: (22, 31),
             },
             Raw {
              content: "unifi",
              position: (22, 44),
             },
            ],
           },
           default: None,
          },
         ),
         attributes: [
          Raw {
           content: "controllers",
           position: (22, 51),
          },
         ],
        },
        Binding {
         from: AttributePath {
          parts: [
           Raw {
            content: "log",
            position: (23, 5),
           },
          ],
         },
         to: Map {
          bindings: [
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "debug",
               position: (24, 7),
              },
             ],
            },
            to: FunctionApplication {
             function: Variable {
              identifier: "mkEnableOption",
              position: (24, 15),
             },
             arguments: [
              String {
               parts: [
                Raw {
                 content: "debug logging including line numbers, high resolution timestamps, per-device logs.",
                 position: (24, 31),
                },
               ],
               position: (24, 30),
              },
             ],
            },
           },
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "quiet",
               position: (25, 7),
              },
             ],
            },
            to: FunctionApplication {
             function: Variable {
              identifier: "mkEnableOption",
              position: (25, 15),
             },
             arguments: [
              String {
               parts: [
                Raw {
                 content: "startup and error logs only.",
                 position: (25, 31),
                },
               ],
               position: (25, 30),
              },
             ],
            },
           },
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "prometheusErrors",
               position: (26, 7),
              },
             ],
            },
            to: FunctionApplication {
             function: Variable {
              identifier: "mkEnableOption",
              position: (26, 26),
             },
             arguments: [
              String {
               parts: [
                Raw {
                 content: "emitting errors to prometheus.",
                 position: (26, 42),
                },
               ],
               position: (26, 41),
              },
             ],
            },
           },
          ],
          recursive: false,
          position: (23, 11),
         },
        },
       ],
       recursive: false,
       position: (21, 15),
      },
     },
     Binding {
      from: AttributePath {
       parts: [
        Raw {
         content: "serviceOpts",
         position: (30, 3),
        },
        Raw {
         content: "serviceConfig",
         position: (30, 15),
        },
       ],
      },
      to: Map {
       bindings: [
        Binding {
         from: AttributePath {
          parts: [
           Raw {
            content: "ExecStart",
            position: (31, 5),
           },
          ],
         },
         to: String {
          parts: [
           Interpolation {
            expression: PropertyAccess {
             expression: Variable {
              identifier: "pkgs",
              position: (31, 20),
             },
             attribute_path: AttributePath {
              parts: [
               Raw {
                content: "unifi-poller",
                position: (31, 25),
               },
              ],
             },
             default: None,
            },
           },
           Raw {
            content: "/bin/unifi-poller --config ",
            position: (31, 38),
           },
           Interpolation {
            expression: Variable {
             identifier: "configFile",
             position: (31, 67),
            },
           },
          ],
          position: (31, 17),
         },
        },
        Binding {
         from: AttributePath {
          parts: [
           Raw {
            content: "DynamicUser",
            position: (32, 5),
           },
          ],
         },
         to: Variable {
          identifier: "false",
          position: (32, 19),
         },
        },
       ],
       recursive: false,
       position: (30, 31),
      },
     },
    ],
    recursive: false,
    position: (18, 4),
   },
   position: (5, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}