---
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",
         position: (6, 46),
        },
       ],
      },
      default: None,
     },
    },
   ],
   target: Map {
    bindings: [
     Binding {
      from: AttributePath {
       parts: [
        Raw {
         content: "port",
         position: (9, 3),
        },
       ],
      },
      to: Int {
       value: 9130,
       position: (9, 10),
      },
     },
     Binding {
      from: AttributePath {
       parts: [
        Raw {
         content: "extraOpts",
         position: (10, 3),
        },
       ],
      },
      to: Map {
       bindings: [
        Binding {
         from: AttributePath {
          parts: [
           Raw {
            content: "unifiAddress",
            position: (11, 5),
           },
          ],
         },
         to: FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (11, 20),
          },
          arguments: [
           Map {
            bindings: [
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "type",
                 position: (12, 7),
                },
               ],
              },
              to: PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (12, 14),
               },
               attribute_path: AttributePath {
                parts: [
                 Raw {
                  content: "str",
                  position: (12, 20),
                 },
                ],
               },
               default: None,
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "example",
                 position: (13, 7),
                },
               ],
              },
              to: String {
               parts: [
                Raw {
                 content: "https://10.0.0.1:8443",
                 position: (13, 18),
                },
               ],
               position: (13, 17),
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "description",
                 position: (14, 7),
                },
               ],
              },
              to: String {
               parts: [
                Raw {
                 content: "URL of the UniFi Controller API.\n",
                 position: (15, 1),
                },
               ],
               position: (14, 21),
              },
             },
            ],
            recursive: false,
            position: (11, 29),
           },
          ],
         },
        },
        Binding {
         from: AttributePath {
          parts: [
           Raw {
            content: "unifiInsecure",
            position: (19, 5),
           },
          ],
         },
         to: FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (19, 21),
          },
          arguments: [
           Map {
            bindings: [
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "type",
                 position: (20, 7),
                },
               ],
              },
              to: PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (20, 14),
               },
               attribute_path: AttributePath {
                parts: [
                 Raw {
                  content: "bool",
                  position: (20, 20),
                 },
                ],
               },
               default: None,
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "default",
                 position: (21, 7),
                },
               ],
              },
              to: Variable {
               identifier: "false",
               position: (21, 17),
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "description",
                 position: (22, 7),
                },
               ],
              },
              to: String {
               parts: [
                Raw {
                 content: "If enabled skip the verification of the TLS certificate of the UniFi Controller API.\nUse with caution.\n",
                 position: (23, 1),
                },
               ],
               position: (22, 21),
              },
             },
            ],
            recursive: false,
            position: (19, 30),
           },
          ],
         },
        },
        Binding {
         from: AttributePath {
          parts: [
           Raw {
            content: "unifiUsername",
            position: (28, 5),
           },
          ],
         },
         to: FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (28, 21),
          },
          arguments: [
           Map {
            bindings: [
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "type",
                 position: (29, 7),
                },
               ],
              },
              to: PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (29, 14),
               },
               attribute_path: AttributePath {
                parts: [
                 Raw {
                  content: "str",
                  position: (29, 20),
                 },
                ],
               },
               default: None,
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "example",
                 position: (30, 7),
                },
               ],
              },
              to: String {
               parts: [
                Raw {
                 content: "ReadOnlyUser",
                 position: (30, 18),
                },
               ],
               position: (30, 17),
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "description",
                 position: (31, 7),
                },
               ],
              },
              to: String {
               parts: [
                Raw {
                 content: "username for authentication against UniFi Controller API.\n",
                 position: (32, 1),
                },
               ],
               position: (31, 21),
              },
             },
            ],
            recursive: false,
            position: (28, 30),
           },
          ],
         },
        },
        Binding {
         from: AttributePath {
          parts: [
           Raw {
            content: "unifiPassword",
            position: (36, 5),
           },
          ],
         },
         to: FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (36, 21),
          },
          arguments: [
           Map {
            bindings: [
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "type",
                 position: (37, 7),
                },
               ],
              },
              to: PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (37, 14),
               },
               attribute_path: AttributePath {
                parts: [
                 Raw {
                  content: "str",
                  position: (37, 20),
                 },
                ],
               },
               default: None,
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "description",
                 position: (38, 7),
                },
               ],
              },
              to: String {
               parts: [
                Raw {
                 content: "Password for authentication against UniFi Controller API.\n",
                 position: (39, 1),
                },
               ],
               position: (38, 21),
              },
             },
            ],
            recursive: false,
            position: (36, 30),
           },
          ],
         },
        },
        Binding {
         from: AttributePath {
          parts: [
           Raw {
            content: "unifiTimeout",
            position: (43, 5),
           },
          ],
         },
         to: FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (43, 20),
          },
          arguments: [
           Map {
            bindings: [
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "type",
                 position: (44, 7),
                },
               ],
              },
              to: PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (44, 14),
               },
               attribute_path: AttributePath {
                parts: [
                 Raw {
                  content: "str",
                  position: (44, 20),
                 },
                ],
               },
               default: None,
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "default",
                 position: (45, 7),
                },
               ],
              },
              to: String {
               parts: [
                Raw {
                 content: "5s",
                 position: (45, 18),
                },
               ],
               position: (45, 17),
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "example",
                 position: (46, 7),
                },
               ],
              },
              to: String {
               parts: [
                Raw {
                 content: "2m",
                 position: (46, 18),
                },
               ],
               position: (46, 17),
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "description",
                 position: (47, 7),
                },
               ],
              },
              to: String {
               parts: [
                Raw {
                 content: "Timeout including unit for UniFi Controller API requests.\n",
                 position: (48, 1),
                },
               ],
               position: (47, 21),
              },
             },
            ],
            recursive: false,
            position: (43, 29),
           },
          ],
         },
        },
       ],
       recursive: false,
       position: (10, 15),
      },
     },
     Binding {
      from: AttributePath {
       parts: [
        Raw {
         content: "serviceOpts",
         position: (52, 3),
        },
       ],
      },
      to: Map {
       bindings: [
        Binding {
         from: AttributePath {
          parts: [
           Raw {
            content: "serviceConfig",
            position: (53, 5),
           },
          ],
         },
         to: Map {
          bindings: [
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "ExecStart",
               position: (54, 7),
              },
             ],
            },
            to: String {
             parts: [
              Raw {
               content: "",
               position: (55, 1),
              },
              Expression {
               expression: PropertyAccess {
                expression: Variable {
                 identifier: "pkgs",
                 position: (55, 11),
                },
                attribute_path: AttributePath {
                 parts: [
                  Raw {
                   content: "prometheus-unifi-exporter",
                   position: (55, 16),
                  },
                 ],
                },
                default: None,
               },
              },
              Raw {
               content: "/bin/unifi_exporter \\\n  -telemetry.addr ",
               position: (55, 42),
              },
              Expression {
               expression: PropertyAccess {
                expression: Variable {
                 identifier: "cfg",
                 position: (56, 29),
                },
                attribute_path: AttributePath {
                 parts: [
                  Raw {
                   content: "listenAddress",
                   position: (56, 33),
                  },
                 ],
                },
                default: None,
               },
              },
              Raw {
               content: ":",
               position: (56, 47),
              },
              Expression {
               expression: FunctionApplication {
                function: Variable {
                 identifier: "toString",
                 position: (56, 50),
                },
                arguments: [
                 PropertyAccess {
                  expression: Variable {
                   identifier: "cfg",
                   position: (56, 59),
                  },
                  attribute_path: AttributePath {
                   parts: [
                    Raw {
                     content: "port",
                     position: (56, 63),
                    },
                   ],
                  },
                  default: None,
                 },
                ],
               },
              },
              Raw {
               content: " \\\n  -unifi.addr ",
               position: (56, 68),
              },
              Expression {
               expression: PropertyAccess {
                expression: Variable {
                 identifier: "cfg",
                 position: (57, 25),
                },
                attribute_path: AttributePath {
                 parts: [
                  Raw {
                   content: "unifiAddress",
                   position: (57, 29),
                  },
                 ],
                },
                default: None,
               },
              },
              Raw {
               content: " \\\n  -unifi.username ",
               position: (57, 42),
              },
              Expression {
               expression: FunctionApplication {
                function: Variable {
                 identifier: "escapeShellArg",
                 position: (58, 29),
                },
                arguments: [
                 PropertyAccess {
                  expression: Variable {
                   identifier: "cfg",
                   position: (58, 44),
                  },
                  attribute_path: AttributePath {
                   parts: [
                    Raw {
                     content: "unifiUsername",
                     position: (58, 48),
                    },
                   ],
                  },
                  default: None,
                 },
                ],
               },
              },
              Raw {
               content: " \\\n  -unifi.password ",
               position: (58, 62),
              },
              Expression {
               expression: FunctionApplication {
                function: Variable {
                 identifier: "escapeShellArg",
                 position: (59, 29),
                },
                arguments: [
                 PropertyAccess {
                  expression: Variable {
                   identifier: "cfg",
                   position: (59, 44),
                  },
                  attribute_path: AttributePath {
                   parts: [
                    Raw {
                     content: "unifiPassword",
                     position: (59, 48),
                    },
                   ],
                  },
                  default: None,
                 },
                ],
               },
              },
              Raw {
               content: " \\\n  -unifi.timeout ",
               position: (59, 62),
              },
              Expression {
               expression: PropertyAccess {
                expression: Variable {
                 identifier: "cfg",
                 position: (60, 28),
                },
                attribute_path: AttributePath {
                 parts: [
                  Raw {
                   content: "unifiTimeout",
                   position: (60, 32),
                  },
                 ],
                },
                default: None,
               },
              },
              Raw {
               content: " \\\n  ",
               position: (60, 45),
              },
              Expression {
               expression: FunctionApplication {
                function: Variable {
                 identifier: "optionalString",
                 position: (61, 13),
                },
                arguments: [
                 PropertyAccess {
                  expression: Variable {
                   identifier: "cfg",
                   position: (61, 28),
                  },
                  attribute_path: AttributePath {
                   parts: [
                    Raw {
                     content: "unifiInsecure",
                     position: (61, 32),
                    },
                   ],
                  },
                  default: None,
                 },
                 String {
                  parts: [
                   Raw {
                    content: "-unifi.insecure",
                    position: (61, 47),
                   },
                  ],
                  position: (61, 46),
                 },
                ],
               },
              },
              Raw {
               content: " \\\n  ",
               position: (61, 65),
              },
              Expression {
               expression: FunctionApplication {
                function: Variable {
                 identifier: "concatStringsSep",
                 position: (62, 13),
                },
                arguments: [
                 String {
                  parts: [
                   Raw {
                    content: " \\\n  ",
                    position: (62, 31),
                   },
                  ],
                  position: (62, 30),
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "cfg",
                   position: (62, 40),
                  },
                  attribute_path: AttributePath {
                   parts: [
                    Raw {
                     content: "extraFlags",
                     position: (62, 44),
                    },
                   ],
                  },
                  default: None,
                 },
                ],
               },
              },
              Raw {
               content: "\n",
               position: (62, 55),
              },
             ],
             position: (54, 19),
            },
           },
          ],
          recursive: false,
          position: (53, 21),
         },
        },
       ],
       recursive: false,
       position: (52, 17),
      },
     },
    ],
    recursive: false,
    position: (8, 1),
   },
   position: (5, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}