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