Skip to main content

nominal_api_proto/proto/
nominal.ai.v1.rs

1// This file is @generated by prost-build.
2#[derive(Clone, PartialEq, ::prost::Message)]
3pub struct SubmitMessageFeedbackRequest {
4    #[prost(string, tag = "1")]
5    pub conversation_rid: ::prost::alloc::string::String,
6    #[prost(string, tag = "2")]
7    pub message_id: ::prost::alloc::string::String,
8    #[prost(enumeration = "FeedbackVote", tag = "3")]
9    pub vote: i32,
10    #[prost(string, optional, tag = "4")]
11    pub comment: ::core::option::Option<::prost::alloc::string::String>,
12}
13#[derive(Clone, Copy, PartialEq, ::prost::Message)]
14pub struct SubmitMessageFeedbackResponse {}
15#[derive(Clone, PartialEq, ::prost::Message)]
16pub struct GetSnapshotRidByUserMessageIdRequest {
17    #[prost(string, tag = "1")]
18    pub conversation_rid: ::prost::alloc::string::String,
19    #[prost(string, tag = "2")]
20    pub message_id: ::prost::alloc::string::String,
21}
22#[derive(Clone, PartialEq, ::prost::Message)]
23pub struct GetSnapshotRidByUserMessageIdResponse {
24    #[prost(
25        oneof = "get_snapshot_rid_by_user_message_id_response::RestorePoint",
26        tags = "1, 2"
27    )]
28    pub restore_point: ::core::option::Option<
29        get_snapshot_rid_by_user_message_id_response::RestorePoint,
30    >,
31}
32/// Nested message and enum types in `GetSnapshotRidByUserMessageIdResponse`.
33pub mod get_snapshot_rid_by_user_message_id_response {
34    #[derive(Clone, PartialEq, ::prost::Oneof)]
35    pub enum RestorePoint {
36        #[prost(string, tag = "1")]
37        SnapshotRid(::prost::alloc::string::String),
38        #[prost(string, tag = "2")]
39        CommitId(::prost::alloc::string::String),
40    }
41}
42#[derive(Clone, Copy, PartialEq, ::prost::Message)]
43pub struct ReadOnlyMode {}
44#[derive(Clone, Copy, PartialEq, ::prost::Message)]
45pub struct EditMode {
46    #[prost(bool, optional, tag = "1")]
47    pub auto_accept: ::core::option::Option<bool>,
48}
49#[derive(Clone, Copy, PartialEq, ::prost::Message)]
50pub struct ConversationMode {
51    #[prost(oneof = "conversation_mode::Mode", tags = "1, 2")]
52    pub mode: ::core::option::Option<conversation_mode::Mode>,
53}
54/// Nested message and enum types in `ConversationMode`.
55pub mod conversation_mode {
56    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
57    pub enum Mode {
58        #[prost(message, tag = "1")]
59        ReadOnly(super::ReadOnlyMode),
60        #[prost(message, tag = "2")]
61        Edit(super::EditMode),
62    }
63}
64#[derive(Clone, PartialEq, ::prost::Message)]
65pub struct ToolApprovalResult {
66    #[prost(string, tag = "1")]
67    pub tool_call_id: ::prost::alloc::string::String,
68    #[prost(oneof = "tool_approval_result::Response", tags = "2, 3")]
69    pub response: ::core::option::Option<tool_approval_result::Response>,
70}
71/// Nested message and enum types in `ToolApprovalResult`.
72pub mod tool_approval_result {
73    #[derive(Clone, PartialEq, ::prost::Oneof)]
74    pub enum Response {
75        #[prost(message, tag = "2")]
76        Approved(super::ToolApprovedResponse),
77        #[prost(message, tag = "3")]
78        Denied(super::ToolDeniedResponse),
79    }
80}
81#[derive(Clone, PartialEq, ::prost::Message)]
82pub struct ToolApprovedResponse {
83    #[prost(string, optional, tag = "1")]
84    pub override_args: ::core::option::Option<::prost::alloc::string::String>,
85}
86#[derive(Clone, PartialEq, ::prost::Message)]
87pub struct ToolDeniedResponse {
88    #[prost(string, tag = "2")]
89    pub denial_reason: ::prost::alloc::string::String,
90}
91#[derive(Clone, Copy, PartialEq, ::prost::Message)]
92pub struct RetryRequest {}
93#[derive(Clone, PartialEq, ::prost::Message)]
94pub struct UserPromptRequest {
95    #[prost(message, optional, tag = "1")]
96    pub message: ::core::option::Option<UserModelMessage>,
97    #[prost(message, repeated, tag = "2")]
98    pub images: ::prost::alloc::vec::Vec<ImagePart>,
99}
100#[derive(Clone, PartialEq, ::prost::Message)]
101pub struct ToolApprovalRequest {
102    #[prost(message, repeated, tag = "1")]
103    pub tool_approvals: ::prost::alloc::vec::Vec<ToolApprovalResult>,
104}
105#[derive(Clone, PartialEq, ::prost::Message)]
106pub struct StreamChatRequest {
107    #[prost(string, tag = "1")]
108    pub conversation_rid: ::prost::alloc::string::String,
109    #[deprecated]
110    #[prost(message, optional, tag = "2")]
111    pub message: ::core::option::Option<UserModelMessage>,
112    #[deprecated]
113    #[prost(message, repeated, tag = "3")]
114    pub images: ::prost::alloc::vec::Vec<ImagePart>,
115    #[deprecated]
116    #[prost(message, repeated, tag = "6")]
117    pub tool_approvals: ::prost::alloc::vec::Vec<ToolApprovalResult>,
118    #[prost(oneof = "stream_chat_request::RequestType", tags = "7, 8, 9")]
119    pub request_type: ::core::option::Option<stream_chat_request::RequestType>,
120    #[prost(oneof = "stream_chat_request::Context", tags = "4, 5, 10, 11, 12")]
121    pub context: ::core::option::Option<stream_chat_request::Context>,
122}
123/// Nested message and enum types in `StreamChatRequest`.
124pub mod stream_chat_request {
125    #[derive(Clone, PartialEq, ::prost::Oneof)]
126    pub enum RequestType {
127        #[prost(message, tag = "7")]
128        Retry(super::RetryRequest),
129        #[prost(message, tag = "8")]
130        UserPrompt(super::UserPromptRequest),
131        #[prost(message, tag = "9")]
132        ToolApproval(super::ToolApprovalRequest),
133    }
134    #[derive(Clone, PartialEq, ::prost::Oneof)]
135    pub enum Context {
136        #[prost(message, tag = "4")]
137        Workbook(super::WorkbookContext),
138        #[prost(message, tag = "5")]
139        Global(super::GlobalContext),
140        #[prost(message, tag = "10")]
141        Checklist(super::ChecklistContext),
142        #[prost(message, tag = "11")]
143        Template(super::TemplateContext),
144        #[prost(message, tag = "12")]
145        Headless(super::HeadlessWorkbookContext),
146    }
147}
148#[derive(Clone, PartialEq, ::prost::Message)]
149pub struct WorkbookContext {
150    #[prost(string, tag = "1")]
151    pub workbook_rid: ::prost::alloc::string::String,
152    #[deprecated]
153    #[prost(message, optional, tag = "2")]
154    pub user_presence: ::core::option::Option<WorkbookUserPresence>,
155    #[prost(string, optional, tag = "3")]
156    pub active_tab_id: ::core::option::Option<::prost::alloc::string::String>,
157}
158#[derive(Clone, PartialEq, ::prost::Message)]
159pub struct HeadlessWorkbookContext {
160    #[prost(string, tag = "1")]
161    pub ghost_workbook_rid: ::prost::alloc::string::String,
162}
163#[derive(Clone, PartialEq, ::prost::Message)]
164pub struct ChecklistContext {
165    #[prost(string, tag = "1")]
166    pub checklist_rid: ::prost::alloc::string::String,
167    #[prost(string, tag = "2")]
168    pub branch_name: ::prost::alloc::string::String,
169    #[prost(oneof = "checklist_context::ReferenceRid", tags = "3, 4")]
170    pub reference_rid: ::core::option::Option<checklist_context::ReferenceRid>,
171}
172/// Nested message and enum types in `ChecklistContext`.
173pub mod checklist_context {
174    #[derive(Clone, PartialEq, ::prost::Oneof)]
175    pub enum ReferenceRid {
176        #[prost(string, tag = "3")]
177        Asset(::prost::alloc::string::String),
178        #[prost(string, tag = "4")]
179        Run(::prost::alloc::string::String),
180    }
181}
182#[derive(Clone, PartialEq, ::prost::Message)]
183pub struct TemplateContext {
184    #[prost(string, tag = "1")]
185    pub template_rid: ::prost::alloc::string::String,
186    #[prost(string, tag = "2")]
187    pub branch_name: ::prost::alloc::string::String,
188    #[prost(oneof = "template_context::ReferenceRid", tags = "3, 4")]
189    pub reference_rid: ::core::option::Option<template_context::ReferenceRid>,
190}
191/// Nested message and enum types in `TemplateContext`.
192pub mod template_context {
193    #[derive(Clone, PartialEq, ::prost::Oneof)]
194    pub enum ReferenceRid {
195        #[prost(string, tag = "3")]
196        Asset(::prost::alloc::string::String),
197        #[prost(string, tag = "4")]
198        Run(::prost::alloc::string::String),
199    }
200}
201#[derive(Clone, Copy, PartialEq, ::prost::Message)]
202pub struct GlobalContext {}
203#[derive(Clone, Copy, PartialEq, ::prost::Message)]
204pub struct WorkbookUserPresence {
205    #[prost(int32, tag = "1")]
206    pub tab_index: i32,
207    #[prost(message, optional, tag = "2")]
208    pub range: ::core::option::Option<TimeRange>,
209}
210#[derive(Clone, PartialEq, ::prost::Message)]
211pub struct CreateConversationRequest {
212    #[prost(string, tag = "1")]
213    pub title: ::prost::alloc::string::String,
214    #[prost(string, tag = "2")]
215    pub workspace_rid: ::prost::alloc::string::String,
216    #[prost(string, optional, tag = "3")]
217    pub old_conversation_rid: ::core::option::Option<::prost::alloc::string::String>,
218    #[prost(string, optional, tag = "4")]
219    pub previous_message_id: ::core::option::Option<::prost::alloc::string::String>,
220    #[prost(message, optional, tag = "5")]
221    pub conversation_mode: ::core::option::Option<ConversationMode>,
222    #[prost(string, optional, tag = "6")]
223    pub backing_workbook_rid: ::core::option::Option<::prost::alloc::string::String>,
224}
225#[derive(Clone, PartialEq, ::prost::Message)]
226pub struct CreateConversationResponse {
227    #[prost(string, tag = "1")]
228    pub new_conversation_rid: ::prost::alloc::string::String,
229}
230#[derive(Clone, PartialEq, ::prost::Message)]
231pub struct UpdateConversationMetadataRequest {
232    #[prost(string, optional, tag = "1")]
233    pub title: ::core::option::Option<::prost::alloc::string::String>,
234    #[prost(string, tag = "2")]
235    pub conversation_rid: ::prost::alloc::string::String,
236    #[prost(message, optional, tag = "3")]
237    pub conversation_mode: ::core::option::Option<ConversationMode>,
238}
239#[derive(Clone, Copy, PartialEq, ::prost::Message)]
240pub struct UpdateConversationMetadataResponse {}
241#[derive(Clone, PartialEq, ::prost::Message)]
242pub struct DeleteConversationRequest {
243    #[prost(string, tag = "1")]
244    pub conversation_rid: ::prost::alloc::string::String,
245}
246#[derive(Clone, Copy, PartialEq, ::prost::Message)]
247pub struct DeleteConversationResponse {}
248#[derive(Clone, PartialEq, ::prost::Message)]
249pub struct GetConversationRequest {
250    #[prost(string, tag = "1")]
251    pub conversation_rid: ::prost::alloc::string::String,
252    #[prost(string, optional, tag = "2")]
253    pub page_start_message_id: ::core::option::Option<::prost::alloc::string::String>,
254    #[prost(int32, optional, tag = "3")]
255    pub max_message_count: ::core::option::Option<i32>,
256}
257#[derive(Clone, PartialEq, ::prost::Message)]
258pub struct CompactConversationRequest {
259    #[prost(string, tag = "1")]
260    pub conversation_rid: ::prost::alloc::string::String,
261}
262#[derive(Clone, Copy, PartialEq, ::prost::Message)]
263pub struct CompactConversationResponse {
264    #[prost(message, optional, tag = "1")]
265    pub context: ::core::option::Option<ContextStatus>,
266}
267#[derive(Clone, PartialEq, ::prost::Message)]
268pub struct ModelMessageWithId {
269    #[prost(string, tag = "3")]
270    pub message_id: ::prost::alloc::string::String,
271    #[prost(message, repeated, tag = "5")]
272    pub tool_approval_requests: ::prost::alloc::vec::Vec<ToolCallDescription>,
273    #[prost(oneof = "model_message_with_id::Content", tags = "1, 2, 6")]
274    pub content: ::core::option::Option<model_message_with_id::Content>,
275    #[prost(oneof = "model_message_with_id::RestorePoint", tags = "4, 7")]
276    pub restore_point: ::core::option::Option<model_message_with_id::RestorePoint>,
277}
278/// Nested message and enum types in `ModelMessageWithId`.
279pub mod model_message_with_id {
280    #[derive(Clone, PartialEq, ::prost::Oneof)]
281    pub enum Content {
282        #[prost(message, tag = "1")]
283        Message(super::ModelMessage),
284        #[prost(message, tag = "2")]
285        ToolAction(super::ToolAction),
286        #[prost(message, tag = "6")]
287        ToolActionConfirmation(super::ToolActionConfirmation),
288    }
289    #[derive(Clone, PartialEq, ::prost::Oneof)]
290    pub enum RestorePoint {
291        #[prost(string, tag = "4")]
292        SnapshotRid(::prost::alloc::string::String),
293        #[prost(string, tag = "7")]
294        CommitId(::prost::alloc::string::String),
295    }
296}
297#[derive(Clone, PartialEq, ::prost::Message)]
298pub struct GetConversationResponse {
299    #[prost(message, repeated, tag = "1")]
300    pub ordered_messages: ::prost::alloc::vec::Vec<ModelMessageWithId>,
301    #[prost(message, optional, tag = "2")]
302    pub conversation_metadata: ::core::option::Option<ConversationMetadata>,
303}
304#[derive(Clone, PartialEq, ::prost::Message)]
305pub struct GetConversationMetadataRequest {
306    #[prost(string, tag = "1")]
307    pub conversation_rid: ::prost::alloc::string::String,
308}
309#[derive(Clone, PartialEq, ::prost::Message)]
310pub struct GetConversationMetadataResponse {
311    #[prost(message, optional, tag = "1")]
312    pub conversation_metadata: ::core::option::Option<ConversationMetadata>,
313}
314#[derive(Clone, PartialEq, ::prost::Message)]
315pub struct GetConversationMessagesRequest {
316    #[prost(string, tag = "1")]
317    pub conversation_rid: ::prost::alloc::string::String,
318    #[prost(string, optional, tag = "2")]
319    pub page_start_message_id: ::core::option::Option<::prost::alloc::string::String>,
320    #[prost(int32, optional, tag = "3")]
321    pub max_message_count: ::core::option::Option<i32>,
322}
323#[derive(Clone, PartialEq, ::prost::Message)]
324pub struct GetConversationMessagesResponse {
325    #[prost(message, repeated, tag = "1")]
326    pub ordered_messages: ::prost::alloc::vec::Vec<ModelMessageWithId>,
327    #[prost(string, optional, tag = "2")]
328    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
329}
330#[derive(Clone, PartialEq, ::prost::Message)]
331pub struct ListConversationsRequest {
332    #[prost(string, tag = "1")]
333    pub workspace_rid: ::prost::alloc::string::String,
334    #[prost(string, optional, tag = "2")]
335    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
336    #[prost(int32, optional, tag = "3")]
337    pub page_size: ::core::option::Option<i32>,
338}
339#[derive(Clone, PartialEq, ::prost::Message)]
340pub struct ConversationMetadata {
341    #[prost(string, tag = "1")]
342    pub conversation_rid: ::prost::alloc::string::String,
343    #[prost(string, tag = "2")]
344    pub title: ::prost::alloc::string::String,
345    #[prost(message, optional, tag = "3")]
346    pub created_at: ::core::option::Option<
347        super::super::super::google::protobuf::Timestamp,
348    >,
349    #[prost(message, optional, tag = "4")]
350    pub last_updated_at: ::core::option::Option<
351        super::super::super::google::protobuf::Timestamp,
352    >,
353    #[prost(message, optional, tag = "5")]
354    pub mode: ::core::option::Option<ConversationMode>,
355    #[prost(message, optional, tag = "6")]
356    pub current_context: ::core::option::Option<ContextStatus>,
357    #[prost(string, optional, tag = "7")]
358    pub backing_workbook_rid: ::core::option::Option<::prost::alloc::string::String>,
359}
360#[derive(Clone, PartialEq, ::prost::Message)]
361pub struct ListConversationsResponse {
362    #[prost(message, repeated, tag = "1")]
363    pub conversations: ::prost::alloc::vec::Vec<ConversationMetadata>,
364    #[prost(string, optional, tag = "2")]
365    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
366}
367#[derive(Clone, Copy, PartialEq, ::prost::Message)]
368pub struct TimeRange {
369    #[prost(message, optional, tag = "1")]
370    pub range_start: ::core::option::Option<Timestamp>,
371    #[prost(message, optional, tag = "2")]
372    pub range_end: ::core::option::Option<Timestamp>,
373}
374#[derive(Clone, Copy, PartialEq, ::prost::Message)]
375pub struct Timestamp {
376    #[prost(int32, tag = "1")]
377    pub seconds: i32,
378    #[prost(int32, tag = "2")]
379    pub nanoseconds: i32,
380}
381#[derive(Clone, PartialEq, ::prost::Message)]
382pub struct ModelMessage {
383    #[prost(oneof = "model_message::Kind", tags = "1, 2")]
384    pub kind: ::core::option::Option<model_message::Kind>,
385}
386/// Nested message and enum types in `ModelMessage`.
387pub mod model_message {
388    #[derive(Clone, PartialEq, ::prost::Oneof)]
389    pub enum Kind {
390        #[prost(message, tag = "1")]
391        User(super::UserModelMessage),
392        #[prost(message, tag = "2")]
393        Assistant(super::AssistantModelMessage),
394    }
395}
396#[derive(Clone, PartialEq, ::prost::Message)]
397pub struct UserModelMessage {
398    #[prost(message, repeated, tag = "1")]
399    pub text: ::prost::alloc::vec::Vec<UserContentPart>,
400}
401#[derive(Clone, PartialEq, ::prost::Message)]
402pub struct AssistantModelMessage {
403    #[prost(message, repeated, tag = "1")]
404    pub content_parts: ::prost::alloc::vec::Vec<AssistantContentPart>,
405}
406#[derive(Clone, PartialEq, ::prost::Message)]
407pub struct UserContentPart {
408    #[prost(oneof = "user_content_part::Part", tags = "1, 2")]
409    pub part: ::core::option::Option<user_content_part::Part>,
410}
411/// Nested message and enum types in `UserContentPart`.
412pub mod user_content_part {
413    #[derive(Clone, PartialEq, ::prost::Oneof)]
414    pub enum Part {
415        #[prost(message, tag = "1")]
416        Text(super::TextPart),
417        #[prost(message, tag = "2")]
418        Image(super::ImagePart),
419    }
420}
421#[derive(Clone, PartialEq, ::prost::Message)]
422pub struct AssistantContentPart {
423    #[prost(oneof = "assistant_content_part::Part", tags = "1, 2")]
424    pub part: ::core::option::Option<assistant_content_part::Part>,
425}
426/// Nested message and enum types in `AssistantContentPart`.
427pub mod assistant_content_part {
428    #[derive(Clone, PartialEq, ::prost::Oneof)]
429    pub enum Part {
430        #[prost(message, tag = "1")]
431        Text(super::TextPart),
432        #[prost(message, tag = "2")]
433        Reasoning(super::ReasoningPart),
434    }
435}
436#[derive(Clone, PartialEq, ::prost::Message)]
437pub struct TextPart {
438    #[prost(string, tag = "1")]
439    pub text: ::prost::alloc::string::String,
440}
441#[derive(Clone, PartialEq, ::prost::Message)]
442pub struct ImagePart {
443    #[prost(string, tag = "2")]
444    pub media_type: ::prost::alloc::string::String,
445    #[prost(string, tag = "4")]
446    pub attachment_rid: ::prost::alloc::string::String,
447}
448#[derive(Clone, PartialEq, ::prost::Message)]
449pub struct ReasoningPart {
450    #[prost(string, tag = "1")]
451    pub reasoning: ::prost::alloc::string::String,
452}
453#[derive(Clone, PartialEq, ::prost::Message)]
454pub struct StreamChatResponse {
455    #[prost(
456        oneof = "stream_chat_response::Response",
457        tags = "1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13"
458    )]
459    pub response: ::core::option::Option<stream_chat_response::Response>,
460}
461/// Nested message and enum types in `StreamChatResponse`.
462pub mod stream_chat_response {
463    #[derive(Clone, PartialEq, ::prost::Oneof)]
464    pub enum Response {
465        #[prost(message, tag = "1")]
466        Finish(super::Finish),
467        #[prost(message, tag = "2")]
468        Error(super::Error),
469        #[prost(message, tag = "3")]
470        TextStart(super::TextStart),
471        #[prost(message, tag = "4")]
472        TextDelta(super::TextDelta),
473        #[prost(message, tag = "5")]
474        TextEnd(super::TextEnd),
475        #[prost(message, tag = "6")]
476        ReasoningStart(super::ReasoningStart),
477        #[prost(message, tag = "7")]
478        ReasoningDelta(super::ReasoningDelta),
479        #[prost(message, tag = "8")]
480        ReasoningEnd(super::ReasoningEnd),
481        #[prost(message, tag = "10")]
482        ToolAction(super::ToolAction),
483        #[prost(message, tag = "11")]
484        ToolActionConfirmation(super::ToolActionConfirmation),
485        #[prost(message, tag = "12")]
486        StepStart(super::StepStart),
487        #[prost(message, tag = "13")]
488        StepEnd(super::StepEnd),
489    }
490}
491#[derive(Clone, Copy, PartialEq, ::prost::Message)]
492pub struct StepStart {}
493#[derive(Clone, Copy, PartialEq, ::prost::Message)]
494pub struct StepEnd {}
495#[derive(Clone, PartialEq, ::prost::Message)]
496pub struct ToolCallDescription {
497    #[prost(string, tag = "1")]
498    pub tool_call_id: ::prost::alloc::string::String,
499    #[prost(string, tag = "2")]
500    pub tool_name: ::prost::alloc::string::String,
501    #[prost(string, tag = "3")]
502    pub tool_args_json_string: ::prost::alloc::string::String,
503    #[prost(enumeration = "ToolCallStatus", tag = "4")]
504    pub status: i32,
505}
506#[derive(Clone, PartialEq, ::prost::Message)]
507pub struct Finish {
508    #[prost(string, repeated, tag = "1")]
509    pub ordered_message_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
510    #[prost(string, optional, tag = "2")]
511    pub new_title: ::core::option::Option<::prost::alloc::string::String>,
512    #[prost(message, repeated, tag = "3")]
513    pub tool_approval_requests: ::prost::alloc::vec::Vec<ToolCallDescription>,
514    #[prost(message, optional, tag = "4")]
515    pub updated_context: ::core::option::Option<ContextStatus>,
516}
517#[derive(Clone, PartialEq, ::prost::Message)]
518pub struct Error {
519    #[prost(string, tag = "1")]
520    pub message: ::prost::alloc::string::String,
521}
522#[derive(Clone, PartialEq, ::prost::Message)]
523pub struct TextStart {
524    #[prost(string, tag = "1")]
525    pub id: ::prost::alloc::string::String,
526}
527#[derive(Clone, PartialEq, ::prost::Message)]
528pub struct TextDelta {
529    #[prost(string, tag = "1")]
530    pub id: ::prost::alloc::string::String,
531    #[prost(string, tag = "2")]
532    pub delta: ::prost::alloc::string::String,
533}
534#[derive(Clone, PartialEq, ::prost::Message)]
535pub struct TextEnd {
536    #[prost(string, tag = "1")]
537    pub id: ::prost::alloc::string::String,
538}
539#[derive(Clone, PartialEq, ::prost::Message)]
540pub struct ReasoningStart {
541    #[prost(string, tag = "1")]
542    pub id: ::prost::alloc::string::String,
543}
544#[derive(Clone, PartialEq, ::prost::Message)]
545pub struct ReasoningDelta {
546    #[prost(string, tag = "1")]
547    pub id: ::prost::alloc::string::String,
548    #[prost(string, tag = "2")]
549    pub delta: ::prost::alloc::string::String,
550}
551#[derive(Clone, PartialEq, ::prost::Message)]
552pub struct ReasoningEnd {
553    #[prost(string, tag = "1")]
554    pub id: ::prost::alloc::string::String,
555}
556#[derive(Clone, PartialEq, ::prost::Message)]
557pub struct ToolAction {
558    #[prost(string, tag = "2")]
559    pub tool_action_verb: ::prost::alloc::string::String,
560    #[prost(string, optional, tag = "3")]
561    pub tool_target: ::core::option::Option<::prost::alloc::string::String>,
562    #[prost(message, optional, tag = "5")]
563    pub tool_call_description: ::core::option::Option<ToolCallDescription>,
564    #[deprecated]
565    #[prost(string, tag = "1")]
566    pub id: ::prost::alloc::string::String,
567    #[deprecated]
568    #[prost(string, tag = "4")]
569    pub tool_name: ::prost::alloc::string::String,
570}
571#[derive(Clone, PartialEq, ::prost::Message)]
572pub struct ToolActionConfirmation {
573    #[prost(string, tag = "1")]
574    pub id: ::prost::alloc::string::String,
575    #[prost(oneof = "tool_action_confirmation::Outcome", tags = "2, 3")]
576    pub outcome: ::core::option::Option<tool_action_confirmation::Outcome>,
577}
578/// Nested message and enum types in `ToolActionConfirmation`.
579pub mod tool_action_confirmation {
580    #[derive(Clone, PartialEq, ::prost::Oneof)]
581    pub enum Outcome {
582        #[prost(message, tag = "2")]
583        Success(super::ToolActionSuccess),
584        #[prost(message, tag = "3")]
585        Failure(super::ToolActionFailure),
586    }
587}
588#[derive(Clone, PartialEq, ::prost::Message)]
589pub struct ToolActionSuccess {
590    #[prost(string, tag = "1")]
591    pub tool_success_message: ::prost::alloc::string::String,
592}
593#[derive(Clone, PartialEq, ::prost::Message)]
594pub struct ToolActionFailure {
595    #[prost(string, tag = "1")]
596    pub tool_error_message: ::prost::alloc::string::String,
597}
598#[derive(Clone, Copy, PartialEq, ::prost::Message)]
599pub struct ContextStatus {
600    #[prost(int32, tag = "1")]
601    pub curr_token_count: i32,
602    #[prost(int32, tag = "2")]
603    pub model_context_limit: i32,
604}
605#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
606#[repr(i32)]
607pub enum FeedbackVote {
608    Unspecified = 0,
609    ThumbsUp = 1,
610    ThumbsDown = 2,
611}
612impl FeedbackVote {
613    /// String value of the enum field names used in the ProtoBuf definition.
614    ///
615    /// The values are not transformed in any way and thus are considered stable
616    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
617    pub fn as_str_name(&self) -> &'static str {
618        match self {
619            Self::Unspecified => "FEEDBACK_VOTE_UNSPECIFIED",
620            Self::ThumbsUp => "FEEDBACK_VOTE_THUMBS_UP",
621            Self::ThumbsDown => "FEEDBACK_VOTE_THUMBS_DOWN",
622        }
623    }
624    /// Creates an enum from field names used in the ProtoBuf definition.
625    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
626        match value {
627            "FEEDBACK_VOTE_UNSPECIFIED" => Some(Self::Unspecified),
628            "FEEDBACK_VOTE_THUMBS_UP" => Some(Self::ThumbsUp),
629            "FEEDBACK_VOTE_THUMBS_DOWN" => Some(Self::ThumbsDown),
630            _ => None,
631        }
632    }
633}
634#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
635#[repr(i32)]
636pub enum ToolCallStatus {
637    Unspecified = 0,
638    Approved = 1,
639    Denied = 2,
640    AwaitingApproval = 3,
641}
642impl ToolCallStatus {
643    /// String value of the enum field names used in the ProtoBuf definition.
644    ///
645    /// The values are not transformed in any way and thus are considered stable
646    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
647    pub fn as_str_name(&self) -> &'static str {
648        match self {
649            Self::Unspecified => "TOOL_CALL_STATUS_UNSPECIFIED",
650            Self::Approved => "TOOL_CALL_STATUS_APPROVED",
651            Self::Denied => "TOOL_CALL_STATUS_DENIED",
652            Self::AwaitingApproval => "TOOL_CALL_STATUS_AWAITING_APPROVAL",
653        }
654    }
655    /// Creates an enum from field names used in the ProtoBuf definition.
656    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
657        match value {
658            "TOOL_CALL_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
659            "TOOL_CALL_STATUS_APPROVED" => Some(Self::Approved),
660            "TOOL_CALL_STATUS_DENIED" => Some(Self::Denied),
661            "TOOL_CALL_STATUS_AWAITING_APPROVAL" => Some(Self::AwaitingApproval),
662            _ => None,
663        }
664    }
665}
666/// Generated client implementations.
667pub mod ai_agent_service_client {
668    #![allow(
669        unused_variables,
670        dead_code,
671        missing_docs,
672        clippy::wildcard_imports,
673        clippy::let_unit_value,
674    )]
675    use tonic::codegen::*;
676    use tonic::codegen::http::Uri;
677    #[derive(Debug, Clone)]
678    pub struct AiAgentServiceClient<T> {
679        inner: tonic::client::Grpc<T>,
680    }
681    impl AiAgentServiceClient<tonic::transport::Channel> {
682        /// Attempt to create a new client by connecting to a given endpoint.
683        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
684        where
685            D: TryInto<tonic::transport::Endpoint>,
686            D::Error: Into<StdError>,
687        {
688            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
689            Ok(Self::new(conn))
690        }
691    }
692    impl<T> AiAgentServiceClient<T>
693    where
694        T: tonic::client::GrpcService<tonic::body::Body>,
695        T::Error: Into<StdError>,
696        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
697        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
698    {
699        pub fn new(inner: T) -> Self {
700            let inner = tonic::client::Grpc::new(inner);
701            Self { inner }
702        }
703        pub fn with_origin(inner: T, origin: Uri) -> Self {
704            let inner = tonic::client::Grpc::with_origin(inner, origin);
705            Self { inner }
706        }
707        pub fn with_interceptor<F>(
708            inner: T,
709            interceptor: F,
710        ) -> AiAgentServiceClient<InterceptedService<T, F>>
711        where
712            F: tonic::service::Interceptor,
713            T::ResponseBody: Default,
714            T: tonic::codegen::Service<
715                http::Request<tonic::body::Body>,
716                Response = http::Response<
717                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
718                >,
719            >,
720            <T as tonic::codegen::Service<
721                http::Request<tonic::body::Body>,
722            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
723        {
724            AiAgentServiceClient::new(InterceptedService::new(inner, interceptor))
725        }
726        /// Compress requests with the given encoding.
727        ///
728        /// This requires the server to support it otherwise it might respond with an
729        /// error.
730        #[must_use]
731        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
732            self.inner = self.inner.send_compressed(encoding);
733            self
734        }
735        /// Enable decompressing responses.
736        #[must_use]
737        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
738            self.inner = self.inner.accept_compressed(encoding);
739            self
740        }
741        /// Limits the maximum size of a decoded message.
742        ///
743        /// Default: `4MB`
744        #[must_use]
745        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
746            self.inner = self.inner.max_decoding_message_size(limit);
747            self
748        }
749        /// Limits the maximum size of an encoded message.
750        ///
751        /// Default: `usize::MAX`
752        #[must_use]
753        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
754            self.inner = self.inner.max_encoding_message_size(limit);
755            self
756        }
757        pub async fn stream_chat(
758            &mut self,
759            request: impl tonic::IntoRequest<super::StreamChatRequest>,
760        ) -> std::result::Result<
761            tonic::Response<tonic::codec::Streaming<super::StreamChatResponse>>,
762            tonic::Status,
763        > {
764            self.inner
765                .ready()
766                .await
767                .map_err(|e| {
768                    tonic::Status::unknown(
769                        format!("Service was not ready: {}", e.into()),
770                    )
771                })?;
772            let codec = tonic::codec::ProstCodec::default();
773            let path = http::uri::PathAndQuery::from_static(
774                "/nominal.ai.v1.AIAgentService/StreamChat",
775            );
776            let mut req = request.into_request();
777            req.extensions_mut()
778                .insert(GrpcMethod::new("nominal.ai.v1.AIAgentService", "StreamChat"));
779            self.inner.server_streaming(req, path, codec).await
780        }
781        #[deprecated]
782        pub async fn get_conversation(
783            &mut self,
784            request: impl tonic::IntoRequest<super::GetConversationRequest>,
785        ) -> std::result::Result<
786            tonic::Response<super::GetConversationResponse>,
787            tonic::Status,
788        > {
789            self.inner
790                .ready()
791                .await
792                .map_err(|e| {
793                    tonic::Status::unknown(
794                        format!("Service was not ready: {}", e.into()),
795                    )
796                })?;
797            let codec = tonic::codec::ProstCodec::default();
798            let path = http::uri::PathAndQuery::from_static(
799                "/nominal.ai.v1.AIAgentService/GetConversation",
800            );
801            let mut req = request.into_request();
802            req.extensions_mut()
803                .insert(
804                    GrpcMethod::new("nominal.ai.v1.AIAgentService", "GetConversation"),
805                );
806            self.inner.unary(req, path, codec).await
807        }
808        pub async fn get_conversation_metadata(
809            &mut self,
810            request: impl tonic::IntoRequest<super::GetConversationMetadataRequest>,
811        ) -> std::result::Result<
812            tonic::Response<super::GetConversationMetadataResponse>,
813            tonic::Status,
814        > {
815            self.inner
816                .ready()
817                .await
818                .map_err(|e| {
819                    tonic::Status::unknown(
820                        format!("Service was not ready: {}", e.into()),
821                    )
822                })?;
823            let codec = tonic::codec::ProstCodec::default();
824            let path = http::uri::PathAndQuery::from_static(
825                "/nominal.ai.v1.AIAgentService/GetConversationMetadata",
826            );
827            let mut req = request.into_request();
828            req.extensions_mut()
829                .insert(
830                    GrpcMethod::new(
831                        "nominal.ai.v1.AIAgentService",
832                        "GetConversationMetadata",
833                    ),
834                );
835            self.inner.unary(req, path, codec).await
836        }
837        pub async fn get_conversation_messages(
838            &mut self,
839            request: impl tonic::IntoRequest<super::GetConversationMessagesRequest>,
840        ) -> std::result::Result<
841            tonic::Response<super::GetConversationMessagesResponse>,
842            tonic::Status,
843        > {
844            self.inner
845                .ready()
846                .await
847                .map_err(|e| {
848                    tonic::Status::unknown(
849                        format!("Service was not ready: {}", e.into()),
850                    )
851                })?;
852            let codec = tonic::codec::ProstCodec::default();
853            let path = http::uri::PathAndQuery::from_static(
854                "/nominal.ai.v1.AIAgentService/GetConversationMessages",
855            );
856            let mut req = request.into_request();
857            req.extensions_mut()
858                .insert(
859                    GrpcMethod::new(
860                        "nominal.ai.v1.AIAgentService",
861                        "GetConversationMessages",
862                    ),
863                );
864            self.inner.unary(req, path, codec).await
865        }
866        pub async fn list_conversations(
867            &mut self,
868            request: impl tonic::IntoRequest<super::ListConversationsRequest>,
869        ) -> std::result::Result<
870            tonic::Response<super::ListConversationsResponse>,
871            tonic::Status,
872        > {
873            self.inner
874                .ready()
875                .await
876                .map_err(|e| {
877                    tonic::Status::unknown(
878                        format!("Service was not ready: {}", e.into()),
879                    )
880                })?;
881            let codec = tonic::codec::ProstCodec::default();
882            let path = http::uri::PathAndQuery::from_static(
883                "/nominal.ai.v1.AIAgentService/ListConversations",
884            );
885            let mut req = request.into_request();
886            req.extensions_mut()
887                .insert(
888                    GrpcMethod::new("nominal.ai.v1.AIAgentService", "ListConversations"),
889                );
890            self.inner.unary(req, path, codec).await
891        }
892        pub async fn create_conversation(
893            &mut self,
894            request: impl tonic::IntoRequest<super::CreateConversationRequest>,
895        ) -> std::result::Result<
896            tonic::Response<super::CreateConversationResponse>,
897            tonic::Status,
898        > {
899            self.inner
900                .ready()
901                .await
902                .map_err(|e| {
903                    tonic::Status::unknown(
904                        format!("Service was not ready: {}", e.into()),
905                    )
906                })?;
907            let codec = tonic::codec::ProstCodec::default();
908            let path = http::uri::PathAndQuery::from_static(
909                "/nominal.ai.v1.AIAgentService/CreateConversation",
910            );
911            let mut req = request.into_request();
912            req.extensions_mut()
913                .insert(
914                    GrpcMethod::new("nominal.ai.v1.AIAgentService", "CreateConversation"),
915                );
916            self.inner.unary(req, path, codec).await
917        }
918        pub async fn update_conversation_metadata(
919            &mut self,
920            request: impl tonic::IntoRequest<super::UpdateConversationMetadataRequest>,
921        ) -> std::result::Result<
922            tonic::Response<super::UpdateConversationMetadataResponse>,
923            tonic::Status,
924        > {
925            self.inner
926                .ready()
927                .await
928                .map_err(|e| {
929                    tonic::Status::unknown(
930                        format!("Service was not ready: {}", e.into()),
931                    )
932                })?;
933            let codec = tonic::codec::ProstCodec::default();
934            let path = http::uri::PathAndQuery::from_static(
935                "/nominal.ai.v1.AIAgentService/UpdateConversationMetadata",
936            );
937            let mut req = request.into_request();
938            req.extensions_mut()
939                .insert(
940                    GrpcMethod::new(
941                        "nominal.ai.v1.AIAgentService",
942                        "UpdateConversationMetadata",
943                    ),
944                );
945            self.inner.unary(req, path, codec).await
946        }
947        pub async fn delete_conversation(
948            &mut self,
949            request: impl tonic::IntoRequest<super::DeleteConversationRequest>,
950        ) -> std::result::Result<
951            tonic::Response<super::DeleteConversationResponse>,
952            tonic::Status,
953        > {
954            self.inner
955                .ready()
956                .await
957                .map_err(|e| {
958                    tonic::Status::unknown(
959                        format!("Service was not ready: {}", e.into()),
960                    )
961                })?;
962            let codec = tonic::codec::ProstCodec::default();
963            let path = http::uri::PathAndQuery::from_static(
964                "/nominal.ai.v1.AIAgentService/DeleteConversation",
965            );
966            let mut req = request.into_request();
967            req.extensions_mut()
968                .insert(
969                    GrpcMethod::new("nominal.ai.v1.AIAgentService", "DeleteConversation"),
970                );
971            self.inner.unary(req, path, codec).await
972        }
973        pub async fn get_snapshot_rid_by_user_message_id(
974            &mut self,
975            request: impl tonic::IntoRequest<super::GetSnapshotRidByUserMessageIdRequest>,
976        ) -> std::result::Result<
977            tonic::Response<super::GetSnapshotRidByUserMessageIdResponse>,
978            tonic::Status,
979        > {
980            self.inner
981                .ready()
982                .await
983                .map_err(|e| {
984                    tonic::Status::unknown(
985                        format!("Service was not ready: {}", e.into()),
986                    )
987                })?;
988            let codec = tonic::codec::ProstCodec::default();
989            let path = http::uri::PathAndQuery::from_static(
990                "/nominal.ai.v1.AIAgentService/GetSnapshotRidByUserMessageId",
991            );
992            let mut req = request.into_request();
993            req.extensions_mut()
994                .insert(
995                    GrpcMethod::new(
996                        "nominal.ai.v1.AIAgentService",
997                        "GetSnapshotRidByUserMessageId",
998                    ),
999                );
1000            self.inner.unary(req, path, codec).await
1001        }
1002        pub async fn compact_conversation(
1003            &mut self,
1004            request: impl tonic::IntoRequest<super::CompactConversationRequest>,
1005        ) -> std::result::Result<
1006            tonic::Response<super::CompactConversationResponse>,
1007            tonic::Status,
1008        > {
1009            self.inner
1010                .ready()
1011                .await
1012                .map_err(|e| {
1013                    tonic::Status::unknown(
1014                        format!("Service was not ready: {}", e.into()),
1015                    )
1016                })?;
1017            let codec = tonic::codec::ProstCodec::default();
1018            let path = http::uri::PathAndQuery::from_static(
1019                "/nominal.ai.v1.AIAgentService/CompactConversation",
1020            );
1021            let mut req = request.into_request();
1022            req.extensions_mut()
1023                .insert(
1024                    GrpcMethod::new(
1025                        "nominal.ai.v1.AIAgentService",
1026                        "CompactConversation",
1027                    ),
1028                );
1029            self.inner.unary(req, path, codec).await
1030        }
1031        pub async fn submit_message_feedback(
1032            &mut self,
1033            request: impl tonic::IntoRequest<super::SubmitMessageFeedbackRequest>,
1034        ) -> std::result::Result<
1035            tonic::Response<super::SubmitMessageFeedbackResponse>,
1036            tonic::Status,
1037        > {
1038            self.inner
1039                .ready()
1040                .await
1041                .map_err(|e| {
1042                    tonic::Status::unknown(
1043                        format!("Service was not ready: {}", e.into()),
1044                    )
1045                })?;
1046            let codec = tonic::codec::ProstCodec::default();
1047            let path = http::uri::PathAndQuery::from_static(
1048                "/nominal.ai.v1.AIAgentService/SubmitMessageFeedback",
1049            );
1050            let mut req = request.into_request();
1051            req.extensions_mut()
1052                .insert(
1053                    GrpcMethod::new(
1054                        "nominal.ai.v1.AIAgentService",
1055                        "SubmitMessageFeedback",
1056                    ),
1057                );
1058            self.inner.unary(req, path, codec).await
1059        }
1060    }
1061}
1062#[derive(Clone, PartialEq, ::prost::Message)]
1063pub struct ClassifyErrorRequest {
1064    #[prost(string, tag = "1")]
1065    pub error_message: ::prost::alloc::string::String,
1066}
1067#[derive(Clone, PartialEq, ::prost::Message)]
1068pub struct ClassifyErrorResponse {
1069    #[prost(enumeration = "ErrorClassification", tag = "1")]
1070    pub classification: i32,
1071    #[prost(string, tag = "2")]
1072    pub reason: ::prost::alloc::string::String,
1073}
1074#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1075#[repr(i32)]
1076pub enum ErrorClassification {
1077    Unspecified = 0,
1078    Client = 1,
1079    Server = 2,
1080}
1081impl ErrorClassification {
1082    /// String value of the enum field names used in the ProtoBuf definition.
1083    ///
1084    /// The values are not transformed in any way and thus are considered stable
1085    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1086    pub fn as_str_name(&self) -> &'static str {
1087        match self {
1088            Self::Unspecified => "ERROR_CLASSIFICATION_UNSPECIFIED",
1089            Self::Client => "ERROR_CLASSIFICATION_CLIENT",
1090            Self::Server => "ERROR_CLASSIFICATION_SERVER",
1091        }
1092    }
1093    /// Creates an enum from field names used in the ProtoBuf definition.
1094    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1095        match value {
1096            "ERROR_CLASSIFICATION_UNSPECIFIED" => Some(Self::Unspecified),
1097            "ERROR_CLASSIFICATION_CLIENT" => Some(Self::Client),
1098            "ERROR_CLASSIFICATION_SERVER" => Some(Self::Server),
1099            _ => None,
1100        }
1101    }
1102}
1103/// Generated client implementations.
1104pub mod data_ingestion_error_classifier_service_client {
1105    #![allow(
1106        unused_variables,
1107        dead_code,
1108        missing_docs,
1109        clippy::wildcard_imports,
1110        clippy::let_unit_value,
1111    )]
1112    use tonic::codegen::*;
1113    use tonic::codegen::http::Uri;
1114    #[derive(Debug, Clone)]
1115    pub struct DataIngestionErrorClassifierServiceClient<T> {
1116        inner: tonic::client::Grpc<T>,
1117    }
1118    impl DataIngestionErrorClassifierServiceClient<tonic::transport::Channel> {
1119        /// Attempt to create a new client by connecting to a given endpoint.
1120        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1121        where
1122            D: TryInto<tonic::transport::Endpoint>,
1123            D::Error: Into<StdError>,
1124        {
1125            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1126            Ok(Self::new(conn))
1127        }
1128    }
1129    impl<T> DataIngestionErrorClassifierServiceClient<T>
1130    where
1131        T: tonic::client::GrpcService<tonic::body::Body>,
1132        T::Error: Into<StdError>,
1133        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1134        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1135    {
1136        pub fn new(inner: T) -> Self {
1137            let inner = tonic::client::Grpc::new(inner);
1138            Self { inner }
1139        }
1140        pub fn with_origin(inner: T, origin: Uri) -> Self {
1141            let inner = tonic::client::Grpc::with_origin(inner, origin);
1142            Self { inner }
1143        }
1144        pub fn with_interceptor<F>(
1145            inner: T,
1146            interceptor: F,
1147        ) -> DataIngestionErrorClassifierServiceClient<InterceptedService<T, F>>
1148        where
1149            F: tonic::service::Interceptor,
1150            T::ResponseBody: Default,
1151            T: tonic::codegen::Service<
1152                http::Request<tonic::body::Body>,
1153                Response = http::Response<
1154                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
1155                >,
1156            >,
1157            <T as tonic::codegen::Service<
1158                http::Request<tonic::body::Body>,
1159            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1160        {
1161            DataIngestionErrorClassifierServiceClient::new(
1162                InterceptedService::new(inner, interceptor),
1163            )
1164        }
1165        /// Compress requests with the given encoding.
1166        ///
1167        /// This requires the server to support it otherwise it might respond with an
1168        /// error.
1169        #[must_use]
1170        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1171            self.inner = self.inner.send_compressed(encoding);
1172            self
1173        }
1174        /// Enable decompressing responses.
1175        #[must_use]
1176        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1177            self.inner = self.inner.accept_compressed(encoding);
1178            self
1179        }
1180        /// Limits the maximum size of a decoded message.
1181        ///
1182        /// Default: `4MB`
1183        #[must_use]
1184        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1185            self.inner = self.inner.max_decoding_message_size(limit);
1186            self
1187        }
1188        /// Limits the maximum size of an encoded message.
1189        ///
1190        /// Default: `usize::MAX`
1191        #[must_use]
1192        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1193            self.inner = self.inner.max_encoding_message_size(limit);
1194            self
1195        }
1196        pub async fn classify_error(
1197            &mut self,
1198            request: impl tonic::IntoRequest<super::ClassifyErrorRequest>,
1199        ) -> std::result::Result<
1200            tonic::Response<super::ClassifyErrorResponse>,
1201            tonic::Status,
1202        > {
1203            self.inner
1204                .ready()
1205                .await
1206                .map_err(|e| {
1207                    tonic::Status::unknown(
1208                        format!("Service was not ready: {}", e.into()),
1209                    )
1210                })?;
1211            let codec = tonic::codec::ProstCodec::default();
1212            let path = http::uri::PathAndQuery::from_static(
1213                "/nominal.ai.v1.DataIngestionErrorClassifierService/ClassifyError",
1214            );
1215            let mut req = request.into_request();
1216            req.extensions_mut()
1217                .insert(
1218                    GrpcMethod::new(
1219                        "nominal.ai.v1.DataIngestionErrorClassifierService",
1220                        "ClassifyError",
1221                    ),
1222                );
1223            self.inner.unary(req, path, codec).await
1224        }
1225    }
1226}
1227#[derive(Clone, PartialEq, ::prost::Message)]
1228pub struct CreateOrUpdateKnowledgeBaseRequest {
1229    #[prost(string, tag = "1")]
1230    pub attachment_rid: ::prost::alloc::string::String,
1231    #[prost(string, tag = "2")]
1232    pub summary_description: ::prost::alloc::string::String,
1233    #[prost(enumeration = "KnowledgeBaseType", optional, tag = "3")]
1234    pub r#type: ::core::option::Option<i32>,
1235}
1236#[derive(Clone, PartialEq, ::prost::Message)]
1237pub struct CreateOrUpdateKnowledgeBaseResponse {
1238    #[prost(string, tag = "1")]
1239    pub knowledge_base_rid: ::prost::alloc::string::String,
1240}
1241#[derive(Clone, PartialEq, ::prost::Message)]
1242pub struct KnowledgeBase {
1243    #[prost(string, tag = "1")]
1244    pub knowledge_base_rid: ::prost::alloc::string::String,
1245    #[prost(string, tag = "2")]
1246    pub attachment_rid: ::prost::alloc::string::String,
1247    #[prost(string, tag = "3")]
1248    pub workspace_rid: ::prost::alloc::string::String,
1249    #[prost(string, tag = "4")]
1250    pub summary_description: ::prost::alloc::string::String,
1251    #[prost(enumeration = "KnowledgeBaseType", tag = "5")]
1252    pub r#type: i32,
1253    #[prost(int32, tag = "6")]
1254    pub version: i32,
1255}
1256#[derive(Clone, PartialEq, ::prost::Message)]
1257pub struct ListRequest {
1258    #[prost(string, tag = "1")]
1259    pub workspace_rid: ::prost::alloc::string::String,
1260}
1261#[derive(Clone, PartialEq, ::prost::Message)]
1262pub struct ListResponse {
1263    #[prost(message, repeated, tag = "1")]
1264    pub knowledge_bases: ::prost::alloc::vec::Vec<KnowledgeBase>,
1265}
1266#[derive(Clone, PartialEq, ::prost::Message)]
1267pub struct DeleteRequest {
1268    #[prost(string, tag = "1")]
1269    pub knowledge_base_rid: ::prost::alloc::string::String,
1270}
1271#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1272pub struct DeleteResponse {
1273    #[prost(bool, tag = "1")]
1274    pub success: bool,
1275}
1276#[derive(Clone, PartialEq, ::prost::Message)]
1277pub struct GetBatchRequest {
1278    #[prost(string, repeated, tag = "1")]
1279    pub knowledge_base_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1280}
1281#[derive(Clone, PartialEq, ::prost::Message)]
1282pub struct GetBatchResponse {
1283    #[prost(message, repeated, tag = "1")]
1284    pub knowledge_bases: ::prost::alloc::vec::Vec<KnowledgeBase>,
1285}
1286#[derive(Clone, PartialEq, ::prost::Message)]
1287pub struct GenerateSummaryDescriptionRequest {
1288    #[prost(string, tag = "1")]
1289    pub attachment_rid: ::prost::alloc::string::String,
1290}
1291#[derive(Clone, PartialEq, ::prost::Message)]
1292pub struct GenerateSummaryDescriptionResponse {
1293    #[prost(string, tag = "1")]
1294    pub summary_description: ::prost::alloc::string::String,
1295}
1296#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1297#[repr(i32)]
1298pub enum KnowledgeBaseType {
1299    Unspecified = 0,
1300    Prompt = 1,
1301    Embedding = 2,
1302}
1303impl KnowledgeBaseType {
1304    /// String value of the enum field names used in the ProtoBuf definition.
1305    ///
1306    /// The values are not transformed in any way and thus are considered stable
1307    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1308    pub fn as_str_name(&self) -> &'static str {
1309        match self {
1310            Self::Unspecified => "KNOWLEDGE_BASE_TYPE_UNSPECIFIED",
1311            Self::Prompt => "KNOWLEDGE_BASE_TYPE_PROMPT",
1312            Self::Embedding => "KNOWLEDGE_BASE_TYPE_EMBEDDING",
1313        }
1314    }
1315    /// Creates an enum from field names used in the ProtoBuf definition.
1316    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1317        match value {
1318            "KNOWLEDGE_BASE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
1319            "KNOWLEDGE_BASE_TYPE_PROMPT" => Some(Self::Prompt),
1320            "KNOWLEDGE_BASE_TYPE_EMBEDDING" => Some(Self::Embedding),
1321            _ => None,
1322        }
1323    }
1324}
1325/// Generated client implementations.
1326pub mod knowledge_base_service_client {
1327    #![allow(
1328        unused_variables,
1329        dead_code,
1330        missing_docs,
1331        clippy::wildcard_imports,
1332        clippy::let_unit_value,
1333    )]
1334    use tonic::codegen::*;
1335    use tonic::codegen::http::Uri;
1336    #[derive(Debug, Clone)]
1337    pub struct KnowledgeBaseServiceClient<T> {
1338        inner: tonic::client::Grpc<T>,
1339    }
1340    impl KnowledgeBaseServiceClient<tonic::transport::Channel> {
1341        /// Attempt to create a new client by connecting to a given endpoint.
1342        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1343        where
1344            D: TryInto<tonic::transport::Endpoint>,
1345            D::Error: Into<StdError>,
1346        {
1347            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1348            Ok(Self::new(conn))
1349        }
1350    }
1351    impl<T> KnowledgeBaseServiceClient<T>
1352    where
1353        T: tonic::client::GrpcService<tonic::body::Body>,
1354        T::Error: Into<StdError>,
1355        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1356        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1357    {
1358        pub fn new(inner: T) -> Self {
1359            let inner = tonic::client::Grpc::new(inner);
1360            Self { inner }
1361        }
1362        pub fn with_origin(inner: T, origin: Uri) -> Self {
1363            let inner = tonic::client::Grpc::with_origin(inner, origin);
1364            Self { inner }
1365        }
1366        pub fn with_interceptor<F>(
1367            inner: T,
1368            interceptor: F,
1369        ) -> KnowledgeBaseServiceClient<InterceptedService<T, F>>
1370        where
1371            F: tonic::service::Interceptor,
1372            T::ResponseBody: Default,
1373            T: tonic::codegen::Service<
1374                http::Request<tonic::body::Body>,
1375                Response = http::Response<
1376                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
1377                >,
1378            >,
1379            <T as tonic::codegen::Service<
1380                http::Request<tonic::body::Body>,
1381            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1382        {
1383            KnowledgeBaseServiceClient::new(InterceptedService::new(inner, interceptor))
1384        }
1385        /// Compress requests with the given encoding.
1386        ///
1387        /// This requires the server to support it otherwise it might respond with an
1388        /// error.
1389        #[must_use]
1390        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1391            self.inner = self.inner.send_compressed(encoding);
1392            self
1393        }
1394        /// Enable decompressing responses.
1395        #[must_use]
1396        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1397            self.inner = self.inner.accept_compressed(encoding);
1398            self
1399        }
1400        /// Limits the maximum size of a decoded message.
1401        ///
1402        /// Default: `4MB`
1403        #[must_use]
1404        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1405            self.inner = self.inner.max_decoding_message_size(limit);
1406            self
1407        }
1408        /// Limits the maximum size of an encoded message.
1409        ///
1410        /// Default: `usize::MAX`
1411        #[must_use]
1412        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1413            self.inner = self.inner.max_encoding_message_size(limit);
1414            self
1415        }
1416        pub async fn create_or_update_knowledge_base(
1417            &mut self,
1418            request: impl tonic::IntoRequest<super::CreateOrUpdateKnowledgeBaseRequest>,
1419        ) -> std::result::Result<
1420            tonic::Response<super::CreateOrUpdateKnowledgeBaseResponse>,
1421            tonic::Status,
1422        > {
1423            self.inner
1424                .ready()
1425                .await
1426                .map_err(|e| {
1427                    tonic::Status::unknown(
1428                        format!("Service was not ready: {}", e.into()),
1429                    )
1430                })?;
1431            let codec = tonic::codec::ProstCodec::default();
1432            let path = http::uri::PathAndQuery::from_static(
1433                "/nominal.ai.v1.KnowledgeBaseService/CreateOrUpdateKnowledgeBase",
1434            );
1435            let mut req = request.into_request();
1436            req.extensions_mut()
1437                .insert(
1438                    GrpcMethod::new(
1439                        "nominal.ai.v1.KnowledgeBaseService",
1440                        "CreateOrUpdateKnowledgeBase",
1441                    ),
1442                );
1443            self.inner.unary(req, path, codec).await
1444        }
1445        pub async fn list(
1446            &mut self,
1447            request: impl tonic::IntoRequest<super::ListRequest>,
1448        ) -> std::result::Result<tonic::Response<super::ListResponse>, tonic::Status> {
1449            self.inner
1450                .ready()
1451                .await
1452                .map_err(|e| {
1453                    tonic::Status::unknown(
1454                        format!("Service was not ready: {}", e.into()),
1455                    )
1456                })?;
1457            let codec = tonic::codec::ProstCodec::default();
1458            let path = http::uri::PathAndQuery::from_static(
1459                "/nominal.ai.v1.KnowledgeBaseService/List",
1460            );
1461            let mut req = request.into_request();
1462            req.extensions_mut()
1463                .insert(GrpcMethod::new("nominal.ai.v1.KnowledgeBaseService", "List"));
1464            self.inner.unary(req, path, codec).await
1465        }
1466        pub async fn delete(
1467            &mut self,
1468            request: impl tonic::IntoRequest<super::DeleteRequest>,
1469        ) -> std::result::Result<tonic::Response<super::DeleteResponse>, tonic::Status> {
1470            self.inner
1471                .ready()
1472                .await
1473                .map_err(|e| {
1474                    tonic::Status::unknown(
1475                        format!("Service was not ready: {}", e.into()),
1476                    )
1477                })?;
1478            let codec = tonic::codec::ProstCodec::default();
1479            let path = http::uri::PathAndQuery::from_static(
1480                "/nominal.ai.v1.KnowledgeBaseService/Delete",
1481            );
1482            let mut req = request.into_request();
1483            req.extensions_mut()
1484                .insert(GrpcMethod::new("nominal.ai.v1.KnowledgeBaseService", "Delete"));
1485            self.inner.unary(req, path, codec).await
1486        }
1487        pub async fn get_batch(
1488            &mut self,
1489            request: impl tonic::IntoRequest<super::GetBatchRequest>,
1490        ) -> std::result::Result<
1491            tonic::Response<super::GetBatchResponse>,
1492            tonic::Status,
1493        > {
1494            self.inner
1495                .ready()
1496                .await
1497                .map_err(|e| {
1498                    tonic::Status::unknown(
1499                        format!("Service was not ready: {}", e.into()),
1500                    )
1501                })?;
1502            let codec = tonic::codec::ProstCodec::default();
1503            let path = http::uri::PathAndQuery::from_static(
1504                "/nominal.ai.v1.KnowledgeBaseService/GetBatch",
1505            );
1506            let mut req = request.into_request();
1507            req.extensions_mut()
1508                .insert(
1509                    GrpcMethod::new("nominal.ai.v1.KnowledgeBaseService", "GetBatch"),
1510                );
1511            self.inner.unary(req, path, codec).await
1512        }
1513        pub async fn generate_summary_description(
1514            &mut self,
1515            request: impl tonic::IntoRequest<super::GenerateSummaryDescriptionRequest>,
1516        ) -> std::result::Result<
1517            tonic::Response<super::GenerateSummaryDescriptionResponse>,
1518            tonic::Status,
1519        > {
1520            self.inner
1521                .ready()
1522                .await
1523                .map_err(|e| {
1524                    tonic::Status::unknown(
1525                        format!("Service was not ready: {}", e.into()),
1526                    )
1527                })?;
1528            let codec = tonic::codec::ProstCodec::default();
1529            let path = http::uri::PathAndQuery::from_static(
1530                "/nominal.ai.v1.KnowledgeBaseService/GenerateSummaryDescription",
1531            );
1532            let mut req = request.into_request();
1533            req.extensions_mut()
1534                .insert(
1535                    GrpcMethod::new(
1536                        "nominal.ai.v1.KnowledgeBaseService",
1537                        "GenerateSummaryDescription",
1538                    ),
1539                );
1540            self.inner.unary(req, path, codec).await
1541        }
1542    }
1543}
1544#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1545pub struct GetProviderStatusRequest {}
1546#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1547pub struct GetProviderStatusResponse {
1548    #[prost(message, optional, tag = "1")]
1549    pub timestamp: ::core::option::Option<
1550        super::super::super::google::protobuf::Timestamp,
1551    >,
1552    #[prost(message, optional, tag = "2")]
1553    pub last_status: ::core::option::Option<ProviderStatus>,
1554    #[deprecated]
1555    #[prost(message, optional, tag = "3")]
1556    pub aggregated_status_over_last_30m: ::core::option::Option<ProviderStatus>,
1557    #[prost(message, optional, tag = "4")]
1558    pub aggregated_status: ::core::option::Option<ProviderStatus>,
1559}
1560#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1561pub struct ProviderStatus {
1562    #[prost(oneof = "provider_status::Status", tags = "1, 2")]
1563    pub status: ::core::option::Option<provider_status::Status>,
1564}
1565/// Nested message and enum types in `ProviderStatus`.
1566pub mod provider_status {
1567    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
1568    pub enum Status {
1569        #[prost(message, tag = "1")]
1570        Healthy(super::Healthy),
1571        #[prost(message, tag = "2")]
1572        Degraded(super::Degraded),
1573    }
1574}
1575#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1576pub struct Healthy {}
1577#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1578pub struct Degraded {
1579    #[prost(enumeration = "DegradationReason", tag = "1")]
1580    pub reason: i32,
1581}
1582#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1583pub struct ProviderMetrics {
1584    #[prost(int32, tag = "1")]
1585    pub time_to_first_token_ms: i32,
1586    #[prost(int32, tag = "2")]
1587    pub total_time_ms: i32,
1588}
1589#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1590#[repr(i32)]
1591pub enum DegradationReason {
1592    Unspecified = 0,
1593    HighLatency = 1,
1594    Failures = 2,
1595    HighLatencyAndFailures = 3,
1596    Unavailable = 4,
1597}
1598impl DegradationReason {
1599    /// String value of the enum field names used in the ProtoBuf definition.
1600    ///
1601    /// The values are not transformed in any way and thus are considered stable
1602    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1603    pub fn as_str_name(&self) -> &'static str {
1604        match self {
1605            Self::Unspecified => "DEGRADATION_REASON_UNSPECIFIED",
1606            Self::HighLatency => "DEGRADATION_REASON_HIGH_LATENCY",
1607            Self::Failures => "DEGRADATION_REASON_FAILURES",
1608            Self::HighLatencyAndFailures => {
1609                "DEGRADATION_REASON_HIGH_LATENCY_AND_FAILURES"
1610            }
1611            Self::Unavailable => "DEGRADATION_REASON_UNAVAILABLE",
1612        }
1613    }
1614    /// Creates an enum from field names used in the ProtoBuf definition.
1615    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1616        match value {
1617            "DEGRADATION_REASON_UNSPECIFIED" => Some(Self::Unspecified),
1618            "DEGRADATION_REASON_HIGH_LATENCY" => Some(Self::HighLatency),
1619            "DEGRADATION_REASON_FAILURES" => Some(Self::Failures),
1620            "DEGRADATION_REASON_HIGH_LATENCY_AND_FAILURES" => {
1621                Some(Self::HighLatencyAndFailures)
1622            }
1623            "DEGRADATION_REASON_UNAVAILABLE" => Some(Self::Unavailable),
1624            _ => None,
1625        }
1626    }
1627}
1628/// Generated client implementations.
1629pub mod model_provider_health_service_client {
1630    #![allow(
1631        unused_variables,
1632        dead_code,
1633        missing_docs,
1634        clippy::wildcard_imports,
1635        clippy::let_unit_value,
1636    )]
1637    use tonic::codegen::*;
1638    use tonic::codegen::http::Uri;
1639    #[derive(Debug, Clone)]
1640    pub struct ModelProviderHealthServiceClient<T> {
1641        inner: tonic::client::Grpc<T>,
1642    }
1643    impl ModelProviderHealthServiceClient<tonic::transport::Channel> {
1644        /// Attempt to create a new client by connecting to a given endpoint.
1645        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1646        where
1647            D: TryInto<tonic::transport::Endpoint>,
1648            D::Error: Into<StdError>,
1649        {
1650            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1651            Ok(Self::new(conn))
1652        }
1653    }
1654    impl<T> ModelProviderHealthServiceClient<T>
1655    where
1656        T: tonic::client::GrpcService<tonic::body::Body>,
1657        T::Error: Into<StdError>,
1658        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1659        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1660    {
1661        pub fn new(inner: T) -> Self {
1662            let inner = tonic::client::Grpc::new(inner);
1663            Self { inner }
1664        }
1665        pub fn with_origin(inner: T, origin: Uri) -> Self {
1666            let inner = tonic::client::Grpc::with_origin(inner, origin);
1667            Self { inner }
1668        }
1669        pub fn with_interceptor<F>(
1670            inner: T,
1671            interceptor: F,
1672        ) -> ModelProviderHealthServiceClient<InterceptedService<T, F>>
1673        where
1674            F: tonic::service::Interceptor,
1675            T::ResponseBody: Default,
1676            T: tonic::codegen::Service<
1677                http::Request<tonic::body::Body>,
1678                Response = http::Response<
1679                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
1680                >,
1681            >,
1682            <T as tonic::codegen::Service<
1683                http::Request<tonic::body::Body>,
1684            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1685        {
1686            ModelProviderHealthServiceClient::new(
1687                InterceptedService::new(inner, interceptor),
1688            )
1689        }
1690        /// Compress requests with the given encoding.
1691        ///
1692        /// This requires the server to support it otherwise it might respond with an
1693        /// error.
1694        #[must_use]
1695        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1696            self.inner = self.inner.send_compressed(encoding);
1697            self
1698        }
1699        /// Enable decompressing responses.
1700        #[must_use]
1701        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1702            self.inner = self.inner.accept_compressed(encoding);
1703            self
1704        }
1705        /// Limits the maximum size of a decoded message.
1706        ///
1707        /// Default: `4MB`
1708        #[must_use]
1709        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1710            self.inner = self.inner.max_decoding_message_size(limit);
1711            self
1712        }
1713        /// Limits the maximum size of an encoded message.
1714        ///
1715        /// Default: `usize::MAX`
1716        #[must_use]
1717        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1718            self.inner = self.inner.max_encoding_message_size(limit);
1719            self
1720        }
1721        pub async fn get_provider_status(
1722            &mut self,
1723            request: impl tonic::IntoRequest<super::GetProviderStatusRequest>,
1724        ) -> std::result::Result<
1725            tonic::Response<super::GetProviderStatusResponse>,
1726            tonic::Status,
1727        > {
1728            self.inner
1729                .ready()
1730                .await
1731                .map_err(|e| {
1732                    tonic::Status::unknown(
1733                        format!("Service was not ready: {}", e.into()),
1734                    )
1735                })?;
1736            let codec = tonic::codec::ProstCodec::default();
1737            let path = http::uri::PathAndQuery::from_static(
1738                "/nominal.ai.v1.ModelProviderHealthService/GetProviderStatus",
1739            );
1740            let mut req = request.into_request();
1741            req.extensions_mut()
1742                .insert(
1743                    GrpcMethod::new(
1744                        "nominal.ai.v1.ModelProviderHealthService",
1745                        "GetProviderStatus",
1746                    ),
1747                );
1748            self.inner.unary(req, path, codec).await
1749        }
1750    }
1751}