Skip to main content

nominal_api/conjure/clients/scout/
notebook_service.rs

1use conjure_http::endpoint;
2/// NotebookService manages workbooks (formerly known as notebooks).
3#[conjure_http::conjure_client(name = "NotebookService")]
4pub trait NotebookService<
5    #[response_body]
6    I: Iterator<
7            Item = Result<conjure_http::private::Bytes, conjure_http::private::Error>,
8        >,
9> {
10    /// Creates a new workbook. The workbook will be associated with the provided run. If the run does not exist,
11    /// a RunNotFound error will be thrown.
12    #[endpoint(
13        method = POST,
14        path = "/scout/v2/notebook",
15        name = "create",
16        accept = conjure_http::client::StdResponseDeserializer
17    )]
18    fn create(
19        &self,
20        #[auth]
21        auth_: &conjure_object::BearerToken,
22        #[body(serializer = conjure_http::client::StdRequestSerializer)]
23        request: &super::super::super::objects::scout::notebook::api::CreateNotebookRequest,
24    ) -> Result<
25        super::super::super::objects::scout::notebook::api::Notebook,
26        conjure_http::private::Error,
27    >;
28    /// Updates the contents of a workbook.
29    #[endpoint(
30        method = PUT,
31        path = "/scout/v2/notebook/{rid}",
32        name = "update",
33        accept = conjure_http::client::StdResponseDeserializer
34    )]
35    fn update(
36        &self,
37        #[auth]
38        auth_: &conjure_object::BearerToken,
39        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
40        rid: &super::super::super::objects::scout::rids::api::NotebookRid,
41        #[body(serializer = conjure_http::client::StdRequestSerializer)]
42        request: &super::super::super::objects::scout::notebook::api::UpdateNotebookRequest,
43    ) -> Result<
44        super::super::super::objects::scout::notebook::api::Notebook,
45        conjure_http::private::Error,
46    >;
47    #[endpoint(
48        method = GET,
49        path = "/scout/v2/notebook/{rid}",
50        name = "get",
51        accept = conjure_http::client::StdResponseDeserializer
52    )]
53    fn get(
54        &self,
55        #[auth]
56        auth_: &conjure_object::BearerToken,
57        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
58        rid: &super::super::super::objects::scout::rids::api::NotebookRid,
59        #[query(
60            name = "snapshot",
61            encoder = conjure_http::client::conjure::PlainSeqEncoder
62        )]
63        snapshot: Option<&super::super::super::objects::scout::rids::api::SnapshotRid>,
64    ) -> Result<
65        super::super::super::objects::scout::notebook::api::Notebook,
66        conjure_http::private::Error,
67    >;
68    #[endpoint(
69        method = POST,
70        path = "/scout/v2/notebook/batch-get",
71        name = "batchGet",
72        accept = conjure_http::client::conjure::CollectionResponseDeserializer
73    )]
74    fn batch_get(
75        &self,
76        #[auth]
77        auth_: &conjure_object::BearerToken,
78        #[body(serializer = conjure_http::client::StdRequestSerializer)]
79        rids: &std::collections::BTreeSet<
80            super::super::super::objects::scout::rids::api::NotebookRid,
81        >,
82    ) -> Result<
83        std::collections::BTreeSet<
84            super::super::super::objects::scout::notebook::api::Notebook,
85        >,
86        conjure_http::private::Error,
87    >;
88    #[endpoint(
89        method = POST,
90        path = "/scout/v2/notebook/batch-get-metadata",
91        name = "batchGetMetadata",
92        accept = conjure_http::client::conjure::CollectionResponseDeserializer
93    )]
94    fn batch_get_metadata(
95        &self,
96        #[auth]
97        auth_: &conjure_object::BearerToken,
98        #[body(serializer = conjure_http::client::StdRequestSerializer)]
99        rids: &std::collections::BTreeSet<
100            super::super::super::objects::scout::rids::api::NotebookRid,
101        >,
102    ) -> Result<
103        std::collections::BTreeSet<
104            super::super::super::objects::scout::notebook::api::NotebookMetadataWithRid,
105        >,
106        conjure_http::private::Error,
107    >;
108    /// Updates metadata about a workbook, but not its contents.
109    #[endpoint(
110        method = PUT,
111        path = "/scout/v2/notebook/{rid}/update-metadata",
112        name = "updateMetadata",
113        accept = conjure_http::client::StdResponseDeserializer
114    )]
115    fn update_metadata(
116        &self,
117        #[auth]
118        auth_: &conjure_object::BearerToken,
119        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
120        rid: &super::super::super::objects::scout::rids::api::NotebookRid,
121        #[body(serializer = conjure_http::client::StdRequestSerializer)]
122        request: &super::super::super::objects::scout::notebook::api::UpdateNotebookMetadataRequest,
123    ) -> Result<
124        super::super::super::objects::scout::notebook::api::NotebookMetadata,
125        conjure_http::private::Error,
126    >;
127    /// Returns the set of all ref names used by the workbook.
128    #[endpoint(
129        method = GET,
130        path = "/scout/v2/notebook/{rid}/ref-names",
131        name = "getUsedRefNames",
132        accept = conjure_http::client::conjure::CollectionResponseDeserializer
133    )]
134    fn get_used_ref_names(
135        &self,
136        #[auth]
137        auth_: &conjure_object::BearerToken,
138        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
139        rid: &super::super::super::objects::scout::rids::api::NotebookRid,
140    ) -> Result<
141        std::collections::BTreeSet<
142            super::super::super::objects::scout::api::DataSourceRefName,
143        >,
144        conjure_http::private::Error,
145    >;
146    /// Updates the data source ref names for all variables used in the workbook.
147    #[endpoint(
148        method = POST,
149        path = "/scout/v2/notebook/{rid}/update-ref-names",
150        name = "updateRefNames",
151        accept = conjure_http::client::StdResponseDeserializer
152    )]
153    fn update_ref_names(
154        &self,
155        #[auth]
156        auth_: &conjure_object::BearerToken,
157        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
158        rid: &super::super::super::objects::scout::rids::api::NotebookRid,
159        #[body(serializer = conjure_http::client::StdRequestSerializer)]
160        request: &super::super::super::objects::scout::notebook::api::UpdateRefNameRequest,
161    ) -> Result<
162        super::super::super::objects::scout::notebook::api::Notebook,
163        conjure_http::private::Error,
164    >;
165    /// Returns all properties (key value pairs) and labels that have been previously used on workbook. These can
166    /// be used to organize workbooks.
167    #[endpoint(
168        method = GET,
169        path = "/scout/v2/notebook/get-all-labels-properties",
170        name = "getAllLabelsAndProperties",
171        accept = conjure_http::client::StdResponseDeserializer
172    )]
173    fn get_all_labels_and_properties(
174        &self,
175        #[auth]
176        auth_: &conjure_object::BearerToken,
177        #[query(
178            name = "workspaces",
179            encoder = conjure_http::client::conjure::PlainSeqEncoder
180        )]
181        workspaces: &std::collections::BTreeSet<conjure_object::ResourceIdentifier>,
182    ) -> Result<
183        super::super::super::objects::scout::notebook::api::GetAllLabelsAndPropertiesResponse,
184        conjure_http::private::Error,
185    >;
186    #[endpoint(
187        method = POST,
188        path = "/scout/v2/notebook/search",
189        name = "search",
190        accept = conjure_http::client::StdResponseDeserializer
191    )]
192    fn search(
193        &self,
194        #[auth]
195        auth_: &conjure_object::BearerToken,
196        #[body(serializer = conjure_http::client::StdRequestSerializer)]
197        request: &super::super::super::objects::scout::notebook::api::SearchNotebooksRequest,
198    ) -> Result<
199        super::super::super::objects::scout::notebook::api::SearchNotebooksResponse,
200        conjure_http::private::Error,
201    >;
202    /// Batch edits metadata across multiple workbooks. Supports rename/merge for labels and properties.
203    /// If more than 1000 workbooks are targeted, this endpoint will throw a 400.
204    #[endpoint(
205        method = POST,
206        path = "/scout/v2/notebook/metadata/batch-edit",
207        name = "batchEditNotebookMetadata",
208        accept = conjure_http::client::StdResponseDeserializer
209    )]
210    fn batch_edit_notebook_metadata(
211        &self,
212        #[auth]
213        auth_: &conjure_object::BearerToken,
214        #[body(serializer = conjure_http::client::StdRequestSerializer)]
215        request: &super::super::super::objects::scout::notebook::api::BatchEditNotebookMetadataRequest,
216    ) -> Result<
217        super::super::super::objects::scout::notebook::api::BatchEditNotebookMetadataResponse,
218        conjure_http::private::Error,
219    >;
220    /// Makes a workbook uneditable.
221    /// Deprecated: use the isLocked field on updateMetadata instead.
222    #[endpoint(
223        method = PUT,
224        path = "/scout/v2/notebook/{rid}/lock",
225        name = "lock",
226        accept = conjure_http::client::conjure::EmptyResponseDeserializer
227    )]
228    fn lock(
229        &self,
230        #[auth]
231        auth_: &conjure_object::BearerToken,
232        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
233        rid: &super::super::super::objects::scout::rids::api::NotebookRid,
234    ) -> Result<(), conjure_http::private::Error>;
235    /// Unlocks a workbook for editing.
236    /// Deprecated: use the isLocked field on updateMetadata instead.
237    #[endpoint(
238        method = PUT,
239        path = "/scout/v2/notebook/{rid}/unlock",
240        name = "unlock",
241        accept = conjure_http::client::conjure::EmptyResponseDeserializer
242    )]
243    fn unlock(
244        &self,
245        #[auth]
246        auth_: &conjure_object::BearerToken,
247        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
248        rid: &super::super::super::objects::scout::rids::api::NotebookRid,
249    ) -> Result<(), conjure_http::private::Error>;
250    /// Archives a workbook, which excludes it from search and hides it from being publicly visible, but does not
251    /// permanently delete it. Archived workbooks can be unarchived.
252    #[endpoint(
253        method = PUT,
254        path = "/scout/v2/notebook/{rid}/archive",
255        name = "archive",
256        accept = conjure_http::client::conjure::EmptyResponseDeserializer
257    )]
258    fn archive(
259        &self,
260        #[auth]
261        auth_: &conjure_object::BearerToken,
262        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
263        rid: &super::super::super::objects::scout::rids::api::NotebookRid,
264    ) -> Result<(), conjure_http::private::Error>;
265    /// Makes a previously archived workbook searchable.
266    #[endpoint(
267        method = PUT,
268        path = "/scout/v2/notebook/{rid}/unarchive",
269        name = "unarchive",
270        accept = conjure_http::client::conjure::EmptyResponseDeserializer
271    )]
272    fn unarchive(
273        &self,
274        #[auth]
275        auth_: &conjure_object::BearerToken,
276        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
277        rid: &super::super::super::objects::scout::rids::api::NotebookRid,
278    ) -> Result<(), conjure_http::private::Error>;
279    /// The workbook will be deleted and is not recoverable. For soft deletion, use archive.
280    #[endpoint(
281        method = DELETE,
282        path = "/scout/v2/notebook/{rid}",
283        name = "delete",
284        accept = conjure_http::client::conjure::EmptyResponseDeserializer
285    )]
286    fn delete(
287        &self,
288        #[auth]
289        auth_: &conjure_object::BearerToken,
290        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
291        rid: &super::super::super::objects::scout::rids::api::NotebookRid,
292    ) -> Result<(), conjure_http::private::Error>;
293    /// Duplicates an existing workbook, copying its content (layout, charts, variables, pinned events)
294    /// and optionally overriding metadata fields such as title, description, data scope, labels,
295    /// and properties. Returns the newly created workbook.
296    #[endpoint(
297        method = POST,
298        path = "/scout/v2/notebook/{rid}/duplicate",
299        name = "duplicate",
300        accept = conjure_http::client::StdResponseDeserializer
301    )]
302    fn duplicate(
303        &self,
304        #[auth]
305        auth_: &conjure_object::BearerToken,
306        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
307        rid: &super::super::super::objects::scout::rids::api::NotebookRid,
308        #[body(serializer = conjure_http::client::StdRequestSerializer)]
309        request: &super::super::super::objects::scout::notebook::api::DuplicateNotebookRequest,
310    ) -> Result<
311        super::super::super::objects::scout::notebook::api::Notebook,
312        conjure_http::private::Error,
313    >;
314    /// Retrieves the snapshot history for a given workbook. These are sorted in reverse chronological order. Results
315    /// are limited by page size.
316    #[endpoint(
317        method = POST,
318        path = "/scout/v2/notebook/snapshot-history",
319        name = "getSnapshotHistory",
320        accept = conjure_http::client::StdResponseDeserializer
321    )]
322    fn get_snapshot_history(
323        &self,
324        #[auth]
325        auth_: &conjure_object::BearerToken,
326        #[body(serializer = conjure_http::client::StdRequestSerializer)]
327        request: &super::super::super::objects::scout::notebook::api::GetSnapshotHistoryRequest,
328    ) -> Result<
329        super::super::super::objects::scout::notebook::api::GetSnapshotHistoryResponse,
330        conjure_http::private::Error,
331    >;
332}
333/// NotebookService manages workbooks (formerly known as notebooks).
334#[conjure_http::conjure_client(name = "NotebookService")]
335pub trait AsyncNotebookService<
336    #[response_body]
337    I: conjure_http::private::Stream<
338            Item = Result<conjure_http::private::Bytes, conjure_http::private::Error>,
339        >,
340> {
341    /// Creates a new workbook. The workbook will be associated with the provided run. If the run does not exist,
342    /// a RunNotFound error will be thrown.
343    #[endpoint(
344        method = POST,
345        path = "/scout/v2/notebook",
346        name = "create",
347        accept = conjure_http::client::StdResponseDeserializer
348    )]
349    async fn create(
350        &self,
351        #[auth]
352        auth_: &conjure_object::BearerToken,
353        #[body(serializer = conjure_http::client::StdRequestSerializer)]
354        request: &super::super::super::objects::scout::notebook::api::CreateNotebookRequest,
355    ) -> Result<
356        super::super::super::objects::scout::notebook::api::Notebook,
357        conjure_http::private::Error,
358    >;
359    /// Updates the contents of a workbook.
360    #[endpoint(
361        method = PUT,
362        path = "/scout/v2/notebook/{rid}",
363        name = "update",
364        accept = conjure_http::client::StdResponseDeserializer
365    )]
366    async fn update(
367        &self,
368        #[auth]
369        auth_: &conjure_object::BearerToken,
370        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
371        rid: &super::super::super::objects::scout::rids::api::NotebookRid,
372        #[body(serializer = conjure_http::client::StdRequestSerializer)]
373        request: &super::super::super::objects::scout::notebook::api::UpdateNotebookRequest,
374    ) -> Result<
375        super::super::super::objects::scout::notebook::api::Notebook,
376        conjure_http::private::Error,
377    >;
378    #[endpoint(
379        method = GET,
380        path = "/scout/v2/notebook/{rid}",
381        name = "get",
382        accept = conjure_http::client::StdResponseDeserializer
383    )]
384    async fn get(
385        &self,
386        #[auth]
387        auth_: &conjure_object::BearerToken,
388        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
389        rid: &super::super::super::objects::scout::rids::api::NotebookRid,
390        #[query(
391            name = "snapshot",
392            encoder = conjure_http::client::conjure::PlainSeqEncoder
393        )]
394        snapshot: Option<&super::super::super::objects::scout::rids::api::SnapshotRid>,
395    ) -> Result<
396        super::super::super::objects::scout::notebook::api::Notebook,
397        conjure_http::private::Error,
398    >;
399    #[endpoint(
400        method = POST,
401        path = "/scout/v2/notebook/batch-get",
402        name = "batchGet",
403        accept = conjure_http::client::conjure::CollectionResponseDeserializer
404    )]
405    async fn batch_get(
406        &self,
407        #[auth]
408        auth_: &conjure_object::BearerToken,
409        #[body(serializer = conjure_http::client::StdRequestSerializer)]
410        rids: &std::collections::BTreeSet<
411            super::super::super::objects::scout::rids::api::NotebookRid,
412        >,
413    ) -> Result<
414        std::collections::BTreeSet<
415            super::super::super::objects::scout::notebook::api::Notebook,
416        >,
417        conjure_http::private::Error,
418    >;
419    #[endpoint(
420        method = POST,
421        path = "/scout/v2/notebook/batch-get-metadata",
422        name = "batchGetMetadata",
423        accept = conjure_http::client::conjure::CollectionResponseDeserializer
424    )]
425    async fn batch_get_metadata(
426        &self,
427        #[auth]
428        auth_: &conjure_object::BearerToken,
429        #[body(serializer = conjure_http::client::StdRequestSerializer)]
430        rids: &std::collections::BTreeSet<
431            super::super::super::objects::scout::rids::api::NotebookRid,
432        >,
433    ) -> Result<
434        std::collections::BTreeSet<
435            super::super::super::objects::scout::notebook::api::NotebookMetadataWithRid,
436        >,
437        conjure_http::private::Error,
438    >;
439    /// Updates metadata about a workbook, but not its contents.
440    #[endpoint(
441        method = PUT,
442        path = "/scout/v2/notebook/{rid}/update-metadata",
443        name = "updateMetadata",
444        accept = conjure_http::client::StdResponseDeserializer
445    )]
446    async fn update_metadata(
447        &self,
448        #[auth]
449        auth_: &conjure_object::BearerToken,
450        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
451        rid: &super::super::super::objects::scout::rids::api::NotebookRid,
452        #[body(serializer = conjure_http::client::StdRequestSerializer)]
453        request: &super::super::super::objects::scout::notebook::api::UpdateNotebookMetadataRequest,
454    ) -> Result<
455        super::super::super::objects::scout::notebook::api::NotebookMetadata,
456        conjure_http::private::Error,
457    >;
458    /// Returns the set of all ref names used by the workbook.
459    #[endpoint(
460        method = GET,
461        path = "/scout/v2/notebook/{rid}/ref-names",
462        name = "getUsedRefNames",
463        accept = conjure_http::client::conjure::CollectionResponseDeserializer
464    )]
465    async fn get_used_ref_names(
466        &self,
467        #[auth]
468        auth_: &conjure_object::BearerToken,
469        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
470        rid: &super::super::super::objects::scout::rids::api::NotebookRid,
471    ) -> Result<
472        std::collections::BTreeSet<
473            super::super::super::objects::scout::api::DataSourceRefName,
474        >,
475        conjure_http::private::Error,
476    >;
477    /// Updates the data source ref names for all variables used in the workbook.
478    #[endpoint(
479        method = POST,
480        path = "/scout/v2/notebook/{rid}/update-ref-names",
481        name = "updateRefNames",
482        accept = conjure_http::client::StdResponseDeserializer
483    )]
484    async fn update_ref_names(
485        &self,
486        #[auth]
487        auth_: &conjure_object::BearerToken,
488        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
489        rid: &super::super::super::objects::scout::rids::api::NotebookRid,
490        #[body(serializer = conjure_http::client::StdRequestSerializer)]
491        request: &super::super::super::objects::scout::notebook::api::UpdateRefNameRequest,
492    ) -> Result<
493        super::super::super::objects::scout::notebook::api::Notebook,
494        conjure_http::private::Error,
495    >;
496    /// Returns all properties (key value pairs) and labels that have been previously used on workbook. These can
497    /// be used to organize workbooks.
498    #[endpoint(
499        method = GET,
500        path = "/scout/v2/notebook/get-all-labels-properties",
501        name = "getAllLabelsAndProperties",
502        accept = conjure_http::client::StdResponseDeserializer
503    )]
504    async fn get_all_labels_and_properties(
505        &self,
506        #[auth]
507        auth_: &conjure_object::BearerToken,
508        #[query(
509            name = "workspaces",
510            encoder = conjure_http::client::conjure::PlainSeqEncoder
511        )]
512        workspaces: &std::collections::BTreeSet<conjure_object::ResourceIdentifier>,
513    ) -> Result<
514        super::super::super::objects::scout::notebook::api::GetAllLabelsAndPropertiesResponse,
515        conjure_http::private::Error,
516    >;
517    #[endpoint(
518        method = POST,
519        path = "/scout/v2/notebook/search",
520        name = "search",
521        accept = conjure_http::client::StdResponseDeserializer
522    )]
523    async fn search(
524        &self,
525        #[auth]
526        auth_: &conjure_object::BearerToken,
527        #[body(serializer = conjure_http::client::StdRequestSerializer)]
528        request: &super::super::super::objects::scout::notebook::api::SearchNotebooksRequest,
529    ) -> Result<
530        super::super::super::objects::scout::notebook::api::SearchNotebooksResponse,
531        conjure_http::private::Error,
532    >;
533    /// Batch edits metadata across multiple workbooks. Supports rename/merge for labels and properties.
534    /// If more than 1000 workbooks are targeted, this endpoint will throw a 400.
535    #[endpoint(
536        method = POST,
537        path = "/scout/v2/notebook/metadata/batch-edit",
538        name = "batchEditNotebookMetadata",
539        accept = conjure_http::client::StdResponseDeserializer
540    )]
541    async fn batch_edit_notebook_metadata(
542        &self,
543        #[auth]
544        auth_: &conjure_object::BearerToken,
545        #[body(serializer = conjure_http::client::StdRequestSerializer)]
546        request: &super::super::super::objects::scout::notebook::api::BatchEditNotebookMetadataRequest,
547    ) -> Result<
548        super::super::super::objects::scout::notebook::api::BatchEditNotebookMetadataResponse,
549        conjure_http::private::Error,
550    >;
551    /// Makes a workbook uneditable.
552    /// Deprecated: use the isLocked field on updateMetadata instead.
553    #[endpoint(
554        method = PUT,
555        path = "/scout/v2/notebook/{rid}/lock",
556        name = "lock",
557        accept = conjure_http::client::conjure::EmptyResponseDeserializer
558    )]
559    async fn lock(
560        &self,
561        #[auth]
562        auth_: &conjure_object::BearerToken,
563        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
564        rid: &super::super::super::objects::scout::rids::api::NotebookRid,
565    ) -> Result<(), conjure_http::private::Error>;
566    /// Unlocks a workbook for editing.
567    /// Deprecated: use the isLocked field on updateMetadata instead.
568    #[endpoint(
569        method = PUT,
570        path = "/scout/v2/notebook/{rid}/unlock",
571        name = "unlock",
572        accept = conjure_http::client::conjure::EmptyResponseDeserializer
573    )]
574    async fn unlock(
575        &self,
576        #[auth]
577        auth_: &conjure_object::BearerToken,
578        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
579        rid: &super::super::super::objects::scout::rids::api::NotebookRid,
580    ) -> Result<(), conjure_http::private::Error>;
581    /// Archives a workbook, which excludes it from search and hides it from being publicly visible, but does not
582    /// permanently delete it. Archived workbooks can be unarchived.
583    #[endpoint(
584        method = PUT,
585        path = "/scout/v2/notebook/{rid}/archive",
586        name = "archive",
587        accept = conjure_http::client::conjure::EmptyResponseDeserializer
588    )]
589    async fn archive(
590        &self,
591        #[auth]
592        auth_: &conjure_object::BearerToken,
593        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
594        rid: &super::super::super::objects::scout::rids::api::NotebookRid,
595    ) -> Result<(), conjure_http::private::Error>;
596    /// Makes a previously archived workbook searchable.
597    #[endpoint(
598        method = PUT,
599        path = "/scout/v2/notebook/{rid}/unarchive",
600        name = "unarchive",
601        accept = conjure_http::client::conjure::EmptyResponseDeserializer
602    )]
603    async fn unarchive(
604        &self,
605        #[auth]
606        auth_: &conjure_object::BearerToken,
607        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
608        rid: &super::super::super::objects::scout::rids::api::NotebookRid,
609    ) -> Result<(), conjure_http::private::Error>;
610    /// The workbook will be deleted and is not recoverable. For soft deletion, use archive.
611    #[endpoint(
612        method = DELETE,
613        path = "/scout/v2/notebook/{rid}",
614        name = "delete",
615        accept = conjure_http::client::conjure::EmptyResponseDeserializer
616    )]
617    async fn delete(
618        &self,
619        #[auth]
620        auth_: &conjure_object::BearerToken,
621        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
622        rid: &super::super::super::objects::scout::rids::api::NotebookRid,
623    ) -> Result<(), conjure_http::private::Error>;
624    /// Duplicates an existing workbook, copying its content (layout, charts, variables, pinned events)
625    /// and optionally overriding metadata fields such as title, description, data scope, labels,
626    /// and properties. Returns the newly created workbook.
627    #[endpoint(
628        method = POST,
629        path = "/scout/v2/notebook/{rid}/duplicate",
630        name = "duplicate",
631        accept = conjure_http::client::StdResponseDeserializer
632    )]
633    async fn duplicate(
634        &self,
635        #[auth]
636        auth_: &conjure_object::BearerToken,
637        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
638        rid: &super::super::super::objects::scout::rids::api::NotebookRid,
639        #[body(serializer = conjure_http::client::StdRequestSerializer)]
640        request: &super::super::super::objects::scout::notebook::api::DuplicateNotebookRequest,
641    ) -> Result<
642        super::super::super::objects::scout::notebook::api::Notebook,
643        conjure_http::private::Error,
644    >;
645    /// Retrieves the snapshot history for a given workbook. These are sorted in reverse chronological order. Results
646    /// are limited by page size.
647    #[endpoint(
648        method = POST,
649        path = "/scout/v2/notebook/snapshot-history",
650        name = "getSnapshotHistory",
651        accept = conjure_http::client::StdResponseDeserializer
652    )]
653    async fn get_snapshot_history(
654        &self,
655        #[auth]
656        auth_: &conjure_object::BearerToken,
657        #[body(serializer = conjure_http::client::StdRequestSerializer)]
658        request: &super::super::super::objects::scout::notebook::api::GetSnapshotHistoryRequest,
659    ) -> Result<
660        super::super::super::objects::scout::notebook::api::GetSnapshotHistoryResponse,
661        conjure_http::private::Error,
662    >;
663}
664/// NotebookService manages workbooks (formerly known as notebooks).
665#[conjure_http::conjure_client(name = "NotebookService", local)]
666pub trait LocalAsyncNotebookService<
667    #[response_body]
668    I: conjure_http::private::Stream<
669            Item = Result<conjure_http::private::Bytes, conjure_http::private::Error>,
670        >,
671> {
672    /// Creates a new workbook. The workbook will be associated with the provided run. If the run does not exist,
673    /// a RunNotFound error will be thrown.
674    #[endpoint(
675        method = POST,
676        path = "/scout/v2/notebook",
677        name = "create",
678        accept = conjure_http::client::StdResponseDeserializer
679    )]
680    async fn create(
681        &self,
682        #[auth]
683        auth_: &conjure_object::BearerToken,
684        #[body(serializer = conjure_http::client::StdRequestSerializer)]
685        request: &super::super::super::objects::scout::notebook::api::CreateNotebookRequest,
686    ) -> Result<
687        super::super::super::objects::scout::notebook::api::Notebook,
688        conjure_http::private::Error,
689    >;
690    /// Updates the contents of a workbook.
691    #[endpoint(
692        method = PUT,
693        path = "/scout/v2/notebook/{rid}",
694        name = "update",
695        accept = conjure_http::client::StdResponseDeserializer
696    )]
697    async fn update(
698        &self,
699        #[auth]
700        auth_: &conjure_object::BearerToken,
701        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
702        rid: &super::super::super::objects::scout::rids::api::NotebookRid,
703        #[body(serializer = conjure_http::client::StdRequestSerializer)]
704        request: &super::super::super::objects::scout::notebook::api::UpdateNotebookRequest,
705    ) -> Result<
706        super::super::super::objects::scout::notebook::api::Notebook,
707        conjure_http::private::Error,
708    >;
709    #[endpoint(
710        method = GET,
711        path = "/scout/v2/notebook/{rid}",
712        name = "get",
713        accept = conjure_http::client::StdResponseDeserializer
714    )]
715    async fn get(
716        &self,
717        #[auth]
718        auth_: &conjure_object::BearerToken,
719        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
720        rid: &super::super::super::objects::scout::rids::api::NotebookRid,
721        #[query(
722            name = "snapshot",
723            encoder = conjure_http::client::conjure::PlainSeqEncoder
724        )]
725        snapshot: Option<&super::super::super::objects::scout::rids::api::SnapshotRid>,
726    ) -> Result<
727        super::super::super::objects::scout::notebook::api::Notebook,
728        conjure_http::private::Error,
729    >;
730    #[endpoint(
731        method = POST,
732        path = "/scout/v2/notebook/batch-get",
733        name = "batchGet",
734        accept = conjure_http::client::conjure::CollectionResponseDeserializer
735    )]
736    async fn batch_get(
737        &self,
738        #[auth]
739        auth_: &conjure_object::BearerToken,
740        #[body(serializer = conjure_http::client::StdRequestSerializer)]
741        rids: &std::collections::BTreeSet<
742            super::super::super::objects::scout::rids::api::NotebookRid,
743        >,
744    ) -> Result<
745        std::collections::BTreeSet<
746            super::super::super::objects::scout::notebook::api::Notebook,
747        >,
748        conjure_http::private::Error,
749    >;
750    #[endpoint(
751        method = POST,
752        path = "/scout/v2/notebook/batch-get-metadata",
753        name = "batchGetMetadata",
754        accept = conjure_http::client::conjure::CollectionResponseDeserializer
755    )]
756    async fn batch_get_metadata(
757        &self,
758        #[auth]
759        auth_: &conjure_object::BearerToken,
760        #[body(serializer = conjure_http::client::StdRequestSerializer)]
761        rids: &std::collections::BTreeSet<
762            super::super::super::objects::scout::rids::api::NotebookRid,
763        >,
764    ) -> Result<
765        std::collections::BTreeSet<
766            super::super::super::objects::scout::notebook::api::NotebookMetadataWithRid,
767        >,
768        conjure_http::private::Error,
769    >;
770    /// Updates metadata about a workbook, but not its contents.
771    #[endpoint(
772        method = PUT,
773        path = "/scout/v2/notebook/{rid}/update-metadata",
774        name = "updateMetadata",
775        accept = conjure_http::client::StdResponseDeserializer
776    )]
777    async fn update_metadata(
778        &self,
779        #[auth]
780        auth_: &conjure_object::BearerToken,
781        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
782        rid: &super::super::super::objects::scout::rids::api::NotebookRid,
783        #[body(serializer = conjure_http::client::StdRequestSerializer)]
784        request: &super::super::super::objects::scout::notebook::api::UpdateNotebookMetadataRequest,
785    ) -> Result<
786        super::super::super::objects::scout::notebook::api::NotebookMetadata,
787        conjure_http::private::Error,
788    >;
789    /// Returns the set of all ref names used by the workbook.
790    #[endpoint(
791        method = GET,
792        path = "/scout/v2/notebook/{rid}/ref-names",
793        name = "getUsedRefNames",
794        accept = conjure_http::client::conjure::CollectionResponseDeserializer
795    )]
796    async fn get_used_ref_names(
797        &self,
798        #[auth]
799        auth_: &conjure_object::BearerToken,
800        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
801        rid: &super::super::super::objects::scout::rids::api::NotebookRid,
802    ) -> Result<
803        std::collections::BTreeSet<
804            super::super::super::objects::scout::api::DataSourceRefName,
805        >,
806        conjure_http::private::Error,
807    >;
808    /// Updates the data source ref names for all variables used in the workbook.
809    #[endpoint(
810        method = POST,
811        path = "/scout/v2/notebook/{rid}/update-ref-names",
812        name = "updateRefNames",
813        accept = conjure_http::client::StdResponseDeserializer
814    )]
815    async fn update_ref_names(
816        &self,
817        #[auth]
818        auth_: &conjure_object::BearerToken,
819        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
820        rid: &super::super::super::objects::scout::rids::api::NotebookRid,
821        #[body(serializer = conjure_http::client::StdRequestSerializer)]
822        request: &super::super::super::objects::scout::notebook::api::UpdateRefNameRequest,
823    ) -> Result<
824        super::super::super::objects::scout::notebook::api::Notebook,
825        conjure_http::private::Error,
826    >;
827    /// Returns all properties (key value pairs) and labels that have been previously used on workbook. These can
828    /// be used to organize workbooks.
829    #[endpoint(
830        method = GET,
831        path = "/scout/v2/notebook/get-all-labels-properties",
832        name = "getAllLabelsAndProperties",
833        accept = conjure_http::client::StdResponseDeserializer
834    )]
835    async fn get_all_labels_and_properties(
836        &self,
837        #[auth]
838        auth_: &conjure_object::BearerToken,
839        #[query(
840            name = "workspaces",
841            encoder = conjure_http::client::conjure::PlainSeqEncoder
842        )]
843        workspaces: &std::collections::BTreeSet<conjure_object::ResourceIdentifier>,
844    ) -> Result<
845        super::super::super::objects::scout::notebook::api::GetAllLabelsAndPropertiesResponse,
846        conjure_http::private::Error,
847    >;
848    #[endpoint(
849        method = POST,
850        path = "/scout/v2/notebook/search",
851        name = "search",
852        accept = conjure_http::client::StdResponseDeserializer
853    )]
854    async fn search(
855        &self,
856        #[auth]
857        auth_: &conjure_object::BearerToken,
858        #[body(serializer = conjure_http::client::StdRequestSerializer)]
859        request: &super::super::super::objects::scout::notebook::api::SearchNotebooksRequest,
860    ) -> Result<
861        super::super::super::objects::scout::notebook::api::SearchNotebooksResponse,
862        conjure_http::private::Error,
863    >;
864    /// Batch edits metadata across multiple workbooks. Supports rename/merge for labels and properties.
865    /// If more than 1000 workbooks are targeted, this endpoint will throw a 400.
866    #[endpoint(
867        method = POST,
868        path = "/scout/v2/notebook/metadata/batch-edit",
869        name = "batchEditNotebookMetadata",
870        accept = conjure_http::client::StdResponseDeserializer
871    )]
872    async fn batch_edit_notebook_metadata(
873        &self,
874        #[auth]
875        auth_: &conjure_object::BearerToken,
876        #[body(serializer = conjure_http::client::StdRequestSerializer)]
877        request: &super::super::super::objects::scout::notebook::api::BatchEditNotebookMetadataRequest,
878    ) -> Result<
879        super::super::super::objects::scout::notebook::api::BatchEditNotebookMetadataResponse,
880        conjure_http::private::Error,
881    >;
882    /// Makes a workbook uneditable.
883    /// Deprecated: use the isLocked field on updateMetadata instead.
884    #[endpoint(
885        method = PUT,
886        path = "/scout/v2/notebook/{rid}/lock",
887        name = "lock",
888        accept = conjure_http::client::conjure::EmptyResponseDeserializer
889    )]
890    async fn lock(
891        &self,
892        #[auth]
893        auth_: &conjure_object::BearerToken,
894        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
895        rid: &super::super::super::objects::scout::rids::api::NotebookRid,
896    ) -> Result<(), conjure_http::private::Error>;
897    /// Unlocks a workbook for editing.
898    /// Deprecated: use the isLocked field on updateMetadata instead.
899    #[endpoint(
900        method = PUT,
901        path = "/scout/v2/notebook/{rid}/unlock",
902        name = "unlock",
903        accept = conjure_http::client::conjure::EmptyResponseDeserializer
904    )]
905    async fn unlock(
906        &self,
907        #[auth]
908        auth_: &conjure_object::BearerToken,
909        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
910        rid: &super::super::super::objects::scout::rids::api::NotebookRid,
911    ) -> Result<(), conjure_http::private::Error>;
912    /// Archives a workbook, which excludes it from search and hides it from being publicly visible, but does not
913    /// permanently delete it. Archived workbooks can be unarchived.
914    #[endpoint(
915        method = PUT,
916        path = "/scout/v2/notebook/{rid}/archive",
917        name = "archive",
918        accept = conjure_http::client::conjure::EmptyResponseDeserializer
919    )]
920    async fn archive(
921        &self,
922        #[auth]
923        auth_: &conjure_object::BearerToken,
924        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
925        rid: &super::super::super::objects::scout::rids::api::NotebookRid,
926    ) -> Result<(), conjure_http::private::Error>;
927    /// Makes a previously archived workbook searchable.
928    #[endpoint(
929        method = PUT,
930        path = "/scout/v2/notebook/{rid}/unarchive",
931        name = "unarchive",
932        accept = conjure_http::client::conjure::EmptyResponseDeserializer
933    )]
934    async fn unarchive(
935        &self,
936        #[auth]
937        auth_: &conjure_object::BearerToken,
938        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
939        rid: &super::super::super::objects::scout::rids::api::NotebookRid,
940    ) -> Result<(), conjure_http::private::Error>;
941    /// The workbook will be deleted and is not recoverable. For soft deletion, use archive.
942    #[endpoint(
943        method = DELETE,
944        path = "/scout/v2/notebook/{rid}",
945        name = "delete",
946        accept = conjure_http::client::conjure::EmptyResponseDeserializer
947    )]
948    async fn delete(
949        &self,
950        #[auth]
951        auth_: &conjure_object::BearerToken,
952        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
953        rid: &super::super::super::objects::scout::rids::api::NotebookRid,
954    ) -> Result<(), conjure_http::private::Error>;
955    /// Duplicates an existing workbook, copying its content (layout, charts, variables, pinned events)
956    /// and optionally overriding metadata fields such as title, description, data scope, labels,
957    /// and properties. Returns the newly created workbook.
958    #[endpoint(
959        method = POST,
960        path = "/scout/v2/notebook/{rid}/duplicate",
961        name = "duplicate",
962        accept = conjure_http::client::StdResponseDeserializer
963    )]
964    async fn duplicate(
965        &self,
966        #[auth]
967        auth_: &conjure_object::BearerToken,
968        #[path(name = "rid", encoder = conjure_http::client::conjure::PlainEncoder)]
969        rid: &super::super::super::objects::scout::rids::api::NotebookRid,
970        #[body(serializer = conjure_http::client::StdRequestSerializer)]
971        request: &super::super::super::objects::scout::notebook::api::DuplicateNotebookRequest,
972    ) -> Result<
973        super::super::super::objects::scout::notebook::api::Notebook,
974        conjure_http::private::Error,
975    >;
976    /// Retrieves the snapshot history for a given workbook. These are sorted in reverse chronological order. Results
977    /// are limited by page size.
978    #[endpoint(
979        method = POST,
980        path = "/scout/v2/notebook/snapshot-history",
981        name = "getSnapshotHistory",
982        accept = conjure_http::client::StdResponseDeserializer
983    )]
984    async fn get_snapshot_history(
985        &self,
986        #[auth]
987        auth_: &conjure_object::BearerToken,
988        #[body(serializer = conjure_http::client::StdRequestSerializer)]
989        request: &super::super::super::objects::scout::notebook::api::GetSnapshotHistoryRequest,
990    ) -> Result<
991        super::super::super::objects::scout::notebook::api::GetSnapshotHistoryResponse,
992        conjure_http::private::Error,
993    >;
994}