Skip to main content

nominal_api/conjure/clients/scout/datasource/
data_source_service.rs

1use conjure_http::endpoint;
2/// Data sources are data input to runs, including databases, CSV, video, and streaming data. They contain channels that represent the series data.
3/// The DataSource Service is responsible for indexing and searching channels across data sources.
4#[conjure_http::conjure_client(name = "DataSourceService")]
5pub trait DataSourceService<
6    #[response_body]
7    I: Iterator<
8            Item = Result<conjure_http::private::Bytes, conjure_http::private::Error>,
9        >,
10> {
11    /// Returns channels that match the search criteria. Results are sorted by similarity score.
12    #[endpoint(
13        method = POST,
14        path = "/data-source/v1/data-sources/search-channels",
15        name = "searchChannels",
16        accept = conjure_http::client::StdResponseDeserializer
17    )]
18    fn search_channels(
19        &self,
20        #[auth]
21        auth_: &conjure_object::BearerToken,
22        #[body(serializer = conjure_http::client::StdRequestSerializer)]
23        query: &super::super::super::super::objects::datasource::api::SearchChannelsRequest,
24    ) -> Result<
25        super::super::super::super::objects::datasource::api::SearchChannelsResponse,
26        conjure_http::private::Error,
27    >;
28    /// Returns channels that match the search criteria. Results are sorted by similarity score.
29    #[endpoint(
30        method = POST,
31        path = "/data-source/v1/data-sources/search-filtered-channels",
32        name = "searchFilteredChannels",
33        accept = conjure_http::client::StdResponseDeserializer
34    )]
35    fn search_filtered_channels(
36        &self,
37        #[auth]
38        auth_: &conjure_object::BearerToken,
39        #[body(serializer = conjure_http::client::StdRequestSerializer)]
40        query: &super::super::super::super::objects::datasource::api::SearchFilteredChannelsRequest,
41    ) -> Result<
42        super::super::super::super::objects::datasource::api::SearchFilteredChannelsResponse,
43        conjure_http::private::Error,
44    >;
45    /// Returns only channels that are direct children of the parent. Returns results sorted alphabetically.
46    #[endpoint(
47        method = POST,
48        path = "/data-source/v1/data-sources/search-hierarchical-channels",
49        name = "searchHierarchicalChannels",
50        accept = conjure_http::client::StdResponseDeserializer
51    )]
52    fn search_hierarchical_channels(
53        &self,
54        #[auth]
55        auth_: &conjure_object::BearerToken,
56        #[body(serializer = conjure_http::client::StdRequestSerializer)]
57        query: &super::super::super::super::objects::datasource::api::SearchHierarchicalChannelsRequest,
58    ) -> Result<
59        super::super::super::super::objects::datasource::api::SearchHierarchicalChannelsResponse,
60        conjure_http::private::Error,
61    >;
62    /// Indexes the channel prefix tree for a specified data source. This operation constructs a prefix tree from the
63    /// channels available in the data source.
64    #[endpoint(
65        method = POST,
66        path = "/data-source/v1/data-sources/index-channel-prefix-tree",
67        name = "indexChannelPrefixTree",
68        accept = conjure_http::client::StdResponseDeserializer
69    )]
70    fn index_channel_prefix_tree(
71        &self,
72        #[auth]
73        auth_: &conjure_object::BearerToken,
74        #[body(serializer = conjure_http::client::StdRequestSerializer)]
75        request: &super::super::super::super::objects::datasource::api::IndexChannelPrefixTreeRequest,
76    ) -> Result<
77        super::super::super::super::objects::datasource::api::ChannelPrefixTree,
78        conjure_http::private::Error,
79    >;
80    /// Clears the channel hierarchy delimiter for a specified data source, removing any previously indexed
81    /// prefix tree. After calling this endpoint, the data source will no longer have hierarchical channel browsing
82    /// enabled until a new delimiter is set via indexChannelPrefixTree.
83    #[endpoint(
84        method = POST,
85        path = "/data-source/v1/data-sources/clear-channel-prefix-tree",
86        name = "clearChannelPrefixTree",
87        accept = conjure_http::client::conjure::EmptyResponseDeserializer
88    )]
89    fn clear_channel_prefix_tree(
90        &self,
91        #[auth]
92        auth_: &conjure_object::BearerToken,
93        #[body(serializer = conjure_http::client::StdRequestSerializer)]
94        request: &super::super::super::super::objects::datasource::api::ClearChannelPrefixTreeRequest,
95    ) -> Result<(), conjure_http::private::Error>;
96    /// Returns the channel prefix tree for each of the specified data sources. If the tree for a data source has not
97    /// been indexed, it will be omitted from the map.
98    #[endpoint(
99        method = POST,
100        path = "/data-source/v1/data-sources/batch-get-channel-prefix-tree",
101        name = "batchGetChannelPrefixTrees",
102        accept = conjure_http::client::StdResponseDeserializer
103    )]
104    fn batch_get_channel_prefix_trees(
105        &self,
106        #[auth]
107        auth_: &conjure_object::BearerToken,
108        #[body(serializer = conjure_http::client::StdRequestSerializer)]
109        request: &super::super::super::super::objects::datasource::api::BatchGetChannelPrefixTreeRequest,
110    ) -> Result<
111        super::super::super::super::objects::datasource::api::BatchGetChannelPrefixTreeResponse,
112        conjure_http::private::Error,
113    >;
114    /// Returns the the set of all tag keys and their values that are available for the specified channel given an
115    /// initial set of filters.
116    #[endpoint(
117        method = POST,
118        path = "/data-source/v1/data-sources/get-available-tags",
119        name = "getAvailableTagsForChannel",
120        accept = conjure_http::client::StdResponseDeserializer
121    )]
122    fn get_available_tags_for_channel(
123        &self,
124        #[auth]
125        auth_: &conjure_object::BearerToken,
126        #[body(serializer = conjure_http::client::StdRequestSerializer)]
127        request: &super::super::super::super::objects::datasource::api::GetAvailableTagsForChannelRequest,
128    ) -> Result<
129        super::super::super::super::objects::datasource::api::GetAvailableTagsForChannelResponse,
130        conjure_http::private::Error,
131    >;
132    /// Returns the maximum data timestamps for the specified data scopes. Responses are returned
133    /// in the same order as requests.
134    #[endpoint(
135        method = POST,
136        path = "/data-source/v1/data-sources/get-data-scope-bounds",
137        name = "getDataScopeBounds",
138        accept = conjure_http::client::StdResponseDeserializer
139    )]
140    fn get_data_scope_bounds(
141        &self,
142        #[auth]
143        auth_: &conjure_object::BearerToken,
144        #[body(serializer = conjure_http::client::StdRequestSerializer)]
145        request: &super::super::super::super::objects::datasource::api::BatchGetDataScopeBoundsRequest,
146    ) -> Result<
147        super::super::super::super::objects::datasource::api::BatchGetDataScopeBoundsResponse,
148        conjure_http::private::Error,
149    >;
150    /// Returns available tag values for a given data source for a set of tag keys. For Nominal data sources, a time
151    /// range can be provided to filter tag values to those present within the months spanned by the range. If no
152    /// time range is provided, this defaults to the last month. For external data sources, the range must not be
153    /// specified, as all tag values are returned.
154    #[endpoint(
155        method = POST,
156        path = "/data-source/v1/data-sources/{dataSourceRid}/get-tags",
157        name = "getTagValuesForDataSource",
158        accept = conjure_http::client::conjure::CollectionResponseDeserializer
159    )]
160    fn get_tag_values_for_data_source(
161        &self,
162        #[auth]
163        auth_: &conjure_object::BearerToken,
164        #[path(
165            name = "dataSourceRid",
166            encoder = conjure_http::client::conjure::PlainEncoder
167        )]
168        data_source_rid: &conjure_object::ResourceIdentifier,
169        #[body(serializer = conjure_http::client::StdRequestSerializer)]
170        request: &super::super::super::super::objects::datasource::api::GetTagValuesForDataSourceRequest,
171    ) -> Result<
172        std::collections::BTreeMap<String, std::collections::BTreeSet<String>>,
173        conjure_http::private::Error,
174    >;
175    /// Paged endpoint returning the set of all tag keys that are available for the specified channel given an
176    /// initial set of filters.
177    /// If any tag filters are supplied, their tag keys are omitted from the result.
178    #[endpoint(
179        method = POST,
180        path = "/data-source/v1/data-sources/{dataSourceRid}/get-tag-keys",
181        name = "getAvailableTagKeys",
182        accept = conjure_http::client::StdResponseDeserializer
183    )]
184    fn get_available_tag_keys(
185        &self,
186        #[auth]
187        auth_: &conjure_object::BearerToken,
188        #[path(
189            name = "dataSourceRid",
190            encoder = conjure_http::client::conjure::PlainEncoder
191        )]
192        data_source_rid: &conjure_object::ResourceIdentifier,
193        #[body(serializer = conjure_http::client::StdRequestSerializer)]
194        request: &super::super::super::super::objects::datasource::api::GetAvailableTagKeysRequest,
195    ) -> Result<
196        super::super::super::super::objects::datasource::api::GetAvailableTagKeysResponse,
197        conjure_http::private::Error,
198    >;
199    /// Paged endpoint returning the set of all tag values that are available for the specified tag and datasource
200    /// given an initial set of filters.
201    #[endpoint(
202        method = POST,
203        path = "/data-source/v1/data-sources/{dataSourceRid}/get-tag-values",
204        name = "getAvailableTagValues",
205        accept = conjure_http::client::StdResponseDeserializer
206    )]
207    fn get_available_tag_values(
208        &self,
209        #[auth]
210        auth_: &conjure_object::BearerToken,
211        #[path(
212            name = "dataSourceRid",
213            encoder = conjure_http::client::conjure::PlainEncoder
214        )]
215        data_source_rid: &conjure_object::ResourceIdentifier,
216        #[body(serializer = conjure_http::client::StdRequestSerializer)]
217        request: &super::super::super::super::objects::datasource::api::GetAvailableTagValuesRequest,
218    ) -> Result<
219        super::super::super::super::objects::datasource::api::GetAvailableTagValuesResponse,
220        conjure_http::private::Error,
221    >;
222    /// Returns the set of all tag keys and their values for each specified channel given
223    /// initial sets of filters. Each response corresponds positionally to the input request.
224    #[endpoint(
225        method = POST,
226        path = "/data-source/v1/data-sources/batch-get-available-tags",
227        name = "batchGetAvailableTagsForChannel",
228        accept = conjure_http::client::StdResponseDeserializer
229    )]
230    fn batch_get_available_tags_for_channel(
231        &self,
232        #[auth]
233        auth_: &conjure_object::BearerToken,
234        #[body(serializer = conjure_http::client::StdRequestSerializer)]
235        request: &super::super::super::super::objects::datasource::api::BatchGetAvailableTagsForChannelRequest,
236    ) -> Result<
237        super::super::super::super::objects::datasource::api::BatchGetAvailableTagsForChannelResponse,
238        conjure_http::private::Error,
239    >;
240    /// Returns the number of distinct series matching each request's datasource, channel, range,
241    /// and tag filters. Each response corresponds positionally to the input request.
242    /// Returns empty seriesCount for non-Nominal datasources.
243    #[endpoint(
244        method = POST,
245        path = "/data-source/v1/data-sources/batch-get-series-count",
246        name = "batchGetSeriesCount",
247        accept = conjure_http::client::StdResponseDeserializer
248    )]
249    fn batch_get_series_count(
250        &self,
251        #[auth]
252        auth_: &conjure_object::BearerToken,
253        #[body(serializer = conjure_http::client::StdRequestSerializer)]
254        request: &super::super::super::super::objects::datasource::api::BatchGetSeriesCountRequest,
255    ) -> Result<
256        super::super::super::super::objects::datasource::api::BatchGetSeriesCountResponse,
257        conjure_http::private::Error,
258    >;
259    /// Returns (channel, full-tag-map) entries for a specific channel in a dataset.
260    /// If tags are provided, each entry must match all provided key/value pairs; extra tags may still be present.
261    /// Only numeric-data series are returned; video series are excluded.
262    #[endpoint(
263        method = POST,
264        path = "/data-source/v1/data-sources/get-matching-channels-with-tags",
265        name = "getMatchingChannelsWithTags",
266        accept = conjure_http::client::StdResponseDeserializer
267    )]
268    fn get_matching_channels_with_tags(
269        &self,
270        #[auth]
271        auth_: &conjure_object::BearerToken,
272        #[body(serializer = conjure_http::client::StdRequestSerializer)]
273        request: &super::super::super::super::objects::datasource::api::GetMatchingChannelsWithTagsRequest,
274    ) -> Result<
275        super::super::super::super::objects::datasource::api::GetMatchingChannelsWithTagsResponse,
276        conjure_http::private::Error,
277    >;
278}
279/// Data sources are data input to runs, including databases, CSV, video, and streaming data. They contain channels that represent the series data.
280/// The DataSource Service is responsible for indexing and searching channels across data sources.
281#[conjure_http::conjure_client(name = "DataSourceService")]
282pub trait AsyncDataSourceService<
283    #[response_body]
284    I: conjure_http::private::Stream<
285            Item = Result<conjure_http::private::Bytes, conjure_http::private::Error>,
286        >,
287> {
288    /// Returns channels that match the search criteria. Results are sorted by similarity score.
289    #[endpoint(
290        method = POST,
291        path = "/data-source/v1/data-sources/search-channels",
292        name = "searchChannels",
293        accept = conjure_http::client::StdResponseDeserializer
294    )]
295    async fn search_channels(
296        &self,
297        #[auth]
298        auth_: &conjure_object::BearerToken,
299        #[body(serializer = conjure_http::client::StdRequestSerializer)]
300        query: &super::super::super::super::objects::datasource::api::SearchChannelsRequest,
301    ) -> Result<
302        super::super::super::super::objects::datasource::api::SearchChannelsResponse,
303        conjure_http::private::Error,
304    >;
305    /// Returns channels that match the search criteria. Results are sorted by similarity score.
306    #[endpoint(
307        method = POST,
308        path = "/data-source/v1/data-sources/search-filtered-channels",
309        name = "searchFilteredChannels",
310        accept = conjure_http::client::StdResponseDeserializer
311    )]
312    async fn search_filtered_channels(
313        &self,
314        #[auth]
315        auth_: &conjure_object::BearerToken,
316        #[body(serializer = conjure_http::client::StdRequestSerializer)]
317        query: &super::super::super::super::objects::datasource::api::SearchFilteredChannelsRequest,
318    ) -> Result<
319        super::super::super::super::objects::datasource::api::SearchFilteredChannelsResponse,
320        conjure_http::private::Error,
321    >;
322    /// Returns only channels that are direct children of the parent. Returns results sorted alphabetically.
323    #[endpoint(
324        method = POST,
325        path = "/data-source/v1/data-sources/search-hierarchical-channels",
326        name = "searchHierarchicalChannels",
327        accept = conjure_http::client::StdResponseDeserializer
328    )]
329    async fn search_hierarchical_channels(
330        &self,
331        #[auth]
332        auth_: &conjure_object::BearerToken,
333        #[body(serializer = conjure_http::client::StdRequestSerializer)]
334        query: &super::super::super::super::objects::datasource::api::SearchHierarchicalChannelsRequest,
335    ) -> Result<
336        super::super::super::super::objects::datasource::api::SearchHierarchicalChannelsResponse,
337        conjure_http::private::Error,
338    >;
339    /// Indexes the channel prefix tree for a specified data source. This operation constructs a prefix tree from the
340    /// channels available in the data source.
341    #[endpoint(
342        method = POST,
343        path = "/data-source/v1/data-sources/index-channel-prefix-tree",
344        name = "indexChannelPrefixTree",
345        accept = conjure_http::client::StdResponseDeserializer
346    )]
347    async fn index_channel_prefix_tree(
348        &self,
349        #[auth]
350        auth_: &conjure_object::BearerToken,
351        #[body(serializer = conjure_http::client::StdRequestSerializer)]
352        request: &super::super::super::super::objects::datasource::api::IndexChannelPrefixTreeRequest,
353    ) -> Result<
354        super::super::super::super::objects::datasource::api::ChannelPrefixTree,
355        conjure_http::private::Error,
356    >;
357    /// Clears the channel hierarchy delimiter for a specified data source, removing any previously indexed
358    /// prefix tree. After calling this endpoint, the data source will no longer have hierarchical channel browsing
359    /// enabled until a new delimiter is set via indexChannelPrefixTree.
360    #[endpoint(
361        method = POST,
362        path = "/data-source/v1/data-sources/clear-channel-prefix-tree",
363        name = "clearChannelPrefixTree",
364        accept = conjure_http::client::conjure::EmptyResponseDeserializer
365    )]
366    async fn clear_channel_prefix_tree(
367        &self,
368        #[auth]
369        auth_: &conjure_object::BearerToken,
370        #[body(serializer = conjure_http::client::StdRequestSerializer)]
371        request: &super::super::super::super::objects::datasource::api::ClearChannelPrefixTreeRequest,
372    ) -> Result<(), conjure_http::private::Error>;
373    /// Returns the channel prefix tree for each of the specified data sources. If the tree for a data source has not
374    /// been indexed, it will be omitted from the map.
375    #[endpoint(
376        method = POST,
377        path = "/data-source/v1/data-sources/batch-get-channel-prefix-tree",
378        name = "batchGetChannelPrefixTrees",
379        accept = conjure_http::client::StdResponseDeserializer
380    )]
381    async fn batch_get_channel_prefix_trees(
382        &self,
383        #[auth]
384        auth_: &conjure_object::BearerToken,
385        #[body(serializer = conjure_http::client::StdRequestSerializer)]
386        request: &super::super::super::super::objects::datasource::api::BatchGetChannelPrefixTreeRequest,
387    ) -> Result<
388        super::super::super::super::objects::datasource::api::BatchGetChannelPrefixTreeResponse,
389        conjure_http::private::Error,
390    >;
391    /// Returns the the set of all tag keys and their values that are available for the specified channel given an
392    /// initial set of filters.
393    #[endpoint(
394        method = POST,
395        path = "/data-source/v1/data-sources/get-available-tags",
396        name = "getAvailableTagsForChannel",
397        accept = conjure_http::client::StdResponseDeserializer
398    )]
399    async fn get_available_tags_for_channel(
400        &self,
401        #[auth]
402        auth_: &conjure_object::BearerToken,
403        #[body(serializer = conjure_http::client::StdRequestSerializer)]
404        request: &super::super::super::super::objects::datasource::api::GetAvailableTagsForChannelRequest,
405    ) -> Result<
406        super::super::super::super::objects::datasource::api::GetAvailableTagsForChannelResponse,
407        conjure_http::private::Error,
408    >;
409    /// Returns the maximum data timestamps for the specified data scopes. Responses are returned
410    /// in the same order as requests.
411    #[endpoint(
412        method = POST,
413        path = "/data-source/v1/data-sources/get-data-scope-bounds",
414        name = "getDataScopeBounds",
415        accept = conjure_http::client::StdResponseDeserializer
416    )]
417    async fn get_data_scope_bounds(
418        &self,
419        #[auth]
420        auth_: &conjure_object::BearerToken,
421        #[body(serializer = conjure_http::client::StdRequestSerializer)]
422        request: &super::super::super::super::objects::datasource::api::BatchGetDataScopeBoundsRequest,
423    ) -> Result<
424        super::super::super::super::objects::datasource::api::BatchGetDataScopeBoundsResponse,
425        conjure_http::private::Error,
426    >;
427    /// Returns available tag values for a given data source for a set of tag keys. For Nominal data sources, a time
428    /// range can be provided to filter tag values to those present within the months spanned by the range. If no
429    /// time range is provided, this defaults to the last month. For external data sources, the range must not be
430    /// specified, as all tag values are returned.
431    #[endpoint(
432        method = POST,
433        path = "/data-source/v1/data-sources/{dataSourceRid}/get-tags",
434        name = "getTagValuesForDataSource",
435        accept = conjure_http::client::conjure::CollectionResponseDeserializer
436    )]
437    async fn get_tag_values_for_data_source(
438        &self,
439        #[auth]
440        auth_: &conjure_object::BearerToken,
441        #[path(
442            name = "dataSourceRid",
443            encoder = conjure_http::client::conjure::PlainEncoder
444        )]
445        data_source_rid: &conjure_object::ResourceIdentifier,
446        #[body(serializer = conjure_http::client::StdRequestSerializer)]
447        request: &super::super::super::super::objects::datasource::api::GetTagValuesForDataSourceRequest,
448    ) -> Result<
449        std::collections::BTreeMap<String, std::collections::BTreeSet<String>>,
450        conjure_http::private::Error,
451    >;
452    /// Paged endpoint returning the set of all tag keys that are available for the specified channel given an
453    /// initial set of filters.
454    /// If any tag filters are supplied, their tag keys are omitted from the result.
455    #[endpoint(
456        method = POST,
457        path = "/data-source/v1/data-sources/{dataSourceRid}/get-tag-keys",
458        name = "getAvailableTagKeys",
459        accept = conjure_http::client::StdResponseDeserializer
460    )]
461    async fn get_available_tag_keys(
462        &self,
463        #[auth]
464        auth_: &conjure_object::BearerToken,
465        #[path(
466            name = "dataSourceRid",
467            encoder = conjure_http::client::conjure::PlainEncoder
468        )]
469        data_source_rid: &conjure_object::ResourceIdentifier,
470        #[body(serializer = conjure_http::client::StdRequestSerializer)]
471        request: &super::super::super::super::objects::datasource::api::GetAvailableTagKeysRequest,
472    ) -> Result<
473        super::super::super::super::objects::datasource::api::GetAvailableTagKeysResponse,
474        conjure_http::private::Error,
475    >;
476    /// Paged endpoint returning the set of all tag values that are available for the specified tag and datasource
477    /// given an initial set of filters.
478    #[endpoint(
479        method = POST,
480        path = "/data-source/v1/data-sources/{dataSourceRid}/get-tag-values",
481        name = "getAvailableTagValues",
482        accept = conjure_http::client::StdResponseDeserializer
483    )]
484    async fn get_available_tag_values(
485        &self,
486        #[auth]
487        auth_: &conjure_object::BearerToken,
488        #[path(
489            name = "dataSourceRid",
490            encoder = conjure_http::client::conjure::PlainEncoder
491        )]
492        data_source_rid: &conjure_object::ResourceIdentifier,
493        #[body(serializer = conjure_http::client::StdRequestSerializer)]
494        request: &super::super::super::super::objects::datasource::api::GetAvailableTagValuesRequest,
495    ) -> Result<
496        super::super::super::super::objects::datasource::api::GetAvailableTagValuesResponse,
497        conjure_http::private::Error,
498    >;
499    /// Returns the set of all tag keys and their values for each specified channel given
500    /// initial sets of filters. Each response corresponds positionally to the input request.
501    #[endpoint(
502        method = POST,
503        path = "/data-source/v1/data-sources/batch-get-available-tags",
504        name = "batchGetAvailableTagsForChannel",
505        accept = conjure_http::client::StdResponseDeserializer
506    )]
507    async fn batch_get_available_tags_for_channel(
508        &self,
509        #[auth]
510        auth_: &conjure_object::BearerToken,
511        #[body(serializer = conjure_http::client::StdRequestSerializer)]
512        request: &super::super::super::super::objects::datasource::api::BatchGetAvailableTagsForChannelRequest,
513    ) -> Result<
514        super::super::super::super::objects::datasource::api::BatchGetAvailableTagsForChannelResponse,
515        conjure_http::private::Error,
516    >;
517    /// Returns the number of distinct series matching each request's datasource, channel, range,
518    /// and tag filters. Each response corresponds positionally to the input request.
519    /// Returns empty seriesCount for non-Nominal datasources.
520    #[endpoint(
521        method = POST,
522        path = "/data-source/v1/data-sources/batch-get-series-count",
523        name = "batchGetSeriesCount",
524        accept = conjure_http::client::StdResponseDeserializer
525    )]
526    async fn batch_get_series_count(
527        &self,
528        #[auth]
529        auth_: &conjure_object::BearerToken,
530        #[body(serializer = conjure_http::client::StdRequestSerializer)]
531        request: &super::super::super::super::objects::datasource::api::BatchGetSeriesCountRequest,
532    ) -> Result<
533        super::super::super::super::objects::datasource::api::BatchGetSeriesCountResponse,
534        conjure_http::private::Error,
535    >;
536    /// Returns (channel, full-tag-map) entries for a specific channel in a dataset.
537    /// If tags are provided, each entry must match all provided key/value pairs; extra tags may still be present.
538    /// Only numeric-data series are returned; video series are excluded.
539    #[endpoint(
540        method = POST,
541        path = "/data-source/v1/data-sources/get-matching-channels-with-tags",
542        name = "getMatchingChannelsWithTags",
543        accept = conjure_http::client::StdResponseDeserializer
544    )]
545    async fn get_matching_channels_with_tags(
546        &self,
547        #[auth]
548        auth_: &conjure_object::BearerToken,
549        #[body(serializer = conjure_http::client::StdRequestSerializer)]
550        request: &super::super::super::super::objects::datasource::api::GetMatchingChannelsWithTagsRequest,
551    ) -> Result<
552        super::super::super::super::objects::datasource::api::GetMatchingChannelsWithTagsResponse,
553        conjure_http::private::Error,
554    >;
555}
556/// Data sources are data input to runs, including databases, CSV, video, and streaming data. They contain channels that represent the series data.
557/// The DataSource Service is responsible for indexing and searching channels across data sources.
558#[conjure_http::conjure_client(name = "DataSourceService", local)]
559pub trait LocalAsyncDataSourceService<
560    #[response_body]
561    I: conjure_http::private::Stream<
562            Item = Result<conjure_http::private::Bytes, conjure_http::private::Error>,
563        >,
564> {
565    /// Returns channels that match the search criteria. Results are sorted by similarity score.
566    #[endpoint(
567        method = POST,
568        path = "/data-source/v1/data-sources/search-channels",
569        name = "searchChannels",
570        accept = conjure_http::client::StdResponseDeserializer
571    )]
572    async fn search_channels(
573        &self,
574        #[auth]
575        auth_: &conjure_object::BearerToken,
576        #[body(serializer = conjure_http::client::StdRequestSerializer)]
577        query: &super::super::super::super::objects::datasource::api::SearchChannelsRequest,
578    ) -> Result<
579        super::super::super::super::objects::datasource::api::SearchChannelsResponse,
580        conjure_http::private::Error,
581    >;
582    /// Returns channels that match the search criteria. Results are sorted by similarity score.
583    #[endpoint(
584        method = POST,
585        path = "/data-source/v1/data-sources/search-filtered-channels",
586        name = "searchFilteredChannels",
587        accept = conjure_http::client::StdResponseDeserializer
588    )]
589    async fn search_filtered_channels(
590        &self,
591        #[auth]
592        auth_: &conjure_object::BearerToken,
593        #[body(serializer = conjure_http::client::StdRequestSerializer)]
594        query: &super::super::super::super::objects::datasource::api::SearchFilteredChannelsRequest,
595    ) -> Result<
596        super::super::super::super::objects::datasource::api::SearchFilteredChannelsResponse,
597        conjure_http::private::Error,
598    >;
599    /// Returns only channels that are direct children of the parent. Returns results sorted alphabetically.
600    #[endpoint(
601        method = POST,
602        path = "/data-source/v1/data-sources/search-hierarchical-channels",
603        name = "searchHierarchicalChannels",
604        accept = conjure_http::client::StdResponseDeserializer
605    )]
606    async fn search_hierarchical_channels(
607        &self,
608        #[auth]
609        auth_: &conjure_object::BearerToken,
610        #[body(serializer = conjure_http::client::StdRequestSerializer)]
611        query: &super::super::super::super::objects::datasource::api::SearchHierarchicalChannelsRequest,
612    ) -> Result<
613        super::super::super::super::objects::datasource::api::SearchHierarchicalChannelsResponse,
614        conjure_http::private::Error,
615    >;
616    /// Indexes the channel prefix tree for a specified data source. This operation constructs a prefix tree from the
617    /// channels available in the data source.
618    #[endpoint(
619        method = POST,
620        path = "/data-source/v1/data-sources/index-channel-prefix-tree",
621        name = "indexChannelPrefixTree",
622        accept = conjure_http::client::StdResponseDeserializer
623    )]
624    async fn index_channel_prefix_tree(
625        &self,
626        #[auth]
627        auth_: &conjure_object::BearerToken,
628        #[body(serializer = conjure_http::client::StdRequestSerializer)]
629        request: &super::super::super::super::objects::datasource::api::IndexChannelPrefixTreeRequest,
630    ) -> Result<
631        super::super::super::super::objects::datasource::api::ChannelPrefixTree,
632        conjure_http::private::Error,
633    >;
634    /// Clears the channel hierarchy delimiter for a specified data source, removing any previously indexed
635    /// prefix tree. After calling this endpoint, the data source will no longer have hierarchical channel browsing
636    /// enabled until a new delimiter is set via indexChannelPrefixTree.
637    #[endpoint(
638        method = POST,
639        path = "/data-source/v1/data-sources/clear-channel-prefix-tree",
640        name = "clearChannelPrefixTree",
641        accept = conjure_http::client::conjure::EmptyResponseDeserializer
642    )]
643    async fn clear_channel_prefix_tree(
644        &self,
645        #[auth]
646        auth_: &conjure_object::BearerToken,
647        #[body(serializer = conjure_http::client::StdRequestSerializer)]
648        request: &super::super::super::super::objects::datasource::api::ClearChannelPrefixTreeRequest,
649    ) -> Result<(), conjure_http::private::Error>;
650    /// Returns the channel prefix tree for each of the specified data sources. If the tree for a data source has not
651    /// been indexed, it will be omitted from the map.
652    #[endpoint(
653        method = POST,
654        path = "/data-source/v1/data-sources/batch-get-channel-prefix-tree",
655        name = "batchGetChannelPrefixTrees",
656        accept = conjure_http::client::StdResponseDeserializer
657    )]
658    async fn batch_get_channel_prefix_trees(
659        &self,
660        #[auth]
661        auth_: &conjure_object::BearerToken,
662        #[body(serializer = conjure_http::client::StdRequestSerializer)]
663        request: &super::super::super::super::objects::datasource::api::BatchGetChannelPrefixTreeRequest,
664    ) -> Result<
665        super::super::super::super::objects::datasource::api::BatchGetChannelPrefixTreeResponse,
666        conjure_http::private::Error,
667    >;
668    /// Returns the the set of all tag keys and their values that are available for the specified channel given an
669    /// initial set of filters.
670    #[endpoint(
671        method = POST,
672        path = "/data-source/v1/data-sources/get-available-tags",
673        name = "getAvailableTagsForChannel",
674        accept = conjure_http::client::StdResponseDeserializer
675    )]
676    async fn get_available_tags_for_channel(
677        &self,
678        #[auth]
679        auth_: &conjure_object::BearerToken,
680        #[body(serializer = conjure_http::client::StdRequestSerializer)]
681        request: &super::super::super::super::objects::datasource::api::GetAvailableTagsForChannelRequest,
682    ) -> Result<
683        super::super::super::super::objects::datasource::api::GetAvailableTagsForChannelResponse,
684        conjure_http::private::Error,
685    >;
686    /// Returns the maximum data timestamps for the specified data scopes. Responses are returned
687    /// in the same order as requests.
688    #[endpoint(
689        method = POST,
690        path = "/data-source/v1/data-sources/get-data-scope-bounds",
691        name = "getDataScopeBounds",
692        accept = conjure_http::client::StdResponseDeserializer
693    )]
694    async fn get_data_scope_bounds(
695        &self,
696        #[auth]
697        auth_: &conjure_object::BearerToken,
698        #[body(serializer = conjure_http::client::StdRequestSerializer)]
699        request: &super::super::super::super::objects::datasource::api::BatchGetDataScopeBoundsRequest,
700    ) -> Result<
701        super::super::super::super::objects::datasource::api::BatchGetDataScopeBoundsResponse,
702        conjure_http::private::Error,
703    >;
704    /// Returns available tag values for a given data source for a set of tag keys. For Nominal data sources, a time
705    /// range can be provided to filter tag values to those present within the months spanned by the range. If no
706    /// time range is provided, this defaults to the last month. For external data sources, the range must not be
707    /// specified, as all tag values are returned.
708    #[endpoint(
709        method = POST,
710        path = "/data-source/v1/data-sources/{dataSourceRid}/get-tags",
711        name = "getTagValuesForDataSource",
712        accept = conjure_http::client::conjure::CollectionResponseDeserializer
713    )]
714    async fn get_tag_values_for_data_source(
715        &self,
716        #[auth]
717        auth_: &conjure_object::BearerToken,
718        #[path(
719            name = "dataSourceRid",
720            encoder = conjure_http::client::conjure::PlainEncoder
721        )]
722        data_source_rid: &conjure_object::ResourceIdentifier,
723        #[body(serializer = conjure_http::client::StdRequestSerializer)]
724        request: &super::super::super::super::objects::datasource::api::GetTagValuesForDataSourceRequest,
725    ) -> Result<
726        std::collections::BTreeMap<String, std::collections::BTreeSet<String>>,
727        conjure_http::private::Error,
728    >;
729    /// Paged endpoint returning the set of all tag keys that are available for the specified channel given an
730    /// initial set of filters.
731    /// If any tag filters are supplied, their tag keys are omitted from the result.
732    #[endpoint(
733        method = POST,
734        path = "/data-source/v1/data-sources/{dataSourceRid}/get-tag-keys",
735        name = "getAvailableTagKeys",
736        accept = conjure_http::client::StdResponseDeserializer
737    )]
738    async fn get_available_tag_keys(
739        &self,
740        #[auth]
741        auth_: &conjure_object::BearerToken,
742        #[path(
743            name = "dataSourceRid",
744            encoder = conjure_http::client::conjure::PlainEncoder
745        )]
746        data_source_rid: &conjure_object::ResourceIdentifier,
747        #[body(serializer = conjure_http::client::StdRequestSerializer)]
748        request: &super::super::super::super::objects::datasource::api::GetAvailableTagKeysRequest,
749    ) -> Result<
750        super::super::super::super::objects::datasource::api::GetAvailableTagKeysResponse,
751        conjure_http::private::Error,
752    >;
753    /// Paged endpoint returning the set of all tag values that are available for the specified tag and datasource
754    /// given an initial set of filters.
755    #[endpoint(
756        method = POST,
757        path = "/data-source/v1/data-sources/{dataSourceRid}/get-tag-values",
758        name = "getAvailableTagValues",
759        accept = conjure_http::client::StdResponseDeserializer
760    )]
761    async fn get_available_tag_values(
762        &self,
763        #[auth]
764        auth_: &conjure_object::BearerToken,
765        #[path(
766            name = "dataSourceRid",
767            encoder = conjure_http::client::conjure::PlainEncoder
768        )]
769        data_source_rid: &conjure_object::ResourceIdentifier,
770        #[body(serializer = conjure_http::client::StdRequestSerializer)]
771        request: &super::super::super::super::objects::datasource::api::GetAvailableTagValuesRequest,
772    ) -> Result<
773        super::super::super::super::objects::datasource::api::GetAvailableTagValuesResponse,
774        conjure_http::private::Error,
775    >;
776    /// Returns the set of all tag keys and their values for each specified channel given
777    /// initial sets of filters. Each response corresponds positionally to the input request.
778    #[endpoint(
779        method = POST,
780        path = "/data-source/v1/data-sources/batch-get-available-tags",
781        name = "batchGetAvailableTagsForChannel",
782        accept = conjure_http::client::StdResponseDeserializer
783    )]
784    async fn batch_get_available_tags_for_channel(
785        &self,
786        #[auth]
787        auth_: &conjure_object::BearerToken,
788        #[body(serializer = conjure_http::client::StdRequestSerializer)]
789        request: &super::super::super::super::objects::datasource::api::BatchGetAvailableTagsForChannelRequest,
790    ) -> Result<
791        super::super::super::super::objects::datasource::api::BatchGetAvailableTagsForChannelResponse,
792        conjure_http::private::Error,
793    >;
794    /// Returns the number of distinct series matching each request's datasource, channel, range,
795    /// and tag filters. Each response corresponds positionally to the input request.
796    /// Returns empty seriesCount for non-Nominal datasources.
797    #[endpoint(
798        method = POST,
799        path = "/data-source/v1/data-sources/batch-get-series-count",
800        name = "batchGetSeriesCount",
801        accept = conjure_http::client::StdResponseDeserializer
802    )]
803    async fn batch_get_series_count(
804        &self,
805        #[auth]
806        auth_: &conjure_object::BearerToken,
807        #[body(serializer = conjure_http::client::StdRequestSerializer)]
808        request: &super::super::super::super::objects::datasource::api::BatchGetSeriesCountRequest,
809    ) -> Result<
810        super::super::super::super::objects::datasource::api::BatchGetSeriesCountResponse,
811        conjure_http::private::Error,
812    >;
813    /// Returns (channel, full-tag-map) entries for a specific channel in a dataset.
814    /// If tags are provided, each entry must match all provided key/value pairs; extra tags may still be present.
815    /// Only numeric-data series are returned; video series are excluded.
816    #[endpoint(
817        method = POST,
818        path = "/data-source/v1/data-sources/get-matching-channels-with-tags",
819        name = "getMatchingChannelsWithTags",
820        accept = conjure_http::client::StdResponseDeserializer
821    )]
822    async fn get_matching_channels_with_tags(
823        &self,
824        #[auth]
825        auth_: &conjure_object::BearerToken,
826        #[body(serializer = conjure_http::client::StdRequestSerializer)]
827        request: &super::super::super::super::objects::datasource::api::GetMatchingChannelsWithTagsRequest,
828    ) -> Result<
829        super::super::super::super::objects::datasource::api::GetMatchingChannelsWithTagsResponse,
830        conjure_http::private::Error,
831    >;
832}