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