----------------------------------------------------------------- -- Autogenerated by Thrift -- -- DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING -- @generated ----------------------------------------------------------------- {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE BangPatterns #-} {-# OPTIONS_GHC -fno-warn-unused-imports#-} {-# OPTIONS_GHC -fno-warn-overlapping-patterns#-} {-# OPTIONS_GHC -fno-warn-incomplete-patterns#-} {-# OPTIONS_GHC -fno-warn-incomplete-uni-patterns#-} {-# OPTIONS_GHC -fno-warn-incomplete-record-updates#-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} module Glean.GleanService.Client (GleanService, getSchemaInfo, getSchemaInfoIO, send_getSchemaInfo, _build_getSchemaInfo, recv_getSchemaInfo, _parse_getSchemaInfo, getSchemaInfoForSchema, getSchemaInfoForSchemaIO, send_getSchemaInfoForSchema, _build_getSchemaInfoForSchema, recv_getSchemaInfoForSchema, _parse_getSchemaInfoForSchema, validateSchema, validateSchemaIO, send_validateSchema, _build_validateSchema, recv_validateSchema, _parse_validateSchema, sendBatch, sendBatchIO, send_sendBatch, _build_sendBatch, recv_sendBatch, _parse_sendBatch, enqueueBatch, enqueueBatchIO, send_enqueueBatch, _build_enqueueBatch, recv_enqueueBatch, _parse_enqueueBatch, finishBatch, finishBatchIO, send_finishBatch, _build_finishBatch, recv_finishBatch, _parse_finishBatch, sendJsonBatch, sendJsonBatchIO, send_sendJsonBatch, _build_sendJsonBatch, recv_sendJsonBatch, _parse_sendJsonBatch, kickOff, kickOffIO, send_kickOff, _build_kickOff, recv_kickOff, _parse_kickOff, updateProperties, updatePropertiesIO, send_updateProperties, _build_updateProperties, recv_updateProperties, _parse_updateProperties, completePredicates, completePredicatesIO, send_completePredicates, _build_completePredicates, recv_completePredicates, _parse_completePredicates, finish, finishIO, send_finish, _build_finish, recv_finish, _parse_finish, finalize, finalizeIO, send_finalize, _build_finalize, recv_finalize, _parse_finalize, queryFact, queryFactIO, send_queryFact, _build_queryFact, recv_queryFact, _parse_queryFact, factIdRange, factIdRangeIO, send_factIdRange, _build_factIdRange, recv_factIdRange, _parse_factIdRange, predicateStats, predicateStatsIO, send_predicateStats, _build_predicateStats, recv_predicateStats, _parse_predicateStats, listDatabases, listDatabasesIO, send_listDatabases, _build_listDatabases, recv_listDatabases, _parse_listDatabases, getDatabase, getDatabaseIO, send_getDatabase, _build_getDatabase, recv_getDatabase, _parse_getDatabase, deleteDatabase, deleteDatabaseIO, send_deleteDatabase, _build_deleteDatabase, recv_deleteDatabase, _parse_deleteDatabase, restore, restoreIO, send_restore, _build_restore, recv_restore, _parse_restore, userQueryFacts, userQueryFactsIO, send_userQueryFacts, _build_userQueryFacts, recv_userQueryFacts, _parse_userQueryFacts, userQuery, userQueryIO, send_userQuery, _build_userQuery, recv_userQuery, _parse_userQuery, userQueryBatch, userQueryBatchIO, send_userQueryBatch, _build_userQueryBatch, recv_userQueryBatch, _parse_userQueryBatch, deriveStored, deriveStoredIO, send_deriveStored, _build_deriveStored, recv_deriveStored, _parse_deriveStored) where import qualified Control.Arrow as Arrow import qualified Control.Concurrent as Concurrent import qualified Control.Exception as Exception import qualified Control.Monad as Monad import qualified Control.Monad.Trans.Class as Trans import qualified Control.Monad.Trans.Reader as Reader import qualified Data.ByteString.Builder as ByteString import qualified Data.ByteString.Lazy as LBS import qualified Data.HashMap.Strict as HashMap import qualified Data.Int as Int import qualified Data.List as List import qualified Data.Map.Strict as Map import qualified Data.Proxy as Proxy import qualified Data.Text as Text import qualified Data.Text.Encoding as Text import qualified Facebook.Thrift.Annotation.Cpp.Cpp.Types as Facebook.Thrift.Annotation.Cpp.Cpp import qualified Facebook.Thrift.Annotation.Thrift.Thrift.Types as Facebook.Thrift.Annotation.Thrift.Thrift import qualified Fb303.FacebookService.Client as FacebookService import qualified Fb303.Types as Fb303 import qualified Prelude as Prelude import qualified Thrift.Binary.Parser as Parser import qualified Thrift.Codegen as Thrift import qualified Thrift.Protocol.ApplicationException.Types as Thrift import Data.Monoid ((<>)) import Prelude ((==), (=<<), (>>=), (<$>), (.)) import Glean.Types data GleanService type instance Thrift.Super GleanService = FacebookService.FacebookService getSchemaInfo :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Repo -> GetSchemaInfo -> Thrift.ThriftM p c s SchemaInfo getSchemaInfo __field__repo __field__get = do Thrift.ThriftEnv _proxy _channel _opts _counter <- Reader.ask Trans.lift (getSchemaInfoIO _proxy _channel _counter _opts __field__repo __field__get) getSchemaInfoIO :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Proxy.Proxy p -> c s -> Thrift.Counter -> Thrift.RpcOptions -> Repo -> GetSchemaInfo -> Prelude.IO SchemaInfo getSchemaInfoIO _proxy _channel _counter _opts __field__repo __field__get = do (_handle, _sendCob, _recvCob) <- Thrift.mkCallbacks (recv_getSchemaInfo _proxy) send_getSchemaInfo _proxy _channel _counter _sendCob _recvCob _opts __field__repo __field__get Thrift.wait _handle send_getSchemaInfo :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Proxy.Proxy p -> c s -> Thrift.Counter -> Thrift.SendCallback -> Thrift.RecvCallback -> Thrift.RpcOptions -> Repo -> GetSchemaInfo -> Prelude.IO () send_getSchemaInfo _proxy _channel _counter _sendCob _recvCob _rpcOpts __field__repo __field__get = do _seqNum <- _counter let _callMsg = LBS.toStrict (ByteString.toLazyByteString (_build_getSchemaInfo _proxy _seqNum __field__repo __field__get)) Thrift.sendRequest _channel (Thrift.Request _callMsg (Thrift.setRpcPriority _rpcOpts Thrift.NormalPriority)) _sendCob _recvCob recv_getSchemaInfo :: (Thrift.Protocol p) => Proxy.Proxy p -> Thrift.Response -> Prelude.Either Exception.SomeException SchemaInfo recv_getSchemaInfo _proxy (Thrift.Response _response _) = Monad.join (Arrow.left (Exception.SomeException . Thrift.ProtocolException) (Parser.parse (_parse_getSchemaInfo _proxy) _response)) _build_getSchemaInfo :: Thrift.Protocol p => Proxy.Proxy p -> Int.Int32 -> Repo -> GetSchemaInfo -> ByteString.Builder _build_getSchemaInfo _proxy _seqNum __field__repo __field__get = Thrift.genMsgBegin _proxy "getSchemaInfo" 1 _seqNum <> Thrift.genStruct _proxy (Thrift.genField _proxy "repo" (Thrift.getStructType _proxy) 1 0 (Thrift.buildStruct _proxy __field__repo) : Thrift.genField _proxy "get" (Thrift.getStructType _proxy) 2 1 (Thrift.buildStruct _proxy __field__get) : []) <> Thrift.genMsgEnd _proxy _parse_getSchemaInfo :: Thrift.Protocol p => Proxy.Proxy p -> Parser.Parser (Prelude.Either Exception.SomeException SchemaInfo) _parse_getSchemaInfo _proxy = do Thrift.MsgBegin _name _msgTy _ <- Thrift.parseMsgBegin _proxy _result <- case _msgTy of 1 -> Prelude.fail "getSchemaInfo: expected reply but got function call" 2 | _name == "getSchemaInfo" -> do let _idMap = HashMap.fromList [("getSchemaInfo_success", 0), ("u", 1)] _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap case _fieldBegin of Thrift.FieldBegin _type _id _bool -> do case _id of 0 | _type == Thrift.getStructType _proxy -> Prelude.fmap Prelude.Right (Thrift.parseStruct _proxy) 1 | _type == Thrift.getStructType _proxy -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser UnknownDatabase) _ -> Prelude.fail (Prelude.unwords ["unrecognized exception, type:", Prelude.show _type, "field id:", Prelude.show _id]) Thrift.FieldEnd -> Prelude.fail "no response" | Prelude.otherwise -> Prelude.fail "reply function does not match" 3 -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser Thrift.ApplicationException) 4 -> Prelude.fail "getSchemaInfo: expected reply but got oneway function call" _ -> Prelude.fail "getSchemaInfo: invalid message type" Thrift.parseMsgEnd _proxy Prelude.return _result getSchemaInfoForSchema :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => GetSchemaInfo -> Thrift.ThriftM p c s SchemaInfo getSchemaInfoForSchema __field__get = do Thrift.ThriftEnv _proxy _channel _opts _counter <- Reader.ask Trans.lift (getSchemaInfoForSchemaIO _proxy _channel _counter _opts __field__get) getSchemaInfoForSchemaIO :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Proxy.Proxy p -> c s -> Thrift.Counter -> Thrift.RpcOptions -> GetSchemaInfo -> Prelude.IO SchemaInfo getSchemaInfoForSchemaIO _proxy _channel _counter _opts __field__get = do (_handle, _sendCob, _recvCob) <- Thrift.mkCallbacks (recv_getSchemaInfoForSchema _proxy) send_getSchemaInfoForSchema _proxy _channel _counter _sendCob _recvCob _opts __field__get Thrift.wait _handle send_getSchemaInfoForSchema :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Proxy.Proxy p -> c s -> Thrift.Counter -> Thrift.SendCallback -> Thrift.RecvCallback -> Thrift.RpcOptions -> GetSchemaInfo -> Prelude.IO () send_getSchemaInfoForSchema _proxy _channel _counter _sendCob _recvCob _rpcOpts __field__get = do _seqNum <- _counter let _callMsg = LBS.toStrict (ByteString.toLazyByteString (_build_getSchemaInfoForSchema _proxy _seqNum __field__get)) Thrift.sendRequest _channel (Thrift.Request _callMsg (Thrift.setRpcPriority _rpcOpts Thrift.NormalPriority)) _sendCob _recvCob recv_getSchemaInfoForSchema :: (Thrift.Protocol p) => Proxy.Proxy p -> Thrift.Response -> Prelude.Either Exception.SomeException SchemaInfo recv_getSchemaInfoForSchema _proxy (Thrift.Response _response _) = Monad.join (Arrow.left (Exception.SomeException . Thrift.ProtocolException) (Parser.parse (_parse_getSchemaInfoForSchema _proxy) _response)) _build_getSchemaInfoForSchema :: Thrift.Protocol p => Proxy.Proxy p -> Int.Int32 -> GetSchemaInfo -> ByteString.Builder _build_getSchemaInfoForSchema _proxy _seqNum __field__get = Thrift.genMsgBegin _proxy "getSchemaInfoForSchema" 1 _seqNum <> Thrift.genStruct _proxy (Thrift.genField _proxy "get" (Thrift.getStructType _proxy) 1 0 (Thrift.buildStruct _proxy __field__get) : []) <> Thrift.genMsgEnd _proxy _parse_getSchemaInfoForSchema :: Thrift.Protocol p => Proxy.Proxy p -> Parser.Parser (Prelude.Either Exception.SomeException SchemaInfo) _parse_getSchemaInfoForSchema _proxy = do Thrift.MsgBegin _name _msgTy _ <- Thrift.parseMsgBegin _proxy _result <- case _msgTy of 1 -> Prelude.fail "getSchemaInfoForSchema: expected reply but got function call" 2 | _name == "getSchemaInfoForSchema" -> do let _idMap = HashMap.fromList [("getSchemaInfoForSchema_success", 0)] _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap case _fieldBegin of Thrift.FieldBegin _type _id _bool -> do case _id of 0 | _type == Thrift.getStructType _proxy -> Prelude.fmap Prelude.Right (Thrift.parseStruct _proxy) _ -> Prelude.fail (Prelude.unwords ["unrecognized exception, type:", Prelude.show _type, "field id:", Prelude.show _id]) Thrift.FieldEnd -> Prelude.fail "no response" | Prelude.otherwise -> Prelude.fail "reply function does not match" 3 -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser Thrift.ApplicationException) 4 -> Prelude.fail "getSchemaInfoForSchema: expected reply but got oneway function call" _ -> Prelude.fail "getSchemaInfoForSchema: invalid message type" Thrift.parseMsgEnd _proxy Prelude.return _result validateSchema :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => ValidateSchema -> Thrift.ThriftM p c s () validateSchema __field__v = do Thrift.ThriftEnv _proxy _channel _opts _counter <- Reader.ask Trans.lift (validateSchemaIO _proxy _channel _counter _opts __field__v) validateSchemaIO :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Proxy.Proxy p -> c s -> Thrift.Counter -> Thrift.RpcOptions -> ValidateSchema -> Prelude.IO () validateSchemaIO _proxy _channel _counter _opts __field__v = do (_handle, _sendCob, _recvCob) <- Thrift.mkCallbacks (recv_validateSchema _proxy) send_validateSchema _proxy _channel _counter _sendCob _recvCob _opts __field__v Thrift.wait _handle send_validateSchema :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Proxy.Proxy p -> c s -> Thrift.Counter -> Thrift.SendCallback -> Thrift.RecvCallback -> Thrift.RpcOptions -> ValidateSchema -> Prelude.IO () send_validateSchema _proxy _channel _counter _sendCob _recvCob _rpcOpts __field__v = do _seqNum <- _counter let _callMsg = LBS.toStrict (ByteString.toLazyByteString (_build_validateSchema _proxy _seqNum __field__v)) Thrift.sendRequest _channel (Thrift.Request _callMsg (Thrift.setRpcPriority _rpcOpts Thrift.NormalPriority)) _sendCob _recvCob recv_validateSchema :: (Thrift.Protocol p) => Proxy.Proxy p -> Thrift.Response -> Prelude.Either Exception.SomeException () recv_validateSchema _proxy (Thrift.Response _response _) = Monad.join (Arrow.left (Exception.SomeException . Thrift.ProtocolException) (Parser.parse (_parse_validateSchema _proxy) _response)) _build_validateSchema :: Thrift.Protocol p => Proxy.Proxy p -> Int.Int32 -> ValidateSchema -> ByteString.Builder _build_validateSchema _proxy _seqNum __field__v = Thrift.genMsgBegin _proxy "validateSchema" 1 _seqNum <> Thrift.genStruct _proxy (Thrift.genField _proxy "v" (Thrift.getStructType _proxy) 1 0 (Thrift.buildStruct _proxy __field__v) : []) <> Thrift.genMsgEnd _proxy _parse_validateSchema :: Thrift.Protocol p => Proxy.Proxy p -> Parser.Parser (Prelude.Either Exception.SomeException ()) _parse_validateSchema _proxy = do Thrift.MsgBegin _name _msgTy _ <- Thrift.parseMsgBegin _proxy _result <- case _msgTy of 1 -> Prelude.fail "validateSchema: expected reply but got function call" 2 | _name == "validateSchema" -> do let _idMap = HashMap.fromList [("e", 1)] _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap case _fieldBegin of Thrift.FieldBegin _type _id _bool -> do case _id of 1 | _type == Thrift.getStructType _proxy -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser Exception) _ -> Prelude.fail (Prelude.unwords ["unrecognized exception, type:", Prelude.show _type, "field id:", Prelude.show _id]) Thrift.FieldEnd -> Prelude.return (Prelude.Right ()) | Prelude.otherwise -> Prelude.fail "reply function does not match" 3 -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser Thrift.ApplicationException) 4 -> Prelude.fail "validateSchema: expected reply but got oneway function call" _ -> Prelude.fail "validateSchema: invalid message type" Thrift.parseMsgEnd _proxy Prelude.return _result sendBatch :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => ComputedBatch -> Thrift.ThriftM p c s SendResponse sendBatch __field__batch = do Thrift.ThriftEnv _proxy _channel _opts _counter <- Reader.ask Trans.lift (sendBatchIO _proxy _channel _counter _opts __field__batch) sendBatchIO :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Proxy.Proxy p -> c s -> Thrift.Counter -> Thrift.RpcOptions -> ComputedBatch -> Prelude.IO SendResponse sendBatchIO _proxy _channel _counter _opts __field__batch = do (_handle, _sendCob, _recvCob) <- Thrift.mkCallbacks (recv_sendBatch _proxy) send_sendBatch _proxy _channel _counter _sendCob _recvCob _opts __field__batch Thrift.wait _handle send_sendBatch :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Proxy.Proxy p -> c s -> Thrift.Counter -> Thrift.SendCallback -> Thrift.RecvCallback -> Thrift.RpcOptions -> ComputedBatch -> Prelude.IO () send_sendBatch _proxy _channel _counter _sendCob _recvCob _rpcOpts __field__batch = do _seqNum <- _counter let _callMsg = LBS.toStrict (ByteString.toLazyByteString (_build_sendBatch _proxy _seqNum __field__batch)) Thrift.sendRequest _channel (Thrift.Request _callMsg (Thrift.setRpcPriority _rpcOpts Thrift.NormalPriority)) _sendCob _recvCob recv_sendBatch :: (Thrift.Protocol p) => Proxy.Proxy p -> Thrift.Response -> Prelude.Either Exception.SomeException SendResponse recv_sendBatch _proxy (Thrift.Response _response _) = Monad.join (Arrow.left (Exception.SomeException . Thrift.ProtocolException) (Parser.parse (_parse_sendBatch _proxy) _response)) _build_sendBatch :: Thrift.Protocol p => Proxy.Proxy p -> Int.Int32 -> ComputedBatch -> ByteString.Builder _build_sendBatch _proxy _seqNum __field__batch = Thrift.genMsgBegin _proxy "sendBatch" 1 _seqNum <> Thrift.genStruct _proxy (Thrift.genField _proxy "batch" (Thrift.getStructType _proxy) 1 0 (Thrift.buildStruct _proxy __field__batch) : []) <> Thrift.genMsgEnd _proxy _parse_sendBatch :: Thrift.Protocol p => Proxy.Proxy p -> Parser.Parser (Prelude.Either Exception.SomeException SendResponse) _parse_sendBatch _proxy = do Thrift.MsgBegin _name _msgTy _ <- Thrift.parseMsgBegin _proxy _result <- case _msgTy of 1 -> Prelude.fail "sendBatch: expected reply but got function call" 2 | _name == "sendBatch" -> do let _idMap = HashMap.fromList [("sendBatch_success", 0), ("u", 1)] _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap case _fieldBegin of Thrift.FieldBegin _type _id _bool -> do case _id of 0 | _type == Thrift.getStructType _proxy -> Prelude.fmap Prelude.Right (Thrift.parseStruct _proxy) 1 | _type == Thrift.getStructType _proxy -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser UnknownDatabase) _ -> Prelude.fail (Prelude.unwords ["unrecognized exception, type:", Prelude.show _type, "field id:", Prelude.show _id]) Thrift.FieldEnd -> Prelude.fail "no response" | Prelude.otherwise -> Prelude.fail "reply function does not match" 3 -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser Thrift.ApplicationException) 4 -> Prelude.fail "sendBatch: expected reply but got oneway function call" _ -> Prelude.fail "sendBatch: invalid message type" Thrift.parseMsgEnd _proxy Prelude.return _result enqueueBatch :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Repo -> EnqueueBatch -> EnqueueBatchWaitPolicy -> Thrift.ThriftM p c s EnqueueBatchResponse enqueueBatch __field__repo __field__batch __field__waitPolicy = do Thrift.ThriftEnv _proxy _channel _opts _counter <- Reader.ask Trans.lift (enqueueBatchIO _proxy _channel _counter _opts __field__repo __field__batch __field__waitPolicy) enqueueBatchIO :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Proxy.Proxy p -> c s -> Thrift.Counter -> Thrift.RpcOptions -> Repo -> EnqueueBatch -> EnqueueBatchWaitPolicy -> Prelude.IO EnqueueBatchResponse enqueueBatchIO _proxy _channel _counter _opts __field__repo __field__batch __field__waitPolicy = do (_handle, _sendCob, _recvCob) <- Thrift.mkCallbacks (recv_enqueueBatch _proxy) send_enqueueBatch _proxy _channel _counter _sendCob _recvCob _opts __field__repo __field__batch __field__waitPolicy Thrift.wait _handle send_enqueueBatch :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Proxy.Proxy p -> c s -> Thrift.Counter -> Thrift.SendCallback -> Thrift.RecvCallback -> Thrift.RpcOptions -> Repo -> EnqueueBatch -> EnqueueBatchWaitPolicy -> Prelude.IO () send_enqueueBatch _proxy _channel _counter _sendCob _recvCob _rpcOpts __field__repo __field__batch __field__waitPolicy = do _seqNum <- _counter let _callMsg = LBS.toStrict (ByteString.toLazyByteString (_build_enqueueBatch _proxy _seqNum __field__repo __field__batch __field__waitPolicy)) Thrift.sendRequest _channel (Thrift.Request _callMsg (Thrift.setRpcPriority _rpcOpts Thrift.NormalPriority)) _sendCob _recvCob recv_enqueueBatch :: (Thrift.Protocol p) => Proxy.Proxy p -> Thrift.Response -> Prelude.Either Exception.SomeException EnqueueBatchResponse recv_enqueueBatch _proxy (Thrift.Response _response _) = Monad.join (Arrow.left (Exception.SomeException . Thrift.ProtocolException) (Parser.parse (_parse_enqueueBatch _proxy) _response)) _build_enqueueBatch :: Thrift.Protocol p => Proxy.Proxy p -> Int.Int32 -> Repo -> EnqueueBatch -> EnqueueBatchWaitPolicy -> ByteString.Builder _build_enqueueBatch _proxy _seqNum __field__repo __field__batch __field__waitPolicy = Thrift.genMsgBegin _proxy "enqueueBatch" 1 _seqNum <> Thrift.genStruct _proxy (Thrift.genField _proxy "repo" (Thrift.getStructType _proxy) 1 0 (Thrift.buildStruct _proxy __field__repo) : Thrift.genField _proxy "batch" (Thrift.getStructType _proxy) 2 1 (Thrift.buildStruct _proxy __field__batch) : Thrift.genField _proxy "waitPolicy" (Thrift.getI32Type _proxy) 3 2 ((Thrift.genI32 _proxy . Prelude.fromIntegral . Thrift.fromThriftEnum) __field__waitPolicy) : []) <> Thrift.genMsgEnd _proxy _parse_enqueueBatch :: Thrift.Protocol p => Proxy.Proxy p -> Parser.Parser (Prelude.Either Exception.SomeException EnqueueBatchResponse) _parse_enqueueBatch _proxy = do Thrift.MsgBegin _name _msgTy _ <- Thrift.parseMsgBegin _proxy _result <- case _msgTy of 1 -> Prelude.fail "enqueueBatch: expected reply but got function call" 2 | _name == "enqueueBatch" -> do let _idMap = HashMap.fromList [("enqueueBatch_success", 0), ("e", 1), ("r", 2), ("u", 3)] _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap case _fieldBegin of Thrift.FieldBegin _type _id _bool -> do case _id of 0 | _type == Thrift.getStructType _proxy -> Prelude.fmap Prelude.Right (Thrift.parseStruct _proxy) 1 | _type == Thrift.getStructType _proxy -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser Exception) 2 | _type == Thrift.getStructType _proxy -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser Retry) 3 | _type == Thrift.getStructType _proxy -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser UnknownDatabase) _ -> Prelude.fail (Prelude.unwords ["unrecognized exception, type:", Prelude.show _type, "field id:", Prelude.show _id]) Thrift.FieldEnd -> Prelude.fail "no response" | Prelude.otherwise -> Prelude.fail "reply function does not match" 3 -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser Thrift.ApplicationException) 4 -> Prelude.fail "enqueueBatch: expected reply but got oneway function call" _ -> Prelude.fail "enqueueBatch: invalid message type" Thrift.parseMsgEnd _proxy Prelude.return _result finishBatch :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Handle -> Thrift.ThriftM p c s FinishResponse finishBatch __field__handle = do Thrift.ThriftEnv _proxy _channel _opts _counter <- Reader.ask Trans.lift (finishBatchIO _proxy _channel _counter _opts __field__handle) finishBatchIO :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Proxy.Proxy p -> c s -> Thrift.Counter -> Thrift.RpcOptions -> Handle -> Prelude.IO FinishResponse finishBatchIO _proxy _channel _counter _opts __field__handle = do (_handle, _sendCob, _recvCob) <- Thrift.mkCallbacks (recv_finishBatch _proxy) send_finishBatch _proxy _channel _counter _sendCob _recvCob _opts __field__handle Thrift.wait _handle send_finishBatch :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Proxy.Proxy p -> c s -> Thrift.Counter -> Thrift.SendCallback -> Thrift.RecvCallback -> Thrift.RpcOptions -> Handle -> Prelude.IO () send_finishBatch _proxy _channel _counter _sendCob _recvCob _rpcOpts __field__handle = do _seqNum <- _counter let _callMsg = LBS.toStrict (ByteString.toLazyByteString (_build_finishBatch _proxy _seqNum __field__handle)) Thrift.sendRequest _channel (Thrift.Request _callMsg (Thrift.setRpcPriority _rpcOpts Thrift.NormalPriority)) _sendCob _recvCob recv_finishBatch :: (Thrift.Protocol p) => Proxy.Proxy p -> Thrift.Response -> Prelude.Either Exception.SomeException FinishResponse recv_finishBatch _proxy (Thrift.Response _response _) = Monad.join (Arrow.left (Exception.SomeException . Thrift.ProtocolException) (Parser.parse (_parse_finishBatch _proxy) _response)) _build_finishBatch :: Thrift.Protocol p => Proxy.Proxy p -> Int.Int32 -> Handle -> ByteString.Builder _build_finishBatch _proxy _seqNum __field__handle = Thrift.genMsgBegin _proxy "finishBatch" 1 _seqNum <> Thrift.genStruct _proxy (Thrift.genField _proxy "handle" (Thrift.getStringType _proxy) 1 0 (Thrift.genText _proxy __field__handle) : []) <> Thrift.genMsgEnd _proxy _parse_finishBatch :: Thrift.Protocol p => Proxy.Proxy p -> Parser.Parser (Prelude.Either Exception.SomeException FinishResponse) _parse_finishBatch _proxy = do Thrift.MsgBegin _name _msgTy _ <- Thrift.parseMsgBegin _proxy _result <- case _msgTy of 1 -> Prelude.fail "finishBatch: expected reply but got function call" 2 | _name == "finishBatch" -> do let _idMap = HashMap.fromList [("finishBatch_success", 0), ("e", 1)] _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap case _fieldBegin of Thrift.FieldBegin _type _id _bool -> do case _id of 0 | _type == Thrift.getStructType _proxy -> Prelude.fmap Prelude.Right (Thrift.parseStruct _proxy) 1 | _type == Thrift.getStructType _proxy -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser UnknownBatchHandle) _ -> Prelude.fail (Prelude.unwords ["unrecognized exception, type:", Prelude.show _type, "field id:", Prelude.show _id]) Thrift.FieldEnd -> Prelude.fail "no response" | Prelude.otherwise -> Prelude.fail "reply function does not match" 3 -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser Thrift.ApplicationException) 4 -> Prelude.fail "finishBatch: expected reply but got oneway function call" _ -> Prelude.fail "finishBatch: invalid message type" Thrift.parseMsgEnd _proxy Prelude.return _result sendJsonBatch :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Repo -> SendJsonBatch -> Thrift.ThriftM p c s SendJsonBatchResponse sendJsonBatch __field__repo __field__s = do Thrift.ThriftEnv _proxy _channel _opts _counter <- Reader.ask Trans.lift (sendJsonBatchIO _proxy _channel _counter _opts __field__repo __field__s) sendJsonBatchIO :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Proxy.Proxy p -> c s -> Thrift.Counter -> Thrift.RpcOptions -> Repo -> SendJsonBatch -> Prelude.IO SendJsonBatchResponse sendJsonBatchIO _proxy _channel _counter _opts __field__repo __field__s = do (_handle, _sendCob, _recvCob) <- Thrift.mkCallbacks (recv_sendJsonBatch _proxy) send_sendJsonBatch _proxy _channel _counter _sendCob _recvCob _opts __field__repo __field__s Thrift.wait _handle send_sendJsonBatch :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Proxy.Proxy p -> c s -> Thrift.Counter -> Thrift.SendCallback -> Thrift.RecvCallback -> Thrift.RpcOptions -> Repo -> SendJsonBatch -> Prelude.IO () send_sendJsonBatch _proxy _channel _counter _sendCob _recvCob _rpcOpts __field__repo __field__s = do _seqNum <- _counter let _callMsg = LBS.toStrict (ByteString.toLazyByteString (_build_sendJsonBatch _proxy _seqNum __field__repo __field__s)) Thrift.sendRequest _channel (Thrift.Request _callMsg (Thrift.setRpcPriority _rpcOpts Thrift.NormalPriority)) _sendCob _recvCob recv_sendJsonBatch :: (Thrift.Protocol p) => Proxy.Proxy p -> Thrift.Response -> Prelude.Either Exception.SomeException SendJsonBatchResponse recv_sendJsonBatch _proxy (Thrift.Response _response _) = Monad.join (Arrow.left (Exception.SomeException . Thrift.ProtocolException) (Parser.parse (_parse_sendJsonBatch _proxy) _response)) _build_sendJsonBatch :: Thrift.Protocol p => Proxy.Proxy p -> Int.Int32 -> Repo -> SendJsonBatch -> ByteString.Builder _build_sendJsonBatch _proxy _seqNum __field__repo __field__s = Thrift.genMsgBegin _proxy "sendJsonBatch" 1 _seqNum <> Thrift.genStruct _proxy (Thrift.genField _proxy "repo" (Thrift.getStructType _proxy) 1 0 (Thrift.buildStruct _proxy __field__repo) : Thrift.genField _proxy "s" (Thrift.getStructType _proxy) 2 1 (Thrift.buildStruct _proxy __field__s) : []) <> Thrift.genMsgEnd _proxy _parse_sendJsonBatch :: Thrift.Protocol p => Proxy.Proxy p -> Parser.Parser (Prelude.Either Exception.SomeException SendJsonBatchResponse) _parse_sendJsonBatch _proxy = do Thrift.MsgBegin _name _msgTy _ <- Thrift.parseMsgBegin _proxy _result <- case _msgTy of 1 -> Prelude.fail "sendJsonBatch: expected reply but got function call" 2 | _name == "sendJsonBatch" -> do let _idMap = HashMap.fromList [("sendJsonBatch_success", 0), ("e", 1), ("r", 2), ("u", 3)] _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap case _fieldBegin of Thrift.FieldBegin _type _id _bool -> do case _id of 0 | _type == Thrift.getStructType _proxy -> Prelude.fmap Prelude.Right (Thrift.parseStruct _proxy) 1 | _type == Thrift.getStructType _proxy -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser Exception) 2 | _type == Thrift.getStructType _proxy -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser Retry) 3 | _type == Thrift.getStructType _proxy -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser UnknownDatabase) _ -> Prelude.fail (Prelude.unwords ["unrecognized exception, type:", Prelude.show _type, "field id:", Prelude.show _id]) Thrift.FieldEnd -> Prelude.fail "no response" | Prelude.otherwise -> Prelude.fail "reply function does not match" 3 -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser Thrift.ApplicationException) 4 -> Prelude.fail "sendJsonBatch: expected reply but got oneway function call" _ -> Prelude.fail "sendJsonBatch: invalid message type" Thrift.parseMsgEnd _proxy Prelude.return _result kickOff :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => KickOff -> Thrift.ThriftM p c s KickOffResponse kickOff __field__request = do Thrift.ThriftEnv _proxy _channel _opts _counter <- Reader.ask Trans.lift (kickOffIO _proxy _channel _counter _opts __field__request) kickOffIO :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Proxy.Proxy p -> c s -> Thrift.Counter -> Thrift.RpcOptions -> KickOff -> Prelude.IO KickOffResponse kickOffIO _proxy _channel _counter _opts __field__request = do (_handle, _sendCob, _recvCob) <- Thrift.mkCallbacks (recv_kickOff _proxy) send_kickOff _proxy _channel _counter _sendCob _recvCob _opts __field__request Thrift.wait _handle send_kickOff :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Proxy.Proxy p -> c s -> Thrift.Counter -> Thrift.SendCallback -> Thrift.RecvCallback -> Thrift.RpcOptions -> KickOff -> Prelude.IO () send_kickOff _proxy _channel _counter _sendCob _recvCob _rpcOpts __field__request = do _seqNum <- _counter let _callMsg = LBS.toStrict (ByteString.toLazyByteString (_build_kickOff _proxy _seqNum __field__request)) Thrift.sendRequest _channel (Thrift.Request _callMsg (Thrift.setRpcPriority _rpcOpts Thrift.NormalPriority)) _sendCob _recvCob recv_kickOff :: (Thrift.Protocol p) => Proxy.Proxy p -> Thrift.Response -> Prelude.Either Exception.SomeException KickOffResponse recv_kickOff _proxy (Thrift.Response _response _) = Monad.join (Arrow.left (Exception.SomeException . Thrift.ProtocolException) (Parser.parse (_parse_kickOff _proxy) _response)) _build_kickOff :: Thrift.Protocol p => Proxy.Proxy p -> Int.Int32 -> KickOff -> ByteString.Builder _build_kickOff _proxy _seqNum __field__request = Thrift.genMsgBegin _proxy "kickOff" 1 _seqNum <> Thrift.genStruct _proxy (Thrift.genField _proxy "request" (Thrift.getStructType _proxy) 1 0 (Thrift.buildStruct _proxy __field__request) : []) <> Thrift.genMsgEnd _proxy _parse_kickOff :: Thrift.Protocol p => Proxy.Proxy p -> Parser.Parser (Prelude.Either Exception.SomeException KickOffResponse) _parse_kickOff _proxy = do Thrift.MsgBegin _name _msgTy _ <- Thrift.parseMsgBegin _proxy _result <- case _msgTy of 1 -> Prelude.fail "kickOff: expected reply but got function call" 2 | _name == "kickOff" -> do let _idMap = HashMap.fromList [("kickOff_success", 0), ("u", 1), ("e", 2)] _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap case _fieldBegin of Thrift.FieldBegin _type _id _bool -> do case _id of 0 | _type == Thrift.getStructType _proxy -> Prelude.fmap Prelude.Right (Thrift.parseStruct _proxy) 1 | _type == Thrift.getStructType _proxy -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser UnknownDatabase) 2 | _type == Thrift.getStructType _proxy -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser InvalidDependency) _ -> Prelude.fail (Prelude.unwords ["unrecognized exception, type:", Prelude.show _type, "field id:", Prelude.show _id]) Thrift.FieldEnd -> Prelude.fail "no response" | Prelude.otherwise -> Prelude.fail "reply function does not match" 3 -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser Thrift.ApplicationException) 4 -> Prelude.fail "kickOff: expected reply but got oneway function call" _ -> Prelude.fail "kickOff: invalid message type" Thrift.parseMsgEnd _proxy Prelude.return _result updateProperties :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Repo -> DatabaseProperties -> [Text.Text] -> Thrift.ThriftM p c s UpdatePropertiesResponse updateProperties __field__repo __field__set_ __field__unset = do Thrift.ThriftEnv _proxy _channel _opts _counter <- Reader.ask Trans.lift (updatePropertiesIO _proxy _channel _counter _opts __field__repo __field__set_ __field__unset) updatePropertiesIO :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Proxy.Proxy p -> c s -> Thrift.Counter -> Thrift.RpcOptions -> Repo -> DatabaseProperties -> [Text.Text] -> Prelude.IO UpdatePropertiesResponse updatePropertiesIO _proxy _channel _counter _opts __field__repo __field__set_ __field__unset = do (_handle, _sendCob, _recvCob) <- Thrift.mkCallbacks (recv_updateProperties _proxy) send_updateProperties _proxy _channel _counter _sendCob _recvCob _opts __field__repo __field__set_ __field__unset Thrift.wait _handle send_updateProperties :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Proxy.Proxy p -> c s -> Thrift.Counter -> Thrift.SendCallback -> Thrift.RecvCallback -> Thrift.RpcOptions -> Repo -> DatabaseProperties -> [Text.Text] -> Prelude.IO () send_updateProperties _proxy _channel _counter _sendCob _recvCob _rpcOpts __field__repo __field__set_ __field__unset = do _seqNum <- _counter let _callMsg = LBS.toStrict (ByteString.toLazyByteString (_build_updateProperties _proxy _seqNum __field__repo __field__set_ __field__unset)) Thrift.sendRequest _channel (Thrift.Request _callMsg (Thrift.setRpcPriority _rpcOpts Thrift.NormalPriority)) _sendCob _recvCob recv_updateProperties :: (Thrift.Protocol p) => Proxy.Proxy p -> Thrift.Response -> Prelude.Either Exception.SomeException UpdatePropertiesResponse recv_updateProperties _proxy (Thrift.Response _response _) = Monad.join (Arrow.left (Exception.SomeException . Thrift.ProtocolException) (Parser.parse (_parse_updateProperties _proxy) _response)) _build_updateProperties :: Thrift.Protocol p => Proxy.Proxy p -> Int.Int32 -> Repo -> DatabaseProperties -> [Text.Text] -> ByteString.Builder _build_updateProperties _proxy _seqNum __field__repo __field__set_ __field__unset = Thrift.genMsgBegin _proxy "updateProperties" 1 _seqNum <> Thrift.genStruct _proxy (Thrift.genField _proxy "repo" (Thrift.getStructType _proxy) 1 0 (Thrift.buildStruct _proxy __field__repo) : Thrift.genField _proxy "set_" (Thrift.getMapType _proxy) 2 1 ((Thrift.genMap _proxy (Thrift.getStringType _proxy) (Thrift.getStringType _proxy) Prelude.True (Thrift.genText _proxy) (Thrift.genText _proxy) . HashMap.toList) __field__set_) : Thrift.genField _proxy "unset" (Thrift.getListType _proxy) 3 2 (Thrift.genList _proxy (Thrift.getStringType _proxy) (Thrift.genText _proxy) __field__unset) : []) <> Thrift.genMsgEnd _proxy _parse_updateProperties :: Thrift.Protocol p => Proxy.Proxy p -> Parser.Parser (Prelude.Either Exception.SomeException UpdatePropertiesResponse) _parse_updateProperties _proxy = do Thrift.MsgBegin _name _msgTy _ <- Thrift.parseMsgBegin _proxy _result <- case _msgTy of 1 -> Prelude.fail "updateProperties: expected reply but got function call" 2 | _name == "updateProperties" -> do let _idMap = HashMap.fromList [("updateProperties_success", 0), ("e", 1), ("u", 2)] _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap case _fieldBegin of Thrift.FieldBegin _type _id _bool -> do case _id of 0 | _type == Thrift.getStructType _proxy -> Prelude.fmap Prelude.Right (Thrift.parseStruct _proxy) 1 | _type == Thrift.getStructType _proxy -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser Exception) 2 | _type == Thrift.getStructType _proxy -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser UnknownDatabase) _ -> Prelude.fail (Prelude.unwords ["unrecognized exception, type:", Prelude.show _type, "field id:", Prelude.show _id]) Thrift.FieldEnd -> Prelude.fail "no response" | Prelude.otherwise -> Prelude.fail "reply function does not match" 3 -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser Thrift.ApplicationException) 4 -> Prelude.fail "updateProperties: expected reply but got oneway function call" _ -> Prelude.fail "updateProperties: invalid message type" Thrift.parseMsgEnd _proxy Prelude.return _result completePredicates :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Repo -> CompletePredicates -> Thrift.ThriftM p c s CompletePredicatesResponse completePredicates __field__repo __field__predicates = do Thrift.ThriftEnv _proxy _channel _opts _counter <- Reader.ask Trans.lift (completePredicatesIO _proxy _channel _counter _opts __field__repo __field__predicates) completePredicatesIO :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Proxy.Proxy p -> c s -> Thrift.Counter -> Thrift.RpcOptions -> Repo -> CompletePredicates -> Prelude.IO CompletePredicatesResponse completePredicatesIO _proxy _channel _counter _opts __field__repo __field__predicates = do (_handle, _sendCob, _recvCob) <- Thrift.mkCallbacks (recv_completePredicates _proxy) send_completePredicates _proxy _channel _counter _sendCob _recvCob _opts __field__repo __field__predicates Thrift.wait _handle send_completePredicates :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Proxy.Proxy p -> c s -> Thrift.Counter -> Thrift.SendCallback -> Thrift.RecvCallback -> Thrift.RpcOptions -> Repo -> CompletePredicates -> Prelude.IO () send_completePredicates _proxy _channel _counter _sendCob _recvCob _rpcOpts __field__repo __field__predicates = do _seqNum <- _counter let _callMsg = LBS.toStrict (ByteString.toLazyByteString (_build_completePredicates _proxy _seqNum __field__repo __field__predicates)) Thrift.sendRequest _channel (Thrift.Request _callMsg (Thrift.setRpcPriority _rpcOpts Thrift.NormalPriority)) _sendCob _recvCob recv_completePredicates :: (Thrift.Protocol p) => Proxy.Proxy p -> Thrift.Response -> Prelude.Either Exception.SomeException CompletePredicatesResponse recv_completePredicates _proxy (Thrift.Response _response _) = Monad.join (Arrow.left (Exception.SomeException . Thrift.ProtocolException) (Parser.parse (_parse_completePredicates _proxy) _response)) _build_completePredicates :: Thrift.Protocol p => Proxy.Proxy p -> Int.Int32 -> Repo -> CompletePredicates -> ByteString.Builder _build_completePredicates _proxy _seqNum __field__repo __field__predicates = Thrift.genMsgBegin _proxy "completePredicates" 1 _seqNum <> Thrift.genStruct _proxy (Thrift.genField _proxy "repo" (Thrift.getStructType _proxy) 1 0 (Thrift.buildStruct _proxy __field__repo) : Thrift.genField _proxy "predicates" (Thrift.getStructType _proxy) 2 1 (Thrift.buildStruct _proxy __field__predicates) : []) <> Thrift.genMsgEnd _proxy _parse_completePredicates :: Thrift.Protocol p => Proxy.Proxy p -> Parser.Parser (Prelude.Either Exception.SomeException CompletePredicatesResponse) _parse_completePredicates _proxy = do Thrift.MsgBegin _name _msgTy _ <- Thrift.parseMsgBegin _proxy _result <- case _msgTy of 1 -> Prelude.fail "completePredicates: expected reply but got function call" 2 | _name == "completePredicates" -> do let _idMap = HashMap.fromList [("completePredicates_success", 0), ("e", 1), ("r", 3), ("u", 4)] _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap case _fieldBegin of Thrift.FieldBegin _type _id _bool -> do case _id of 0 | _type == Thrift.getStructType _proxy -> Prelude.fmap Prelude.Right (Thrift.parseStruct _proxy) 1 | _type == Thrift.getStructType _proxy -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser Exception) 3 | _type == Thrift.getStructType _proxy -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser Retry) 4 | _type == Thrift.getStructType _proxy -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser UnknownDatabase) _ -> Prelude.fail (Prelude.unwords ["unrecognized exception, type:", Prelude.show _type, "field id:", Prelude.show _id]) Thrift.FieldEnd -> Prelude.fail "no response" | Prelude.otherwise -> Prelude.fail "reply function does not match" 3 -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser Thrift.ApplicationException) 4 -> Prelude.fail "completePredicates: expected reply but got oneway function call" _ -> Prelude.fail "completePredicates: invalid message type" Thrift.parseMsgEnd _proxy Prelude.return _result finish :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Repo -> Thrift.ThriftM p c s FinishDatabaseResponse finish __field__repo = do Thrift.ThriftEnv _proxy _channel _opts _counter <- Reader.ask Trans.lift (finishIO _proxy _channel _counter _opts __field__repo) finishIO :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Proxy.Proxy p -> c s -> Thrift.Counter -> Thrift.RpcOptions -> Repo -> Prelude.IO FinishDatabaseResponse finishIO _proxy _channel _counter _opts __field__repo = do (_handle, _sendCob, _recvCob) <- Thrift.mkCallbacks (recv_finish _proxy) send_finish _proxy _channel _counter _sendCob _recvCob _opts __field__repo Thrift.wait _handle send_finish :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Proxy.Proxy p -> c s -> Thrift.Counter -> Thrift.SendCallback -> Thrift.RecvCallback -> Thrift.RpcOptions -> Repo -> Prelude.IO () send_finish _proxy _channel _counter _sendCob _recvCob _rpcOpts __field__repo = do _seqNum <- _counter let _callMsg = LBS.toStrict (ByteString.toLazyByteString (_build_finish _proxy _seqNum __field__repo)) Thrift.sendRequest _channel (Thrift.Request _callMsg (Thrift.setRpcPriority _rpcOpts Thrift.NormalPriority)) _sendCob _recvCob recv_finish :: (Thrift.Protocol p) => Proxy.Proxy p -> Thrift.Response -> Prelude.Either Exception.SomeException FinishDatabaseResponse recv_finish _proxy (Thrift.Response _response _) = Monad.join (Arrow.left (Exception.SomeException . Thrift.ProtocolException) (Parser.parse (_parse_finish _proxy) _response)) _build_finish :: Thrift.Protocol p => Proxy.Proxy p -> Int.Int32 -> Repo -> ByteString.Builder _build_finish _proxy _seqNum __field__repo = Thrift.genMsgBegin _proxy "finish" 1 _seqNum <> Thrift.genStruct _proxy (Thrift.genField _proxy "repo" (Thrift.getStructType _proxy) 1 0 (Thrift.buildStruct _proxy __field__repo) : []) <> Thrift.genMsgEnd _proxy _parse_finish :: Thrift.Protocol p => Proxy.Proxy p -> Parser.Parser (Prelude.Either Exception.SomeException FinishDatabaseResponse) _parse_finish _proxy = do Thrift.MsgBegin _name _msgTy _ <- Thrift.parseMsgBegin _proxy _result <- case _msgTy of 1 -> Prelude.fail "finish: expected reply but got function call" 2 | _name == "finish" -> do let _idMap = HashMap.fromList [("finish_success", 0), ("e", 1), ("c", 2), ("u", 3)] _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap case _fieldBegin of Thrift.FieldBegin _type _id _bool -> do case _id of 0 | _type == Thrift.getStructType _proxy -> Prelude.fmap Prelude.Right (Thrift.parseStruct _proxy) 1 | _type == Thrift.getStructType _proxy -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser Exception) 2 | _type == Thrift.getStructType _proxy -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser DatabaseNotIncomplete) 3 | _type == Thrift.getStructType _proxy -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser UnknownDatabase) _ -> Prelude.fail (Prelude.unwords ["unrecognized exception, type:", Prelude.show _type, "field id:", Prelude.show _id]) Thrift.FieldEnd -> Prelude.fail "no response" | Prelude.otherwise -> Prelude.fail "reply function does not match" 3 -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser Thrift.ApplicationException) 4 -> Prelude.fail "finish: expected reply but got oneway function call" _ -> Prelude.fail "finish: invalid message type" Thrift.parseMsgEnd _proxy Prelude.return _result finalize :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Repo -> Thrift.ThriftM p c s FinalizeResponse finalize __field__repo = do Thrift.ThriftEnv _proxy _channel _opts _counter <- Reader.ask Trans.lift (finalizeIO _proxy _channel _counter _opts __field__repo) finalizeIO :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Proxy.Proxy p -> c s -> Thrift.Counter -> Thrift.RpcOptions -> Repo -> Prelude.IO FinalizeResponse finalizeIO _proxy _channel _counter _opts __field__repo = do (_handle, _sendCob, _recvCob) <- Thrift.mkCallbacks (recv_finalize _proxy) send_finalize _proxy _channel _counter _sendCob _recvCob _opts __field__repo Thrift.wait _handle send_finalize :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Proxy.Proxy p -> c s -> Thrift.Counter -> Thrift.SendCallback -> Thrift.RecvCallback -> Thrift.RpcOptions -> Repo -> Prelude.IO () send_finalize _proxy _channel _counter _sendCob _recvCob _rpcOpts __field__repo = do _seqNum <- _counter let _callMsg = LBS.toStrict (ByteString.toLazyByteString (_build_finalize _proxy _seqNum __field__repo)) Thrift.sendRequest _channel (Thrift.Request _callMsg (Thrift.setRpcPriority _rpcOpts Thrift.NormalPriority)) _sendCob _recvCob recv_finalize :: (Thrift.Protocol p) => Proxy.Proxy p -> Thrift.Response -> Prelude.Either Exception.SomeException FinalizeResponse recv_finalize _proxy (Thrift.Response _response _) = Monad.join (Arrow.left (Exception.SomeException . Thrift.ProtocolException) (Parser.parse (_parse_finalize _proxy) _response)) _build_finalize :: Thrift.Protocol p => Proxy.Proxy p -> Int.Int32 -> Repo -> ByteString.Builder _build_finalize _proxy _seqNum __field__repo = Thrift.genMsgBegin _proxy "finalize" 1 _seqNum <> Thrift.genStruct _proxy (Thrift.genField _proxy "repo" (Thrift.getStructType _proxy) 1 0 (Thrift.buildStruct _proxy __field__repo) : []) <> Thrift.genMsgEnd _proxy _parse_finalize :: Thrift.Protocol p => Proxy.Proxy p -> Parser.Parser (Prelude.Either Exception.SomeException FinalizeResponse) _parse_finalize _proxy = do Thrift.MsgBegin _name _msgTy _ <- Thrift.parseMsgBegin _proxy _result <- case _msgTy of 1 -> Prelude.fail "finalize: expected reply but got function call" 2 | _name == "finalize" -> do let _idMap = HashMap.fromList [("finalize_success", 0), ("e", 1), ("r", 3), ("u", 4)] _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap case _fieldBegin of Thrift.FieldBegin _type _id _bool -> do case _id of 0 | _type == Thrift.getStructType _proxy -> Prelude.fmap Prelude.Right (Thrift.parseStruct _proxy) 1 | _type == Thrift.getStructType _proxy -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser Exception) 3 | _type == Thrift.getStructType _proxy -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser Retry) 4 | _type == Thrift.getStructType _proxy -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser UnknownDatabase) _ -> Prelude.fail (Prelude.unwords ["unrecognized exception, type:", Prelude.show _type, "field id:", Prelude.show _id]) Thrift.FieldEnd -> Prelude.fail "no response" | Prelude.otherwise -> Prelude.fail "reply function does not match" 3 -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser Thrift.ApplicationException) 4 -> Prelude.fail "finalize: expected reply but got oneway function call" _ -> Prelude.fail "finalize: invalid message type" Thrift.parseMsgEnd _proxy Prelude.return _result queryFact :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Repo -> Id -> Thrift.ThriftM p c s Fact queryFact __field__repo __field__id = do Thrift.ThriftEnv _proxy _channel _opts _counter <- Reader.ask Trans.lift (queryFactIO _proxy _channel _counter _opts __field__repo __field__id) queryFactIO :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Proxy.Proxy p -> c s -> Thrift.Counter -> Thrift.RpcOptions -> Repo -> Id -> Prelude.IO Fact queryFactIO _proxy _channel _counter _opts __field__repo __field__id = do (_handle, _sendCob, _recvCob) <- Thrift.mkCallbacks (recv_queryFact _proxy) send_queryFact _proxy _channel _counter _sendCob _recvCob _opts __field__repo __field__id Thrift.wait _handle send_queryFact :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Proxy.Proxy p -> c s -> Thrift.Counter -> Thrift.SendCallback -> Thrift.RecvCallback -> Thrift.RpcOptions -> Repo -> Id -> Prelude.IO () send_queryFact _proxy _channel _counter _sendCob _recvCob _rpcOpts __field__repo __field__id = do _seqNum <- _counter let _callMsg = LBS.toStrict (ByteString.toLazyByteString (_build_queryFact _proxy _seqNum __field__repo __field__id)) Thrift.sendRequest _channel (Thrift.Request _callMsg (Thrift.setRpcPriority _rpcOpts Thrift.NormalPriority)) _sendCob _recvCob recv_queryFact :: (Thrift.Protocol p) => Proxy.Proxy p -> Thrift.Response -> Prelude.Either Exception.SomeException Fact recv_queryFact _proxy (Thrift.Response _response _) = Monad.join (Arrow.left (Exception.SomeException . Thrift.ProtocolException) (Parser.parse (_parse_queryFact _proxy) _response)) _build_queryFact :: Thrift.Protocol p => Proxy.Proxy p -> Int.Int32 -> Repo -> Id -> ByteString.Builder _build_queryFact _proxy _seqNum __field__repo __field__id = Thrift.genMsgBegin _proxy "queryFact" 1 _seqNum <> Thrift.genStruct _proxy (Thrift.genField _proxy "repo" (Thrift.getStructType _proxy) 1 0 (Thrift.buildStruct _proxy __field__repo) : Thrift.genField _proxy "id" (Thrift.getI64Type _proxy) 2 1 (Thrift.genI64 _proxy __field__id) : []) <> Thrift.genMsgEnd _proxy _parse_queryFact :: Thrift.Protocol p => Proxy.Proxy p -> Parser.Parser (Prelude.Either Exception.SomeException Fact) _parse_queryFact _proxy = do Thrift.MsgBegin _name _msgTy _ <- Thrift.parseMsgBegin _proxy _result <- case _msgTy of 1 -> Prelude.fail "queryFact: expected reply but got function call" 2 | _name == "queryFact" -> do let _idMap = HashMap.fromList [("queryFact_success", 0), ("u", 1)] _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap case _fieldBegin of Thrift.FieldBegin _type _id _bool -> do case _id of 0 | _type == Thrift.getStructType _proxy -> Prelude.fmap Prelude.Right (Thrift.parseStruct _proxy) 1 | _type == Thrift.getStructType _proxy -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser UnknownDatabase) _ -> Prelude.fail (Prelude.unwords ["unrecognized exception, type:", Prelude.show _type, "field id:", Prelude.show _id]) Thrift.FieldEnd -> Prelude.fail "no response" | Prelude.otherwise -> Prelude.fail "reply function does not match" 3 -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser Thrift.ApplicationException) 4 -> Prelude.fail "queryFact: expected reply but got oneway function call" _ -> Prelude.fail "queryFact: invalid message type" Thrift.parseMsgEnd _proxy Prelude.return _result factIdRange :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Repo -> Thrift.ThriftM p c s FactIdRange factIdRange __field__repo = do Thrift.ThriftEnv _proxy _channel _opts _counter <- Reader.ask Trans.lift (factIdRangeIO _proxy _channel _counter _opts __field__repo) factIdRangeIO :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Proxy.Proxy p -> c s -> Thrift.Counter -> Thrift.RpcOptions -> Repo -> Prelude.IO FactIdRange factIdRangeIO _proxy _channel _counter _opts __field__repo = do (_handle, _sendCob, _recvCob) <- Thrift.mkCallbacks (recv_factIdRange _proxy) send_factIdRange _proxy _channel _counter _sendCob _recvCob _opts __field__repo Thrift.wait _handle send_factIdRange :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Proxy.Proxy p -> c s -> Thrift.Counter -> Thrift.SendCallback -> Thrift.RecvCallback -> Thrift.RpcOptions -> Repo -> Prelude.IO () send_factIdRange _proxy _channel _counter _sendCob _recvCob _rpcOpts __field__repo = do _seqNum <- _counter let _callMsg = LBS.toStrict (ByteString.toLazyByteString (_build_factIdRange _proxy _seqNum __field__repo)) Thrift.sendRequest _channel (Thrift.Request _callMsg (Thrift.setRpcPriority _rpcOpts Thrift.NormalPriority)) _sendCob _recvCob recv_factIdRange :: (Thrift.Protocol p) => Proxy.Proxy p -> Thrift.Response -> Prelude.Either Exception.SomeException FactIdRange recv_factIdRange _proxy (Thrift.Response _response _) = Monad.join (Arrow.left (Exception.SomeException . Thrift.ProtocolException) (Parser.parse (_parse_factIdRange _proxy) _response)) _build_factIdRange :: Thrift.Protocol p => Proxy.Proxy p -> Int.Int32 -> Repo -> ByteString.Builder _build_factIdRange _proxy _seqNum __field__repo = Thrift.genMsgBegin _proxy "factIdRange" 1 _seqNum <> Thrift.genStruct _proxy (Thrift.genField _proxy "repo" (Thrift.getStructType _proxy) 1 0 (Thrift.buildStruct _proxy __field__repo) : []) <> Thrift.genMsgEnd _proxy _parse_factIdRange :: Thrift.Protocol p => Proxy.Proxy p -> Parser.Parser (Prelude.Either Exception.SomeException FactIdRange) _parse_factIdRange _proxy = do Thrift.MsgBegin _name _msgTy _ <- Thrift.parseMsgBegin _proxy _result <- case _msgTy of 1 -> Prelude.fail "factIdRange: expected reply but got function call" 2 | _name == "factIdRange" -> do let _idMap = HashMap.fromList [("factIdRange_success", 0), ("e", 1), ("u", 2)] _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap case _fieldBegin of Thrift.FieldBegin _type _id _bool -> do case _id of 0 | _type == Thrift.getStructType _proxy -> Prelude.fmap Prelude.Right (Thrift.parseStruct _proxy) 1 | _type == Thrift.getStructType _proxy -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser Exception) 2 | _type == Thrift.getStructType _proxy -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser UnknownDatabase) _ -> Prelude.fail (Prelude.unwords ["unrecognized exception, type:", Prelude.show _type, "field id:", Prelude.show _id]) Thrift.FieldEnd -> Prelude.fail "no response" | Prelude.otherwise -> Prelude.fail "reply function does not match" 3 -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser Thrift.ApplicationException) 4 -> Prelude.fail "factIdRange: expected reply but got oneway function call" _ -> Prelude.fail "factIdRange: invalid message type" Thrift.parseMsgEnd _proxy Prelude.return _result predicateStats :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Repo -> PredicateStatsOpts -> Thrift.ThriftM p c s (Map.Map Id PredicateStats) predicateStats __field__repo __field__opts = do Thrift.ThriftEnv _proxy _channel _opts _counter <- Reader.ask Trans.lift (predicateStatsIO _proxy _channel _counter _opts __field__repo __field__opts) predicateStatsIO :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Proxy.Proxy p -> c s -> Thrift.Counter -> Thrift.RpcOptions -> Repo -> PredicateStatsOpts -> Prelude.IO (Map.Map Id PredicateStats) predicateStatsIO _proxy _channel _counter _opts __field__repo __field__opts = do (_handle, _sendCob, _recvCob) <- Thrift.mkCallbacks (recv_predicateStats _proxy) send_predicateStats _proxy _channel _counter _sendCob _recvCob _opts __field__repo __field__opts Thrift.wait _handle send_predicateStats :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Proxy.Proxy p -> c s -> Thrift.Counter -> Thrift.SendCallback -> Thrift.RecvCallback -> Thrift.RpcOptions -> Repo -> PredicateStatsOpts -> Prelude.IO () send_predicateStats _proxy _channel _counter _sendCob _recvCob _rpcOpts __field__repo __field__opts = do _seqNum <- _counter let _callMsg = LBS.toStrict (ByteString.toLazyByteString (_build_predicateStats _proxy _seqNum __field__repo __field__opts)) Thrift.sendRequest _channel (Thrift.Request _callMsg (Thrift.setRpcPriority _rpcOpts Thrift.NormalPriority)) _sendCob _recvCob recv_predicateStats :: (Thrift.Protocol p) => Proxy.Proxy p -> Thrift.Response -> Prelude.Either Exception.SomeException (Map.Map Id PredicateStats) recv_predicateStats _proxy (Thrift.Response _response _) = Monad.join (Arrow.left (Exception.SomeException . Thrift.ProtocolException) (Parser.parse (_parse_predicateStats _proxy) _response)) _build_predicateStats :: Thrift.Protocol p => Proxy.Proxy p -> Int.Int32 -> Repo -> PredicateStatsOpts -> ByteString.Builder _build_predicateStats _proxy _seqNum __field__repo __field__opts = Thrift.genMsgBegin _proxy "predicateStats" 1 _seqNum <> Thrift.genStruct _proxy (Thrift.genField _proxy "repo" (Thrift.getStructType _proxy) 1 0 (Thrift.buildStruct _proxy __field__repo) : Thrift.genField _proxy "opts" (Thrift.getStructType _proxy) 2 1 (Thrift.buildStruct _proxy __field__opts) : []) <> Thrift.genMsgEnd _proxy _parse_predicateStats :: Thrift.Protocol p => Proxy.Proxy p -> Parser.Parser (Prelude.Either Exception.SomeException (Map.Map Id PredicateStats)) _parse_predicateStats _proxy = do Thrift.MsgBegin _name _msgTy _ <- Thrift.parseMsgBegin _proxy _result <- case _msgTy of 1 -> Prelude.fail "predicateStats: expected reply but got function call" 2 | _name == "predicateStats" -> do let _idMap = HashMap.fromList [("predicateStats_success", 0), ("e", 1), ("u", 2)] _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap case _fieldBegin of Thrift.FieldBegin _type _id _bool -> do case _id of 0 | _type == Thrift.getMapType _proxy -> Prelude.fmap Prelude.Right (Map.fromList <$> Thrift.parseMap _proxy (Thrift.parseI64 _proxy) (Thrift.parseStruct _proxy) Prelude.False) 1 | _type == Thrift.getStructType _proxy -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser Exception) 2 | _type == Thrift.getStructType _proxy -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser UnknownDatabase) _ -> Prelude.fail (Prelude.unwords ["unrecognized exception, type:", Prelude.show _type, "field id:", Prelude.show _id]) Thrift.FieldEnd -> Prelude.fail "no response" | Prelude.otherwise -> Prelude.fail "reply function does not match" 3 -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser Thrift.ApplicationException) 4 -> Prelude.fail "predicateStats: expected reply but got oneway function call" _ -> Prelude.fail "predicateStats: invalid message type" Thrift.parseMsgEnd _proxy Prelude.return _result listDatabases :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => ListDatabases -> Thrift.ThriftM p c s ListDatabasesResult listDatabases __field__l = do Thrift.ThriftEnv _proxy _channel _opts _counter <- Reader.ask Trans.lift (listDatabasesIO _proxy _channel _counter _opts __field__l) listDatabasesIO :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Proxy.Proxy p -> c s -> Thrift.Counter -> Thrift.RpcOptions -> ListDatabases -> Prelude.IO ListDatabasesResult listDatabasesIO _proxy _channel _counter _opts __field__l = do (_handle, _sendCob, _recvCob) <- Thrift.mkCallbacks (recv_listDatabases _proxy) send_listDatabases _proxy _channel _counter _sendCob _recvCob _opts __field__l Thrift.wait _handle send_listDatabases :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Proxy.Proxy p -> c s -> Thrift.Counter -> Thrift.SendCallback -> Thrift.RecvCallback -> Thrift.RpcOptions -> ListDatabases -> Prelude.IO () send_listDatabases _proxy _channel _counter _sendCob _recvCob _rpcOpts __field__l = do _seqNum <- _counter let _callMsg = LBS.toStrict (ByteString.toLazyByteString (_build_listDatabases _proxy _seqNum __field__l)) Thrift.sendRequest _channel (Thrift.Request _callMsg (Thrift.setRpcPriority _rpcOpts Thrift.NormalPriority)) _sendCob _recvCob recv_listDatabases :: (Thrift.Protocol p) => Proxy.Proxy p -> Thrift.Response -> Prelude.Either Exception.SomeException ListDatabasesResult recv_listDatabases _proxy (Thrift.Response _response _) = Monad.join (Arrow.left (Exception.SomeException . Thrift.ProtocolException) (Parser.parse (_parse_listDatabases _proxy) _response)) _build_listDatabases :: Thrift.Protocol p => Proxy.Proxy p -> Int.Int32 -> ListDatabases -> ByteString.Builder _build_listDatabases _proxy _seqNum __field__l = Thrift.genMsgBegin _proxy "listDatabases" 1 _seqNum <> Thrift.genStruct _proxy (Thrift.genField _proxy "l" (Thrift.getStructType _proxy) 1 0 (Thrift.buildStruct _proxy __field__l) : []) <> Thrift.genMsgEnd _proxy _parse_listDatabases :: Thrift.Protocol p => Proxy.Proxy p -> Parser.Parser (Prelude.Either Exception.SomeException ListDatabasesResult) _parse_listDatabases _proxy = do Thrift.MsgBegin _name _msgTy _ <- Thrift.parseMsgBegin _proxy _result <- case _msgTy of 1 -> Prelude.fail "listDatabases: expected reply but got function call" 2 | _name == "listDatabases" -> do let _idMap = HashMap.fromList [("listDatabases_success", 0)] _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap case _fieldBegin of Thrift.FieldBegin _type _id _bool -> do case _id of 0 | _type == Thrift.getStructType _proxy -> Prelude.fmap Prelude.Right (Thrift.parseStruct _proxy) _ -> Prelude.fail (Prelude.unwords ["unrecognized exception, type:", Prelude.show _type, "field id:", Prelude.show _id]) Thrift.FieldEnd -> Prelude.fail "no response" | Prelude.otherwise -> Prelude.fail "reply function does not match" 3 -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser Thrift.ApplicationException) 4 -> Prelude.fail "listDatabases: expected reply but got oneway function call" _ -> Prelude.fail "listDatabases: invalid message type" Thrift.parseMsgEnd _proxy Prelude.return _result getDatabase :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Repo -> Thrift.ThriftM p c s GetDatabaseResult getDatabase __field__repo = do Thrift.ThriftEnv _proxy _channel _opts _counter <- Reader.ask Trans.lift (getDatabaseIO _proxy _channel _counter _opts __field__repo) getDatabaseIO :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Proxy.Proxy p -> c s -> Thrift.Counter -> Thrift.RpcOptions -> Repo -> Prelude.IO GetDatabaseResult getDatabaseIO _proxy _channel _counter _opts __field__repo = do (_handle, _sendCob, _recvCob) <- Thrift.mkCallbacks (recv_getDatabase _proxy) send_getDatabase _proxy _channel _counter _sendCob _recvCob _opts __field__repo Thrift.wait _handle send_getDatabase :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Proxy.Proxy p -> c s -> Thrift.Counter -> Thrift.SendCallback -> Thrift.RecvCallback -> Thrift.RpcOptions -> Repo -> Prelude.IO () send_getDatabase _proxy _channel _counter _sendCob _recvCob _rpcOpts __field__repo = do _seqNum <- _counter let _callMsg = LBS.toStrict (ByteString.toLazyByteString (_build_getDatabase _proxy _seqNum __field__repo)) Thrift.sendRequest _channel (Thrift.Request _callMsg (Thrift.setRpcPriority _rpcOpts Thrift.NormalPriority)) _sendCob _recvCob recv_getDatabase :: (Thrift.Protocol p) => Proxy.Proxy p -> Thrift.Response -> Prelude.Either Exception.SomeException GetDatabaseResult recv_getDatabase _proxy (Thrift.Response _response _) = Monad.join (Arrow.left (Exception.SomeException . Thrift.ProtocolException) (Parser.parse (_parse_getDatabase _proxy) _response)) _build_getDatabase :: Thrift.Protocol p => Proxy.Proxy p -> Int.Int32 -> Repo -> ByteString.Builder _build_getDatabase _proxy _seqNum __field__repo = Thrift.genMsgBegin _proxy "getDatabase" 1 _seqNum <> Thrift.genStruct _proxy (Thrift.genField _proxy "repo" (Thrift.getStructType _proxy) 1 0 (Thrift.buildStruct _proxy __field__repo) : []) <> Thrift.genMsgEnd _proxy _parse_getDatabase :: Thrift.Protocol p => Proxy.Proxy p -> Parser.Parser (Prelude.Either Exception.SomeException GetDatabaseResult) _parse_getDatabase _proxy = do Thrift.MsgBegin _name _msgTy _ <- Thrift.parseMsgBegin _proxy _result <- case _msgTy of 1 -> Prelude.fail "getDatabase: expected reply but got function call" 2 | _name == "getDatabase" -> do let _idMap = HashMap.fromList [("getDatabase_success", 0), ("e", 1), ("u", 2)] _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap case _fieldBegin of Thrift.FieldBegin _type _id _bool -> do case _id of 0 | _type == Thrift.getStructType _proxy -> Prelude.fmap Prelude.Right (Thrift.parseStruct _proxy) 1 | _type == Thrift.getStructType _proxy -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser Exception) 2 | _type == Thrift.getStructType _proxy -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser UnknownDatabase) _ -> Prelude.fail (Prelude.unwords ["unrecognized exception, type:", Prelude.show _type, "field id:", Prelude.show _id]) Thrift.FieldEnd -> Prelude.fail "no response" | Prelude.otherwise -> Prelude.fail "reply function does not match" 3 -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser Thrift.ApplicationException) 4 -> Prelude.fail "getDatabase: expected reply but got oneway function call" _ -> Prelude.fail "getDatabase: invalid message type" Thrift.parseMsgEnd _proxy Prelude.return _result deleteDatabase :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Repo -> Thrift.ThriftM p c s DeleteDatabaseResult deleteDatabase __field__repo = do Thrift.ThriftEnv _proxy _channel _opts _counter <- Reader.ask Trans.lift (deleteDatabaseIO _proxy _channel _counter _opts __field__repo) deleteDatabaseIO :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Proxy.Proxy p -> c s -> Thrift.Counter -> Thrift.RpcOptions -> Repo -> Prelude.IO DeleteDatabaseResult deleteDatabaseIO _proxy _channel _counter _opts __field__repo = do (_handle, _sendCob, _recvCob) <- Thrift.mkCallbacks (recv_deleteDatabase _proxy) send_deleteDatabase _proxy _channel _counter _sendCob _recvCob _opts __field__repo Thrift.wait _handle send_deleteDatabase :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Proxy.Proxy p -> c s -> Thrift.Counter -> Thrift.SendCallback -> Thrift.RecvCallback -> Thrift.RpcOptions -> Repo -> Prelude.IO () send_deleteDatabase _proxy _channel _counter _sendCob _recvCob _rpcOpts __field__repo = do _seqNum <- _counter let _callMsg = LBS.toStrict (ByteString.toLazyByteString (_build_deleteDatabase _proxy _seqNum __field__repo)) Thrift.sendRequest _channel (Thrift.Request _callMsg (Thrift.setRpcPriority _rpcOpts Thrift.NormalPriority)) _sendCob _recvCob recv_deleteDatabase :: (Thrift.Protocol p) => Proxy.Proxy p -> Thrift.Response -> Prelude.Either Exception.SomeException DeleteDatabaseResult recv_deleteDatabase _proxy (Thrift.Response _response _) = Monad.join (Arrow.left (Exception.SomeException . Thrift.ProtocolException) (Parser.parse (_parse_deleteDatabase _proxy) _response)) _build_deleteDatabase :: Thrift.Protocol p => Proxy.Proxy p -> Int.Int32 -> Repo -> ByteString.Builder _build_deleteDatabase _proxy _seqNum __field__repo = Thrift.genMsgBegin _proxy "deleteDatabase" 1 _seqNum <> Thrift.genStruct _proxy (Thrift.genField _proxy "repo" (Thrift.getStructType _proxy) 1 0 (Thrift.buildStruct _proxy __field__repo) : []) <> Thrift.genMsgEnd _proxy _parse_deleteDatabase :: Thrift.Protocol p => Proxy.Proxy p -> Parser.Parser (Prelude.Either Exception.SomeException DeleteDatabaseResult) _parse_deleteDatabase _proxy = do Thrift.MsgBegin _name _msgTy _ <- Thrift.parseMsgBegin _proxy _result <- case _msgTy of 1 -> Prelude.fail "deleteDatabase: expected reply but got function call" 2 | _name == "deleteDatabase" -> do let _idMap = HashMap.fromList [("deleteDatabase_success", 0), ("e", 1), ("u", 2)] _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap case _fieldBegin of Thrift.FieldBegin _type _id _bool -> do case _id of 0 | _type == Thrift.getStructType _proxy -> Prelude.fmap Prelude.Right (Thrift.parseStruct _proxy) 1 | _type == Thrift.getStructType _proxy -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser Exception) 2 | _type == Thrift.getStructType _proxy -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser UnknownDatabase) _ -> Prelude.fail (Prelude.unwords ["unrecognized exception, type:", Prelude.show _type, "field id:", Prelude.show _id]) Thrift.FieldEnd -> Prelude.fail "no response" | Prelude.otherwise -> Prelude.fail "reply function does not match" 3 -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser Thrift.ApplicationException) 4 -> Prelude.fail "deleteDatabase: expected reply but got oneway function call" _ -> Prelude.fail "deleteDatabase: invalid message type" Thrift.parseMsgEnd _proxy Prelude.return _result restore :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Text.Text -> Thrift.ThriftM p c s () restore __field__locator = do Thrift.ThriftEnv _proxy _channel _opts _counter <- Reader.ask Trans.lift (restoreIO _proxy _channel _counter _opts __field__locator) restoreIO :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Proxy.Proxy p -> c s -> Thrift.Counter -> Thrift.RpcOptions -> Text.Text -> Prelude.IO () restoreIO _proxy _channel _counter _opts __field__locator = do (_handle, _sendCob, _recvCob) <- Thrift.mkCallbacks (recv_restore _proxy) send_restore _proxy _channel _counter _sendCob _recvCob _opts __field__locator Thrift.wait _handle send_restore :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Proxy.Proxy p -> c s -> Thrift.Counter -> Thrift.SendCallback -> Thrift.RecvCallback -> Thrift.RpcOptions -> Text.Text -> Prelude.IO () send_restore _proxy _channel _counter _sendCob _recvCob _rpcOpts __field__locator = do _seqNum <- _counter let _callMsg = LBS.toStrict (ByteString.toLazyByteString (_build_restore _proxy _seqNum __field__locator)) Thrift.sendRequest _channel (Thrift.Request _callMsg (Thrift.setRpcPriority _rpcOpts Thrift.NormalPriority)) _sendCob _recvCob recv_restore :: (Thrift.Protocol p) => Proxy.Proxy p -> Thrift.Response -> Prelude.Either Exception.SomeException () recv_restore _proxy (Thrift.Response _response _) = Monad.join (Arrow.left (Exception.SomeException . Thrift.ProtocolException) (Parser.parse (_parse_restore _proxy) _response)) _build_restore :: Thrift.Protocol p => Proxy.Proxy p -> Int.Int32 -> Text.Text -> ByteString.Builder _build_restore _proxy _seqNum __field__locator = Thrift.genMsgBegin _proxy "restore" 1 _seqNum <> Thrift.genStruct _proxy (Thrift.genField _proxy "locator" (Thrift.getStringType _proxy) 1 0 (Thrift.genText _proxy __field__locator) : []) <> Thrift.genMsgEnd _proxy _parse_restore :: Thrift.Protocol p => Proxy.Proxy p -> Parser.Parser (Prelude.Either Exception.SomeException ()) _parse_restore _proxy = do Thrift.MsgBegin _name _msgTy _ <- Thrift.parseMsgBegin _proxy _result <- case _msgTy of 1 -> Prelude.fail "restore: expected reply but got function call" 2 | _name == "restore" -> do let _idMap = HashMap.fromList [("e", 1)] _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap case _fieldBegin of Thrift.FieldBegin _type _id _bool -> do case _id of 1 | _type == Thrift.getStructType _proxy -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser InvalidLocator) _ -> Prelude.fail (Prelude.unwords ["unrecognized exception, type:", Prelude.show _type, "field id:", Prelude.show _id]) Thrift.FieldEnd -> Prelude.return (Prelude.Right ()) | Prelude.otherwise -> Prelude.fail "reply function does not match" 3 -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser Thrift.ApplicationException) 4 -> Prelude.fail "restore: expected reply but got oneway function call" _ -> Prelude.fail "restore: invalid message type" Thrift.parseMsgEnd _proxy Prelude.return _result userQueryFacts :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Repo -> UserQueryFacts -> Thrift.ThriftM p c s UserQueryResults userQueryFacts __field__repo __field__q = do Thrift.ThriftEnv _proxy _channel _opts _counter <- Reader.ask Trans.lift (userQueryFactsIO _proxy _channel _counter _opts __field__repo __field__q) userQueryFactsIO :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Proxy.Proxy p -> c s -> Thrift.Counter -> Thrift.RpcOptions -> Repo -> UserQueryFacts -> Prelude.IO UserQueryResults userQueryFactsIO _proxy _channel _counter _opts __field__repo __field__q = do (_handle, _sendCob, _recvCob) <- Thrift.mkCallbacks (recv_userQueryFacts _proxy) send_userQueryFacts _proxy _channel _counter _sendCob _recvCob _opts __field__repo __field__q Thrift.wait _handle send_userQueryFacts :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Proxy.Proxy p -> c s -> Thrift.Counter -> Thrift.SendCallback -> Thrift.RecvCallback -> Thrift.RpcOptions -> Repo -> UserQueryFacts -> Prelude.IO () send_userQueryFacts _proxy _channel _counter _sendCob _recvCob _rpcOpts __field__repo __field__q = do _seqNum <- _counter let _callMsg = LBS.toStrict (ByteString.toLazyByteString (_build_userQueryFacts _proxy _seqNum __field__repo __field__q)) Thrift.sendRequest _channel (Thrift.Request _callMsg (Thrift.setRpcPriority _rpcOpts Thrift.NormalPriority)) _sendCob _recvCob recv_userQueryFacts :: (Thrift.Protocol p) => Proxy.Proxy p -> Thrift.Response -> Prelude.Either Exception.SomeException UserQueryResults recv_userQueryFacts _proxy (Thrift.Response _response _) = Monad.join (Arrow.left (Exception.SomeException . Thrift.ProtocolException) (Parser.parse (_parse_userQueryFacts _proxy) _response)) _build_userQueryFacts :: Thrift.Protocol p => Proxy.Proxy p -> Int.Int32 -> Repo -> UserQueryFacts -> ByteString.Builder _build_userQueryFacts _proxy _seqNum __field__repo __field__q = Thrift.genMsgBegin _proxy "userQueryFacts" 1 _seqNum <> Thrift.genStruct _proxy (Thrift.genField _proxy "repo" (Thrift.getStructType _proxy) 1 0 (Thrift.buildStruct _proxy __field__repo) : Thrift.genField _proxy "q" (Thrift.getStructType _proxy) 2 1 (Thrift.buildStruct _proxy __field__q) : []) <> Thrift.genMsgEnd _proxy _parse_userQueryFacts :: Thrift.Protocol p => Proxy.Proxy p -> Parser.Parser (Prelude.Either Exception.SomeException UserQueryResults) _parse_userQueryFacts _proxy = do Thrift.MsgBegin _name _msgTy _ <- Thrift.parseMsgBegin _proxy _result <- case _msgTy of 1 -> Prelude.fail "userQueryFacts: expected reply but got function call" 2 | _name == "userQueryFacts" -> do let _idMap = HashMap.fromList [("userQueryFacts_success", 0), ("e", 1), ("b", 3), ("u", 4), ("s", 5)] _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap case _fieldBegin of Thrift.FieldBegin _type _id _bool -> do case _id of 0 | _type == Thrift.getStructType _proxy -> Prelude.fmap Prelude.Right (Thrift.parseStruct _proxy) 1 | _type == Thrift.getStructType _proxy -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser Exception) 3 | _type == Thrift.getStructType _proxy -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser BadQuery) 4 | _type == Thrift.getStructType _proxy -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser UnknownDatabase) 5 | _type == Thrift.getStructType _proxy -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser UnknownSchemaId) _ -> Prelude.fail (Prelude.unwords ["unrecognized exception, type:", Prelude.show _type, "field id:", Prelude.show _id]) Thrift.FieldEnd -> Prelude.fail "no response" | Prelude.otherwise -> Prelude.fail "reply function does not match" 3 -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser Thrift.ApplicationException) 4 -> Prelude.fail "userQueryFacts: expected reply but got oneway function call" _ -> Prelude.fail "userQueryFacts: invalid message type" Thrift.parseMsgEnd _proxy Prelude.return _result userQuery :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Repo -> UserQuery -> Thrift.ThriftM p c s UserQueryResults userQuery __field__repo __field__q = do Thrift.ThriftEnv _proxy _channel _opts _counter <- Reader.ask Trans.lift (userQueryIO _proxy _channel _counter _opts __field__repo __field__q) userQueryIO :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Proxy.Proxy p -> c s -> Thrift.Counter -> Thrift.RpcOptions -> Repo -> UserQuery -> Prelude.IO UserQueryResults userQueryIO _proxy _channel _counter _opts __field__repo __field__q = do (_handle, _sendCob, _recvCob) <- Thrift.mkCallbacks (recv_userQuery _proxy) send_userQuery _proxy _channel _counter _sendCob _recvCob _opts __field__repo __field__q Thrift.wait _handle send_userQuery :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Proxy.Proxy p -> c s -> Thrift.Counter -> Thrift.SendCallback -> Thrift.RecvCallback -> Thrift.RpcOptions -> Repo -> UserQuery -> Prelude.IO () send_userQuery _proxy _channel _counter _sendCob _recvCob _rpcOpts __field__repo __field__q = do _seqNum <- _counter let _callMsg = LBS.toStrict (ByteString.toLazyByteString (_build_userQuery _proxy _seqNum __field__repo __field__q)) Thrift.sendRequest _channel (Thrift.Request _callMsg (Thrift.setRpcPriority _rpcOpts Thrift.NormalPriority)) _sendCob _recvCob recv_userQuery :: (Thrift.Protocol p) => Proxy.Proxy p -> Thrift.Response -> Prelude.Either Exception.SomeException UserQueryResults recv_userQuery _proxy (Thrift.Response _response _) = Monad.join (Arrow.left (Exception.SomeException . Thrift.ProtocolException) (Parser.parse (_parse_userQuery _proxy) _response)) _build_userQuery :: Thrift.Protocol p => Proxy.Proxy p -> Int.Int32 -> Repo -> UserQuery -> ByteString.Builder _build_userQuery _proxy _seqNum __field__repo __field__q = Thrift.genMsgBegin _proxy "userQuery" 1 _seqNum <> Thrift.genStruct _proxy (Thrift.genField _proxy "repo" (Thrift.getStructType _proxy) 1 0 (Thrift.buildStruct _proxy __field__repo) : Thrift.genField _proxy "q" (Thrift.getStructType _proxy) 2 1 (Thrift.buildStruct _proxy __field__q) : []) <> Thrift.genMsgEnd _proxy _parse_userQuery :: Thrift.Protocol p => Proxy.Proxy p -> Parser.Parser (Prelude.Either Exception.SomeException UserQueryResults) _parse_userQuery _proxy = do Thrift.MsgBegin _name _msgTy _ <- Thrift.parseMsgBegin _proxy _result <- case _msgTy of 1 -> Prelude.fail "userQuery: expected reply but got function call" 2 | _name == "userQuery" -> do let _idMap = HashMap.fromList [("userQuery_success", 0), ("e", 1), ("b", 3), ("r", 4), ("u", 5), ("s", 6)] _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap case _fieldBegin of Thrift.FieldBegin _type _id _bool -> do case _id of 0 | _type == Thrift.getStructType _proxy -> Prelude.fmap Prelude.Right (Thrift.parseStruct _proxy) 1 | _type == Thrift.getStructType _proxy -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser Exception) 3 | _type == Thrift.getStructType _proxy -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser BadQuery) 4 | _type == Thrift.getStructType _proxy -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser Retry) 5 | _type == Thrift.getStructType _proxy -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser UnknownDatabase) 6 | _type == Thrift.getStructType _proxy -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser UnknownSchemaId) _ -> Prelude.fail (Prelude.unwords ["unrecognized exception, type:", Prelude.show _type, "field id:", Prelude.show _id]) Thrift.FieldEnd -> Prelude.fail "no response" | Prelude.otherwise -> Prelude.fail "reply function does not match" 3 -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser Thrift.ApplicationException) 4 -> Prelude.fail "userQuery: expected reply but got oneway function call" _ -> Prelude.fail "userQuery: invalid message type" Thrift.parseMsgEnd _proxy Prelude.return _result userQueryBatch :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Repo -> UserQueryBatch -> Thrift.ThriftM p c s [UserQueryResultsOrException] userQueryBatch __field__repo __field__q = do Thrift.ThriftEnv _proxy _channel _opts _counter <- Reader.ask Trans.lift (userQueryBatchIO _proxy _channel _counter _opts __field__repo __field__q) userQueryBatchIO :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Proxy.Proxy p -> c s -> Thrift.Counter -> Thrift.RpcOptions -> Repo -> UserQueryBatch -> Prelude.IO [UserQueryResultsOrException] userQueryBatchIO _proxy _channel _counter _opts __field__repo __field__q = do (_handle, _sendCob, _recvCob) <- Thrift.mkCallbacks (recv_userQueryBatch _proxy) send_userQueryBatch _proxy _channel _counter _sendCob _recvCob _opts __field__repo __field__q Thrift.wait _handle send_userQueryBatch :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Proxy.Proxy p -> c s -> Thrift.Counter -> Thrift.SendCallback -> Thrift.RecvCallback -> Thrift.RpcOptions -> Repo -> UserQueryBatch -> Prelude.IO () send_userQueryBatch _proxy _channel _counter _sendCob _recvCob _rpcOpts __field__repo __field__q = do _seqNum <- _counter let _callMsg = LBS.toStrict (ByteString.toLazyByteString (_build_userQueryBatch _proxy _seqNum __field__repo __field__q)) Thrift.sendRequest _channel (Thrift.Request _callMsg (Thrift.setRpcPriority _rpcOpts Thrift.NormalPriority)) _sendCob _recvCob recv_userQueryBatch :: (Thrift.Protocol p) => Proxy.Proxy p -> Thrift.Response -> Prelude.Either Exception.SomeException [UserQueryResultsOrException] recv_userQueryBatch _proxy (Thrift.Response _response _) = Monad.join (Arrow.left (Exception.SomeException . Thrift.ProtocolException) (Parser.parse (_parse_userQueryBatch _proxy) _response)) _build_userQueryBatch :: Thrift.Protocol p => Proxy.Proxy p -> Int.Int32 -> Repo -> UserQueryBatch -> ByteString.Builder _build_userQueryBatch _proxy _seqNum __field__repo __field__q = Thrift.genMsgBegin _proxy "userQueryBatch" 1 _seqNum <> Thrift.genStruct _proxy (Thrift.genField _proxy "repo" (Thrift.getStructType _proxy) 1 0 (Thrift.buildStruct _proxy __field__repo) : Thrift.genField _proxy "q" (Thrift.getStructType _proxy) 2 1 (Thrift.buildStruct _proxy __field__q) : []) <> Thrift.genMsgEnd _proxy _parse_userQueryBatch :: Thrift.Protocol p => Proxy.Proxy p -> Parser.Parser (Prelude.Either Exception.SomeException [UserQueryResultsOrException]) _parse_userQueryBatch _proxy = do Thrift.MsgBegin _name _msgTy _ <- Thrift.parseMsgBegin _proxy _result <- case _msgTy of 1 -> Prelude.fail "userQueryBatch: expected reply but got function call" 2 | _name == "userQueryBatch" -> do let _idMap = HashMap.fromList [("userQueryBatch_success", 0), ("e", 1), ("u", 4)] _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap case _fieldBegin of Thrift.FieldBegin _type _id _bool -> do case _id of 0 | _type == Thrift.getListType _proxy -> Prelude.fmap Prelude.Right (Prelude.snd <$> Thrift.parseList _proxy (Thrift.parseStruct _proxy)) 1 | _type == Thrift.getStructType _proxy -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser Exception) 4 | _type == Thrift.getStructType _proxy -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser UnknownDatabase) _ -> Prelude.fail (Prelude.unwords ["unrecognized exception, type:", Prelude.show _type, "field id:", Prelude.show _id]) Thrift.FieldEnd -> Prelude.fail "no response" | Prelude.otherwise -> Prelude.fail "reply function does not match" 3 -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser Thrift.ApplicationException) 4 -> Prelude.fail "userQueryBatch: expected reply but got oneway function call" _ -> Prelude.fail "userQueryBatch: invalid message type" Thrift.parseMsgEnd _proxy Prelude.return _result deriveStored :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Repo -> DerivePredicateQuery -> Thrift.ThriftM p c s DerivationStatus deriveStored __field__repo __field__q = do Thrift.ThriftEnv _proxy _channel _opts _counter <- Reader.ask Trans.lift (deriveStoredIO _proxy _channel _counter _opts __field__repo __field__q) deriveStoredIO :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Proxy.Proxy p -> c s -> Thrift.Counter -> Thrift.RpcOptions -> Repo -> DerivePredicateQuery -> Prelude.IO DerivationStatus deriveStoredIO _proxy _channel _counter _opts __field__repo __field__q = do (_handle, _sendCob, _recvCob) <- Thrift.mkCallbacks (recv_deriveStored _proxy) send_deriveStored _proxy _channel _counter _sendCob _recvCob _opts __field__repo __field__q Thrift.wait _handle send_deriveStored :: (Thrift.Protocol p, Thrift.ClientChannel c, (Thrift.<:) s GleanService) => Proxy.Proxy p -> c s -> Thrift.Counter -> Thrift.SendCallback -> Thrift.RecvCallback -> Thrift.RpcOptions -> Repo -> DerivePredicateQuery -> Prelude.IO () send_deriveStored _proxy _channel _counter _sendCob _recvCob _rpcOpts __field__repo __field__q = do _seqNum <- _counter let _callMsg = LBS.toStrict (ByteString.toLazyByteString (_build_deriveStored _proxy _seqNum __field__repo __field__q)) Thrift.sendRequest _channel (Thrift.Request _callMsg (Thrift.setRpcPriority _rpcOpts Thrift.NormalPriority)) _sendCob _recvCob recv_deriveStored :: (Thrift.Protocol p) => Proxy.Proxy p -> Thrift.Response -> Prelude.Either Exception.SomeException DerivationStatus recv_deriveStored _proxy (Thrift.Response _response _) = Monad.join (Arrow.left (Exception.SomeException . Thrift.ProtocolException) (Parser.parse (_parse_deriveStored _proxy) _response)) _build_deriveStored :: Thrift.Protocol p => Proxy.Proxy p -> Int.Int32 -> Repo -> DerivePredicateQuery -> ByteString.Builder _build_deriveStored _proxy _seqNum __field__repo __field__q = Thrift.genMsgBegin _proxy "deriveStored" 1 _seqNum <> Thrift.genStruct _proxy (Thrift.genField _proxy "repo" (Thrift.getStructType _proxy) 1 0 (Thrift.buildStruct _proxy __field__repo) : Thrift.genField _proxy "q" (Thrift.getStructType _proxy) 2 1 (Thrift.buildStruct _proxy __field__q) : []) <> Thrift.genMsgEnd _proxy _parse_deriveStored :: Thrift.Protocol p => Proxy.Proxy p -> Parser.Parser (Prelude.Either Exception.SomeException DerivationStatus) _parse_deriveStored _proxy = do Thrift.MsgBegin _name _msgTy _ <- Thrift.parseMsgBegin _proxy _result <- case _msgTy of 1 -> Prelude.fail "deriveStored: expected reply but got function call" 2 | _name == "deriveStored" -> do let _idMap = HashMap.fromList [("deriveStored_success", 0), ("e", 1), ("n", 2), ("u", 3), ("d", 4)] _fieldBegin <- Thrift.parseFieldBegin _proxy 0 _idMap case _fieldBegin of Thrift.FieldBegin _type _id _bool -> do case _id of 0 | _type == Thrift.getStructType _proxy -> Prelude.fmap Prelude.Right (Thrift.parseStruct _proxy) 1 | _type == Thrift.getStructType _proxy -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser Exception) 2 | _type == Thrift.getStructType _proxy -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser NotAStoredPredicate) 3 | _type == Thrift.getStructType _proxy -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser UnknownPredicate) 4 | _type == Thrift.getStructType _proxy -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser IncompleteDependencies) _ -> Prelude.fail (Prelude.unwords ["unrecognized exception, type:", Prelude.show _type, "field id:", Prelude.show _id]) Thrift.FieldEnd -> Prelude.fail "no response" | Prelude.otherwise -> Prelude.fail "reply function does not match" 3 -> Prelude.fmap (Prelude.Left . Exception.SomeException) (Thrift.parseStruct _proxy :: Parser.Parser Thrift.ApplicationException) 4 -> Prelude.fail "deriveStored: expected reply but got oneway function call" _ -> Prelude.fail "deriveStored: invalid message type" Thrift.parseMsgEnd _proxy Prelude.return _result