1#[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}
101pub 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}
123pub 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}
140pub 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}
196pub 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(message, optional, tag = "16")]
226 pub page_context: ::core::option::Option<PageContext>,
227 #[prost(oneof = "stream_chat_request::RequestType", tags = "7, 8, 9, 12")]
228 pub request_type: ::core::option::Option<stream_chat_request::RequestType>,
229 #[prost(oneof = "stream_chat_request::Context", tags = "4, 5, 10, 11")]
230 pub context: ::core::option::Option<stream_chat_request::Context>,
231}
232pub mod stream_chat_request {
234 #[derive(Clone, PartialEq, ::prost::Oneof)]
235 pub enum RequestType {
236 #[prost(message, tag = "7")]
237 Retry(super::RetryRequest),
238 #[prost(message, tag = "8")]
239 UserPrompt(super::UserPromptRequest),
240 #[prost(message, tag = "9")]
241 ToolApproval(super::ToolApprovalRequest),
242 #[prost(message, tag = "12")]
243 UserQuestionResponse(super::UserQuestionResponseRequest),
244 }
245 #[derive(Clone, PartialEq, ::prost::Oneof)]
246 pub enum Context {
247 #[prost(message, tag = "4")]
248 Workbook(super::WorkbookContext),
249 #[prost(message, tag = "5")]
250 Global(super::GlobalContext),
251 #[prost(message, tag = "10")]
252 Checklist(super::ChecklistContext),
253 #[prost(message, tag = "11")]
254 Template(super::TemplateContext),
255 }
256}
257#[derive(Clone, PartialEq, ::prost::Message)]
258pub struct PageContext {
259 #[prost(string, tag = "1")]
260 pub url: ::prost::alloc::string::String,
261 #[prost(string, optional, tag = "2")]
262 pub primary_rid: ::core::option::Option<::prost::alloc::string::String>,
263 #[prost(string, repeated, tag = "3")]
264 pub in_view_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
265}
266#[derive(Clone, PartialEq, ::prost::Message)]
267pub struct ModelSelection {
268 #[prost(string, tag = "1")]
269 pub model_id: ::prost::alloc::string::String,
270 #[prost(string, optional, tag = "2")]
271 pub thinking_effort: ::core::option::Option<::prost::alloc::string::String>,
272 #[prost(uint32, optional, tag = "3")]
273 pub context_window_tokens: ::core::option::Option<u32>,
274 #[prost(uint32, optional, tag = "4")]
275 pub max_output_tokens: ::core::option::Option<u32>,
276}
277#[derive(Clone, PartialEq, ::prost::Message)]
278pub struct ThinkingEffortOption {
279 #[prost(string, tag = "1")]
280 pub effort: ::prost::alloc::string::String,
281 #[prost(uint32, tag = "2")]
282 pub default_output_tokens: u32,
283}
284#[derive(Clone, PartialEq, ::prost::Message)]
285pub struct ModelOption {
286 #[prost(string, tag = "1")]
287 pub model_id: ::prost::alloc::string::String,
288 #[prost(string, tag = "2")]
289 pub label: ::prost::alloc::string::String,
290 #[prost(string, repeated, tag = "3")]
291 pub thinking_efforts: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
292 #[prost(uint32, tag = "4")]
293 pub min_context_window_tokens: u32,
294 #[prost(uint32, tag = "5")]
295 pub max_context_window_tokens: u32,
296 #[prost(uint32, tag = "6")]
297 pub default_context_window_tokens: u32,
298 #[prost(uint32, repeated, tag = "7")]
299 pub context_window_presets: ::prost::alloc::vec::Vec<u32>,
300 #[prost(uint32, tag = "8")]
301 pub min_output_tokens: u32,
302 #[prost(uint32, tag = "9")]
303 pub max_output_tokens: u32,
304 #[prost(uint32, tag = "10")]
305 pub default_output_tokens: u32,
306 #[prost(message, repeated, tag = "11")]
307 pub thinking_effort_options: ::prost::alloc::vec::Vec<ThinkingEffortOption>,
308 #[prost(bool, tag = "12")]
309 pub supports_image_input: bool,
310 #[prost(string, optional, tag = "13")]
311 pub default_thinking_effort: ::core::option::Option<::prost::alloc::string::String>,
312}
313#[derive(Clone, Copy, PartialEq, ::prost::Message)]
314pub struct ListModelsRequest {}
315#[derive(Clone, PartialEq, ::prost::Message)]
316pub struct ListModelsResponse {
317 #[prost(message, repeated, tag = "1")]
318 pub models: ::prost::alloc::vec::Vec<ModelOption>,
319}
320#[derive(Clone, PartialEq, ::prost::Message)]
321pub struct WorkbookContext {
322 #[prost(string, tag = "1")]
323 pub workbook_rid: ::prost::alloc::string::String,
324 #[deprecated]
325 #[prost(message, optional, tag = "2")]
326 pub user_presence: ::core::option::Option<WorkbookUserPresence>,
327 #[prost(string, optional, tag = "3")]
328 pub active_tab_id: ::core::option::Option<::prost::alloc::string::String>,
329 #[prost(message, optional, tag = "5")]
330 pub visible_time_range: ::core::option::Option<TimeRange>,
331}
332#[derive(Clone, PartialEq, ::prost::Message)]
333pub struct ChecklistContext {
334 #[prost(string, tag = "1")]
335 pub checklist_rid: ::prost::alloc::string::String,
336 #[prost(string, tag = "2")]
337 pub branch_name: ::prost::alloc::string::String,
338 #[prost(oneof = "checklist_context::ReferenceRid", tags = "3, 4")]
339 pub reference_rid: ::core::option::Option<checklist_context::ReferenceRid>,
340}
341pub mod checklist_context {
343 #[derive(Clone, PartialEq, ::prost::Oneof)]
344 pub enum ReferenceRid {
345 #[prost(string, tag = "3")]
346 Asset(::prost::alloc::string::String),
347 #[prost(string, tag = "4")]
348 Run(::prost::alloc::string::String),
349 }
350}
351#[derive(Clone, PartialEq, ::prost::Message)]
352pub struct TemplateContext {
353 #[prost(string, tag = "1")]
354 pub template_rid: ::prost::alloc::string::String,
355 #[prost(string, tag = "2")]
356 pub branch_name: ::prost::alloc::string::String,
357 #[prost(oneof = "template_context::ReferenceRid", tags = "3, 4")]
358 pub reference_rid: ::core::option::Option<template_context::ReferenceRid>,
359}
360pub mod template_context {
362 #[derive(Clone, PartialEq, ::prost::Oneof)]
363 pub enum ReferenceRid {
364 #[prost(string, tag = "3")]
365 Asset(::prost::alloc::string::String),
366 #[prost(string, tag = "4")]
367 Run(::prost::alloc::string::String),
368 }
369}
370#[derive(Clone, Copy, PartialEq, ::prost::Message)]
371pub struct GlobalContext {}
372#[derive(Clone, Copy, PartialEq, ::prost::Message)]
373pub struct WorkbookUserPresence {
374 #[prost(int32, tag = "1")]
375 pub tab_index: i32,
376 #[prost(message, optional, tag = "2")]
377 pub range: ::core::option::Option<TimeRange>,
378}
379#[derive(Clone, PartialEq, ::prost::Message)]
380pub struct CreateConversationRequest {
381 #[prost(string, tag = "1")]
382 pub title: ::prost::alloc::string::String,
383 #[prost(string, tag = "2")]
384 pub workspace_rid: ::prost::alloc::string::String,
385 #[prost(string, optional, tag = "3")]
386 pub old_conversation_rid: ::core::option::Option<::prost::alloc::string::String>,
387 #[prost(string, optional, tag = "4")]
388 pub previous_message_id: ::core::option::Option<::prost::alloc::string::String>,
389 #[prost(message, optional, tag = "5")]
390 pub conversation_mode: ::core::option::Option<ConversationMode>,
391 #[prost(string, optional, tag = "6")]
392 pub backing_workbook_rid: ::core::option::Option<::prost::alloc::string::String>,
393 #[prost(message, repeated, tag = "7")]
394 pub resources: ::prost::alloc::vec::Vec<ConversationResource>,
395}
396#[derive(Clone, PartialEq, ::prost::Message)]
397pub struct CreateConversationResponse {
398 #[prost(string, tag = "1")]
399 pub new_conversation_rid: ::prost::alloc::string::String,
400}
401#[derive(Clone, PartialEq, ::prost::Message)]
402pub struct UpdateConversationMetadataRequest {
403 #[prost(string, optional, tag = "1")]
404 pub title: ::core::option::Option<::prost::alloc::string::String>,
405 #[prost(string, tag = "2")]
406 pub conversation_rid: ::prost::alloc::string::String,
407 #[prost(message, optional, tag = "3")]
408 pub conversation_mode: ::core::option::Option<ConversationMode>,
409}
410#[derive(Clone, Copy, PartialEq, ::prost::Message)]
411pub struct UpdateConversationMetadataResponse {}
412#[derive(Clone, PartialEq, ::prost::Message)]
413pub struct DeleteConversationRequest {
414 #[prost(string, tag = "1")]
415 pub conversation_rid: ::prost::alloc::string::String,
416}
417#[derive(Clone, Copy, PartialEq, ::prost::Message)]
418pub struct DeleteConversationResponse {}
419#[derive(Clone, PartialEq, ::prost::Message)]
420pub struct ArchiveConversationRequest {
421 #[prost(string, tag = "1")]
422 pub conversation_rid: ::prost::alloc::string::String,
423}
424#[derive(Clone, PartialEq, ::prost::Message)]
425pub struct ArchiveConversationResponse {
426 #[prost(message, optional, tag = "1")]
427 pub conversation: ::core::option::Option<ConversationMetadata>,
428}
429#[derive(Clone, PartialEq, ::prost::Message)]
430pub struct UnarchiveConversationRequest {
431 #[prost(string, tag = "1")]
432 pub conversation_rid: ::prost::alloc::string::String,
433}
434#[derive(Clone, PartialEq, ::prost::Message)]
435pub struct UnarchiveConversationResponse {
436 #[prost(message, optional, tag = "1")]
437 pub conversation: ::core::option::Option<ConversationMetadata>,
438}
439#[derive(Clone, PartialEq, ::prost::Message)]
440pub struct GetConversationRequest {
441 #[prost(string, tag = "1")]
442 pub conversation_rid: ::prost::alloc::string::String,
443 #[prost(string, optional, tag = "2")]
444 pub page_start_message_id: ::core::option::Option<::prost::alloc::string::String>,
445 #[prost(int32, optional, tag = "3")]
446 pub max_message_count: ::core::option::Option<i32>,
447}
448#[derive(Clone, PartialEq, ::prost::Message)]
449pub struct CompactConversationRequest {
450 #[prost(string, tag = "1")]
451 pub conversation_rid: ::prost::alloc::string::String,
452}
453#[derive(Clone, Copy, PartialEq, ::prost::Message)]
454pub struct CompactConversationResponse {
455 #[prost(message, optional, tag = "1")]
456 pub context: ::core::option::Option<ContextStatus>,
457}
458#[derive(Clone, PartialEq, ::prost::Message)]
459pub struct ModelMessageWithId {
460 #[prost(string, tag = "3")]
461 pub message_id: ::prost::alloc::string::String,
462 #[prost(message, repeated, tag = "5")]
463 pub tool_approval_requests: ::prost::alloc::vec::Vec<ToolCallDescription>,
464 #[prost(message, repeated, tag = "8")]
465 pub user_question_calls: ::prost::alloc::vec::Vec<UserQuestionCall>,
466 #[prost(message, optional, tag = "9")]
467 pub created_at: ::core::option::Option<
468 super::super::super::google::protobuf::Timestamp,
469 >,
470 #[prost(double, optional, tag = "10")]
471 pub turn_duration_s: ::core::option::Option<f64>,
472 #[prost(oneof = "model_message_with_id::Content", tags = "1, 2, 6")]
473 pub content: ::core::option::Option<model_message_with_id::Content>,
474 #[prost(oneof = "model_message_with_id::RestorePoint", tags = "4, 7")]
475 pub restore_point: ::core::option::Option<model_message_with_id::RestorePoint>,
476}
477pub mod model_message_with_id {
479 #[derive(Clone, PartialEq, ::prost::Oneof)]
480 pub enum Content {
481 #[prost(message, tag = "1")]
482 Message(super::ModelMessage),
483 #[prost(message, tag = "2")]
484 ToolAction(super::ToolAction),
485 #[prost(message, tag = "6")]
486 ToolActionConfirmation(super::ToolActionConfirmation),
487 }
488 #[derive(Clone, PartialEq, ::prost::Oneof)]
489 pub enum RestorePoint {
490 #[prost(string, tag = "4")]
491 SnapshotRid(::prost::alloc::string::String),
492 #[prost(string, tag = "7")]
493 CommitId(::prost::alloc::string::String),
494 }
495}
496#[derive(Clone, PartialEq, ::prost::Message)]
497pub struct GetConversationResponse {
498 #[prost(message, repeated, tag = "1")]
499 pub ordered_messages: ::prost::alloc::vec::Vec<ModelMessageWithId>,
500 #[prost(message, optional, tag = "2")]
501 pub conversation_metadata: ::core::option::Option<ConversationMetadata>,
502}
503#[derive(Clone, PartialEq, ::prost::Message)]
504pub struct GetConversationMetadataRequest {
505 #[prost(string, tag = "1")]
506 pub conversation_rid: ::prost::alloc::string::String,
507}
508#[derive(Clone, PartialEq, ::prost::Message)]
509pub struct GetConversationMetadataResponse {
510 #[prost(message, optional, tag = "1")]
511 pub conversation_metadata: ::core::option::Option<ConversationMetadata>,
512 #[prost(message, optional, tag = "2")]
513 pub active_run: ::core::option::Option<ActiveAgentRun>,
514}
515#[derive(Clone, PartialEq, ::prost::Message)]
516pub struct ActiveAgentRun {
517 #[prost(string, tag = "1")]
518 pub agent_run_id: ::prost::alloc::string::String,
519 #[prost(message, optional, tag = "2")]
520 pub started_at: ::core::option::Option<
521 super::super::super::google::protobuf::Timestamp,
522 >,
523 #[prost(enumeration = "AgentRunExecutionMode", tag = "3")]
524 pub execution_mode: i32,
525}
526#[derive(Clone, PartialEq, ::prost::Message)]
527pub struct GetConversationMessagesRequest {
528 #[prost(string, tag = "1")]
529 pub conversation_rid: ::prost::alloc::string::String,
530 #[prost(string, optional, tag = "2")]
531 pub page_start_message_id: ::core::option::Option<::prost::alloc::string::String>,
532 #[prost(int32, optional, tag = "3")]
533 pub max_message_count: ::core::option::Option<i32>,
534}
535#[derive(Clone, PartialEq, ::prost::Message)]
536pub struct GetConversationMessagesResponse {
537 #[prost(message, repeated, tag = "1")]
538 pub ordered_messages: ::prost::alloc::vec::Vec<ModelMessageWithId>,
539 #[prost(string, optional, tag = "2")]
540 pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
541}
542#[derive(Clone, PartialEq, ::prost::Message)]
543pub struct ListConversationsRequest {
544 #[prost(string, tag = "1")]
545 pub workspace_rid: ::prost::alloc::string::String,
546 #[prost(string, optional, tag = "2")]
547 pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
548 #[prost(int32, optional, tag = "3")]
549 pub page_size: ::core::option::Option<i32>,
550 #[prost(string, optional, tag = "4")]
551 pub title_query: ::core::option::Option<::prost::alloc::string::String>,
552 #[prost(bool, tag = "6")]
553 pub include_archived: bool,
554}
555#[derive(Clone, PartialEq, ::prost::Message)]
556pub struct ConversationResource {
557 #[prost(string, tag = "1")]
558 pub rid: ::prost::alloc::string::String,
559}
560#[derive(Clone, PartialEq, ::prost::Message)]
561pub struct UpdateConversationResourcesRequest {
562 #[prost(string, tag = "1")]
563 pub conversation_rid: ::prost::alloc::string::String,
564 #[prost(string, repeated, tag = "2")]
565 pub add_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
566 #[prost(string, repeated, tag = "3")]
567 pub remove_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
568}
569#[derive(Clone, PartialEq, ::prost::Message)]
570pub struct UpdateConversationResourcesResponse {
571 #[prost(message, repeated, tag = "1")]
572 pub resources: ::prost::alloc::vec::Vec<ConversationResource>,
573}
574#[derive(Clone, PartialEq, ::prost::Message)]
575pub struct ConversationMetadata {
576 #[prost(string, tag = "1")]
577 pub conversation_rid: ::prost::alloc::string::String,
578 #[prost(string, tag = "2")]
579 pub title: ::prost::alloc::string::String,
580 #[prost(message, optional, tag = "3")]
581 pub created_at: ::core::option::Option<
582 super::super::super::google::protobuf::Timestamp,
583 >,
584 #[prost(message, optional, tag = "4")]
585 pub last_updated_at: ::core::option::Option<
586 super::super::super::google::protobuf::Timestamp,
587 >,
588 #[prost(message, optional, tag = "5")]
589 pub mode: ::core::option::Option<ConversationMode>,
590 #[prost(message, optional, tag = "6")]
591 pub current_context: ::core::option::Option<ContextStatus>,
592 #[prost(string, optional, tag = "7")]
593 pub backing_workbook_rid: ::core::option::Option<::prost::alloc::string::String>,
594 #[prost(message, repeated, tag = "8")]
595 pub resources: ::prost::alloc::vec::Vec<ConversationResource>,
596 #[prost(message, optional, tag = "9")]
597 pub active_run: ::core::option::Option<ActiveAgentRun>,
598 #[prost(message, optional, tag = "10")]
599 pub archived_at: ::core::option::Option<
600 super::super::super::google::protobuf::Timestamp,
601 >,
602}
603#[derive(Clone, PartialEq, ::prost::Message)]
604pub struct ListConversationsResponse {
605 #[prost(message, repeated, tag = "1")]
606 pub conversations: ::prost::alloc::vec::Vec<ConversationMetadata>,
607 #[prost(string, optional, tag = "2")]
608 pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
609}
610#[derive(Clone, PartialEq, ::prost::Message)]
611pub struct BatchGetConversationActiveRunsRequest {
612 #[prost(string, tag = "1")]
613 pub workspace_rid: ::prost::alloc::string::String,
614 #[prost(string, repeated, tag = "2")]
615 pub conversation_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
616}
617#[derive(Clone, PartialEq, ::prost::Message)]
618pub struct BatchGetConversationActiveRunsResponse {
619 #[prost(message, repeated, tag = "1")]
620 pub active_runs: ::prost::alloc::vec::Vec<ConversationActiveRun>,
621}
622#[derive(Clone, PartialEq, ::prost::Message)]
623pub struct ConversationActiveRun {
624 #[prost(string, tag = "1")]
625 pub conversation_rid: ::prost::alloc::string::String,
626 #[prost(message, optional, tag = "2")]
627 pub active_run: ::core::option::Option<ActiveAgentRun>,
628}
629#[derive(Clone, Copy, PartialEq, ::prost::Message)]
630pub struct TimeRange {
631 #[prost(message, optional, tag = "1")]
632 pub range_start: ::core::option::Option<Timestamp>,
633 #[prost(message, optional, tag = "2")]
634 pub range_end: ::core::option::Option<Timestamp>,
635}
636#[derive(Clone, Copy, PartialEq, ::prost::Message)]
637pub struct Timestamp {
638 #[prost(int32, tag = "1")]
639 pub seconds: i32,
640 #[prost(int32, tag = "2")]
641 pub nanoseconds: i32,
642}
643#[derive(Clone, PartialEq, ::prost::Message)]
644pub struct ModelMessage {
645 #[prost(oneof = "model_message::Kind", tags = "1, 2")]
646 pub kind: ::core::option::Option<model_message::Kind>,
647}
648pub mod model_message {
650 #[derive(Clone, PartialEq, ::prost::Oneof)]
651 pub enum Kind {
652 #[prost(message, tag = "1")]
653 User(super::UserModelMessage),
654 #[prost(message, tag = "2")]
655 Assistant(super::AssistantModelMessage),
656 }
657}
658#[derive(Clone, PartialEq, ::prost::Message)]
659pub struct UserModelMessage {
660 #[prost(message, repeated, tag = "1")]
661 pub text: ::prost::alloc::vec::Vec<UserContentPart>,
662}
663#[derive(Clone, PartialEq, ::prost::Message)]
664pub struct AssistantModelMessage {
665 #[prost(message, repeated, tag = "1")]
666 pub content_parts: ::prost::alloc::vec::Vec<AssistantContentPart>,
667}
668#[derive(Clone, PartialEq, ::prost::Message)]
669pub struct UserContentPart {
670 #[prost(oneof = "user_content_part::Part", tags = "1, 2")]
671 pub part: ::core::option::Option<user_content_part::Part>,
672}
673pub mod user_content_part {
675 #[derive(Clone, PartialEq, ::prost::Oneof)]
676 pub enum Part {
677 #[prost(message, tag = "1")]
678 Text(super::TextPart),
679 #[prost(message, tag = "2")]
680 Image(super::ImagePart),
681 }
682}
683#[derive(Clone, PartialEq, ::prost::Message)]
684pub struct AssistantContentPart {
685 #[prost(oneof = "assistant_content_part::Part", tags = "1, 2")]
686 pub part: ::core::option::Option<assistant_content_part::Part>,
687}
688pub mod assistant_content_part {
690 #[derive(Clone, PartialEq, ::prost::Oneof)]
691 pub enum Part {
692 #[prost(message, tag = "1")]
693 Text(super::TextPart),
694 #[prost(message, tag = "2")]
695 Reasoning(super::ReasoningPart),
696 }
697}
698#[derive(Clone, PartialEq, ::prost::Message)]
699pub struct TextPart {
700 #[prost(string, tag = "1")]
701 pub text: ::prost::alloc::string::String,
702}
703#[derive(Clone, PartialEq, ::prost::Message)]
704pub struct ImagePart {
705 #[prost(string, tag = "2")]
706 pub media_type: ::prost::alloc::string::String,
707 #[prost(string, tag = "4")]
708 pub attachment_rid: ::prost::alloc::string::String,
709}
710#[derive(Clone, PartialEq, ::prost::Message)]
711pub struct ReasoningPart {
712 #[prost(string, tag = "1")]
713 pub reasoning: ::prost::alloc::string::String,
714 #[prost(double, optional, tag = "2")]
715 pub duration_s: ::core::option::Option<f64>,
716}
717#[derive(Clone, PartialEq, ::prost::Message)]
718pub struct StreamChatResponse {
719 #[prost(
720 oneof = "stream_chat_response::Response",
721 tags = "1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16"
722 )]
723 pub response: ::core::option::Option<stream_chat_response::Response>,
724}
725pub mod stream_chat_response {
727 #[derive(Clone, PartialEq, ::prost::Oneof)]
728 pub enum Response {
729 #[prost(message, tag = "1")]
730 Finish(super::Finish),
731 #[prost(message, tag = "2")]
732 Error(super::Error),
733 #[prost(message, tag = "3")]
734 TextStart(super::TextStart),
735 #[prost(message, tag = "4")]
736 TextDelta(super::TextDelta),
737 #[prost(message, tag = "5")]
738 TextEnd(super::TextEnd),
739 #[prost(message, tag = "6")]
740 ReasoningStart(super::ReasoningStart),
741 #[prost(message, tag = "7")]
742 ReasoningDelta(super::ReasoningDelta),
743 #[prost(message, tag = "8")]
744 ReasoningEnd(super::ReasoningEnd),
745 #[prost(message, tag = "10")]
746 ToolAction(super::ToolAction),
747 #[prost(message, tag = "11")]
748 ToolActionConfirmation(super::ToolActionConfirmation),
749 #[prost(message, tag = "12")]
750 StepStart(super::StepStart),
751 #[prost(message, tag = "13")]
752 StepEnd(super::StepEnd),
753 #[prost(message, tag = "14")]
754 ClientDirective(super::ClientDirective),
755 #[prost(message, tag = "15")]
756 CompactionNotice(super::CompactionNotice),
757 #[prost(message, tag = "16")]
758 StreamReset(super::StreamReset),
759 }
760}
761#[derive(Clone, Copy, PartialEq, ::prost::Message)]
762pub struct StreamReset {}
763#[derive(Clone, Copy, PartialEq, ::prost::Message)]
764pub struct StepStart {}
765#[derive(Clone, Copy, PartialEq, ::prost::Message)]
766pub struct StepEnd {}
767#[derive(Clone, Copy, PartialEq, ::prost::Message)]
768pub struct CompactionNotice {
769 #[prost(int32, tag = "1")]
770 pub tokens_before: i32,
771 #[prost(int32, tag = "2")]
772 pub estimated_checkpoint_tokens: i32,
773 #[prost(enumeration = "compaction_notice::Trigger", tag = "3")]
774 pub trigger: i32,
775}
776pub mod compaction_notice {
778 #[derive(
779 Clone,
780 Copy,
781 Debug,
782 PartialEq,
783 Eq,
784 Hash,
785 PartialOrd,
786 Ord,
787 ::prost::Enumeration
788 )]
789 #[repr(i32)]
790 pub enum Trigger {
791 Unspecified = 0,
792 PreTurn = 1,
793 MidRun = 2,
794 }
795 impl Trigger {
796 pub fn as_str_name(&self) -> &'static str {
801 match self {
802 Self::Unspecified => "TRIGGER_UNSPECIFIED",
803 Self::PreTurn => "TRIGGER_PRE_TURN",
804 Self::MidRun => "TRIGGER_MID_RUN",
805 }
806 }
807 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
809 match value {
810 "TRIGGER_UNSPECIFIED" => Some(Self::Unspecified),
811 "TRIGGER_PRE_TURN" => Some(Self::PreTurn),
812 "TRIGGER_MID_RUN" => Some(Self::MidRun),
813 _ => None,
814 }
815 }
816 }
817}
818#[derive(Clone, PartialEq, ::prost::Message)]
819pub struct ToolCallDescription {
820 #[prost(string, tag = "1")]
821 pub tool_call_id: ::prost::alloc::string::String,
822 #[prost(string, tag = "2")]
823 pub tool_name: ::prost::alloc::string::String,
824 #[prost(string, tag = "3")]
825 pub tool_args_json_string: ::prost::alloc::string::String,
826 #[prost(enumeration = "ToolCallStatus", tag = "4")]
827 pub status: i32,
828}
829#[derive(Clone, PartialEq, ::prost::Message)]
830pub struct UserQuestionCall {
831 #[prost(message, optional, tag = "1")]
832 pub tool_call: ::core::option::Option<ToolCallDescription>,
833 #[prost(uint32, tag = "2")]
834 pub current_question_index: u32,
835 #[prost(message, repeated, tag = "3")]
836 pub answers: ::prost::alloc::vec::Vec<UserQuestionAnswer>,
837 #[prost(enumeration = "UserQuestionState", tag = "4")]
838 pub state: i32,
839 #[prost(uint64, tag = "5")]
840 pub version: u64,
841}
842#[derive(Clone, PartialEq, ::prost::Message)]
843pub struct Finish {
844 #[prost(string, repeated, tag = "1")]
845 pub ordered_message_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
846 #[prost(string, optional, tag = "2")]
847 pub new_title: ::core::option::Option<::prost::alloc::string::String>,
848 #[prost(message, repeated, tag = "3")]
849 pub tool_approval_requests: ::prost::alloc::vec::Vec<ToolCallDescription>,
850 #[prost(message, optional, tag = "4")]
851 pub updated_context: ::core::option::Option<ContextStatus>,
852 #[prost(string, optional, tag = "5")]
853 pub turn_rid: ::core::option::Option<::prost::alloc::string::String>,
854 #[prost(message, repeated, tag = "6")]
855 pub user_question_calls: ::prost::alloc::vec::Vec<UserQuestionCall>,
856 #[prost(double, optional, tag = "7")]
857 pub duration_s: ::core::option::Option<f64>,
858}
859#[derive(Clone, PartialEq, ::prost::Message)]
860pub struct Error {
861 #[prost(string, tag = "1")]
862 pub message: ::prost::alloc::string::String,
863}
864#[derive(Clone, PartialEq, ::prost::Message)]
865pub struct TextStart {
866 #[prost(string, tag = "1")]
867 pub id: ::prost::alloc::string::String,
868}
869#[derive(Clone, PartialEq, ::prost::Message)]
870pub struct TextDelta {
871 #[prost(string, tag = "1")]
872 pub id: ::prost::alloc::string::String,
873 #[prost(string, tag = "2")]
874 pub delta: ::prost::alloc::string::String,
875}
876#[derive(Clone, PartialEq, ::prost::Message)]
877pub struct TextEnd {
878 #[prost(string, tag = "1")]
879 pub id: ::prost::alloc::string::String,
880}
881#[derive(Clone, PartialEq, ::prost::Message)]
882pub struct ReasoningStart {
883 #[prost(string, tag = "1")]
884 pub id: ::prost::alloc::string::String,
885}
886#[derive(Clone, PartialEq, ::prost::Message)]
887pub struct ReasoningDelta {
888 #[prost(string, tag = "1")]
889 pub id: ::prost::alloc::string::String,
890 #[prost(string, tag = "2")]
891 pub delta: ::prost::alloc::string::String,
892}
893#[derive(Clone, PartialEq, ::prost::Message)]
894pub struct ReasoningEnd {
895 #[prost(string, tag = "1")]
896 pub id: ::prost::alloc::string::String,
897 #[prost(double, tag = "2")]
898 pub duration_s: f64,
899}
900#[derive(Clone, PartialEq, ::prost::Message)]
901pub struct ToolAction {
902 #[prost(string, tag = "2")]
903 pub tool_action_verb: ::prost::alloc::string::String,
904 #[prost(string, optional, tag = "3")]
905 pub tool_target: ::core::option::Option<::prost::alloc::string::String>,
906 #[prost(message, optional, tag = "5")]
907 pub tool_call_description: ::core::option::Option<ToolCallDescription>,
908 #[deprecated]
909 #[prost(string, tag = "1")]
910 pub id: ::prost::alloc::string::String,
911 #[deprecated]
912 #[prost(string, tag = "4")]
913 pub tool_name: ::prost::alloc::string::String,
914}
915#[derive(Clone, PartialEq, ::prost::Message)]
916pub struct ToolActionConfirmation {
917 #[prost(string, tag = "1")]
918 pub id: ::prost::alloc::string::String,
919 #[prost(double, optional, tag = "4")]
920 pub duration_s: ::core::option::Option<f64>,
921 #[prost(oneof = "tool_action_confirmation::Outcome", tags = "2, 3")]
922 pub outcome: ::core::option::Option<tool_action_confirmation::Outcome>,
923}
924pub mod tool_action_confirmation {
926 #[derive(Clone, PartialEq, ::prost::Oneof)]
927 pub enum Outcome {
928 #[prost(message, tag = "2")]
929 Success(super::ToolActionSuccess),
930 #[prost(message, tag = "3")]
931 Failure(super::ToolActionFailure),
932 }
933}
934#[derive(Clone, PartialEq, ::prost::Message)]
935pub struct ToolActionSuccess {
936 #[prost(string, tag = "1")]
937 pub tool_success_message: ::prost::alloc::string::String,
938}
939#[derive(Clone, PartialEq, ::prost::Message)]
940pub struct ToolActionFailure {
941 #[prost(string, tag = "1")]
942 pub tool_error_message: ::prost::alloc::string::String,
943}
944#[derive(Clone, PartialEq, ::prost::Message)]
945pub struct ClientDirective {
946 #[prost(oneof = "client_directive::Version", tags = "1")]
947 pub version: ::core::option::Option<client_directive::Version>,
948}
949pub mod client_directive {
951 #[derive(Clone, PartialEq, ::prost::Oneof)]
952 pub enum Version {
953 #[prost(message, tag = "1")]
954 V1(super::ClientDirectiveV1),
955 }
956}
957#[derive(Clone, PartialEq, ::prost::Message)]
958pub struct ClientDirectiveV1 {
959 #[prost(string, tag = "1")]
960 pub id: ::prost::alloc::string::String,
961 #[prost(oneof = "client_directive_v1::Kind", tags = "2, 3")]
962 pub kind: ::core::option::Option<client_directive_v1::Kind>,
963}
964pub mod client_directive_v1 {
966 #[derive(Clone, PartialEq, ::prost::Oneof)]
967 pub enum Kind {
968 #[prost(message, tag = "2")]
969 ResourceEdited(super::ResourceEditedDirective),
970 #[prost(message, tag = "3")]
971 SetTimeRange(super::SetTimeRangeDirective),
972 }
973}
974#[derive(Clone, PartialEq, ::prost::Message)]
975pub struct ResourceEditedDirective {
976 #[prost(oneof = "resource_edited_directive::Resource", tags = "1, 2, 3")]
977 pub resource: ::core::option::Option<resource_edited_directive::Resource>,
978}
979pub mod resource_edited_directive {
981 #[derive(Clone, PartialEq, ::prost::Oneof)]
982 pub enum Resource {
983 #[prost(message, tag = "1")]
984 Checklist(super::ChecklistEdited),
985 #[prost(message, tag = "2")]
986 Template(super::TemplateEdited),
987 #[prost(message, tag = "3")]
988 Workbook(super::WorkbookEdited),
989 }
990}
991#[derive(Clone, PartialEq, ::prost::Message)]
992pub struct ChecklistEdited {
993 #[prost(string, tag = "1")]
994 pub checklist_rid: ::prost::alloc::string::String,
995 #[prost(string, tag = "2")]
996 pub branch_name: ::prost::alloc::string::String,
997 #[prost(string, optional, tag = "3")]
998 pub check_id: ::core::option::Option<::prost::alloc::string::String>,
999 #[prost(string, optional, tag = "4")]
1000 pub commit_id: ::core::option::Option<::prost::alloc::string::String>,
1001 #[prost(message, optional, tag = "5")]
1002 pub committed_at: ::core::option::Option<
1003 super::super::super::google::protobuf::Timestamp,
1004 >,
1005}
1006#[derive(Clone, PartialEq, ::prost::Message)]
1007pub struct TemplateEdited {
1008 #[prost(string, tag = "1")]
1009 pub template_rid: ::prost::alloc::string::String,
1010 #[prost(string, tag = "2")]
1011 pub branch_name: ::prost::alloc::string::String,
1012 #[prost(string, optional, tag = "3")]
1013 pub commit_id: ::core::option::Option<::prost::alloc::string::String>,
1014 #[prost(message, optional, tag = "4")]
1015 pub committed_at: ::core::option::Option<
1016 super::super::super::google::protobuf::Timestamp,
1017 >,
1018}
1019#[derive(Clone, PartialEq, ::prost::Message)]
1020pub struct WorkbookEdited {
1021 #[prost(string, tag = "1")]
1022 pub workbook_rid: ::prost::alloc::string::String,
1023}
1024#[derive(Clone, PartialEq, ::prost::Message)]
1025pub struct SetTimeRangeDirective {
1026 #[prost(string, tag = "1")]
1027 pub workbook_rid: ::prost::alloc::string::String,
1028 #[prost(message, optional, tag = "2")]
1029 pub start: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
1030 #[prost(message, optional, tag = "3")]
1031 pub end: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
1032 #[prost(enumeration = "TimeRangeType", tag = "4")]
1033 pub time_range_type: i32,
1034}
1035#[derive(Clone, PartialEq, ::prost::Message)]
1036pub struct ResourceMarkup {
1037 #[prost(oneof = "resource_markup::Kind", tags = "1, 2")]
1038 pub kind: ::core::option::Option<resource_markup::Kind>,
1039}
1040pub mod resource_markup {
1042 #[derive(Clone, PartialEq, ::prost::Oneof)]
1043 pub enum Kind {
1044 #[prost(message, tag = "1")]
1045 Rid(super::RidResourceMarkup),
1046 #[prost(message, tag = "2")]
1047 RidList(super::RidListResourceMarkup),
1048 }
1049}
1050#[derive(Clone, PartialEq, ::prost::Message)]
1051pub struct RidResourceMarkup {
1052 #[prost(string, tag = "1")]
1053 pub rid: ::prost::alloc::string::String,
1054 #[prost(string, optional, tag = "2")]
1055 pub label: ::core::option::Option<::prost::alloc::string::String>,
1056}
1057#[derive(Clone, PartialEq, ::prost::Message)]
1058pub struct RidListResourceMarkup {
1059 #[prost(string, repeated, tag = "1")]
1060 pub rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1061 #[prost(string, optional, tag = "2")]
1062 pub label: ::core::option::Option<::prost::alloc::string::String>,
1063}
1064#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1065pub struct ContextStatus {
1066 #[prost(int32, tag = "1")]
1067 pub curr_token_count: i32,
1068 #[prost(int32, tag = "2")]
1069 pub model_context_limit: i32,
1070}
1071#[derive(Clone, PartialEq, ::prost::Message)]
1072pub struct ComputeProvenanceV1 {
1073 #[prost(string, tag = "1")]
1074 pub compute_request_json: ::prost::alloc::string::String,
1075 #[prost(string, tag = "2")]
1076 pub label: ::prost::alloc::string::String,
1077 #[prost(string, optional, tag = "3")]
1078 pub code: ::core::option::Option<::prost::alloc::string::String>,
1079 #[prost(enumeration = "ComputeOutputType", tag = "4")]
1080 pub output_type: i32,
1081}
1082#[derive(Clone, PartialEq, ::prost::Message)]
1083pub struct Citation {
1084 #[prost(string, tag = "1")]
1085 pub r#ref: ::prost::alloc::string::String,
1086 #[prost(string, tag = "2")]
1087 pub label: ::prost::alloc::string::String,
1088 #[prost(message, optional, tag = "3")]
1089 pub retrieved_at: ::core::option::Option<
1090 super::super::super::google::protobuf::Timestamp,
1091 >,
1092 #[prost(uint32, optional, tag = "5")]
1093 pub number: ::core::option::Option<u32>,
1094 #[prost(oneof = "citation::Payload", tags = "4, 6")]
1095 pub payload: ::core::option::Option<citation::Payload>,
1096}
1097pub mod citation {
1099 #[derive(Clone, PartialEq, ::prost::Oneof)]
1100 pub enum Payload {
1101 #[prost(message, tag = "4")]
1102 Telemetry(super::TelemetryCitation),
1103 #[prost(message, tag = "6")]
1104 File(super::DriveFileCitation),
1105 }
1106}
1107#[derive(Clone, PartialEq, ::prost::Message)]
1108pub struct TelemetryCitation {
1109 #[prost(oneof = "telemetry_citation::Version", tags = "1")]
1110 pub version: ::core::option::Option<telemetry_citation::Version>,
1111}
1112pub mod telemetry_citation {
1114 #[derive(Clone, PartialEq, ::prost::Oneof)]
1115 pub enum Version {
1116 #[prost(message, tag = "1")]
1117 V1(super::ComputeProvenanceV1),
1118 }
1119}
1120#[derive(Clone, PartialEq, ::prost::Message)]
1121pub struct DriveFileCitation {
1122 #[prost(string, tag = "1")]
1123 pub file_revision_rid: ::prost::alloc::string::String,
1124 #[prost(message, optional, tag = "2")]
1125 pub file_identity: ::core::option::Option<
1126 super::super::file_store::v1::LogicalFileIdentity,
1127 >,
1128 #[prost(string, tag = "3")]
1129 pub drive_rid: ::prost::alloc::string::String,
1130 #[prost(uint64, tag = "4")]
1131 pub total_size_bytes: u64,
1132 #[prost(oneof = "drive_file_citation::Kind", tags = "5, 6")]
1133 pub kind: ::core::option::Option<drive_file_citation::Kind>,
1134}
1135pub mod drive_file_citation {
1137 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
1138 pub enum Kind {
1139 #[prost(message, tag = "5")]
1140 Text(super::TextFileCitation),
1141 #[prost(message, tag = "6")]
1142 Pdf(super::PdfFileCitation),
1143 }
1144}
1145#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1146pub struct TextFileCitation {
1147 #[prost(message, optional, tag = "1")]
1148 pub byte_range: ::core::option::Option<ByteRange>,
1149}
1150#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1151pub struct PdfFileCitation {
1152 #[prost(uint32, tag = "1")]
1153 pub first_page: u32,
1154 #[prost(uint32, tag = "2")]
1155 pub page_count: u32,
1156 #[prost(uint32, tag = "3")]
1157 pub total_page_count: u32,
1158}
1159#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1160pub struct ByteRange {
1161 #[prost(uint64, tag = "1")]
1162 pub offset: u64,
1163 #[prost(uint64, tag = "2")]
1164 pub length: u64,
1165}
1166#[derive(Clone, PartialEq, ::prost::Message)]
1167pub struct BatchGetCitationsRequest {
1168 #[prost(string, tag = "1")]
1169 pub conversation_rid: ::prost::alloc::string::String,
1170 #[prost(string, repeated, tag = "2")]
1171 pub refs: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1172}
1173#[derive(Clone, PartialEq, ::prost::Message)]
1174pub struct BatchGetCitationsResponse {
1175 #[prost(message, repeated, tag = "1")]
1176 pub citations: ::prost::alloc::vec::Vec<Citation>,
1177 #[prost(message, repeated, tag = "2")]
1178 pub errors: ::prost::alloc::vec::Vec<GetCitationResponseError>,
1179}
1180#[derive(Clone, PartialEq, ::prost::Message)]
1181pub struct GetCitationResponseError {
1182 #[prost(string, tag = "1")]
1183 pub r#ref: ::prost::alloc::string::String,
1184 #[prost(enumeration = "get_citation_response_error::Reason", tag = "2")]
1185 pub reason: i32,
1186}
1187pub mod get_citation_response_error {
1189 #[derive(
1190 Clone,
1191 Copy,
1192 Debug,
1193 PartialEq,
1194 Eq,
1195 Hash,
1196 PartialOrd,
1197 Ord,
1198 ::prost::Enumeration
1199 )]
1200 #[repr(i32)]
1201 pub enum Reason {
1202 Unspecified = 0,
1203 NotFound = 1,
1204 }
1205 impl Reason {
1206 pub fn as_str_name(&self) -> &'static str {
1211 match self {
1212 Self::Unspecified => "REASON_UNSPECIFIED",
1213 Self::NotFound => "REASON_NOT_FOUND",
1214 }
1215 }
1216 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1218 match value {
1219 "REASON_UNSPECIFIED" => Some(Self::Unspecified),
1220 "REASON_NOT_FOUND" => Some(Self::NotFound),
1221 _ => None,
1222 }
1223 }
1224 }
1225}
1226#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1227#[repr(i32)]
1228pub enum QueuedMessageState {
1229 Unspecified = 0,
1230 Queued = 1,
1231 Dispatching = 2,
1232 Failed = 3,
1233}
1234impl QueuedMessageState {
1235 pub fn as_str_name(&self) -> &'static str {
1240 match self {
1241 Self::Unspecified => "QUEUED_MESSAGE_STATE_UNSPECIFIED",
1242 Self::Queued => "QUEUED_MESSAGE_STATE_QUEUED",
1243 Self::Dispatching => "QUEUED_MESSAGE_STATE_DISPATCHING",
1244 Self::Failed => "QUEUED_MESSAGE_STATE_FAILED",
1245 }
1246 }
1247 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1249 match value {
1250 "QUEUED_MESSAGE_STATE_UNSPECIFIED" => Some(Self::Unspecified),
1251 "QUEUED_MESSAGE_STATE_QUEUED" => Some(Self::Queued),
1252 "QUEUED_MESSAGE_STATE_DISPATCHING" => Some(Self::Dispatching),
1253 "QUEUED_MESSAGE_STATE_FAILED" => Some(Self::Failed),
1254 _ => None,
1255 }
1256 }
1257}
1258#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1259#[repr(i32)]
1260pub enum FeedbackVote {
1261 Unspecified = 0,
1262 ThumbsUp = 1,
1263 ThumbsDown = 2,
1264}
1265impl FeedbackVote {
1266 pub fn as_str_name(&self) -> &'static str {
1271 match self {
1272 Self::Unspecified => "FEEDBACK_VOTE_UNSPECIFIED",
1273 Self::ThumbsUp => "FEEDBACK_VOTE_THUMBS_UP",
1274 Self::ThumbsDown => "FEEDBACK_VOTE_THUMBS_DOWN",
1275 }
1276 }
1277 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1279 match value {
1280 "FEEDBACK_VOTE_UNSPECIFIED" => Some(Self::Unspecified),
1281 "FEEDBACK_VOTE_THUMBS_UP" => Some(Self::ThumbsUp),
1282 "FEEDBACK_VOTE_THUMBS_DOWN" => Some(Self::ThumbsDown),
1283 _ => None,
1284 }
1285 }
1286}
1287#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1288#[repr(i32)]
1289pub enum AgentRunExecutionMode {
1290 Unspecified = 0,
1291 Inline = 1,
1292 Durable = 2,
1293}
1294impl AgentRunExecutionMode {
1295 pub fn as_str_name(&self) -> &'static str {
1300 match self {
1301 Self::Unspecified => "AGENT_RUN_EXECUTION_MODE_UNSPECIFIED",
1302 Self::Inline => "AGENT_RUN_EXECUTION_MODE_INLINE",
1303 Self::Durable => "AGENT_RUN_EXECUTION_MODE_DURABLE",
1304 }
1305 }
1306 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1308 match value {
1309 "AGENT_RUN_EXECUTION_MODE_UNSPECIFIED" => Some(Self::Unspecified),
1310 "AGENT_RUN_EXECUTION_MODE_INLINE" => Some(Self::Inline),
1311 "AGENT_RUN_EXECUTION_MODE_DURABLE" => Some(Self::Durable),
1312 _ => None,
1313 }
1314 }
1315}
1316#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1317#[repr(i32)]
1318pub enum ToolCallStatus {
1319 Unspecified = 0,
1320 Approved = 1,
1321 Denied = 2,
1322 AwaitingApproval = 3,
1323}
1324impl ToolCallStatus {
1325 pub fn as_str_name(&self) -> &'static str {
1330 match self {
1331 Self::Unspecified => "TOOL_CALL_STATUS_UNSPECIFIED",
1332 Self::Approved => "TOOL_CALL_STATUS_APPROVED",
1333 Self::Denied => "TOOL_CALL_STATUS_DENIED",
1334 Self::AwaitingApproval => "TOOL_CALL_STATUS_AWAITING_APPROVAL",
1335 }
1336 }
1337 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1339 match value {
1340 "TOOL_CALL_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
1341 "TOOL_CALL_STATUS_APPROVED" => Some(Self::Approved),
1342 "TOOL_CALL_STATUS_DENIED" => Some(Self::Denied),
1343 "TOOL_CALL_STATUS_AWAITING_APPROVAL" => Some(Self::AwaitingApproval),
1344 _ => None,
1345 }
1346 }
1347}
1348#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1349#[repr(i32)]
1350pub enum UserQuestionState {
1351 Unspecified = 0,
1352 Pending = 1,
1353 Answered = 2,
1354 Declined = 3,
1355}
1356impl UserQuestionState {
1357 pub fn as_str_name(&self) -> &'static str {
1362 match self {
1363 Self::Unspecified => "USER_QUESTION_STATE_UNSPECIFIED",
1364 Self::Pending => "USER_QUESTION_STATE_PENDING",
1365 Self::Answered => "USER_QUESTION_STATE_ANSWERED",
1366 Self::Declined => "USER_QUESTION_STATE_DECLINED",
1367 }
1368 }
1369 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1371 match value {
1372 "USER_QUESTION_STATE_UNSPECIFIED" => Some(Self::Unspecified),
1373 "USER_QUESTION_STATE_PENDING" => Some(Self::Pending),
1374 "USER_QUESTION_STATE_ANSWERED" => Some(Self::Answered),
1375 "USER_QUESTION_STATE_DECLINED" => Some(Self::Declined),
1376 _ => None,
1377 }
1378 }
1379}
1380#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1381#[repr(i32)]
1382pub enum TimeRangeType {
1383 Unspecified = 0,
1384 Absolute = 1,
1385 Relative = 2,
1386}
1387impl TimeRangeType {
1388 pub fn as_str_name(&self) -> &'static str {
1393 match self {
1394 Self::Unspecified => "TIME_RANGE_TYPE_UNSPECIFIED",
1395 Self::Absolute => "TIME_RANGE_TYPE_ABSOLUTE",
1396 Self::Relative => "TIME_RANGE_TYPE_RELATIVE",
1397 }
1398 }
1399 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1401 match value {
1402 "TIME_RANGE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
1403 "TIME_RANGE_TYPE_ABSOLUTE" => Some(Self::Absolute),
1404 "TIME_RANGE_TYPE_RELATIVE" => Some(Self::Relative),
1405 _ => None,
1406 }
1407 }
1408}
1409#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1410#[repr(i32)]
1411pub enum ComputeOutputType {
1412 Unspecified = 0,
1413 RangeSeries = 1,
1414 NumericSeries = 2,
1415 NumericArraySeries = 3,
1416 EnumSeries = 4,
1417 EnumArraySeries = 5,
1418 LogSeries = 6,
1419 StructSeries = 7,
1420 VideoSeries = 8,
1421 UntypedSeries = 9,
1422 GroupedSeries = 10,
1423 LastPoint = 11,
1424 LastRange = 12,
1425 CartesianPoints = 13,
1426 Cartesian3dPoints = 14,
1427 Multivariate = 15,
1428 NumericHistogram = 16,
1429 FrequencyDomain = 17,
1430 FrequencyDomainV2 = 18,
1431 BucketedFrequencyDomain = 19,
1432 NumericRangeAggregate = 20,
1433 CurveFit = 21,
1434 CurveV2 = 22,
1435}
1436impl ComputeOutputType {
1437 pub fn as_str_name(&self) -> &'static str {
1442 match self {
1443 Self::Unspecified => "COMPUTE_OUTPUT_TYPE_UNSPECIFIED",
1444 Self::RangeSeries => "COMPUTE_OUTPUT_TYPE_RANGE_SERIES",
1445 Self::NumericSeries => "COMPUTE_OUTPUT_TYPE_NUMERIC_SERIES",
1446 Self::NumericArraySeries => "COMPUTE_OUTPUT_TYPE_NUMERIC_ARRAY_SERIES",
1447 Self::EnumSeries => "COMPUTE_OUTPUT_TYPE_ENUM_SERIES",
1448 Self::EnumArraySeries => "COMPUTE_OUTPUT_TYPE_ENUM_ARRAY_SERIES",
1449 Self::LogSeries => "COMPUTE_OUTPUT_TYPE_LOG_SERIES",
1450 Self::StructSeries => "COMPUTE_OUTPUT_TYPE_STRUCT_SERIES",
1451 Self::VideoSeries => "COMPUTE_OUTPUT_TYPE_VIDEO_SERIES",
1452 Self::UntypedSeries => "COMPUTE_OUTPUT_TYPE_UNTYPED_SERIES",
1453 Self::GroupedSeries => "COMPUTE_OUTPUT_TYPE_GROUPED_SERIES",
1454 Self::LastPoint => "COMPUTE_OUTPUT_TYPE_LAST_POINT",
1455 Self::LastRange => "COMPUTE_OUTPUT_TYPE_LAST_RANGE",
1456 Self::CartesianPoints => "COMPUTE_OUTPUT_TYPE_CARTESIAN_POINTS",
1457 Self::Cartesian3dPoints => "COMPUTE_OUTPUT_TYPE_CARTESIAN_3D_POINTS",
1458 Self::Multivariate => "COMPUTE_OUTPUT_TYPE_MULTIVARIATE",
1459 Self::NumericHistogram => "COMPUTE_OUTPUT_TYPE_NUMERIC_HISTOGRAM",
1460 Self::FrequencyDomain => "COMPUTE_OUTPUT_TYPE_FREQUENCY_DOMAIN",
1461 Self::FrequencyDomainV2 => "COMPUTE_OUTPUT_TYPE_FREQUENCY_DOMAIN_V2",
1462 Self::BucketedFrequencyDomain => {
1463 "COMPUTE_OUTPUT_TYPE_BUCKETED_FREQUENCY_DOMAIN"
1464 }
1465 Self::NumericRangeAggregate => "COMPUTE_OUTPUT_TYPE_NUMERIC_RANGE_AGGREGATE",
1466 Self::CurveFit => "COMPUTE_OUTPUT_TYPE_CURVE_FIT",
1467 Self::CurveV2 => "COMPUTE_OUTPUT_TYPE_CURVE_V2",
1468 }
1469 }
1470 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1472 match value {
1473 "COMPUTE_OUTPUT_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
1474 "COMPUTE_OUTPUT_TYPE_RANGE_SERIES" => Some(Self::RangeSeries),
1475 "COMPUTE_OUTPUT_TYPE_NUMERIC_SERIES" => Some(Self::NumericSeries),
1476 "COMPUTE_OUTPUT_TYPE_NUMERIC_ARRAY_SERIES" => Some(Self::NumericArraySeries),
1477 "COMPUTE_OUTPUT_TYPE_ENUM_SERIES" => Some(Self::EnumSeries),
1478 "COMPUTE_OUTPUT_TYPE_ENUM_ARRAY_SERIES" => Some(Self::EnumArraySeries),
1479 "COMPUTE_OUTPUT_TYPE_LOG_SERIES" => Some(Self::LogSeries),
1480 "COMPUTE_OUTPUT_TYPE_STRUCT_SERIES" => Some(Self::StructSeries),
1481 "COMPUTE_OUTPUT_TYPE_VIDEO_SERIES" => Some(Self::VideoSeries),
1482 "COMPUTE_OUTPUT_TYPE_UNTYPED_SERIES" => Some(Self::UntypedSeries),
1483 "COMPUTE_OUTPUT_TYPE_GROUPED_SERIES" => Some(Self::GroupedSeries),
1484 "COMPUTE_OUTPUT_TYPE_LAST_POINT" => Some(Self::LastPoint),
1485 "COMPUTE_OUTPUT_TYPE_LAST_RANGE" => Some(Self::LastRange),
1486 "COMPUTE_OUTPUT_TYPE_CARTESIAN_POINTS" => Some(Self::CartesianPoints),
1487 "COMPUTE_OUTPUT_TYPE_CARTESIAN_3D_POINTS" => Some(Self::Cartesian3dPoints),
1488 "COMPUTE_OUTPUT_TYPE_MULTIVARIATE" => Some(Self::Multivariate),
1489 "COMPUTE_OUTPUT_TYPE_NUMERIC_HISTOGRAM" => Some(Self::NumericHistogram),
1490 "COMPUTE_OUTPUT_TYPE_FREQUENCY_DOMAIN" => Some(Self::FrequencyDomain),
1491 "COMPUTE_OUTPUT_TYPE_FREQUENCY_DOMAIN_V2" => Some(Self::FrequencyDomainV2),
1492 "COMPUTE_OUTPUT_TYPE_BUCKETED_FREQUENCY_DOMAIN" => {
1493 Some(Self::BucketedFrequencyDomain)
1494 }
1495 "COMPUTE_OUTPUT_TYPE_NUMERIC_RANGE_AGGREGATE" => {
1496 Some(Self::NumericRangeAggregate)
1497 }
1498 "COMPUTE_OUTPUT_TYPE_CURVE_FIT" => Some(Self::CurveFit),
1499 "COMPUTE_OUTPUT_TYPE_CURVE_V2" => Some(Self::CurveV2),
1500 _ => None,
1501 }
1502 }
1503}
1504pub mod ai_agent_service_client {
1506 #![allow(
1507 unused_variables,
1508 dead_code,
1509 missing_docs,
1510 clippy::wildcard_imports,
1511 clippy::let_unit_value,
1512 )]
1513 use tonic::codegen::*;
1514 use tonic::codegen::http::Uri;
1515 #[derive(Debug, Clone)]
1516 pub struct AiAgentServiceClient<T> {
1517 inner: tonic::client::Grpc<T>,
1518 }
1519 impl AiAgentServiceClient<tonic::transport::Channel> {
1520 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1522 where
1523 D: TryInto<tonic::transport::Endpoint>,
1524 D::Error: Into<StdError>,
1525 {
1526 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1527 Ok(Self::new(conn))
1528 }
1529 }
1530 impl<T> AiAgentServiceClient<T>
1531 where
1532 T: tonic::client::GrpcService<tonic::body::Body>,
1533 T::Error: Into<StdError>,
1534 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1535 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1536 {
1537 pub fn new(inner: T) -> Self {
1538 let inner = tonic::client::Grpc::new(inner);
1539 Self { inner }
1540 }
1541 pub fn with_origin(inner: T, origin: Uri) -> Self {
1542 let inner = tonic::client::Grpc::with_origin(inner, origin);
1543 Self { inner }
1544 }
1545 pub fn with_interceptor<F>(
1546 inner: T,
1547 interceptor: F,
1548 ) -> AiAgentServiceClient<InterceptedService<T, F>>
1549 where
1550 F: tonic::service::Interceptor,
1551 T::ResponseBody: Default,
1552 T: tonic::codegen::Service<
1553 http::Request<tonic::body::Body>,
1554 Response = http::Response<
1555 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
1556 >,
1557 >,
1558 <T as tonic::codegen::Service<
1559 http::Request<tonic::body::Body>,
1560 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1561 {
1562 AiAgentServiceClient::new(InterceptedService::new(inner, interceptor))
1563 }
1564 #[must_use]
1569 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1570 self.inner = self.inner.send_compressed(encoding);
1571 self
1572 }
1573 #[must_use]
1575 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1576 self.inner = self.inner.accept_compressed(encoding);
1577 self
1578 }
1579 #[must_use]
1583 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1584 self.inner = self.inner.max_decoding_message_size(limit);
1585 self
1586 }
1587 #[must_use]
1591 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1592 self.inner = self.inner.max_encoding_message_size(limit);
1593 self
1594 }
1595 pub async fn list_models(
1596 &mut self,
1597 request: impl tonic::IntoRequest<super::ListModelsRequest>,
1598 ) -> std::result::Result<
1599 tonic::Response<super::ListModelsResponse>,
1600 tonic::Status,
1601 > {
1602 self.inner
1603 .ready()
1604 .await
1605 .map_err(|e| {
1606 tonic::Status::unknown(
1607 format!("Service was not ready: {}", e.into()),
1608 )
1609 })?;
1610 let codec = tonic::codec::ProstCodec::default();
1611 let path = http::uri::PathAndQuery::from_static(
1612 "/nominal.ai.v1.AIAgentService/ListModels",
1613 );
1614 let mut req = request.into_request();
1615 req.extensions_mut()
1616 .insert(GrpcMethod::new("nominal.ai.v1.AIAgentService", "ListModels"));
1617 self.inner.unary(req, path, codec).await
1618 }
1619 pub async fn stream_chat(
1620 &mut self,
1621 request: impl tonic::IntoRequest<super::StreamChatRequest>,
1622 ) -> std::result::Result<
1623 tonic::Response<tonic::codec::Streaming<super::StreamChatResponse>>,
1624 tonic::Status,
1625 > {
1626 self.inner
1627 .ready()
1628 .await
1629 .map_err(|e| {
1630 tonic::Status::unknown(
1631 format!("Service was not ready: {}", e.into()),
1632 )
1633 })?;
1634 let codec = tonic::codec::ProstCodec::default();
1635 let path = http::uri::PathAndQuery::from_static(
1636 "/nominal.ai.v1.AIAgentService/StreamChat",
1637 );
1638 let mut req = request.into_request();
1639 req.extensions_mut()
1640 .insert(GrpcMethod::new("nominal.ai.v1.AIAgentService", "StreamChat"));
1641 self.inner.server_streaming(req, path, codec).await
1642 }
1643 #[deprecated]
1644 pub async fn get_conversation(
1645 &mut self,
1646 request: impl tonic::IntoRequest<super::GetConversationRequest>,
1647 ) -> std::result::Result<
1648 tonic::Response<super::GetConversationResponse>,
1649 tonic::Status,
1650 > {
1651 self.inner
1652 .ready()
1653 .await
1654 .map_err(|e| {
1655 tonic::Status::unknown(
1656 format!("Service was not ready: {}", e.into()),
1657 )
1658 })?;
1659 let codec = tonic::codec::ProstCodec::default();
1660 let path = http::uri::PathAndQuery::from_static(
1661 "/nominal.ai.v1.AIAgentService/GetConversation",
1662 );
1663 let mut req = request.into_request();
1664 req.extensions_mut()
1665 .insert(
1666 GrpcMethod::new("nominal.ai.v1.AIAgentService", "GetConversation"),
1667 );
1668 self.inner.unary(req, path, codec).await
1669 }
1670 pub async fn get_conversation_metadata(
1671 &mut self,
1672 request: impl tonic::IntoRequest<super::GetConversationMetadataRequest>,
1673 ) -> std::result::Result<
1674 tonic::Response<super::GetConversationMetadataResponse>,
1675 tonic::Status,
1676 > {
1677 self.inner
1678 .ready()
1679 .await
1680 .map_err(|e| {
1681 tonic::Status::unknown(
1682 format!("Service was not ready: {}", e.into()),
1683 )
1684 })?;
1685 let codec = tonic::codec::ProstCodec::default();
1686 let path = http::uri::PathAndQuery::from_static(
1687 "/nominal.ai.v1.AIAgentService/GetConversationMetadata",
1688 );
1689 let mut req = request.into_request();
1690 req.extensions_mut()
1691 .insert(
1692 GrpcMethod::new(
1693 "nominal.ai.v1.AIAgentService",
1694 "GetConversationMetadata",
1695 ),
1696 );
1697 self.inner.unary(req, path, codec).await
1698 }
1699 pub async fn get_conversation_messages(
1700 &mut self,
1701 request: impl tonic::IntoRequest<super::GetConversationMessagesRequest>,
1702 ) -> std::result::Result<
1703 tonic::Response<super::GetConversationMessagesResponse>,
1704 tonic::Status,
1705 > {
1706 self.inner
1707 .ready()
1708 .await
1709 .map_err(|e| {
1710 tonic::Status::unknown(
1711 format!("Service was not ready: {}", e.into()),
1712 )
1713 })?;
1714 let codec = tonic::codec::ProstCodec::default();
1715 let path = http::uri::PathAndQuery::from_static(
1716 "/nominal.ai.v1.AIAgentService/GetConversationMessages",
1717 );
1718 let mut req = request.into_request();
1719 req.extensions_mut()
1720 .insert(
1721 GrpcMethod::new(
1722 "nominal.ai.v1.AIAgentService",
1723 "GetConversationMessages",
1724 ),
1725 );
1726 self.inner.unary(req, path, codec).await
1727 }
1728 pub async fn list_conversations(
1729 &mut self,
1730 request: impl tonic::IntoRequest<super::ListConversationsRequest>,
1731 ) -> std::result::Result<
1732 tonic::Response<super::ListConversationsResponse>,
1733 tonic::Status,
1734 > {
1735 self.inner
1736 .ready()
1737 .await
1738 .map_err(|e| {
1739 tonic::Status::unknown(
1740 format!("Service was not ready: {}", e.into()),
1741 )
1742 })?;
1743 let codec = tonic::codec::ProstCodec::default();
1744 let path = http::uri::PathAndQuery::from_static(
1745 "/nominal.ai.v1.AIAgentService/ListConversations",
1746 );
1747 let mut req = request.into_request();
1748 req.extensions_mut()
1749 .insert(
1750 GrpcMethod::new("nominal.ai.v1.AIAgentService", "ListConversations"),
1751 );
1752 self.inner.unary(req, path, codec).await
1753 }
1754 pub async fn batch_get_conversation_active_runs(
1755 &mut self,
1756 request: impl tonic::IntoRequest<
1757 super::BatchGetConversationActiveRunsRequest,
1758 >,
1759 ) -> std::result::Result<
1760 tonic::Response<super::BatchGetConversationActiveRunsResponse>,
1761 tonic::Status,
1762 > {
1763 self.inner
1764 .ready()
1765 .await
1766 .map_err(|e| {
1767 tonic::Status::unknown(
1768 format!("Service was not ready: {}", e.into()),
1769 )
1770 })?;
1771 let codec = tonic::codec::ProstCodec::default();
1772 let path = http::uri::PathAndQuery::from_static(
1773 "/nominal.ai.v1.AIAgentService/BatchGetConversationActiveRuns",
1774 );
1775 let mut req = request.into_request();
1776 req.extensions_mut()
1777 .insert(
1778 GrpcMethod::new(
1779 "nominal.ai.v1.AIAgentService",
1780 "BatchGetConversationActiveRuns",
1781 ),
1782 );
1783 self.inner.unary(req, path, codec).await
1784 }
1785 pub async fn create_conversation(
1786 &mut self,
1787 request: impl tonic::IntoRequest<super::CreateConversationRequest>,
1788 ) -> std::result::Result<
1789 tonic::Response<super::CreateConversationResponse>,
1790 tonic::Status,
1791 > {
1792 self.inner
1793 .ready()
1794 .await
1795 .map_err(|e| {
1796 tonic::Status::unknown(
1797 format!("Service was not ready: {}", e.into()),
1798 )
1799 })?;
1800 let codec = tonic::codec::ProstCodec::default();
1801 let path = http::uri::PathAndQuery::from_static(
1802 "/nominal.ai.v1.AIAgentService/CreateConversation",
1803 );
1804 let mut req = request.into_request();
1805 req.extensions_mut()
1806 .insert(
1807 GrpcMethod::new("nominal.ai.v1.AIAgentService", "CreateConversation"),
1808 );
1809 self.inner.unary(req, path, codec).await
1810 }
1811 pub async fn update_conversation_metadata(
1812 &mut self,
1813 request: impl tonic::IntoRequest<super::UpdateConversationMetadataRequest>,
1814 ) -> std::result::Result<
1815 tonic::Response<super::UpdateConversationMetadataResponse>,
1816 tonic::Status,
1817 > {
1818 self.inner
1819 .ready()
1820 .await
1821 .map_err(|e| {
1822 tonic::Status::unknown(
1823 format!("Service was not ready: {}", e.into()),
1824 )
1825 })?;
1826 let codec = tonic::codec::ProstCodec::default();
1827 let path = http::uri::PathAndQuery::from_static(
1828 "/nominal.ai.v1.AIAgentService/UpdateConversationMetadata",
1829 );
1830 let mut req = request.into_request();
1831 req.extensions_mut()
1832 .insert(
1833 GrpcMethod::new(
1834 "nominal.ai.v1.AIAgentService",
1835 "UpdateConversationMetadata",
1836 ),
1837 );
1838 self.inner.unary(req, path, codec).await
1839 }
1840 pub async fn delete_conversation(
1841 &mut self,
1842 request: impl tonic::IntoRequest<super::DeleteConversationRequest>,
1843 ) -> std::result::Result<
1844 tonic::Response<super::DeleteConversationResponse>,
1845 tonic::Status,
1846 > {
1847 self.inner
1848 .ready()
1849 .await
1850 .map_err(|e| {
1851 tonic::Status::unknown(
1852 format!("Service was not ready: {}", e.into()),
1853 )
1854 })?;
1855 let codec = tonic::codec::ProstCodec::default();
1856 let path = http::uri::PathAndQuery::from_static(
1857 "/nominal.ai.v1.AIAgentService/DeleteConversation",
1858 );
1859 let mut req = request.into_request();
1860 req.extensions_mut()
1861 .insert(
1862 GrpcMethod::new("nominal.ai.v1.AIAgentService", "DeleteConversation"),
1863 );
1864 self.inner.unary(req, path, codec).await
1865 }
1866 pub async fn archive_conversation(
1867 &mut self,
1868 request: impl tonic::IntoRequest<super::ArchiveConversationRequest>,
1869 ) -> std::result::Result<
1870 tonic::Response<super::ArchiveConversationResponse>,
1871 tonic::Status,
1872 > {
1873 self.inner
1874 .ready()
1875 .await
1876 .map_err(|e| {
1877 tonic::Status::unknown(
1878 format!("Service was not ready: {}", e.into()),
1879 )
1880 })?;
1881 let codec = tonic::codec::ProstCodec::default();
1882 let path = http::uri::PathAndQuery::from_static(
1883 "/nominal.ai.v1.AIAgentService/ArchiveConversation",
1884 );
1885 let mut req = request.into_request();
1886 req.extensions_mut()
1887 .insert(
1888 GrpcMethod::new(
1889 "nominal.ai.v1.AIAgentService",
1890 "ArchiveConversation",
1891 ),
1892 );
1893 self.inner.unary(req, path, codec).await
1894 }
1895 pub async fn unarchive_conversation(
1896 &mut self,
1897 request: impl tonic::IntoRequest<super::UnarchiveConversationRequest>,
1898 ) -> std::result::Result<
1899 tonic::Response<super::UnarchiveConversationResponse>,
1900 tonic::Status,
1901 > {
1902 self.inner
1903 .ready()
1904 .await
1905 .map_err(|e| {
1906 tonic::Status::unknown(
1907 format!("Service was not ready: {}", e.into()),
1908 )
1909 })?;
1910 let codec = tonic::codec::ProstCodec::default();
1911 let path = http::uri::PathAndQuery::from_static(
1912 "/nominal.ai.v1.AIAgentService/UnarchiveConversation",
1913 );
1914 let mut req = request.into_request();
1915 req.extensions_mut()
1916 .insert(
1917 GrpcMethod::new(
1918 "nominal.ai.v1.AIAgentService",
1919 "UnarchiveConversation",
1920 ),
1921 );
1922 self.inner.unary(req, path, codec).await
1923 }
1924 pub async fn get_snapshot_rid_by_user_message_id(
1925 &mut self,
1926 request: impl tonic::IntoRequest<super::GetSnapshotRidByUserMessageIdRequest>,
1927 ) -> std::result::Result<
1928 tonic::Response<super::GetSnapshotRidByUserMessageIdResponse>,
1929 tonic::Status,
1930 > {
1931 self.inner
1932 .ready()
1933 .await
1934 .map_err(|e| {
1935 tonic::Status::unknown(
1936 format!("Service was not ready: {}", e.into()),
1937 )
1938 })?;
1939 let codec = tonic::codec::ProstCodec::default();
1940 let path = http::uri::PathAndQuery::from_static(
1941 "/nominal.ai.v1.AIAgentService/GetSnapshotRidByUserMessageId",
1942 );
1943 let mut req = request.into_request();
1944 req.extensions_mut()
1945 .insert(
1946 GrpcMethod::new(
1947 "nominal.ai.v1.AIAgentService",
1948 "GetSnapshotRidByUserMessageId",
1949 ),
1950 );
1951 self.inner.unary(req, path, codec).await
1952 }
1953 pub async fn compact_conversation(
1954 &mut self,
1955 request: impl tonic::IntoRequest<super::CompactConversationRequest>,
1956 ) -> std::result::Result<
1957 tonic::Response<super::CompactConversationResponse>,
1958 tonic::Status,
1959 > {
1960 self.inner
1961 .ready()
1962 .await
1963 .map_err(|e| {
1964 tonic::Status::unknown(
1965 format!("Service was not ready: {}", e.into()),
1966 )
1967 })?;
1968 let codec = tonic::codec::ProstCodec::default();
1969 let path = http::uri::PathAndQuery::from_static(
1970 "/nominal.ai.v1.AIAgentService/CompactConversation",
1971 );
1972 let mut req = request.into_request();
1973 req.extensions_mut()
1974 .insert(
1975 GrpcMethod::new(
1976 "nominal.ai.v1.AIAgentService",
1977 "CompactConversation",
1978 ),
1979 );
1980 self.inner.unary(req, path, codec).await
1981 }
1982 pub async fn submit_message_feedback(
1983 &mut self,
1984 request: impl tonic::IntoRequest<super::SubmitMessageFeedbackRequest>,
1985 ) -> std::result::Result<
1986 tonic::Response<super::SubmitMessageFeedbackResponse>,
1987 tonic::Status,
1988 > {
1989 self.inner
1990 .ready()
1991 .await
1992 .map_err(|e| {
1993 tonic::Status::unknown(
1994 format!("Service was not ready: {}", e.into()),
1995 )
1996 })?;
1997 let codec = tonic::codec::ProstCodec::default();
1998 let path = http::uri::PathAndQuery::from_static(
1999 "/nominal.ai.v1.AIAgentService/SubmitMessageFeedback",
2000 );
2001 let mut req = request.into_request();
2002 req.extensions_mut()
2003 .insert(
2004 GrpcMethod::new(
2005 "nominal.ai.v1.AIAgentService",
2006 "SubmitMessageFeedback",
2007 ),
2008 );
2009 self.inner.unary(req, path, codec).await
2010 }
2011 pub async fn update_conversation_resources(
2012 &mut self,
2013 request: impl tonic::IntoRequest<super::UpdateConversationResourcesRequest>,
2014 ) -> std::result::Result<
2015 tonic::Response<super::UpdateConversationResourcesResponse>,
2016 tonic::Status,
2017 > {
2018 self.inner
2019 .ready()
2020 .await
2021 .map_err(|e| {
2022 tonic::Status::unknown(
2023 format!("Service was not ready: {}", e.into()),
2024 )
2025 })?;
2026 let codec = tonic::codec::ProstCodec::default();
2027 let path = http::uri::PathAndQuery::from_static(
2028 "/nominal.ai.v1.AIAgentService/UpdateConversationResources",
2029 );
2030 let mut req = request.into_request();
2031 req.extensions_mut()
2032 .insert(
2033 GrpcMethod::new(
2034 "nominal.ai.v1.AIAgentService",
2035 "UpdateConversationResources",
2036 ),
2037 );
2038 self.inner.unary(req, path, codec).await
2039 }
2040 pub async fn create_queued_message(
2041 &mut self,
2042 request: impl tonic::IntoRequest<super::CreateQueuedMessageRequest>,
2043 ) -> std::result::Result<
2044 tonic::Response<super::CreateQueuedMessageResponse>,
2045 tonic::Status,
2046 > {
2047 self.inner
2048 .ready()
2049 .await
2050 .map_err(|e| {
2051 tonic::Status::unknown(
2052 format!("Service was not ready: {}", e.into()),
2053 )
2054 })?;
2055 let codec = tonic::codec::ProstCodec::default();
2056 let path = http::uri::PathAndQuery::from_static(
2057 "/nominal.ai.v1.AIAgentService/CreateQueuedMessage",
2058 );
2059 let mut req = request.into_request();
2060 req.extensions_mut()
2061 .insert(
2062 GrpcMethod::new(
2063 "nominal.ai.v1.AIAgentService",
2064 "CreateQueuedMessage",
2065 ),
2066 );
2067 self.inner.unary(req, path, codec).await
2068 }
2069 pub async fn list_queued_messages(
2070 &mut self,
2071 request: impl tonic::IntoRequest<super::ListQueuedMessagesRequest>,
2072 ) -> std::result::Result<
2073 tonic::Response<super::ListQueuedMessagesResponse>,
2074 tonic::Status,
2075 > {
2076 self.inner
2077 .ready()
2078 .await
2079 .map_err(|e| {
2080 tonic::Status::unknown(
2081 format!("Service was not ready: {}", e.into()),
2082 )
2083 })?;
2084 let codec = tonic::codec::ProstCodec::default();
2085 let path = http::uri::PathAndQuery::from_static(
2086 "/nominal.ai.v1.AIAgentService/ListQueuedMessages",
2087 );
2088 let mut req = request.into_request();
2089 req.extensions_mut()
2090 .insert(
2091 GrpcMethod::new("nominal.ai.v1.AIAgentService", "ListQueuedMessages"),
2092 );
2093 self.inner.unary(req, path, codec).await
2094 }
2095 pub async fn delete_queued_message(
2096 &mut self,
2097 request: impl tonic::IntoRequest<super::DeleteQueuedMessageRequest>,
2098 ) -> std::result::Result<
2099 tonic::Response<super::DeleteQueuedMessageResponse>,
2100 tonic::Status,
2101 > {
2102 self.inner
2103 .ready()
2104 .await
2105 .map_err(|e| {
2106 tonic::Status::unknown(
2107 format!("Service was not ready: {}", e.into()),
2108 )
2109 })?;
2110 let codec = tonic::codec::ProstCodec::default();
2111 let path = http::uri::PathAndQuery::from_static(
2112 "/nominal.ai.v1.AIAgentService/DeleteQueuedMessage",
2113 );
2114 let mut req = request.into_request();
2115 req.extensions_mut()
2116 .insert(
2117 GrpcMethod::new(
2118 "nominal.ai.v1.AIAgentService",
2119 "DeleteQueuedMessage",
2120 ),
2121 );
2122 self.inner.unary(req, path, codec).await
2123 }
2124 pub async fn cancel_agent_run(
2125 &mut self,
2126 request: impl tonic::IntoRequest<super::CancelAgentRunRequest>,
2127 ) -> std::result::Result<
2128 tonic::Response<super::CancelAgentRunResponse>,
2129 tonic::Status,
2130 > {
2131 self.inner
2132 .ready()
2133 .await
2134 .map_err(|e| {
2135 tonic::Status::unknown(
2136 format!("Service was not ready: {}", e.into()),
2137 )
2138 })?;
2139 let codec = tonic::codec::ProstCodec::default();
2140 let path = http::uri::PathAndQuery::from_static(
2141 "/nominal.ai.v1.AIAgentService/CancelAgentRun",
2142 );
2143 let mut req = request.into_request();
2144 req.extensions_mut()
2145 .insert(
2146 GrpcMethod::new("nominal.ai.v1.AIAgentService", "CancelAgentRun"),
2147 );
2148 self.inner.unary(req, path, codec).await
2149 }
2150 pub async fn batch_get_citations(
2151 &mut self,
2152 request: impl tonic::IntoRequest<super::BatchGetCitationsRequest>,
2153 ) -> std::result::Result<
2154 tonic::Response<super::BatchGetCitationsResponse>,
2155 tonic::Status,
2156 > {
2157 self.inner
2158 .ready()
2159 .await
2160 .map_err(|e| {
2161 tonic::Status::unknown(
2162 format!("Service was not ready: {}", e.into()),
2163 )
2164 })?;
2165 let codec = tonic::codec::ProstCodec::default();
2166 let path = http::uri::PathAndQuery::from_static(
2167 "/nominal.ai.v1.AIAgentService/BatchGetCitations",
2168 );
2169 let mut req = request.into_request();
2170 req.extensions_mut()
2171 .insert(
2172 GrpcMethod::new("nominal.ai.v1.AIAgentService", "BatchGetCitations"),
2173 );
2174 self.inner.unary(req, path, codec).await
2175 }
2176 }
2177}
2178#[derive(Clone, PartialEq, ::prost::Message)]
2179pub struct ClassifyErrorRequest {
2180 #[prost(string, tag = "1")]
2181 pub error_message: ::prost::alloc::string::String,
2182}
2183#[derive(Clone, PartialEq, ::prost::Message)]
2184pub struct ClassifyErrorResponse {
2185 #[prost(enumeration = "ErrorClassification", tag = "1")]
2186 pub classification: i32,
2187 #[prost(string, tag = "2")]
2188 pub reason: ::prost::alloc::string::String,
2189}
2190#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2191#[repr(i32)]
2192pub enum ErrorClassification {
2193 Unspecified = 0,
2194 Client = 1,
2195 Server = 2,
2196}
2197impl ErrorClassification {
2198 pub fn as_str_name(&self) -> &'static str {
2203 match self {
2204 Self::Unspecified => "ERROR_CLASSIFICATION_UNSPECIFIED",
2205 Self::Client => "ERROR_CLASSIFICATION_CLIENT",
2206 Self::Server => "ERROR_CLASSIFICATION_SERVER",
2207 }
2208 }
2209 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2211 match value {
2212 "ERROR_CLASSIFICATION_UNSPECIFIED" => Some(Self::Unspecified),
2213 "ERROR_CLASSIFICATION_CLIENT" => Some(Self::Client),
2214 "ERROR_CLASSIFICATION_SERVER" => Some(Self::Server),
2215 _ => None,
2216 }
2217 }
2218}
2219pub mod data_ingestion_error_classifier_service_client {
2221 #![allow(
2222 unused_variables,
2223 dead_code,
2224 missing_docs,
2225 clippy::wildcard_imports,
2226 clippy::let_unit_value,
2227 )]
2228 use tonic::codegen::*;
2229 use tonic::codegen::http::Uri;
2230 #[derive(Debug, Clone)]
2231 pub struct DataIngestionErrorClassifierServiceClient<T> {
2232 inner: tonic::client::Grpc<T>,
2233 }
2234 impl DataIngestionErrorClassifierServiceClient<tonic::transport::Channel> {
2235 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
2237 where
2238 D: TryInto<tonic::transport::Endpoint>,
2239 D::Error: Into<StdError>,
2240 {
2241 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
2242 Ok(Self::new(conn))
2243 }
2244 }
2245 impl<T> DataIngestionErrorClassifierServiceClient<T>
2246 where
2247 T: tonic::client::GrpcService<tonic::body::Body>,
2248 T::Error: Into<StdError>,
2249 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
2250 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
2251 {
2252 pub fn new(inner: T) -> Self {
2253 let inner = tonic::client::Grpc::new(inner);
2254 Self { inner }
2255 }
2256 pub fn with_origin(inner: T, origin: Uri) -> Self {
2257 let inner = tonic::client::Grpc::with_origin(inner, origin);
2258 Self { inner }
2259 }
2260 pub fn with_interceptor<F>(
2261 inner: T,
2262 interceptor: F,
2263 ) -> DataIngestionErrorClassifierServiceClient<InterceptedService<T, F>>
2264 where
2265 F: tonic::service::Interceptor,
2266 T::ResponseBody: Default,
2267 T: tonic::codegen::Service<
2268 http::Request<tonic::body::Body>,
2269 Response = http::Response<
2270 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
2271 >,
2272 >,
2273 <T as tonic::codegen::Service<
2274 http::Request<tonic::body::Body>,
2275 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
2276 {
2277 DataIngestionErrorClassifierServiceClient::new(
2278 InterceptedService::new(inner, interceptor),
2279 )
2280 }
2281 #[must_use]
2286 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
2287 self.inner = self.inner.send_compressed(encoding);
2288 self
2289 }
2290 #[must_use]
2292 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
2293 self.inner = self.inner.accept_compressed(encoding);
2294 self
2295 }
2296 #[must_use]
2300 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
2301 self.inner = self.inner.max_decoding_message_size(limit);
2302 self
2303 }
2304 #[must_use]
2308 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
2309 self.inner = self.inner.max_encoding_message_size(limit);
2310 self
2311 }
2312 pub async fn classify_error(
2313 &mut self,
2314 request: impl tonic::IntoRequest<super::ClassifyErrorRequest>,
2315 ) -> std::result::Result<
2316 tonic::Response<super::ClassifyErrorResponse>,
2317 tonic::Status,
2318 > {
2319 self.inner
2320 .ready()
2321 .await
2322 .map_err(|e| {
2323 tonic::Status::unknown(
2324 format!("Service was not ready: {}", e.into()),
2325 )
2326 })?;
2327 let codec = tonic::codec::ProstCodec::default();
2328 let path = http::uri::PathAndQuery::from_static(
2329 "/nominal.ai.v1.DataIngestionErrorClassifierService/ClassifyError",
2330 );
2331 let mut req = request.into_request();
2332 req.extensions_mut()
2333 .insert(
2334 GrpcMethod::new(
2335 "nominal.ai.v1.DataIngestionErrorClassifierService",
2336 "ClassifyError",
2337 ),
2338 );
2339 self.inner.unary(req, path, codec).await
2340 }
2341 }
2342}
2343#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2344pub struct GetProviderStatusRequest {}
2345#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2346pub struct GetProviderStatusResponse {
2347 #[prost(message, optional, tag = "1")]
2348 pub timestamp: ::core::option::Option<
2349 super::super::super::google::protobuf::Timestamp,
2350 >,
2351 #[prost(message, optional, tag = "2")]
2352 pub last_status: ::core::option::Option<ProviderStatus>,
2353 #[deprecated]
2354 #[prost(message, optional, tag = "3")]
2355 pub aggregated_status_over_last_30m: ::core::option::Option<ProviderStatus>,
2356 #[prost(message, optional, tag = "4")]
2357 pub aggregated_status: ::core::option::Option<ProviderStatus>,
2358}
2359#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2360pub struct ProviderStatus {
2361 #[prost(oneof = "provider_status::Status", tags = "1, 2")]
2362 pub status: ::core::option::Option<provider_status::Status>,
2363}
2364pub mod provider_status {
2366 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
2367 pub enum Status {
2368 #[prost(message, tag = "1")]
2369 Healthy(super::Healthy),
2370 #[prost(message, tag = "2")]
2371 Degraded(super::Degraded),
2372 }
2373}
2374#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2375pub struct Healthy {}
2376#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2377pub struct Degraded {
2378 #[prost(enumeration = "DegradationReason", tag = "1")]
2379 pub reason: i32,
2380}
2381#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2382pub struct ProviderMetrics {
2383 #[prost(int32, tag = "1")]
2384 pub time_to_first_token_ms: i32,
2385 #[prost(int32, tag = "2")]
2386 pub total_time_ms: i32,
2387}
2388#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2389#[repr(i32)]
2390pub enum DegradationReason {
2391 Unspecified = 0,
2392 HighLatency = 1,
2393 Failures = 2,
2394 HighLatencyAndFailures = 3,
2395 Unavailable = 4,
2396}
2397impl DegradationReason {
2398 pub fn as_str_name(&self) -> &'static str {
2403 match self {
2404 Self::Unspecified => "DEGRADATION_REASON_UNSPECIFIED",
2405 Self::HighLatency => "DEGRADATION_REASON_HIGH_LATENCY",
2406 Self::Failures => "DEGRADATION_REASON_FAILURES",
2407 Self::HighLatencyAndFailures => {
2408 "DEGRADATION_REASON_HIGH_LATENCY_AND_FAILURES"
2409 }
2410 Self::Unavailable => "DEGRADATION_REASON_UNAVAILABLE",
2411 }
2412 }
2413 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2415 match value {
2416 "DEGRADATION_REASON_UNSPECIFIED" => Some(Self::Unspecified),
2417 "DEGRADATION_REASON_HIGH_LATENCY" => Some(Self::HighLatency),
2418 "DEGRADATION_REASON_FAILURES" => Some(Self::Failures),
2419 "DEGRADATION_REASON_HIGH_LATENCY_AND_FAILURES" => {
2420 Some(Self::HighLatencyAndFailures)
2421 }
2422 "DEGRADATION_REASON_UNAVAILABLE" => Some(Self::Unavailable),
2423 _ => None,
2424 }
2425 }
2426}
2427pub mod model_provider_health_service_client {
2429 #![allow(
2430 unused_variables,
2431 dead_code,
2432 missing_docs,
2433 clippy::wildcard_imports,
2434 clippy::let_unit_value,
2435 )]
2436 use tonic::codegen::*;
2437 use tonic::codegen::http::Uri;
2438 #[derive(Debug, Clone)]
2439 pub struct ModelProviderHealthServiceClient<T> {
2440 inner: tonic::client::Grpc<T>,
2441 }
2442 impl ModelProviderHealthServiceClient<tonic::transport::Channel> {
2443 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
2445 where
2446 D: TryInto<tonic::transport::Endpoint>,
2447 D::Error: Into<StdError>,
2448 {
2449 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
2450 Ok(Self::new(conn))
2451 }
2452 }
2453 impl<T> ModelProviderHealthServiceClient<T>
2454 where
2455 T: tonic::client::GrpcService<tonic::body::Body>,
2456 T::Error: Into<StdError>,
2457 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
2458 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
2459 {
2460 pub fn new(inner: T) -> Self {
2461 let inner = tonic::client::Grpc::new(inner);
2462 Self { inner }
2463 }
2464 pub fn with_origin(inner: T, origin: Uri) -> Self {
2465 let inner = tonic::client::Grpc::with_origin(inner, origin);
2466 Self { inner }
2467 }
2468 pub fn with_interceptor<F>(
2469 inner: T,
2470 interceptor: F,
2471 ) -> ModelProviderHealthServiceClient<InterceptedService<T, F>>
2472 where
2473 F: tonic::service::Interceptor,
2474 T::ResponseBody: Default,
2475 T: tonic::codegen::Service<
2476 http::Request<tonic::body::Body>,
2477 Response = http::Response<
2478 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
2479 >,
2480 >,
2481 <T as tonic::codegen::Service<
2482 http::Request<tonic::body::Body>,
2483 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
2484 {
2485 ModelProviderHealthServiceClient::new(
2486 InterceptedService::new(inner, interceptor),
2487 )
2488 }
2489 #[must_use]
2494 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
2495 self.inner = self.inner.send_compressed(encoding);
2496 self
2497 }
2498 #[must_use]
2500 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
2501 self.inner = self.inner.accept_compressed(encoding);
2502 self
2503 }
2504 #[must_use]
2508 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
2509 self.inner = self.inner.max_decoding_message_size(limit);
2510 self
2511 }
2512 #[must_use]
2516 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
2517 self.inner = self.inner.max_encoding_message_size(limit);
2518 self
2519 }
2520 pub async fn get_provider_status(
2521 &mut self,
2522 request: impl tonic::IntoRequest<super::GetProviderStatusRequest>,
2523 ) -> std::result::Result<
2524 tonic::Response<super::GetProviderStatusResponse>,
2525 tonic::Status,
2526 > {
2527 self.inner
2528 .ready()
2529 .await
2530 .map_err(|e| {
2531 tonic::Status::unknown(
2532 format!("Service was not ready: {}", e.into()),
2533 )
2534 })?;
2535 let codec = tonic::codec::ProstCodec::default();
2536 let path = http::uri::PathAndQuery::from_static(
2537 "/nominal.ai.v1.ModelProviderHealthService/GetProviderStatus",
2538 );
2539 let mut req = request.into_request();
2540 req.extensions_mut()
2541 .insert(
2542 GrpcMethod::new(
2543 "nominal.ai.v1.ModelProviderHealthService",
2544 "GetProviderStatus",
2545 ),
2546 );
2547 self.inner.unary(req, path, codec).await
2548 }
2549 }
2550}