Skip to main content

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