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