threads_connect.py 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450
  1. # -*- coding: utf-8 -*-
  2. # Generated by https://github.com/connectrpc/connect-python. DO NOT EDIT!
  3. # source: chatto/api/v1/threads.proto
  4. from collections.abc import AsyncGenerator, AsyncIterator, Iterable, Iterator, Mapping
  5. from typing import Protocol
  6. from connectrpc.client import ConnectClient, ConnectClientSync
  7. from connectrpc.code import Code
  8. from connectrpc.compression import Compression
  9. from connectrpc.errors import ConnectError
  10. from connectrpc.interceptor import Interceptor, InterceptorSync
  11. from connectrpc.method import IdempotencyLevel, MethodInfo
  12. from connectrpc.request import Headers, RequestContext
  13. from connectrpc.server import ConnectASGIApplication, ConnectWSGIApplication, Endpoint, EndpointSync
  14. import chatto.api.v1.read_state_pb2 as chatto_dot_api_dot_v1_dot_read__state__pb2
  15. import chatto.api.v1.room_timeline_pb2 as chatto_dot_api_dot_v1_dot_room__timeline__pb2
  16. import chatto.api.v1.threads_pb2 as chatto_dot_api_dot_v1_dot_threads__pb2
  17. class ThreadService(Protocol):
  18. async def list_followed_threads(self, request: chatto_dot_api_dot_v1_dot_threads__pb2.ListFollowedThreadsRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_threads__pb2.ListFollowedThreadsResponse:
  19. raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
  20. async def follow_thread(self, request: chatto_dot_api_dot_v1_dot_threads__pb2.FollowThreadRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_threads__pb2.FollowThreadResponse:
  21. raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
  22. async def unfollow_thread(self, request: chatto_dot_api_dot_v1_dot_threads__pb2.UnfollowThreadRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_threads__pb2.UnfollowThreadResponse:
  23. raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
  24. async def get_thread_events(self, request: chatto_dot_api_dot_v1_dot_room__timeline__pb2.GetThreadEventsRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_room__timeline__pb2.GetThreadEventsResponse:
  25. raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
  26. async def get_thread_events_around(self, request: chatto_dot_api_dot_v1_dot_room__timeline__pb2.GetThreadEventsAroundRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_room__timeline__pb2.GetThreadEventsAroundResponse:
  27. raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
  28. async def mark_thread_as_read(self, request: chatto_dot_api_dot_v1_dot_read__state__pb2.MarkThreadAsReadRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_read__state__pb2.MarkThreadAsReadResponse:
  29. raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
  30. class ThreadServiceASGIApplication(ConnectASGIApplication[ThreadService]):
  31. def __init__(self, service: ThreadService | AsyncGenerator[ThreadService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None) -> None:
  32. super().__init__(
  33. service=service,
  34. endpoints=lambda svc: {
  35. "/chatto.api.v1.ThreadService/ListFollowedThreads": Endpoint.unary(
  36. method=MethodInfo(
  37. name="ListFollowedThreads",
  38. service_name="chatto.api.v1.ThreadService",
  39. input=chatto_dot_api_dot_v1_dot_threads__pb2.ListFollowedThreadsRequest,
  40. output=chatto_dot_api_dot_v1_dot_threads__pb2.ListFollowedThreadsResponse,
  41. idempotency_level=IdempotencyLevel.UNKNOWN,
  42. ),
  43. function=svc.list_followed_threads,
  44. ),
  45. "/chatto.api.v1.ThreadService/FollowThread": Endpoint.unary(
  46. method=MethodInfo(
  47. name="FollowThread",
  48. service_name="chatto.api.v1.ThreadService",
  49. input=chatto_dot_api_dot_v1_dot_threads__pb2.FollowThreadRequest,
  50. output=chatto_dot_api_dot_v1_dot_threads__pb2.FollowThreadResponse,
  51. idempotency_level=IdempotencyLevel.UNKNOWN,
  52. ),
  53. function=svc.follow_thread,
  54. ),
  55. "/chatto.api.v1.ThreadService/UnfollowThread": Endpoint.unary(
  56. method=MethodInfo(
  57. name="UnfollowThread",
  58. service_name="chatto.api.v1.ThreadService",
  59. input=chatto_dot_api_dot_v1_dot_threads__pb2.UnfollowThreadRequest,
  60. output=chatto_dot_api_dot_v1_dot_threads__pb2.UnfollowThreadResponse,
  61. idempotency_level=IdempotencyLevel.UNKNOWN,
  62. ),
  63. function=svc.unfollow_thread,
  64. ),
  65. "/chatto.api.v1.ThreadService/GetThreadEvents": Endpoint.unary(
  66. method=MethodInfo(
  67. name="GetThreadEvents",
  68. service_name="chatto.api.v1.ThreadService",
  69. input=chatto_dot_api_dot_v1_dot_room__timeline__pb2.GetThreadEventsRequest,
  70. output=chatto_dot_api_dot_v1_dot_room__timeline__pb2.GetThreadEventsResponse,
  71. idempotency_level=IdempotencyLevel.UNKNOWN,
  72. ),
  73. function=svc.get_thread_events,
  74. ),
  75. "/chatto.api.v1.ThreadService/GetThreadEventsAround": Endpoint.unary(
  76. method=MethodInfo(
  77. name="GetThreadEventsAround",
  78. service_name="chatto.api.v1.ThreadService",
  79. input=chatto_dot_api_dot_v1_dot_room__timeline__pb2.GetThreadEventsAroundRequest,
  80. output=chatto_dot_api_dot_v1_dot_room__timeline__pb2.GetThreadEventsAroundResponse,
  81. idempotency_level=IdempotencyLevel.UNKNOWN,
  82. ),
  83. function=svc.get_thread_events_around,
  84. ),
  85. "/chatto.api.v1.ThreadService/MarkThreadAsRead": Endpoint.unary(
  86. method=MethodInfo(
  87. name="MarkThreadAsRead",
  88. service_name="chatto.api.v1.ThreadService",
  89. input=chatto_dot_api_dot_v1_dot_read__state__pb2.MarkThreadAsReadRequest,
  90. output=chatto_dot_api_dot_v1_dot_read__state__pb2.MarkThreadAsReadResponse,
  91. idempotency_level=IdempotencyLevel.UNKNOWN,
  92. ),
  93. function=svc.mark_thread_as_read,
  94. ),
  95. },
  96. interceptors=interceptors,
  97. read_max_bytes=read_max_bytes,
  98. compressions=compressions,
  99. )
  100. @property
  101. def path(self) -> str:
  102. """Returns the URL path to mount the application to when serving multiple applications."""
  103. return "/chatto.api.v1.ThreadService"
  104. class ThreadServiceClient(ConnectClient):
  105. async def list_followed_threads(
  106. self,
  107. request: chatto_dot_api_dot_v1_dot_threads__pb2.ListFollowedThreadsRequest,
  108. *,
  109. headers: Headers | Mapping[str, str] | None = None,
  110. timeout_ms: int | None = None,
  111. ) -> chatto_dot_api_dot_v1_dot_threads__pb2.ListFollowedThreadsResponse:
  112. return await self.execute_unary(
  113. request=request,
  114. method=MethodInfo(
  115. name="ListFollowedThreads",
  116. service_name="chatto.api.v1.ThreadService",
  117. input=chatto_dot_api_dot_v1_dot_threads__pb2.ListFollowedThreadsRequest,
  118. output=chatto_dot_api_dot_v1_dot_threads__pb2.ListFollowedThreadsResponse,
  119. idempotency_level=IdempotencyLevel.UNKNOWN,
  120. ),
  121. headers=headers,
  122. timeout_ms=timeout_ms,
  123. )
  124. async def follow_thread(
  125. self,
  126. request: chatto_dot_api_dot_v1_dot_threads__pb2.FollowThreadRequest,
  127. *,
  128. headers: Headers | Mapping[str, str] | None = None,
  129. timeout_ms: int | None = None,
  130. ) -> chatto_dot_api_dot_v1_dot_threads__pb2.FollowThreadResponse:
  131. return await self.execute_unary(
  132. request=request,
  133. method=MethodInfo(
  134. name="FollowThread",
  135. service_name="chatto.api.v1.ThreadService",
  136. input=chatto_dot_api_dot_v1_dot_threads__pb2.FollowThreadRequest,
  137. output=chatto_dot_api_dot_v1_dot_threads__pb2.FollowThreadResponse,
  138. idempotency_level=IdempotencyLevel.UNKNOWN,
  139. ),
  140. headers=headers,
  141. timeout_ms=timeout_ms,
  142. )
  143. async def unfollow_thread(
  144. self,
  145. request: chatto_dot_api_dot_v1_dot_threads__pb2.UnfollowThreadRequest,
  146. *,
  147. headers: Headers | Mapping[str, str] | None = None,
  148. timeout_ms: int | None = None,
  149. ) -> chatto_dot_api_dot_v1_dot_threads__pb2.UnfollowThreadResponse:
  150. return await self.execute_unary(
  151. request=request,
  152. method=MethodInfo(
  153. name="UnfollowThread",
  154. service_name="chatto.api.v1.ThreadService",
  155. input=chatto_dot_api_dot_v1_dot_threads__pb2.UnfollowThreadRequest,
  156. output=chatto_dot_api_dot_v1_dot_threads__pb2.UnfollowThreadResponse,
  157. idempotency_level=IdempotencyLevel.UNKNOWN,
  158. ),
  159. headers=headers,
  160. timeout_ms=timeout_ms,
  161. )
  162. async def get_thread_events(
  163. self,
  164. request: chatto_dot_api_dot_v1_dot_room__timeline__pb2.GetThreadEventsRequest,
  165. *,
  166. headers: Headers | Mapping[str, str] | None = None,
  167. timeout_ms: int | None = None,
  168. ) -> chatto_dot_api_dot_v1_dot_room__timeline__pb2.GetThreadEventsResponse:
  169. return await self.execute_unary(
  170. request=request,
  171. method=MethodInfo(
  172. name="GetThreadEvents",
  173. service_name="chatto.api.v1.ThreadService",
  174. input=chatto_dot_api_dot_v1_dot_room__timeline__pb2.GetThreadEventsRequest,
  175. output=chatto_dot_api_dot_v1_dot_room__timeline__pb2.GetThreadEventsResponse,
  176. idempotency_level=IdempotencyLevel.UNKNOWN,
  177. ),
  178. headers=headers,
  179. timeout_ms=timeout_ms,
  180. )
  181. async def get_thread_events_around(
  182. self,
  183. request: chatto_dot_api_dot_v1_dot_room__timeline__pb2.GetThreadEventsAroundRequest,
  184. *,
  185. headers: Headers | Mapping[str, str] | None = None,
  186. timeout_ms: int | None = None,
  187. ) -> chatto_dot_api_dot_v1_dot_room__timeline__pb2.GetThreadEventsAroundResponse:
  188. return await self.execute_unary(
  189. request=request,
  190. method=MethodInfo(
  191. name="GetThreadEventsAround",
  192. service_name="chatto.api.v1.ThreadService",
  193. input=chatto_dot_api_dot_v1_dot_room__timeline__pb2.GetThreadEventsAroundRequest,
  194. output=chatto_dot_api_dot_v1_dot_room__timeline__pb2.GetThreadEventsAroundResponse,
  195. idempotency_level=IdempotencyLevel.UNKNOWN,
  196. ),
  197. headers=headers,
  198. timeout_ms=timeout_ms,
  199. )
  200. async def mark_thread_as_read(
  201. self,
  202. request: chatto_dot_api_dot_v1_dot_read__state__pb2.MarkThreadAsReadRequest,
  203. *,
  204. headers: Headers | Mapping[str, str] | None = None,
  205. timeout_ms: int | None = None,
  206. ) -> chatto_dot_api_dot_v1_dot_read__state__pb2.MarkThreadAsReadResponse:
  207. return await self.execute_unary(
  208. request=request,
  209. method=MethodInfo(
  210. name="MarkThreadAsRead",
  211. service_name="chatto.api.v1.ThreadService",
  212. input=chatto_dot_api_dot_v1_dot_read__state__pb2.MarkThreadAsReadRequest,
  213. output=chatto_dot_api_dot_v1_dot_read__state__pb2.MarkThreadAsReadResponse,
  214. idempotency_level=IdempotencyLevel.UNKNOWN,
  215. ),
  216. headers=headers,
  217. timeout_ms=timeout_ms,
  218. )
  219. class ThreadServiceSync(Protocol):
  220. def list_followed_threads(self, request: chatto_dot_api_dot_v1_dot_threads__pb2.ListFollowedThreadsRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_threads__pb2.ListFollowedThreadsResponse:
  221. raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
  222. def follow_thread(self, request: chatto_dot_api_dot_v1_dot_threads__pb2.FollowThreadRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_threads__pb2.FollowThreadResponse:
  223. raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
  224. def unfollow_thread(self, request: chatto_dot_api_dot_v1_dot_threads__pb2.UnfollowThreadRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_threads__pb2.UnfollowThreadResponse:
  225. raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
  226. def get_thread_events(self, request: chatto_dot_api_dot_v1_dot_room__timeline__pb2.GetThreadEventsRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_room__timeline__pb2.GetThreadEventsResponse:
  227. raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
  228. def get_thread_events_around(self, request: chatto_dot_api_dot_v1_dot_room__timeline__pb2.GetThreadEventsAroundRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_room__timeline__pb2.GetThreadEventsAroundResponse:
  229. raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
  230. def mark_thread_as_read(self, request: chatto_dot_api_dot_v1_dot_read__state__pb2.MarkThreadAsReadRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_read__state__pb2.MarkThreadAsReadResponse:
  231. raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
  232. class ThreadServiceWSGIApplication(ConnectWSGIApplication):
  233. def __init__(self, service: ThreadServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None) -> None:
  234. super().__init__(
  235. endpoints={
  236. "/chatto.api.v1.ThreadService/ListFollowedThreads": EndpointSync.unary(
  237. method=MethodInfo(
  238. name="ListFollowedThreads",
  239. service_name="chatto.api.v1.ThreadService",
  240. input=chatto_dot_api_dot_v1_dot_threads__pb2.ListFollowedThreadsRequest,
  241. output=chatto_dot_api_dot_v1_dot_threads__pb2.ListFollowedThreadsResponse,
  242. idempotency_level=IdempotencyLevel.UNKNOWN,
  243. ),
  244. function=service.list_followed_threads,
  245. ),
  246. "/chatto.api.v1.ThreadService/FollowThread": EndpointSync.unary(
  247. method=MethodInfo(
  248. name="FollowThread",
  249. service_name="chatto.api.v1.ThreadService",
  250. input=chatto_dot_api_dot_v1_dot_threads__pb2.FollowThreadRequest,
  251. output=chatto_dot_api_dot_v1_dot_threads__pb2.FollowThreadResponse,
  252. idempotency_level=IdempotencyLevel.UNKNOWN,
  253. ),
  254. function=service.follow_thread,
  255. ),
  256. "/chatto.api.v1.ThreadService/UnfollowThread": EndpointSync.unary(
  257. method=MethodInfo(
  258. name="UnfollowThread",
  259. service_name="chatto.api.v1.ThreadService",
  260. input=chatto_dot_api_dot_v1_dot_threads__pb2.UnfollowThreadRequest,
  261. output=chatto_dot_api_dot_v1_dot_threads__pb2.UnfollowThreadResponse,
  262. idempotency_level=IdempotencyLevel.UNKNOWN,
  263. ),
  264. function=service.unfollow_thread,
  265. ),
  266. "/chatto.api.v1.ThreadService/GetThreadEvents": EndpointSync.unary(
  267. method=MethodInfo(
  268. name="GetThreadEvents",
  269. service_name="chatto.api.v1.ThreadService",
  270. input=chatto_dot_api_dot_v1_dot_room__timeline__pb2.GetThreadEventsRequest,
  271. output=chatto_dot_api_dot_v1_dot_room__timeline__pb2.GetThreadEventsResponse,
  272. idempotency_level=IdempotencyLevel.UNKNOWN,
  273. ),
  274. function=service.get_thread_events,
  275. ),
  276. "/chatto.api.v1.ThreadService/GetThreadEventsAround": EndpointSync.unary(
  277. method=MethodInfo(
  278. name="GetThreadEventsAround",
  279. service_name="chatto.api.v1.ThreadService",
  280. input=chatto_dot_api_dot_v1_dot_room__timeline__pb2.GetThreadEventsAroundRequest,
  281. output=chatto_dot_api_dot_v1_dot_room__timeline__pb2.GetThreadEventsAroundResponse,
  282. idempotency_level=IdempotencyLevel.UNKNOWN,
  283. ),
  284. function=service.get_thread_events_around,
  285. ),
  286. "/chatto.api.v1.ThreadService/MarkThreadAsRead": EndpointSync.unary(
  287. method=MethodInfo(
  288. name="MarkThreadAsRead",
  289. service_name="chatto.api.v1.ThreadService",
  290. input=chatto_dot_api_dot_v1_dot_read__state__pb2.MarkThreadAsReadRequest,
  291. output=chatto_dot_api_dot_v1_dot_read__state__pb2.MarkThreadAsReadResponse,
  292. idempotency_level=IdempotencyLevel.UNKNOWN,
  293. ),
  294. function=service.mark_thread_as_read,
  295. ),
  296. },
  297. interceptors=interceptors,
  298. read_max_bytes=read_max_bytes,
  299. compressions=compressions,
  300. )
  301. @property
  302. def path(self) -> str:
  303. """Returns the URL path to mount the application to when serving multiple applications."""
  304. return "/chatto.api.v1.ThreadService"
  305. class ThreadServiceClientSync(ConnectClientSync):
  306. def list_followed_threads(
  307. self,
  308. request: chatto_dot_api_dot_v1_dot_threads__pb2.ListFollowedThreadsRequest,
  309. *,
  310. headers: Headers | Mapping[str, str] | None = None,
  311. timeout_ms: int | None = None,
  312. ) -> chatto_dot_api_dot_v1_dot_threads__pb2.ListFollowedThreadsResponse:
  313. return self.execute_unary(
  314. request=request,
  315. method=MethodInfo(
  316. name="ListFollowedThreads",
  317. service_name="chatto.api.v1.ThreadService",
  318. input=chatto_dot_api_dot_v1_dot_threads__pb2.ListFollowedThreadsRequest,
  319. output=chatto_dot_api_dot_v1_dot_threads__pb2.ListFollowedThreadsResponse,
  320. idempotency_level=IdempotencyLevel.UNKNOWN,
  321. ),
  322. headers=headers,
  323. timeout_ms=timeout_ms,
  324. )
  325. def follow_thread(
  326. self,
  327. request: chatto_dot_api_dot_v1_dot_threads__pb2.FollowThreadRequest,
  328. *,
  329. headers: Headers | Mapping[str, str] | None = None,
  330. timeout_ms: int | None = None,
  331. ) -> chatto_dot_api_dot_v1_dot_threads__pb2.FollowThreadResponse:
  332. return self.execute_unary(
  333. request=request,
  334. method=MethodInfo(
  335. name="FollowThread",
  336. service_name="chatto.api.v1.ThreadService",
  337. input=chatto_dot_api_dot_v1_dot_threads__pb2.FollowThreadRequest,
  338. output=chatto_dot_api_dot_v1_dot_threads__pb2.FollowThreadResponse,
  339. idempotency_level=IdempotencyLevel.UNKNOWN,
  340. ),
  341. headers=headers,
  342. timeout_ms=timeout_ms,
  343. )
  344. def unfollow_thread(
  345. self,
  346. request: chatto_dot_api_dot_v1_dot_threads__pb2.UnfollowThreadRequest,
  347. *,
  348. headers: Headers | Mapping[str, str] | None = None,
  349. timeout_ms: int | None = None,
  350. ) -> chatto_dot_api_dot_v1_dot_threads__pb2.UnfollowThreadResponse:
  351. return self.execute_unary(
  352. request=request,
  353. method=MethodInfo(
  354. name="UnfollowThread",
  355. service_name="chatto.api.v1.ThreadService",
  356. input=chatto_dot_api_dot_v1_dot_threads__pb2.UnfollowThreadRequest,
  357. output=chatto_dot_api_dot_v1_dot_threads__pb2.UnfollowThreadResponse,
  358. idempotency_level=IdempotencyLevel.UNKNOWN,
  359. ),
  360. headers=headers,
  361. timeout_ms=timeout_ms,
  362. )
  363. def get_thread_events(
  364. self,
  365. request: chatto_dot_api_dot_v1_dot_room__timeline__pb2.GetThreadEventsRequest,
  366. *,
  367. headers: Headers | Mapping[str, str] | None = None,
  368. timeout_ms: int | None = None,
  369. ) -> chatto_dot_api_dot_v1_dot_room__timeline__pb2.GetThreadEventsResponse:
  370. return self.execute_unary(
  371. request=request,
  372. method=MethodInfo(
  373. name="GetThreadEvents",
  374. service_name="chatto.api.v1.ThreadService",
  375. input=chatto_dot_api_dot_v1_dot_room__timeline__pb2.GetThreadEventsRequest,
  376. output=chatto_dot_api_dot_v1_dot_room__timeline__pb2.GetThreadEventsResponse,
  377. idempotency_level=IdempotencyLevel.UNKNOWN,
  378. ),
  379. headers=headers,
  380. timeout_ms=timeout_ms,
  381. )
  382. def get_thread_events_around(
  383. self,
  384. request: chatto_dot_api_dot_v1_dot_room__timeline__pb2.GetThreadEventsAroundRequest,
  385. *,
  386. headers: Headers | Mapping[str, str] | None = None,
  387. timeout_ms: int | None = None,
  388. ) -> chatto_dot_api_dot_v1_dot_room__timeline__pb2.GetThreadEventsAroundResponse:
  389. return self.execute_unary(
  390. request=request,
  391. method=MethodInfo(
  392. name="GetThreadEventsAround",
  393. service_name="chatto.api.v1.ThreadService",
  394. input=chatto_dot_api_dot_v1_dot_room__timeline__pb2.GetThreadEventsAroundRequest,
  395. output=chatto_dot_api_dot_v1_dot_room__timeline__pb2.GetThreadEventsAroundResponse,
  396. idempotency_level=IdempotencyLevel.UNKNOWN,
  397. ),
  398. headers=headers,
  399. timeout_ms=timeout_ms,
  400. )
  401. def mark_thread_as_read(
  402. self,
  403. request: chatto_dot_api_dot_v1_dot_read__state__pb2.MarkThreadAsReadRequest,
  404. *,
  405. headers: Headers | Mapping[str, str] | None = None,
  406. timeout_ms: int | None = None,
  407. ) -> chatto_dot_api_dot_v1_dot_read__state__pb2.MarkThreadAsReadResponse:
  408. return self.execute_unary(
  409. request=request,
  410. method=MethodInfo(
  411. name="MarkThreadAsRead",
  412. service_name="chatto.api.v1.ThreadService",
  413. input=chatto_dot_api_dot_v1_dot_read__state__pb2.MarkThreadAsReadRequest,
  414. output=chatto_dot_api_dot_v1_dot_read__state__pb2.MarkThreadAsReadResponse,
  415. idempotency_level=IdempotencyLevel.UNKNOWN,
  416. ),
  417. headers=headers,
  418. timeout_ms=timeout_ms,
  419. )