Coverage for abb_rws_client_python_rw6/rws/elog.py: 100%

21 statements  

« prev     ^ index     » next       coverage.py v7.15.4, created at 2026-08-13 22:17 +0000

1# This file is AUTO-GENERATED by utils/generator/main.py 

2# DO NOT EDIT MANUALLY — run the generator to regenerate. 

3# Generator author: Clement RACINET 

4""" 

5RWS module: RobotWare Services → Elog service → Get Elog Resources 

6 

71:1 mirror of the ABB RobotWare 6 REST API. 

8Each function maps to exactly one HTTP endpoint. 

9No composed logic — see highlevel/ for wrappers. 

10""" 

11 

12from __future__ import annotations 

13 

14import httpx 

15 

16from abb_rws_client_python_rw6.core.client import RWSClient 

17 

18 

19async def get_elog_resources( 

20 client: RWSClient, 

21 lang: str | None = None, 

22 example_lang: str | None = None, 

23 resource: str | None = None, 

24 example_resource: str | None = None, 

25) -> httpx.Response: 

26 """ 

27 Get Elog Resources. 

28 

29 Route: ``GET /rw/elog`` 

30 ABB constraints: Not supported in bootserver mode. 

31 

32 Args: 

33 client: Open RWSClient instance. 

34 lang: Query parameter. Optional. 

35 example_lang: Query parameter. Optional. 

36 resource: Query parameter. Optional. 

37 example_resource: Query parameter. Optional. 

38 

39 Returns: 

40 Raw HTTP response. Expected success: HTTP 200. 

41 

42 Raises: 

43 RWSAuthenticationError: On HTTP 401. 

44 RWSNotFoundError: On HTTP 404. 

45 RWSHTTPError: On any other HTTP >= 400. 

46 

47 Example: 

48 ```python 

49 >>> await get_elog_resources(client) 

50 <Response [200]> 

51 ``` 

52 """ 

53 return await client.get( 

54 "/rw/elog", 

55 params={ 

56 k: v 

57 for k, v in { 

58 "lang": lang, 

59 "example_lang": example_lang, 

60 "resource": resource, 

61 "example_resource": example_resource, 

62 }.items() 

63 if v is not None 

64 }, 

65 ) 

66 

67 

68async def get_elog_actions( 

69 client: RWSClient, 

70 action: str | None = None, 

71) -> httpx.Response: 

72 """ 

73 Get Elog Actions. 

74 

75 Route: ``GET /rw/elog`` 

76 ABB constraints: Not supported in bootserver mode 

77 

78 Args: 

79 client: Open RWSClient instance. 

80 action: Query parameter. Optional. 

81 

82 Returns: 

83 Raw HTTP response. Expected success: HTTP 200. 

84 

85 Raises: 

86 RWSAuthenticationError: On HTTP 401. 

87 RWSNotFoundError: On HTTP 404. 

88 RWSHTTPError: On any other HTTP >= 400. 

89 

90 Example: 

91 ```python 

92 >>> await get_elog_actions(client) 

93 <Response [200]> 

94 ``` 

95 """ 

96 return await client.get( 

97 "/rw/elog", 

98 params={k: v for k, v in {"action": action}.items() if v is not None}, 

99 ) 

100 

101 

102async def post_clear_elog_messages( 

103 client: RWSClient, 

104 action: str | None = None, 

105) -> httpx.Response: 

106 """ 

107 Clear elog messages. 

108 

109 Route: ``POST /rw/elog`` 

110 ABB constraints: Not supported in bootserver mode 

111 

112 Args: 

113 client: Open RWSClient instance. 

114 action: Query parameter. Optional. 

115 

116 Returns: 

117 Raw HTTP response. Expected success: HTTP 204. 

118 

119 Raises: 

120 RWSAuthenticationError: On HTTP 401. 

121 RWSNotFoundError: On HTTP 404. 

122 RWSHTTPError: On any other HTTP >= 400. 

123 # ABB codes: UNSUPPORTED_MEDIA(415),BAD_REQUEST(400) 

124 

125 Example: 

126 ```python 

127 >>> await post_clear_elog_messages(client) 

128 <Response [204]> 

129 ``` 

130 """ 

