renderSubscribeParams :: SubscribeParams -> Map ByteString BSERValue
renderSubscribeParams params = M.unions
    [ case _SubscribeParams_Since params of
        Nothing -> M.empty
        Just c -> M.singleton "since" (renderClockspec c)
    , case _SubscribeParams_DeferVcs params of
        True -> M.empty -- When not specified, default behaviour of watchman is True
        False -> M.singleton "defer_vcs" (BSERBool False)
    , case _SubscribeParams_Defer params of
        [] -> M.empty
        xs -> M.singleton "defer" (BSERArray (Seq.fromList (map (\(StateName s) -> BSERString s) xs)))
    , case _SubscribeParams_Drop params of
        [] -> M.empty
        xs -> M.singleton "drop" (BSERArray (Seq.fromList (map (\(StateName s) -> BSERString s) xs)))
    ]
renderSubscribeParams :: SubscribeParams -> Map ByteString BSERValue
renderSubscribeParams params = M.unions
    [ case _SubscribeParams_Since params of
        Nothing -> M.empty
        Just c -> M.singleton "since" (renderClockspec c)
    , case _SubscribeParams_DeferVcs params of
        True -> M.empty -- When not specified, default behaviour of watchman is True
        False -> M.singleton "defer_vcs" (BSERBool False)
    , case _SubscribeParams_Defer params of
        [] -> M.empty
        xs -> M.singleton "defer" (BSERArray (Seq.fromList (map (\(StateName s) -> BSERString s) xs)))
    , case _SubscribeParams_Drop params of
        [] -> M.empty
        xs -> M.singleton "drop" (BSERArray (Seq.fromList (map (\(StateName s) -> BSERString s) xs)))
    ]
renderSubscribeParams params = M.unions
    [ case _SubscribeParams_Since params of
        Nothing -> M.empty
        Just c -> M.singleton "since" (renderClockspec c)
    , case _SubscribeParams_DeferVcs params of
        True -> M.empty -- When not specified, default behaviour of watchman is True
        False -> M.singleton "defer_vcs" (BSERBool False)
    , case _SubscribeParams_Defer params of
        [] -> M.empty
        xs -> M.singleton "defer" (BSERArray (Seq.fromList (map (\(StateName s) -> BSERString s) xs)))
    , case _SubscribeParams_Drop params of
        [] -> M.empty
        xs -> M.singleton "drop" (BSERArray (Seq.fromList (map (\(StateName s) -> BSERString s) xs)))
    ]