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"
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    }
486}
487#[derive(Clone, PartialEq, ::prost::Message)]
488pub struct ToolCallDescription {
489    #[prost(string, tag = "1")]
490    pub tool_call_id: ::prost::alloc::string::String,
491    #[prost(string, tag = "2")]
492    pub tool_name: ::prost::alloc::string::String,
493    #[prost(string, tag = "3")]
494    pub tool_args_json_string: ::prost::alloc::string::String,
495    #[prost(enumeration = "ToolCallStatus", tag = "4")]
496    pub status: i32,
497}
498#[derive(Clone, PartialEq, ::prost::Message)]
499pub struct Finish {
500    #[prost(string, repeated, tag = "1")]
501    pub ordered_message_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
502    #[prost(string, optional, tag = "2")]
503    pub new_title: ::core::option::Option<::prost::alloc::string::String>,
504    #[prost(message, repeated, tag = "3")]
505    pub tool_approval_requests: ::prost::alloc::vec::Vec<ToolCallDescription>,
506    #[prost(message, optional, tag = "4")]
507    pub updated_context: ::core::option::Option<ContextStatus>,
508}
509#[derive(Clone, PartialEq, ::prost::Message)]
510pub struct Error {
511    #[prost(string, tag = "1")]
512    pub message: ::prost::alloc::string::String,
513}
514#[derive(Clone, PartialEq, ::prost::Message)]
515pub struct TextStart {
516    #[prost(string, tag = "1")]
517    pub id: ::prost::alloc::string::String,
518}
519#[derive(Clone, PartialEq, ::prost::Message)]
520pub struct TextDelta {
521    #[prost(string, tag = "1")]
522    pub id: ::prost::alloc::string::String,
523    #[prost(string, tag = "2")]
524    pub delta: ::prost::alloc::string::String,
525}
526#[derive(Clone, PartialEq, ::prost::Message)]
527pub struct TextEnd {
528    #[prost(string, tag = "1")]
529    pub id: ::prost::alloc::string::String,
530}
531#[derive(Clone, PartialEq, ::prost::Message)]
532pub struct ReasoningStart {
533    #[prost(string, tag = "1")]
534    pub id: ::prost::alloc::string::String,
535}
536#[derive(Clone, PartialEq, ::prost::Message)]
537pub struct ReasoningDelta {
538    #[prost(string, tag = "1")]
539    pub id: ::prost::alloc::string::String,
540    #[prost(string, tag = "2")]
541    pub delta: ::prost::alloc::string::String,
542}
543#[derive(Clone, PartialEq, ::prost::Message)]
544pub struct ReasoningEnd {
545    #[prost(string, tag = "1")]
546    pub id: ::prost::alloc::string::String,
547}
548#[derive(Clone, PartialEq, ::prost::Message)]
549pub struct ToolAction {
550    #[prost(string, tag = "2")]
551    pub tool_action_verb: ::prost::alloc::string::String,
552    #[prost(string, optional, tag = "3")]
553    pub tool_target: ::core::option::Option<::prost::alloc::string::String>,
554    #[prost(message, optional, tag = "5")]
555    pub tool_call_description: ::core::option::Option<ToolCallDescription>,
556    #[deprecated]
557    #[prost(string, tag = "1")]
558    pub id: ::prost::alloc::string::String,
559    #[deprecated]
560    #[prost(string, tag = "4")]
561    pub tool_name: ::prost::alloc::string::String,
562}
563#[derive(Clone, PartialEq, ::prost::Message)]
564pub struct ToolActionConfirmation {
565    #[prost(string, tag = "1")]
566    pub id: ::prost::alloc::string::String,
567    #[prost(oneof = "tool_action_confirmation::Outcome", tags = "2, 3")]
568    pub outcome: ::core::option::Option<tool_action_confirmation::Outcome>,
569}
570/// Nested message and enum types in `ToolActionConfirmation`.
571pub mod tool_action_confirmation {
572    #[derive(Clone, PartialEq, ::prost::Oneof)]
573    pub enum Outcome {
574        #[prost(message, tag = "2")]
575        Success(super::ToolActionSuccess),
576        #[prost(message, tag = "3")]
577        Failure(super::ToolActionFailure),
578    }
579}
580#[derive(Clone, PartialEq, ::prost::Message)]
581pub struct ToolActionSuccess {
582    #[prost(string, tag = "1")]
583    pub tool_success_message: ::prost::alloc::string::String,
584}
585#[derive(Clone, PartialEq, ::prost::Message)]
586pub struct ToolActionFailure {
587    #[prost(string, tag = "1")]
588    pub tool_error_message: ::prost::alloc::string::String,
589}
590#[derive(Clone, Copy, PartialEq, ::prost::Message)]
591pub struct ContextStatus {
592    #[prost(int32, tag = "1")]
593    pub curr_token_count: i32,
594    #[prost(int32, tag = "2")]
595    pub model_context_limit: i32,
596}
597#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
598#[repr(i32)]
599pub enum FeedbackVote {
600    Unspecified = 0,
601    ThumbsUp = 1,
602    ThumbsDown = 2,
603}
604impl FeedbackVote {
605    /// String value of the enum field names used in the ProtoBuf definition.
606    ///
607    /// The values are not transformed in any way and thus are considered stable
608    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
609    pub fn as_str_name(&self) -> &'static str {
610        match self {
611            Self::Unspecified => "FEEDBACK_VOTE_UNSPECIFIED",
612            Self::ThumbsUp => "FEEDBACK_VOTE_THUMBS_UP",
613            Self::ThumbsDown => "FEEDBACK_VOTE_THUMBS_DOWN",
614        }
615    }
616    /// Creates an enum from field names used in the ProtoBuf definition.
617    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
618        match value {
619            "FEEDBACK_VOTE_UNSPECIFIED" => Some(Self::Unspecified),
620            "FEEDBACK_VOTE_THUMBS_UP" => Some(Self::ThumbsUp),
621            "FEEDBACK_VOTE_THUMBS_DOWN" => Some(Self::ThumbsDown),
622            _ => None,
623        }
624    }
625}
626#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
627#[repr(i32)]
628pub enum ToolCallStatus {
629    Unspecified = 0,
630    Approved = 1,
631    Denied = 2,
632    AwaitingApproval = 3,
633}
634impl ToolCallStatus {
635    /// String value of the enum field names used in the ProtoBuf definition.
636    ///
637    /// The values are not transformed in any way and thus are considered stable
638    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
639    pub fn as_str_name(&self) -> &'static str {
640        match self {
641            Self::Unspecified => "TOOL_CALL_STATUS_UNSPECIFIED",
642            Self::Approved => "TOOL_CALL_STATUS_APPROVED",
643            Self::Denied => "TOOL_CALL_STATUS_DENIED",
644            Self::AwaitingApproval => "TOOL_CALL_STATUS_AWAITING_APPROVAL",
645        }
646    }
647    /// Creates an enum from field names used in the ProtoBuf definition.
648    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
649        match value {
650            "TOOL_CALL_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
651            "TOOL_CALL_STATUS_APPROVED" => Some(Self::Approved),
652            "TOOL_CALL_STATUS_DENIED" => Some(Self::Denied),
653            "TOOL_CALL_STATUS_AWAITING_APPROVAL" => Some(Self::AwaitingApproval),
654            _ => None,
655        }
656    }
657}
658/// Generated client implementations.
659pub mod ai_agent_service_client {
660    #![allow(
661        unused_variables,
662        dead_code,
663        missing_docs,
664        clippy::wildcard_imports,
665        clippy::let_unit_value,
666    )]
667    use tonic::codegen::*;
668    use tonic::codegen::http::Uri;
669    #[derive(Debug, Clone)]
670    pub struct AiAgentServiceClient<T> {
671        inner: tonic::client::Grpc<T>,
672    }
673    impl AiAgentServiceClient<tonic::transport::Channel> {
674        /// Attempt to create a new client by connecting to a given endpoint.
675        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
676        where
677            D: TryInto<tonic::transport::Endpoint>,
678            D::Error: Into<StdError>,
679        {
680            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
681            Ok(Self::new(conn))
682        }
683    }
684    impl<T> AiAgentServiceClient<T>
685    where
686        T: tonic::client::GrpcService<tonic::body::Body>,
687        T::Error: Into<StdError>,
688        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
689        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
690    {
691        pub fn new(inner: T) -> Self {
692            let inner = tonic::client::Grpc::new(inner);
693            Self { inner }
694        }
695        pub fn with_origin(inner: T, origin: Uri) -> Self {
696            let inner = tonic::client::Grpc::with_origin(inner, origin);
697            Self { inner }
698        }
699        pub fn with_interceptor<F>(
700            inner: T,
701            interceptor: F,
702        ) -> AiAgentServiceClient<InterceptedService<T, F>>
703        where
704            F: tonic::service::Interceptor,
705            T::ResponseBody: Default,
706            T: tonic::codegen::Service<
707                http::Request<tonic::body::Body>,
708                Response = http::Response<
709                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
710                >,
711            >,
712            <T as tonic::codegen::Service<
713                http::Request<tonic::body::Body>,
714            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
715        {
716            AiAgentServiceClient::new(InterceptedService::new(inner, interceptor))
717        }
718        /// Compress requests with the given encoding.
719        ///
720        /// This requires the server to support it otherwise it might respond with an
721        /// error.
722        #[must_use]
723        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
724            self.inner = self.inner.send_compressed(encoding);
725            self
726        }
727        /// Enable decompressing responses.
728        #[must_use]
729        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
730            self.inner = self.inner.accept_compressed(encoding);
731            self
732        }
733        /// Limits the maximum size of a decoded message.
734        ///
735        /// Default: `4MB`
736        #[must_use]
737        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
738            self.inner = self.inner.max_decoding_message_size(limit);
739            self
740        }
741        /// Limits the maximum size of an encoded message.
742        ///
743        /// Default: `usize::MAX`
744        #[must_use]
745        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
746            self.inner = self.inner.max_encoding_message_size(limit);
747            self
748        }
749        pub async fn stream_chat(
750            &mut self,
751            request: impl tonic::IntoRequest<super::StreamChatRequest>,
752        ) -> std::result::Result<
753            tonic::Response<tonic::codec::Streaming<super::StreamChatResponse>>,
754            tonic::Status,
755        > {
756            self.inner
757                .ready()
758                .await
759                .map_err(|e| {
760                    tonic::Status::unknown(
761                        format!("Service was not ready: {}", e.into()),
762                    )
763                })?;
764            let codec = tonic::codec::ProstCodec::default();
765            let path = http::uri::PathAndQuery::from_static(
766                "/nominal.ai.v1.AIAgentService/StreamChat",
767            );
768            let mut req = request.into_request();
769            req.extensions_mut()
770                .insert(GrpcMethod::new("nominal.ai.v1.AIAgentService", "StreamChat"));
771            self.inner.server_streaming(req, path, codec).await
772        }
773        #[deprecated]
774        pub async fn get_conversation(
775            &mut self,
776            request: impl tonic::IntoRequest<super::GetConversationRequest>,
777        ) -> std::result::Result<
778            tonic::Response<super::GetConversationResponse>,
779            tonic::Status,
780        > {
781            self.inner
782                .ready()
783                .await
784                .map_err(|e| {
785                    tonic::Status::unknown(
786                        format!("Service was not ready: {}", e.into()),
787                    )
788                })?;
789            let codec = tonic::codec::ProstCodec::default();
790            let path = http::uri::PathAndQuery::from_static(
791                "/nominal.ai.v1.AIAgentService/GetConversation",
792            );
793            let mut req = request.into_request();
794            req.extensions_mut()
795                .insert(
796                    GrpcMethod::new("nominal.ai.v1.AIAgentService", "GetConversation"),
797                );
798            self.inner.unary(req, path, codec).await
799        }
800        pub async fn get_conversation_metadata(
801            &mut self,
802            request: impl tonic::IntoRequest<super::GetConversationMetadataRequest>,
803        ) -> std::result::Result<
804            tonic::Response<super::GetConversationMetadataResponse>,
805            tonic::Status,
806        > {
807            self.inner
808                .ready()
809                .await
810                .map_err(|e| {
811                    tonic::Status::unknown(
812                        format!("Service was not ready: {}", e.into()),
813                    )
814                })?;
815            let codec = tonic::codec::ProstCodec::default();
816            let path = http::uri::PathAndQuery::from_static(
817                "/nominal.ai.v1.AIAgentService/GetConversationMetadata",
818            );
819            let mut req = request.into_request();
820            req.extensions_mut()
821                .insert(
822                    GrpcMethod::new(
823                        "nominal.ai.v1.AIAgentService",
824                        "GetConversationMetadata",
825                    ),
826                );
827            self.inner.unary(req, path, codec).await
828        }
829        pub async fn get_conversation_messages(
830            &mut self,
831            request: impl tonic::IntoRequest<super::GetConversationMessagesRequest>,
832        ) -> std::result::Result<
833            tonic::Response<super::GetConversationMessagesResponse>,
834            tonic::Status,
835        > {
836            self.inner
837                .ready()
838                .await
839                .map_err(|e| {
840                    tonic::Status::unknown(
841                        format!("Service was not ready: {}", e.into()),
842                    )
843                })?;
844            let codec = tonic::codec::ProstCodec::default();
845            let path = http::uri::PathAndQuery::from_static(
846                "/nominal.ai.v1.AIAgentService/GetConversationMessages",
847            );
848            let mut req = request.into_request();
849            req.extensions_mut()
850                .insert(
851                    GrpcMethod::new(
852                        "nominal.ai.v1.AIAgentService",
853                        "GetConversationMessages",
854                    ),
855                );
856            self.inner.unary(req, path, codec).await
857        }
858        pub async fn list_conversations(
859            &mut self,
860            request: impl tonic::IntoRequest<super::ListConversationsRequest>,
861        ) -> std::result::Result<
862            tonic::Response<super::ListConversationsResponse>,
863            tonic::Status,
864        > {
865            self.inner
866                .ready()
867                .await
868                .map_err(|e| {
869                    tonic::Status::unknown(
870                        format!("Service was not ready: {}", e.into()),
871                    )
872                })?;
873            let codec = tonic::codec::ProstCodec::default();
874            let path = http::uri::PathAndQuery::from_static(
875                "/nominal.ai.v1.AIAgentService/ListConversations",
876            );
877            let mut req = request.into_request();
878            req.extensions_mut()
879                .insert(
880                    GrpcMethod::new("nominal.ai.v1.AIAgentService", "ListConversations"),
881                );
882            self.inner.unary(req, path, codec).await
883        }
884        pub async fn create_conversation(
885            &mut self,
886            request: impl tonic::IntoRequest<super::CreateConversationRequest>,
887        ) -> std::result::Result<
888            tonic::Response<super::CreateConversationResponse>,
889            tonic::Status,
890        > {
891            self.inner
892                .ready()
893                .await
894                .map_err(|e| {
895                    tonic::Status::unknown(
896                        format!("Service was not ready: {}", e.into()),
897                    )
898                })?;
899            let codec = tonic::codec::ProstCodec::default();
900            let path = http::uri::PathAndQuery::from_static(
901                "/nominal.ai.v1.AIAgentService/CreateConversation",
902            );
903            let mut req = request.into_request();
904            req.extensions_mut()
905                .insert(
906                    GrpcMethod::new("nominal.ai.v1.AIAgentService", "CreateConversation"),
907                );
908            self.inner.unary(req, path, codec).await
909        }
910        pub async fn update_conversation_metadata(
911            &mut self,
912            request: impl tonic::IntoRequest<super::UpdateConversationMetadataRequest>,
913        ) -> std::result::Result<
914            tonic::Response<super::UpdateConversationMetadataResponse>,
915            tonic::Status,
916        > {
917            self.inner
918                .ready()
919                .await
920                .map_err(|e| {
921                    tonic::Status::unknown(
922                        format!("Service was not ready: {}", e.into()),
923                    )
924                })?;
925            let codec = tonic::codec::ProstCodec::default();
926            let path = http::uri::PathAndQuery::from_static(
927                "/nominal.ai.v1.AIAgentService/UpdateConversationMetadata",
928            );
929            let mut req = request.into_request();
930            req.extensions_mut()
931                .insert(
932                    GrpcMethod::new(
933                        "nominal.ai.v1.AIAgentService",
934                        "UpdateConversationMetadata",
935                    ),
936                );
937            self.inner.unary(req, path, codec).await
938        }
939        pub async fn delete_conversation(
940            &mut self,
941            request: impl tonic::IntoRequest<super::DeleteConversationRequest>,
942        ) -> std::result::Result<
943            tonic::Response<super::DeleteConversationResponse>,
944            tonic::Status,
945        > {
946            self.inner
947                .ready()
948                .await
949                .map_err(|e| {
950                    tonic::Status::unknown(
951                        format!("Service was not ready: {}", e.into()),
952                    )
953                })?;
954            let codec = tonic::codec::ProstCodec::default();
955            let path = http::uri::PathAndQuery::from_static(
956                "/nominal.ai.v1.AIAgentService/DeleteConversation",
957            );
958            let mut req = request.into_request();
959            req.extensions_mut()
960                .insert(
961                    GrpcMethod::new("nominal.ai.v1.AIAgentService", "DeleteConversation"),
962                );
963            self.inner.unary(req, path, codec).await
964        }
965        pub async fn get_snapshot_rid_by_user_message_id(
966            &mut self,
967            request: impl tonic::IntoRequest<super::GetSnapshotRidByUserMessageIdRequest>,
968        ) -> std::result::Result<
969            tonic::Response<super::GetSnapshotRidByUserMessageIdResponse>,
970            tonic::Status,
971        > {
972            self.inner
973                .ready()
974                .await
975                .map_err(|e| {
976                    tonic::Status::unknown(
977                        format!("Service was not ready: {}", e.into()),
978                    )
979                })?;
980            let codec = tonic::codec::ProstCodec::default();
981            let path = http::uri::PathAndQuery::from_static(
982                "/nominal.ai.v1.AIAgentService/GetSnapshotRidByUserMessageId",
983            );
984            let mut req = request.into_request();
985            req.extensions_mut()
986                .insert(
987                    GrpcMethod::new(
988                        "nominal.ai.v1.AIAgentService",
989                        "GetSnapshotRidByUserMessageId",
990                    ),
991                );
992            self.inner.unary(req, path, codec).await
993        }
994        pub async fn compact_conversation(
995            &mut self,
996            request: impl tonic::IntoRequest<super::CompactConversationRequest>,
997        ) -> std::result::Result<
998            tonic::Response<super::CompactConversationResponse>,
999            tonic::Status,
1000        > {
1001            self.inner
1002                .ready()
1003                .await
1004                .map_err(|e| {
1005                    tonic::Status::unknown(
1006                        format!("Service was not ready: {}", e.into()),
1007                    )
1008                })?;
1009            let codec = tonic::codec::ProstCodec::default();
1010            let path = http::uri::PathAndQuery::from_static(
1011                "/nominal.ai.v1.AIAgentService/CompactConversation",
1012            );
1013            let mut req = request.into_request();
1014            req.extensions_mut()
1015                .insert(
1016                    GrpcMethod::new(
1017                        "nominal.ai.v1.AIAgentService",
1018                        "CompactConversation",
1019                    ),
1020                );
1021            self.inner.unary(req, path, codec).await
1022        }
1023        pub async fn submit_message_feedback(
1024            &mut self,
1025            request: impl tonic::IntoRequest<super::SubmitMessageFeedbackRequest>,
1026        ) -> std::result::Result<
1027            tonic::Response<super::SubmitMessageFeedbackResponse>,
1028            tonic::Status,
1029        > {
1030            self.inner
1031                .ready()
1032                .await
1033                .map_err(|e| {
1034                    tonic::Status::unknown(
1035                        format!("Service was not ready: {}", e.into()),
1036                    )
1037                })?;
1038            let codec = tonic::codec::ProstCodec::default();
1039            let path = http::uri::PathAndQuery::from_static(
1040                "/nominal.ai.v1.AIAgentService/SubmitMessageFeedback",
1041            );
1042            let mut req = request.into_request();
1043            req.extensions_mut()
1044                .insert(
1045                    GrpcMethod::new(
1046                        "nominal.ai.v1.AIAgentService",
1047                        "SubmitMessageFeedback",
1048                    ),
1049                );
1050            self.inner.unary(req, path, codec).await
1051        }
1052    }
1053}
1054#[derive(Clone, PartialEq, ::prost::Message)]
1055pub struct ClassifyErrorRequest {
1056    #[prost(string, tag = "1")]
1057    pub error_message: ::prost::alloc::string::String,
1058}
1059#[derive(Clone, PartialEq, ::prost::Message)]
1060pub struct ClassifyErrorResponse {
1061    #[prost(enumeration = "ErrorClassification", tag = "1")]
1062    pub classification: i32,
1063    #[prost(string, tag = "2")]
1064    pub reason: ::prost::alloc::string::String,
1065}
1066#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1067#[repr(i32)]
1068pub enum ErrorClassification {
1069    Unspecified = 0,
1070    Client = 1,
1071    Server = 2,
1072}
1073impl ErrorClassification {
1074    /// String value of the enum field names used in the ProtoBuf definition.
1075    ///
1076    /// The values are not transformed in any way and thus are considered stable
1077    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1078    pub fn as_str_name(&self) -> &'static str {
1079        match self {
1080            Self::Unspecified => "ERROR_CLASSIFICATION_UNSPECIFIED",
1081            Self::Client => "ERROR_CLASSIFICATION_CLIENT",
1082            Self::Server => "ERROR_CLASSIFICATION_SERVER",
1083        }
1084    }
1085    /// Creates an enum from field names used in the ProtoBuf definition.
1086    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1087        match value {
1088            "ERROR_CLASSIFICATION_UNSPECIFIED" => Some(Self::Unspecified),
1089            "ERROR_CLASSIFICATION_CLIENT" => Some(Self::Client),
1090            "ERROR_CLASSIFICATION_SERVER" => Some(Self::Server),
1091            _ => None,
1092        }
1093    }
1094}
1095/// Generated client implementations.
1096pub mod data_ingestion_error_classifier_service_client {
1097    #![allow(
1098        unused_variables,
1099        dead_code,
1100        missing_docs,
1101        clippy::wildcard_imports,
1102        clippy::let_unit_value,
1103    )]
1104    use tonic::codegen::*;
1105    use tonic::codegen::http::Uri;
1106    #[derive(Debug, Clone)]
1107    pub struct DataIngestionErrorClassifierServiceClient<T> {
1108        inner: tonic::client::Grpc<T>,
1109    }
1110    impl DataIngestionErrorClassifierServiceClient<tonic::transport::Channel> {
1111        /// Attempt to create a new client by connecting to a given endpoint.
1112        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1113        where
1114            D: TryInto<tonic::transport::Endpoint>,
1115            D::Error: Into<StdError>,
1116        {
1117            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1118            Ok(Self::new(conn))
1119        }
1120    }
1121    impl<T> DataIngestionErrorClassifierServiceClient<T>
1122    where
1123        T: tonic::client::GrpcService<tonic::body::Body>,
1124        T::Error: Into<StdError>,
1125        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1126        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1127    {
1128        pub fn new(inner: T) -> Self {
1129            let inner = tonic::client::Grpc::new(inner);
1130            Self { inner }
1131        }
1132        pub fn with_origin(inner: T, origin: Uri) -> Self {
1133            let inner = tonic::client::Grpc::with_origin(inner, origin);
1134            Self { inner }
1135        }
1136        pub fn with_interceptor<F>(
1137            inner: T,
1138            interceptor: F,
1139        ) -> DataIngestionErrorClassifierServiceClient<InterceptedService<T, F>>
1140        where
1141            F: tonic::service::Interceptor,
1142            T::ResponseBody: Default,
1143            T: tonic::codegen::Service<
1144                http::Request<tonic::body::Body>,
1145                Response = http::Response<
1146                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
1147                >,
1148            >,
1149            <T as tonic::codegen::Service<
1150                http::Request<tonic::body::Body>,
1151            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1152        {
1153            DataIngestionErrorClassifierServiceClient::new(
1154                InterceptedService::new(inner, interceptor),
1155            )
1156        }
1157        /// Compress requests with the given encoding.
1158        ///
1159        /// This requires the server to support it otherwise it might respond with an
1160        /// error.
1161        #[must_use]
1162        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1163            self.inner = self.inner.send_compressed(encoding);
1164            self
1165        }
1166        /// Enable decompressing responses.
1167        #[must_use]
1168        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1169            self.inner = self.inner.accept_compressed(encoding);
1170            self
1171        }
1172        /// Limits the maximum size of a decoded message.
1173        ///
1174        /// Default: `4MB`
1175        #[must_use]
1176        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1177            self.inner = self.inner.max_decoding_message_size(limit);
1178            self
1179        }
1180        /// Limits the maximum size of an encoded message.
1181        ///
1182        /// Default: `usize::MAX`
1183        #[must_use]
1184        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1185            self.inner = self.inner.max_encoding_message_size(limit);
1186            self
1187        }
1188        pub async fn classify_error(
1189            &mut self,
1190            request: impl tonic::IntoRequest<super::ClassifyErrorRequest>,
1191        ) -> std::result::Result<
1192            tonic::Response<super::ClassifyErrorResponse>,
1193            tonic::Status,
1194        > {
1195            self.inner
1196                .ready()
1197                .await
1198                .map_err(|e| {
1199                    tonic::Status::unknown(
1200                        format!("Service was not ready: {}", e.into()),
1201                    )
1202                })?;
1203            let codec = tonic::codec::ProstCodec::default();
1204            let path = http::uri::PathAndQuery::from_static(
1205                "/nominal.ai.v1.DataIngestionErrorClassifierService/ClassifyError",
1206            );
1207            let mut req = request.into_request();
1208            req.extensions_mut()
1209                .insert(
1210                    GrpcMethod::new(
1211                        "nominal.ai.v1.DataIngestionErrorClassifierService",
1212                        "ClassifyError",
1213                    ),
1214                );
1215            self.inner.unary(req, path, codec).await
1216        }
1217    }
1218}
1219#[derive(Clone, PartialEq, ::prost::Message)]
1220pub struct CreateOrUpdateKnowledgeBaseRequest {
1221    #[prost(string, tag = "1")]
1222    pub attachment_rid: ::prost::alloc::string::String,
1223    #[prost(string, tag = "2")]
1224    pub summary_description: ::prost::alloc::string::String,
1225    #[prost(enumeration = "KnowledgeBaseType", optional, tag = "3")]
1226    pub r#type: ::core::option::Option<i32>,
1227}
1228#[derive(Clone, PartialEq, ::prost::Message)]
1229pub struct CreateOrUpdateKnowledgeBaseResponse {
1230    #[prost(string, tag = "1")]
1231    pub knowledge_base_rid: ::prost::alloc::string::String,
1232}
1233#[derive(Clone, PartialEq, ::prost::Message)]
1234pub struct KnowledgeBase {
1235    #[prost(string, tag = "1")]
1236    pub knowledge_base_rid: ::prost::alloc::string::String,
1237    #[prost(string, tag = "2")]
1238    pub attachment_rid: ::prost::alloc::string::String,
1239    #[prost(string, tag = "3")]
1240    pub workspace_rid: ::prost::alloc::string::String,
1241    #[prost(string, tag = "4")]
1242    pub summary_description: ::prost::alloc::string::String,
1243    #[prost(enumeration = "KnowledgeBaseType", tag = "5")]
1244    pub r#type: i32,
1245    #[prost(int32, tag = "6")]
1246    pub version: i32,
1247}
1248#[derive(Clone, PartialEq, ::prost::Message)]
1249pub struct ListRequest {
1250    #[prost(string, tag = "1")]
1251    pub workspace_rid: ::prost::alloc::string::String,
1252}
1253#[derive(Clone, PartialEq, ::prost::Message)]
1254pub struct ListResponse {
1255    #[prost(message, repeated, tag = "1")]
1256    pub knowledge_bases: ::prost::alloc::vec::Vec<KnowledgeBase>,
1257}
1258#[derive(Clone, PartialEq, ::prost::Message)]
1259pub struct DeleteRequest {
1260    #[prost(string, tag = "1")]
1261    pub knowledge_base_rid: ::prost::alloc::string::String,
1262}
1263#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1264pub struct DeleteResponse {
1265    #[prost(bool, tag = "1")]
1266    pub success: bool,
1267}
1268#[derive(Clone, PartialEq, ::prost::Message)]
1269pub struct GetBatchRequest {
1270    #[prost(string, repeated, tag = "1")]
1271    pub knowledge_base_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1272}
1273#[derive(Clone, PartialEq, ::prost::Message)]
1274pub struct GetBatchResponse {
1275    #[prost(message, repeated, tag = "1")]
1276    pub knowledge_bases: ::prost::alloc::vec::Vec<KnowledgeBase>,
1277}
1278#[derive(Clone, PartialEq, ::prost::Message)]
1279pub struct GenerateSummaryDescriptionRequest {
1280    #[prost(string, tag = "1")]
1281    pub attachment_rid: ::prost::alloc::string::String,
1282}
1283#[derive(Clone, PartialEq, ::prost::Message)]
1284pub struct GenerateSummaryDescriptionResponse {
1285    #[prost(string, tag = "1")]
1286    pub summary_description: ::prost::alloc::string::String,
1287}
1288#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1289#[repr(i32)]
1290pub enum KnowledgeBaseType {
1291    Unspecified = 0,
1292    Prompt = 1,
1293    Embedding = 2,
1294}
1295impl KnowledgeBaseType {
1296    /// String value of the enum field names used in the ProtoBuf definition.
1297    ///
1298    /// The values are not transformed in any way and thus are considered stable
1299    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1300    pub fn as_str_name(&self) -> &'static str {
1301        match self {
1302            Self::Unspecified => "KNOWLEDGE_BASE_TYPE_UNSPECIFIED",
1303            Self::Prompt => "KNOWLEDGE_BASE_TYPE_PROMPT",
1304            Self::Embedding => "KNOWLEDGE_BASE_TYPE_EMBEDDING",
1305        }
1306    }
1307    /// Creates an enum from field names used in the ProtoBuf definition.
1308    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1309        match value {
1310            "KNOWLEDGE_BASE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
1311            "KNOWLEDGE_BASE_TYPE_PROMPT" => Some(Self::Prompt),
1312            "KNOWLEDGE_BASE_TYPE_EMBEDDING" => Some(Self::Embedding),
1313            _ => None,
1314        }
1315    }
1316}
1317/// Generated client implementations.
1318pub mod knowledge_base_service_client {
1319    #![allow(
1320        unused_variables,
1321        dead_code,
1322        missing_docs,
1323        clippy::wildcard_imports,
1324        clippy::let_unit_value,
1325    )]
1326    use tonic::codegen::*;
1327    use tonic::codegen::http::Uri;
1328    #[derive(Debug, Clone)]
1329    pub struct KnowledgeBaseServiceClient<T> {
1330        inner: tonic::client::Grpc<T>,
1331    }
1332    impl KnowledgeBaseServiceClient<tonic::transport::Channel> {
1333        /// Attempt to create a new client by connecting to a given endpoint.
1334        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1335        where
1336            D: TryInto<tonic::transport::Endpoint>,
1337            D::Error: Into<StdError>,
1338        {
1339            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1340            Ok(Self::new(conn))
1341        }
1342    }
1343    impl<T> KnowledgeBaseServiceClient<T>
1344    where
1345        T: tonic::client::GrpcService<tonic::body::Body>,
1346        T::Error: Into<StdError>,
1347        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1348        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1349    {
1350        pub fn new(inner: T) -> Self {
1351            let inner = tonic::client::Grpc::new(inner);
1352            Self { inner }
1353        }
1354        pub fn with_origin(inner: T, origin: Uri) -> Self {
1355            let inner = tonic::client::Grpc::with_origin(inner, origin);
1356            Self { inner }
1357        }
1358        pub fn with_interceptor<F>(
1359            inner: T,
1360            interceptor: F,
1361        ) -> KnowledgeBaseServiceClient<InterceptedService<T, F>>
1362        where
1363            F: tonic::service::Interceptor,
1364            T::ResponseBody: Default,
1365            T: tonic::codegen::Service<
1366                http::Request<tonic::body::Body>,
1367                Response = http::Response<
1368                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
1369                >,
1370            >,
1371            <T as tonic::codegen::Service<
1372                http::Request<tonic::body::Body>,
1373            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1374        {
1375            KnowledgeBaseServiceClient::new(InterceptedService::new(inner, interceptor))
1376        }
1377        /// Compress requests with the given encoding.
1378        ///
1379        /// This requires the server to support it otherwise it might respond with an
1380        /// error.
1381        #[must_use]
1382        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1383            self.inner = self.inner.send_compressed(encoding);
1384            self
1385        }
1386        /// Enable decompressing responses.
1387        #[must_use]
1388        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1389            self.inner = self.inner.accept_compressed(encoding);
1390            self
1391        }
1392        /// Limits the maximum size of a decoded message.
1393        ///
1394        /// Default: `4MB`
1395        #[must_use]
1396        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1397            self.inner = self.inner.max_decoding_message_size(limit);
1398            self
1399        }
1400        /// Limits the maximum size of an encoded message.
1401        ///
1402        /// Default: `usize::MAX`
1403        #[must_use]
1404        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1405            self.inner = self.inner.max_encoding_message_size(limit);
1406            self
1407        }
1408        pub async fn create_or_update_knowledge_base(
1409            &mut self,
1410            request: impl tonic::IntoRequest<super::CreateOrUpdateKnowledgeBaseRequest>,
1411        ) -> std::result::Result<
1412            tonic::Response<super::CreateOrUpdateKnowledgeBaseResponse>,
1413            tonic::Status,
1414        > {
1415            self.inner
1416                .ready()
1417                .await
1418                .map_err(|e| {
1419                    tonic::Status::unknown(
1420                        format!("Service was not ready: {}", e.into()),
1421                    )
1422                })?;
1423            let codec = tonic::codec::ProstCodec::default();
1424            let path = http::uri::PathAndQuery::from_static(
1425                "/nominal.ai.v1.KnowledgeBaseService/CreateOrUpdateKnowledgeBase",
1426            );
1427            let mut req = request.into_request();
1428            req.extensions_mut()
1429                .insert(
1430                    GrpcMethod::new(
1431                        "nominal.ai.v1.KnowledgeBaseService",
1432                        "CreateOrUpdateKnowledgeBase",
1433                    ),
1434                );
1435            self.inner.unary(req, path, codec).await
1436        }
1437        pub async fn list(
1438            &mut self,
1439            request: impl tonic::IntoRequest<super::ListRequest>,
1440        ) -> std::result::Result<tonic::Response<super::ListResponse>, tonic::Status> {
1441            self.inner
1442                .ready()
1443                .await
1444                .map_err(|e| {
1445                    tonic::Status::unknown(
1446                        format!("Service was not ready: {}", e.into()),
1447                    )
1448                })?;
1449            let codec = tonic::codec::ProstCodec::default();
1450            let path = http::uri::PathAndQuery::from_static(
1451                "/nominal.ai.v1.KnowledgeBaseService/List",
1452            );
1453            let mut req = request.into_request();
1454            req.extensions_mut()
1455                .insert(GrpcMethod::new("nominal.ai.v1.KnowledgeBaseService", "List"));
1456            self.inner.unary(req, path, codec).await
1457        }
1458        pub async fn delete(
1459            &mut self,
1460            request: impl tonic::IntoRequest<super::DeleteRequest>,
1461        ) -> std::result::Result<tonic::Response<super::DeleteResponse>, tonic::Status> {
1462            self.inner
1463                .ready()
1464                .await
1465                .map_err(|e| {
1466                    tonic::Status::unknown(
1467                        format!("Service was not ready: {}", e.into()),
1468                    )
1469                })?;
1470            let codec = tonic::codec::ProstCodec::default();
1471            let path = http::uri::PathAndQuery::from_static(
1472                "/nominal.ai.v1.KnowledgeBaseService/Delete",
1473            );
1474            let mut req = request.into_request();
1475            req.extensions_mut()
1476                .insert(GrpcMethod::new("nominal.ai.v1.KnowledgeBaseService", "Delete"));
1477            self.inner.unary(req, path, codec).await
1478        }
1479        pub async fn get_batch(
1480            &mut self,
1481            request: impl tonic::IntoRequest<super::GetBatchRequest>,
1482        ) -> std::result::Result<
1483            tonic::Response<super::GetBatchResponse>,
1484            tonic::Status,
1485        > {
1486            self.inner
1487                .ready()
1488                .await
1489                .map_err(|e| {
1490                    tonic::Status::unknown(
1491                        format!("Service was not ready: {}", e.into()),
1492                    )
1493                })?;
1494            let codec = tonic::codec::ProstCodec::default();
1495            let path = http::uri::PathAndQuery::from_static(
1496                "/nominal.ai.v1.KnowledgeBaseService/GetBatch",
1497            );
1498            let mut req = request.into_request();
1499            req.extensions_mut()
1500                .insert(
1501                    GrpcMethod::new("nominal.ai.v1.KnowledgeBaseService", "GetBatch"),
1502                );
1503            self.inner.unary(req, path, codec).await
1504        }
1505        pub async fn generate_summary_description(
1506            &mut self,
1507            request: impl tonic::IntoRequest<super::GenerateSummaryDescriptionRequest>,
1508        ) -> std::result::Result<
1509            tonic::Response<super::GenerateSummaryDescriptionResponse>,
1510            tonic::Status,
1511        > {
1512            self.inner
1513                .ready()
1514                .await
1515                .map_err(|e| {
1516                    tonic::Status::unknown(
1517                        format!("Service was not ready: {}", e.into()),
1518                    )
1519                })?;
1520            let codec = tonic::codec::ProstCodec::default();
1521            let path = http::uri::PathAndQuery::from_static(
1522                "/nominal.ai.v1.KnowledgeBaseService/GenerateSummaryDescription",
1523            );
1524            let mut req = request.into_request();
1525            req.extensions_mut()
1526                .insert(
1527                    GrpcMethod::new(
1528                        "nominal.ai.v1.KnowledgeBaseService",
1529                        "GenerateSummaryDescription",
1530                    ),
1531                );
1532            self.inner.unary(req, path, codec).await
1533        }
1534    }
1535}
1536#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1537pub struct GetProviderStatusRequest {}
1538#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1539pub struct GetProviderStatusResponse {
1540    #[prost(message, optional, tag = "1")]
1541    pub timestamp: ::core::option::Option<
1542        super::super::super::google::protobuf::Timestamp,
1543    >,
1544    #[prost(message, optional, tag = "2")]
1545    pub last_status: ::core::option::Option<ProviderStatus>,
1546    #[deprecated]
1547    #[prost(message, optional, tag = "3")]
1548    pub aggregated_status_over_last_30m: ::core::option::Option<ProviderStatus>,
1549    #[prost(message, optional, tag = "4")]
1550    pub aggregated_status: ::core::option::Option<ProviderStatus>,
1551}
1552#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1553pub struct ProviderStatus {
1554    #[prost(oneof = "provider_status::Status", tags = "1, 2")]
1555    pub status: ::core::option::Option<provider_status::Status>,
1556}
1557/// Nested message and enum types in `ProviderStatus`.
1558pub mod provider_status {
1559    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
1560    pub enum Status {
1561        #[prost(message, tag = "1")]
1562        Healthy(super::Healthy),
1563        #[prost(message, tag = "2")]
1564        Degraded(super::Degraded),
1565    }
1566}
1567#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1568pub struct Healthy {}
1569#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1570pub struct Degraded {
1571    #[prost(enumeration = "DegradationReason", tag = "1")]
1572    pub reason: i32,
1573}
1574#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1575pub struct ProviderMetrics {
1576    #[prost(int32, tag = "1")]
1577    pub time_to_first_token_ms: i32,
1578    #[prost(int32, tag = "2")]
1579    pub total_time_ms: i32,
1580}
1581#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1582#[repr(i32)]
1583pub enum DegradationReason {
1584    Unspecified = 0,
1585    HighLatency = 1,
1586    Failures = 2,
1587    HighLatencyAndFailures = 3,
1588    Unavailable = 4,
1589}
1590impl DegradationReason {
1591    /// String value of the enum field names used in the ProtoBuf definition.
1592    ///
1593    /// The values are not transformed in any way and thus are considered stable
1594    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1595    pub fn as_str_name(&self) -> &'static str {
1596        match self {
1597            Self::Unspecified => "DEGRADATION_REASON_UNSPECIFIED",
1598            Self::HighLatency => "DEGRADATION_REASON_HIGH_LATENCY",
1599            Self::Failures => "DEGRADATION_REASON_FAILURES",
1600            Self::HighLatencyAndFailures => {
1601                "DEGRADATION_REASON_HIGH_LATENCY_AND_FAILURES"
1602            }
1603            Self::Unavailable => "DEGRADATION_REASON_UNAVAILABLE",
1604        }
1605    }
1606    /// Creates an enum from field names used in the ProtoBuf definition.
1607    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1608        match value {
1609            "DEGRADATION_REASON_UNSPECIFIED" => Some(Self::Unspecified),
1610            "DEGRADATION_REASON_HIGH_LATENCY" => Some(Self::HighLatency),
1611            "DEGRADATION_REASON_FAILURES" => Some(Self::Failures),
1612            "DEGRADATION_REASON_HIGH_LATENCY_AND_FAILURES" => {
1613                Some(Self::HighLatencyAndFailures)
1614            }
1615            "DEGRADATION_REASON_UNAVAILABLE" => Some(Self::Unavailable),
1616            _ => None,
1617        }
1618    }
1619}
1620/// Generated client implementations.
1621pub mod model_provider_health_service_client {
1622    #![allow(
1623        unused_variables,
1624        dead_code,
1625        missing_docs,
1626        clippy::wildcard_imports,
1627        clippy::let_unit_value,
1628    )]
1629    use tonic::codegen::*;
1630    use tonic::codegen::http::Uri;
1631    #[derive(Debug, Clone)]
1632    pub struct ModelProviderHealthServiceClient<T> {
1633        inner: tonic::client::Grpc<T>,
1634    }
1635    impl ModelProviderHealthServiceClient<tonic::transport::Channel> {
1636        /// Attempt to create a new client by connecting to a given endpoint.
1637        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1638        where
1639            D: TryInto<tonic::transport::Endpoint>,
1640            D::Error: Into<StdError>,
1641        {
1642            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1643            Ok(Self::new(conn))
1644        }
1645    }
1646    impl<T> ModelProviderHealthServiceClient<T>
1647    where
1648        T: tonic::client::GrpcService<tonic::body::Body>,
1649        T::Error: Into<StdError>,
1650        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1651        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1652    {
1653        pub fn new(inner: T) -> Self {
1654            let inner = tonic::client::Grpc::new(inner);
1655            Self { inner }
1656        }
1657        pub fn with_origin(inner: T, origin: Uri) -> Self {
1658            let inner = tonic::client::Grpc::with_origin(inner, origin);
1659            Self { inner }
1660        }
1661        pub fn with_interceptor<F>(
1662            inner: T,
1663            interceptor: F,
1664        ) -> ModelProviderHealthServiceClient<InterceptedService<T, F>>
1665        where
1666            F: tonic::service::Interceptor,
1667            T::ResponseBody: Default,
1668            T: tonic::codegen::Service<
1669                http::Request<tonic::body::Body>,
1670                Response = http::Response<
1671                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
1672                >,
1673            >,
1674            <T as tonic::codegen::Service<
1675                http::Request<tonic::body::Body>,
1676            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1677        {
1678            ModelProviderHealthServiceClient::new(
1679                InterceptedService::new(inner, interceptor),
1680            )
1681        }
1682        /// Compress requests with the given encoding.
1683        ///
1684        /// This requires the server to support it otherwise it might respond with an
1685        /// error.
1686        #[must_use]
1687        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1688            self.inner = self.inner.send_compressed(encoding);
1689            self
1690        }
1691        /// Enable decompressing responses.
1692        #[must_use]
1693        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1694            self.inner = self.inner.accept_compressed(encoding);
1695            self
1696        }
1697        /// Limits the maximum size of a decoded message.
1698        ///
1699        /// Default: `4MB`
1700        #[must_use]
1701        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1702            self.inner = self.inner.max_decoding_message_size(limit);
1703            self
1704        }
1705        /// Limits the maximum size of an encoded message.
1706        ///
1707        /// Default: `usize::MAX`
1708        #[must_use]
1709        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1710            self.inner = self.inner.max_encoding_message_size(limit);
1711            self
1712        }
1713        pub async fn get_provider_status(
1714            &mut self,
1715            request: impl tonic::IntoRequest<super::GetProviderStatusRequest>,
1716        ) -> std::result::Result<
1717            tonic::Response<super::GetProviderStatusResponse>,
1718            tonic::Status,
1719        > {
1720            self.inner
1721                .ready()
1722                .await
1723                .map_err(|e| {
1724                    tonic::Status::unknown(
1725                        format!("Service was not ready: {}", e.into()),
1726                    )
1727                })?;
1728            let codec = tonic::codec::ProstCodec::default();
1729            let path = http::uri::PathAndQuery::from_static(
1730                "/nominal.ai.v1.ModelProviderHealthService/GetProviderStatus",
1731            );
1732            let mut req = request.into_request();
1733            req.extensions_mut()
1734                .insert(
1735                    GrpcMethod::new(
1736                        "nominal.ai.v1.ModelProviderHealthService",
1737                        "GetProviderStatus",
1738                    ),
1739                );
1740            self.inner.unary(req, path, codec).await
1741        }
1742    }
1743}