131 return await client.post( 

132 "/rw/elog", 

133 params={k: v for k, v in {"action": action}.items() if v is not None}, 

134 data={}, 

135 ) 

136 

137 

138async def save_elog_in_system_dump_format( 

139 client: RWSClient, 

140 action: str | None = None, 

141 path: str | None = None, 

142) -> httpx.Response: 

143 """ 

144 Save elog in system dump format. 

145 

146 Route: ``POST /rw/elog`` 

147 ABB constraints: Since saving an elog in system dump format is an asynchronous task, the 

148 value of location header can be subscribed on to get information about the status of the 

149 task. 

150 

151 Args: 

152 client: Open RWSClient instance. 

153 action: Query parameter. Optional. 

154 path: Body parameter. Optional. 

155 

156 Returns: 

157 Raw HTTP response. Expected success: HTTP 202. 

158 

159 Raises: 

160 RWSAuthenticationError: On HTTP 401. 

161 RWSNotFoundError: On HTTP 404. 

162 RWSHTTPError: On any other HTTP >= 400. 

163 # ABB codes: UNSUPPORTED_MEDIA(415), UNAUTHORIZED(401) 

164 

165 Example: 

166 ```python 

167 >>> await save_elog_in_system_dump_format(client) 

168 <Response [202]> 

169 ``` 

170 """ 

171 return await client.post( 

172 "/rw/elog", 

173 params={k: v for k, v in {"action": action}.items() if v is not None}, 

174 data={k: v for k, v in {"path": path}.items() if v is not None}, 

175 ) 

176 

177 

178async def get_elog_messages_in_domain( 

179 client: RWSClient, 

180 domain_number: str, 

181 example_lang: str | None = None, 

182 example_resource: str | None = None, 

183 example_order: str | None = None, 

184 example_elogseqnum: str | None = None, 

185) -> httpx.Response: 

186 """ 

187 Get elog messages in domain. 

188 

189 Route: ``GET /rw/elog/{domain-number}`` 

190 ABB constraints: Not supported in bootserver mode 

191 

192 Args: 

193 client: Open RWSClient instance. 

194 domain_number: URL path parameter. 

195 example_lang: Query parameter. Optional. 

196 example_resource: Query parameter. Optional. 

197 example_order: Query parameter. Optional. 

198 example_elogseqnum: Query parameter. Optional. 

199 

200 Returns: 

201 Raw HTTP response. Expected success: HTTP 200. 

202 

203 Raises: 

204 RWSAuthenticationError: On HTTP 401. 

205 RWSNotFoundError: On HTTP 404. 

206 RWSHTTPError: On any other HTTP >= 400. 

207 # ABB codes: NOT_FOUND(404) 

208 

209 Example: 

210 ```python 

211 >>> await get_elog_messages_in_domain(client, "domain_number_value") 

212 <Response [200]> 

213 ``` 

214 """ 

215 return await client.get( 

216 f"/rw/elog/{domain_number}", 

217 params={ 

218 k: v 

219 for k, v in { 

220 "example_lang": example_lang, 

221 "example_resource": example_resource, 

222 "example_order": example_order, 

223 "example_elogseqnum": example_elogseqnum, 

224 }.items() 

225 if v is not None 

226 }, 

227 ) 

228 

229 

230async def get_actions_on_elog_domain( 

231 client: RWSClient, 

232 domain_number: str, 

233) -> httpx.Response: 

234 """ 

235 Get Actions on elog domain. 

236 

237 Route: ``GET /rw/elog/{domain-number}`` 

238 ABB constraints: Not supported in bootserver mode 

239 

240 Args: 

241 client: Open RWSClient instance. 

242 domain_number: URL path parameter. 

243 

244 Returns: 

245 Raw HTTP response. Expected success: HTTP 200. 

246 

247 Raises: 

248 RWSAuthenticationError: On HTTP 401. 

249 RWSNotFoundError: On HTTP 404. 

250 RWSHTTPError: On any other HTTP >= 400. 

251 # ABB codes: NOT_FOUND(404) 

252 

253 Example: 

254 ```python 

255 >>> await get_actions_on_elog_domain(client, "domain_number_value") 

256 <Response [200]> 

257 ``` 

258 """ 

