Skip to main content

nominal_api_proto/proto/
nominal.knowledge.v1.rs

1// This file is @generated by prost-build.
2#[derive(Clone, PartialEq, ::prost::Message)]
3pub struct CreateDriveIndexJobRequest {
4    #[prost(string, tag = "1")]
5    pub drive_rid: ::prost::alloc::string::String,
6}
7#[derive(Clone, PartialEq, ::prost::Message)]
8pub struct CreateDriveIndexJobResponse {
9    #[prost(message, optional, tag = "1")]
10    pub drive_index_job: ::core::option::Option<DriveIndexJob>,
11}
12#[derive(Clone, PartialEq, ::prost::Message)]
13pub struct GetDriveIndexJobRequest {
14    #[prost(string, tag = "1")]
15    pub drive_index_job_rid: ::prost::alloc::string::String,
16}
17#[derive(Clone, PartialEq, ::prost::Message)]
18pub struct GetDriveIndexJobResponse {
19    #[prost(message, optional, tag = "1")]
20    pub drive_index_job: ::core::option::Option<DriveIndexJob>,
21}
22#[derive(Clone, PartialEq, ::prost::Message)]
23pub struct ListDriveIndexJobsRequest {
24    #[prost(int32, optional, tag = "1")]
25    pub page_size: ::core::option::Option<i32>,
26    #[prost(string, tag = "2")]
27    pub page_token: ::prost::alloc::string::String,
28    #[prost(string, optional, tag = "10")]
29    pub drive_rid: ::core::option::Option<::prost::alloc::string::String>,
30}
31#[derive(Clone, PartialEq, ::prost::Message)]
32pub struct ListDriveIndexJobsResponse {
33    #[prost(message, repeated, tag = "1")]
34    pub drive_index_jobs: ::prost::alloc::vec::Vec<DriveIndexJobSummary>,
35    #[prost(string, tag = "2")]
36    pub next_page_token: ::prost::alloc::string::String,
37}
38#[derive(Clone, PartialEq, ::prost::Message)]
39pub struct ListDriveIndexJobSourcesRequest {
40    #[prost(string, tag = "1")]
41    pub drive_index_job_rid: ::prost::alloc::string::String,
42    #[prost(int32, optional, tag = "2")]
43    pub page_size: ::core::option::Option<i32>,
44    #[prost(string, tag = "3")]
45    pub page_token: ::prost::alloc::string::String,
46}
47#[derive(Clone, PartialEq, ::prost::Message)]
48pub struct ListDriveIndexJobSourcesResponse {
49    #[prost(message, repeated, tag = "1")]
50    pub sources: ::prost::alloc::vec::Vec<DriveIndexSourceExecution>,
51    #[prost(string, tag = "2")]
52    pub next_page_token: ::prost::alloc::string::String,
53}
54#[derive(Clone, PartialEq, ::prost::Message)]
55pub struct DriveIndexJobSummary {
56    #[prost(string, tag = "1")]
57    pub drive_index_job_rid: ::prost::alloc::string::String,
58    #[prost(string, tag = "2")]
59    pub drive_rid: ::prost::alloc::string::String,
60    #[prost(enumeration = "DriveIndexJobState", tag = "3")]
61    pub state: i32,
62    #[prost(uint64, tag = "4")]
63    pub completed_source_count: u64,
64    #[prost(uint64, tag = "5")]
65    pub successful_chunk_count: u64,
66    #[prost(message, optional, tag = "6")]
67    pub created_at: ::core::option::Option<
68        super::super::super::google::protobuf::Timestamp,
69    >,
70    #[prost(uint64, tag = "7")]
71    pub admitted_source_count: u64,
72    #[prost(bool, tag = "8")]
73    pub enumeration_complete: bool,
74    #[prost(message, optional, tag = "10")]
75    pub debug: ::core::option::Option<DriveIndexJobSummaryDebug>,
76}
77#[derive(Clone, PartialEq, ::prost::Message)]
78pub struct DriveIndexJob {
79    #[prost(string, tag = "1")]
80    pub drive_index_job_rid: ::prost::alloc::string::String,
81    #[prost(string, tag = "2")]
82    pub drive_rid: ::prost::alloc::string::String,
83    #[prost(enumeration = "DriveIndexJobState", tag = "3")]
84    pub state: i32,
85    #[prost(uint64, tag = "4")]
86    pub completed_source_count: u64,
87    #[prost(uint64, tag = "5")]
88    pub successful_chunk_count: u64,
89    #[prost(message, repeated, tag = "6")]
90    pub sources: ::prost::alloc::vec::Vec<DriveIndexSourceExecution>,
91    #[prost(bool, tag = "7")]
92    pub sources_truncated: bool,
93    #[prost(uint64, tag = "8")]
94    pub admitted_source_count: u64,
95    #[prost(bool, tag = "9")]
96    pub enumeration_complete: bool,
97    #[prost(string, repeated, tag = "10")]
98    pub run_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
99    #[prost(bool, tag = "11")]
100    pub temporal_history_available: bool,
101    #[prost(message, optional, tag = "20")]
102    pub debug: ::core::option::Option<DriveIndexJobDebug>,
103}
104#[derive(Clone, PartialEq, ::prost::Message)]
105pub struct DriveIndexSourceExecution {
106    #[prost(string, tag = "1")]
107    pub source_rid: ::prost::alloc::string::String,
108    #[prost(enumeration = "DriveIndexSourceExecutionState", tag = "2")]
109    pub state: i32,
110    #[prost(string, tag = "3")]
111    pub failure_category: ::prost::alloc::string::String,
112    #[prost(string, tag = "4")]
113    pub revision_rid: ::prost::alloc::string::String,
114    #[prost(string, tag = "5")]
115    pub child_workflow_id: ::prost::alloc::string::String,
116    #[prost(string, tag = "6")]
117    pub child_run_id: ::prost::alloc::string::String,
118    #[prost(message, optional, tag = "10")]
119    pub debug: ::core::option::Option<DriveIndexSourceExecutionDebug>,
120}
121#[derive(Clone, PartialEq, ::prost::Message)]
122pub struct KnowledgeChunk {
123    #[prost(string, tag = "1")]
124    pub sample_rid: ::prost::alloc::string::String,
125    #[prost(string, tag = "2")]
126    pub source_rid: ::prost::alloc::string::String,
127    #[prost(string, tag = "3")]
128    pub source_locator: ::prost::alloc::string::String,
129    #[prost(string, tag = "4")]
130    pub partition_key: ::prost::alloc::string::String,
131}
132#[derive(Clone, PartialEq, ::prost::Message)]
133pub struct QueryRequest {
134    #[prost(string, tag = "1")]
135    pub query: ::prost::alloc::string::String,
136    #[prost(string, tag = "4")]
137    pub drive_rid: ::prost::alloc::string::String,
138    #[prost(int32, optional, tag = "2")]
139    pub page_size: ::core::option::Option<i32>,
140    #[prost(string, tag = "3")]
141    pub page_token: ::prost::alloc::string::String,
142    #[prost(bool, optional, tag = "10")]
143    pub include_debug: ::core::option::Option<bool>,
144}
145#[derive(Clone, PartialEq, ::prost::Message)]
146pub struct QueryResponse {
147    #[prost(message, repeated, tag = "1")]
148    pub chunks: ::prost::alloc::vec::Vec<KnowledgeChunk>,
149    #[prost(string, tag = "2")]
150    pub next_page_token: ::prost::alloc::string::String,
151    #[prost(message, optional, tag = "10")]
152    pub debug: ::core::option::Option<QueryDebug>,
153}
154#[derive(Clone, PartialEq, ::prost::Message)]
155pub struct DriveIndexJobSummaryDebug {
156    #[prost(string, optional, tag = "1")]
157    pub workspace_rid: ::core::option::Option<::prost::alloc::string::String>,
158    #[prost(message, optional, tag = "2")]
159    pub completed_at: ::core::option::Option<
160        super::super::super::google::protobuf::Timestamp,
161    >,
162}
163#[derive(Clone, PartialEq, ::prost::Message)]
164pub struct DriveIndexJobDebug {
165    #[prost(message, optional, tag = "1")]
166    pub created_at: ::core::option::Option<
167        super::super::super::google::protobuf::Timestamp,
168    >,
169    #[prost(message, optional, tag = "2")]
170    pub completed_at: ::core::option::Option<
171        super::super::super::google::protobuf::Timestamp,
172    >,
173    #[prost(string, optional, tag = "3")]
174    pub workspace_rid: ::core::option::Option<::prost::alloc::string::String>,
175    #[prost(string, optional, tag = "4")]
176    pub caller_workspace_rid: ::core::option::Option<::prost::alloc::string::String>,
177    #[prost(uint32, optional, tag = "5")]
178    pub running_source_count: ::core::option::Option<u32>,
179    #[prost(uint32, optional, tag = "6")]
180    pub succeeded_source_count: ::core::option::Option<u32>,
181    #[prost(uint32, optional, tag = "7")]
182    pub failed_source_count: ::core::option::Option<u32>,
183    #[prost(message, repeated, tag = "8")]
184    pub failed_source_counts: ::prost::alloc::vec::Vec<FailedSourceCategoryCount>,
185    #[prost(message, repeated, tag = "9")]
186    pub attention_list: ::prost::alloc::vec::Vec<DriveIndexSourceExecution>,
187    #[prost(bool, optional, tag = "10")]
188    pub attention_list_truncated: ::core::option::Option<bool>,
189}
190#[derive(Clone, PartialEq, ::prost::Message)]
191pub struct FailedSourceCategoryCount {
192    #[prost(string, optional, tag = "1")]
193    pub failure_category: ::core::option::Option<::prost::alloc::string::String>,
194    #[prost(uint32, optional, tag = "2")]
195    pub count: ::core::option::Option<u32>,
196}
197#[derive(Clone, Copy, PartialEq, ::prost::Message)]
198pub struct DriveIndexSourceExecutionDebug {
199    #[prost(message, optional, tag = "1")]
200    pub started_at: ::core::option::Option<
201        super::super::super::google::protobuf::Timestamp,
202    >,
203    #[prost(message, optional, tag = "2")]
204    pub completed_at: ::core::option::Option<
205        super::super::super::google::protobuf::Timestamp,
206    >,
207    #[prost(uint32, optional, tag = "3")]
208    pub chunk_count: ::core::option::Option<u32>,
209}
210#[derive(Clone, PartialEq, ::prost::Message)]
211pub struct QueryDebug {
212    #[prost(string, optional, tag = "1")]
213    pub searched_workspace_rid: ::core::option::Option<::prost::alloc::string::String>,
214    #[prost(message, repeated, tag = "2")]
215    pub retrievers: ::prost::alloc::vec::Vec<QueryRetrieverDebug>,
216    #[prost(string, optional, tag = "3")]
217    pub fusion_rule: ::core::option::Option<::prost::alloc::string::String>,
218    #[prost(string, optional, tag = "4")]
219    pub normalization_rule: ::core::option::Option<::prost::alloc::string::String>,
220    #[prost(string, optional, tag = "5")]
221    pub tie_break_rule: ::core::option::Option<::prost::alloc::string::String>,
222    #[prost(uint32, optional, tag = "6")]
223    pub distinct_candidate_count: ::core::option::Option<u32>,
224    #[prost(string, repeated, tag = "7")]
225    pub query_terms: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
226    #[prost(uint32, optional, tag = "8")]
227    pub query_term_count: ::core::option::Option<u32>,
228    #[prost(bool, optional, tag = "9")]
229    pub query_terms_truncated: ::core::option::Option<bool>,
230    #[prost(message, repeated, tag = "10")]
231    pub candidates: ::prost::alloc::vec::Vec<QueryCandidateDebug>,
232    #[prost(message, repeated, tag = "11")]
233    pub excluded_candidates: ::prost::alloc::vec::Vec<QueryCandidateDebug>,
234    #[prost(bool, optional, tag = "12")]
235    pub excluded_candidates_truncated: ::core::option::Option<bool>,
236    #[prost(message, optional, tag = "13")]
237    pub embedding: ::core::option::Option<KnowledgeEmbeddingDebug>,
238}
239#[derive(Clone, PartialEq, ::prost::Message)]
240pub struct QueryRetrieverDebug {
241    #[prost(string, optional, tag = "1")]
242    pub retriever_name: ::core::option::Option<::prost::alloc::string::String>,
243    #[prost(string, optional, tag = "2")]
244    pub representation_id: ::core::option::Option<::prost::alloc::string::String>,
245    #[prost(double, optional, tag = "3")]
246    pub weight: ::core::option::Option<f64>,
247    #[prost(string, optional, tag = "4")]
248    pub skip_reason: ::core::option::Option<::prost::alloc::string::String>,
249    #[prost(uint32, optional, tag = "5")]
250    pub candidate_count: ::core::option::Option<u32>,
251    #[prost(uint32, optional, tag = "6")]
252    pub candidate_limit: ::core::option::Option<u32>,
253    #[prost(bool, optional, tag = "7")]
254    pub limit_reached: ::core::option::Option<bool>,
255    #[prost(string, optional, tag = "8")]
256    pub limit_order: ::core::option::Option<::prost::alloc::string::String>,
257    #[prost(double, optional, tag = "9")]
258    pub normalization_min: ::core::option::Option<f64>,
259    #[prost(double, optional, tag = "10")]
260    pub normalization_max: ::core::option::Option<f64>,
261    #[prost(bool, optional, tag = "11")]
262    pub excluded_list_truncated: ::core::option::Option<bool>,
263    #[prost(map = "string, double", tag = "12")]
264    pub parameters: ::std::collections::HashMap<::prost::alloc::string::String, f64>,
265}
266#[derive(Clone, PartialEq, ::prost::Message)]
267pub struct QueryCandidateDebug {
268    #[prost(string, optional, tag = "1")]
269    pub sample_rid: ::core::option::Option<::prost::alloc::string::String>,
270    #[prost(uint32, optional, tag = "2")]
271    pub fused_rank: ::core::option::Option<u32>,
272    #[prost(double, optional, tag = "3")]
273    pub fused_score: ::core::option::Option<f64>,
274    #[prost(message, repeated, tag = "4")]
275    pub scores: ::prost::alloc::vec::Vec<QueryRetrieverScoreDebug>,
276    #[prost(string, optional, tag = "5")]
277    pub withheld_reason: ::core::option::Option<::prost::alloc::string::String>,
278    #[prost(message, optional, tag = "6")]
279    pub chunk_pointer: ::core::option::Option<KnowledgeChunk>,
280}
281#[derive(Clone, PartialEq, ::prost::Message)]
282pub struct QueryRetrieverScoreDebug {
283    #[prost(string, optional, tag = "1")]
284    pub retriever_name: ::core::option::Option<::prost::alloc::string::String>,
285    #[prost(bool, optional, tag = "2")]
286    pub matched: ::core::option::Option<bool>,
287    #[prost(uint32, optional, tag = "3")]
288    pub rank: ::core::option::Option<u32>,
289    #[prost(double, optional, tag = "4")]
290    pub raw_score: ::core::option::Option<f64>,
291    #[prost(double, optional, tag = "5")]
292    pub normalized_score: ::core::option::Option<f64>,
293    #[prost(double, optional, tag = "6")]
294    pub weighted_score: ::core::option::Option<f64>,
295}
296#[derive(Clone, PartialEq, ::prost::Message)]
297pub struct KnowledgeEmbeddingDebug {
298    #[prost(string, optional, tag = "1")]
299    pub provider: ::core::option::Option<::prost::alloc::string::String>,
300    #[prost(bool, optional, tag = "2")]
301    pub text_embedder_active: ::core::option::Option<bool>,
302    #[prost(string, optional, tag = "3")]
303    pub active_text_representation_id: ::core::option::Option<
304        ::prost::alloc::string::String,
305    >,
306    #[prost(string, optional, tag = "4")]
307    pub active_multimodal_representation_id: ::core::option::Option<
308        ::prost::alloc::string::String,
309    >,
310    #[prost(string, repeated, tag = "5")]
311    pub written_representation_ids: ::prost::alloc::vec::Vec<
312        ::prost::alloc::string::String,
313    >,
314}
315#[derive(Clone, PartialEq, ::prost::Message)]
316pub struct ListSourceChunkDebugRequest {
317    #[prost(string, tag = "1")]
318    pub drive_rid: ::prost::alloc::string::String,
319    #[prost(string, tag = "2")]
320    pub source_rid: ::prost::alloc::string::String,
321    #[prost(uint32, optional, tag = "3")]
322    pub page_size: ::core::option::Option<u32>,
323    #[prost(string, optional, tag = "4")]
324    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
325}
326#[derive(Clone, PartialEq, ::prost::Message)]
327pub struct ListSourceChunkDebugResponse {
328    #[prost(message, repeated, tag = "1")]
329    pub chunks: ::prost::alloc::vec::Vec<KnowledgeChunkDebug>,
330    #[prost(string, optional, tag = "2")]
331    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
332    #[prost(message, optional, tag = "3")]
333    pub source: ::core::option::Option<KnowledgeSourceDebug>,
334}
335#[derive(Clone, PartialEq, ::prost::Message)]
336pub struct KnowledgeSourceDebug {
337    #[prost(uint32, optional, tag = "1")]
338    pub stored_chunk_count: ::core::option::Option<u32>,
339    #[prost(string, repeated, tag = "2")]
340    pub partitions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
341    #[prost(bool, optional, tag = "3")]
342    pub partitions_truncated: ::core::option::Option<bool>,
343    #[prost(message, optional, tag = "4")]
344    pub embedding: ::core::option::Option<KnowledgeEmbeddingDebug>,
345    #[prost(message, repeated, tag = "5")]
346    pub representation_chunk_counts: ::prost::alloc::vec::Vec<RepresentationChunkCount>,
347    #[prost(message, optional, tag = "6")]
348    pub latest_execution: ::core::option::Option<DriveIndexSourceExecution>,
349    #[prost(bool, optional, tag = "7")]
350    pub representation_chunk_counts_truncated: ::core::option::Option<bool>,
351}
352#[derive(Clone, PartialEq, ::prost::Message)]
353pub struct RepresentationChunkCount {
354    #[prost(string, optional, tag = "1")]
355    pub representation_id: ::core::option::Option<::prost::alloc::string::String>,
356    #[prost(uint32, optional, tag = "2")]
357    pub chunk_count: ::core::option::Option<u32>,
358}
359#[derive(Clone, PartialEq, ::prost::Message)]
360pub struct KnowledgeChunkDebug {
361    #[prost(message, optional, tag = "1")]
362    pub chunk_pointer: ::core::option::Option<KnowledgeChunk>,
363    #[prost(message, repeated, tag = "2")]
364    pub lexemes: ::prost::alloc::vec::Vec<KnowledgeLexemeDebug>,
365    #[prost(bool, optional, tag = "3")]
366    pub lexemes_truncated: ::core::option::Option<bool>,
367    #[prost(uint32, optional, tag = "4")]
368    pub stored_document_length: ::core::option::Option<u32>,
369    #[prost(message, repeated, tag = "5")]
370    pub representations: ::prost::alloc::vec::Vec<KnowledgeRepresentationDebug>,
371    #[prost(bool, optional, tag = "6")]
372    pub representations_truncated: ::core::option::Option<bool>,
373}
374#[derive(Clone, PartialEq, ::prost::Message)]
375pub struct KnowledgeLexemeDebug {
376    #[prost(string, optional, tag = "1")]
377    pub term: ::core::option::Option<::prost::alloc::string::String>,
378    #[prost(uint32, optional, tag = "2")]
379    pub count: ::core::option::Option<u32>,
380}
381#[derive(Clone, PartialEq, ::prost::Message)]
382pub struct KnowledgeRepresentationDebug {
383    #[prost(string, optional, tag = "1")]
384    pub representation_id: ::core::option::Option<::prost::alloc::string::String>,
385    #[prost(string, optional, tag = "2")]
386    pub family: ::core::option::Option<::prost::alloc::string::String>,
387    #[prost(string, optional, tag = "3")]
388    pub provider: ::core::option::Option<::prost::alloc::string::String>,
389    #[prost(string, optional, tag = "4")]
390    pub model: ::core::option::Option<::prost::alloc::string::String>,
391    #[prost(uint32, optional, tag = "5")]
392    pub dimensions: ::core::option::Option<u32>,
393    #[prost(double, optional, tag = "6")]
394    pub l2_norm: ::core::option::Option<f64>,
395    #[prost(double, repeated, packed = "false", tag = "7")]
396    pub first_values: ::prost::alloc::vec::Vec<f64>,
397}
398#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
399#[repr(i32)]
400pub enum DriveIndexJobState {
401    Unspecified = 0,
402    Queued = 1,
403    Running = 2,
404    Succeeded = 3,
405    SucceededWithFailures = 4,
406}
407impl DriveIndexJobState {
408    /// String value of the enum field names used in the ProtoBuf definition.
409    ///
410    /// The values are not transformed in any way and thus are considered stable
411    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
412    pub fn as_str_name(&self) -> &'static str {
413        match self {
414            Self::Unspecified => "DRIVE_INDEX_JOB_STATE_UNSPECIFIED",
415            Self::Queued => "DRIVE_INDEX_JOB_STATE_QUEUED",
416            Self::Running => "DRIVE_INDEX_JOB_STATE_RUNNING",
417            Self::Succeeded => "DRIVE_INDEX_JOB_STATE_SUCCEEDED",
418            Self::SucceededWithFailures => {
419                "DRIVE_INDEX_JOB_STATE_SUCCEEDED_WITH_FAILURES"
420            }
421        }
422    }
423    /// Creates an enum from field names used in the ProtoBuf definition.
424    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
425        match value {
426            "DRIVE_INDEX_JOB_STATE_UNSPECIFIED" => Some(Self::Unspecified),
427            "DRIVE_INDEX_JOB_STATE_QUEUED" => Some(Self::Queued),
428            "DRIVE_INDEX_JOB_STATE_RUNNING" => Some(Self::Running),
429            "DRIVE_INDEX_JOB_STATE_SUCCEEDED" => Some(Self::Succeeded),
430            "DRIVE_INDEX_JOB_STATE_SUCCEEDED_WITH_FAILURES" => {
431                Some(Self::SucceededWithFailures)
432            }
433            _ => None,
434        }
435    }
436}
437#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
438#[repr(i32)]
439pub enum DriveIndexSourceExecutionState {
440    Unspecified = 0,
441    Succeeded = 1,
442    PermanentlyFailed = 2,
443    Running = 3,
444}
445impl DriveIndexSourceExecutionState {
446    /// String value of the enum field names used in the ProtoBuf definition.
447    ///
448    /// The values are not transformed in any way and thus are considered stable
449    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
450    pub fn as_str_name(&self) -> &'static str {
451        match self {
452            Self::Unspecified => "DRIVE_INDEX_SOURCE_EXECUTION_STATE_UNSPECIFIED",
453            Self::Succeeded => "DRIVE_INDEX_SOURCE_EXECUTION_STATE_SUCCEEDED",
454            Self::PermanentlyFailed => {
455                "DRIVE_INDEX_SOURCE_EXECUTION_STATE_PERMANENTLY_FAILED"
456            }
457            Self::Running => "DRIVE_INDEX_SOURCE_EXECUTION_STATE_RUNNING",
458        }
459    }
460    /// Creates an enum from field names used in the ProtoBuf definition.
461    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
462        match value {
463            "DRIVE_INDEX_SOURCE_EXECUTION_STATE_UNSPECIFIED" => Some(Self::Unspecified),
464            "DRIVE_INDEX_SOURCE_EXECUTION_STATE_SUCCEEDED" => Some(Self::Succeeded),
465            "DRIVE_INDEX_SOURCE_EXECUTION_STATE_PERMANENTLY_FAILED" => {
466                Some(Self::PermanentlyFailed)
467            }
468            "DRIVE_INDEX_SOURCE_EXECUTION_STATE_RUNNING" => Some(Self::Running),
469            _ => None,
470        }
471    }
472}
473/// Generated client implementations.
474pub mod knowledge_service_client {
475    #![allow(
476        unused_variables,
477        dead_code,
478        missing_docs,
479        clippy::wildcard_imports,
480        clippy::let_unit_value,
481    )]
482    use tonic::codegen::*;
483    use tonic::codegen::http::Uri;
484    #[derive(Debug, Clone)]
485    pub struct KnowledgeServiceClient<T> {
486        inner: tonic::client::Grpc<T>,
487    }
488    impl KnowledgeServiceClient<tonic::transport::Channel> {
489        /// Attempt to create a new client by connecting to a given endpoint.
490        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
491        where
492            D: TryInto<tonic::transport::Endpoint>,
493            D::Error: Into<StdError>,
494        {
495            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
496            Ok(Self::new(conn))
497        }
498    }
499    impl<T> KnowledgeServiceClient<T>
500    where
501        T: tonic::client::GrpcService<tonic::body::Body>,
502        T::Error: Into<StdError>,
503        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
504        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
505    {
506        pub fn new(inner: T) -> Self {
507            let inner = tonic::client::Grpc::new(inner);
508            Self { inner }
509        }
510        pub fn with_origin(inner: T, origin: Uri) -> Self {
511            let inner = tonic::client::Grpc::with_origin(inner, origin);
512            Self { inner }
513        }
514        pub fn with_interceptor<F>(
515            inner: T,
516            interceptor: F,
517        ) -> KnowledgeServiceClient<InterceptedService<T, F>>
518        where
519            F: tonic::service::Interceptor,
520            T::ResponseBody: Default,
521            T: tonic::codegen::Service<
522                http::Request<tonic::body::Body>,
523                Response = http::Response<
524                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
525                >,
526            >,
527            <T as tonic::codegen::Service<
528                http::Request<tonic::body::Body>,
529            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
530        {
531            KnowledgeServiceClient::new(InterceptedService::new(inner, interceptor))
532        }
533        /// Compress requests with the given encoding.
534        ///
535        /// This requires the server to support it otherwise it might respond with an
536        /// error.
537        #[must_use]
538        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
539            self.inner = self.inner.send_compressed(encoding);
540            self
541        }
542        /// Enable decompressing responses.
543        #[must_use]
544        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
545            self.inner = self.inner.accept_compressed(encoding);
546            self
547        }
548        /// Limits the maximum size of a decoded message.
549        ///
550        /// Default: `4MB`
551        #[must_use]
552        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
553            self.inner = self.inner.max_decoding_message_size(limit);
554            self
555        }
556        /// Limits the maximum size of an encoded message.
557        ///
558        /// Default: `usize::MAX`
559        #[must_use]
560        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
561            self.inner = self.inner.max_encoding_message_size(limit);
562            self
563        }
564        pub async fn create_drive_index_job(
565            &mut self,
566            request: impl tonic::IntoRequest<super::CreateDriveIndexJobRequest>,
567        ) -> std::result::Result<
568            tonic::Response<super::CreateDriveIndexJobResponse>,
569            tonic::Status,
570        > {
571            self.inner
572                .ready()
573                .await
574                .map_err(|e| {
575                    tonic::Status::unknown(
576                        format!("Service was not ready: {}", e.into()),
577                    )
578                })?;
579            let codec = tonic::codec::ProstCodec::default();
580            let path = http::uri::PathAndQuery::from_static(
581                "/nominal.knowledge.v1.KnowledgeService/CreateDriveIndexJob",
582            );
583            let mut req = request.into_request();
584            req.extensions_mut()
585                .insert(
586                    GrpcMethod::new(
587                        "nominal.knowledge.v1.KnowledgeService",
588                        "CreateDriveIndexJob",
589                    ),
590                );
591            self.inner.unary(req, path, codec).await
592        }
593        pub async fn get_drive_index_job(
594            &mut self,
595            request: impl tonic::IntoRequest<super::GetDriveIndexJobRequest>,
596        ) -> std::result::Result<
597            tonic::Response<super::GetDriveIndexJobResponse>,
598            tonic::Status,
599        > {
600            self.inner
601                .ready()
602                .await
603                .map_err(|e| {
604                    tonic::Status::unknown(
605                        format!("Service was not ready: {}", e.into()),
606                    )
607                })?;
608            let codec = tonic::codec::ProstCodec::default();
609            let path = http::uri::PathAndQuery::from_static(
610                "/nominal.knowledge.v1.KnowledgeService/GetDriveIndexJob",
611            );
612            let mut req = request.into_request();
613            req.extensions_mut()
614                .insert(
615                    GrpcMethod::new(
616                        "nominal.knowledge.v1.KnowledgeService",
617                        "GetDriveIndexJob",
618                    ),
619                );
620            self.inner.unary(req, path, codec).await
621        }
622        pub async fn list_drive_index_jobs(
623            &mut self,
624            request: impl tonic::IntoRequest<super::ListDriveIndexJobsRequest>,
625        ) -> std::result::Result<
626            tonic::Response<super::ListDriveIndexJobsResponse>,
627            tonic::Status,
628        > {
629            self.inner
630                .ready()
631                .await
632                .map_err(|e| {
633                    tonic::Status::unknown(
634                        format!("Service was not ready: {}", e.into()),
635                    )
636                })?;
637            let codec = tonic::codec::ProstCodec::default();
638            let path = http::uri::PathAndQuery::from_static(
639                "/nominal.knowledge.v1.KnowledgeService/ListDriveIndexJobs",
640            );
641            let mut req = request.into_request();
642            req.extensions_mut()
643                .insert(
644                    GrpcMethod::new(
645                        "nominal.knowledge.v1.KnowledgeService",
646                        "ListDriveIndexJobs",
647                    ),
648                );
649            self.inner.unary(req, path, codec).await
650        }
651        pub async fn list_drive_index_job_sources(
652            &mut self,
653            request: impl tonic::IntoRequest<super::ListDriveIndexJobSourcesRequest>,
654        ) -> std::result::Result<
655            tonic::Response<super::ListDriveIndexJobSourcesResponse>,
656            tonic::Status,
657        > {
658            self.inner
659                .ready()
660                .await
661                .map_err(|e| {
662                    tonic::Status::unknown(
663                        format!("Service was not ready: {}", e.into()),
664                    )
665                })?;
666            let codec = tonic::codec::ProstCodec::default();
667            let path = http::uri::PathAndQuery::from_static(
668                "/nominal.knowledge.v1.KnowledgeService/ListDriveIndexJobSources",
669            );
670            let mut req = request.into_request();
671            req.extensions_mut()
672                .insert(
673                    GrpcMethod::new(
674                        "nominal.knowledge.v1.KnowledgeService",
675                        "ListDriveIndexJobSources",
676                    ),
677                );
678            self.inner.unary(req, path, codec).await
679        }
680        pub async fn query(
681            &mut self,
682            request: impl tonic::IntoRequest<super::QueryRequest>,
683        ) -> std::result::Result<tonic::Response<super::QueryResponse>, tonic::Status> {
684            self.inner
685                .ready()
686                .await
687                .map_err(|e| {
688                    tonic::Status::unknown(
689                        format!("Service was not ready: {}", e.into()),
690                    )
691                })?;
692            let codec = tonic::codec::ProstCodec::default();
693            let path = http::uri::PathAndQuery::from_static(
694                "/nominal.knowledge.v1.KnowledgeService/Query",
695            );
696            let mut req = request.into_request();
697            req.extensions_mut()
698                .insert(
699                    GrpcMethod::new("nominal.knowledge.v1.KnowledgeService", "Query"),
700                );
701            self.inner.unary(req, path, codec).await
702        }
703        pub async fn list_source_chunk_debug(
704            &mut self,
705            request: impl tonic::IntoRequest<super::ListSourceChunkDebugRequest>,
706        ) -> std::result::Result<
707            tonic::Response<super::ListSourceChunkDebugResponse>,
708            tonic::Status,
709        > {
710            self.inner
711                .ready()
712                .await
713                .map_err(|e| {
714                    tonic::Status::unknown(
715                        format!("Service was not ready: {}", e.into()),
716                    )
717                })?;
718            let codec = tonic::codec::ProstCodec::default();
719            let path = http::uri::PathAndQuery::from_static(
720                "/nominal.knowledge.v1.KnowledgeService/ListSourceChunkDebug",
721            );
722            let mut req = request.into_request();
723            req.extensions_mut()
724                .insert(
725                    GrpcMethod::new(
726                        "nominal.knowledge.v1.KnowledgeService",
727                        "ListSourceChunkDebug",
728                    ),
729                );
730            self.inner.unary(req, path, codec).await
731        }
732    }
733}