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 QueuedMessage {
4    #[prost(string, tag = "1")]
5    pub id: ::prost::alloc::string::String,
6    #[prost(string, tag = "2")]
7    pub conversation_rid: ::prost::alloc::string::String,
8    #[prost(string, tag = "3")]
9    pub client_message_id: ::prost::alloc::string::String,
10    #[prost(message, optional, tag = "4")]
11    pub message: ::core::option::Option<StreamChatRequest>,
12    #[prost(enumeration = "QueuedMessageState", tag = "5")]
13    pub state: i32,
14    #[prost(string, tag = "6")]
15    pub failure_code: ::prost::alloc::string::String,
16    #[prost(message, optional, tag = "7")]
17    pub created_at: ::core::option::Option<
18        super::super::super::google::protobuf::Timestamp,
19    >,
20}
21#[derive(Clone, PartialEq, ::prost::Message)]
22pub struct CreateQueuedMessageRequest {
23    #[prost(string, tag = "1")]
24    pub conversation_rid: ::prost::alloc::string::String,
25    #[prost(string, tag = "2")]
26    pub client_message_id: ::prost::alloc::string::String,
27    #[prost(message, optional, tag = "3")]
28    pub message: ::core::option::Option<StreamChatRequest>,
29}
30#[derive(Clone, PartialEq, ::prost::Message)]
31pub struct CreateQueuedMessageResponse {
32    #[prost(message, optional, tag = "1")]
33    pub queued_message: ::core::option::Option<QueuedMessage>,
34}
35#[derive(Clone, PartialEq, ::prost::Message)]
36pub struct ListQueuedMessagesRequest {
37    #[prost(string, tag = "1")]
38    pub conversation_rid: ::prost::alloc::string::String,
39    #[prost(int32, tag = "2")]
40    pub page_size: i32,
41    #[prost(string, tag = "3")]
42    pub page_token: ::prost::alloc::string::String,
43}
44#[derive(Clone, PartialEq, ::prost::Message)]
45pub struct ListQueuedMessagesResponse {
46    #[prost(message, repeated, tag = "1")]
47    pub queued_messages: ::prost::alloc::vec::Vec<QueuedMessage>,
48    #[prost(string, tag = "2")]
49    pub next_page_token: ::prost::alloc::string::String,
50}
51#[derive(Clone, PartialEq, ::prost::Message)]
52pub struct DeleteQueuedMessageRequest {
53    #[prost(string, tag = "1")]
54    pub conversation_rid: ::prost::alloc::string::String,
55    #[prost(string, tag = "2")]
56    pub queued_message_id: ::prost::alloc::string::String,
57}
58#[derive(Clone, Copy, PartialEq, ::prost::Message)]
59pub struct DeleteQueuedMessageResponse {}
60#[derive(Clone, PartialEq, ::prost::Message)]
61pub struct SubmitMessageFeedbackRequest {
62    #[prost(string, tag = "1")]
63    pub conversation_rid: ::prost::alloc::string::String,
64    #[prost(string, tag = "2")]
65    pub message_id: ::prost::alloc::string::String,
66    #[prost(enumeration = "FeedbackVote", tag = "3")]
67    pub vote: i32,
68    #[prost(string, optional, tag = "4")]
69    pub comment: ::core::option::Option<::prost::alloc::string::String>,
70    #[prost(string, repeated, tag = "5")]
71    pub issue_types: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
72}
73#[derive(Clone, Copy, PartialEq, ::prost::Message)]
74pub struct SubmitMessageFeedbackResponse {}
75#[derive(Clone, PartialEq, ::prost::Message)]
76pub struct CancelAgentRunRequest {
77    #[prost(string, tag = "1")]
78    pub conversation_rid: ::prost::alloc::string::String,
79    #[prost(string, tag = "2")]
80    pub agent_run_id: ::prost::alloc::string::String,
81}
82#[derive(Clone, Copy, PartialEq, ::prost::Message)]
83pub struct CancelAgentRunResponse {}
84#[derive(Clone, PartialEq, ::prost::Message)]
85pub struct GetSnapshotRidByUserMessageIdRequest {
86    #[prost(string, tag = "1")]
87    pub conversation_rid: ::prost::alloc::string::String,
88    #[prost(string, tag = "2")]
89    pub message_id: ::prost::alloc::string::String,
90}
91#[derive(Clone, PartialEq, ::prost::Message)]
92pub struct GetSnapshotRidByUserMessageIdResponse {
93    #[prost(
94        oneof = "get_snapshot_rid_by_user_message_id_response::RestorePoint",
95        tags = "1, 2"
96    )]
97    pub restore_point: ::core::option::Option<
98        get_snapshot_rid_by_user_message_id_response::RestorePoint,
99    >,
100}
101/// Nested message and enum types in `GetSnapshotRidByUserMessageIdResponse`.
102pub mod get_snapshot_rid_by_user_message_id_response {
103    #[derive(Clone, PartialEq, ::prost::Oneof)]
104    pub enum RestorePoint {
105        #[prost(string, tag = "1")]
106        SnapshotRid(::prost::alloc::string::String),
107        #[prost(string, tag = "2")]
108        CommitId(::prost::alloc::string::String),
109    }
110}
111#[derive(Clone, Copy, PartialEq, ::prost::Message)]
112pub struct ReadOnlyMode {}
113#[derive(Clone, Copy, PartialEq, ::prost::Message)]
114pub struct EditMode {
115    #[prost(bool, optional, tag = "1")]
116    pub auto_accept: ::core::option::Option<bool>,
117}
118#[derive(Clone, Copy, PartialEq, ::prost::Message)]
119pub struct ConversationMode {
120    #[prost(oneof = "conversation_mode::Mode", tags = "1, 2")]
121    pub mode: ::core::option::Option<conversation_mode::Mode>,
122}
123/// Nested message and enum types in `ConversationMode`.
124pub mod conversation_mode {
125    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
126    pub enum Mode {
127        #[prost(message, tag = "1")]
128        ReadOnly(super::ReadOnlyMode),
129        #[prost(message, tag = "2")]
130        Edit(super::EditMode),
131    }
132}
133#[derive(Clone, PartialEq, ::prost::Message)]
134pub struct ToolApprovalResult {
135    #[prost(string, tag = "1")]
136    pub tool_call_id: ::prost::alloc::string::String,
137    #[prost(oneof = "tool_approval_result::Response", tags = "2, 3")]
138    pub response: ::core::option::Option<tool_approval_result::Response>,
139}
140/// Nested message and enum types in `ToolApprovalResult`.
141pub mod tool_approval_result {
142    #[derive(Clone, PartialEq, ::prost::Oneof)]
143    pub enum Response {
144        #[prost(message, tag = "2")]
145        Approved(super::ToolApprovedResponse),
146        #[prost(message, tag = "3")]
147        Denied(super::ToolDeniedResponse),
148    }
149}
150#[derive(Clone, PartialEq, ::prost::Message)]
151pub struct ToolApprovedResponse {
152    #[prost(string, optional, tag = "1")]
153    pub override_args: ::core::option::Option<::prost::alloc::string::String>,
154}
155#[derive(Clone, PartialEq, ::prost::Message)]
156pub struct ToolDeniedResponse {
157    #[prost(string, tag = "2")]
158    pub denial_reason: ::prost::alloc::string::String,
159}
160#[derive(Clone, Copy, PartialEq, ::prost::Message)]
161pub struct RetryRequest {}
162#[derive(Clone, PartialEq, ::prost::Message)]
163pub struct UserPromptRequest {
164    #[prost(message, optional, tag = "1")]
165    pub message: ::core::option::Option<UserModelMessage>,
166    #[prost(message, repeated, tag = "2")]
167    pub images: ::prost::alloc::vec::Vec<ImagePart>,
168}
169#[derive(Clone, PartialEq, ::prost::Message)]
170pub struct ToolApprovalRequest {
171    #[prost(message, repeated, tag = "1")]
172    pub tool_approvals: ::prost::alloc::vec::Vec<ToolApprovalResult>,
173}
174#[derive(Clone, PartialEq, ::prost::Message)]
175pub struct UserQuestionAnswer {
176    #[prost(uint32, tag = "1")]
177    pub question_index: u32,
178    #[prost(string, repeated, tag = "2")]
179    pub selected_labels: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
180    #[prost(string, optional, tag = "3")]
181    pub other_text: ::core::option::Option<::prost::alloc::string::String>,
182}
183#[derive(Clone, Copy, PartialEq, ::prost::Message)]
184pub struct UserQuestionDeclined {}
185#[derive(Clone, PartialEq, ::prost::Message)]
186pub struct UserQuestionResponseRequest {
187    #[prost(string, tag = "1")]
188    pub tool_call_id: ::prost::alloc::string::String,
189    #[prost(uint32, tag = "2")]
190    pub question_index: u32,
191    #[prost(uint64, tag = "3")]
192    pub version: u64,
193    #[prost(oneof = "user_question_response_request::Response", tags = "4, 5")]
194    pub response: ::core::option::Option<user_question_response_request::Response>,
195}
196/// Nested message and enum types in `UserQuestionResponseRequest`.
197pub mod user_question_response_request {
198    #[derive(Clone, PartialEq, ::prost::Oneof)]
199    pub enum Response {
200        #[prost(message, tag = "4")]
201        Answered(super::UserQuestionAnswer),
202        #[prost(message, tag = "5")]
203        Declined(super::UserQuestionDeclined),
204    }
205}
206#[derive(Clone, PartialEq, ::prost::Message)]
207pub struct StreamChatRequest {
208    #[prost(string, tag = "1")]
209    pub conversation_rid: ::prost::alloc::string::String,
210    #[deprecated]
211    #[prost(message, optional, tag = "2")]
212    pub message: ::core::option::Option<UserModelMessage>,
213    #[deprecated]
214    #[prost(message, repeated, tag = "3")]
215    pub images: ::prost::alloc::vec::Vec<ImagePart>,
216    #[deprecated]
217    #[prost(message, repeated, tag = "6")]
218    pub tool_approvals: ::prost::alloc::vec::Vec<ToolApprovalResult>,
219    #[prost(bool, tag = "13")]
220    pub detach_on_disconnect: bool,
221    #[prost(bool, tag = "14")]
222    pub reattach_only: bool,
223    #[prost(message, optional, tag = "15")]
224    pub model_selection: ::core::option::Option<ModelSelection>,
225    #[prost(oneof = "stream_chat_request::RequestType", tags = "7, 8, 9, 12")]
226    pub request_type: ::core::option::Option<stream_chat_request::RequestType>,
227    #[prost(oneof = "stream_chat_request::Context", tags = "4, 5, 10, 11")]
228    pub context: ::core::option::Option<stream_chat_request::Context>,
229}
230/// Nested message and enum types in `StreamChatRequest`.
231pub mod stream_chat_request {
232    #[derive(Clone, PartialEq, ::prost::Oneof)]
233    pub enum RequestType {
234        #[prost(message, tag = "7")]
235        Retry(super::RetryRequest),
236        #[prost(message, tag = "8")]
237        UserPrompt(super::UserPromptRequest),
238        #[prost(message, tag = "9")]
239        ToolApproval(super::ToolApprovalRequest),
240        #[prost(message, tag = "12")]
241        UserQuestionResponse(super::UserQuestionResponseRequest),
242    }
243    #[derive(Clone, PartialEq, ::prost::Oneof)]
244    pub enum Context {
245        #[prost(message, tag = "4")]
246        Workbook(super::WorkbookContext),
247        #[prost(message, tag = "5")]
248        Global(super::GlobalContext),
249        #[prost(message, tag = "10")]
250        Checklist(super::ChecklistContext),
251        #[prost(message, tag = "11")]
252        Template(super::TemplateContext),
253    }
254}
255#[derive(Clone, PartialEq, ::prost::Message)]
256pub struct ModelSelection {
257    #[prost(string, tag = "1")]
258    pub model_id: ::prost::alloc::string::String,
259    #[prost(string, optional, tag = "2")]
260    pub thinking_effort: ::core::option::Option<::prost::alloc::string::String>,
261    #[prost(uint32, optional, tag = "3")]
262    pub context_window_tokens: ::core::option::Option<u32>,
263    #[prost(uint32, optional, tag = "4")]
264    pub max_output_tokens: ::core::option::Option<u32>,
265}
266#[derive(Clone, PartialEq, ::prost::Message)]
267pub struct ThinkingEffortOption {
268    #[prost(string, tag = "1")]
269    pub effort: ::prost::alloc::string::String,
270    #[prost(uint32, tag = "2")]
271    pub default_output_tokens: u32,
272}
273#[derive(Clone, PartialEq, ::prost::Message)]
274pub struct ModelOption {
275    #[prost(string, tag = "1")]
276    pub model_id: ::prost::alloc::string::String,
277    #[prost(string, tag = "2")]
278    pub label: ::prost::alloc::string::String,
279    #[prost(string, repeated, tag = "3")]
280    pub thinking_efforts: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
281    #[prost(uint32, tag = "4")]
282    pub min_context_window_tokens: u32,
283    #[prost(uint32, tag = "5")]
284    pub max_context_window_tokens: u32,
285    #[prost(uint32, tag = "6")]
286    pub default_context_window_tokens: u32,
287    #[prost(uint32, repeated, tag = "7")]
288    pub context_window_presets: ::prost::alloc::vec::Vec<u32>,
289    #[prost(uint32, tag = "8")]
290    pub min_output_tokens: u32,
291    #[prost(uint32, tag = "9")]
292    pub max_output_tokens: u32,
293    #[prost(uint32, tag = "10")]
294    pub default_output_tokens: u32,
295    #[prost(message, repeated, tag = "11")]
296    pub thinking_effort_options: ::prost::alloc::vec::Vec<ThinkingEffortOption>,
297    #[prost(bool, tag = "12")]
298    pub supports_image_input: bool,
299    #[prost(string, optional, tag = "13")]
300    pub default_thinking_effort: ::core::option::Option<::prost::alloc::string::String>,
301}
302#[derive(Clone, Copy, PartialEq, ::prost::Message)]
303pub struct ListModelsRequest {}
304#[derive(Clone, PartialEq, ::prost::Message)]
305pub struct ListModelsResponse {
306    #[prost(message, repeated, tag = "1")]
307    pub models: ::prost::alloc::vec::Vec<ModelOption>,
308}
309#[derive(Clone, PartialEq, ::prost::Message)]
310pub struct WorkbookContext {
311    #[prost(string, tag = "1")]
312    pub workbook_rid: ::prost::alloc::string::String,
313    #[deprecated]
314    #[prost(message, optional, tag = "2")]
315    pub user_presence: ::core::option::Option<WorkbookUserPresence>,
316    #[prost(string, optional, tag = "3")]
317    pub active_tab_id: ::core::option::Option<::prost::alloc::string::String>,
318    #[prost(message, optional, tag = "5")]
319    pub visible_time_range: ::core::option::Option<TimeRange>,
320}
321#[derive(Clone, PartialEq, ::prost::Message)]
322pub struct ChecklistContext {
323    #[prost(string, tag = "1")]
324    pub checklist_rid: ::prost::alloc::string::String,
325    #[prost(string, tag = "2")]
326    pub branch_name: ::prost::alloc::string::String,
327    #[prost(oneof = "checklist_context::ReferenceRid", tags = "3, 4")]
328    pub reference_rid: ::core::option::Option<checklist_context::ReferenceRid>,
329}
330/// Nested message and enum types in `ChecklistContext`.
331pub mod checklist_context {
332    #[derive(Clone, PartialEq, ::prost::Oneof)]
333    pub enum ReferenceRid {
334        #[prost(string, tag = "3")]
335        Asset(::prost::alloc::string::String),
336        #[prost(string, tag = "4")]
337        Run(::prost::alloc::string::String),
338    }
339}
340#[derive(Clone, PartialEq, ::prost::Message)]
341pub struct TemplateContext {
342    #[prost(string, tag = "1")]
343    pub template_rid: ::prost::alloc::string::String,
344    #[prost(string, tag = "2")]
345    pub branch_name: ::prost::alloc::string::String,
346    #[prost(oneof = "template_context::ReferenceRid", tags = "3, 4")]
347    pub reference_rid: ::core::option::Option<template_context::ReferenceRid>,
348}
349/// Nested message and enum types in `TemplateContext`.
350pub mod template_context {
351    #[derive(Clone, PartialEq, ::prost::Oneof)]
352    pub enum ReferenceRid {
353        #[prost(string, tag = "3")]
354        Asset(::prost::alloc::string::String),
355        #[prost(string, tag = "4")]
356        Run(::prost::alloc::string::String),
357    }
358}
359#[derive(Clone, Copy, PartialEq, ::prost::Message)]
360pub struct GlobalContext {}
361#[derive(Clone, Copy, PartialEq, ::prost::Message)]
362pub struct WorkbookUserPresence {
363    #[prost(int32, tag = "1")]
364    pub tab_index: i32,
365    #[prost(message, optional, tag = "2")]
366    pub range: ::core::option::Option<TimeRange>,
367}
368#[derive(Clone, PartialEq, ::prost::Message)]
369pub struct CreateConversationRequest {
370    #[prost(string, tag = "1")]
371    pub title: ::prost::alloc::string::String,
372    #[prost(string, tag = "2")]
373    pub workspace_rid: ::prost::alloc::string::String,
374    #[prost(string, optional, tag = "3")]
375    pub old_conversation_rid: ::core::option::Option<::prost::alloc::string::String>,
376    #[prost(string, optional, tag = "4")]
377    pub previous_message_id: ::core::option::Option<::prost::alloc::string::String>,
378    #[prost(message, optional, tag = "5")]
379    pub conversation_mode: ::core::option::Option<ConversationMode>,
380    #[prost(string, optional, tag = "6")]
381    pub backing_workbook_rid: ::core::option::Option<::prost::alloc::string::String>,
382    #[prost(message, repeated, tag = "7")]
383    pub resources: ::prost::alloc::vec::Vec<ConversationResource>,
384}
385#[derive(Clone, PartialEq, ::prost::Message)]
386pub struct CreateConversationResponse {
387    #[prost(string, tag = "1")]
388    pub new_conversation_rid: ::prost::alloc::string::String,
389}
390#[derive(Clone, PartialEq, ::prost::Message)]
391pub struct UpdateConversationMetadataRequest {
392    #[prost(string, optional, tag = "1")]
393    pub title: ::core::option::Option<::prost::alloc::string::String>,
394    #[prost(string, tag = "2")]
395    pub conversation_rid: ::prost::alloc::string::String,
396    #[prost(message, optional, tag = "3")]
397    pub conversation_mode: ::core::option::Option<ConversationMode>,
398}
399#[derive(Clone, Copy, PartialEq, ::prost::Message)]
400pub struct UpdateConversationMetadataResponse {}
401#[derive(Clone, PartialEq, ::prost::Message)]
402pub struct DeleteConversationRequest {
403    #[prost(string, tag = "1")]
404    pub conversation_rid: ::prost::alloc::string::String,
405}
406#[derive(Clone, Copy, PartialEq, ::prost::Message)]
407pub struct DeleteConversationResponse {}
408#[derive(Clone, PartialEq, ::prost::Message)]
409pub struct ArchiveConversationRequest {
410    #[prost(string, tag = "1")]
411    pub conversation_rid: ::prost::alloc::string::String,
412}
413#[derive(Clone, PartialEq, ::prost::Message)]
414pub struct ArchiveConversationResponse {
415    #[prost(message, optional, tag = "1")]
416    pub conversation: ::core::option::Option<ConversationMetadata>,
417}
418#[derive(Clone, PartialEq, ::prost::Message)]
419pub struct UnarchiveConversationRequest {
420    #[prost(string, tag = "1")]
421    pub conversation_rid: ::prost::alloc::string::String,
422}
423#[derive(Clone, PartialEq, ::prost::Message)]
424pub struct UnarchiveConversationResponse {
425    #[prost(message, optional, tag = "1")]
426    pub conversation: ::core::option::Option<ConversationMetadata>,
427}
428#[derive(Clone, PartialEq, ::prost::Message)]
429pub struct GetConversationRequest {
430    #[prost(string, tag = "1")]
431    pub conversation_rid: ::prost::alloc::string::String,
432    #[prost(string, optional, tag = "2")]
433    pub page_start_message_id: ::core::option::Option<::prost::alloc::string::String>,
434    #[prost(int32, optional, tag = "3")]
435    pub max_message_count: ::core::option::Option<i32>,
436}
437#[derive(Clone, PartialEq, ::prost::Message)]
438pub struct CompactConversationRequest {
439    #[prost(string, tag = "1")]
440    pub conversation_rid: ::prost::alloc::string::String,
441}
442#[derive(Clone, Copy, PartialEq, ::prost::Message)]
443pub struct CompactConversationResponse {
444    #[prost(message, optional, tag = "1")]
445    pub context: ::core::option::Option<ContextStatus>,
446}
447#[derive(Clone, PartialEq, ::prost::Message)]
448pub struct ModelMessageWithId {
449    #[prost(string, tag = "3")]
450    pub message_id: ::prost::alloc::string::String,
451    #[prost(message, repeated, tag = "5")]
452    pub tool_approval_requests: ::prost::alloc::vec::Vec<ToolCallDescription>,
453    #[prost(message, repeated, tag = "8")]
454    pub user_question_calls: ::prost::alloc::vec::Vec<UserQuestionCall>,
455    #[prost(message, optional, tag = "9")]
456    pub created_at: ::core::option::Option<
457        super::super::super::google::protobuf::Timestamp,
458    >,
459    #[prost(double, optional, tag = "10")]
460    pub turn_duration_s: ::core::option::Option<f64>,
461    #[prost(oneof = "model_message_with_id::Content", tags = "1, 2, 6")]
462    pub content: ::core::option::Option<model_message_with_id::Content>,
463    #[prost(oneof = "model_message_with_id::RestorePoint", tags = "4, 7")]
464    pub restore_point: ::core::option::Option<model_message_with_id::RestorePoint>,
465}
466/// Nested message and enum types in `ModelMessageWithId`.
467pub mod model_message_with_id {
468    #[derive(Clone, PartialEq, ::prost::Oneof)]
469    pub enum Content {
470        #[prost(message, tag = "1")]
471        Message(super::ModelMessage),
472        #[prost(message, tag = "2")]
473        ToolAction(super::ToolAction),
474        #[prost(message, tag = "6")]
475        ToolActionConfirmation(super::ToolActionConfirmation),
476    }
477    #[derive(Clone, PartialEq, ::prost::Oneof)]
478    pub enum RestorePoint {
479        #[prost(string, tag = "4")]
480        SnapshotRid(::prost::alloc::string::String),
481        #[prost(string, tag = "7")]
482        CommitId(::prost::alloc::string::String),
483    }
484}
485#[derive(Clone, PartialEq, ::prost::Message)]
486pub struct GetConversationResponse {
487    #[prost(message, repeated, tag = "1")]
488    pub ordered_messages: ::prost::alloc::vec::Vec<ModelMessageWithId>,
489    #[prost(message, optional, tag = "2")]
490    pub conversation_metadata: ::core::option::Option<ConversationMetadata>,
491}
492#[derive(Clone, PartialEq, ::prost::Message)]
493pub struct GetConversationMetadataRequest {
494    #[prost(string, tag = "1")]
495    pub conversation_rid: ::prost::alloc::string::String,
496}
497#[derive(Clone, PartialEq, ::prost::Message)]
498pub struct GetConversationMetadataResponse {
499    #[prost(message, optional, tag = "1")]
500    pub conversation_metadata: ::core::option::Option<ConversationMetadata>,
501    #[prost(message, optional, tag = "2")]
502    pub active_run: ::core::option::Option<ActiveAgentRun>,
503}
504#[derive(Clone, PartialEq, ::prost::Message)]
505pub struct ActiveAgentRun {
506    #[prost(string, tag = "1")]
507    pub agent_run_id: ::prost::alloc::string::String,
508    #[prost(message, optional, tag = "2")]
509    pub started_at: ::core::option::Option<
510        super::super::super::google::protobuf::Timestamp,
511    >,
512    #[prost(enumeration = "AgentRunExecutionMode", tag = "3")]
513    pub execution_mode: i32,
514}
515#[derive(Clone, PartialEq, ::prost::Message)]
516pub struct GetConversationMessagesRequest {
517    #[prost(string, tag = "1")]
518    pub conversation_rid: ::prost::alloc::string::String,
519    #[prost(string, optional, tag = "2")]
520    pub page_start_message_id: ::core::option::Option<::prost::alloc::string::String>,
521    #[prost(int32, optional, tag = "3")]
522    pub max_message_count: ::core::option::Option<i32>,
523}
524#[derive(Clone, PartialEq, ::prost::Message)]
525pub struct GetConversationMessagesResponse {
526    #[prost(message, repeated, tag = "1")]
527    pub ordered_messages: ::prost::alloc::vec::Vec<ModelMessageWithId>,
528    #[prost(string, optional, tag = "2")]
529    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
530}
531#[derive(Clone, PartialEq, ::prost::Message)]
532pub struct ListConversationsRequest {
533    #[prost(string, tag = "1")]
534    pub workspace_rid: ::prost::alloc::string::String,
535    #[prost(string, optional, tag = "2")]
536    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
537    #[prost(int32, optional, tag = "3")]
538    pub page_size: ::core::option::Option<i32>,
539    #[prost(string, optional, tag = "4")]
540    pub title_query: ::core::option::Option<::prost::alloc::string::String>,
541    #[prost(bool, tag = "6")]
542    pub include_archived: bool,
543}
544#[derive(Clone, PartialEq, ::prost::Message)]
545pub struct ConversationResource {
546    #[prost(string, tag = "1")]
547    pub rid: ::prost::alloc::string::String,
548}
549#[derive(Clone, PartialEq, ::prost::Message)]
550pub struct UpdateConversationResourcesRequest {
551    #[prost(string, tag = "1")]
552    pub conversation_rid: ::prost::alloc::string::String,
553    #[prost(string, repeated, tag = "2")]
554    pub add_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
555    #[prost(string, repeated, tag = "3")]
556    pub remove_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
557}
558#[derive(Clone, PartialEq, ::prost::Message)]
559pub struct UpdateConversationResourcesResponse {
560    #[prost(message, repeated, tag = "1")]
561    pub resources: ::prost::alloc::vec::Vec<ConversationResource>,
562}
563#[derive(Clone, PartialEq, ::prost::Message)]
564pub struct ConversationMetadata {
565    #[prost(string, tag = "1")]
566    pub conversation_rid: ::prost::alloc::string::String,
567    #[prost(string, tag = "2")]
568    pub title: ::prost::alloc::string::String,
569    #[prost(message, optional, tag = "3")]
570    pub created_at: ::core::option::Option<
571        super::super::super::google::protobuf::Timestamp,
572    >,
573    #[prost(message, optional, tag = "4")]
574    pub last_updated_at: ::core::option::Option<
575        super::super::super::google::protobuf::Timestamp,
576    >,
577    #[prost(message, optional, tag = "5")]
578    pub mode: ::core::option::Option<ConversationMode>,
579    #[prost(message, optional, tag = "6")]
580    pub current_context: ::core::option::Option<ContextStatus>,
581    #[prost(string, optional, tag = "7")]
582    pub backing_workbook_rid: ::core::option::Option<::prost::alloc::string::String>,
583    #[prost(message, repeated, tag = "8")]
584    pub resources: ::prost::alloc::vec::Vec<ConversationResource>,
585    #[prost(message, optional, tag = "9")]
586    pub active_run: ::core::option::Option<ActiveAgentRun>,
587    #[prost(message, optional, tag = "10")]
588    pub archived_at: ::core::option::Option<
589        super::super::super::google::protobuf::Timestamp,
590    >,
591}
592#[derive(Clone, PartialEq, ::prost::Message)]
593pub struct ListConversationsResponse {
594    #[prost(message, repeated, tag = "1")]
595    pub conversations: ::prost::alloc::vec::Vec<ConversationMetadata>,
596    #[prost(string, optional, tag = "2")]
597    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
598}
599#[derive(Clone, PartialEq, ::prost::Message)]
600pub struct BatchGetConversationActiveRunsRequest {
601    #[prost(string, tag = "1")]
602    pub workspace_rid: ::prost::alloc::string::String,
603    #[prost(string, repeated, tag = "2")]
604    pub conversation_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
605}
606#[derive(Clone, PartialEq, ::prost::Message)]
607pub struct BatchGetConversationActiveRunsResponse {
608    #[prost(message, repeated, tag = "1")]
609    pub active_runs: ::prost::alloc::vec::Vec<ConversationActiveRun>,
610}
611#[derive(Clone, PartialEq, ::prost::Message)]
612pub struct ConversationActiveRun {
613    #[prost(string, tag = "1")]
614    pub conversation_rid: ::prost::alloc::string::String,
615    #[prost(message, optional, tag = "2")]
616    pub active_run: ::core::option::Option<ActiveAgentRun>,
617}
618#[derive(Clone, Copy, PartialEq, ::prost::Message)]
619pub struct TimeRange {
620    #[prost(message, optional, tag = "1")]
621    pub range_start: ::core::option::Option<Timestamp>,
622    #[prost(message, optional, tag = "2")]
623    pub range_end: ::core::option::Option<Timestamp>,
624}
625#[derive(Clone, Copy, PartialEq, ::prost::Message)]
626pub struct Timestamp {
627    #[prost(int32, tag = "1")]
628    pub seconds: i32,
629    #[prost(int32, tag = "2")]
630    pub nanoseconds: i32,
631}
632#[derive(Clone, PartialEq, ::prost::Message)]
633pub struct ModelMessage {
634    #[prost(oneof = "model_message::Kind", tags = "1, 2")]
635    pub kind: ::core::option::Option<model_message::Kind>,
636}
637/// Nested message and enum types in `ModelMessage`.
638pub mod model_message {
639    #[derive(Clone, PartialEq, ::prost::Oneof)]
640    pub enum Kind {
641        #[prost(message, tag = "1")]
642        User(super::UserModelMessage),
643        #[prost(message, tag = "2")]
644        Assistant(super::AssistantModelMessage),
645    }
646}
647#[derive(Clone, PartialEq, ::prost::Message)]
648pub struct UserModelMessage {
649    #[prost(message, repeated, tag = "1")]
650    pub text: ::prost::alloc::vec::Vec<UserContentPart>,
651}
652#[derive(Clone, PartialEq, ::prost::Message)]
653pub struct AssistantModelMessage {
654    #[prost(message, repeated, tag = "1")]
655    pub content_parts: ::prost::alloc::vec::Vec<AssistantContentPart>,
656}
657#[derive(Clone, PartialEq, ::prost::Message)]
658pub struct UserContentPart {
659    #[prost(oneof = "user_content_part::Part", tags = "1, 2")]
660    pub part: ::core::option::Option<user_content_part::Part>,
661}
662/// Nested message and enum types in `UserContentPart`.
663pub mod user_content_part {
664    #[derive(Clone, PartialEq, ::prost::Oneof)]
665    pub enum Part {
666        #[prost(message, tag = "1")]
667        Text(super::TextPart),
668        #[prost(message, tag = "2")]
669        Image(super::ImagePart),
670    }
671}
672#[derive(Clone, PartialEq, ::prost::Message)]
673pub struct AssistantContentPart {
674    #[prost(oneof = "assistant_content_part::Part", tags = "1, 2")]
675    pub part: ::core::option::Option<assistant_content_part::Part>,
676}
677/// Nested message and enum types in `AssistantContentPart`.
678pub mod assistant_content_part {
679    #[derive(Clone, PartialEq, ::prost::Oneof)]
680    pub enum Part {
681        #[prost(message, tag = "1")]
682        Text(super::TextPart),
683        #[prost(message, tag = "2")]
684        Reasoning(super::ReasoningPart),
685    }
686}
687#[derive(Clone, PartialEq, ::prost::Message)]
688pub struct TextPart {
689    #[prost(string, tag = "1")]
690    pub text: ::prost::alloc::string::String,
691}
692#[derive(Clone, PartialEq, ::prost::Message)]
693pub struct ImagePart {
694    #[prost(string, tag = "2")]
695    pub media_type: ::prost::alloc::string::String,
696    #[prost(string, tag = "4")]
697    pub attachment_rid: ::prost::alloc::string::String,
698}
699#[derive(Clone, PartialEq, ::prost::Message)]
700pub struct ReasoningPart {
701    #[prost(string, tag = "1")]
702    pub reasoning: ::prost::alloc::string::String,
703    #[prost(double, optional, tag = "2")]
704    pub duration_s: ::core::option::Option<f64>,
705}
706#[derive(Clone, PartialEq, ::prost::Message)]
707pub struct StreamChatResponse {
708    #[prost(
709        oneof = "stream_chat_response::Response",
710        tags = "1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16"
711    )]
712    pub response: ::core::option::Option<stream_chat_response::Response>,
713}
714/// Nested message and enum types in `StreamChatResponse`.
715pub mod stream_chat_response {
716    #[derive(Clone, PartialEq, ::prost::Oneof)]
717    pub enum Response {
718        #[prost(message, tag = "1")]
719        Finish(super::Finish),
720        #[prost(message, tag = "2")]
721        Error(super::Error),
722        #[prost(message, tag = "3")]
723        TextStart(super::TextStart),
724        #[prost(message, tag = "4")]
725        TextDelta(super::TextDelta),
726        #[prost(message, tag = "5")]
727        TextEnd(super::TextEnd),
728        #[prost(message, tag = "6")]
729        ReasoningStart(super::ReasoningStart),
730        #[prost(message, tag = "7")]
731        ReasoningDelta(super::ReasoningDelta),
732        #[prost(message, tag = "8")]
733        ReasoningEnd(super::ReasoningEnd),
734        #[prost(message, tag = "10")]
735        ToolAction(super::ToolAction),
736        #[prost(message, tag = "11")]
737        ToolActionConfirmation(super::ToolActionConfirmation),
738        #[prost(message, tag = "12")]
739        StepStart(super::StepStart),
740        #[prost(message, tag = "13")]
741        StepEnd(super::StepEnd),
742        #[prost(message, tag = "14")]
743        ClientDirective(super::ClientDirective),
744        #[prost(message, tag = "15")]
745        CompactionNotice(super::CompactionNotice),
746        #[prost(message, tag = "16")]
747        StreamReset(super::StreamReset),
748    }
749}
750#[derive(Clone, Copy, PartialEq, ::prost::Message)]
751pub struct StreamReset {}
752#[derive(Clone, Copy, PartialEq, ::prost::Message)]
753pub struct StepStart {}
754#[derive(Clone, Copy, PartialEq, ::prost::Message)]
755pub struct StepEnd {}
756#[derive(Clone, Copy, PartialEq, ::prost::Message)]
757pub struct CompactionNotice {
758    #[prost(int32, tag = "1")]
759    pub tokens_before: i32,
760    #[prost(int32, tag = "2")]
761    pub estimated_checkpoint_tokens: i32,
762    #[prost(enumeration = "compaction_notice::Trigger", tag = "3")]
763    pub trigger: i32,
764}
765/// Nested message and enum types in `CompactionNotice`.
766pub mod compaction_notice {
767    #[derive(
768        Clone,
769        Copy,
770        Debug,
771        PartialEq,
772        Eq,
773        Hash,
774        PartialOrd,
775        Ord,
776        ::prost::Enumeration
777    )]
778    #[repr(i32)]
779    pub enum Trigger {
780        Unspecified = 0,
781        PreTurn = 1,
782        MidRun = 2,
783    }
784    impl Trigger {
785        /// String value of the enum field names used in the ProtoBuf definition.
786        ///
787        /// The values are not transformed in any way and thus are considered stable
788        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
789        pub fn as_str_name(&self) -> &'static str {
790            match self {
791                Self::Unspecified => "TRIGGER_UNSPECIFIED",
792                Self::PreTurn => "TRIGGER_PRE_TURN",
793                Self::MidRun => "TRIGGER_MID_RUN",
794            }
795        }
796        /// Creates an enum from field names used in the ProtoBuf definition.
797        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
798            match value {
799                "TRIGGER_UNSPECIFIED" => Some(Self::Unspecified),
800                "TRIGGER_PRE_TURN" => Some(Self::PreTurn),
801                "TRIGGER_MID_RUN" => Some(Self::MidRun),
802                _ => None,
803            }
804        }
805    }
806}
807#[derive(Clone, PartialEq, ::prost::Message)]
808pub struct ToolCallDescription {
809    #[prost(string, tag = "1")]
810    pub tool_call_id: ::prost::alloc::string::String,
811    #[prost(string, tag = "2")]
812    pub tool_name: ::prost::alloc::string::String,
813    #[prost(string, tag = "3")]
814    pub tool_args_json_string: ::prost::alloc::string::String,
815    #[prost(enumeration = "ToolCallStatus", tag = "4")]
816    pub status: i32,
817}
818#[derive(Clone, PartialEq, ::prost::Message)]
819pub struct UserQuestionCall {
820    #[prost(message, optional, tag = "1")]
821    pub tool_call: ::core::option::Option<ToolCallDescription>,
822    #[prost(uint32, tag = "2")]
823    pub current_question_index: u32,
824    #[prost(message, repeated, tag = "3")]
825    pub answers: ::prost::alloc::vec::Vec<UserQuestionAnswer>,
826    #[prost(enumeration = "UserQuestionState", tag = "4")]
827    pub state: i32,
828    #[prost(uint64, tag = "5")]
829    pub version: u64,
830}
831#[derive(Clone, PartialEq, ::prost::Message)]
832pub struct Finish {
833    #[prost(string, repeated, tag = "1")]
834    pub ordered_message_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
835    #[prost(string, optional, tag = "2")]
836    pub new_title: ::core::option::Option<::prost::alloc::string::String>,
837    #[prost(message, repeated, tag = "3")]
838    pub tool_approval_requests: ::prost::alloc::vec::Vec<ToolCallDescription>,
839    #[prost(message, optional, tag = "4")]
840    pub updated_context: ::core::option::Option<ContextStatus>,
841    #[prost(string, optional, tag = "5")]
842    pub turn_rid: ::core::option::Option<::prost::alloc::string::String>,
843    #[prost(message, repeated, tag = "6")]
844    pub user_question_calls: ::prost::alloc::vec::Vec<UserQuestionCall>,
845    #[prost(double, optional, tag = "7")]
846    pub duration_s: ::core::option::Option<f64>,
847}
848#[derive(Clone, PartialEq, ::prost::Message)]
849pub struct Error {
850    #[prost(string, tag = "1")]
851    pub message: ::prost::alloc::string::String,
852}
853#[derive(Clone, PartialEq, ::prost::Message)]
854pub struct TextStart {
855    #[prost(string, tag = "1")]
856    pub id: ::prost::alloc::string::String,
857}
858#[derive(Clone, PartialEq, ::prost::Message)]
859pub struct TextDelta {
860    #[prost(string, tag = "1")]
861    pub id: ::prost::alloc::string::String,
862    #[prost(string, tag = "2")]
863    pub delta: ::prost::alloc::string::String,
864}
865#[derive(Clone, PartialEq, ::prost::Message)]
866pub struct TextEnd {
867    #[prost(string, tag = "1")]
868    pub id: ::prost::alloc::string::String,
869}
870#[derive(Clone, PartialEq, ::prost::Message)]
871pub struct ReasoningStart {
872    #[prost(string, tag = "1")]
873    pub id: ::prost::alloc::string::String,
874}
875#[derive(Clone, PartialEq, ::prost::Message)]
876pub struct ReasoningDelta {
877    #[prost(string, tag = "1")]
878    pub id: ::prost::alloc::string::String,
879    #[prost(string, tag = "2")]
880    pub delta: ::prost::alloc::string::String,
881}
882#[derive(Clone, PartialEq, ::prost::Message)]
883pub struct ReasoningEnd {
884    #[prost(string, tag = "1")]
885    pub id: ::prost::alloc::string::String,
886    #[prost(double, tag = "2")]
887    pub duration_s: f64,
888}
889#[derive(Clone, PartialEq, ::prost::Message)]
890pub struct ToolAction {
891    #[prost(string, tag = "2")]
892    pub tool_action_verb: ::prost::alloc::string::String,
893    #[prost(string, optional, tag = "3")]
894    pub tool_target: ::core::option::Option<::prost::alloc::string::String>,
895    #[prost(message, optional, tag = "5")]
896    pub tool_call_description: ::core::option::Option<ToolCallDescription>,
897    #[deprecated]
898    #[prost(string, tag = "1")]
899    pub id: ::prost::alloc::string::String,
900    #[deprecated]
901    #[prost(string, tag = "4")]
902    pub tool_name: ::prost::alloc::string::String,
903}
904#[derive(Clone, PartialEq, ::prost::Message)]
905pub struct ToolActionConfirmation {
906    #[prost(string, tag = "1")]
907    pub id: ::prost::alloc::string::String,
908    #[prost(double, optional, tag = "4")]
909    pub duration_s: ::core::option::Option<f64>,
910    #[prost(oneof = "tool_action_confirmation::Outcome", tags = "2, 3")]
911    pub outcome: ::core::option::Option<tool_action_confirmation::Outcome>,
912}
913/// Nested message and enum types in `ToolActionConfirmation`.
914pub mod tool_action_confirmation {
915    #[derive(Clone, PartialEq, ::prost::Oneof)]
916    pub enum Outcome {
917        #[prost(message, tag = "2")]
918        Success(super::ToolActionSuccess),
919        #[prost(message, tag = "3")]
920        Failure(super::ToolActionFailure),
921    }
922}
923#[derive(Clone, PartialEq, ::prost::Message)]
924pub struct ToolActionSuccess {
925    #[prost(string, tag = "1")]
926    pub tool_success_message: ::prost::alloc::string::String,
927}
928#[derive(Clone, PartialEq, ::prost::Message)]
929pub struct ToolActionFailure {
930    #[prost(string, tag = "1")]
931    pub tool_error_message: ::prost::alloc::string::String,
932}
933#[derive(Clone, PartialEq, ::prost::Message)]
934pub struct ClientDirective {
935    #[prost(oneof = "client_directive::Version", tags = "1")]
936    pub version: ::core::option::Option<client_directive::Version>,
937}
938/// Nested message and enum types in `ClientDirective`.
939pub mod client_directive {
940    #[derive(Clone, PartialEq, ::prost::Oneof)]
941    pub enum Version {
942        #[prost(message, tag = "1")]
943        V1(super::ClientDirectiveV1),
944    }
945}
946#[derive(Clone, PartialEq, ::prost::Message)]
947pub struct ClientDirectiveV1 {
948    #[prost(string, tag = "1")]
949    pub id: ::prost::alloc::string::String,
950    #[prost(oneof = "client_directive_v1::Kind", tags = "2, 3")]
951    pub kind: ::core::option::Option<client_directive_v1::Kind>,
952}
953/// Nested message and enum types in `ClientDirectiveV1`.
954pub mod client_directive_v1 {
955    #[derive(Clone, PartialEq, ::prost::Oneof)]
956    pub enum Kind {
957        #[prost(message, tag = "2")]
958        ResourceEdited(super::ResourceEditedDirective),
959        #[prost(message, tag = "3")]
960        SetTimeRange(super::SetTimeRangeDirective),
961    }
962}
963#[derive(Clone, PartialEq, ::prost::Message)]
964pub struct ResourceEditedDirective {
965    #[prost(oneof = "resource_edited_directive::Resource", tags = "1, 2, 3")]
966    pub resource: ::core::option::Option<resource_edited_directive::Resource>,
967}
968/// Nested message and enum types in `ResourceEditedDirective`.
969pub mod resource_edited_directive {
970    #[derive(Clone, PartialEq, ::prost::Oneof)]
971    pub enum Resource {
972        #[prost(message, tag = "1")]
973        Checklist(super::ChecklistEdited),
974        #[prost(message, tag = "2")]
975        Template(super::TemplateEdited),
976        #[prost(message, tag = "3")]
977        Workbook(super::WorkbookEdited),
978    }
979}
980#[derive(Clone, PartialEq, ::prost::Message)]
981pub struct ChecklistEdited {
982    #[prost(string, tag = "1")]
983    pub checklist_rid: ::prost::alloc::string::String,
984    #[prost(string, tag = "2")]
985    pub branch_name: ::prost::alloc::string::String,
986    #[prost(string, optional, tag = "3")]
987    pub check_id: ::core::option::Option<::prost::alloc::string::String>,
988    #[prost(string, optional, tag = "4")]
989    pub commit_id: ::core::option::Option<::prost::alloc::string::String>,
990    #[prost(message, optional, tag = "5")]
991    pub committed_at: ::core::option::Option<
992        super::super::super::google::protobuf::Timestamp,
993    >,
994}
995#[derive(Clone, PartialEq, ::prost::Message)]
996pub struct TemplateEdited {
997    #[prost(string, tag = "1")]
998    pub template_rid: ::prost::alloc::string::String,
999    #[prost(string, tag = "2")]
1000    pub branch_name: ::prost::alloc::string::String,
1001    #[prost(string, optional, tag = "3")]
1002    pub commit_id: ::core::option::Option<::prost::alloc::string::String>,
1003    #[prost(message, optional, tag = "4")]
1004    pub committed_at: ::core::option::Option<
1005        super::super::super::google::protobuf::Timestamp,
1006    >,
1007}
1008#[derive(Clone, PartialEq, ::prost::Message)]
1009pub struct WorkbookEdited {
1010    #[prost(string, tag = "1")]
1011    pub workbook_rid: ::prost::alloc::string::String,
1012}
1013#[derive(Clone, PartialEq, ::prost::Message)]
1014pub struct SetTimeRangeDirective {
1015    #[prost(string, tag = "1")]
1016    pub workbook_rid: ::prost::alloc::string::String,
1017    #[prost(message, optional, tag = "2")]
1018    pub start: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
1019    #[prost(message, optional, tag = "3")]
1020    pub end: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
1021    #[prost(enumeration = "TimeRangeType", tag = "4")]
1022    pub time_range_type: i32,
1023}
1024#[derive(Clone, PartialEq, ::prost::Message)]
1025pub struct ResourceMarkup {
1026    #[prost(oneof = "resource_markup::Kind", tags = "1, 2")]
1027    pub kind: ::core::option::Option<resource_markup::Kind>,
1028}
1029/// Nested message and enum types in `ResourceMarkup`.
1030pub mod resource_markup {
1031    #[derive(Clone, PartialEq, ::prost::Oneof)]
1032    pub enum Kind {
1033        #[prost(message, tag = "1")]
1034        Rid(super::RidResourceMarkup),
1035        #[prost(message, tag = "2")]
1036        RidList(super::RidListResourceMarkup),
1037    }
1038}
1039#[derive(Clone, PartialEq, ::prost::Message)]
1040pub struct RidResourceMarkup {
1041    #[prost(string, tag = "1")]
1042    pub rid: ::prost::alloc::string::String,
1043    #[prost(string, optional, tag = "2")]
1044    pub label: ::core::option::Option<::prost::alloc::string::String>,
1045}
1046#[derive(Clone, PartialEq, ::prost::Message)]
1047pub struct RidListResourceMarkup {
1048    #[prost(string, repeated, tag = "1")]
1049    pub rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1050    #[prost(string, optional, tag = "2")]
1051    pub label: ::core::option::Option<::prost::alloc::string::String>,
1052}
1053#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1054pub struct ContextStatus {
1055    #[prost(int32, tag = "1")]
1056    pub curr_token_count: i32,
1057    #[prost(int32, tag = "2")]
1058    pub model_context_limit: i32,
1059}
1060#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1061#[repr(i32)]
1062pub enum QueuedMessageState {
1063    Unspecified = 0,
1064    Queued = 1,
1065    Dispatching = 2,
1066    Failed = 3,
1067}
1068impl QueuedMessageState {
1069    /// String value of the enum field names used in the ProtoBuf definition.
1070    ///
1071    /// The values are not transformed in any way and thus are considered stable
1072    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1073    pub fn as_str_name(&self) -> &'static str {
1074        match self {
1075            Self::Unspecified => "QUEUED_MESSAGE_STATE_UNSPECIFIED",
1076            Self::Queued => "QUEUED_MESSAGE_STATE_QUEUED",
1077            Self::Dispatching => "QUEUED_MESSAGE_STATE_DISPATCHING",
1078            Self::Failed => "QUEUED_MESSAGE_STATE_FAILED",
1079        }
1080    }
1081    /// Creates an enum from field names used in the ProtoBuf definition.
1082    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1083        match value {
1084            "QUEUED_MESSAGE_STATE_UNSPECIFIED" => Some(Self::Unspecified),
1085            "QUEUED_MESSAGE_STATE_QUEUED" => Some(Self::Queued),
1086            "QUEUED_MESSAGE_STATE_DISPATCHING" => Some(Self::Dispatching),
1087            "QUEUED_MESSAGE_STATE_FAILED" => Some(Self::Failed),
1088            _ => None,
1089        }
1090    }
1091}
1092#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1093#[repr(i32)]
1094pub enum FeedbackVote {
1095    Unspecified = 0,
1096    ThumbsUp = 1,
1097    ThumbsDown = 2,
1098}
1099impl FeedbackVote {
1100    /// String value of the enum field names used in the ProtoBuf definition.
1101    ///
1102    /// The values are not transformed in any way and thus are considered stable
1103    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1104    pub fn as_str_name(&self) -> &'static str {
1105        match self {
1106            Self::Unspecified => "FEEDBACK_VOTE_UNSPECIFIED",
1107            Self::ThumbsUp => "FEEDBACK_VOTE_THUMBS_UP",
1108            Self::ThumbsDown => "FEEDBACK_VOTE_THUMBS_DOWN",
1109        }
1110    }
1111    /// Creates an enum from field names used in the ProtoBuf definition.
1112    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1113        match value {
1114            "FEEDBACK_VOTE_UNSPECIFIED" => Some(Self::Unspecified),
1115            "FEEDBACK_VOTE_THUMBS_UP" => Some(Self::ThumbsUp),
1116            "FEEDBACK_VOTE_THUMBS_DOWN" => Some(Self::ThumbsDown),
1117            _ => None,
1118        }
1119    }
1120}
1121#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1122#[repr(i32)]
1123pub enum AgentRunExecutionMode {
1124    Unspecified = 0,
1125    Inline = 1,
1126    Durable = 2,
1127}
1128impl AgentRunExecutionMode {
1129    /// String value of the enum field names used in the ProtoBuf definition.
1130    ///
1131    /// The values are not transformed in any way and thus are considered stable
1132    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1133    pub fn as_str_name(&self) -> &'static str {
1134        match self {
1135            Self::Unspecified => "AGENT_RUN_EXECUTION_MODE_UNSPECIFIED",
1136            Self::Inline => "AGENT_RUN_EXECUTION_MODE_INLINE",
1137            Self::Durable => "AGENT_RUN_EXECUTION_MODE_DURABLE",
1138        }
1139    }
1140    /// Creates an enum from field names used in the ProtoBuf definition.
1141    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1142        match value {
1143            "AGENT_RUN_EXECUTION_MODE_UNSPECIFIED" => Some(Self::Unspecified),
1144            "AGENT_RUN_EXECUTION_MODE_INLINE" => Some(Self::Inline),
1145            "AGENT_RUN_EXECUTION_MODE_DURABLE" => Some(Self::Durable),
1146            _ => None,
1147        }
1148    }
1149}
1150#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1151#[repr(i32)]
1152pub enum ToolCallStatus {
1153    Unspecified = 0,
1154    Approved = 1,
1155    Denied = 2,
1156    AwaitingApproval = 3,
1157}
1158impl ToolCallStatus {
1159    /// String value of the enum field names used in the ProtoBuf definition.
1160    ///
1161    /// The values are not transformed in any way and thus are considered stable
1162    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1163    pub fn as_str_name(&self) -> &'static str {
1164        match self {
1165            Self::Unspecified => "TOOL_CALL_STATUS_UNSPECIFIED",
1166            Self::Approved => "TOOL_CALL_STATUS_APPROVED",
1167            Self::Denied => "TOOL_CALL_STATUS_DENIED",
1168            Self::AwaitingApproval => "TOOL_CALL_STATUS_AWAITING_APPROVAL",
1169        }
1170    }
1171    /// Creates an enum from field names used in the ProtoBuf definition.
1172    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1173        match value {
1174            "TOOL_CALL_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
1175            "TOOL_CALL_STATUS_APPROVED" => Some(Self::Approved),
1176            "TOOL_CALL_STATUS_DENIED" => Some(Self::Denied),
1177            "TOOL_CALL_STATUS_AWAITING_APPROVAL" => Some(Self::AwaitingApproval),
1178            _ => None,
1179        }
1180    }
1181}
1182#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1183#[repr(i32)]
1184pub enum UserQuestionState {
1185    Unspecified = 0,
1186    Pending = 1,
1187    Answered = 2,
1188    Declined = 3,
1189}
1190impl UserQuestionState {
1191    /// String value of the enum field names used in the ProtoBuf definition.
1192    ///
1193    /// The values are not transformed in any way and thus are considered stable
1194    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1195    pub fn as_str_name(&self) -> &'static str {
1196        match self {
1197            Self::Unspecified => "USER_QUESTION_STATE_UNSPECIFIED",
1198            Self::Pending => "USER_QUESTION_STATE_PENDING",
1199            Self::Answered => "USER_QUESTION_STATE_ANSWERED",
1200            Self::Declined => "USER_QUESTION_STATE_DECLINED",
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            "USER_QUESTION_STATE_UNSPECIFIED" => Some(Self::Unspecified),
1207            "USER_QUESTION_STATE_PENDING" => Some(Self::Pending),
1208            "USER_QUESTION_STATE_ANSWERED" => Some(Self::Answered),
1209            "USER_QUESTION_STATE_DECLINED" => Some(Self::Declined),
1210            _ => None,
1211        }
1212    }
1213}
1214#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1215#[repr(i32)]
1216pub enum TimeRangeType {
1217    Unspecified = 0,
1218    Absolute = 1,
1219    Relative = 2,
1220}
1221impl TimeRangeType {
1222    /// String value of the enum field names used in the ProtoBuf definition.
1223    ///
1224    /// The values are not transformed in any way and thus are considered stable
1225    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1226    pub fn as_str_name(&self) -> &'static str {
1227        match self {
1228            Self::Unspecified => "TIME_RANGE_TYPE_UNSPECIFIED",
1229            Self::Absolute => "TIME_RANGE_TYPE_ABSOLUTE",
1230            Self::Relative => "TIME_RANGE_TYPE_RELATIVE",
1231        }
1232    }
1233    /// Creates an enum from field names used in the ProtoBuf definition.
1234    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1235        match value {
1236            "TIME_RANGE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
1237            "TIME_RANGE_TYPE_ABSOLUTE" => Some(Self::Absolute),
1238            "TIME_RANGE_TYPE_RELATIVE" => Some(Self::Relative),
1239            _ => None,
1240        }
1241    }
1242}
1243/// Generated client implementations.
1244pub mod ai_agent_service_client {
1245    #![allow(
1246        unused_variables,
1247        dead_code,
1248        missing_docs,
1249        clippy::wildcard_imports,
1250        clippy::let_unit_value,
1251    )]
1252    use tonic::codegen::*;
1253    use tonic::codegen::http::Uri;
1254    #[derive(Debug, Clone)]
1255    pub struct AiAgentServiceClient<T> {
1256        inner: tonic::client::Grpc<T>,
1257    }
1258    impl AiAgentServiceClient<tonic::transport::Channel> {
1259        /// Attempt to create a new client by connecting to a given endpoint.
1260        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1261        where
1262            D: TryInto<tonic::transport::Endpoint>,
1263            D::Error: Into<StdError>,
1264        {
1265            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1266            Ok(Self::new(conn))
1267        }
1268    }
1269    impl<T> AiAgentServiceClient<T>
1270    where
1271        T: tonic::client::GrpcService<tonic::body::Body>,
1272        T::Error: Into<StdError>,
1273        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1274        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1275    {
1276        pub fn new(inner: T) -> Self {
1277            let inner = tonic::client::Grpc::new(inner);
1278            Self { inner }
1279        }
1280        pub fn with_origin(inner: T, origin: Uri) -> Self {
1281            let inner = tonic::client::Grpc::with_origin(inner, origin);
1282            Self { inner }
1283        }
1284        pub fn with_interceptor<F>(
1285            inner: T,
1286            interceptor: F,
1287        ) -> AiAgentServiceClient<InterceptedService<T, F>>
1288        where
1289            F: tonic::service::Interceptor,
1290            T::ResponseBody: Default,
1291            T: tonic::codegen::Service<
1292                http::Request<tonic::body::Body>,
1293                Response = http::Response<
1294                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
1295                >,
1296            >,
1297            <T as tonic::codegen::Service<
1298                http::Request<tonic::body::Body>,
1299            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1300        {
1301            AiAgentServiceClient::new(InterceptedService::new(inner, interceptor))
1302        }
1303        /// Compress requests with the given encoding.
1304        ///
1305        /// This requires the server to support it otherwise it might respond with an
1306        /// error.
1307        #[must_use]
1308        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1309            self.inner = self.inner.send_compressed(encoding);
1310            self
1311        }
1312        /// Enable decompressing responses.
1313        #[must_use]
1314        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1315            self.inner = self.inner.accept_compressed(encoding);
1316            self
1317        }
1318        /// Limits the maximum size of a decoded message.
1319        ///
1320        /// Default: `4MB`
1321        #[must_use]
1322        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1323            self.inner = self.inner.max_decoding_message_size(limit);
1324            self
1325        }
1326        /// Limits the maximum size of an encoded message.
1327        ///
1328        /// Default: `usize::MAX`
1329        #[must_use]
1330        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1331            self.inner = self.inner.max_encoding_message_size(limit);
1332            self
1333        }
1334        pub async fn list_models(
1335            &mut self,
1336            request: impl tonic::IntoRequest<super::ListModelsRequest>,
1337        ) -> std::result::Result<
1338            tonic::Response<super::ListModelsResponse>,
1339            tonic::Status,
1340        > {
1341            self.inner
1342                .ready()
1343                .await
1344                .map_err(|e| {
1345                    tonic::Status::unknown(
1346                        format!("Service was not ready: {}", e.into()),
1347                    )
1348                })?;
1349            let codec = tonic::codec::ProstCodec::default();
1350            let path = http::uri::PathAndQuery::from_static(
1351                "/nominal.ai.v1.AIAgentService/ListModels",
1352            );
1353            let mut req = request.into_request();
1354            req.extensions_mut()
1355                .insert(GrpcMethod::new("nominal.ai.v1.AIAgentService", "ListModels"));
1356            self.inner.unary(req, path, codec).await
1357        }
1358        pub async fn stream_chat(
1359            &mut self,
1360            request: impl tonic::IntoRequest<super::StreamChatRequest>,
1361        ) -> std::result::Result<
1362            tonic::Response<tonic::codec::Streaming<super::StreamChatResponse>>,
1363            tonic::Status,
1364        > {
1365            self.inner
1366                .ready()
1367                .await
1368                .map_err(|e| {
1369                    tonic::Status::unknown(
1370                        format!("Service was not ready: {}", e.into()),
1371                    )
1372                })?;
1373            let codec = tonic::codec::ProstCodec::default();
1374            let path = http::uri::PathAndQuery::from_static(
1375                "/nominal.ai.v1.AIAgentService/StreamChat",
1376            );
1377            let mut req = request.into_request();
1378            req.extensions_mut()
1379                .insert(GrpcMethod::new("nominal.ai.v1.AIAgentService", "StreamChat"));
1380            self.inner.server_streaming(req, path, codec).await
1381        }
1382        #[deprecated]
1383        pub async fn get_conversation(
1384            &mut self,
1385            request: impl tonic::IntoRequest<super::GetConversationRequest>,
1386        ) -> std::result::Result<
1387            tonic::Response<super::GetConversationResponse>,
1388            tonic::Status,
1389        > {
1390            self.inner
1391                .ready()
1392                .await
1393                .map_err(|e| {
1394                    tonic::Status::unknown(
1395                        format!("Service was not ready: {}", e.into()),
1396                    )
1397                })?;
1398            let codec = tonic::codec::ProstCodec::default();
1399            let path = http::uri::PathAndQuery::from_static(
1400                "/nominal.ai.v1.AIAgentService/GetConversation",
1401            );
1402            let mut req = request.into_request();
1403            req.extensions_mut()
1404                .insert(
1405                    GrpcMethod::new("nominal.ai.v1.AIAgentService", "GetConversation"),
1406                );
1407            self.inner.unary(req, path, codec).await
1408        }
1409        pub async fn get_conversation_metadata(
1410            &mut self,
1411            request: impl tonic::IntoRequest<super::GetConversationMetadataRequest>,
1412        ) -> std::result::Result<
1413            tonic::Response<super::GetConversationMetadataResponse>,
1414            tonic::Status,
1415        > {
1416            self.inner
1417                .ready()
1418                .await
1419                .map_err(|e| {
1420                    tonic::Status::unknown(
1421                        format!("Service was not ready: {}", e.into()),
1422                    )
1423                })?;
1424            let codec = tonic::codec::ProstCodec::default();
1425            let path = http::uri::PathAndQuery::from_static(
1426                "/nominal.ai.v1.AIAgentService/GetConversationMetadata",
1427            );
1428            let mut req = request.into_request();
1429            req.extensions_mut()
1430                .insert(
1431                    GrpcMethod::new(
1432                        "nominal.ai.v1.AIAgentService",
1433                        "GetConversationMetadata",
1434                    ),
1435                );
1436            self.inner.unary(req, path, codec).await
1437        }
1438        pub async fn get_conversation_messages(
1439            &mut self,
1440            request: impl tonic::IntoRequest<super::GetConversationMessagesRequest>,
1441        ) -> std::result::Result<
1442            tonic::Response<super::GetConversationMessagesResponse>,
1443            tonic::Status,
1444        > {
1445            self.inner
1446                .ready()
1447                .await
1448                .map_err(|e| {
1449                    tonic::Status::unknown(
1450                        format!("Service was not ready: {}", e.into()),
1451                    )
1452                })?;
1453            let codec = tonic::codec::ProstCodec::default();
1454            let path = http::uri::PathAndQuery::from_static(
1455                "/nominal.ai.v1.AIAgentService/GetConversationMessages",
1456            );
1457            let mut req = request.into_request();
1458            req.extensions_mut()
1459                .insert(
1460                    GrpcMethod::new(
1461                        "nominal.ai.v1.AIAgentService",
1462                        "GetConversationMessages",
1463                    ),
1464                );
1465            self.inner.unary(req, path, codec).await
1466        }
1467        pub async fn list_conversations(
1468            &mut self,
1469            request: impl tonic::IntoRequest<super::ListConversationsRequest>,
1470        ) -> std::result::Result<
1471            tonic::Response<super::ListConversationsResponse>,
1472            tonic::Status,
1473        > {
1474            self.inner
1475                .ready()
1476                .await
1477                .map_err(|e| {
1478                    tonic::Status::unknown(
1479                        format!("Service was not ready: {}", e.into()),
1480                    )
1481                })?;
1482            let codec = tonic::codec::ProstCodec::default();
1483            let path = http::uri::PathAndQuery::from_static(
1484                "/nominal.ai.v1.AIAgentService/ListConversations",
1485            );
1486            let mut req = request.into_request();
1487            req.extensions_mut()
1488                .insert(
1489                    GrpcMethod::new("nominal.ai.v1.AIAgentService", "ListConversations"),
1490                );
1491            self.inner.unary(req, path, codec).await
1492        }
1493        pub async fn batch_get_conversation_active_runs(
1494            &mut self,
1495            request: impl tonic::IntoRequest<
1496                super::BatchGetConversationActiveRunsRequest,
1497            >,
1498        ) -> std::result::Result<
1499            tonic::Response<super::BatchGetConversationActiveRunsResponse>,
1500            tonic::Status,
1501        > {
1502            self.inner
1503                .ready()
1504                .await
1505                .map_err(|e| {
1506                    tonic::Status::unknown(
1507                        format!("Service was not ready: {}", e.into()),
1508                    )
1509                })?;
1510            let codec = tonic::codec::ProstCodec::default();
1511            let path = http::uri::PathAndQuery::from_static(
1512                "/nominal.ai.v1.AIAgentService/BatchGetConversationActiveRuns",
1513            );
1514            let mut req = request.into_request();
1515            req.extensions_mut()
1516                .insert(
1517                    GrpcMethod::new(
1518                        "nominal.ai.v1.AIAgentService",
1519                        "BatchGetConversationActiveRuns",
1520                    ),
1521                );
1522            self.inner.unary(req, path, codec).await
1523        }
1524        pub async fn create_conversation(
1525            &mut self,
1526            request: impl tonic::IntoRequest<super::CreateConversationRequest>,
1527        ) -> std::result::Result<
1528            tonic::Response<super::CreateConversationResponse>,
1529            tonic::Status,
1530        > {
1531            self.inner
1532                .ready()
1533                .await
1534                .map_err(|e| {
1535                    tonic::Status::unknown(
1536                        format!("Service was not ready: {}", e.into()),
1537                    )
1538                })?;
1539            let codec = tonic::codec::ProstCodec::default();
1540            let path = http::uri::PathAndQuery::from_static(
1541                "/nominal.ai.v1.AIAgentService/CreateConversation",
1542            );
1543            let mut req = request.into_request();
1544            req.extensions_mut()
1545                .insert(
1546                    GrpcMethod::new("nominal.ai.v1.AIAgentService", "CreateConversation"),
1547                );
1548            self.inner.unary(req, path, codec).await
1549        }
1550        pub async fn update_conversation_metadata(
1551            &mut self,
1552            request: impl tonic::IntoRequest<super::UpdateConversationMetadataRequest>,
1553        ) -> std::result::Result<
1554            tonic::Response<super::UpdateConversationMetadataResponse>,
1555            tonic::Status,
1556        > {
1557            self.inner
1558                .ready()
1559                .await
1560                .map_err(|e| {
1561                    tonic::Status::unknown(
1562                        format!("Service was not ready: {}", e.into()),
1563                    )
1564                })?;
1565            let codec = tonic::codec::ProstCodec::default();
1566            let path = http::uri::PathAndQuery::from_static(
1567                "/nominal.ai.v1.AIAgentService/UpdateConversationMetadata",
1568            );
1569            let mut req = request.into_request();
1570            req.extensions_mut()
1571                .insert(
1572                    GrpcMethod::new(
1573                        "nominal.ai.v1.AIAgentService",
1574                        "UpdateConversationMetadata",
1575                    ),
1576                );
1577            self.inner.unary(req, path, codec).await
1578        }
1579        pub async fn delete_conversation(
1580            &mut self,
1581            request: impl tonic::IntoRequest<super::DeleteConversationRequest>,
1582        ) -> std::result::Result<
1583            tonic::Response<super::DeleteConversationResponse>,
1584            tonic::Status,
1585        > {
1586            self.inner
1587                .ready()
1588                .await
1589                .map_err(|e| {
1590                    tonic::Status::unknown(
1591                        format!("Service was not ready: {}", e.into()),
1592                    )
1593                })?;
1594            let codec = tonic::codec::ProstCodec::default();
1595            let path = http::uri::PathAndQuery::from_static(
1596                "/nominal.ai.v1.AIAgentService/DeleteConversation",
1597            );
1598            let mut req = request.into_request();
1599            req.extensions_mut()
1600                .insert(
1601                    GrpcMethod::new("nominal.ai.v1.AIAgentService", "DeleteConversation"),
1602                );
1603            self.inner.unary(req, path, codec).await
1604        }
1605        pub async fn archive_conversation(
1606            &mut self,
1607            request: impl tonic::IntoRequest<super::ArchiveConversationRequest>,
1608        ) -> std::result::Result<
1609            tonic::Response<super::ArchiveConversationResponse>,
1610            tonic::Status,
1611        > {
1612            self.inner
1613                .ready()
1614                .await
1615                .map_err(|e| {
1616                    tonic::Status::unknown(
1617                        format!("Service was not ready: {}", e.into()),
1618                    )
1619                })?;
1620            let codec = tonic::codec::ProstCodec::default();
1621            let path = http::uri::PathAndQuery::from_static(
1622                "/nominal.ai.v1.AIAgentService/ArchiveConversation",
1623            );
1624            let mut req = request.into_request();
1625            req.extensions_mut()
1626                .insert(
1627                    GrpcMethod::new(
1628                        "nominal.ai.v1.AIAgentService",
1629                        "ArchiveConversation",
1630                    ),
1631                );
1632            self.inner.unary(req, path, codec).await
1633        }
1634        pub async fn unarchive_conversation(
1635            &mut self,
1636            request: impl tonic::IntoRequest<super::UnarchiveConversationRequest>,
1637        ) -> std::result::Result<
1638            tonic::Response<super::UnarchiveConversationResponse>,
1639            tonic::Status,
1640        > {
1641            self.inner
1642                .ready()
1643                .await
1644                .map_err(|e| {
1645                    tonic::Status::unknown(
1646                        format!("Service was not ready: {}", e.into()),
1647                    )
1648                })?;
1649            let codec = tonic::codec::ProstCodec::default();
1650            let path = http::uri::PathAndQuery::from_static(
1651                "/nominal.ai.v1.AIAgentService/UnarchiveConversation",
1652            );
1653            let mut req = request.into_request();
1654            req.extensions_mut()
1655                .insert(
1656                    GrpcMethod::new(
1657                        "nominal.ai.v1.AIAgentService",
1658                        "UnarchiveConversation",
1659                    ),
1660                );
1661            self.inner.unary(req, path, codec).await
1662        }
1663        pub async fn get_snapshot_rid_by_user_message_id(
1664            &mut self,
1665            request: impl tonic::IntoRequest<super::GetSnapshotRidByUserMessageIdRequest>,
1666        ) -> std::result::Result<
1667            tonic::Response<super::GetSnapshotRidByUserMessageIdResponse>,
1668            tonic::Status,
1669        > {
1670            self.inner
1671                .ready()
1672                .await
1673                .map_err(|e| {
1674                    tonic::Status::unknown(
1675                        format!("Service was not ready: {}", e.into()),
1676                    )
1677                })?;
1678            let codec = tonic::codec::ProstCodec::default();
1679            let path = http::uri::PathAndQuery::from_static(
1680                "/nominal.ai.v1.AIAgentService/GetSnapshotRidByUserMessageId",
1681            );
1682            let mut req = request.into_request();
1683            req.extensions_mut()
1684                .insert(
1685                    GrpcMethod::new(
1686                        "nominal.ai.v1.AIAgentService",
1687                        "GetSnapshotRidByUserMessageId",
1688                    ),
1689                );
1690            self.inner.unary(req, path, codec).await
1691        }
1692        pub async fn compact_conversation(
1693            &mut self,
1694            request: impl tonic::IntoRequest<super::CompactConversationRequest>,
1695        ) -> std::result::Result<
1696            tonic::Response<super::CompactConversationResponse>,
1697            tonic::Status,
1698        > {
1699            self.inner
1700                .ready()
1701                .await
1702                .map_err(|e| {
1703                    tonic::Status::unknown(
1704                        format!("Service was not ready: {}", e.into()),
1705                    )
1706                })?;
1707            let codec = tonic::codec::ProstCodec::default();
1708            let path = http::uri::PathAndQuery::from_static(
1709                "/nominal.ai.v1.AIAgentService/CompactConversation",
1710            );
1711            let mut req = request.into_request();
1712            req.extensions_mut()
1713                .insert(
1714                    GrpcMethod::new(
1715                        "nominal.ai.v1.AIAgentService",
1716                        "CompactConversation",
1717                    ),
1718                );
1719            self.inner.unary(req, path, codec).await
1720        }
1721        pub async fn submit_message_feedback(
1722            &mut self,
1723            request: impl tonic::IntoRequest<super::SubmitMessageFeedbackRequest>,
1724        ) -> std::result::Result<
1725            tonic::Response<super::SubmitMessageFeedbackResponse>,
1726            tonic::Status,
1727        > {
1728            self.inner
1729                .ready()
1730                .await
1731                .map_err(|e| {
1732                    tonic::Status::unknown(
1733                        format!("Service was not ready: {}", e.into()),
1734                    )
1735                })?;
1736            let codec = tonic::codec::ProstCodec::default();
1737            let path = http::uri::PathAndQuery::from_static(
1738                "/nominal.ai.v1.AIAgentService/SubmitMessageFeedback",
1739            );
1740            let mut req = request.into_request();
1741            req.extensions_mut()
1742                .insert(
1743                    GrpcMethod::new(
1744                        "nominal.ai.v1.AIAgentService",
1745                        "SubmitMessageFeedback",
1746                    ),
1747                );
1748            self.inner.unary(req, path, codec).await
1749        }
1750        pub async fn update_conversation_resources(
1751            &mut self,
1752            request: impl tonic::IntoRequest<super::UpdateConversationResourcesRequest>,
1753        ) -> std::result::Result<
1754            tonic::Response<super::UpdateConversationResourcesResponse>,
1755            tonic::Status,
1756        > {
1757            self.inner
1758                .ready()
1759                .await
1760                .map_err(|e| {
1761                    tonic::Status::unknown(
1762                        format!("Service was not ready: {}", e.into()),
1763                    )
1764                })?;
1765            let codec = tonic::codec::ProstCodec::default();
1766            let path = http::uri::PathAndQuery::from_static(
1767                "/nominal.ai.v1.AIAgentService/UpdateConversationResources",
1768            );
1769            let mut req = request.into_request();
1770            req.extensions_mut()
1771                .insert(
1772                    GrpcMethod::new(
1773                        "nominal.ai.v1.AIAgentService",
1774                        "UpdateConversationResources",
1775                    ),
1776                );
1777            self.inner.unary(req, path, codec).await
1778        }
1779        pub async fn create_queued_message(
1780            &mut self,
1781            request: impl tonic::IntoRequest<super::CreateQueuedMessageRequest>,
1782        ) -> std::result::Result<
1783            tonic::Response<super::CreateQueuedMessageResponse>,
1784            tonic::Status,
1785        > {
1786            self.inner
1787                .ready()
1788                .await
1789                .map_err(|e| {
1790                    tonic::Status::unknown(
1791                        format!("Service was not ready: {}", e.into()),
1792                    )
1793                })?;
1794            let codec = tonic::codec::ProstCodec::default();
1795            let path = http::uri::PathAndQuery::from_static(
1796                "/nominal.ai.v1.AIAgentService/CreateQueuedMessage",
1797            );
1798            let mut req = request.into_request();
1799            req.extensions_mut()
1800                .insert(
1801                    GrpcMethod::new(
1802                        "nominal.ai.v1.AIAgentService",
1803                        "CreateQueuedMessage",
1804                    ),
1805                );
1806            self.inner.unary(req, path, codec).await
1807        }
1808        pub async fn list_queued_messages(
1809            &mut self,
1810            request: impl tonic::IntoRequest<super::ListQueuedMessagesRequest>,
1811        ) -> std::result::Result<
1812            tonic::Response<super::ListQueuedMessagesResponse>,
1813            tonic::Status,
1814        > {
1815            self.inner
1816                .ready()
1817                .await
1818                .map_err(|e| {
1819                    tonic::Status::unknown(
1820                        format!("Service was not ready: {}", e.into()),
1821                    )
1822                })?;
1823            let codec = tonic::codec::ProstCodec::default();
1824            let path = http::uri::PathAndQuery::from_static(
1825                "/nominal.ai.v1.AIAgentService/ListQueuedMessages",
1826            );
1827            let mut req = request.into_request();
1828            req.extensions_mut()
1829                .insert(
1830                    GrpcMethod::new("nominal.ai.v1.AIAgentService", "ListQueuedMessages"),
1831                );
1832            self.inner.unary(req, path, codec).await
1833        }
1834        pub async fn delete_queued_message(
1835            &mut self,
1836            request: impl tonic::IntoRequest<super::DeleteQueuedMessageRequest>,
1837        ) -> std::result::Result<
1838            tonic::Response<super::DeleteQueuedMessageResponse>,
1839            tonic::Status,
1840        > {
1841            self.inner
1842                .ready()
1843                .await
1844                .map_err(|e| {
1845                    tonic::Status::unknown(
1846                        format!("Service was not ready: {}", e.into()),
1847                    )
1848                })?;
1849            let codec = tonic::codec::ProstCodec::default();
1850            let path = http::uri::PathAndQuery::from_static(
1851                "/nominal.ai.v1.AIAgentService/DeleteQueuedMessage",
1852            );
1853            let mut req = request.into_request();
1854            req.extensions_mut()
1855                .insert(
1856                    GrpcMethod::new(
1857                        "nominal.ai.v1.AIAgentService",
1858                        "DeleteQueuedMessage",
1859                    ),
1860                );
1861            self.inner.unary(req, path, codec).await
1862        }
1863        pub async fn cancel_agent_run(
1864            &mut self,
1865            request: impl tonic::IntoRequest<super::CancelAgentRunRequest>,
1866        ) -> std::result::Result<
1867            tonic::Response<super::CancelAgentRunResponse>,
1868            tonic::Status,
1869        > {
1870            self.inner
1871                .ready()
1872                .await
1873                .map_err(|e| {
1874                    tonic::Status::unknown(
1875                        format!("Service was not ready: {}", e.into()),
1876                    )
1877                })?;
1878            let codec = tonic::codec::ProstCodec::default();
1879            let path = http::uri::PathAndQuery::from_static(
1880                "/nominal.ai.v1.AIAgentService/CancelAgentRun",
1881            );
1882            let mut req = request.into_request();
1883            req.extensions_mut()
1884                .insert(
1885                    GrpcMethod::new("nominal.ai.v1.AIAgentService", "CancelAgentRun"),
1886                );
1887            self.inner.unary(req, path, codec).await
1888        }
1889    }
1890}
1891#[derive(Clone, PartialEq, ::prost::Message)]
1892pub struct ClassifyErrorRequest {
1893    #[prost(string, tag = "1")]
1894    pub error_message: ::prost::alloc::string::String,
1895}
1896#[derive(Clone, PartialEq, ::prost::Message)]
1897pub struct ClassifyErrorResponse {
1898    #[prost(enumeration = "ErrorClassification", tag = "1")]
1899    pub classification: i32,
1900    #[prost(string, tag = "2")]
1901    pub reason: ::prost::alloc::string::String,
1902}
1903#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1904#[repr(i32)]
1905pub enum ErrorClassification {
1906    Unspecified = 0,
1907    Client = 1,
1908    Server = 2,
1909}
1910impl ErrorClassification {
1911    /// String value of the enum field names used in the ProtoBuf definition.
1912    ///
1913    /// The values are not transformed in any way and thus are considered stable
1914    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1915    pub fn as_str_name(&self) -> &'static str {
1916        match self {
1917            Self::Unspecified => "ERROR_CLASSIFICATION_UNSPECIFIED",
1918            Self::Client => "ERROR_CLASSIFICATION_CLIENT",
1919            Self::Server => "ERROR_CLASSIFICATION_SERVER",
1920        }
1921    }
1922    /// Creates an enum from field names used in the ProtoBuf definition.
1923    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1924        match value {
1925            "ERROR_CLASSIFICATION_UNSPECIFIED" => Some(Self::Unspecified),
1926            "ERROR_CLASSIFICATION_CLIENT" => Some(Self::Client),
1927            "ERROR_CLASSIFICATION_SERVER" => Some(Self::Server),
1928            _ => None,
1929        }
1930    }
1931}
1932/// Generated client implementations.
1933pub mod data_ingestion_error_classifier_service_client {
1934    #![allow(
1935        unused_variables,
1936        dead_code,
1937        missing_docs,
1938        clippy::wildcard_imports,
1939        clippy::let_unit_value,
1940    )]
1941    use tonic::codegen::*;
1942    use tonic::codegen::http::Uri;
1943    #[derive(Debug, Clone)]
1944    pub struct DataIngestionErrorClassifierServiceClient<T> {
1945        inner: tonic::client::Grpc<T>,
1946    }
1947    impl DataIngestionErrorClassifierServiceClient<tonic::transport::Channel> {
1948        /// Attempt to create a new client by connecting to a given endpoint.
1949        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1950        where
1951            D: TryInto<tonic::transport::Endpoint>,
1952            D::Error: Into<StdError>,
1953        {
1954            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1955            Ok(Self::new(conn))
1956        }
1957    }
1958    impl<T> DataIngestionErrorClassifierServiceClient<T>
1959    where
1960        T: tonic::client::GrpcService<tonic::body::Body>,
1961        T::Error: Into<StdError>,
1962        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1963        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1964    {
1965        pub fn new(inner: T) -> Self {
1966            let inner = tonic::client::Grpc::new(inner);
1967            Self { inner }
1968        }
1969        pub fn with_origin(inner: T, origin: Uri) -> Self {
1970            let inner = tonic::client::Grpc::with_origin(inner, origin);
1971            Self { inner }
1972        }
1973        pub fn with_interceptor<F>(
1974            inner: T,
1975            interceptor: F,
1976        ) -> DataIngestionErrorClassifierServiceClient<InterceptedService<T, F>>
1977        where
1978            F: tonic::service::Interceptor,
1979            T::ResponseBody: Default,
1980            T: tonic::codegen::Service<
1981                http::Request<tonic::body::Body>,
1982                Response = http::Response<
1983                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
1984                >,
1985            >,
1986            <T as tonic::codegen::Service<
1987                http::Request<tonic::body::Body>,
1988            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1989        {
1990            DataIngestionErrorClassifierServiceClient::new(
1991                InterceptedService::new(inner, interceptor),
1992            )
1993        }
1994        /// Compress requests with the given encoding.
1995        ///
1996        /// This requires the server to support it otherwise it might respond with an
1997        /// error.
1998        #[must_use]
1999        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
2000            self.inner = self.inner.send_compressed(encoding);
2001            self
2002        }
2003        /// Enable decompressing responses.
2004        #[must_use]
2005        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
2006            self.inner = self.inner.accept_compressed(encoding);
2007            self
2008        }
2009        /// Limits the maximum size of a decoded message.
2010        ///
2011        /// Default: `4MB`
2012        #[must_use]
2013        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
2014            self.inner = self.inner.max_decoding_message_size(limit);
2015            self
2016        }
2017        /// Limits the maximum size of an encoded message.
2018        ///
2019        /// Default: `usize::MAX`
2020        #[must_use]
2021        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
2022            self.inner = self.inner.max_encoding_message_size(limit);
2023            self
2024        }
2025        pub async fn classify_error(
2026            &mut self,
2027            request: impl tonic::IntoRequest<super::ClassifyErrorRequest>,
2028        ) -> std::result::Result<
2029            tonic::Response<super::ClassifyErrorResponse>,
2030            tonic::Status,
2031        > {
2032            self.inner
2033                .ready()
2034                .await
2035                .map_err(|e| {
2036                    tonic::Status::unknown(
2037                        format!("Service was not ready: {}", e.into()),
2038                    )
2039                })?;
2040            let codec = tonic::codec::ProstCodec::default();
2041            let path = http::uri::PathAndQuery::from_static(
2042                "/nominal.ai.v1.DataIngestionErrorClassifierService/ClassifyError",
2043            );
2044            let mut req = request.into_request();
2045            req.extensions_mut()
2046                .insert(
2047                    GrpcMethod::new(
2048                        "nominal.ai.v1.DataIngestionErrorClassifierService",
2049                        "ClassifyError",
2050                    ),
2051                );
2052            self.inner.unary(req, path, codec).await
2053        }
2054    }
2055}
2056#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2057pub struct GetProviderStatusRequest {}
2058#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2059pub struct GetProviderStatusResponse {
2060    #[prost(message, optional, tag = "1")]
2061    pub timestamp: ::core::option::Option<
2062        super::super::super::google::protobuf::Timestamp,
2063    >,
2064    #[prost(message, optional, tag = "2")]
2065    pub last_status: ::core::option::Option<ProviderStatus>,
2066    #[deprecated]
2067    #[prost(message, optional, tag = "3")]
2068    pub aggregated_status_over_last_30m: ::core::option::Option<ProviderStatus>,
2069    #[prost(message, optional, tag = "4")]
2070    pub aggregated_status: ::core::option::Option<ProviderStatus>,
2071}
2072#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2073pub struct ProviderStatus {
2074    #[prost(oneof = "provider_status::Status", tags = "1, 2")]
2075    pub status: ::core::option::Option<provider_status::Status>,
2076}
2077/// Nested message and enum types in `ProviderStatus`.
2078pub mod provider_status {
2079    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
2080    pub enum Status {
2081        #[prost(message, tag = "1")]
2082        Healthy(super::Healthy),
2083        #[prost(message, tag = "2")]
2084        Degraded(super::Degraded),
2085    }
2086}
2087#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2088pub struct Healthy {}
2089#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2090pub struct Degraded {
2091    #[prost(enumeration = "DegradationReason", tag = "1")]
2092    pub reason: i32,
2093}
2094#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2095pub struct ProviderMetrics {
2096    #[prost(int32, tag = "1")]
2097    pub time_to_first_token_ms: i32,
2098    #[prost(int32, tag = "2")]
2099    pub total_time_ms: i32,
2100}
2101#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2102#[repr(i32)]
2103pub enum DegradationReason {
2104    Unspecified = 0,
2105    HighLatency = 1,
2106    Failures = 2,
2107    HighLatencyAndFailures = 3,
2108    Unavailable = 4,
2109}
2110impl DegradationReason {
2111    /// String value of the enum field names used in the ProtoBuf definition.
2112    ///
2113    /// The values are not transformed in any way and thus are considered stable
2114    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2115    pub fn as_str_name(&self) -> &'static str {
2116        match self {
2117            Self::Unspecified => "DEGRADATION_REASON_UNSPECIFIED",
2118            Self::HighLatency => "DEGRADATION_REASON_HIGH_LATENCY",
2119            Self::Failures => "DEGRADATION_REASON_FAILURES",
2120            Self::HighLatencyAndFailures => {
2121                "DEGRADATION_REASON_HIGH_LATENCY_AND_FAILURES"
2122            }
2123            Self::Unavailable => "DEGRADATION_REASON_UNAVAILABLE",
2124        }
2125    }
2126    /// Creates an enum from field names used in the ProtoBuf definition.
2127    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2128        match value {
2129            "DEGRADATION_REASON_UNSPECIFIED" => Some(Self::Unspecified),
2130            "DEGRADATION_REASON_HIGH_LATENCY" => Some(Self::HighLatency),
2131            "DEGRADATION_REASON_FAILURES" => Some(Self::Failures),
2132            "DEGRADATION_REASON_HIGH_LATENCY_AND_FAILURES" => {
2133                Some(Self::HighLatencyAndFailures)
2134            }
2135            "DEGRADATION_REASON_UNAVAILABLE" => Some(Self::Unavailable),
2136            _ => None,
2137        }
2138    }
2139}
2140/// Generated client implementations.
2141pub mod model_provider_health_service_client {
2142    #![allow(
2143        unused_variables,
2144        dead_code,
2145        missing_docs,
2146        clippy::wildcard_imports,
2147        clippy::let_unit_value,
2148    )]
2149    use tonic::codegen::*;
2150    use tonic::codegen::http::Uri;
2151    #[derive(Debug, Clone)]
2152    pub struct ModelProviderHealthServiceClient<T> {
2153        inner: tonic::client::Grpc<T>,
2154    }
2155    impl ModelProviderHealthServiceClient<tonic::transport::Channel> {
2156        /// Attempt to create a new client by connecting to a given endpoint.
2157        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
2158        where
2159            D: TryInto<tonic::transport::Endpoint>,
2160            D::Error: Into<StdError>,
2161        {
2162            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
2163            Ok(Self::new(conn))
2164        }
2165    }
2166    impl<T> ModelProviderHealthServiceClient<T>
2167    where
2168        T: tonic::client::GrpcService<tonic::body::Body>,
2169        T::Error: Into<StdError>,
2170        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
2171        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
2172    {
2173        pub fn new(inner: T) -> Self {
2174            let inner = tonic::client::Grpc::new(inner);
2175            Self { inner }
2176        }
2177        pub fn with_origin(inner: T, origin: Uri) -> Self {
2178            let inner = tonic::client::Grpc::with_origin(inner, origin);
2179            Self { inner }
2180        }
2181        pub fn with_interceptor<F>(
2182            inner: T,
2183            interceptor: F,
2184        ) -> ModelProviderHealthServiceClient<InterceptedService<T, F>>
2185        where
2186            F: tonic::service::Interceptor,
2187            T::ResponseBody: Default,
2188            T: tonic::codegen::Service<
2189                http::Request<tonic::body::Body>,
2190                Response = http::Response<
2191                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
2192                >,
2193            >,
2194            <T as tonic::codegen::Service<
2195                http::Request<tonic::body::Body>,
2196            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
2197        {
2198            ModelProviderHealthServiceClient::new(
2199                InterceptedService::new(inner, interceptor),
2200            )
2201        }
2202        /// Compress requests with the given encoding.
2203        ///
2204        /// This requires the server to support it otherwise it might respond with an
2205        /// error.
2206        #[must_use]
2207        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
2208            self.inner = self.inner.send_compressed(encoding);
2209            self
2210        }
2211        /// Enable decompressing responses.
2212        #[must_use]
2213        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
2214            self.inner = self.inner.accept_compressed(encoding);
2215            self
2216        }
2217        /// Limits the maximum size of a decoded message.
2218        ///
2219        /// Default: `4MB`
2220        #[must_use]
2221        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
2222            self.inner = self.inner.max_decoding_message_size(limit);
2223            self
2224        }
2225        /// Limits the maximum size of an encoded message.
2226        ///
2227        /// Default: `usize::MAX`
2228        #[must_use]
2229        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
2230            self.inner = self.inner.max_encoding_message_size(limit);
2231            self
2232        }
2233        pub async fn get_provider_status(
2234            &mut self,
2235            request: impl tonic::IntoRequest<super::GetProviderStatusRequest>,
2236        ) -> std::result::Result<
2237            tonic::Response<super::GetProviderStatusResponse>,
2238            tonic::Status,
2239        > {
2240            self.inner
2241                .ready()
2242                .await
2243                .map_err(|e| {
2244                    tonic::Status::unknown(
2245                        format!("Service was not ready: {}", e.into()),
2246                    )
2247                })?;
2248            let codec = tonic::codec::ProstCodec::default();
2249            let path = http::uri::PathAndQuery::from_static(
2250                "/nominal.ai.v1.ModelProviderHealthService/GetProviderStatus",
2251            );
2252            let mut req = request.into_request();
2253            req.extensions_mut()
2254                .insert(
2255                    GrpcMethod::new(
2256                        "nominal.ai.v1.ModelProviderHealthService",
2257                        "GetProviderStatus",
2258                    ),
2259                );
2260            self.inner.unary(req, path, codec).await
2261        }
2262    }
2263}