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(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}
230pub 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}
330pub 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}
349pub 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}
466pub 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}
637pub 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}
662pub 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}
677pub 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}
714pub 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}
765pub 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 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 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}
913pub 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}
938pub 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}
953pub 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}
968pub 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}
1029pub 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, PartialEq, ::prost::Message)]
1061pub struct ComputeProvenanceV1 {
1062 #[prost(string, tag = "1")]
1063 pub compute_request_json: ::prost::alloc::string::String,
1064 #[prost(string, tag = "2")]
1065 pub label: ::prost::alloc::string::String,
1066 #[prost(string, optional, tag = "3")]
1067 pub code: ::core::option::Option<::prost::alloc::string::String>,
1068 #[prost(enumeration = "ComputeOutputType", tag = "4")]
1069 pub output_type: i32,
1070}
1071#[derive(Clone, PartialEq, ::prost::Message)]
1072pub struct Citation {
1073 #[prost(string, tag = "1")]
1074 pub r#ref: ::prost::alloc::string::String,
1075 #[prost(string, tag = "2")]
1076 pub label: ::prost::alloc::string::String,
1077 #[prost(message, optional, tag = "3")]
1078 pub retrieved_at: ::core::option::Option<
1079 super::super::super::google::protobuf::Timestamp,
1080 >,
1081 #[prost(uint32, optional, tag = "5")]
1082 pub number: ::core::option::Option<u32>,
1083 #[prost(oneof = "citation::Payload", tags = "4")]
1084 pub payload: ::core::option::Option<citation::Payload>,
1085}
1086pub mod citation {
1088 #[derive(Clone, PartialEq, ::prost::Oneof)]
1089 pub enum Payload {
1090 #[prost(message, tag = "4")]
1091 Telemetry(super::TelemetryCitation),
1092 }
1093}
1094#[derive(Clone, PartialEq, ::prost::Message)]
1095pub struct TelemetryCitation {
1096 #[prost(oneof = "telemetry_citation::Version", tags = "1")]
1097 pub version: ::core::option::Option<telemetry_citation::Version>,
1098}
1099pub mod telemetry_citation {
1101 #[derive(Clone, PartialEq, ::prost::Oneof)]
1102 pub enum Version {
1103 #[prost(message, tag = "1")]
1104 V1(super::ComputeProvenanceV1),
1105 }
1106}
1107#[derive(Clone, PartialEq, ::prost::Message)]
1108pub struct BatchGetCitationsRequest {
1109 #[prost(string, tag = "1")]
1110 pub conversation_rid: ::prost::alloc::string::String,
1111 #[prost(string, repeated, tag = "2")]
1112 pub refs: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1113}
1114#[derive(Clone, PartialEq, ::prost::Message)]
1115pub struct BatchGetCitationsResponse {
1116 #[prost(message, repeated, tag = "1")]
1117 pub citations: ::prost::alloc::vec::Vec<Citation>,
1118 #[prost(message, repeated, tag = "2")]
1119 pub errors: ::prost::alloc::vec::Vec<GetCitationResponseError>,
1120}
1121#[derive(Clone, PartialEq, ::prost::Message)]
1122pub struct GetCitationResponseError {
1123 #[prost(string, tag = "1")]
1124 pub r#ref: ::prost::alloc::string::String,
1125 #[prost(enumeration = "get_citation_response_error::Reason", tag = "2")]
1126 pub reason: i32,
1127}
1128pub mod get_citation_response_error {
1130 #[derive(
1131 Clone,
1132 Copy,
1133 Debug,
1134 PartialEq,
1135 Eq,
1136 Hash,
1137 PartialOrd,
1138 Ord,
1139 ::prost::Enumeration
1140 )]
1141 #[repr(i32)]
1142 pub enum Reason {
1143 Unspecified = 0,
1144 NotFound = 1,
1145 }
1146 impl Reason {
1147 pub fn as_str_name(&self) -> &'static str {
1152 match self {
1153 Self::Unspecified => "REASON_UNSPECIFIED",
1154 Self::NotFound => "REASON_NOT_FOUND",
1155 }
1156 }
1157 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1159 match value {
1160 "REASON_UNSPECIFIED" => Some(Self::Unspecified),
1161 "REASON_NOT_FOUND" => Some(Self::NotFound),
1162 _ => None,
1163 }
1164 }
1165 }
1166}
1167#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1168#[repr(i32)]
1169pub enum QueuedMessageState {
1170 Unspecified = 0,
1171 Queued = 1,
1172 Dispatching = 2,
1173 Failed = 3,
1174}
1175impl QueuedMessageState {
1176 pub fn as_str_name(&self) -> &'static str {
1181 match self {
1182 Self::Unspecified => "QUEUED_MESSAGE_STATE_UNSPECIFIED",
1183 Self::Queued => "QUEUED_MESSAGE_STATE_QUEUED",
1184 Self::Dispatching => "QUEUED_MESSAGE_STATE_DISPATCHING",
1185 Self::Failed => "QUEUED_MESSAGE_STATE_FAILED",
1186 }
1187 }
1188 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1190 match value {
1191 "QUEUED_MESSAGE_STATE_UNSPECIFIED" => Some(Self::Unspecified),
1192 "QUEUED_MESSAGE_STATE_QUEUED" => Some(Self::Queued),
1193 "QUEUED_MESSAGE_STATE_DISPATCHING" => Some(Self::Dispatching),
1194 "QUEUED_MESSAGE_STATE_FAILED" => Some(Self::Failed),
1195 _ => None,
1196 }
1197 }
1198}
1199#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1200#[repr(i32)]
1201pub enum FeedbackVote {
1202 Unspecified = 0,
1203 ThumbsUp = 1,
1204 ThumbsDown = 2,
1205}
1206impl FeedbackVote {
1207 pub fn as_str_name(&self) -> &'static str {
1212 match self {
1213 Self::Unspecified => "FEEDBACK_VOTE_UNSPECIFIED",
1214 Self::ThumbsUp => "FEEDBACK_VOTE_THUMBS_UP",
1215 Self::ThumbsDown => "FEEDBACK_VOTE_THUMBS_DOWN",
1216 }
1217 }
1218 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1220 match value {
1221 "FEEDBACK_VOTE_UNSPECIFIED" => Some(Self::Unspecified),
1222 "FEEDBACK_VOTE_THUMBS_UP" => Some(Self::ThumbsUp),
1223 "FEEDBACK_VOTE_THUMBS_DOWN" => Some(Self::ThumbsDown),
1224 _ => None,
1225 }
1226 }
1227}
1228#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1229#[repr(i32)]
1230pub enum AgentRunExecutionMode {
1231 Unspecified = 0,
1232 Inline = 1,
1233 Durable = 2,
1234}
1235impl AgentRunExecutionMode {
1236 pub fn as_str_name(&self) -> &'static str {
1241 match self {
1242 Self::Unspecified => "AGENT_RUN_EXECUTION_MODE_UNSPECIFIED",
1243 Self::Inline => "AGENT_RUN_EXECUTION_MODE_INLINE",
1244 Self::Durable => "AGENT_RUN_EXECUTION_MODE_DURABLE",
1245 }
1246 }
1247 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1249 match value {
1250 "AGENT_RUN_EXECUTION_MODE_UNSPECIFIED" => Some(Self::Unspecified),
1251 "AGENT_RUN_EXECUTION_MODE_INLINE" => Some(Self::Inline),
1252 "AGENT_RUN_EXECUTION_MODE_DURABLE" => Some(Self::Durable),
1253 _ => None,
1254 }
1255 }
1256}
1257#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1258#[repr(i32)]
1259pub enum ToolCallStatus {
1260 Unspecified = 0,
1261 Approved = 1,
1262 Denied = 2,
1263 AwaitingApproval = 3,
1264}
1265impl ToolCallStatus {
1266 pub fn as_str_name(&self) -> &'static str {
1271 match self {
1272 Self::Unspecified => "TOOL_CALL_STATUS_UNSPECIFIED",
1273 Self::Approved => "TOOL_CALL_STATUS_APPROVED",
1274 Self::Denied => "TOOL_CALL_STATUS_DENIED",
1275 Self::AwaitingApproval => "TOOL_CALL_STATUS_AWAITING_APPROVAL",
1276 }
1277 }
1278 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1280 match value {
1281 "TOOL_CALL_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
1282 "TOOL_CALL_STATUS_APPROVED" => Some(Self::Approved),
1283 "TOOL_CALL_STATUS_DENIED" => Some(Self::Denied),
1284 "TOOL_CALL_STATUS_AWAITING_APPROVAL" => Some(Self::AwaitingApproval),
1285 _ => None,
1286 }
1287 }
1288}
1289#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1290#[repr(i32)]
1291pub enum UserQuestionState {
1292 Unspecified = 0,
1293 Pending = 1,
1294 Answered = 2,
1295 Declined = 3,
1296}
1297impl UserQuestionState {
1298 pub fn as_str_name(&self) -> &'static str {
1303 match self {
1304 Self::Unspecified => "USER_QUESTION_STATE_UNSPECIFIED",
1305 Self::Pending => "USER_QUESTION_STATE_PENDING",
1306 Self::Answered => "USER_QUESTION_STATE_ANSWERED",
1307 Self::Declined => "USER_QUESTION_STATE_DECLINED",
1308 }
1309 }
1310 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1312 match value {
1313 "USER_QUESTION_STATE_UNSPECIFIED" => Some(Self::Unspecified),
1314 "USER_QUESTION_STATE_PENDING" => Some(Self::Pending),
1315 "USER_QUESTION_STATE_ANSWERED" => Some(Self::Answered),
1316 "USER_QUESTION_STATE_DECLINED" => Some(Self::Declined),
1317 _ => None,
1318 }
1319 }
1320}
1321#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1322#[repr(i32)]
1323pub enum TimeRangeType {
1324 Unspecified = 0,
1325 Absolute = 1,
1326 Relative = 2,
1327}
1328impl TimeRangeType {
1329 pub fn as_str_name(&self) -> &'static str {
1334 match self {
1335 Self::Unspecified => "TIME_RANGE_TYPE_UNSPECIFIED",
1336 Self::Absolute => "TIME_RANGE_TYPE_ABSOLUTE",
1337 Self::Relative => "TIME_RANGE_TYPE_RELATIVE",
1338 }
1339 }
1340 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1342 match value {
1343 "TIME_RANGE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
1344 "TIME_RANGE_TYPE_ABSOLUTE" => Some(Self::Absolute),
1345 "TIME_RANGE_TYPE_RELATIVE" => Some(Self::Relative),
1346 _ => None,
1347 }
1348 }
1349}
1350#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1351#[repr(i32)]
1352pub enum ComputeOutputType {
1353 Unspecified = 0,
1354 RangeSeries = 1,
1355 NumericSeries = 2,
1356 NumericArraySeries = 3,
1357 EnumSeries = 4,
1358 EnumArraySeries = 5,
1359 LogSeries = 6,
1360 StructSeries = 7,
1361 VideoSeries = 8,
1362 UntypedSeries = 9,
1363 GroupedSeries = 10,
1364 LastPoint = 11,
1365 LastRange = 12,
1366 CartesianPoints = 13,
1367 Cartesian3dPoints = 14,
1368 Multivariate = 15,
1369 NumericHistogram = 16,
1370 FrequencyDomain = 17,
1371 FrequencyDomainV2 = 18,
1372 BucketedFrequencyDomain = 19,
1373 NumericRangeAggregate = 20,
1374 CurveFit = 21,
1375 CurveV2 = 22,
1376}
1377impl ComputeOutputType {
1378 pub fn as_str_name(&self) -> &'static str {
1383 match self {
1384 Self::Unspecified => "COMPUTE_OUTPUT_TYPE_UNSPECIFIED",
1385 Self::RangeSeries => "COMPUTE_OUTPUT_TYPE_RANGE_SERIES",
1386 Self::NumericSeries => "COMPUTE_OUTPUT_TYPE_NUMERIC_SERIES",
1387 Self::NumericArraySeries => "COMPUTE_OUTPUT_TYPE_NUMERIC_ARRAY_SERIES",
1388 Self::EnumSeries => "COMPUTE_OUTPUT_TYPE_ENUM_SERIES",
1389 Self::EnumArraySeries => "COMPUTE_OUTPUT_TYPE_ENUM_ARRAY_SERIES",
1390 Self::LogSeries => "COMPUTE_OUTPUT_TYPE_LOG_SERIES",
1391 Self::StructSeries => "COMPUTE_OUTPUT_TYPE_STRUCT_SERIES",
1392 Self::VideoSeries => "COMPUTE_OUTPUT_TYPE_VIDEO_SERIES",
1393 Self::UntypedSeries => "COMPUTE_OUTPUT_TYPE_UNTYPED_SERIES",
1394 Self::GroupedSeries => "COMPUTE_OUTPUT_TYPE_GROUPED_SERIES",
1395 Self::LastPoint => "COMPUTE_OUTPUT_TYPE_LAST_POINT",
1396 Self::LastRange => "COMPUTE_OUTPUT_TYPE_LAST_RANGE",
1397 Self::CartesianPoints => "COMPUTE_OUTPUT_TYPE_CARTESIAN_POINTS",
1398 Self::Cartesian3dPoints => "COMPUTE_OUTPUT_TYPE_CARTESIAN_3D_POINTS",
1399 Self::Multivariate => "COMPUTE_OUTPUT_TYPE_MULTIVARIATE",
1400 Self::NumericHistogram => "COMPUTE_OUTPUT_TYPE_NUMERIC_HISTOGRAM",
1401 Self::FrequencyDomain => "COMPUTE_OUTPUT_TYPE_FREQUENCY_DOMAIN",
1402 Self::FrequencyDomainV2 => "COMPUTE_OUTPUT_TYPE_FREQUENCY_DOMAIN_V2",
1403 Self::BucketedFrequencyDomain => {
1404 "COMPUTE_OUTPUT_TYPE_BUCKETED_FREQUENCY_DOMAIN"
1405 }
1406 Self::NumericRangeAggregate => "COMPUTE_OUTPUT_TYPE_NUMERIC_RANGE_AGGREGATE",
1407 Self::CurveFit => "COMPUTE_OUTPUT_TYPE_CURVE_FIT",
1408 Self::CurveV2 => "COMPUTE_OUTPUT_TYPE_CURVE_V2",
1409 }
1410 }
1411 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1413 match value {
1414 "COMPUTE_OUTPUT_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
1415 "COMPUTE_OUTPUT_TYPE_RANGE_SERIES" => Some(Self::RangeSeries),
1416 "COMPUTE_OUTPUT_TYPE_NUMERIC_SERIES" => Some(Self::NumericSeries),
1417 "COMPUTE_OUTPUT_TYPE_NUMERIC_ARRAY_SERIES" => Some(Self::NumericArraySeries),
1418 "COMPUTE_OUTPUT_TYPE_ENUM_SERIES" => Some(Self::EnumSeries),
1419 "COMPUTE_OUTPUT_TYPE_ENUM_ARRAY_SERIES" => Some(Self::EnumArraySeries),
1420 "COMPUTE_OUTPUT_TYPE_LOG_SERIES" => Some(Self::LogSeries),
1421 "COMPUTE_OUTPUT_TYPE_STRUCT_SERIES" => Some(Self::StructSeries),
1422 "COMPUTE_OUTPUT_TYPE_VIDEO_SERIES" => Some(Self::VideoSeries),
1423 "COMPUTE_OUTPUT_TYPE_UNTYPED_SERIES" => Some(Self::UntypedSeries),
1424 "COMPUTE_OUTPUT_TYPE_GROUPED_SERIES" => Some(Self::GroupedSeries),
1425 "COMPUTE_OUTPUT_TYPE_LAST_POINT" => Some(Self::LastPoint),
1426 "COMPUTE_OUTPUT_TYPE_LAST_RANGE" => Some(Self::LastRange),
1427 "COMPUTE_OUTPUT_TYPE_CARTESIAN_POINTS" => Some(Self::CartesianPoints),
1428 "COMPUTE_OUTPUT_TYPE_CARTESIAN_3D_POINTS" => Some(Self::Cartesian3dPoints),
1429 "COMPUTE_OUTPUT_TYPE_MULTIVARIATE" => Some(Self::Multivariate),
1430 "COMPUTE_OUTPUT_TYPE_NUMERIC_HISTOGRAM" => Some(Self::NumericHistogram),
1431 "COMPUTE_OUTPUT_TYPE_FREQUENCY_DOMAIN" => Some(Self::FrequencyDomain),
1432 "COMPUTE_OUTPUT_TYPE_FREQUENCY_DOMAIN_V2" => Some(Self::FrequencyDomainV2),
1433 "COMPUTE_OUTPUT_TYPE_BUCKETED_FREQUENCY_DOMAIN" => {
1434 Some(Self::BucketedFrequencyDomain)
1435 }
1436 "COMPUTE_OUTPUT_TYPE_NUMERIC_RANGE_AGGREGATE" => {
1437 Some(Self::NumericRangeAggregate)
1438 }
1439 "COMPUTE_OUTPUT_TYPE_CURVE_FIT" => Some(Self::CurveFit),
1440 "COMPUTE_OUTPUT_TYPE_CURVE_V2" => Some(Self::CurveV2),
1441 _ => None,
1442 }
1443 }
1444}
1445pub mod ai_agent_service_client {
1447 #![allow(
1448 unused_variables,
1449 dead_code,
1450 missing_docs,
1451 clippy::wildcard_imports,
1452 clippy::let_unit_value,
1453 )]
1454 use tonic::codegen::*;
1455 use tonic::codegen::http::Uri;
1456 #[derive(Debug, Clone)]
1457 pub struct AiAgentServiceClient<T> {
1458 inner: tonic::client::Grpc<T>,
1459 }
1460 impl AiAgentServiceClient<tonic::transport::Channel> {
1461 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1463 where
1464 D: TryInto<tonic::transport::Endpoint>,
1465 D::Error: Into<StdError>,
1466 {
1467 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1468 Ok(Self::new(conn))
1469 }
1470 }
1471 impl<T> AiAgentServiceClient<T>
1472 where
1473 T: tonic::client::GrpcService<tonic::body::Body>,
1474 T::Error: Into<StdError>,
1475 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1476 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1477 {
1478 pub fn new(inner: T) -> Self {
1479 let inner = tonic::client::Grpc::new(inner);
1480 Self { inner }
1481 }
1482 pub fn with_origin(inner: T, origin: Uri) -> Self {
1483 let inner = tonic::client::Grpc::with_origin(inner, origin);
1484 Self { inner }
1485 }
1486 pub fn with_interceptor<F>(
1487 inner: T,
1488 interceptor: F,
1489 ) -> AiAgentServiceClient<InterceptedService<T, F>>
1490 where
1491 F: tonic::service::Interceptor,
1492 T::ResponseBody: Default,
1493 T: tonic::codegen::Service<
1494 http::Request<tonic::body::Body>,
1495 Response = http::Response<
1496 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
1497 >,
1498 >,
1499 <T as tonic::codegen::Service<
1500 http::Request<tonic::body::Body>,
1501 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1502 {
1503 AiAgentServiceClient::new(InterceptedService::new(inner, interceptor))
1504 }
1505 #[must_use]
1510 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1511 self.inner = self.inner.send_compressed(encoding);
1512 self
1513 }
1514 #[must_use]
1516 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1517 self.inner = self.inner.accept_compressed(encoding);
1518 self
1519 }
1520 #[must_use]
1524 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1525 self.inner = self.inner.max_decoding_message_size(limit);
1526 self
1527 }
1528 #[must_use]
1532 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1533 self.inner = self.inner.max_encoding_message_size(limit);
1534 self
1535 }
1536 pub async fn list_models(
1537 &mut self,
1538 request: impl tonic::IntoRequest<super::ListModelsRequest>,
1539 ) -> std::result::Result<
1540 tonic::Response<super::ListModelsResponse>,
1541 tonic::Status,
1542 > {
1543 self.inner
1544 .ready()
1545 .await
1546 .map_err(|e| {
1547 tonic::Status::unknown(
1548 format!("Service was not ready: {}", e.into()),
1549 )
1550 })?;
1551 let codec = tonic::codec::ProstCodec::default();
1552 let path = http::uri::PathAndQuery::from_static(
1553 "/nominal.ai.v1.AIAgentService/ListModels",
1554 );
1555 let mut req = request.into_request();
1556 req.extensions_mut()
1557 .insert(GrpcMethod::new("nominal.ai.v1.AIAgentService", "ListModels"));
1558 self.inner.unary(req, path, codec).await
1559 }
1560 pub async fn stream_chat(
1561 &mut self,
1562 request: impl tonic::IntoRequest<super::StreamChatRequest>,
1563 ) -> std::result::Result<
1564 tonic::Response<tonic::codec::Streaming<super::StreamChatResponse>>,
1565 tonic::Status,
1566 > {
1567 self.inner
1568 .ready()
1569 .await
1570 .map_err(|e| {
1571 tonic::Status::unknown(
1572 format!("Service was not ready: {}", e.into()),
1573 )
1574 })?;
1575 let codec = tonic::codec::ProstCodec::default();
1576 let path = http::uri::PathAndQuery::from_static(
1577 "/nominal.ai.v1.AIAgentService/StreamChat",
1578 );
1579 let mut req = request.into_request();
1580 req.extensions_mut()
1581 .insert(GrpcMethod::new("nominal.ai.v1.AIAgentService", "StreamChat"));
1582 self.inner.server_streaming(req, path, codec).await
1583 }
1584 #[deprecated]
1585 pub async fn get_conversation(
1586 &mut self,
1587 request: impl tonic::IntoRequest<super::GetConversationRequest>,
1588 ) -> std::result::Result<
1589 tonic::Response<super::GetConversationResponse>,
1590 tonic::Status,
1591 > {
1592 self.inner
1593 .ready()
1594 .await
1595 .map_err(|e| {
1596 tonic::Status::unknown(
1597 format!("Service was not ready: {}", e.into()),
1598 )
1599 })?;
1600 let codec = tonic::codec::ProstCodec::default();
1601 let path = http::uri::PathAndQuery::from_static(
1602 "/nominal.ai.v1.AIAgentService/GetConversation",
1603 );
1604 let mut req = request.into_request();
1605 req.extensions_mut()
1606 .insert(
1607 GrpcMethod::new("nominal.ai.v1.AIAgentService", "GetConversation"),
1608 );
1609 self.inner.unary(req, path, codec).await
1610 }
1611 pub async fn get_conversation_metadata(
1612 &mut self,
1613 request: impl tonic::IntoRequest<super::GetConversationMetadataRequest>,
1614 ) -> std::result::Result<
1615 tonic::Response<super::GetConversationMetadataResponse>,
1616 tonic::Status,
1617 > {
1618 self.inner
1619 .ready()
1620 .await
1621 .map_err(|e| {
1622 tonic::Status::unknown(
1623 format!("Service was not ready: {}", e.into()),
1624 )
1625 })?;
1626 let codec = tonic::codec::ProstCodec::default();
1627 let path = http::uri::PathAndQuery::from_static(
1628 "/nominal.ai.v1.AIAgentService/GetConversationMetadata",
1629 );
1630 let mut req = request.into_request();
1631 req.extensions_mut()
1632 .insert(
1633 GrpcMethod::new(
1634 "nominal.ai.v1.AIAgentService",
1635 "GetConversationMetadata",
1636 ),
1637 );
1638 self.inner.unary(req, path, codec).await
1639 }
1640 pub async fn get_conversation_messages(
1641 &mut self,
1642 request: impl tonic::IntoRequest<super::GetConversationMessagesRequest>,
1643 ) -> std::result::Result<
1644 tonic::Response<super::GetConversationMessagesResponse>,
1645 tonic::Status,
1646 > {
1647 self.inner
1648 .ready()
1649 .await
1650 .map_err(|e| {
1651 tonic::Status::unknown(
1652 format!("Service was not ready: {}", e.into()),
1653 )
1654 })?;
1655 let codec = tonic::codec::ProstCodec::default();
1656 let path = http::uri::PathAndQuery::from_static(
1657 "/nominal.ai.v1.AIAgentService/GetConversationMessages",
1658 );
1659 let mut req = request.into_request();
1660 req.extensions_mut()
1661 .insert(
1662 GrpcMethod::new(
1663 "nominal.ai.v1.AIAgentService",
1664 "GetConversationMessages",
1665 ),
1666 );
1667 self.inner.unary(req, path, codec).await
1668 }
1669 pub async fn list_conversations(
1670 &mut self,
1671 request: impl tonic::IntoRequest<super::ListConversationsRequest>,
1672 ) -> std::result::Result<
1673 tonic::Response<super::ListConversationsResponse>,
1674 tonic::Status,
1675 > {
1676 self.inner
1677 .ready()
1678 .await
1679 .map_err(|e| {
1680 tonic::Status::unknown(
1681 format!("Service was not ready: {}", e.into()),
1682 )
1683 })?;
1684 let codec = tonic::codec::ProstCodec::default();
1685 let path = http::uri::PathAndQuery::from_static(
1686 "/nominal.ai.v1.AIAgentService/ListConversations",
1687 );
1688 let mut req = request.into_request();
1689 req.extensions_mut()
1690 .insert(
1691 GrpcMethod::new("nominal.ai.v1.AIAgentService", "ListConversations"),
1692 );
1693 self.inner.unary(req, path, codec).await
1694 }
1695 pub async fn batch_get_conversation_active_runs(
1696 &mut self,
1697 request: impl tonic::IntoRequest<
1698 super::BatchGetConversationActiveRunsRequest,
1699 >,
1700 ) -> std::result::Result<
1701 tonic::Response<super::BatchGetConversationActiveRunsResponse>,
1702 tonic::Status,
1703 > {
1704 self.inner
1705 .ready()
1706 .await
1707 .map_err(|e| {
1708 tonic::Status::unknown(
1709 format!("Service was not ready: {}", e.into()),
1710 )
1711 })?;
1712 let codec = tonic::codec::ProstCodec::default();
1713 let path = http::uri::PathAndQuery::from_static(
1714 "/nominal.ai.v1.AIAgentService/BatchGetConversationActiveRuns",
1715 );
1716 let mut req = request.into_request();
1717 req.extensions_mut()
1718 .insert(
1719 GrpcMethod::new(
1720 "nominal.ai.v1.AIAgentService",
1721 "BatchGetConversationActiveRuns",
1722 ),
1723 );
1724 self.inner.unary(req, path, codec).await
1725 }
1726 pub async fn create_conversation(
1727 &mut self,
1728 request: impl tonic::IntoRequest<super::CreateConversationRequest>,
1729 ) -> std::result::Result<
1730 tonic::Response<super::CreateConversationResponse>,
1731 tonic::Status,
1732 > {
1733 self.inner
1734 .ready()
1735 .await
1736 .map_err(|e| {
1737 tonic::Status::unknown(
1738 format!("Service was not ready: {}", e.into()),
1739 )
1740 })?;
1741 let codec = tonic::codec::ProstCodec::default();
1742 let path = http::uri::PathAndQuery::from_static(
1743 "/nominal.ai.v1.AIAgentService/CreateConversation",
1744 );
1745 let mut req = request.into_request();
1746 req.extensions_mut()
1747 .insert(
1748 GrpcMethod::new("nominal.ai.v1.AIAgentService", "CreateConversation"),
1749 );
1750 self.inner.unary(req, path, codec).await
1751 }
1752 pub async fn update_conversation_metadata(
1753 &mut self,
1754 request: impl tonic::IntoRequest<super::UpdateConversationMetadataRequest>,
1755 ) -> std::result::Result<
1756 tonic::Response<super::UpdateConversationMetadataResponse>,
1757 tonic::Status,
1758 > {
1759 self.inner
1760 .ready()
1761 .await
1762 .map_err(|e| {
1763 tonic::Status::unknown(
1764 format!("Service was not ready: {}", e.into()),
1765 )
1766 })?;
1767 let codec = tonic::codec::ProstCodec::default();
1768 let path = http::uri::PathAndQuery::from_static(
1769 "/nominal.ai.v1.AIAgentService/UpdateConversationMetadata",
1770 );
1771 let mut req = request.into_request();
1772 req.extensions_mut()
1773 .insert(
1774 GrpcMethod::new(
1775 "nominal.ai.v1.AIAgentService",
1776 "UpdateConversationMetadata",
1777 ),
1778 );
1779 self.inner.unary(req, path, codec).await
1780 }
1781 pub async fn delete_conversation(
1782 &mut self,
1783 request: impl tonic::IntoRequest<super::DeleteConversationRequest>,
1784 ) -> std::result::Result<
1785 tonic::Response<super::DeleteConversationResponse>,
1786 tonic::Status,
1787 > {
1788 self.inner
1789 .ready()
1790 .await
1791 .map_err(|e| {
1792 tonic::Status::unknown(
1793 format!("Service was not ready: {}", e.into()),
1794 )
1795 })?;
1796 let codec = tonic::codec::ProstCodec::default();
1797 let path = http::uri::PathAndQuery::from_static(
1798 "/nominal.ai.v1.AIAgentService/DeleteConversation",
1799 );
1800 let mut req = request.into_request();
1801 req.extensions_mut()
1802 .insert(
1803 GrpcMethod::new("nominal.ai.v1.AIAgentService", "DeleteConversation"),
1804 );
1805 self.inner.unary(req, path, codec).await
1806 }
1807 pub async fn archive_conversation(
1808 &mut self,
1809 request: impl tonic::IntoRequest<super::ArchiveConversationRequest>,
1810 ) -> std::result::Result<
1811 tonic::Response<super::ArchiveConversationResponse>,
1812 tonic::Status,
1813 > {
1814 self.inner
1815 .ready()
1816 .await
1817 .map_err(|e| {
1818 tonic::Status::unknown(
1819 format!("Service was not ready: {}", e.into()),
1820 )
1821 })?;
1822 let codec = tonic::codec::ProstCodec::default();
1823 let path = http::uri::PathAndQuery::from_static(
1824 "/nominal.ai.v1.AIAgentService/ArchiveConversation",
1825 );
1826 let mut req = request.into_request();
1827 req.extensions_mut()
1828 .insert(
1829 GrpcMethod::new(
1830 "nominal.ai.v1.AIAgentService",
1831 "ArchiveConversation",
1832 ),
1833 );
1834 self.inner.unary(req, path, codec).await
1835 }
1836 pub async fn unarchive_conversation(
1837 &mut self,
1838 request: impl tonic::IntoRequest<super::UnarchiveConversationRequest>,
1839 ) -> std::result::Result<
1840 tonic::Response<super::UnarchiveConversationResponse>,
1841 tonic::Status,
1842 > {
1843 self.inner
1844 .ready()
1845 .await
1846 .map_err(|e| {
1847 tonic::Status::unknown(
1848 format!("Service was not ready: {}", e.into()),
1849 )
1850 })?;
1851 let codec = tonic::codec::ProstCodec::default();
1852 let path = http::uri::PathAndQuery::from_static(
1853 "/nominal.ai.v1.AIAgentService/UnarchiveConversation",
1854 );
1855 let mut req = request.into_request();
1856 req.extensions_mut()
1857 .insert(
1858 GrpcMethod::new(
1859 "nominal.ai.v1.AIAgentService",
1860 "UnarchiveConversation",
1861 ),
1862 );
1863 self.inner.unary(req, path, codec).await
1864 }
1865 pub async fn get_snapshot_rid_by_user_message_id(
1866 &mut self,
1867 request: impl tonic::IntoRequest<super::GetSnapshotRidByUserMessageIdRequest>,
1868 ) -> std::result::Result<
1869 tonic::Response<super::GetSnapshotRidByUserMessageIdResponse>,
1870 tonic::Status,
1871 > {
1872 self.inner
1873 .ready()
1874 .await
1875 .map_err(|e| {
1876 tonic::Status::unknown(
1877 format!("Service was not ready: {}", e.into()),
1878 )
1879 })?;
1880 let codec = tonic::codec::ProstCodec::default();
1881 let path = http::uri::PathAndQuery::from_static(
1882 "/nominal.ai.v1.AIAgentService/GetSnapshotRidByUserMessageId",
1883 );
1884 let mut req = request.into_request();
1885 req.extensions_mut()
1886 .insert(
1887 GrpcMethod::new(
1888 "nominal.ai.v1.AIAgentService",
1889 "GetSnapshotRidByUserMessageId",
1890 ),
1891 );
1892 self.inner.unary(req, path, codec).await
1893 }
1894 pub async fn compact_conversation(
1895 &mut self,
1896 request: impl tonic::IntoRequest<super::CompactConversationRequest>,
1897 ) -> std::result::Result<
1898 tonic::Response<super::CompactConversationResponse>,
1899 tonic::Status,
1900 > {
1901 self.inner
1902 .ready()
1903 .await
1904 .map_err(|e| {
1905 tonic::Status::unknown(
1906 format!("Service was not ready: {}", e.into()),
1907 )
1908 })?;
1909 let codec = tonic::codec::ProstCodec::default();
1910 let path = http::uri::PathAndQuery::from_static(
1911 "/nominal.ai.v1.AIAgentService/CompactConversation",
1912 );
1913 let mut req = request.into_request();
1914 req.extensions_mut()
1915 .insert(
1916 GrpcMethod::new(
1917 "nominal.ai.v1.AIAgentService",
1918 "CompactConversation",
1919 ),
1920 );
1921 self.inner.unary(req, path, codec).await
1922 }
1923 pub async fn submit_message_feedback(
1924 &mut self,
1925 request: impl tonic::IntoRequest<super::SubmitMessageFeedbackRequest>,
1926 ) -> std::result::Result<
1927 tonic::Response<super::SubmitMessageFeedbackResponse>,
1928 tonic::Status,
1929 > {
1930 self.inner
1931 .ready()
1932 .await
1933 .map_err(|e| {
1934 tonic::Status::unknown(
1935 format!("Service was not ready: {}", e.into()),
1936 )
1937 })?;
1938 let codec = tonic::codec::ProstCodec::default();
1939 let path = http::uri::PathAndQuery::from_static(
1940 "/nominal.ai.v1.AIAgentService/SubmitMessageFeedback",
1941 );
1942 let mut req = request.into_request();
1943 req.extensions_mut()
1944 .insert(
1945 GrpcMethod::new(
1946 "nominal.ai.v1.AIAgentService",
1947 "SubmitMessageFeedback",
1948 ),
1949 );
1950 self.inner.unary(req, path, codec).await
1951 }
1952 pub async fn update_conversation_resources(
1953 &mut self,
1954 request: impl tonic::IntoRequest<super::UpdateConversationResourcesRequest>,
1955 ) -> std::result::Result<
1956 tonic::Response<super::UpdateConversationResourcesResponse>,
1957 tonic::Status,
1958 > {
1959 self.inner
1960 .ready()
1961 .await
1962 .map_err(|e| {
1963 tonic::Status::unknown(
1964 format!("Service was not ready: {}", e.into()),
1965 )
1966 })?;
1967 let codec = tonic::codec::ProstCodec::default();
1968 let path = http::uri::PathAndQuery::from_static(
1969 "/nominal.ai.v1.AIAgentService/UpdateConversationResources",
1970 );
1971 let mut req = request.into_request();
1972 req.extensions_mut()
1973 .insert(
1974 GrpcMethod::new(
1975 "nominal.ai.v1.AIAgentService",
1976 "UpdateConversationResources",
1977 ),
1978 );
1979 self.inner.unary(req, path, codec).await
1980 }
1981 pub async fn create_queued_message(
1982 &mut self,
1983 request: impl tonic::IntoRequest<super::CreateQueuedMessageRequest>,
1984 ) -> std::result::Result<
1985 tonic::Response<super::CreateQueuedMessageResponse>,
1986 tonic::Status,
1987 > {
1988 self.inner
1989 .ready()
1990 .await
1991 .map_err(|e| {
1992 tonic::Status::unknown(
1993 format!("Service was not ready: {}", e.into()),
1994 )
1995 })?;
1996 let codec = tonic::codec::ProstCodec::default();
1997 let path = http::uri::PathAndQuery::from_static(
1998 "/nominal.ai.v1.AIAgentService/CreateQueuedMessage",
1999 );
2000 let mut req = request.into_request();
2001 req.extensions_mut()
2002 .insert(
2003 GrpcMethod::new(
2004 "nominal.ai.v1.AIAgentService",
2005 "CreateQueuedMessage",
2006 ),
2007 );
2008 self.inner.unary(req, path, codec).await
2009 }
2010 pub async fn list_queued_messages(
2011 &mut self,
2012 request: impl tonic::IntoRequest<super::ListQueuedMessagesRequest>,
2013 ) -> std::result::Result<
2014 tonic::Response<super::ListQueuedMessagesResponse>,
2015 tonic::Status,
2016 > {
2017 self.inner
2018 .ready()
2019 .await
2020 .map_err(|e| {
2021 tonic::Status::unknown(
2022 format!("Service was not ready: {}", e.into()),
2023 )
2024 })?;
2025 let codec = tonic::codec::ProstCodec::default();
2026 let path = http::uri::PathAndQuery::from_static(
2027 "/nominal.ai.v1.AIAgentService/ListQueuedMessages",
2028 );
2029 let mut req = request.into_request();
2030 req.extensions_mut()
2031 .insert(
2032 GrpcMethod::new("nominal.ai.v1.AIAgentService", "ListQueuedMessages"),
2033 );
2034 self.inner.unary(req, path, codec).await
2035 }
2036 pub async fn delete_queued_message(
2037 &mut self,
2038 request: impl tonic::IntoRequest<super::DeleteQueuedMessageRequest>,
2039 ) -> std::result::Result<
2040 tonic::Response<super::DeleteQueuedMessageResponse>,
2041 tonic::Status,
2042 > {
2043 self.inner
2044 .ready()
2045 .await
2046 .map_err(|e| {
2047 tonic::Status::unknown(
2048 format!("Service was not ready: {}", e.into()),
2049 )
2050 })?;
2051 let codec = tonic::codec::ProstCodec::default();
2052 let path = http::uri::PathAndQuery::from_static(
2053 "/nominal.ai.v1.AIAgentService/DeleteQueuedMessage",
2054 );
2055 let mut req = request.into_request();
2056 req.extensions_mut()
2057 .insert(
2058 GrpcMethod::new(
2059 "nominal.ai.v1.AIAgentService",
2060 "DeleteQueuedMessage",
2061 ),
2062 );
2063 self.inner.unary(req, path, codec).await
2064 }
2065 pub async fn cancel_agent_run(
2066 &mut self,
2067 request: impl tonic::IntoRequest<super::CancelAgentRunRequest>,
2068 ) -> std::result::Result<
2069 tonic::Response<super::CancelAgentRunResponse>,
2070 tonic::Status,
2071 > {
2072 self.inner
2073 .ready()
2074 .await
2075 .map_err(|e| {
2076 tonic::Status::unknown(
2077 format!("Service was not ready: {}", e.into()),
2078 )
2079 })?;
2080 let codec = tonic::codec::ProstCodec::default();
2081 let path = http::uri::PathAndQuery::from_static(
2082 "/nominal.ai.v1.AIAgentService/CancelAgentRun",
2083 );
2084 let mut req = request.into_request();
2085 req.extensions_mut()
2086 .insert(
2087 GrpcMethod::new("nominal.ai.v1.AIAgentService", "CancelAgentRun"),
2088 );
2089 self.inner.unary(req, path, codec).await
2090 }
2091 pub async fn batch_get_citations(
2092 &mut self,
2093 request: impl tonic::IntoRequest<super::BatchGetCitationsRequest>,
2094 ) -> std::result::Result<
2095 tonic::Response<super::BatchGetCitationsResponse>,
2096 tonic::Status,
2097 > {
2098 self.inner
2099 .ready()
2100 .await
2101 .map_err(|e| {
2102 tonic::Status::unknown(
2103 format!("Service was not ready: {}", e.into()),
2104 )
2105 })?;
2106 let codec = tonic::codec::ProstCodec::default();
2107 let path = http::uri::PathAndQuery::from_static(
2108 "/nominal.ai.v1.AIAgentService/BatchGetCitations",
2109 );
2110 let mut req = request.into_request();
2111 req.extensions_mut()
2112 .insert(
2113 GrpcMethod::new("nominal.ai.v1.AIAgentService", "BatchGetCitations"),
2114 );
2115 self.inner.unary(req, path, codec).await
2116 }
2117 }
2118}
2119#[derive(Clone, PartialEq, ::prost::Message)]
2120pub struct ClassifyErrorRequest {
2121 #[prost(string, tag = "1")]
2122 pub error_message: ::prost::alloc::string::String,
2123}
2124#[derive(Clone, PartialEq, ::prost::Message)]
2125pub struct ClassifyErrorResponse {
2126 #[prost(enumeration = "ErrorClassification", tag = "1")]
2127 pub classification: i32,
2128 #[prost(string, tag = "2")]
2129 pub reason: ::prost::alloc::string::String,
2130}
2131#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2132#[repr(i32)]
2133pub enum ErrorClassification {
2134 Unspecified = 0,
2135 Client = 1,
2136 Server = 2,
2137}
2138impl ErrorClassification {
2139 pub fn as_str_name(&self) -> &'static str {
2144 match self {
2145 Self::Unspecified => "ERROR_CLASSIFICATION_UNSPECIFIED",
2146 Self::Client => "ERROR_CLASSIFICATION_CLIENT",
2147 Self::Server => "ERROR_CLASSIFICATION_SERVER",
2148 }
2149 }
2150 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2152 match value {
2153 "ERROR_CLASSIFICATION_UNSPECIFIED" => Some(Self::Unspecified),
2154 "ERROR_CLASSIFICATION_CLIENT" => Some(Self::Client),
2155 "ERROR_CLASSIFICATION_SERVER" => Some(Self::Server),
2156 _ => None,
2157 }
2158 }
2159}
2160pub mod data_ingestion_error_classifier_service_client {
2162 #![allow(
2163 unused_variables,
2164 dead_code,
2165 missing_docs,
2166 clippy::wildcard_imports,
2167 clippy::let_unit_value,
2168 )]
2169 use tonic::codegen::*;
2170 use tonic::codegen::http::Uri;
2171 #[derive(Debug, Clone)]
2172 pub struct DataIngestionErrorClassifierServiceClient<T> {
2173 inner: tonic::client::Grpc<T>,
2174 }
2175 impl DataIngestionErrorClassifierServiceClient<tonic::transport::Channel> {
2176 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
2178 where
2179 D: TryInto<tonic::transport::Endpoint>,
2180 D::Error: Into<StdError>,
2181 {
2182 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
2183 Ok(Self::new(conn))
2184 }
2185 }
2186 impl<T> DataIngestionErrorClassifierServiceClient<T>
2187 where
2188 T: tonic::client::GrpcService<tonic::body::Body>,
2189 T::Error: Into<StdError>,
2190 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
2191 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
2192 {
2193 pub fn new(inner: T) -> Self {
2194 let inner = tonic::client::Grpc::new(inner);
2195 Self { inner }
2196 }
2197 pub fn with_origin(inner: T, origin: Uri) -> Self {
2198 let inner = tonic::client::Grpc::with_origin(inner, origin);
2199 Self { inner }
2200 }
2201 pub fn with_interceptor<F>(
2202 inner: T,
2203 interceptor: F,
2204 ) -> DataIngestionErrorClassifierServiceClient<InterceptedService<T, F>>
2205 where
2206 F: tonic::service::Interceptor,
2207 T::ResponseBody: Default,
2208 T: tonic::codegen::Service<
2209 http::Request<tonic::body::Body>,
2210 Response = http::Response<
2211 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
2212 >,
2213 >,
2214 <T as tonic::codegen::Service<
2215 http::Request<tonic::body::Body>,
2216 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
2217 {
2218 DataIngestionErrorClassifierServiceClient::new(
2219 InterceptedService::new(inner, interceptor),
2220 )
2221 }
2222 #[must_use]
2227 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
2228 self.inner = self.inner.send_compressed(encoding);
2229 self
2230 }
2231 #[must_use]
2233 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
2234 self.inner = self.inner.accept_compressed(encoding);
2235 self
2236 }
2237 #[must_use]
2241 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
2242 self.inner = self.inner.max_decoding_message_size(limit);
2243 self
2244 }
2245 #[must_use]
2249 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
2250 self.inner = self.inner.max_encoding_message_size(limit);
2251 self
2252 }
2253 pub async fn classify_error(
2254 &mut self,
2255 request: impl tonic::IntoRequest<super::ClassifyErrorRequest>,
2256 ) -> std::result::Result<
2257 tonic::Response<super::ClassifyErrorResponse>,
2258 tonic::Status,
2259 > {
2260 self.inner
2261 .ready()
2262 .await
2263 .map_err(|e| {
2264 tonic::Status::unknown(
2265 format!("Service was not ready: {}", e.into()),
2266 )
2267 })?;
2268 let codec = tonic::codec::ProstCodec::default();
2269 let path = http::uri::PathAndQuery::from_static(
2270 "/nominal.ai.v1.DataIngestionErrorClassifierService/ClassifyError",
2271 );
2272 let mut req = request.into_request();
2273 req.extensions_mut()
2274 .insert(
2275 GrpcMethod::new(
2276 "nominal.ai.v1.DataIngestionErrorClassifierService",
2277 "ClassifyError",
2278 ),
2279 );
2280 self.inner.unary(req, path, codec).await
2281 }
2282 }
2283}
2284#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2285pub struct GetProviderStatusRequest {}
2286#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2287pub struct GetProviderStatusResponse {
2288 #[prost(message, optional, tag = "1")]
2289 pub timestamp: ::core::option::Option<
2290 super::super::super::google::protobuf::Timestamp,
2291 >,
2292 #[prost(message, optional, tag = "2")]
2293 pub last_status: ::core::option::Option<ProviderStatus>,
2294 #[deprecated]
2295 #[prost(message, optional, tag = "3")]
2296 pub aggregated_status_over_last_30m: ::core::option::Option<ProviderStatus>,
2297 #[prost(message, optional, tag = "4")]
2298 pub aggregated_status: ::core::option::Option<ProviderStatus>,
2299}
2300#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2301pub struct ProviderStatus {
2302 #[prost(oneof = "provider_status::Status", tags = "1, 2")]
2303 pub status: ::core::option::Option<provider_status::Status>,
2304}
2305pub mod provider_status {
2307 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
2308 pub enum Status {
2309 #[prost(message, tag = "1")]
2310 Healthy(super::Healthy),
2311 #[prost(message, tag = "2")]
2312 Degraded(super::Degraded),
2313 }
2314}
2315#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2316pub struct Healthy {}
2317#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2318pub struct Degraded {
2319 #[prost(enumeration = "DegradationReason", tag = "1")]
2320 pub reason: i32,
2321}
2322#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2323pub struct ProviderMetrics {
2324 #[prost(int32, tag = "1")]
2325 pub time_to_first_token_ms: i32,
2326 #[prost(int32, tag = "2")]
2327 pub total_time_ms: i32,
2328}
2329#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2330#[repr(i32)]
2331pub enum DegradationReason {
2332 Unspecified = 0,
2333 HighLatency = 1,
2334 Failures = 2,
2335 HighLatencyAndFailures = 3,
2336 Unavailable = 4,
2337}
2338impl DegradationReason {
2339 pub fn as_str_name(&self) -> &'static str {
2344 match self {
2345 Self::Unspecified => "DEGRADATION_REASON_UNSPECIFIED",
2346 Self::HighLatency => "DEGRADATION_REASON_HIGH_LATENCY",
2347 Self::Failures => "DEGRADATION_REASON_FAILURES",
2348 Self::HighLatencyAndFailures => {
2349 "DEGRADATION_REASON_HIGH_LATENCY_AND_FAILURES"
2350 }
2351 Self::Unavailable => "DEGRADATION_REASON_UNAVAILABLE",
2352 }
2353 }
2354 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2356 match value {
2357 "DEGRADATION_REASON_UNSPECIFIED" => Some(Self::Unspecified),
2358 "DEGRADATION_REASON_HIGH_LATENCY" => Some(Self::HighLatency),
2359 "DEGRADATION_REASON_FAILURES" => Some(Self::Failures),
2360 "DEGRADATION_REASON_HIGH_LATENCY_AND_FAILURES" => {
2361 Some(Self::HighLatencyAndFailures)
2362 }
2363 "DEGRADATION_REASON_UNAVAILABLE" => Some(Self::Unavailable),
2364 _ => None,
2365 }
2366 }
2367}
2368pub mod model_provider_health_service_client {
2370 #![allow(
2371 unused_variables,
2372 dead_code,
2373 missing_docs,
2374 clippy::wildcard_imports,
2375 clippy::let_unit_value,
2376 )]
2377 use tonic::codegen::*;
2378 use tonic::codegen::http::Uri;
2379 #[derive(Debug, Clone)]
2380 pub struct ModelProviderHealthServiceClient<T> {
2381 inner: tonic::client::Grpc<T>,
2382 }
2383 impl ModelProviderHealthServiceClient<tonic::transport::Channel> {
2384 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
2386 where
2387 D: TryInto<tonic::transport::Endpoint>,
2388 D::Error: Into<StdError>,
2389 {
2390 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
2391 Ok(Self::new(conn))
2392 }
2393 }
2394 impl<T> ModelProviderHealthServiceClient<T>
2395 where
2396 T: tonic::client::GrpcService<tonic::body::Body>,
2397 T::Error: Into<StdError>,
2398 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
2399 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
2400 {
2401 pub fn new(inner: T) -> Self {
2402 let inner = tonic::client::Grpc::new(inner);
2403 Self { inner }
2404 }
2405 pub fn with_origin(inner: T, origin: Uri) -> Self {
2406 let inner = tonic::client::Grpc::with_origin(inner, origin);
2407 Self { inner }
2408 }
2409 pub fn with_interceptor<F>(
2410 inner: T,
2411 interceptor: F,
2412 ) -> ModelProviderHealthServiceClient<InterceptedService<T, F>>
2413 where
2414 F: tonic::service::Interceptor,
2415 T::ResponseBody: Default,
2416 T: tonic::codegen::Service<
2417 http::Request<tonic::body::Body>,
2418 Response = http::Response<
2419 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
2420 >,
2421 >,
2422 <T as tonic::codegen::Service<
2423 http::Request<tonic::body::Body>,
2424 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
2425 {
2426 ModelProviderHealthServiceClient::new(
2427 InterceptedService::new(inner, interceptor),
2428 )
2429 }
2430 #[must_use]
2435 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
2436 self.inner = self.inner.send_compressed(encoding);
2437 self
2438 }
2439 #[must_use]
2441 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
2442 self.inner = self.inner.accept_compressed(encoding);
2443 self
2444 }
2445 #[must_use]
2449 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
2450 self.inner = self.inner.max_decoding_message_size(limit);
2451 self
2452 }
2453 #[must_use]
2457 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
2458 self.inner = self.inner.max_encoding_message_size(limit);
2459 self
2460 }
2461 pub async fn get_provider_status(
2462 &mut self,
2463 request: impl tonic::IntoRequest<super::GetProviderStatusRequest>,
2464 ) -> std::result::Result<
2465 tonic::Response<super::GetProviderStatusResponse>,
2466 tonic::Status,
2467 > {
2468 self.inner
2469 .ready()
2470 .await
2471 .map_err(|e| {
2472 tonic::Status::unknown(
2473 format!("Service was not ready: {}", e.into()),
2474 )
2475 })?;
2476 let codec = tonic::codec::ProstCodec::default();
2477 let path = http::uri::PathAndQuery::from_static(
2478 "/nominal.ai.v1.ModelProviderHealthService/GetProviderStatus",
2479 );
2480 let mut req = request.into_request();
2481 req.extensions_mut()
2482 .insert(
2483 GrpcMethod::new(
2484 "nominal.ai.v1.ModelProviderHealthService",
2485 "GetProviderStatus",
2486 ),
2487 );
2488 self.inner.unary(req, path, codec).await
2489 }
2490 }
2491}