259 return await client.get(f"/rw/elog/{domain_number}") 

260 

261 

262async def post_clear_elog_messages_2( 

263 client: RWSClient, 

264 domain_number: str, 

265 action: str | None = None, 

266) -> httpx.Response: 

267 """ 

268 Clear elog messages. 

269 

270 Route: ``POST /rw/elog/{domain-number}`` 

271 ABB constraints: Not supported in bootserver mode 

272 

273 Args: 

274 client: Open RWSClient instance. 

275 domain_number: URL path parameter. 

276 action: Query parameter. Optional. 

277 

278 Returns: 

279 Raw HTTP response. Expected success: HTTP 204. 

280 

281 Raises: 

282 RWSAuthenticationError: On HTTP 401. 

283 RWSNotFoundError: On HTTP 404. 

284 RWSHTTPError: On any other HTTP >= 400. 

285 # ABB codes: UNSUPPORTED_MEDIA(415), BAD_REQUEST(400), NOT_FOUND(404) 

286 

287 Example: 

288 ```python 

289 >>> await post_clear_elog_messages_2(client, "domain_number_value") 

290 <Response [204]> 

291 ``` 

292 """ 

293 return await client.post( 

294 f"/rw/elog/{domain_number}", 

295 params={k: v for k, v in {"action": action}.items() if v is not None}, 

296 data={}, 

297 ) 

298 

299 

300async def subscribe_on_elog_domain( 

301 client: RWSClient, 

302 identifier: str | None = None, 

303 identifier_p: str | None = None, 

304) -> httpx.Response: 

305 """ 

306 Subscribe on elog domain. 

307 

308 Route: ``POST /subscription`` 

309 ABB constraints: Not supported in bootserver mode 

310 

311 Args: 

312 client: Open RWSClient instance. 

313 identifier: Body parameter. Optional. 

314 identifier_p: Body parameter. Optional. 

315 

316 Returns: 

317 Raw HTTP response. Expected success: HTTP 201. 

318 

319 Raises: 

320 RWSAuthenticationError: On HTTP 401. 

321 RWSNotFoundError: On HTTP 404. 

322 RWSHTTPError: On any other HTTP >= 400. 

323 # ABB codes: UNSUPPORTED_MEDIA(415), BAD_REQUEST(400) 

324 

325 Example: 

326 ```python 

327 >>> await subscribe_on_elog_domain(client) 

328 <Response [201]> 

329 ``` 

330 """ 

331 return await client.post( 

332 "/subscription", 

333 data={ 

334 k: v 

335 for k, v in {"identifier": identifier, "identifier_p": identifier_p}.items() 

336 if v is not None 

337 }, 

338 ) 

339 

340 

341async def get_elog_message_in_domain( 

342 client: RWSClient, 

343 domain_number: str, 

344 sequence_number: str, 

345 lang: str | None = None, 

346 example_lang: str | None = None, 

347) -> httpx.Response: 

348 """ 

349 Get Elog Message in domain. 

350 

351 Route: ``GET /rw/elog/{domain-number}/{sequence-number}`` 

352 ABB constraints: Not supported in bootserver mode 

353 

354 Args: 

355 client: Open RWSClient instance. 

356 domain_number: URL path parameter. 

357 sequence_number: URL path parameter. 

358 lang: Query parameter. Optional. 

359 example_lang: Query parameter. Optional. 

360 

361 Returns: 

362 Raw HTTP response. Expected success: HTTP 200. 

363 

364 Raises: 

365 RWSAuthenticationError: On HTTP 401. 

366 RWSNotFoundError: On HTTP 404. 

367 RWSHTTPError: On any other HTTP >= 400. 

368 # ABB codes: NOT_FOUND(404), BAD_REQUEST(400) 

369 

370 Example: 

371 ```python 

372 >>> await get_elog_message_in_domain( 

373 ... client, 

374 ... "domain_number_value", 

375 ... "sequence_number_value" 

376 ... ) 

377 <Response [200]> 

378 ``` 

379 """ 

380 return await client.get( 

381 f"/rw/elog/{domain_number}/{sequence_number}", 

382 params={ 

383 k: v for k, v in {"lang": lang, "example_lang": example_lang}.items() if v is not None 

384 }, 

385 )