Skip to main content

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

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