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