---
Function {
 argument: None,
 arguments: FunctionArguments {
  arguments: [
   FunctionArgument {
    identifier: "options",
    default: None,
   },
   FunctionArgument {
    identifier: "pkgs",
    default: None,
   },
   FunctionArgument {
    identifier: "lib",
    default: None,
   },
   FunctionArgument {
    identifier: "config",
    default: None,
   },
  ],
  ellipsis: false,
 },
 definition: With {
  expression: Variable {
   identifier: "lib",
   position: (3, 6),
  },
  target: LetIn {
   bindings: [
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "cfg",
        position: (6, 3),
       },
      ],
     },
     PropertyAccess {
      expression: Variable {
       identifier: "config",
       position: (6, 9),
      },
      attribute_path: AttributePath {
       attributes: [
        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: [
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "port",
         position: (9, 3),
        },
       ],
      },
      Int {
       value: 9130,
       position: (9, 10),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "extraOpts",
         position: (10, 3),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "unifiAddress",
            position: (11, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (11, 20),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (12, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (12, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "str",
                  position: (12, 20),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "example",
                 position: (13, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "https://10.0.0.1:8443",
                 position: (13, 18),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (14, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "URL of the UniFi Controller API.\n",
                 position: (15, 1),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (11, 29),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "unifiInsecure",
            position: (19, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (19, 21),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (20, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (20, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "bool",
                  position: (20, 20),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (21, 7),
                },
               ],
              },
              Variable {
               identifier: "false",
               position: (21, 17),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (22, 7),
                },
               ],
              },
              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),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (19, 30),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "unifiUsername",
            position: (28, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (28, 21),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (29, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (29, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "str",
                  position: (29, 20),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "example",
                 position: (30, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "ReadOnlyUser",
                 position: (30, 18),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (31, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "username for authentication against UniFi Controller API.\n",
                 position: (32, 1),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (28, 30),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "unifiPassword",
            position: (36, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (36, 21),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (37, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (37, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "str",
                  position: (37, 20),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (38, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Password for authentication against UniFi Controller API.\n",
                 position: (39, 1),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (36, 30),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "unifiTimeout",
            position: (43, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (43, 20),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (44, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (44, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "str",
                  position: (44, 20),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (45, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "5s",
                 position: (45, 18),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "example",
                 position: (46, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "2m",
                 position: (46, 18),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (47, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Timeout including unit for UniFi Controller API requests.\n",
                 position: (48, 1),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (43, 29),
           },
          ],
         },
        ),
       ],
       recursive: false,
       position: (10, 15),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "serviceOpts",
         position: (52, 3),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "serviceConfig",
            position: (53, 5),
           },
          ],
         },
         Map {
          bindings: [
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "ExecStart",
               position: (54, 7),
              },
             ],
            },
            String {
             parts: [
              Raw {
               content: "",
               position: (55, 1),
              },
              Expression {
               expression: PropertyAccess {
                expression: Variable {
                 identifier: "pkgs",
                 position: (55, 11),
                },
                attribute_path: AttributePath {
                 attributes: [
                  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 {
                 attributes: [
                  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 {
                   attributes: [
                    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 {
                 attributes: [
                  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 {
                   attributes: [
                    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 {
                   attributes: [
                    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 {
                 attributes: [
                  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 {
                   attributes: [
                    Raw {
                     content: "unifiInsecure",
                     position: (61, 32),
                    },
                   ],
                  },
                  default: None,
                 },
                 String {
                  parts: [
                   Raw {
                    content: "-unifi.insecure",
                    position: (61, 47),
                   },
                  ],
                 },
                ],
               },
              },
              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),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "cfg",
                   position: (62, 40),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "extraFlags",
                     position: (62, 44),
                    },
                   ],
                  },
                  default: None,
                 },
                ],
               },
              },
              Raw {
               content: "\n",
               position: (62, 55),
              },
             ],
            },
           ),
          ],
          recursive: false,
          position: (53, 21),
         },
        ),
       ],
       recursive: false,
       position: (52, 17),
      },
     ),
    ],
    recursive: false,
    position: (8, 1),
   },
   position: (5, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}